Book responses

The possible responses for the Book API

Book an order responses

POST /book

Status Meaning Description
200 OK Returns the status of the bookings at each courier.
400 Bad Request Returned when Shippit has a problem with the input parameters. Not all input errors can result in this error. Depending on the request, errors are sometimes parsed as an unknown error or as part of the response body. If returned as text/html, it’s blank.
403 Forbidden Returned when the API key given does not match a valid merchant account.
500 Internal Server Error Returned when an unknown error occurs. May be returned if Shippit has trouble with the combination of the input or merchant account configuration.

To perform this operation, you must be authenticated with an authentication token.

This API validates that all of the requested orders are accurate and ready for booking, if all of the orders sent in can’t be booked, the response details which orders aren’t found. This response means that none of the order numbers sent in have been booked. If a manifest can’t be generated, the response includes an array of orders on each manifest which have not been booked.

Get booking document responses

GET /book/{manifest_id}/document

Status Meaning Description
200 OK Success response
422 Unprocessable Entity  
424 Failed Dependency Courier Booking Failed

This operation does not require authentication.

Examples

Example responses when booking an order.

Successful order booking responses

{
  "response": [
    {
      "courier": "eParcel Express",
      "manifest": "ABC0000214",
      "manifest_pdf": "https://shippit.com/manifest20160721-96368-1tpowvr.pdf",
      "order_count": 2,
      "success": true
    },
    {
      "courier": "Fastway",
      "manifest": "FW20160721215",
      "manifest_pdf": "https://shippit.com/manifest20160721-96368-1tpowvr.pdf",
      "order_count": 2,
      "success": true
    },
    {
      "courier": "Couriers Please",
      "manifest": "JJJ20160721216",
      "manifest_pdf": "https://shippit.com/manifest20160721-96368-1tpowvr.pdf",
      "order_count": 4,
      "success": true
    },
    {
      "courier": "eParcel",
      "manifest": "ABC0000217",
      "manifest_pdf": "https://shippit.com/manifest20160721-96368-1tpowvr.pdf",
      "order_count": 2,
      "success": true
    }
  ],
  "count": 4
}

Unsuccessful order booking responses

{
  "response": [
    {
      "error": "orders_not_available_to_book",
      "error_description": "The requested orders could not be found. Please remove and try again.",
      "orders": [
        "invalid-tracking"
      ],
      "success": false
    }
  ],
  "count": 1
}
{
  "response": [
    {
      "courier": "Fastway",
      "error": "Manifest creation failed",
      "manifest": "FW20160721224",
      "orders": [
        "ppd5q24mtuett"
      ],
      "success": false
    },
    {
      "courier": "Couriers Please",
      "error": "Manifest creation failed",
      "manifest": "JJJ20160721225",
      "orders": [
        "pp0myuwhnajn4"
      ],
      "success": false
    }
  ],
  "count": 2
}

Returned when Shippit has a problem with the input parameters. Not all input errors can result in this error. Depending on the request, the error may be parsed as an unknown error or as part of the response body. If returned as text/html, it’s blank.

{
  "error": "bad_request",
  "error_description": "The data given to this server does not meet our criteria."
}

400 Response:

"string"

Returned when the API key given does not match a valid merchant account:

{
  "error": "forbidden",
  "error_description": "The action you requested was forbidden."
}

Returned when an unknown error occurs. May be returned if Shippit has trouble with the combination of the input or merchant account configuration:

{
  "error": "system",
  "error_description": "An unknown error has occurred."
}