Improved

Royal Mail swagger documentation updates

Miscellaneous enhancements

The following enhancements have been made to the SAPIENT ROYAL MAIL API endpoints.

  • Create Shipment: The following two new categories have been added to the Customs > ReasonForExport field in addition to the existing categories:
    • ECommerce Sale of Goods - for B2C or D2C shipments, such as goods sold directly to consumers via online retail.
    • Commercial Sale of Goods - for B2B shipments, covering business to business commercial sales.

This is done so that the shipments are correctly classified as e-commerce or commercial sales, ensuring compliance with Royal Mail's latest specification.

📘

Note

Please keep in mind the following:

  • If the existing Sale of Goods value is selected as the reason for export, the system automatically determines whether the shipment is Ecommerce (B2C or D2C) or Commercial (B2B) based on the value provided in the BusinessTransactionType field in the create shipment request.
  • If any of the new reason for export values are requested in the Print Document API, they will be displayed in the generated CN23 document.

For more information, refer to the Create Shipment and Print Document API endpoints.

  • Get Carrier Services. A new Services > Get Carrier Services endpoint has been added to the SAPIENT ROYAL MAIL API block, allowing users to retrieve the service levels associated with each requested service code.
[
  {
    "ServiceCode": "CRL1",
    "Description": "Royal Mail 24 Standard/Signed For (Parcel - Daily Rate Service)",
    "CarrierSpecifics": {
      "ServiceLevels": [
        "01",
        "02"
      ]
    }
  }
]

Response payload example

Field description updates

The query and response field descriptions for the following SAPIENT ROYAL MAIL API endpoints have been updated to improve clarity and support correct usage of the API:

  • Shipping Accounts
    • Get Accounts
    • Add Account
    • Get Account
    • Update Account
    • Link Locations
    • Get Associated Locations
    • Get Associate Location
    • Update Associated Location
  • Shipments
    • Create Shipment
    • Print Label
    • Print My Label QR Code
    • Pre Allocate Tracking Number
  • Collections
    • Book Collection
    • Cancel Collection
    • Get Collection Timeslots
  • Offline Barcode Range
    • Get Barcode Range
  • International Arrivals Containers
    • Add Container
    • Get Containers
    • Update Containers
    • Add/Remove Shipments
    • Delete Containers
    • Get Containers