Create an order

Method : POST

https://admin.vucustom.com/api/:api_version/orders
Example Request
curl --location 'https://admin.vucustom.com/api/:api_version/orders' \
--data '{
    "order": {
        "currency": "USD",
        "custom_attributes": {},
        "note": "Sample note.",
        "order_date": "2022-10-31T01:54:56.271Z",
        "order_lines": [
            {
                "custom_attributes": {},
                "customer_requested_date": "2023-05-23",
                "factory_code": "factory123",
                "line_reference": "59861396",
                "price": 70,
                "product_description": "My Widget",
                "quantity": 1,
                "recipe_token": "1609c0e8",
                "sku": "SKU123",
                "tags": [
                    "tag1",
                    "tag2"
                ],
                "upc": "UPC123"
            }
        ],
        "order_number": "ord-12345",
        "purchase_order_number": "po-12345",
        "sales_order_number": "so-12345",
        "ship_method_carrier": "UPS",
        "ship_method_code": "XY12",
        "ship_method_description": "UPS Ground Residential",
        "sales_channel": "b2b",
        "ship_to": {
            "account_number": "SHPTO123",
            "address_1": "123 Main St",
            "address_2": "",
            "city": "Ridgewood",
            "company_name": "VU Custom",
            "country": "US",
            "first_name": "John",
            "last_name": "Smith",
            "phone": "2011231234",
            "postal_code": "07450",
            "state_region": "NJ"
        },
        "sold_to": {
            "account_number": "SLDTO123",
            "address_1": "123 Main St",
            "address_2": "",
            "city": "Ridgewood",
            "company_name": "VU Custom",
            "country": "US",
            "first_name": "John",
            "last_name": "Smith",
            "phone": "2011231234",
            "postal_code": "07450",
            "state_region": "NJ"
        },
        "tags": [
            "tag1",
            "tag2"
        ],
        "b2b": {

            "individual": {
                "id" : 1
            },
            "organization": {
                "id" : 1
            },
            "customer": {
                "id" : 1
            }
        }
    }
}'

Request Body Schema (Order)

Field Name
Type
Required
Description

currency

string

Yes

Unique identifier for the sold-to account

custom_attributes

object

No

Key-value pairs of custom data. this can be empty

note

string

No

Order notes. this can be empty

order_date

string

Yes

ISO 8601 datetime

order_number

string

Yes

Unique order identifier

purchase_order_number

string

No

PO reference number. this can be empty

ship_method_carrier

string

Yes

Carrier code

ship_method_code

string

Yes

Service level code

ship_method_description

string

Yes

Service description

sales_channel

string

Yes

Channel type (b2b/b2c)

tags

array

No

Order tags

order_lines

array

Yes

Order line items

ship_to

object

Yes

Shipping details

sold_to

object

Yes

Billing details

b2b

object

Yes

B2B specific information. required only for b2b

Request Body Schema (Order lines)

Field Name
Type
Required
Description

custom_attributes

object

No

Line item custom data

customer_requested_date

string

No

Requested delivery date

factory_code

string

No

Manufacturing facility code

line_reference

string

No

External reference

price

Integer

yes

Unit price

product_description

string

Yes

Product description

quantity

Integer

Yes

Order quantity

recipe_token

string

Yes

Customization reference

sku

string

Yes

Product SKU

tags

array

No

Line item tags. this array an be empty

upc

string

No

Product UPC

200 Successful response example

{
  "order": {
    "created_at": "2022-10-31T01:54:56.271Z",
    "currency": "USD",
    "custom_attributes": {},
    "id": 12345,
    "note": "Sample note.",
    "order_date": "2022-10-31T01:54:56.271Z",
    "order_lines": [
      {
        "custom_attributes": {},
        "customer_requested_date": "2024-03-31",
        "estimated_arrival_date": "2024-03-31",
        "ex_factory_date": {
          "current": "2024-03-09",
          "changes": [
            {
              "reason_code": "initial",
              "reason_description": "Initial Value",
              "created_at": "2024-02-23T08:00:40.773Z",
              "estimated_arrival_date": "2024-03-31",
              "ex_factory_date": "2024-03-09"
            }
          ]
        },
        "factory_code": "factory123",
        "id": 12345,
        "line_reference": "59861396",
        "price": 70,
        "product_description": "My Widget",
        "product_id": 12345,
        "quantity": 1,
        "recipe_token": "1609c0e8",
        "status": "new_order",
        "sku": "SKU123",
        "tags": [
          "tag1",
          "tag2"
        ],
        "upc": "UPC123",
        "fulfillments": [
          {
            "created_at": "2024-03-21T08:31:48.653Z",
            "updated_at": "2024-03-21T08:31:48.653Z",
            "quantity": 1,
            "id": 79,
            "tracking_number": "test1",
            "carrier_name": "test",
            "carrier_code": "test",
            "service_name": "test",
            "service_code": "test",
            "recipient_address_1": "test",
            "recipient_city": "test",
            "recipient_name": "test",
            "recipient_state_region": "test",
            "recipient_country": "test",
            "recipient_postal_code": "test",
            "recipient_phone": "test",
            "weight": 0,
            "width": 0,
            "height": 0,
            "length": 0
          }
        ]
      }
    ],
    "order_number": "ord-12345",
    "purchase_order_number": "po-12345",
    "sales_order_number": "so-12345",
    "ship_method_carrier": "UPS",
    "ship_method_code": "XY12",
    "ship_method_description": "UPS Ground Residential",
    "sales_channel": "b2b",
    "ship_to": {
      "account_number": "SHPTO123",
      "address_1": "123 Main St",
      "address_2": "",
      "city": "Ridgewood",
      "company_name": "VU Custom",
      "country": "US",
      "created_at": "2022-10-31T01:54:56.271Z",
      "email": "test@test.com",
      "first_name": "John",
      "id": 12345,
      "last_name": "Smith",
      "phone": "2011231234",
      "postal_code": "07450",
      "state_region": "NJ",
      "updated_at": "2022-10-31T01:54:56.271Z"
    },
    "sold_to": {
      "account_number": "SLDTO123",
      "address_1": "123 Main St",
      "address_2": "",
      "city": "Ridgewood",
      "company_name": "VU Custom",
      "country": "US",
      "created_at": "2022-10-31T01:54:56.271Z",
      "email": "test@test.com",
      "first_name": "John",
      "id": 12345,
      "last_name": "Smith",
      "phone": "2011231234",
      "postal_code": "07450",
      "state_region": "NJ",
      "updated_at": "2022-10-31T01:54:56.271Z"
    },
    "tags": [
      "tag1",
      "tag2"
    ],
    "b2b": {
      "individual": {
        "id": 1,
        "first_name": "test",
        "last_name": "test",
        "email": "test@test.com",
        "city": "Test",
        "state_region": "TT",
        "postal_code": "13112",
        "country": "US"
      },
      "organization": {
        "id": 1,
        "name": "test",
        "organization_group": {
          "LEAGUE": {
            "Professional": "PRO1"
          }
        }
      },
      "customer": {
        "id": 1,
        "name": "test"
      }
    },
    "updated_at": "2022-10-31T01:54:56.271Z"
  }
}

Last updated