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

# Add Account

`POST /v4/shippingAccounts/DX`

Add a shipping account for DX and link it with an existing shipping location.<br />Ensure to have required carrier details ready like DX account number so that you can use the account for shipping with DX.

## Request body

- DXAddShippingAccountRequest — DX 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.*
  - `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.
  - `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.*
  - `Username` string, required — A unique identifier assigned to a specific DX account. This identifier is essential for authenticating and authorising API requests. This helps ensure that the API interactions are secure and linked to the correct account.
  - `Password` string, required — The password which is used in conjuction with the **Username** of your DX account. It is essential for securing the account and ensuring that only authorised users have access to shipping details and operations.
  - `ShippingLocations` AddShippingAccountLocation[], 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.

## 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)
