Address Book Entry Reuse in Orders and Shipments

Overview

This scenario demonstrates how to create a purchase order in the modern Shipwell Orders API framework and specify references to existing addresses / locations so shipments so other functionality like Shipwell Dock Scheduling, creating shipment(s) from existing orders, etc. does not need to specify hours of the operation of the address, location type, available equipment at the location, etc.

Benefits
  • Creating an address with a contact, hours of operation, available equipment (used for shipping and receiving) at the address, etc. enables different processes and systems to reuse this information without the API caller needing to specify this data fully on every call.
  • Example: Creating shipments from an order that has the ADDRESS_BOOK_ENTRY_ID specified for the ship_from and ship_to allows the address information, contact information, etc. to appear in shipments created from this order and allows this information to appear in dock scheduling .

Steps

1. Authenticate and Receive API Token

Authenticate to the API using these steps.

Note

Authorization HTTP headers in API requests, e.g. Authorization: YOUR_AUTHORIZATION_HEADER, typically take the form of Authorization: Token <user-token>. For more information on API authentication, navigate to the Authenticate documentation.

2. Create Address Book Entry

  • Create an address book entry for the receiving/ship-to location for the order with the details of the location, warehouse, site, etc.
  • After successfully creating the address book or location entry, you will receive a unique identifier to reference the address
  • Storing the details, equipment, and hours of the location allows you to easily reuse the location information in other orders, shipments, and use cases.
  • The following properties from the address book entry / location are used in creating the purchase order in this scenario:
    • address book entry / location id
    • address_1
    • city
    • state
    • postal_code
    • country
Example request
About This Request Payload
  • This request creates an address book entry for a location with a dock or forklift that requires an appointment for pickup or delivery.
  • See the address book guide for more information on creating, updating, and retrieving addresses in the platform through the API.
  • See the create address book/locations API reference for a detailed list of fields or properties for the request and response bodies for address/location creation.
curljavascriptpython
Copy
Copied
curl --location --request POST 'https://sandbox-api.shipwell.com/v2/address-book/' \
--header 'Content-Type: application/json' \
--header 'Authorization: YOUR_AUTHORIZATION_HEADER' \
--data-raw '{
    "location_name": "IC-TEST-SAMPLE",
    "notes": "Location ICS-TEST Notes",
    "address": {
        "address_1": "10200 Park Meadows Dr",
        "address_2": null,
        "city": "Lone Tree",
        "state_province": "CO",
        "postal_code": "80124",
        "country": "US"
    },
    "point_of_contacts": [
        {
            "first_name": "SK",
            "last_name": "KM",
            "job_title": null,
            "phone_number": "+15555555555",
            "email": "ics@shipwell.com",
            "preferences": {
                "cancellation": true,
                "delayed": true,
                "delivered": true,
                "eta_changed": true,
                "picked_up": true,
                "receive_bol_on_shipment_booked": false,
                "shipment_booked": true,
                "trailer_assigned": false
            }
        }
    ],
    "location_type": {
        "id": 1,
        "name": "Business (with dock or forklift)"
    },
    "company_name": "TEST-IC",
    "is_default_origin": true,
    "external_reference": "FINT",
    "default_appointment_type": {
        "id": 3,
        "code": "BY_APPT",
        "name": "By appointment"
    }
}'
Copy
Copied
const payload = {
    "location_name": "IC-TEST-SAMPLE",
    "notes": "Location ICS-TEST Notes",
    "address": {
        "address_1": "10200 Park Meadows Dr",
        "address_2": null,
        "city": "Lone Tree",
        "state_province": "CO",
        "postal_code": "80124",
        "country": "US"
    },
    "point_of_contacts": [
        {
            "first_name": "SK",
            "last_name": "KM",
            "job_title": null,
            "phone_number": "+15555555555",
            "email": "ics@shipwell.com",
            "preferences": {
                "cancellation": true,
                "delayed": true,
                "delivered": true,
                "eta_changed": true,
                "picked_up": true,
                "receive_bol_on_shipment_booked": false,
                "shipment_booked": true,
                "trailer_assigned": false
            }
        }
    ],
    "location_type": {
        "id": 1,
        "name": "Business (with dock or forklift)"
    },
    "company_name": "TEST-IC",
    "is_default_origin": true,
    "external_reference": "FINT",
    "default_appointment_type": {
        "id": 3,
        "code": "BY_APPT",
        "name": "By appointment"
    }
};

