API reference › Schemas

ReturnQuoteRequest

Fields

  • payerstring

    one of: buyer · seller · platform

    Who will pay the return, when you know it already (INV). A platform IDS invoices to its buyers: the price carries the VAT of the buyer's VAT scenario only when the buyer pays; seller or platform — the route's VAT rule. Named here, the booking must name the same payer (else 422 QUOTE_MISMATCH); not named — priced as paid by the buyer.

  • reasonstringrequired

    one of: withdrawal · defect · damaged · not_delivered · other

    Why the parcel goes back — the scenarios are kept apart: withdrawal (a withdrawal from the purchase, no defect), defect (a defect of the goods), damaged (damaged in carriage), not_delivered (the buyer did not receive it), other (with reasonNote). It sets the carrier's return reason and, across a border, the customs reason; it never decides who pays.

  • reasonNotestringlength 1–200pattern ^[^\u0000-\u001F\u007F-\u009F\u2028\u2029<>]+$

    A short description (required with reason other); printed in the carrier's return reference.

  • returnToobject

    Where it goes. Default: the return place of the original's pickup place (PUT /pickup-locations returns), else that place, else the original's shipper.

  • locationExternalIdstringlength 1–100pattern ^[^\u0000-\u001F\u007F-\u009F\u2028\u2029]+$

    One of your pickup places (PUT /pickup-locations/{externalId}) — the return goes to its address.

  • contactobject

    With address: the seller's contact the label prints (name, phone).

  • namestringrequiredlength 1–100
  • companystringlength ≤ 100
  • phonestringrequiredlength 1–20
  • emailstring (email)length ≤ 255
  • addressobject

    Or the address the return goes to.

  • line1stringrequiredlength 1–100
  • line2stringlength ≤ 100
  • citystringrequiredlength 1–100
  • stateCodestringlength ≤ 20
  • postalCodestringlength ≤ 20
  • countryCodestringrequiredlength 2–2
  • residentialboolean
  • shipperobject

    The buyer the return comes from. Default: the original's recipient (as the carrier got it). Whether a courier can collect there is judged as for a home address (the carrier may not pick up at homes) unless shipper.address.residential is false.

  • contactobject

    Same shape as returnTo.contact above.

  • addressobjectrequired

    Same shape as returnTo.address above.

  • packages[]array of objectitems ≥ 1items ≤ 40

    The boxes that go back (one shipment). Default: the original's boxes.

  • weightnumberrequired> 0≤ 1000
  • weightUnitstringdefault KG

    one of: KG · LB

  • lengthnumber> 0≤ 1000
  • widthnumber> 0≤ 1000
  • heightnumber> 0≤ 1000
  • dimUnitstring

    one of: CM · IN

  • declaredValueobject
  • amountnumberrequired≥ 0
  • currencystringrequiredlength 3–3
  • contentValueobject
  • amountnumberrequired≥ 0≤ 100000000
  • currencystringrequiredlength 3–3
  • specialGoodsobject

    Special goods in this box, declared from the items packed in it (the seller classifies each item by its manufacturer's documents: the safety data sheet; for a battery, its UN 38.3 test summary and its marking). Absent: ordinary goods. Nothing is allowed by default: a declared category the account may not ship — an allowable one IDS did not allow, or any other dangerous goods (all except a lithium battery in or with its device) — answers 422 PRICING_UNAVAILABLE with details.reason SPECIAL_GOODS_NOT_ALLOWED or DANGEROUS_GOODS_NOT_SUPPORTED and the refused boxes. Categories: GET /metadata specialGoods; a platform's allowed ones: GET /platform specialGoodsAllowed.

  • batteryobject

    A battery in the box. Category lithium_<type>_<installation> or non_lithium_battery (installation is not considered for non_lithium). Lithium batteries in or with equipment are dangerous goods carried, within the carrier's limits, under a reduced regime: IDS books them, and non_lithium, only for an account it allowed the category (GET /platform specialGoodsAllowed for a platform) — a lithium one is then declared to the carrier with the quote and the booking. Lithium batteries alone are refused for every account (DANGEROUS_GOODS_NOT_SUPPORTED).

  • typestringrequired

    one of: lithium_ion · lithium_metal · non_lithium

    lithium_ion: lithium-ion or lithium-polymer cells (rechargeable LIR coin cells included); lithium_metal: lithium-metal or lithium-alloy cells, mostly non-rechargeable (CR coin cells included); non_lithium: a dry alkaline, zinc-carbon, NiMH or NiCd battery. Lead-acid (spillable or not), sodium-ion and other wet batteries are dangerous goods: declare their unNumber (refused).

  • installationstringrequired

    one of: in_equipment · with_equipment · alone

    in_equipment: installed in the device; with_equipment: packed in the same box as the device it powers; alone: batteries without the device. A power bank is always alone, even in the same box as a device.

  • liquidboolean

    true: the box holds a liquid that is not dangerous goods (its safety data sheet names no UN number). Category liquid — booked only for an account IDS allowed it; nothing is sent to the carrier. A flammable or otherwise dangerous liquid is not a liquid here: declare it by hazardClass or unNumber (refused).

  • aerosolboolean

    true: the box holds an aerosol (spray can). Dangerous goods — refused for every account (DANGEROUS_GOODS_NOT_SUPPORTED).

  • perfumeboolean

    true: the box holds perfume, eau de toilette or another fragrance. IDS treats them as dangerous goods (most are flammable liquids, UN 1266) — refused for every account (DANGEROUS_GOODS_NOT_SUPPORTED).

  • hazardClassstringpattern ^[1-9](\.[1-6])?$

    The UN hazard class the item's documents name (3, 2.1, 8, …). Any value makes the box dangerous goods — refused for every account (DANGEROUS_GOODS_NOT_SUPPORTED). A lithium battery in or with its device is declared by battery, not here.

  • unNumberstringpattern ^UN\d{4}$

    The UN number the item's documents name (UN1266, UN1993, …). Any value makes the box dangerous goods — refused for every account (DANGEROUS_GOODS_NOT_SUPPORTED). A lithium battery in or with its device is declared by battery, not here.

  • serviceobject
  • typestringlength ≤ 60
  • packagingstringlength ≤ 60
  • signaturestring

    one of: SERVICE_DEFAULT · DIRECT · ADULT

  • coveragestring

    one of: none · auto

  • customsobject

    Across a border: the customs lines of what goes back (a partial return). Default: the original's lines.

  • documentsOnlyboolean
  • commodities[]array of objectitems ≥ 1items ≤ 100
  • descriptionstringrequiredlength 1–450
  • quantityintegerrequired> 0≤ 99999
  • quantityUnitsstringlength ≤ 10
  • weightnumberrequired> 0≤ 1000
  • weightUnitstring

    one of: KG · LB

  • customsValuenumberrequired> 0
  • customsValueCurrencystringrequiredlength 3–3
  • countryOfManufacturestringlength 2–2
  • harmonizedCodestringlength ≤ 30
  • include[]array of stringitems ≤ 3
  • dropOffNearobject

    With include dropOffPoints: the buyer's coordinates, when you have them — the carrier's point search by coordinates (FedEx does not geocode every country's street addresses, e.g. Romania's; without them the search is by the address).

  • latitudenumberrequired≥ -90≤ 90
  • longitudenumberrequired≥ -180≤ 180
  • pickupobject

    The day from which a courier pickup at the buyer is checked (default today).

  • datestringrequiredpattern ^\d{4}-\d{2}-\d{2}$
  • localestringlength ≤ 35

    The language of buyerNotice and details.buyerMessage (en, ro, ru, uk, sr, hu, bg, el, zh).

  • testScenariostring

    one of: route_not_served · address_invalid · address_unknown · pickup_unavailable · residential_pickup_unavailable · slow · carrier_error · carrier_error_retryable

    Test keys on the simulated carrier only (GET /metadata testScenarios.quote).