API reference › Schemas

ShipmentRequest

Either quoteId + selectedServiceType, or inline shipper, recipient, packages and service.type. customs (documentsOnly:true or a non-empty commodities[]) is required for every cross-border route, intra-EU included.

Fields

  • quoteIdstringlength ≤ 8000
  • selectedServiceTypestringlength ≤ 60
  • shipperobject
  • contactobjectrequired
  • namestringrequiredlength 1–100
  • companystringlength ≤ 100
  • phonestringrequiredlength 1–20
  • emailstring (email)length ≤ 255
  • addressobjectrequired
  • line1stringrequiredlength 1–100
  • line2stringlength ≤ 100
  • citystringrequiredlength 1–100
  • stateCodestringlength ≤ 20
  • postalCodestringlength ≤ 20
  • countryCodestringrequiredlength 2–2
  • residentialboolean
  • recipientobject
  • contactobjectrequired

    Same shape as shipper.contact above.

  • addressobjectrequired

    Same shape as shipper.address above.

  • packages[]array of objectitems ≥ 1items ≤ 100
  • 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
  • documentsOnlyboolean
  • contentTypestring

    one of: ITEMS · DOCUMENTS

  • itemDescriptionstringlength ≤ 200
  • dutiesPaymentstring

    one of: SENDER · RECIPIENT · THIRD_PARTY

  • incotermsstring

    one of: FCA · EXW · CIP · CPT · DAP · DAT · DDP

  • shipmentPurposestring

    one of: SOLD · NOT_SOLD · GIFT · SAMPLE · REPAIR_AND_RETURN · PERSONAL_EFFECTS

  • commodities[]array of objectitems ≤ 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
  • pickupobject
  • locationExternalIdstringlength 1–100pattern ^[^\u0000-\u001F\u007F-\u009F\u2028\u2029]+$

    PCK: one of your pickup places (PUT /pickup-locations/{externalId}) — IDS computes when the parcels are ready (the payment, the place's hours, holidays, preparation time), books the first carrier window that fits (or a deferred pickup task when the carrier books that day only later) and joins one pickup with your other shipments of the place, day and carrier. date, readyTime and closeTime are then not sent.

  • datestringpattern ^\d{4}-\d{2}-\d{2}$

    Without a place: the day of the pickup at the shipper's address (today … +10 days).

  • readyTimestringpattern ^([01]\d|2[0-3]):[0-5]\d$

    Without a place: from when the parcels are ready (local time at the shipper's address — judged in its country's time zone, the westernmost mainland one where a country has several; default — not before now on today, else 09:00).

  • closeTimestringpattern ^([01]\d|2[0-3]):[0-5]\d$

    Without a place: the latest time the courier may come (default 18:00).

  • instructionsstringlength ≤ 500
  • requiredboolean
  • referencesobject
  • customerReferencestringlength ≤ 40
  • poNumberstringlength ≤ 40
  • invoiceNumberstringlength ≤ 40
  • platformobject

    PLT: a platform's service-account key only (any other key: 400).

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

    The platform's order this shipment delivers.

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

    The platform's own shipment or group id.

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

    The seller as the platform knows them — an opaque code, never a name, e-mail or phone.

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

    The buyer (the delivery customer) as the platform knows them — an opaque code, never a name, e-mail or phone.

  • deliveryCustomerobject

    BOOK: required while IDS invoices the delivery to the buyer (GET /platform invoiceRecipient delivery_customer).

  • typestringrequired

    one of: person · company

    person: a private buyer; company: a buyer that is a company (its codes for the invoice).

  • namestringrequiredlength 1–200

    The person's full name or the company's legal name, as the invoice prints it.

  • vatNumberstringlength 2–32pattern ^[A-Za-z0-9][A-Za-z0-9 ./-]*$

    company only: its VAT code (e.g. RO12345678) when it has one.

  • registrationNumberstringlength 2–32pattern ^[A-Za-z0-9][A-Za-z0-9 ./-]*$

    company only: its registration number (e.g. J40/123/2020).

  • addressobjectrequired

    The delivery customer's address for the invoice (it may differ from the recipient's).

  • line1stringrequiredlength 1–100
  • line2stringlength ≤ 100
  • citystringrequiredlength 1–100
  • stateCodestringlength ≤ 20
  • postalCodestringlength ≤ 20
  • countryCodestringrequiredpattern ^[A-Za-z]{2}$
  • buyerAcceptanceobject

    BOOK: required while IDS invoices the delivery to the buyer (GET /platform invoiceRecipient delivery_customer).

  • documents[]array of objectrequireditems ≥ 1items ≤ 3

    terms and postal_conditions — accepted by the buyer, required, in their current versions; privacy — shown, optional.

  • typestringrequired

    one of: terms · postal_conditions · privacy

  • versionstringrequiredlength 1–20

    The version shown to the buyer (GET /metadata buyerDocuments).

  • acceptedAtstring (date-time)required

    When the buyer ticked the box (ISO 8601 with an offset), before the payment: not in the future, at most 30 days ago, not after platform.payment.confirmedAt.

  • ipAddressstringlength ≤ 45

    Accepted but not stored by IDS — keep it in your own checkout record.

  • userAgentstringlength 1–500

    Accepted but not stored by IDS — keep it in your own checkout record.

  • paymentobject

    BOOK: required for a platform paid on the platform (GET /platform paymentMode platform_collected); refused for any other.

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

    The platform's own id of the payment (e.g. its payment provider's payment id); one payment may cover several bookings of one order.

  • amountMinorintegerrequired> 0≤ 100000000

    The delivery amount of this booking in minor units (cents) — exactly the quote's total of the chosen service.

  • currencystringrequiredpattern ^[A-Za-z]{3}$

    The quote's currency.

  • confirmedAtstring (date-time)required

    When the platform's payment provider confirmed the payment (ISO 8601 with an offset).

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

    Your own reference of this booking operation (e.g. the order's delivery id), unique per account and environment: a lost answer is found by it (GET /shipments?operationRef=), and a second booking with it answers 409 OPERATION_REF_TAKEN instead of booking twice. Required for a booking paid on the platform.

  • labelFormatstring

    one of: PDF · PNG · ZPLII · EPL2

  • labelSizestring

    one of: PAPER_4X6 · PAPER_4X8 · STOCK_4X6 · PAPER_LETTER

  • testScenariostring

    one of: delivered · delivery_attempt_failed · returned_to_sender · pickup_point · adjustment · lost · duplicate_scan · out_of_order · pickup_failed · pickup_timeout · pickup_retryable · pickup_missed · slow · carrier_error · carrier_error_retryable

    Test keys on the simulated carrier only: the scenario this booking plays — tracking, pickup, errors (GET /metadata testScenarios.booking; default delivered). A live key, or a test key IDS switched to the FedEx sandbox: 400.

  • required: one of these field setsquoteId | shipper + recipient + packages