v1

latestOpenAPI 3.0.12026-07-242073551.1 MB
Shipping Accounts

Add Account

Add a shipping account for Royal Mail and either link it with an existing shipping location or add a new shipping location that will be associated with the shipping account. <br />
<br />Note: Before adding a shipping account with Royal Mail, ensure to have the required carrier details, such as the Royal Mail account number, posting location, OBA access code, and receiving hub, so that you can seamlessly use the account for shipping with Royal Mail.

post/v4/shippingAccounts/rm

Request body

AccountNumberstring required

The number assigned to the shipping account by the carrier, typically used for tracking shipments and billing purposes.

AccountType'Sandbox' | 'Production' required

Indicates whether the account is set up as a "sandbox" or "production" account. A Sandbox account is for testing and development, while a Production account is used for live shipments and transactions.

AccountNamestring nullable

The official name of the shipping account as designated by the user or organisation, aiding in easy identification and reference of accounts. <br /> <br />Note: By default, this value is set to the customer name if not provided in the request.

AccountRegisteredEmailstring email required

The email address that was used to register the shipping account with Royal Mail when the account was created. This email serves as the primary contact point for communications related to the shipping account, including notifications, updates, and service alerts from Royal Mail. .

AccountAliasstring required

A unique, user-defined name for the shipping account, providing a convenient way to reference the account in a more memorable manner.

RegisteredBillingPostcodestring nullable

The postcode associated with the billing address for the shipping account. <br />This postcode is used by Royal Mail for sending invoices and other relevant billing communications related to the account.<br><br>Note: This field is mandatory only if the AccountType field is set to Production.

ContactNamestring required

The name of the primary contact person for the shipping account, facilitating communication regarding shipping and account-related matters. <br /> <br />Note: If the shipper address is not provided in the Create Shipment request, this information is used as the shipper's contact name, if provided.

ContactNumberstring tel required

The phone number associated with the shipping account's primary contact person, facilitating communication regarding shipping inquiries, account management, and issue resolution. <br /> <br />Note: If the shipper address is not provided in the Create Shipment request, this information is used as the shipper's contact phone number, if provided. Characters like +, /, -, or space are supported.

Example request

{
  "AccountNumber": "9912347707",
  "AccountName": "AB VideoGames",
  "AccountRegisteredEmail": "my.email@example.com",
  "AccountAlias": "RM-99112347707",
  "RegisteredBillingPostcode": "TW20 0HJ",
  "ContactName": "John Smith",
  "ContactNumber": "0123456789",
  "ShippingLocations": [
    {
      "ShippingLocationId": "D94E8CFD-604B-4B87-83E9-3F20CAF02837",
      "ShippingLocation": {
        "LocationAlias": "Main Warehouse",
        "Address": {
          "AddressId": "John Brown Default",
          "Line1": "Brown Cottage",
          "Line2": "10 Sky Lane",
          "Line3": "Hills End",
          "Town": "Christchurch",
          "Postcode": "TW20 0HJ",
          "County": "Surrey",
          "CountryCode": "GB",
          "What3Words": "brick.space.employ",
          "ContactPhone": "07123887422"
        },
        "Timezone": "Europe/London"
      },
      "PostingLocationCode": "2345654321",
      "ObaAccessCode": "123456",
      "ReceivingHubCode": "002610"
    }
  ]
}

Response

The shipping account was added successfully.

ShippingAccountIdstring uuid

A unique identifier for the shipping account assigned by the system, allowing for efficient reference and management of individual accounts within the system.

ShippingLocationIdstring uuid nullable

A unique identifier assigned to the new shipping location by the system. This ID is used to distinguish between different shipping locations within the system, facilitating, referencing and operations, such as updates, deletions, or specific queries related to that location. <br /> <br />Note: This field is only populated if the details of a new location were provided in the request.