Getting Bookings

This guide walks you through getting bookings from the JUSDA API.

Authentication

JUSDA uses API keys for authentication. At this time API keys are assigned by JUSDA's Technology Team. To obtain a key, contact your JUSDA Sales representative.

Once you have an API key, to authenticate, it will be necessary to pass the key in the HTTP header of each call you make. For the header key pass x-api-key. Pass your key as the value. For example: x-api-key=34A81032-979E-4EFC-9A6F-87E2973F3E20

If there is any problem authenticating your key, the API will respond with an HTTP 401 code.

Testing

JUSDA may provide you an API key that is set to our test environment. If instead you have a production API key, it's possible to use the test environment on any API call by including an environment attribute in the endpoint's query string. For example:

https://services.jusdausa.com/api/v1/Rates?environment=Test

API Endpoint

The URL for JUSDA APIs is:

https://services.jusdausa.com/api/v1

To this endpoint add the resource you are accessing. For example, the endpoint to get shipments is:

https://services.jusdausa.com/api/v1/Bookings

Booking URL Parameters

The /Bookings API accepts various filter values in its query string. Paging is also supported. Here are some example API calls with an explanation of how the query will execute.

https://services.jusdausa.com/api/v1/Bookings?batchId=52c98625-9340-4bdd-974a-d615bb7b169e

The above example will retrieve all bookings associated with BatchId 52c98625-9340-4bdd-974a-d615bb7b169e.


https://services.jusdausa.com/api/v1/Bookings?limit=10

The above example will retrieve the 10 most recent bookings.


https://services.jusdausa.com/api/v1/Bookings?limit=10&page=3

Limit specifies the maximum number of rows to return. Page specifies the page number. In this case, the bookings in positions 20-29 will be retrieved.

Get Bookings Query String Paramaters

Use any of the following parameters in your HTTP GET query string to filter your search for existing bookings.

  • modifiedDateFrom: (optional) Supports search for bookings created or updated within a date range
  • modifiedDateTo: (optional) Supports search for bookings created or updated within a date range
  • bookingId: (optional) Get a specific booking based on the BookingId
  • bookingIdentifier: (optional) Get all bookings based on the booking identifier you provided in the request
  • batchId: (optional) Get all bookings within a batch based on the BatchId
  • limit: (optional) Default is 100
  • page: (optional) Default is 1
  • environment: (optional) Test or Production. Default is Production.

Sample Response Payload


            [
                {
                    "bookingId": "e059ba92-199b-42aa-90f3-45a3a878f89e",
                    "bookingIdentifier": "11001",
                    "batchId": "52c98625-9340-4bdd-974a-d615bb7b169e",
                    "rateResponseId": null,
                    "quoteId": null,
                    "mode": "Parcel",
                    "shipperName": "Test Shipper",
                    "shipperAddress1": "5031 Halison Street",
                    "shipperAddress2": null,
                    "shipperCity": "Torrance",
                    "shipperStateProvince": "CA",
                    "shipperPostalCode": "90503",
                    "shipperCountry": "US",
                    "shipperTelNo": null,
                    "shipToName": "Test Consignee",
                    "shipToAddress1": "847 Spring Creek Court",
                    "shipToAddress2": null,
                    "shipToCity": "Elk Grove Village",
                    "shipToStateProvince": "IL",
                    "shipToPostalCode": "60007",
                    "shipToCountry": "US",
                    "shipToTelNo": null,
                    "residential": false,
                    "shipDate": null,
                    "carrierName": "UPS",
                    "serviceLevel": "Ground",
                    "pickupRemarks": null,
                    "deliverRemarks": null,
                    "goodsDescription": null,
                    "declaredValue": null,
                    "declaredValueCurrencyCode": null,
                    "shipperReferenceNo": null,
                    "shipperReferenceNo2": null,
                    "modifiedDate": "2021-01-09T01:06:21.4679348",
                    "items": [
                        {
                            "description": null,
                            "pieces": 1,
                            "packType": null,
                            "weight": 5,
                            "weightUnit": "LB",
                            "length": 2,
                            "width": 7,
                            "height": 3,
                            "dimensionUnit": "IN",
                            "freightClass": null,
                            "nmfc": null,
                            "hazardous": false,
                            "packageIdentifier": "P10001"
                        }
                    ],
                    "labels": [
                        {
                            "bookingLabelId": "a1ba1231-c0e0-4af1-4fb4-08d7f8717447",
                            "carrierTrackingNo": "1ZE373200197240008",
                            "labelUri": "https://jusda.blob.core.windows.net/upslabel/1ZE373200197240008.jpg?st=2020-05-15T01%3A51%3A19Z&se=2021-05-15T01%3A52%3A19Z&sp=r&spr=https&sv=2019-02-02&sr=b&sig=fDnZAM/hsWoZ5h716TmPWqYtHWbVOx0mc2eAgYjPsN0%3D"
                        }
                    ]
                },
                {
                    "bookingId": "3f54701d-8d46-4827-8043-f19fe34151bc",
                    "bookingIdentifier": "11001",
                    "batchId": "7f289154-9403-4e3c-92f8-55f9746f3370",
                    "rateResponseId": null,
                    "quoteId": null,
                    "mode": "Parcel",
                    "shipperName": "Test Shipper",
                    "shipperAddress1": "5031 Halison Street",
                    "shipperAddress2": null,
                    "shipperCity": "Torrance",
                    "shipperStateProvince": "CA",
                    "shipperPostalCode": "90503",
                    "shipperCountry": "US",
                    "shipperTelNo": null,
                    "shipToName": "Test Consignee",
                    "shipToAddress1": "847 Spring Creek Court",
                    "shipToAddress2": null,
                    "shipToCity": "Elk Grove Village",
                    "shipToStateProvince": "IL",
                    "shipToPostalCode": "60007",
                    "shipToCountry": "US",
                    "shipToTelNo": null,
                    "residential": false,
                    "shipDate": null,
                    "carrierName": "UPS",
                    "serviceLevel": "Ground",
                    "pickupRemarks": null,
                    "deliverRemarks": null,
                    "goodsDescription": null,
                    "declaredValue": null,
                    "declaredValueCurrencyCode": null,
                    "shipperReferenceNo": null,
                    "shipperReferenceNo2": null,
                    "modifiedDate": "2021-01-08T20:58:38.6737778",
                    "items": [
                        {
                            "description": null,
                            "pieces": 1,
                            "packType": null,
                            "weight": 5,
                            "weightUnit": "LB",
                            "length": 2,
                            "width": 7,
                            "height": 3,
                            "dimensionUnit": "IN",
                            "freightClass": null,
                            "nmfc": null,
                            "hazardous": false,
                            "packageIdentifier": "P10001"
                        }
                    ],
                    "labels": [
                        {
                            "bookingLabelId": "e1e266da-a7b1-4895-7621-08d7f9152d53",
                            "carrierTrackingNo": "1ZE373200195450213",
                            "labelUri": "https://jusda.blob.core.windows.net/upslabel/1ZE373200195450213.jpg?st=2020-05-15T21%3A15%3A03Z&se=2021-05-15T21%3A16%3A03Z&sp=r&spr=https&sv=2019-02-02&sr=b&sig=M2MdboAOr4ajQ/TFPkgcywjCcia3tMr6x76ii4noXNw%3D"
                        }
                    ]
                }
            ]