Appearance
Create Order API
Endpoint
POST /order
Headers
| Key | Value |
|---|---|
| Authorization | Bearer change_to_your_access_token |
| X-S2-Organization | 95d73baf-76ba-4bea-86ac-1534c5e5d4aa |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| accountId | string | Yes | Get it from List Account API. |
| channelOrderId | string | Yes | Channel Order Id |
| channelOrderIdAlt | string | No | Channel Order Id Alt, Optional. |
| channelOrderIdAlt2 | string | No | Channel Order Id Alt 2, Optional. |
| channelShippingMethod | string | Yes | Should be an empty string if there is no value. Do not use null. |
| shippingAddress | address object | Yes | All fields of the address are required. Pass an empty string if there is no value. |
| billingAddress | address object | No | Optional. Pass null if there is no value. |
| channelOrderDate | OffsetDateTime string | Yes | Order Date string, Must be in UTC time. |
| currencyId | string | Yes | Currency time. |
| item | array | Yes | All fields of each item node in array are required. Pass an empty string, 0, or an empty object {} if there is no value, based on the field type. |
| meta | object | Yes | Pass an empty object {} or an empty array [] if there is no value. |
| attachments | array | Yes | Pass an empty array [] if there is no value. |
Request Body Example
json
{
"accountId": "1ac48942-405a-4841-a7d8-708f50dbe888",
"channelOrderId": "test_order_id2",
"channelOrderIdAlt": "test_order_ref_id1",
"channelOrderIdAlt2": "",
"channelShippingMethod": "Standard",
"shippingAddress": {
"name": "test",
"company": "test company",
"address1": "test address",
"address2": "test address2",
"city": "test city",
"state": "test",
"postalCode": "123456",
"countryId": "CN",
"phone": "123456",
"email": ""
},
"billingAddress": {
"name": "test2",
"company": "test company2",
"address1": "test address2",
"address2": "test address2",
"city": "test city2",
"state": "test",
"postalCode": "123456",
"countryId": "AM",
"phone": "12345678",
"email": ""
},
"meta": {},
"channelOrderDate": "2024-04-24T06:00:33.889Z",
"currencyId": "AED",
"items": [
{
"channelOrderItemId": "0",
"productId": "3775cc37-30e7-4579-a58e-c9adda6fa888",
"quantity": 2,
"unitPrice": 9.99,
"meta": {}
},
{
"channelOrderItemId": "1",
"productId": "bab7c35b-2ecb-4b40-be82-8dc1e0a86888",
"quantity": 1,
"unitPrice": 8.89,
"meta": {}
}
],
"attachments": [
{
"fileName": "PFPWig.jpg",
"path": "e4affb47-1971-42bb-97a3-215d9bddd0ac/2024-04-24/order/PFPWig_Xbd0-WYobk1lFLdoCLl59.jpg"
}
]
}Response Body
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the created order |
| organization | Organization Object | Information about the organization. See Organization Object for details. |
| account | Account Object | Information about the account. See Account Object for details. |
| accountSubChannel | string | Sub-channel information (if any) |
| channelOrderId | string | Order identifier in the sales channel |
| channelOrderIdAlt | string | Alternative order identifier in the sales channel |
| channelOrderIdAlt2 | string | Second alternative order identifier in the sales channel |
| channelShippingMethod | string | Shipping method specified by the channel |
| shippingAddress | Address Object | Shipping address details. See Address Object for details. |
| shippingOverrideAddress | Address Object | Override shipping address (if any). See Address Object for details. |
| billingAddress | Address Object | Billing address details. See Address Object for details. |
| meta | object | Additional metadata associated with the order |
| channelOrderDate | string | Date when the order was created in the channel (ISO 8601 format) |
| status | string | Current status of the order (e.g., "UNFULFILLED") |
| assignStatus | string | Assignment status of the order (e.g., "PENDING") |
| archived | boolean | Whether the order has been archived |
| currencyId | string | Currency code for the order (e.g., "AED") |
| items | array | List of items in the order. See Order Item Object for details. |
| attachments | array | List of attachments. See Attachment Object for details. |
| fulfillments | array | List of fulfillments associated with the order |
| createdAt | string | Timestamp when the order was created (ISO 8601 format) |
| updatedAt | string | Timestamp when the order was last updated (ISO 8601 format) |
| shipByDate | string | Date by which the order should be shipped (ISO 8601 format) |
| deliverByDate | string | Date by which the order should be delivered (ISO 8601 format) |
| customerNote | string | Customer's notes or instructions for the order |
Organization Object
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the organization |
| name | string | Name of the organization |
| createdAt | string | Timestamp when the organization was created (ISO 8601 format) |
| updatedAt | string | Timestamp when the organization was last updated (ISO 8601 format) |
Account Object
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the account |
| organization | Organization Object | Information about the organization. See Organization Object for details. |
| name | string | Name of the account |
| type | string | Type of account (e.g., "MARKETPLACE_GENERIC") |
| autoAssignOrdersToWarehouse | string | Warehouse ID for automatic order assignment (if enabled) |
| createdAt | string | Timestamp when the account was created (ISO 8601 format) |
| updatedAt | string | Timestamp when the account was last updated (ISO 8601 format) |
Address Object
| Field | Type | Description |
|---|---|---|
| name | string | The name associated with the address |
| company | string | Company name |
| address1 | string | Primary street address |
| address2 | string | Additional address information |
| city | string | City name |
| state | string | State or province |
| postalCode | string | Postal or ZIP code |
| countryId | string | Country code in ISO 3166-1 alpha-2 format (e.g., "CN") |
| phone | string | Contact phone number |
| string | Contact email address |
Order Item Object
| Field | Type | Description |
|---|---|---|
| channelOrderItemId | string | Identifier for the item in the sales channel |
| product | Product Object | Information about the product. See Product Object for details |
| quantity | integer | Quantity of the product ordered |
| unitPrice | number | Price per unit of the product |
| meta | object | Additional metadata associated with the order item |
Product Object
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the product |
| organization | Organization Object | Organization that owns the product |
| sku | string | Stock keeping unit |
| brand | Brand Object | Brand information. See Brand Object for details |
| gtin | string | Global Trade Item Number |
| name | string | Product name |
| remarks | string | Additional remarks about the product |
| imageMain | string | URL of the main product image |
| packageLengthMm | number | Package length in millimeters |
| packageWidthMm | number | Package width in millimeters |
| packageHeightMm | number | Package height in millimeters |
| shippingWeightKg | number | Shipping weight in kilograms |
| caseUnit | string | Unit of measurement for cases (e.g., "EACH", "CARTON") |
| casePack | integer | Number of items per case |
| caseLengthMm | number | Case length in millimeters |
| caseWidthMm | number | Case width in millimeters |
| caseHeightMm | number | Case height in millimeters |
| caseWeightKg | number | Case weight in kilograms |
| condition | string | Product condition (e.g., "NEW") |
| serialNumberRequired | boolean | Whether serial number is required |
| expiryDateRequired | boolean | Whether expiry date is required |
| unknown | boolean | Whether the product is unknown |
| createdAt | string | Timestamp when the product was created (ISO 8601 format) |
| updatedAt | string | Timestamp when the product was last updated (ISO 8601 format) |
| otherIds | array | List of other identifiers associated with the product |
Brand Object
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the brand |
| name | string | Brand name |
| nameNormalized | string | Normalized version of the brand name |
| createdAt | string | Timestamp when the brand was created (ISO 8601 format) |
Attachment Object
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the attachment |
| fileName | string | Name of the attached file |
| path | string | File path or URL where the attachment can be accessed |
| createdAt | string | Timestamp when the attachment was created (ISO 8601 format) |
| updatedAt | string | Timestamp when the attachment was last updated (ISO 8601 format) |
Response Example
json
{
"id": "ae52b0ab-8f0c-4b11-9c13-c5c221228888",
"organization": {
"id": "3f424caf-0eba-4813-b3e7-7ca0393af888",
"name": "test organization",
"createdAt": "2024-03-05T22:17:23.520948Z",
"updatedAt": "2024-04-09T21:15:15.615765Z"
},
"account": {
"id": "1ac48942-405a-4841-a7d8-708f50dbe1ad",
"organization": {
"id": "3f424caf-0eba-4813-b3e7-7ca0393af888",
"name": "test organization",
"createdAt": "2024-03-05T22:17:23.520948Z",
"updatedAt": "2024-04-09T21:15:15.615765Z"
},
"name": "test organization",
"type": "MARKETPLACE_GENERIC",
"autoAssignOrdersToWarehouse": null,
"createdAt": "2024-04-11T02:52:03.791286Z",
"updatedAt": "2024-04-11T02:52:03.791286Z"
},
"accountSubChannel": null,
"channelOrderId": "test_order_id2",
"channelOrderIdAlt": "test_order_ref_id1",
"channelOrderIdAlt2": "",
"channelShippingMethod": "Standard",
"shippingAddress": {
"name": "test",
"company": "test company",
"address1": "test address",
"address2": "test address2",
"city": "test city",
"state": "test",
"postalCode": "123456",
"countryId": "CN",
"phone": "123456",
"email": ""
},
"shippingOverrideAddress": null,
"billingAddress": {
"name": "test2",
"company": "test company2",
"address1": "test address2",
"address2": "test address2",
"city": "test city2",
"state": "test",
"postalCode": "123456",
"countryId": "AM",
"phone": "12345678",
"email": ""
},
"meta": {},
"channelOrderDate": "2024-04-24T06:00:33.889Z",
"status": "UNFULFILLED",
"assignStatus": "PENDING",
"archived": false,
"currencyId": "AED",
"items": [
{
"channelOrderItemId": "0",
"product": {
"id": "3775cc37-30e7-4579-a58e-c9adda6fac86",
"organization": {
"id": "3f424caf-0eba-4813-b3e7-7ca0393af888",
"name": "test organization",
"createdAt": "2024-03-05T22:17:23.520948Z",
"updatedAt": "2024-04-09T21:15:15.615765Z"
},
"sku": "test",
"brand": {
"id": "e0cbbf33-cbea-4867-9fd9-5d72f22c2321",
"name": "Sony",
"nameNormalized": "sony",
"createdAt": "2024-06-04T03:16:22.617577Z"
},
"gtin": "7045557637838",
"name": "Test Product",
"remarks": "test.",
"imageMain": "95d73baf-76ba-4bea-86ac-1534c5e5d4aa/2024-04-23/avatar/听雨__24_x_26.25__PFPWig_4_YXKT59pJLuoIk82VgaF.jpg",
"packageLengthMm": 33.27078,
"packageWidthMm": 64.29312,
"packageHeightMm": 96.57682,
"shippingWeightKg": 76.44365,
"caseUnit": "EACH",
"casePack": 2,
"caseLengthMm": 34.340958,
"caseWidthMm": 20.323586,
"caseHeightMm": 12.659683,
"caseWeightKg": 0.35708416,
"condition": "NEW",
"serialNumberRequired": true,
"expiryDateRequired": true,
"unknown": false,
"createdAt": "2024-06-04T03:16:22.617577Z",
"updatedAt": "2024-06-04T03:31:28.192345Z",
"otherIds": []
},
"quantity": 2,
"unitPrice": 9.99,
"meta": {}
},
{
"channelOrderItemId": "1",
"product": {
"id": "bab7c35b-2ecb-4b40-be82-8dc1e0a86171",
"organization": {
"id": "3f424caf-0eba-4813-b3e7-7ca0393af888",
"name": "test organization",
"createdAt": "2024-03-05T22:17:23.520948Z",
"updatedAt": "2024-04-09T21:15:15.615765Z"
},
"sku": "SKU-GREY",
"brand": {
"id": "5643b7ee-7df1-48c6-b690-1e29ffa8ab33",
"name": "",
"nameNormalized": "",
"createdAt": "2024-03-05T22:17:28.679732Z"
},
"gtin": "",
"name": "SKU GREY",
"remarks": "",
"imageMain": "",
"packageLengthMm": 1500.0,
"packageWidthMm": 260.0,
"packageHeightMm": 810.0,
"shippingWeightKg": 35.0,
"caseUnit": "CARTON",
"casePack": 1,
"caseLengthMm": 0.0,
"caseWidthMm": 0.0,
"caseHeightMm": 0.0,
"caseWeightKg": 0.0,
"condition": "NEW",
"serialNumberRequired": false,
"expiryDateRequired": false,
"unknown": false,
"createdAt": "2024-03-05T22:20:44.132006Z",
"updatedAt": "2024-04-01T14:31:19.885955Z",
"otherIds": []
},
"quantity": 1,
"unitPrice": 8.89,
"meta": {}
}
],
"attachments": [
{
"id": "5eaf0698-d805-4318-8359-7b4b6d361830",
"fileName": "听雨 (24 x 26.25)_PFPWig.jpg",
"path": "e4affb47-1971-42bb-97a3-215d9bddd0ac/2024-04-24/order/听雨__24_x_26.25__PFPWig_Xbd0-WYobk1lFLdoCLl59.jpg",
"createdAt": "2024-06-04T05:32:34.20791Z",
"updatedAt": "2024-06-04T05:32:34.20791Z"
}
],
"fulfillments": [],
"createdAt": "2024-06-04T05:32:34.20791Z",
"updatedAt": "2024-06-04T05:32:34.20791Z",
"shipByDate": null,
"deliverByDate": null,
"customerNote": null
}