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:

EnvironmentURL 
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

TypeValue 
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:

HeaderDescriptionTypeRequired
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

HeaderDescriptionTypeRequired
id

Shipment identifier

string Yes
region

Region code, a list of available regions can be found here

string Yes

Response Parameters

Responds with an HTTP 200 response code on success.

Code samples

Example

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
< > grab code
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
< > grab code
Responds with an HTTP 200 response code on success.

 

NOTE: Content in the panels below this point are not visible on the site unless used by other features e.g. gadgets, OB&E, etc.

API Sandbox

Delete Shipment

DELETE
  • Authorization: Secret {apiKey}
  • Content-Type: application/json; charset=utf-8