Create an Outbound Order

This guide describes how to use the Ware2Go API to create an outbound order. Outbound orders define the SKUs and recipient details needed to fulfill an order from one of your warehouses.

Overview

Creating an outbound order adds an order to your fulfillment que. To create a new order, send a POST request to the /orders endpoint with product, customer, and reference information in the request. The response includes the order and reference IDs that you provided. See the /orders endpoint definition for object and field definitions for the request and response.

The sections below define the prerequisites and provide step-by-step instructions for creating an order.

Prerequisites

You need the following items in place before you can use the Ware2Go API:

  • A Ware2Go Account - Contact [email protected] if you do not already have an account.
  • Test Data - You will need product and customer data in FulfillmentVu to receive a success response from the API. Work with your account manager to add some test data to your account.
  • API Credentials - Follow the steps in the Getting Started guide guide to obtain your security credentials and for details about including them with your request.

Implementation

Follow the steps below to create an outbound order using the API:

  1. Send a POST request to the /orders endpoint with the following information in the body of the request:

    • referenceId - The unique identifier for this order in Ware2Go. You must generate and provide this value. This is the value that you will use to track the order as it progresses through fulfillment. Most companies use the orderId value for the referenceId.
    • skuQuantities - An array of objects that define the items and quantities to include with the order.
    • companyName and address fields - The name and address of the recipient.

    The code below shows an example request body:

    {
      "referenceId": "ZX-1057",
      "companyName": "John Doe",
      "address1": "6805 Kettering Circle",
      "address2": null,
      "city": "Fair Oaks",
      "state": "CA",
      "zipCode": "95628",
      "country": "US",
      "shippingSpeed": "ECONOMY",
      "skuQuantities": [
        {
          "skuId": "WARE2GOBC2",
          "unitQuantity": 1
        }
      ]
    }
    
  2. Ware2Go returns an object with order information in the body. Be sure to capture the following information about the order:

    • referenceId - The unique identifier for the order.
    • status - The status of the order. The status value in the response will initially be "DRAFT". Send a GET request to /orders/{orderId} to obtain an updated status value as the order progresses through fulfillment.

    The code below shows an example of a successful Create Order response:

    {
      "country": "USA",
      "zipCode": "14057",
      "address2": "suite 300",
      "orderId": "OA3-BNRU8KS-P47NU6E",
      "city": "EDEN",
      "address1": "3057 HILLBROOK DR",
      "buyerEmail": null,
      "companyName": "Test-A Reichel, McClure and Bergstrom",
      "referenceId": "OA3-BNRU8KS-P47NU6E",
      "skuQuantities": [
        {
          "skuName": null,
          "unitQuantity": 1,
          "upc": null,
          "proofOfDelivery": "No",
          "skuId": "WILSON1",
          "insuranceRequired": null
        }
      ],
      "phoneNumber": "(555) 555-5555",
      "meta": {
        "dateTime": "2021-06-03T05:09:12.142Z",
        "traceId": "9005439809150844970",
        "serviceName": "openapi",
        "version": "1.0.0"
      },
      "purchaseOrderNumber": null,
      "state": "NY",
      "status": "DRAFT"
    }
    

The order will be available in FulfillmentVu for review, or you can use the values in the response to integrate with your own order management tool. See the Create Order operation definition in the API reference for details about all of the fields that you can send in the request, status value definitions, and error responses.