const basePath = "/v2";
const host = "sandbox-api.shipwell.com";
const resp = await fetch(
  `https://${host}${basePath}/address-book/`,
  {
    method: "POST",
    headers: {
      "Authorization": "YOUR_AUTHORIZATION_HEADER",
      "Content-Type": "application/json"
    },
    body: JSON.stringify(payload)
  }
);

const data = await resp.json();
console.log(data);
Copy
Copied
import requests

base_path = "/v2"
host = "sandbox-api.shipwell.com"
target_url = "https://" + host + base_path + "/address-book/"

headers = {
    "Content-Type": "application/json",
    "Authorization": "YOUR_AUTHORIZATION_HEADER",
}

payload = {
    "location_name": "IC-TEST-SAMPLE",
    "notes": "Location ICS-TEST Notes",
    "address": {
        "address_1": "10200 Park Meadows Dr",
        "address_2": None,
        "city": "Lone Tree",
        "state_province": "CO",
        "postal_code": "80124",
        "country": "US"
    },
    "point_of_contacts": [
        {
            "first_name": "SK",
            "last_name": "KM",
            "job_title": None,
            "phone_number": "+15555555555",
            "email": "ics@shipwell.com",
            "preferences": {
                "cancellation": True,
                "delayed": True,
                "delivered": True,
                "eta_changed": True,
                "picked_up": True,
                "receive_bol_on_shipment_booked": False,
                "shipment_booked": True,
                "trailer_assigned": False
            }
        }
    ],
    "location_type": {
        "id": 1,
        "name": "Business (with dock or forklift)"
    },
    "company_name": "TEST-IC",
    "is_default_origin": True,
    "external_reference": "FINT",
    "default_appointment_type": {
        "id": 3,
        "code": "BY_APPT",
        "name": "By appointment"
    }
}

response = requests.put(target_url, headers=headers, json=payload)
data = response.json()
print(data)
Example response
About This Response Payload
  • An address book entry / location id is generated by the system on successful creation of an address book entry
  • Use address book entry / location id when API endpoints accept the address book entry id as a way to reference the location hours, location type, etc. instead of needing to specify this information.
  • If you need to update this address at a later point in time, you may update the details of the address using the address book PUT /update endpoint ( guide , API reference )
Copy
Copied
{
   "id":"a7ee2a4b-0d55-4202-b0f1-e8326bfe6109",
   "location_name":"IC-TEST-SAMPLE",
   "dock_hours_start":null,
   "dock_hours_end":null,
   "open_sunday":false,
   "sunday_open_time":null,
   "sunday_close_time":null,
   "open_monday":false,
   "monday_open_time":null,
   "monday_close_time":null,
   "open_tuesday":false,
   "tuesday_open_time":null,
   "tuesday_close_time":null,
   "open_wednesday":false,
   "wednesday_open_time":null,
   "wednesday_close_time":null,
   "open_thursday":false,
   "thursday_open_time":null,
   "thursday_close_time":null,
   "open_friday":false,
   "friday_open_time":null,
   "friday_close_time":null,
   "open_saturday":false,
   "saturday_open_time":null,
   "saturday_close_time":null,
   "notes":"Location ICS-TEST Notes",
   "address":{
      "id":"e9ef2cff-dea7-47bc-89f8-3c578b29f34b",
      "address_1":"10200 Park Meadows Dr",
      "address_2":null,
      "city":"Lone Tree",
      "state_province":"CO",
      "postal_code":"80124",
      "country":"US",
      "phone_number":null,
      "latitude":39.5475078,
      "longitude":-104.8750859,
      "timezone":"America/Denver",
      "formatted_address":"10200 Park Meadows Dr, Lone Tree, CO 80124, US",
      "created_at":"2024-06-06T21:17:57.841775Z",
      "updated_at":"2024-06-06T21:17:57.972259Z"
   },
   "point_of_contacts":[
      {
         "id":"499e1f28-a328-4d2d-9e71-689cbdd13640",
         "first_name":"SK",
         "last_name":"KM",
         "job_title":null,
         "phone_number":"+15555555555",
         "email":"ics@shipwell.com",
         "preferences":{
            "cancellation":true,
            "delayed":true,
            "delivered":true,
            "eta_changed":true,
            "picked_up":true,
            "receive_bol_on_shipment_booked":false,
            "shipment_booked":true,
            "trailer_assigned":false
         },
         "created_at":"2024-06-06T21:17:57.997338Z",
         "updated_at":"2024-06-06T21:17:58.008169Z"
      }
   ],
   "location_type":{
      "id":1,
      "name":"Business (with dock or forklift)"
   },
   "created_at":"2024-06-06T21:17:57.988813Z",
   "updated_at":"2024-06-06T21:17:57.992869Z",
   "company_name":"TEST-IC",
   "is_default_origin":true,
   "accessorials":[
      
   ],
   "external_reference":"FINT",
   "facility_id":null,
   "default_appointment_type":{
      "id":3,
      "code":"BY_APPT",
      "name":"By appointment"
   },
   "dock_external_id":null,
   "load_capacity_schedule":{
      "monday":null,
      "tuesday":null,
      "wednesday":null,
      "thursday":null,
      "friday":null,
      "saturday":null,
      "sunday":null,
      "interval":null,
      "interval_capacity":null,
      "open_on_us_holidays":null,
      "open_on_weekends":null
   },
   "account_reps":[
      
   ]
}

