API reference › Schemas

ReturnBookingRequest

Fields

  • quoteIdstringrequiredlength ≤ 100

    The return quote (POST /shipments/{id}/return-quotes) — its price is charged exactly.

  • selectedServiceTypestringrequiredlength ≤ 60
  • payerstring

    one of: buyer · seller · platform · account

    Who bears the return as you decide it: a platform names buyer (paid on the platform: platform.payment), seller (charged to the seller, settled by you: POST /shipments/{id}/return-charge/settle) or platform; an ordinary account: account (default). IDS never decides it. Your rules must respect the buyer's rights: a consumer who withdraws bears the direct cost of the return only if told so before the purchase (OUG 34/2014 art. 6 (1) i), 14 (2)); a consumer returning non-conforming goods for repair, replacement or termination bears no cost of carriage (Directive (EU) 2019/771 art. 14 (1) a), 16 (3) a); OUG 140/2021).

  • handoverobjectrequired
  • methodstringrequired

    one of: pickup · drop_off

    pickup — a courier collects it at the buyer's address (where the carrier picks up there); drop_off — the buyer hands it in at a carrier point (required where no courier comes to a home address).

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

    pickup: the day (today … +10 days, one of the return quote's handover.pickup.days).

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

    pickup: from when the parcel is ready (the carrier reads it as local time at the buyer's address).

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

    pickup: the latest time the courier may come (local time at the buyer's address).

  • instructionsstringlength ≤ 500

    pickup: for the courier.

  • dropOffPointobject

    drop_off: the point the buyer chose (from the return quote's handover.dropOff.points) — named in the label letter; any point of the carrier takes it.

  • idstringrequiredlength 1–60
  • namestringlength ≤ 100
  • line1stringlength ≤ 100
  • citystringlength ≤ 100
  • postalCodestringlength ≤ 20
  • countryCodestringlength 2–2
  • shipperobject

    The buyer's contact for the label, when the return quote had none (the address is the quote's).

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

    The seller's contact for the label, when it differs from the quote's (the address is the quote's).

  • contactobjectrequired

    Same shape as shipper.contact above.

  • customsobject

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

  • 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
  • referencesobject
  • customerReferencestringlength ≤ 40
  • poNumberstringlength ≤ 40
  • invoiceNumberstringlength ≤ 40
  • platformobject

    A platform's key only. The seller and the buyer are the original's.

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

    Default: the original's order.

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

    payer buyer, while IDS invoices the buyer: the delivery customer (default: the original's).

  • 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

    payer buyer, while IDS invoices the buyer: the buyer's acceptance of IDS's documents for this return delivery.

  • 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

    A platform paid on the platform, payer buyer or platform: the payment for this return (exactly the return quote's total).

  • 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.

  • localestringlength ≤ 35

    The language of the label letter to the buyer, where you allow IDS letters (en, ro, ru, uk, sr, hu, bg, el, zh).

  • labelFormatstring

    one of: PDF · PNG

    The buyer prints the label: PDF (default) or PNG.

  • labelSizestring

    one of: PAPER_4X6 · PAPER_4X8 · 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