Cancelling an order responsess
Cancelling an order responses
| Status | Meaning | Description | Schema | 
|---|---|---|---|
| 200 | OK | Returns the Order with state = cancelled |  OrderDeleteResponse | 
| 403 | Forbidden | Returned when the API key given does not match a valid merchant account. | GenericErrorResponse | 
| 404 | Not Found | Returned when the given id could not be found. | GenericErrorResponse | 
| 422 | Unprocessable Entity | Returns an error indicating that the Order could not be cancelled, and stating the reason why. | OrderDeleteErrorResponse | 
Examples
Returns the Order with state = cancelled
{
  "response": {
    "id": 33,
    "tracking_number": "PPuqD0J0uLslM",
    "state": "cancelled",
    "processing_state": " processing_cancelled",
    "delivery_address": "1 Union Street",
    "delivery_suburb": "Pyrmont",
    "delivery_postcode": "2009",
    "receiver_name": "Francois",
    "receiver_contact_number": "0404342342",
    "courier_name": "eParcel International",
    "slug": "ppuqd0j0ulslm",
    "price": "0.0",
    "retailer_invoice": "SO42637",
    "courier_job_id": "ABC0100023",
    "user_attributes": {
      "email": "test@shippit.com",
      "first_name": "John",
      "last_name": "Smith"
    },
    "parcel_attributes": [
      {
        "qty": 1,
        "length": 0.325,
        "width": 0.205,
        "depth": 0.03,
        "weight": 0.5
      }
    ]
  }
}
Returned when the API key given does not match a valid merchant account.
{
  "error": "invalid_merchant_account",
  "error_description": "An unknown error has occurred."
}
Returned when the given id could not be found.
{
  "error": "not_found",
  "error_description": "The requested resource could not be found."
}
Returns an error indicating that the Order could not be cancelled, and stating the reason why.
{
  "error": "order_cannot_be_cancelled",
  "error_description": "The requested order is currently in a state that cannot be cancelled",
  "order_state": "in_transit"
}
Get label responses
Get label responses
| Status | Meaning | Description | Schema | 
|---|---|---|---|
| 200 | OK | Returns an Order and related label information. | LabelResponse | 
| 404 | Not Found | Returns an error indicating that the Order could not be found in Shippit | GenericErrorResponse | 
| 422 | Unprocessable Entity | Returns an error indicating that the Order cannot yet be processed for labelling. | 
| Typically this is because the Order has yet to be processed or allocatated a courier. | GenericErrorResponse | 
Example responses
Returns an Order and related label information.
{
  "response": {
    "id": 5044,
    "order": {
      "courier_delivery_instructions": "Authority to Leave. ",
      "courier_job_id": "SHP0100002",
      "delivery_address": "37 Manorvale Pde",
      "delivery_instructions": "",
      "delivery_postcode": "3030",
      "delivery_state": "VIC",
      "delivery_suburb": "Werribee",
      "id": 9972,
      "invoice_number": "INV-1384",
      "parcels": [
        {
          "depth": 0.19,
          "length": 0.38,
          "name": "",
          "weight": 1,
          "width": 0.29,
          "label_number": "SHP010000201000930803",
          "courier_data": {
            "product_code": "X123",
            "pickup_zone": "SYD",
            "dropoff_zone": "MEL"
          }
        }
      ],
      "products": [
        {
          "title": "Industrial Paint Stripper",
          "price": 29.13,
          "sku": 0.1,
          "quantity": 1,
          "tariff_code": "000999",
          "dangerous_goods_code": "ID8000",
          "dangerous_goods_text": "ID8000 Consumer commodities - Dangerous Goods as per attached DGD",
          "origin_country_code": "TH"
        }
      ],
      "price": "15.95",
      "receiver_contact_number": "",
      "receiver_language_code": "EN",
      "receiver_name": "Jane Doe",
      "retailer_invoice": "",
      "slug": "ppkfqy44u8nff",
      "state": "completed",
      "tracking_number": "PPKFqy44U8Nff",
      "user": {
        "email": "jane.doe@shippit.com",
        "first_name": "Jane",
        "last_name": "Doe ",
        "mobile": ""
      },
      "customs_documents_require_printing": false,
      "documents": {
        "archive_awb": {
          "url": "https://shippit-web-production.s3.amazonaws.com/uploads/order/archive_document/15870762/archive_581833317220190318-2852-yi07y0.PDF",
          "page_size": "a6",
          "file_type": "pdf"
        },
        "customs_invoice": {
          "url": "https://shippit-web-production.s3.amazonaws.com/uploads/order/customs_invoice/361690/commercial_invoice_3073489348620190218-6221-mxrhx4.pdf",
          "page_size": "a3",
          "file_type": "pdf"
        },
        "dangerous_goods_declaration": {
          "url": "https://shippit-web-production.s3.amazonaws.com/uploads/order/dangerous_goods_declaration/361690/dangerous_goods_declaration_3073489348620140318-6220-11vib5y.pdf",
          "page_size": "a3",
          "file_type": "pdf"
        },
        "shipping_label": {
          "url": "https://shippit-production.s3.amazonaws.com/uploads/label/attachment/5044/PPKFqy44U8Nff.pdf",
          "page_size": "a6",
          "file_type": "pdf"
        }
      }
    },
    "qualified_url": "https://shippit-production.s3.amazonaws.com/uploads/label/attachment/5044/PPKFqy44U8Nff.pdf"
  }
}
Returns an error indicating that the Order could not be found in Shippit
{
  "error": "order_not_found",
  "error_description": "The requested order could not be found."
}
Returns an error indicating that the Order cannot yet be processed for labelling.
Typically this is because the Order has yet to be processed or allocatated a courier.
{
  "error": "label_failed_rules_engine",
  "error_description": "The requested order has not been allocated a valid courier due to allocation rules."
}
{
  "error": "label_failed_tracking_order",
  "error_description": "You have requested a label for a tracking order, tracking orders are not labeled in Shippit. Shippit just provides the tracking service for these orders."
}
{
  "error": "address_invalid",
  "error_description": "The address provided is invalid"
}
{
  "error": "label_failed_order_processing",
  "error_description": "The requested order is currently being processed, please try again later"
}
{
  "error": "label_failed_missing_courier",
  "error_description": "The requested order has no courier assigned"
}
{
  "error": "label_failed_invalid_quote",
  "error_description": "The requested order has no valid quotes"
}
{
  "error": "label_failed_still_generating",
  "error_description": "The requested order is currently generating a label, please try again later"
}
{
  "error": "label_failed_failed_request",
  "error_description": "The requested order failed to generate a label, please contact support"
}
{
  "error": "label_failed_courier_deprecated",
  "error_description": "The assigned courier has been deprecated."
}
{
  "error": "order_not_available_to_label",
  "error_description": "The requested order has not been processed, please try again."
}