3. Create Purchase Order

Create a purchase order that references the data from the address book entry / location (i.e. the purchase order will have a reference to information like the hours and equipment of the location) and values for custom data entry fields (without needing to utilize the user interface to enter these values).

About This Request Payload
  • Address book entries / locations have an IANA time zone calculated by the system, i.e. America/Chicago , America/New_York , etc. based on the geolocation information of the address.
  • Order stops (i.e. ship_to and ship_from ) may have reference data associated with the stop . The available qualifier (e.g. ADDRESS_BOOK_ENTRY_ID ) types of references are available in the API reference here .
  • All date/times properties are ISO 8601 date/time strings and follow the Shipwell API date/time standards . Date/time offsets, etc. are supported, but we recommend sending or adjusting dates/times passed in to be in the UTC time zone.
Example request
curljavascriptpython
Copy
Copied
curl --location --request POST 'https://sandbox-api.shipwell.com/orders/' \
--header 'Authorization: YOUR_AUTHORIZATION_HEADER' \
--header 'Content-Type: application/json' \
--data-raw '{
            "custom_data": {},
            "order_number": "Order-45690",
            "ship_to": {
                "country": "US",
                "line_1": "Debartolo Dr",
                "line_2": null,
                "line_3": null,
                "locality": "North Jackson",
                "postal_code": "44451",
                "region": "OH",
                "urbanization": null,
                "residential": false,
                "geolocation": null,
                "custom_data": {
                    "shipwell_custom_data": {
                        "purchase_order_stop": {}
                    }
                },
                "timezone": "America/New_York",
                "location_number": null,
                "company_name": "SK",
                "references": [
                    {
                        "qualifier": "ADDRESS_BOOK_ENTRY_ID",
                        "value": "{YOUR_ADDRESS_BOOK_ENTRY_ID}"
                    }
                ],
                "shipping_requirements": {
                    "plan_window": {
                        "start": "2024-04-22T16:00:00+00:00",
                        "end": "2024-04-22T16:00:00+00:00"
                    }
                }
            },
            "name": "Order name",
            "ship_from": {
                "country": "US",
                "line_1": "7175 Kit Kat Rd, Elkridge, MD 21075, US",
                "line_2": null,
                "line_3": null,
                "locality": "Elkridge",
                "postal_code": null,
                "region": "CO",
                "urbanization": null,
                "residential": false,
                "geolocation": null,
                "custom_data": {
                    "shipwell_custom_data": {
                        "purchase_order_stop": {}
                    }
                },
                "timezone": "America/New_York",
                "location_number": null,
                "company_name": "ICS",
                "references": [
                    {
                        "qualifier": "ADDRESS_BOOK_ENTRY_ID",
                        "value": "{YOUR_ADDRESS_BOOK_ENTRY_ID}"
                    }
                ],
                "shipping_requirements": {
                    "plan_window": {
                        "start": "2024-04-20T05:00:00+00:00",
                        "end": "2024-04-20T05:00:00+00:00"
                    }
                }
            },
            "description": null,
            "source": null,
            "source_system_id": null,
            "start_date": null,
            "expiration_date": null,
            "references": [
                {
                    "qualifier": "PURCHASE_ORDER_NUMBER",
                    "value": "PO#-123"
                }
            ],
            "id": "01HW3H8ZR10A6A5S78Y6RNRA1B",
            "order_type": "PURCHASE_ORDER",
            "status": "READY",
            "items": [
                {
                    "custom_data": null,
                    "description": "Product description-123",
                    "references": [],
                    "shipping_requirements": {
                        "description": "Product description-123",
                        "identifying_marks": [],
                        "references": [],
                        "tare_weight": null,
                        "dimensions": {
                            "unit": "IN",
                            "length": "40",
                            "height": "48",
                            "width": "40"
                        },
                        "volume": null,
                        "customer_reference_number": null,
                        "hazmat": null,
                        "temperature": {
                            "unit": "F",
                            "minimum": "25",
                            "maximum": "35"
                        },
                        "product_id": null,
                        "freight_class": "50",
                        "nmfc_item_code": "25",
                        "nmfc_sub_code": "35",
                        "country_of_manufacture": "US",
                        "stackable": false,
                        "piece_type": null,
                        "total_pieces": null,
                        "value_per_piece": null,
                        "gross_weight": {
                            "unit": "LB",
                            "value": "250"
                        },
                        "quantity": 2,
                        "packaging_type": "PALLET",
                        "handling_unit_id": null,
                        "combined_handling_unit_info": null
                    },
                    "amount": {
                        "unit": "BAG",
                        "value": "200"
                    },
                    "id": "01HW3H8ZRBX7FWYV8KAGB3EKS7",
                    "available_amount": {
                        "unit": "BAG",
                        "value": "200"
                    }
                },
                {
                    "custom_data": null,
                    "description": "Product description- Test",
                    "references": [],
                    "shipping_requirements": {
                        "description": "Product description- Test",
                        "identifying_marks": [],
                        "references": [],
                        "tare_weight": null,
                        "dimensions": {
                            "unit": "IN",
                            "length": "40",
                            "height": "48",
                            "width": "40"
                        },
                        "volume": null,
                        "customer_reference_number": null,
                        "hazmat": null,
                        "temperature": {
                            "unit": "F",
                            "minimum": "110",
                            "maximum": "120"
                        },
                        "product_id": null,
                        "freight_class": "50",
                        "nmfc_item_code": "25",
                        "nmfc_sub_code": "35",
                        "country_of_manufacture": "US",
                        "stackable": false,
                        "piece_type": null,
                        "total_pieces": null,
                        "value_per_piece": null,
                        "gross_weight": {
                            "unit": "LB",
                            "value": "500"
                        },
                        "quantity": 2,
                        "packaging_type": "PALLET",
                        "handling_unit_id": null,
                        "combined_handling_unit_info": null
                    },
                    "amount": {
                        "unit": "BAG",
                        "value": "200"
                    },
                    "id": "01HW3H8ZRFVT8QBZSA57GBRRJK",
                    "available_amount": {
                        "unit": "BAG",
                        "value": "200"
                    }
                }
            ],
            "supplier_created_releases_allowed": false,
            "supplier": {
                "name": "ICS",
                "address": null,
                "identification_codes": [],
                "phone_number": null,
                "email": null,
                "supplier_id": null
            },
            "releases": [],
            "released_from_release_id": null,
            "created_from_order_id": null,
            "cancelled_at": null,
            "archived": false
        }'
