Shipment Delete
Allows customers to remove an existing shipment as long as the shipment has not been processed.
Access
To get access to this API, please fill in the Developer Registration form
Resource URI
Make an HTTP DELETE request to:
Environment | URL | |||||
---|---|---|---|---|---|---|
LIVE | https://api.mainfreight.com/transport/1.0/customer/shipment/{id}?region={region} | |||||
UAT | https://apitest.mainfreight.com/transport/1.0/customer/shipment/{id}?region={region} |
Resource Information
Type | Value | ||
---|---|---|---|
Authentication | API Key | ||
Response Formats | JSON / XML | ||
HTTP Methods | DELETE | ||
API Version | 1.0 |
HTTP Headers
You must add the following HTTP Headers to your request:
Header | Description | Type | Required |
---|---|---|---|
Content-Type | Request content type. Supported types are "application/json" or "application/xml" | string | Yes |
Authorization |
The word " Secret" followed by a space, then your unique API key e.g: Secret wdnOId93-VXZECxvVRPQEJZNxPB5XZ... |
string | Yes |
Parameters
You must provide the parameters marked as required:
Request Parameters
Header | Description | Type | Required |
---|---|---|---|
id |
Shipment identifier |
string | Yes |
region |
Region code, a list of available regions can be found here |
string | Yes |
Response Parameters
Code samples
To Delete a Shipment you will need to set the HTTP method to DEL and pass the ID into the URL as a parameter:
- URL
https://api.mainfreight.com/transport/1.0/customer/shipment/00000000-0000-0000-0000-000000000000?region=nz
You are going to receive an HTTP response similar to this:
- RESPONSE HTTP
Responds with an HTTP 200 response code on success.