# Get Locations Details

This operation provides the location details with the subscription.

Endpoint: GET /api/v1/locations
Version: 0.1
Security: bearerAuth

## Header parameters:

  - `X-PB-Developer-Partner-ID` (string)

## Query parameters:

  - `divisionID` (string)
    It specifies the division id. If provided it will only show the location details under this division.

  - `page` (number)
    page number

  - `size` (number)
    size of records

## Response 200 fields (application/json):

  - `pageInfo` (object)
    Pagination details

  - `pageInfo.total` (number)
    Total number records displayed
    Example: 1

  - `pageInfo.pages` (number)
    Total pages
    Example: 1

  - `pageInfo.page` (number)
    current page
    Example: 10

  - `data` (object)
    Unique identifier of the account

  - `data.locationID` (string)
    This defines location id
    Example: "4a0e2Bb4Njw"

  - `data.customerLocationId` (string)
    This is a customer-defined location identifier in addition to the system-generated LocationId created during developer onboarding. If a customerLocationId is not defined, the system assigns a default locationID. In responses, both identifiers are returned, if a customer-defined value is not set, both fields return the same system-generated LocationID
    Example: "4a0e2Bb4Njw"

  - `data.divisionID` (string)
    This defines division id
    Example: "4a0e2Bbshdh"

  - `data.accountNumber` (string)
    This defines account number
    Example: "1242"

  - `data.name` (string)
    This defines name of the customer
    Example: "John"

  - `data.company` (string)
    This defines company name
    Example: "PB"

  - `data.addressLine1` (string)
    This defines address of customer
    Example: "203, new york"

  - `data.city` (string)
    This defines city
    Example: "New York"

  - `data.state` (string)
    This defines state
    Example: "NY"

  - `data.postalCode` (string)
    This defines postal code
    Example: "10001"

  - `data.countryCode` (string)
    This defines country code
    Example: "US"

  - `data.phone` (string)
    This defines phone number
    Example: "826482849"

  - `data.isReturnAddressSame` (boolean)
    This defines if return address is or not

  - `data.altReturnAddress` (object)
    If a package shipped from Location_A to Location_B needs to return to Location_C. The alternate address will be printed on the label. Use this object to specify a return address different from the fromAddress. Supported by FedEx, UPS, and Purolator.  Alternate return address will be returned in the response only if it is present in the location.

  - `data.altReturnAddress.addressLine1` (string)
    The first line of the alternate return address, such as a street address or PO Box.
    Example: "27 Waterview Dr"

  - `data.altReturnAddress.addressLine2` (string)
    The addressLine2 contains Street address or Landmark (if any).
    Example: "near abc street"

  - `data.altReturnAddress.addressLine3` (string)
    The addressLine3 contains P.O. Box (if any) near the address.
    Example: "near xyz street"

  - `data.altReturnAddress.company` (string)
    The name of the company for the alternate return address, in case if the recipient's address is not residential.  Max length = 30.
    Example: "PB"

  - `data.altReturnAddress.email` (string)
    The email address of the recipient. It can be person's email address or company email address (for non-residential).
    Example: "user@email.com"

  - `data.altReturnAddress.residential` (boolean)
    The specified address can be Residential or Official. In case if the address is Residential, the boolean value will be 'true', else it will take 'false'.
    Example: true

  - `data.altReturnAddress.cityTown` (string)
    The city or town for the alternate return address.
    Example: "Shelton"

  - `data.altReturnAddress.countryCode` (string)
    The two-character ISO Code of the source country from this ISO country list.  The country in which the address is located. Use ISO 3166-1 Alpha-2 standard values. For best results this should be included, especially if the country name does not appear in any of the unparsedAddressLines.
    Example: "US"

  - `data.altReturnAddress.name` (string)
    The name of the recipient or organization for the alternate return address.
    Example: "User Name"

  - `data.altReturnAddress.phone` (string)
    The phone number associated with the alternate return address.
    Example: "203-555-1213"

  - `data.altReturnAddress.postalCode` (string)
    The postal or ZIP code for the alternate return address.
    Example: "06484"

  - `data.altReturnAddress.stateProvince` (string)
    The 2-letter state or province code for the alternate return address.
    Example: "CT"

## Response 400 fields (application/json):

  - `errorCode` (string)
    Error code(s) that appear due to HTTP  400- Invalid or Bad Request, e.g. validation-error.
    Example: "validation_error"

  - `errorDescription` (string)
    The HTTP 400 Bad Request response status code indicates that the server cannot process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

  - `additionalCode` (string)
    A unique identifier for the error, for example 1101055, 0100008, or 1021126.

  - `additionalInfo` (string)
    This is an additional information about the error. This error 'Invalid Request' might appear due to invalid dimension, weight, or serviceid, or if the information is missing.

  - `additionalParameters` (array)

## Response 401 fields (application/json):

  - `message` (string, required)
    This is HTTP 401 Unauthorized response status code, that indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource.

## Response 404 fields (application/json):

  - `errorCode` (string)
    Error code(s) that appear due HTTP 404 Page or File not found.
    Example: "not_found"

  - `errorDescription` (string)
    The HTTP 404 Not Found response status code indicates that the server cannot find the requested resource.
    Example: "resource not found"

  - `additionalCode` (string)
    A unique identifier for the error, for example 0100025, 1110017, or 1090001.

  - `additionalInfo` (string)
    Additional information about the error. This error 'Not Found' might appear due to Shipment Not Found, No Shipments to close, or Original Transaction not found.

  - `additionalParameters` (array)


## Response 5XX fields