Copy
Copied
const payload = {
   "custom_data":{
      "shipwell_custom_data":{
         "purchase_order":{
            "b0466a0c-27f7-4f6b-bdb9-093d5669f458":"GRN",
            "ccea681d-60f9-41e3-b052-c75370255753":"Trade Number"
         }
      }
   },
   "order_number":"Order-45690",
   "ship_to":{
      "country":"US",
      "line_1":"Debartolo Dr",
      "line_2":null,
      "line_3":null,
      "locality":"North Jackson",
      "postal_code":"44451",
      "region":"OH",
      "urbanization":null,
      "residential":false,
      "geolocation":null,
      "custom_data":{
         "shipwell_custom_data":{
            "purchase_order_stop":{
               
            }
         }
      },
      "timezone":"America/New_York",
      "location_number":null,
      "company_name":"SK",
      "references":[
         {
            "qualifier":"ADDRESS_BOOK_ENTRY_ID",
            "value":"{YOUR_ADDRESS_BOOK_ENTRY_ID}"
         }
      ],
      "shipping_requirements":{
         "plan_window":{
            "start":"2024-04-22T16:00:00+00:00",
            "end":"2024-04-22T16:00:00+00:00"
         }
      }
   },
   "name":"Order name",
   "ship_from":{
      "country":"US",
      "line_1":"7175 Kit Kat Rd, Elkridge, MD 21075, US",
      "line_2":null,
      "line_3":null,
      "locality":"Elkridge",
      "postal_code":null,
      "region":"CO",
      "urbanization":null,
      "residential":false,
      "geolocation":null,
      "custom_data":{
         "shipwell_custom_data":{
            "purchase_order_stop":{
               
            }
         }
      },
      "timezone":"America/New_York",
      "location_number":null,
      "company_name":"ICS",
      "references":[
         {
            "qualifier":"ADDRESS_BOOK_ENTRY_ID",
            "value":"{YOUR_ADDRESS_BOOK_ENTRY_ID}"
         }
      ],
      "shipping_requirements":{
         "plan_window":{
            "start":"2024-04-20T05:00:00+00:00",
            "end":"2024-04-20T05:00:00+00:00"
         }
      }
   },
   "description":null,
   "source":null,
   "source_system_id":null,
   "start_date":null,
   "expiration_date":null,
   "references":[
      {
         "qualifier":"PURCHASE_ORDER_NUMBER",
         "value":"PO#-123"
      }
   ],
   "id":"01HW3H8ZR10A6A5S78Y6RNRA1B",
   "order_type":"PURCHASE_ORDER",
   "status":"READY",
   "items":[
      {
         "custom_data":null,
         "description":"Product description-123",
         "references":[
            
         ],
         "shipping_requirements":{
            "description":"Product description-123",
            "identifying_marks":[
               
            ],
            "references":[
               
            ],
            "tare_weight":null,
            "dimensions":{
               "unit":"IN",
               "length":"40",
               "height":"48",
               "width":"40"
            },
            "volume":null,
            "customer_reference_number":null,
            "hazmat":null,
            "temperature":{
               "unit":"F",
               "minimum":"25",
               "maximum":"35"
            },
            "product_id":null,
            "freight_class":"50",
            "nmfc_item_code":"25",
            "nmfc_sub_code":"35",
            "country_of_manufacture":"US",
            "stackable":false,
            "piece_type":null,
            "total_pieces":null,
            "value_per_piece":null,
            "gross_weight":{
               "unit":"LB",
               "value":"250"
            },
            "quantity":2,
            "packaging_type":"PALLET",
            "handling_unit_id":null,
            "combined_handling_unit_info":null
         },
         "amount":{
            "unit":"BAG",
            "value":"200"
         },
         "id":"01HW3H8ZRBX7FWYV8KAGB3EKS7",
         "available_amount":{
            "unit":"BAG",
            "value":"200"
         }
      },
      {
         "custom_data":null,
         "description":"Product description- Test",
         "references":[
            
         ],
         "shipping_requirements":{
            "description":"Product description- Test",
            "identifying_marks":[
               
            ],
            "references":[
               
            ],
            "tare_weight":null,
            "dimensions":{
               "unit":"IN",
               "length":"40",
               "height":"48",
               "width":"40"
            },
            "volume":null,
            "customer_reference_number":null,
            "hazmat":null,
            "temperature":{
               "unit":"F",
               "minimum":"110",
               "maximum":"120"
            },
            "product_id":null,
            "freight_class":"50",
            "nmfc_item_code":"25",
            "nmfc_sub_code":"35",
            "country_of_manufacture":"US",
            "stackable":false,
            "piece_type":null,
            "total_pieces":null,
            "value_per_piece":null,
            "gross_weight":{
               "unit":"LB",
               "value":"500"
            },
            "quantity":2,
            "packaging_type":"PALLET",
            "handling_unit_id":null,
            "combined_handling_unit_info":null
         },
         "amount":{
            "unit":"BAG",
            "value":"200"
         },
         "id":"01HW3H8ZRFVT8QBZSA57GBRRJK",
         "available_amount":{
            "unit":"BAG",
            "value":"200"
         }
      }
   ],
   "supplier_created_releases_allowed":false,
   "supplier":{
      "name":"ICS",
      "address":null,
      "identification_codes":[
         
      ],
      "phone_number":null,
      "email":null,
      "supplier_id":null
   },
   "releases":[
      
   ],
   "released_from_release_id":null,
   "created_from_order_id":null,
   "cancelled_at":null,
   "archived":false
};

