All URIs are relative to ///shipping/v3
Method | HTTP request | Description |
---|---|---|
packagingCreate | POST /packaging | Create Packaging |
packagingDelete | DELETE /packaging/{packagingId} | Delete Packaging |
packagingGet | GET /packaging/{packagingId} | Get Packaging |
packagingGetAll | GET /packaging | Get All Packaging |
packagingUpdate | PUT /packaging/{packagingId} | Update packaging |
\RoyalMail\Shipping\Rest\Api\models\PackagingResponse packagingCreate($body, $xRMGAuthToken)
Create Packaging
Add new packaging to your stored packaging details that you can then use in your shipment requests.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: clientID
$config = RoyalMail\Shipping\Rest\Api\Configuration::getDefaultConfiguration()->setApiKey('X-IBM-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = RoyalMail\Shipping\Rest\Api\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-IBM-Client-Id', 'Bearer');
$apiInstance = new RoyalMail\Shipping\Rest\PackagingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \RoyalMail\Shipping\Rest\Api\models\Packaging(); // \RoyalMail\Shipping\Rest\Api\models\Packaging | The packaging details.
$xRMGAuthToken = "xRMGAuthToken_example"; // string | Authorisation token required to invoke this operation. Can be retrieved by invoking the **_/token** operation.
try {
$result = $apiInstance->packagingCreate($body, $xRMGAuthToken);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PackagingApi->packagingCreate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \RoyalMail\Shipping\Rest\Api\models\Packaging | The packaging details. | |
xRMGAuthToken | string | Authorisation token required to invoke this operation. Can be retrieved by invoking the _/token operation. |
\RoyalMail\Shipping\Rest\Api\models\PackagingResponse
- Content-Type: application/xml, application/json
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\RoyalMail\Shipping\Rest\Api\models\PackagingResponse packagingDelete($xRMGAuthToken, $packagingId)
Delete Packaging
Deletes the specified packaging.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: clientID
$config = RoyalMail\Shipping\Rest\Api\Configuration::getDefaultConfiguration()->setApiKey('X-IBM-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = RoyalMail\Shipping\Rest\Api\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-IBM-Client-Id', 'Bearer');
$apiInstance = new RoyalMail\Shipping\Rest\PackagingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$xRMGAuthToken = "xRMGAuthToken_example"; // string | Authorisation token required to invoke this operation. Can be retrieved by invoking the **_/token** operation.
$packagingId = "packagingId_example"; // string | Your unique Packaging ID of the packaging details to delete.
try {
$result = $apiInstance->packagingDelete($xRMGAuthToken, $packagingId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PackagingApi->packagingDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
xRMGAuthToken | string | Authorisation token required to invoke this operation. Can be retrieved by invoking the _/token operation. | |
packagingId | string | Your unique Packaging ID of the packaging details to delete. |
\RoyalMail\Shipping\Rest\Api\models\PackagingResponse
- Content-Type: Not defined
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\RoyalMail\Shipping\Rest\Api\models\Packaging packagingGet($xRMGAuthToken, $packagingId)
Get Packaging
Get the packaging details specified by your unique Packaging ID.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: clientID
$config = RoyalMail\Shipping\Rest\Api\Configuration::getDefaultConfiguration()->setApiKey('X-IBM-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = RoyalMail\Shipping\Rest\Api\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-IBM-Client-Id', 'Bearer');
$apiInstance = new RoyalMail\Shipping\Rest\PackagingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$xRMGAuthToken = "xRMGAuthToken_example"; // string | Authorisation token required to invoke this operation. Can be retrieved by invoking the **_/token** operation.
$packagingId = "packagingId_example"; // string | Your Unique Packaging ID.
try {
$result = $apiInstance->packagingGet($xRMGAuthToken, $packagingId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PackagingApi->packagingGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
xRMGAuthToken | string | Authorisation token required to invoke this operation. Can be retrieved by invoking the _/token operation. | |
packagingId | string | Your Unique Packaging ID. |
\RoyalMail\Shipping\Rest\Api\models\Packaging
- Content-Type: Not defined
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\RoyalMail\Shipping\Rest\Api\models\Packaging[] packagingGetAll($xRMGAuthToken)
Get All Packaging
Get all of your stored packaging details
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: clientID
$config = RoyalMail\Shipping\Rest\Api\Configuration::getDefaultConfiguration()->setApiKey('X-IBM-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = RoyalMail\Shipping\Rest\Api\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-IBM-Client-Id', 'Bearer');
$apiInstance = new RoyalMail\Shipping\Rest\PackagingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$xRMGAuthToken = "xRMGAuthToken_example"; // string | Authorisation token required to invoke this operation. Can be retrieved by invoking the **_/token** operation.
try {
$result = $apiInstance->packagingGetAll($xRMGAuthToken);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PackagingApi->packagingGetAll: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
xRMGAuthToken | string | Authorisation token required to invoke this operation. Can be retrieved by invoking the _/token operation. |
\RoyalMail\Shipping\Rest\Api\models\Packaging[]
- Content-Type: Not defined
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\RoyalMail\Shipping\Rest\Api\models\PackagingResponse packagingUpdate($body, $xRMGAuthToken, $packagingId)
Update packaging
Update packaging details that is already stored with new details. All details will be replaced with new details.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: clientID
$config = RoyalMail\Shipping\Rest\Api\Configuration::getDefaultConfiguration()->setApiKey('X-IBM-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = RoyalMail\Shipping\Rest\Api\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-IBM-Client-Id', 'Bearer');
$apiInstance = new RoyalMail\Shipping\Rest\PackagingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \RoyalMail\Shipping\Rest\Api\models\Packaging(); // \RoyalMail\Shipping\Rest\Api\models\Packaging | The packaging with the updated details.
$xRMGAuthToken = "xRMGAuthToken_example"; // string | Authorisation token required to invoke this operation. Can be retrieved by invoking the **_/token** operation.
$packagingId = "packagingId_example"; // string | Your unique Packaging ID of the packaging details to update.
try {
$result = $apiInstance->packagingUpdate($body, $xRMGAuthToken, $packagingId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PackagingApi->packagingUpdate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \RoyalMail\Shipping\Rest\Api\models\Packaging | The packaging with the updated details. | |
xRMGAuthToken | string | Authorisation token required to invoke this operation. Can be retrieved by invoking the _/token operation. | |
packagingId | string | Your unique Packaging ID of the packaging details to update. |
\RoyalMail\Shipping\Rest\Api\models\PackagingResponse
- Content-Type: application/xml, application/json
- Accept: application/xml, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]