---
title: "Add Account"
method: POST
path: "/v4/shippingAccounts/rm"
tags: ["Shipping Accounts"]
---

# Add Account

`POST /v4/shippingAccounts/rm`

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.*

## Request body

- RoyalMailAddShippingAccountRequest — Royal Mail Add Shipping Account Request
  - `AccountNumber` string, 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.
  - `AccountName` string, 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.*
  - `AccountRegisteredEmail` string, 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. .
  - `AccountAlias` string, required — A unique, user-defined name for the shipping account, providing a convenient way to reference the account in a more memorable manner.
  - `RegisteredBillingPostcode` string, 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**.*
  - `ContactName` string, 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.*
  - `ContactNumber` string, 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.*
  - `ShippingLocations` RoyalMailAddShippingAccountLocation[], required — An object that allows the customer to specify the shipping location(s) that will be associated with the new shipping account. Within this object, the customer can either link the existing shipping location(s) or add a new one. <br /> <br />***Note:** While adding a shipping account, make sure to provide at least one shipping location.If you are providing a new shipping location, then only one location can be added.*
    - `ShippingLocationId` string, nullable — This field is used to link an existing shipping location to the new shipping account that is being created, and either the shipping location Id or alias can be provided to link the shipping location to the shipping account.
    - `ShippingLocation` AddShippingAccountLocationNewLocation — This object is used to create a new shipping location that will be linked to the shipping account that is being created.
      - `LocationAlias` string, required — A unique user-defined identifier for the shipping location, providing a convenient way to identify it, for example, Home or Warehouse.
      - `IsDefaultLocation` boolean, nullable — A boolean value indicating whether the shipping location is set as the default for shipping operations. <br /> <br />***Note:** If true, then this location is set as the default one. Otherwise, it is set to false. The shipping account must have at least one default location.*
      - `Address` AddShippingAccountLocationAddress, required — The complete address of the shipping location, consisting of multiple components including street information, locality, and so on.
        - `AddressId` string, nullable — A unique identifier for the new shipping location that will be associated with the shipping account being added. <br /> <br />***Note:** If this information is provided, then all the address fields will be ignored and the relevant information will be used from the addresses stored in the **Address Book**.*
        - `Line1` string, nullable — The first line of the address, typically containing the primary address information such as house number and street name.
        - `Line2` string, nullable — An optional second line for the address, often used for additional details like apartment numbers or suite designations.
        - `Line3` string, nullable — A third optional line in the address to include any further address specifications, allowing for more detailed address information if necessary.
        - `Town` string, nullable — The town or city, indicating the specific locality where the shipping location is situated. <br/> <br/> ***Note:** This information is required if the address is not used from the stored addresses in the **Address Book**.*
        - `Postcode` string, nullable — The postal or ZIP code corresponding to the shipping location, used for mail sorting and to identify specific geographic areas.<br/> <br/> ***Note:** This information is only required for the addresses in the UK and for some outside it. To check for the postcode requirements, refer to the **Countries** API.*
        - `County` string, nullable — The county, state, or province in which the shipping location resides, providing additional geographical context for the address.<br/> <br/> ***Note:** This information may be required depending on the country. If the country is USA, Australia, or Canada, then it must be a valid state code or name, respectively. To check for the county/state/province requirements, refer to the **Countries** API.*
        - `CountryCode` string, nullable — An abbreviation representing the country of the shipping location, following the ISO 3166-1 alpha-2 standard, for example, "GB" for the United Kingdom. <br /> <br />***Note**: This information is only required if the address is not used from the stored addresses in the **Address Book***
        - `What3Words` string, nullable — A three-word location identifier provided by the What3words service, offering a precise way to define locations using a unique combination of three words, for example, the front door of 10 Downing Street in London is identified by slurs.this.shark.
        - `ContactPhone` string, tel, nullable — The contact phone number associated with the shipping location, facilitating communication regarding shipments or deliveries. <br /> <br />***Note:** If the shipper address is not provided for the **Create Shipment** request, this information is used as the shipper's contact phone number for this location, instead of the shipping account contact phone number. Characters like +, /, -, or space are supported.*
      - `Timezone` string, required — The timezone in which the shipping location is located, important for scheduling and logistical considerations.
    - `PostingLocationCode` string, required — A unique number assigned to this location by Royal Mail. This code is essential for identifying the particular location from which shipments are dispatched. It facilitates the processing and tracking of mail and packages by providing a clear reference to the origin of the shipment within the Royal Mail network.
    - `ObaAccessCode` string, nullable — The OBA Access Code (Online Business Account Access Code) is a password associated with the Royal Mail shipping account that grants access to the Online Business Account (OBA) services. This code is crucial for ensuring that the account is secure and allows for the management of shipping tasks online. <br /> <br />***Note:** A Royal Mail shipping account cannot be activated or used for shipping unless the OBA Access Code has been provided.*
    - `ReceivingHubCode` string, nullable — A code that refers to the Receiving Hub or Regional Distribution Center (RDC) used for this shipping location. This code must correspond to an existing Receiving Hub recognised by Royal Mail. <br /> <br />***Note:** If the receiving hub code is not provided during the account creation process, Royal Mail will automatically match it to the Receiving Hub that corresponds to the postcode of the location's address. For more information, refer to the Royal Mail Receiving Hubs for a list of possible locations.*

## Response `200`

The shipping account was added successfully.

- AddShippingAccountResponse — Add Shipping Account Response
  - `ShippingAccountId` string, uuid — A unique identifier for the shipping account assigned by the system, allowing for efficient reference and management of individual accounts within the system.
  - `ShippingLocationId` string, 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.*

## Other responses

- `400` — Invalid request response.
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error

---

[API](https://skmtc.dev/intersoftsapient/apis/sapient-core-api.md) · [All operations](https://skmtc.dev/intersoftsapient/apis/sapient-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/intersoftsapient/sapient-core-api/revisions/3315ad0b5875/schema)