const basePath = "";
const host = "sandbox-api.shipwell.com";
const resp = await fetch(
  `https://${host}${basePath}/orders`,
  {
    method: "POST",
    headers: {
      "Authorization": "YOUR_AUTHORIZATION_HEADER",
      "Content-Type": "application/json"
    },
    body: JSON.stringify(payload)
  }
);

const data = await resp.json();
console.log(data);
Copy
Copied
import requests

base_path = ""
host = "sandbox-api.shipwell.com"
target_url = "https://" + host + base_path + "/orders"

headers = {
    "Content-Type": "application/json",
    "Authorization": "YOUR_AUTHORIZATION_HEADER",
}

payload = {
   "custom_data":{
      "shipwell_custom_data":{
         "purchase_order":{
            "b0466a0c-27f7-4f6b-bdb9-093d5669f458":"GRN",
            "ccea681d-60f9-41e3-b052-c75370255753":"Trade Number"
         }
      }
   },
   "order_number":"Order-45690",
   "ship_to":{
      "country":"US",
      "line_1":"Debartolo Dr",
      "line_2":None,
      "line_3":None,
      "locality":"North Jackson",
      "postal_code":"44451",
      "region":"OH",
      "urbanization":None,
      "residential":False,
      "geolocation":None,
      "custom_data":{
         "shipwell_custom_data":{
            "purchase_order_stop":{}
         }
      },
      "timezone":"America/New_York",
      "location_number":None,
      "company_name":"SK",
      "references":[
         {
            "qualifier":"ADDRESS_BOOK_ENTRY_ID",
            "value":"{YOUR_ADDRESS_BOOK_ENTRY_ID}"
         }
      ],
      "shipping_requirements":{
         "plan_window":{
            "start":"2024-04-22T16:00:00+00:00",
            "end":"2024-04-22T16:00:00+00:00"
         }
      }
   },
   "name":"Order name",
   "ship_from":{
      "country":"US",
      "line_1":"7175 Kit Kat Rd, Elkridge, MD 21075, US",
      "line_2":None,
      "line_3":None,
      "locality":"Elkridge",
      "postal_code":None,
      "region":"CO",
      "urbanization":None,
      "residential":False,
      "geolocation":None,
      "custom_data":{
         "shipwell_custom_data":{
            "purchase_order_stop":{}
         }
      },
      "timezone":"America/New_York",
      "location_number":None,
      "company_name":"ICS",
      "references":[
         {
            "qualifier":"ADDRESS_BOOK_ENTRY_ID",
            "value":"{YOUR_ADDRESS_BOOK_ENTRY_ID}"
         }
      ],
      "shipping_requirements":{
         "plan_window":{
            "start":"2024-04-20T05:00:00+00:00",
            "end":"2024-04-20T05:00:00+00:00"
         }
      }
   },
   "description":None,
   "source":None,
   "source_system_id":None,
   "start_date":None,
   "expiration_date":None,
   "references":[
      {
         "qualifier":"PURCHASE_ORDER_NUMBER",
         "value":"PO#-123"
      }
   ],
   "id":"01HW3H8ZR10A6A5S78Y6RNRA1B",
   "order_type":"PURCHASE_ORDER",
   "status":"READY",
   "items":[
      {
         "custom_data":None,
         "description":"Product description-123",
         "references":[],
         "shipping_requirements":{
            "description":"Product description-123",
            "identifying_marks":[],
            "references":[],
            "tare_weight":None,
            "dimensions":{
               "unit":"IN",
               "length":"40",
               "height":"48",
               "width":"40"
            },
            "volume":None,
            "customer_reference_number":None,
            "hazmat":None,
            "temperature":{
               "unit":"F",
               "minimum":"25",
               "maximum":"35"
            },
            "product_id":None,
            "freight_class":"50",
            "nmfc_item_code":"25",
            "nmfc_sub_code":"35",
            "country_of_manufacture":"US",
            "stackable":False,
            "piece_type":None,
            "total_pieces":None,
            "value_per_piece":None,
            "gross_weight":{
               "unit":"LB",
               "value":"250"
            },
            "quantity":2,
            "packaging_type":"PALLET",
            "handling_unit_id":None,
            "combined_handling_unit_info":None
         },
         "amount":{
            "unit":"BAG",
            "value":"200"
         },
         "id":"01HW3H8ZRBX7FWYV8KAGB3EKS7",
         "available_amount":{
            "unit":"BAG",
            "value":"200"
         }
      },
      {
         "custom_data":None,
         "description":"Product description- Test",
         "references":[],
         "shipping_requirements":{
            "description":"Product description- Test",
            "identifying_marks":[],
            "references":[],
            "tare_weight":None,
            "dimensions":{
               "unit":"IN",
               "length":"40",
               "height":"48",
               "width":"40"
            },
            "volume":None,
            "customer_reference_number":None,
            "hazmat":None,
            "temperature":{
               "unit":"F",
               "minimum":"110",
               "maximum":"120"
            },
            "product_id":None,
            "freight_class":"50",
            "nmfc_item_code":"25",
            "nmfc_sub_code":"35",
            "country_of_manufacture":"US",
            "stackable":False,
            "piece_type":None,
            "total_pieces":None,
            "value_per_piece":None,
            "gross_weight":{
               "unit":"LB",
               "value":"500"
            },
            "quantity":2,
            "packaging_type":"PALLET",
            "handling_unit_id":None,
            "combined_handling_unit_info":None
         },
         "amount":{
            "unit":"BAG",
            "value":"200"
         },
         "id":"01HW3H8ZRFVT8QBZSA57GBRRJK",
         "available_amount":{
            "unit":"BAG",
            "value":"200"
         }
      }
   ],
   "supplier_created_releases_allowed":False,
   "supplier":{
      "name":"ICS",
      "address":None,
      "identification_codes":[],
      "phone_number":None,
      "email":None,
      "supplier_id":None
   },
   "releases":[],
   "released_from_release_id":None,
   "created_from_order_id":None,
   "cancelled_at":None,
   "archived":False
}

