Request order responses
Possible responses when requesting an order:
Status | Meaning | Description |
---|---|---|
200 | OK | Successful order response |
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, the error may be parsed as an unknown error or as part of the response body. If returned as text/html, it is blank. |
403 | Forbidden | Returned when the API key given does not match a valid merchant account. |
422 | Unprocessable Entity | Returned when validate is set to true and the order address is not valid. Specifies which input fields failed validation and may give a suggested_address form if one is found. |
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.
Examples
Example responses for creating an order:
Successful order responses
{
"response": {
"courier_delivery_instructions": "special instructions",
"courier_job_id": "30734876324",
"courier_name": "eParcel",
"delivery_address": "1 Union Street",
"delivery_instructions": "test special instructions",
"delivery_postcode": "2009",
"delivery_state": "NSW",
"delivery_suburb": "Pyrmont",
"id": 26599,
"parcel_attributes": [
{
"depth": 0.13,
"length": 0.1,
"qty": 1,
"weight": 16.8,
"width": 0.11
}
],
"products": [
{
"title": "Industrial Paint Stripper",
"price": 29.13,
"sku": 0.1,
"tariff_code": "000999",
"dangerous_goods_code": "ID8000",
"dangerous_goods_text": "ID8000 Consumer commodities - Dangerous Goods as per attached DGD",
"origin_country_code": "TH",
"quantity": 1
}
],
"price": "0.0",
"processing_state": "created",
"receiver_contact_number": "0400000000",
"receiver_name": "Josh",
"retailer_invoice": "#23201005",
"slug": "ppu38wz2tdonj",
"state": "processing",
"tracking_number": "PPu38Wz2TdoNj",
"user_attributes": {
"email": "test@shippit.com",
"first_name": "jon",
"last_name": "smith",
"mobile": "0491570006"
}
}
}
{
"response": {
"id": 3020594,
"tracking_number": "PPvd8Ba8g9r3B",
"state": "processing",
"processing_state": "created",
"delivery_address": "1 Victoria St",
"delivery_suburb": "Melbourne",
"delivery_postcode": "3000",
"delivery_state": "VIC",
"receiver_name": "John Smith",
"receiver_contact_number": "(123) 456789",
"slug": "ppvd8ba8g9r3b",
"price": "0.0",
"retailer_invoice": "#ABC123456",
"user_attributes": {
"email": "customer@email.com",
"first_name": "John Smith",
"mobile": "(123) 456789"
},
"parcel_attributes": [
{
"qty": 1,
"length": 0.325,
"width": 0.205,
"depth": 0.03,
"weight": 0.5
}
],
"products": [
{
"price": 50,
"quantity": 1,
"title": "Product Title",
"sku": "9354484070976",
"origin_country_code": "AU"
}
],
"return": true,
"pickup_address": "1 Union Street",
"pickup_suburb": "Pyrmont",
"pickup_postcode": "2009",
"pickup_state": "NSW"
}
}
{
"response": {
"courier_delivery_instructions": "special instructions",
"courier_job_id": "30734876324",
"courier_name": "eParcel",
"delivery_address": "1 Union Street",
"delivery_instructions": "test special instructions",
"delivery_postcode": "2009",
"delivery_state": "NSW",
"delivery_suburb": "Pyrmont",
"id": 26599,
"parcel_attributes": [
{
"depth": 0.13,
"length": 0.1,
"qty": 1,
"weight": 16.8,
"width": 0.11
}
],
"products": [
{
"title": "Industrial Paint Stripper",
"price": 29.13,
"sku": 0.1,
"tariff_code": "000999",
"dangerous_goods_code": "ID8000",
"dangerous_goods_text": "ID8000 Consumer commodities - Dangerous Goods as per attached DGD",
"origin_country_code": "TH",
"quantity": 1
}
],
"price": "0.0",
"processing_state": "created",
"receiver_contact_number": "0400000000",
"receiver_name": "Josh",
"retailer_invoice": "#23201005",
"slug": "ppu38wz2tdonj",
"state": "processing",
"tracking_number": "PPu38Wz2TdoNj",
"user_attributes": {
"email": "test@shippit.com",
"first_name": "jon",
"last_name": "smith",
"mobile": "0491570006"
},
"wallet_order_tracking_attributes": {
"order_type_identifier": "apple.order.type.identifier",
"order_identifier": "ppu38wz2tdonj",
"web_service_url": "https://api.shippit.com/appleserviceurl",
"authentication_token": "ABCDEFG123456789"
}
}
}
Failed order responses
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 is 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": "invalid_merchant_account",
"error_description": "An unknown error has occurred."
}
422 Response
{
"error": "invalid",
"error_description": "The details provided are invalid",
"delivery_postcode": [
"is invalid for Australia and should follow the pattern 9999"
],
"delivery_suburb": [
"Invalid suburb name for the postcode 20261"
],
"suggested_address": {
"suburb": "bondi beach",
"postcode": "2026",
"state": "NSW",
"country_code": "au"
}
}
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."
}