Create return code

POST /openapi/Return/SaveReturnCode — TMS API · Return

Defines a return code for the return the customer will ship.

  • Identity (organization/account) is resolved from the token. If you continue to send clientCode/accountCode, the old (code-based) flow will work; these fields will be deprecated.
  • If orderNumber is provided, customer information is taken from the order. If orderNumber is empty, customer and pickupAddress are mandatory.
  • In scheduled returns (chosenPickupDate), pickupAddress is mandatory in all cases; get available dates with GetAvailableReturnDates.
  • returnCodeMaxUsageCount specifies the maximum number of times the return code can be used.

İstek gövdesi

  • clientCode (string): Deprecated: identity is taken from the token. If sent, the old (code-based) flow will work.
  • accountCode (string): Deprecated: identity is taken from the token. If sent, the old (code-based) flow will work.
  • returnCodes (object[], zorunlu): Return codes to be defined.
    • returnCodes.reason (string): Return reason.
    • returnCodes.customer (oneOf): Customer making the return. Mandatory if orderNumber is empty; if provided, takes precedence over the order's customer and pickupAddress is also required.
    • returnCodes.returnCode (string, zorunlu): Return code.
    • returnCodes.carrierCode (string): Return carrier code.
    • returnCodes.orderNumber (string): Order number the return belongs to. If empty, customer and pickupAddress are mandatory.
    • returnCodes.locationCode (string): Location code where the return will be sent.
    • returnCodes.pickupAddress (oneOf): Pickup address. Mandatory if orderNumber is empty and for scheduled returns.
    • returnCodes.isVendorReturn (boolean): Is the return to the vendor.
    • returnCodes.chosenPickupDate (string): Selected pickup date for scheduled return (see GetAvailableReturnDates).
    • returnCodes.vendorAgreementTypeId (integer): Vendor agreement type ID.
    • returnCodes.returnCodeMaxUsageCount (integer): Maximum usage count of the return code.
    • returnCodes.returnCodeVolumetricWeight (number): Return volume.

Yanıtlar

  • 200: Return code created
  • 400: Validation error
  • 401: No token/invalid or token does not contain account information

200 yanıt alanları