response = requests.post(target_url, headers=headers, json=payload)
data = response.json()
print(data)
Example response
About This Response Payload

The response payload below includes address book entry references.

Copy
Copied
{
   "custom_data": {},
   "order_number":"Order-45690",
   "ship_to":{
      "country":"US",
      "line_1":"Debartolo Dr",
      "line_2":null,
      "line_3":null,
      "locality":"North Jackson",
      "postal_code":"44451",
      "region":"OH",
      "urbanization":null,
      "residential":false,
      "geolocation":null,
      "custom_data":{
         "shipwell_custom_data":{
            "purchase_order_stop":{
               
            }
         }
      },
      "timezone":"America/New_York",
      "location_number":null,
      "company_name":"SK",
      "references":[
         {
            "qualifier":"ADDRESS_BOOK_ENTRY_ID",
            "value":"{YOUR_ADDRESS_BOOK_ENTRY_ID}"
         }
      ],
      "shipping_requirements":{
         "plan_window":{
            "start":"2024-04-22T16:00:00+00:00",
            "end":"2024-04-22T16:00:00+00:00"
         }
      }
   },
   "name":"Order name",
   "ship_from":{
      "country":"US",
      "line_1":"7175 Kit Kat Rd, Elkridge, MD 21075, US",
      "line_2":null,
      "line_3":null,
      "locality":"Elkridge",
      "postal_code":null,
      "region":"CO",
      "urbanization":null,
      "residential":false,
      "geolocation":null,
      "custom_data":{
         "shipwell_custom_data":{
            "purchase_order_stop":{
               
            }
         }
      },
      "timezone":"America/New_York",
      "location_number":null,
      "company_name":"ICS",
      "references":[
         {
            "qualifier":"ADDRESS_BOOK_ENTRY_ID",
            "value":"{YOUR_ADDRESS_BOOK_ENTRY_ID}"
         }
      ],
      "shipping_requirements":{
         "plan_window":{
            "start":"2024-04-20T05:00:00+00:00",
            "end":"2024-04-20T05:00:00+00:00"
         }
      }
   },
   "description":null,
   "source":null,
   "source_system_id":null,
   "start_date":null,
   "expiration_date":null,
   "references":[
      {
         "qualifier":"PURCHASE_ORDER_NUMBER",
         "value":"PO#-123"
      }
   ],
   "id":"01HW3H8ZR10A6A5S78Y6RNRA1B",
   "order_type":"PURCHASE_ORDER",
   "status":"READY",
   "items":[
      {
         "custom_data":null,
         "description":"Product description-123",
         "references":[
            
         ],
         "shipping_requirements":{
            "description":"Product description-123",
            "identifying_marks":[
               
            ],
            "references":[
               
            ],
            "tare_weight":null,
            "dimensions":{
               "unit":"IN",
               "length":"40",
               "height":"48",
               "width":"40"
            },
            "volume":null,
            "customer_reference_number":null,
            "hazmat":null,
            "temperature":{
               "unit":"F",
               "minimum":"25",
               "maximum":"35"
            },
            "product_id":null,
            "freight_class":"50",
            "nmfc_item_code":"25",
            "nmfc_sub_code":"35",
            "country_of_manufacture":"US",
            "stackable":false,
            "piece_type":null,
            "total_pieces":null,
            "value_per_piece":null,
            "gross_weight":{
               "unit":"LB",
               "value":"250"
            },
            "quantity":2,
            "packaging_type":"PALLET",
            "handling_unit_id":null,
            "combined_handling_unit_info":null
         },
         "amount":{
            "unit":"BAG",
            "value":"200"
         },
         "id":"01HW3H8ZRBX7FWYV8KAGB3EKS7",
         "available_amount":{
            "unit":"BAG",
            "value":"200"
         }
      },
      {
         "custom_data":null,
         "description":"Product description- Test",
         "references":[
            
         ],
         "shipping_requirements":{
            "description":"Product description- Test",
            "identifying_marks":[
               
            ],
            "references":[
               
            ],
            "tare_weight":null,
            "dimensions":{
               "unit":"IN",
               "length":"40",
               "height":"48",
               "width":"40"
            },
            "volume":null,
            "customer_reference_number":null,
            "hazmat":null,
            "temperature":{
               "unit":"F",
               "minimum":"110",
               "maximum":"120"
            },
            "product_id":null,
            "freight_class":"50",
            "nmfc_item_code":"25",
            "nmfc_sub_code":"35",
            "country_of_manufacture":"US",
            "stackable":false,
            "piece_type":null,
            "total_pieces":null,
            "value_per_piece":null,
            "gross_weight":{
               "unit":"LB",
               "value":"500"
            },
            "quantity":2,
            "packaging_type":"PALLET",
            "handling_unit_id":null,
            "combined_handling_unit_info":null
         },
         "amount":{
            "unit":"BAG",
            "value":"200"
         },
         "id":"01HW3H8ZRFVT8QBZSA57GBRRJK",
         "available_amount":{
            "unit":"BAG",
            "value":"200"
         }
      }
   ],
   "supplier_created_releases_allowed":false,
   "supplier":{
      "name":"ICS",
      "address":null,
      "identification_codes":[
         
      ],
      "phone_number":null,
      "email":null,
      "supplier_id":null
   },
   "releases":[
      
   ],
   "released_from_release_id":null,
   "created_from_order_id":null,
   "cancelled_at":null,
   "archived":false
}
Copyright © Shipwell 2024. All right reserved.