Skip to content

Create an empty order (legacy)

Request

Creates an order header for the customer given in the vendorGuid header, without lines. Lines are added afterwards through the order-entry screens. Prefer POST /v2/order or POST /v1/orderWithItems.

Accepts user session headers only. Requests without them are rejected with a plain-text 400.

Security
UserGuid and UserToken and SupplierGuid
Headers
vendorGuidstring, (uuid)

GUID of the customer (vendor) to act for. With API key authentication this selects the customer context; with user session headers it is the vendor the user is acting on behalf of.

Bodyapplication/jsonrequired
catalogGuidstring, (uuid)
priceGroupGuidstring, (uuid)
api_guidstring

Your idempotency key for this order.

po_nostring
notestring
internal_notestring
descriptionstring
is_quoteboolean
is_sampleboolean
is_templateboolean
category_idinteger
project_idinteger
shipping_instructionsstring
is_local_pickupboolean
is_local_deliveryboolean
is_dropshipboolean
shippingnumber
taxnumber
workflow_idinteger
allow_substitutionsboolean
allow_backordersboolean
do_not_ship_before_datestring, (date)
cancel_datestring, (date)
tagsArray of integers
orderDetailsobject
curl -i -X POST \
  https://docs.orderwerks.com/_mock/openapi/v1/order \
  -H 'Content-Type: application/json' \
  -H 'supplierGuid: YOUR_API_KEY_HERE' \
  -H 'userGuid: YOUR_API_KEY_HERE' \
  -H 'userToken: YOUR_API_KEY_HERE' \
  -H 'vendorGuid: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -d '{
    "catalogGuid": "5c4291bd-3307-470f-9505-c1cf7a89ee66",
    "priceGroupGuid": "02036fa6-f010-4adc-9e17-eb41dbc48a29",
    "api_guid": "string",
    "po_no": "string",
    "note": "string",
    "internal_note": "string",
    "description": "string",
    "is_quote": true,
    "is_sample": true,
    "is_template": true,
    "category_id": 0,
    "project_id": 0,
    "shipping_instructions": "string",
    "is_local_pickup": true,
    "is_local_delivery": true,
    "is_dropship": true,
    "shipping": 0,
    "tax": 0,
    "workflow_id": 0,
    "allow_substitutions": true,
    "allow_backorders": true,
    "do_not_ship_before_date": "2019-08-24",
    "cancel_date": "2019-08-24",
    "tags": [
      0
    ],
    "orderDetails": {}
  }'

Responses

The created order.

Bodyapplication/json
orderobject(Order)required

A sales order. GET /v1/orders returns a reduced projection (the header fields plus id/guid/name of each related record); the single-order and create endpoints return the full model with all relations.

Response
{ "order": { "id": 0, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "name": "string", "api_guid": "string", "supplier_id": 0, "vendor_id": 0, "user_id": 0, "catalog_id": 0, "price_group_id": 0, "category_id": 0, "parent_order_id": 0, "client_id": 0, "project_id": 0, "sales_rep_id": 0, "ship_to_id": 0, "order_state_id": 0, "order_source_id": 0, "po_no": "string", "invoice_no": "string", "description": "string", "note": "string", "internal_note": "string", "shipping_instructions": "string", "is_quote": true, "is_sample": true, "is_local_pickup": true, "is_local_delivery": true, "is_shipped": true, "partially_shipped": true, "is_on_hold": true, "is_cancelled": true, "sub_total": 0, "tax": 0, "shipping": 0, "labor": 0, "discount": 0, "discount_total": 0, "other": 0, "grand_total": 0, "delivery_date": "string", "ship_date": "string", "do_not_ship_before_date": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "Order_Items": [ {} ], "Ship_To": { "id": 0, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "vendor_id": 0, "order_id": 0, "name": "string", "company_name": "string", "address_line_one": "string", "address_line_two": "string", "address_line_three": "string", "city": "string", "state": "string", "postal_code": "string", "country": "string", "phone": "string", "fax": "string", "email": "string", "note": "string", "address_internal_id": "string", "is_vendor_main_ship_to": true, "verified": true, "lat": 0, "lng": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "Vendor": { "id": 0, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "supplier_id": 0, "parent_vendor_id": 0, "customer_internal_id": "string", "name": "string", "email": "string", "shipping_email": "string", "phone": "string", "cell": "string", "fax": "string", "address_line_one": "string", "address_line_two": "string", "city": "string", "state": "string", "postal_code": "string", "country": "string", "active": true, "tax_exempt": true, "resale_tax_id": "string", "lock_catalog_id": 0, "price_group_id": 0, "payment_type_id": 0, "payment_term_id": 0, "require_payment": true, "credit_limit": 0, "open_balance": 0, "is_ecomm_user": true, "net_term_ecomm_user": true, "require_po": true, "standing_po": "string", "hide_pricing": true, "currency_id": 0, "notes": "string", "default_order_category_id": 0, "route_id": 0, "timezone": "string", "bill_to_id": 0, "ship_to_id": 0, "Bill_To": {}, "Ship_To": {}, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z" }, "Catalog": { "id": 0, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "supplier_id": 0, "name": "Main Catalog", "email": "string", "version": "string", "active": true, "order_item_type_id": 0, "currency_id": 0, "order_prefix_override": "string", "last_inventory_update": "2019-08-24T14:15:22Z", "Price_Groups": [], "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "Price_Group": { "id": 0, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "catalog_id": 0, "value": "Wholesale", "is_main": true, "percentage": 0, "price_upcharge_type_id": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z" }, "Category": { "id": 0, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "catalog_id": 0, "parent_category_id": 0, "name": "string", "sequence": 0, "hide_category": true, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "Order_State": { "id": 0, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "name": "string" }, "User": { "id": 0, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "name": "string", "email": "string" }, "Supplier": { "id": 0, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "name": "string", "email": "string" }, "Client": { "id": 0, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "name": "string" }, "Parent_Order": { "id": 0, "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "name": "string" }, "Order_Detail": {}, "Order_State_Logs": [ {} ], "Assigned_Users": [ {} ] } }