Skip to content

Create Order API

Endpoint

POST /order

Headers

KeyValue
AuthorizationBearer change_to_your_access_token
X-S2-Organization95d73baf-76ba-4bea-86ac-1534c5e5d4aa

Request Body

FieldTypeRequiredDescription
accountIdstringYesGet it from List Account API.
channelOrderIdstringYesChannel Order Id
channelOrderIdAltstringNoChannel Order Id Alt, Optional.
channelOrderIdAlt2stringNoChannel Order Id Alt 2, Optional.
channelShippingMethodstringYesShould be an empty string if there is no value. Do not use null.
shippingAddressaddress objectYesAll fields of the address are required. Pass an empty string if there is no value.
billingAddressaddress objectNoOptional. Pass null if there is no value.
channelOrderDateOffsetDateTime stringYesOrder Date string, Must be in UTC time.
currencyIdstringYesCurrency time.
itemarrayYesAll 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.
metaobjectYesPass an empty object {} or an empty array [] if there is no value.
attachmentsarrayYesPass 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

FieldTypeDescription
idstringUnique identifier for the created order
organizationOrganization ObjectInformation about the organization. See Organization Object for details.
accountAccount ObjectInformation about the account. See Account Object for details.
accountSubChannelstringSub-channel information (if any)
channelOrderIdstringOrder identifier in the sales channel
channelOrderIdAltstringAlternative order identifier in the sales channel
channelOrderIdAlt2stringSecond alternative order identifier in the sales channel
channelShippingMethodstringShipping method specified by the channel
shippingAddressAddress ObjectShipping address details. See Address Object for details.
shippingOverrideAddressAddress ObjectOverride shipping address (if any). See Address Object for details.
billingAddressAddress ObjectBilling address details. See Address Object for details.
metaobjectAdditional metadata associated with the order
channelOrderDatestringDate when the order was created in the channel (ISO 8601 format)
statusstringCurrent status of the order (e.g., "UNFULFILLED")
assignStatusstringAssignment status of the order (e.g., "PENDING")
archivedbooleanWhether the order has been archived
currencyIdstringCurrency code for the order (e.g., "AED")
itemsarrayList of items in the order. See Order Item Object for details.
attachmentsarrayList of attachments. See Attachment Object for details.
fulfillmentsarrayList of fulfillments associated with the order
createdAtstringTimestamp when the order was created (ISO 8601 format)
updatedAtstringTimestamp when the order was last updated (ISO 8601 format)
shipByDatestringDate by which the order should be shipped (ISO 8601 format)
deliverByDatestringDate by which the order should be delivered (ISO 8601 format)
customerNotestringCustomer's notes or instructions for the order

Organization Object

FieldTypeDescription
idstringUnique identifier for the organization
namestringName of the organization
createdAtstringTimestamp when the organization was created (ISO 8601 format)
updatedAtstringTimestamp when the organization was last updated (ISO 8601 format)

Account Object

FieldTypeDescription
idstringUnique identifier for the account
organizationOrganization ObjectInformation about the organization. See Organization Object for details.
namestringName of the account
typestringType of account (e.g., "MARKETPLACE_GENERIC")
autoAssignOrdersToWarehousestringWarehouse ID for automatic order assignment (if enabled)
createdAtstringTimestamp when the account was created (ISO 8601 format)
updatedAtstringTimestamp when the account was last updated (ISO 8601 format)

Address Object

FieldTypeDescription
namestringThe name associated with the address
companystringCompany name
address1stringPrimary street address
address2stringAdditional address information
citystringCity name
statestringState or province
postalCodestringPostal or ZIP code
countryIdstringCountry code in ISO 3166-1 alpha-2 format (e.g., "CN")
phonestringContact phone number
emailstringContact email address

Order Item Object

FieldTypeDescription
channelOrderItemIdstringIdentifier for the item in the sales channel
productProduct ObjectInformation about the product. See Product Object for details
quantityintegerQuantity of the product ordered
unitPricenumberPrice per unit of the product
metaobjectAdditional metadata associated with the order item

Product Object

FieldTypeDescription
idstringUnique identifier for the product
organizationOrganization ObjectOrganization that owns the product
skustringStock keeping unit
brandBrand ObjectBrand information. See Brand Object for details
gtinstringGlobal Trade Item Number
namestringProduct name
remarksstringAdditional remarks about the product
imageMainstringURL of the main product image
packageLengthMmnumberPackage length in millimeters
packageWidthMmnumberPackage width in millimeters
packageHeightMmnumberPackage height in millimeters
shippingWeightKgnumberShipping weight in kilograms
caseUnitstringUnit of measurement for cases (e.g., "EACH", "CARTON")
casePackintegerNumber of items per case
caseLengthMmnumberCase length in millimeters
caseWidthMmnumberCase width in millimeters
caseHeightMmnumberCase height in millimeters
caseWeightKgnumberCase weight in kilograms
conditionstringProduct condition (e.g., "NEW")
serialNumberRequiredbooleanWhether serial number is required
expiryDateRequiredbooleanWhether expiry date is required
unknownbooleanWhether the product is unknown
createdAtstringTimestamp when the product was created (ISO 8601 format)
updatedAtstringTimestamp when the product was last updated (ISO 8601 format)
otherIdsarrayList of other identifiers associated with the product

Brand Object

FieldTypeDescription
idstringUnique identifier for the brand
namestringBrand name
nameNormalizedstringNormalized version of the brand name
createdAtstringTimestamp when the brand was created (ISO 8601 format)

Attachment Object

FieldTypeDescription
idstringUnique identifier for the attachment
fileNamestringName of the attached file
pathstringFile path or URL where the attachment can be accessed
createdAtstringTimestamp when the attachment was created (ISO 8601 format)
updatedAtstringTimestamp 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
}