Save order
POST /openapi/Order/SaveOrder — TMS API · Order and Shipment Record
Transfers one or more orders along with their shipments (consignment) to TMS.
The request is queued and returns a ticketNumber; query the result of the record
with GetTicketNumberStatus.
Validation rules (applied during recording, result visible in the ticket):
orders[].orderNumber,orders[].orderDate, andorders[].customerInfo.customerCodeare mandatory.orders[].consignmentscannot be empty.- If
consignments[].locationCodeis empty, the account's default location is used; if no default location is defined, an error is returned. - If
salesChannelCodeis provided, it must be a valid sales channel. - If the same order number has been recorded before, a
Order already existserror is returned.
If asynchronous recording is disabled for your organization, the order is processed immediately and the response returns synchronous: true.
İstek gövdesi
orders(object[], zorunlu): Orders to be recorded.orders.orderDate(string<date-time>, zorunlu): Order date.orders.totalPrice(number): Order amount.orders.orderNumber(string, zorunlu): Order number (unique within the account).orders.consignments(object[], zorunlu): Shipments of the order; cannot be empty.orders.consignments.attr1(string): Free field 1.orders.consignments.attr2(string): Free field 2.orders.consignments.attr3(string): Free field 3.orders.consignments.attr4(string): Free field 4.orders.consignments.attr5(string): Free field 5.orders.consignments.attr6(string): Free field 6.orders.consignments.attr7(string): Free field 7.orders.consignments.attr8(string): Free field 8.orders.consignments.attr9(string): Free field 9.orders.consignments.attr10(string): Free field 10.orders.consignments.weight(number): Weight (kg).orders.consignments.products(object[]): Products in the shipment.orders.consignments.vendorId(integer): Seller ID (marketplace seller shipment).orders.consignments.totalPrice(number): Shipment amount.orders.consignments.carrierCode(string): Carrier code. If empty, the carrier is selected according to account rules.orders.consignments.currentPrice(number): Amount to be collected on cash on delivery.orders.consignments.isChangeable(boolean): Is the carrier changeable later.orders.consignments.locationCode(string): Origin location code. If empty, the account's default location is used.orders.consignments.senderAddress(oneOf): Sender address (for marketplace customer-to-customer shipments).orders.consignments.totalQuantity(integer): Product quantity in the shipment.orders.consignments.toLocationCode(string): Destination location code (for store/warehouse transfer).orders.consignments.isSendCargoData(boolean): Should shipment data be sent to the carrier.orders.consignments.isVendorPackage(boolean): Is it a vendor shipment.orders.consignments.paymentTypeCode(string): Payment type code (seeGetPaymentTypes).orders.consignments.pickUpPointCode(string): Delivery point (pick-up point) code.orders.consignments.shippingAddress(object)orders.consignments.deliverySlotCode(string): Delivery time slot code.orders.consignments.deliveryTypeCode(string): Delivery type code.orders.consignments.volumetricWeight(number): Volumetric weight (desi).orders.consignments.consignmentNumber(string): Shipment (consignment/package) number.orders.consignments.isStatusTrackManuel(boolean): Will status tracking be done manually (with Status Notification endpoints).orders.consignments.vendorAgreementTypeId(integer): Vendor agreement type ID.orders.consignments.pickUpPointCompanyCode(string): Delivery point company code.orders.consignments.salesChannelTrackingNumber(string): Tracking number provided by the sales channel (marketplace).orders.consignments.saleChannelConfigurationKey(string): Sales channel configuration key.orders.consignments.estimatedPackagingCompletionDate(string<date-time>): Date of handover to cargo.orders.consignments.expectedPackagingCompletionDueDate(string<date-time>): Expected/agreed date of handover to cargo by the marketplace.
orders.customerInfo(object, zorunlu)orders.customerInfo.customerCode(string): Customer's unique code in your system.orders.customerInfo.customerSegmentCode(string): Customer segment code (for segment-based carrier rules).
orders.totalQuantity(integer): Total product quantity.orders.sendSmsNotification(boolean): Send SMS notification to the recipient.orders.sendEmailNotification(boolean): Send email notification to the recipient.orders.saleChannelConfigurationKey(string): Sales channel configuration key.
clientCode(string, zorunlu): Organization code.accountCode(string, zorunlu): Account code.salesChannelCode(string): Sales channel/marketplace code.
Yanıtlar
- 200: Record queued (or processed synchronously)
- 400: Account could not be verified or sync record returned an error.
- 401: Token missing, invalid, or expired (response without body).
- 429: Request limit exceeded.