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
orderNumberis provided, customer information is taken from the order. IforderNumberis empty,customerandpickupAddressare mandatory. - In scheduled returns (
chosenPickupDate),pickupAddressis mandatory in all cases; get available dates withGetAvailableReturnDates. returnCodeMaxUsageCountspecifies 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 iforderNumberis empty; if provided, takes precedence over the order's customer andpickupAddressis 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,customerandpickupAddressare mandatory.returnCodes.locationCode(string): Location code where the return will be sent.returnCodes.pickupAddress(oneOf): Pickup address. Mandatory iforderNumberis empty and for scheduled returns.returnCodes.isVendorReturn(boolean): Is the return to the vendor.returnCodes.chosenPickupDate(string): Selected pickup date for scheduled return (seeGetAvailableReturnDates).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