---
title: "Link Locations"
method: POST
path: "/v4/shippingAccounts/rm/{shippingAccountId}/linkLocations"
tags: ["Shipping Accounts"]
---

# Link Locations

`POST /v4/shippingAccounts/rm/{shippingAccountId}/linkLocations`

## Request

- Base URL: `https://api.intersoftsapient.net`
- URL: `https://api.intersoftsapient.net/v4/shippingAccounts/rm/{shippingAccountId}/linkLocations`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://authentication.intersoftsapient.net/connect/token`

Link one or more shipping locations with a Royal Mail shipping account.<br />Ensure to have required carrier details ready: Royal Mail Posting Location number, OBA access codes and receiving hub, so that you can link it successfully.

## Path parameters

- `shippingAccountId` string, required

## Request body

- RoyalMailLinkShippingAccountLocation[]
  - `ShippingLocationId` string, required: A unique identifier for the shipping location assigned by the system or by you (alias), allowing users to reference and manage specific locations effectively. <br /> <br />***Note:** The information provided in this field and the **ShippingAccountId** field are being linked with each other.*
  - `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.*
  - `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 when the shipping account does not have a registered billing postcode.*

## Response `200`

The shipping location(s) have been linked to the account successfully.

## Other responses

- `400`: Invalid request response.
- `401`: Unauthorized
- `403`: Forbidden
- `404`: The shipping account was not found.
- `500`: Internal Server Error

---

[API](https://skmtc.dev/intersoftsapient/apis/royal-mail.md) - [All operations](https://skmtc.dev/intersoftsapient/apis/royal-mail/llms.txt) - [OpenAPI document](https://skmtc.dev/intersoftsapient/apis/royal-mail/revisions/acb747a1c3b6?raw)
