{"id":18624549,"url":"https://github.com/zvps/royal-mail-shipping-rest-api-client","last_synced_at":"2025-04-11T03:32:30.959Z","repository":{"id":52203008,"uuid":"137044437","full_name":"zVPS/royal-mail-shipping-rest-api-client","owner":"zVPS","description":"Royal Mail Pro Shipping v3 REST API PHP Client","archived":false,"fork":false,"pushed_at":"2022-04-06T15:08:48.000Z","size":380,"stargazers_count":8,"open_issues_count":6,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T09:02:32.749Z","etag":null,"topics":["php","royal-mail","shipping-api"],"latest_commit_sha":null,"homepage":"https://developer.royalmail.net/node/1874755","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zVPS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-12T08:55:05.000Z","updated_at":"2023-05-04T10:27:09.000Z","dependencies_parsed_at":"2022-08-03T12:45:30.600Z","dependency_job_id":null,"html_url":"https://github.com/zVPS/royal-mail-shipping-rest-api-client","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zVPS%2Froyal-mail-shipping-rest-api-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zVPS%2Froyal-mail-shipping-rest-api-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zVPS%2Froyal-mail-shipping-rest-api-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zVPS%2Froyal-mail-shipping-rest-api-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zVPS","download_url":"https://codeload.github.com/zVPS/royal-mail-shipping-rest-api-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248335566,"owners_count":21086620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","royal-mail","shipping-api"],"created_at":"2024-11-07T04:29:27.781Z","updated_at":"2025-04-11T03:32:26.085Z","avatar_url":"https://github.com/zVPS.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Royal Mail API Shipping v3 Client\n\nThis API specification details the requirements for integrating with **Royal Mail API Shipping V3**.\u003cbr\u003e\u003cbr\u003eIt specifically covers how the Royal Mail API Shipping V3 can be used by business customers to conduct shipping activity with Royal Mail and provides the technical information to build this integration. This specification must be used with the relevant accompanying specifications for customers wishing to interface their systems with Royal Mail services.\u003cbr\u003e\u003cbr\u003eRoyal Mail API Shipping V3 exposes a fully RESTful service that allows account customers to create shipments, produce labels, and produce documentation for all the tasks required to ship domestic items with Royal Mail.\u003cbr\u003e\u003cbr\u003eBuilt on industry standards, Royal Mail API Shipping V3 provides a simple and low cost method for customers to integrate with Royal Mail, and allows them to get shipping quickly. The API offers data streaming and offline barcoding to allow customers greater flexibility when generating their labels. There are no costs to customers for using the Royal Mail API Shipping V3 services, however customers’ own development costs must be covered by the customer developing the solution. Royal Mail will not accept any responsibility for these development, implementation and testing costs. Customers should address initial enquiries regarding development of systems for these purposes to their account handler.\u003cbr\u003e\u003cbr\u003eThis API can be used in conjunction with Royal Mail Pro Shipping, a GUI based shipping platform. For more details on Royal Mail Pro Shipping, including videos on and briefs on updating/ cancelling a shipment and Manifesting please refer to http://www.royalmail.com/pro-shipping-help.\n\nThis PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:\n\n- API version: 3.0.12\n- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen\n\n## Requirements\n\nPHP 5.5 and later\n\n## Installation \u0026 Usage\n### Composer\n\nTo install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:\n\n```\n{\n  \"repositories\": [\n    {\n      \"type\": \"git\",\n      \"url\": \"https://github.com/zVPS/royal-mail-shipping-rest-api-client.git\"\n    }\n  ],\n  \"require\": {\n    \"zVPS/royal-mail-shipping-rest-api-client\": \"*@dev\"\n  }\n}\n```\n\nThen run `composer install`\n\n### Manual Installation\n\nDownload the files and include `autoload.php`:\n\n```php\n    require_once 'vendor/autoload.php';\n```\n\n## Tests\n\nTo run the unit tests:\n\n```\ncomposer install\n./vendor/bin/phpunit\n```\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\n\n```php\n\u003c?php\nrequire_once(__DIR__ . '/vendor/autoload.php');\n\n// Configure API key authorization: clientID/Secret\n$config = RoyalMail\\Shipping\\Rest\\Api\\Configuration::getDefaultConfiguration()-\u003esetApiKey('X-IBM-Client-Id', 'YOUR_API_KEY');\n$config = RoyalMail\\Shipping\\Rest\\Api\\Configuration::getDefaultConfiguration()-\u003esetApiKey('X-IBM-Client-Secret', 'YOUR_API_KEY');\n\n// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed\n// $config = RoyalMail\\Shipping\\Rest\\Api\\Configuration::getDefaultConfiguration()-\u003esetApiKeyPrefix('X-IBM-Client-Id', 'Bearer');\n\n$apiInstance = new RoyalMail\\Shipping\\Rest\\ApiAddressesApi(\n    // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n    // This is optional, `GuzzleHttp\\Client` will be used as default.\n    new GuzzleHttp\\Client(),\n    $config\n);\n$body = new \\RoyalMail\\Shipping\\Rest\\Api\\models\\Address(); // \\RoyalMail\\Shipping\\Rest\\Api\\models\\Address | The address.\n$xRMGAuthToken = \"xRMGAuthToken_example\"; // string | Authorisation token required to invoke this operation. Can be retrieved by invoking the **_/token** operation.\n\ntry {\n    $result = $apiInstance-\u003eaddressesCreate($body, $xRMGAuthToken);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling AddressesApi-\u003eaddressesCreate: ', $e-\u003egetMessage(), PHP_EOL;\n}\n\n// Configure API key authorization: clientID\n$config = RoyalMail\\Shipping\\Rest\\Api\\Configuration::getDefaultConfiguration()-\u003esetApiKey('X-IBM-Client-Id', 'YOUR_API_KEY');\n// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed\n// $config = RoyalMail\\Shipping\\Rest\\Api\\Configuration::getDefaultConfiguration()-\u003esetApiKeyPrefix('X-IBM-Client-Id', 'Bearer');\n\n$apiInstance = new RoyalMail\\Shipping\\Rest\\ApiAddressesApi(\n    // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n    // This is optional, `GuzzleHttp\\Client` will be used as default.\n    new GuzzleHttp\\Client(),\n    $config\n);\n$xRMGAuthToken = \"xRMGAuthToken_example\"; // string | Authorisation token required to invoke this operation. Can be retrieved by invoking the **_/token** operation.\n$addressId = \"addressId_example\"; // string | Your unique Address ID of the address to delete.\n\ntry {\n    $result = $apiInstance-\u003eaddressesDelete($xRMGAuthToken, $addressId);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling AddressesApi-\u003eaddressesDelete: ', $e-\u003egetMessage(), PHP_EOL;\n}\n\n// Configure API key authorization: clientID\n$config = RoyalMail\\Shipping\\Rest\\Api\\Configuration::getDefaultConfiguration()-\u003esetApiKey('X-IBM-Client-Id', 'YOUR_API_KEY');\n// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed\n// $config = RoyalMail\\Shipping\\Rest\\Api\\Configuration::getDefaultConfiguration()-\u003esetApiKeyPrefix('X-IBM-Client-Id', 'Bearer');\n\n$apiInstance = new RoyalMail\\Shipping\\Rest\\ApiAddressesApi(\n    // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n    // This is optional, `GuzzleHttp\\Client` will be used as default.\n    new GuzzleHttp\\Client(),\n    $config\n);\n$xRMGAuthToken = \"xRMGAuthToken_example\"; // string | Authorisation token required to invoke this operation. Can be retrieved by invoking the **_/token** operation.\n$addressId = \"addressId_example\"; // string | Your unique Address ID.\n\ntry {\n    $result = $apiInstance-\u003eaddressesGet($xRMGAuthToken, $addressId);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling AddressesApi-\u003eaddressesGet: ', $e-\u003egetMessage(), PHP_EOL;\n}\n\n// Configure API key authorization: clientID\n$config = RoyalMail\\Shipping\\Rest\\Api\\Configuration::getDefaultConfiguration()-\u003esetApiKey('X-IBM-Client-Id', 'YOUR_API_KEY');\n// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed\n// $config = RoyalMail\\Shipping\\Rest\\Api\\Configuration::getDefaultConfiguration()-\u003esetApiKeyPrefix('X-IBM-Client-Id', 'Bearer');\n\n$apiInstance = new RoyalMail\\Shipping\\Rest\\ApiAddressesApi(\n    // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n    // This is optional, `GuzzleHttp\\Client` will be used as default.\n    new GuzzleHttp\\Client(),\n    $config\n);\n$xRMGAuthToken = \"xRMGAuthToken_example\"; // string | Authorisation token required to invoke this operation. Can be retrieved by invoking the **_/token** operation.\n\ntry {\n    $result = $apiInstance-\u003eaddressesGetAll($xRMGAuthToken);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling AddressesApi-\u003eaddressesGetAll: ', $e-\u003egetMessage(), PHP_EOL;\n}\n\n// Configure API key authorization: clientID\n$config = RoyalMail\\Shipping\\Rest\\Api\\Configuration::getDefaultConfiguration()-\u003esetApiKey('X-IBM-Client-Id', 'YOUR_API_KEY');\n// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed\n// $config = RoyalMail\\Shipping\\Rest\\Api\\Configuration::getDefaultConfiguration()-\u003esetApiKeyPrefix('X-IBM-Client-Id', 'Bearer');\n\n$apiInstance = new RoyalMail\\Shipping\\Rest\\ApiAddressesApi(\n    // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n    // This is optional, `GuzzleHttp\\Client` will be used as default.\n    new GuzzleHttp\\Client(),\n    $config\n);\n$body = new \\RoyalMail\\Shipping\\Rest\\Api\\models\\Address(); // \\RoyalMail\\Shipping\\Rest\\Api\\models\\Address | The address with the updated details.\n$xRMGAuthToken = \"xRMGAuthToken_example\"; // string | Authorisation token required to invoke this operation. Can be retrieved by invoking the **_/token** operation.\n$addressId = \"addressId_example\"; // string | Your unique Address ID of the address to update.\n\ntry {\n    $result = $apiInstance-\u003eaddressesUpdate($body, $xRMGAuthToken, $addressId);\n    print_r($result);\n} catch (Exception $e) {\n    echo 'Exception when calling AddressesApi-\u003eaddressesUpdate: ', $e-\u003egetMessage(), PHP_EOL;\n}\n?\u003e\n```\n\n## Documentation for API Endpoints\n\nAll URIs are relative to *///shipping/v3*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*AddressesApi* | [**addressesCreate**](docs/Api/AddressesApi.md#addressescreate) | **POST** /addresses | Create Address\n*AddressesApi* | [**addressesDelete**](docs/Api/AddressesApi.md#addressesdelete) | **DELETE** /addresses/{addressId} | Delete Address\n*AddressesApi* | [**addressesGet**](docs/Api/AddressesApi.md#addressesget) | **GET** /addresses/{addressId} | Get Address\n*AddressesApi* | [**addressesGetAll**](docs/Api/AddressesApi.md#addressesgetall) | **GET** /addresses | Get Addresses\n*AddressesApi* | [**addressesUpdate**](docs/Api/AddressesApi.md#addressesupdate) | **PUT** /addresses/{addressId} | Update address\n*ItemsApi* | [**itemsCreate**](docs/Api/ItemsApi.md#itemscreate) | **POST** /items | Create Item\n*ItemsApi* | [**itemsDelete**](docs/Api/ItemsApi.md#itemsdelete) | **DELETE** /items/{itemId} | Delete Item\n*ItemsApi* | [**itemsGet**](docs/Api/ItemsApi.md#itemsget) | **GET** /items/{itemId} | Get Item\n*ItemsApi* | [**itemsGetAll**](docs/Api/ItemsApi.md#itemsgetall) | **GET** /items | Get Items\n*ItemsApi* | [**itemsUpdate**](docs/Api/ItemsApi.md#itemsupdate) | **PUT** /items/{itemId} | Update item\n*ManifestsApi* | [**manifestsCreate**](docs/Api/ManifestsApi.md#manifestscreate) | **POST** /manifests | Manifest All Shipments\n*ManifestsApi* | [**manifestsCreateByCarrier**](docs/Api/ManifestsApi.md#manifestscreatebycarrier) | **POST** /manifests/bycarrier | Manifest by Carrier Code(s)\n*ManifestsApi* | [**manifestsCreateByService**](docs/Api/ManifestsApi.md#manifestscreatebyservice) | **POST** /manifests/byservice | Manifest by Service Code(s)\n*PackagingApi* | [**packagingCreate**](docs/Api/PackagingApi.md#packagingcreate) | **POST** /packaging | Create Packaging\n*PackagingApi* | [**packagingDelete**](docs/Api/PackagingApi.md#packagingdelete) | **DELETE** /packaging/{packagingId} | Delete Packaging\n*PackagingApi* | [**packagingGet**](docs/Api/PackagingApi.md#packagingget) | **GET** /packaging/{packagingId} | Get Packaging\n*PackagingApi* | [**packagingGetAll**](docs/Api/PackagingApi.md#packaginggetall) | **GET** /packaging | Get All Packaging\n*PackagingApi* | [**packagingUpdate**](docs/Api/PackagingApi.md#packagingupdate) | **PUT** /packaging/{packagingId} | Update packaging\n*ShipmentsApi* | [**shipmentsCancel**](docs/Api/ShipmentsApi.md#shipmentscancel) | **PUT** /shipments/cancel | Cancel Shipments\n*ShipmentsApi* | [**shipmentsCreate**](docs/Api/ShipmentsApi.md#shipmentscreate) | **POST** /shipments | Create Shipment\n*ShipmentsApi* | [**shipmentsDefer**](docs/Api/ShipmentsApi.md#shipmentsdefer) | **PUT** /shipments/defer | Defer Shipments\n*ShipmentsApi* | [**shipmentsHold**](docs/Api/ShipmentsApi.md#shipmentshold) | **PUT** /shipments/hold | Hold Shipments\n*ShipmentsApi* | [**shipmentsPrintDocument**](docs/Api/ShipmentsApi.md#shipmentsprintdocument) | **PUT** /shipments/{shipmentId}/printDocument | Print Document\n*ShipmentsApi* | [**shipmentsPrintLabel**](docs/Api/ShipmentsApi.md#shipmentsprintlabel) | **PUT** /shipments/{shipmentId}/printLabel | Print Label\n*ShipmentsApi* | [**shipmentsRelease**](docs/Api/ShipmentsApi.md#shipmentsrelease) | **PUT** /shipments/release | Release Shipments\n*ShipmentsApi* | [**shipmentsServiceAvailability**](docs/Api/ShipmentsApi.md#shipmentsserviceavailability) | **POST** /shipments/serviceAvailability | Service Availability\n*TokenApi* | [**authenticatePost**](docs/Api/TokenApi.md#authenticatepost) | **POST** /token | Authenticates a User and provides token.\n\n## Documentation For Models\n\n - [Address](docs/Model/Address.md)\n - [AddressResponse](docs/Model/AddressResponse.md)\n - [CreateShipmentDestination](docs/Model/CreateShipmentDestination.md)\n - [CreateShipmentServiceOptions](docs/Model/CreateShipmentServiceOptions.md)\n - [CreateShipmentShipment](docs/Model/CreateShipmentShipment.md)\n - [CreateShipmentShipmentInformation](docs/Model/CreateShipmentShipmentInformation.md)\n - [CreateShipmentShipmentPackage](docs/Model/CreateShipmentShipmentPackage.md)\n - [ErrorDetail](docs/Model/ErrorDetail.md)\n - [Item](docs/Model/Item.md)\n - [ItemResponse](docs/Model/ItemResponse.md)\n - [Manifest](docs/Model/Manifest.md)\n - [ManifestCarrierCodesRequest](docs/Model/ManifestCarrierCodesRequest.md)\n - [ManifestRequest](docs/Model/ManifestRequest.md)\n - [ManifestResponse](docs/Model/ManifestResponse.md)\n - [ManifestServiceCodesRequest](docs/Model/ManifestServiceCodesRequest.md)\n - [PackageResponse](docs/Model/PackageResponse.md)\n - [Packaging](docs/Model/Packaging.md)\n - [PackagingResponse](docs/Model/PackagingResponse.md)\n - [PrintDocumentRequest](docs/Model/PrintDocumentRequest.md)\n - [PrintDocumentResponse](docs/Model/PrintDocumentResponse.md)\n - [PrintLabelRequest](docs/Model/PrintLabelRequest.md)\n - [PrintLabelResponse](docs/Model/PrintLabelResponse.md)\n - [ServiceAvailabilityDestination](docs/Model/ServiceAvailabilityDestination.md)\n - [ServiceAvailabilityFormat](docs/Model/ServiceAvailabilityFormat.md)\n - [ServiceAvailabilityOption](docs/Model/ServiceAvailabilityOption.md)\n - [ServiceAvailabilityResponse](docs/Model/ServiceAvailabilityResponse.md)\n - [ServiceAvailabilityServiceOptions](docs/Model/ServiceAvailabilityServiceOptions.md)\n - [ServiceAvailabilityShipment](docs/Model/ServiceAvailabilityShipment.md)\n - [ServiceAvailabilityShipmentInformation](docs/Model/ServiceAvailabilityShipmentInformation.md)\n - [ServiceAvailabilityShipmentPackage](docs/Model/ServiceAvailabilityShipmentPackage.md)\n - [ShipmentCancelRequest](docs/Model/ShipmentCancelRequest.md)\n - [ShipmentCreateResponse](docs/Model/ShipmentCreateResponse.md)\n - [ShipmentDeferRequest](docs/Model/ShipmentDeferRequest.md)\n - [ShipmentHoldRequest](docs/Model/ShipmentHoldRequest.md)\n - [ShipmentItem](docs/Model/ShipmentItem.md)\n - [ShipmentsCancelResponse](docs/Model/ShipmentsCancelResponse.md)\n - [ShipmentsDeferResponse](docs/Model/ShipmentsDeferResponse.md)\n - [ShipmentsHoldResponse](docs/Model/ShipmentsHoldResponse.md)\n - [ShipmentsReleaseRequest](docs/Model/ShipmentsReleaseRequest.md)\n - [ShipmentsReleaseResponse](docs/Model/ShipmentsReleaseResponse.md)\n - [Shipper](docs/Model/Shipper.md)\n\n## Documentation For Authorization\n\n\n## clientID\n\n- **Type**: API key\n- **API key parameter name**: X-IBM-Client-Id\n- **Location**: HTTP header\n\n## clientSecret\n\n- **Type**: API key\n- **API key parameter name**: X-IBM-Client-Secret\n- **Location**: HTTP header\n\n\n## Author\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzvps%2Froyal-mail-shipping-rest-api-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzvps%2Froyal-mail-shipping-rest-api-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzvps%2Froyal-mail-shipping-rest-api-client/lists"}