Cancel a Parcel Shipment

Cancel a Parcel Shipment

Status
Request Type
POST


On this page:

Related:

Endpoint

https://tms.targetfmi.com/index.php?p=api&r=json&c=parcelShipService&m=cancelShipment

Request Parameters

ParameterRequired

Available Options/Data Type

Description
/shipmentIdYesIntegerThe ID of the parcel shipment as returned by the Create a Parcel Shipment API endpoint.


Response Parameters

Parameter Name

Description

/messageThe message stack. Refer to the documentation for Making a Request.
/bodyTrue if the shipment was successfully voided, false if an error occurred.


Full Example

Example
 <?php
/**
* Parcel Shipment Full Example (Using Array Format)
*/
require_once "../../restClient.class.php";
  
$resource = "https://tms.targetfmi.com/index.php";
$user = "API_KEY";
$pass = "";
$seperator = "?";
  
$rest = new restClient($resource, $user, $pass, $seperator);
  
$data = array('shipmentId' => 123);
 
 
$res = $rest->post("p=api&r=text&c=parcelShipService&m=cancelShipment", $data);
?>