Fix Your Supply Chain 1-800-621-9402
Request a quote

API Documentation

Inbound Order API

Use this api to submit orders to Bender Warehouse Services. It accepts JSON Posted to apibeta.bendergroup.com/

Headers and Authentication

Authentication is done with tokens, which you'll need to obtain from us prior to using our API service. The token is an alphanumeric string that is included in the HTTP header of every request you make to the api. The header key must be the word 'Authorization:' and the value must be the word 'Token' followed by a space followed by your unique token. An example header is below:

content-type: application/json
Authorization: Token AUTH_TOKEN

Curl Example

For this example to work you must have a data.json file in the same directory that you run the script.

curl -v \
-H "content-type: application/json" \
-H "Authorization: Token AUTH_TOKEN" \
--http1.0 \
-X POST \
--data "@data.json" \ http://apibeta.bendergroup.com       

Responses

On a successful request you will get the following response back:

{
    "statusCode": 200,
    "message": "order successfully placed"
}

There are 2 different error messages that you can get, an error saying your query is malformed, or an error that you included a field in your JSON that isn't allowed by the server. The first looks like this:

{
     "statusCode": 400,
     "error": "Bad Request",
     "message": "ValidationError: child "customer_number" fails because 
["customer_number" length must be less than or equal to 30 characters long]" }
the second one will look like the following:
{
     "statusCode": 400,
     "error": "Bad Request",
     "message": "ValidationError: "test" is not allowed"
}

Example JSON Data

{
   "customer_number": "CUSTOMER ID",
   "order_number": "ORDER NUMBER",
   "po_number": "ON-11111",
   "requested_ship_date": "2017-12-13",
   "requested_arrival_date": "2017-12-14",
   "carrier_code": "UPSG",
   "payment_method": "PP",
   "name": "Person Name",
   "third_party_account_number": "2394938",
   "notes": "please gift wrap items",
   "line_items": [
       {
           "bender_item_id": "ITEMID",
           "customer_item_id": "ITEMID",
           "description": "Product Description",
           "quantity": 1
                }
            ],
            "addresses": [
                {
                    "address_type": "ST",
                    "name": "Bob Robertson",
                    "line_one": "123 Cherry St.",
                    "line_two": " ",
                    "line_three": " ",
                    "city": "Reno",
                    "state": "NV",
                    "zip_code": "89509",
                    "country": "USA",
                    "email": "asdf@asdf.com",
                    "phone": "555-555-5555",
                    "fax": "555-555-5555"
                },
                {
                    "address_type": "BT",
                    "name": "Bob Robertson",
                    "line_one": "584 Lakeshore Dr",
                    "line_two": " ",
                    "line_three": " ",
                    "city": "Chicago",
                    "state": "IL",
                    "zip_code": "29383",
                    "country": "USA",
                    "email": "asdf@asdf.com",
                    "phone": "555-555-5555",
                    "fax": "555-555-5555"
                }
            ]
}