> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.shipbob.com/llms.txt.
> For full documentation content, see https://developer.shipbob.com/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.shipbob.com/_mcp/server.

# Get locations


GET https://api.shipbob.com/2.0/location

Reference: https://developer.shipbob.com/api/locations/get-locations

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: api-2.0
  version: 1.0.0
paths:
  /2.0/location:
    get:
      operationId: get-locations
      summary: |
        Get locations
      tags:
        - subpackage_locations
      parameters:
        - name: IncludeInactive
          in: query
          description: |
            Whether the inactive locations should be included or not
          required: false
          schema:
            type: boolean
        - name: ReceivingEnabled
          in: query
          description: |
            Return all the receiving enabled locations
          required: false
          schema:
            type: boolean
        - name: AccessGranted
          in: query
          description: |
            Return all the access granted locations
          required: false
          schema:
            type: boolean
        - name: Authorization
          in: header
          description: Authentication using Personal Access Token (PAT) token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Locations.Get.1.0.Location.OK.OneOfArray'
        '401':
          description: Authorization missing or invalid
          content:
            application/json:
              schema:
                description: Any type
        '403':
          description: The provided credentials are not authorized to access this resource
          content:
            application/json:
              schema:
                description: Any type
servers:
  - url: https://api.shipbob.com
  - url: https://sandbox-api.shipbob.com
components:
  schemas:
    Locations.FulfillmentCenterRegionViewModel:
      type: object
      properties:
        id:
          type: integer
          description: Unique Id for the location region
        name:
          type:
            - string
            - 'null'
          description: Name of the region the location is in.
      title: Locations.FulfillmentCenterRegionViewModel
    Locations.AddressViewModel:
      type: object
      properties:
        address1:
          type:
            - string
            - 'null'
          description: First part of the address of the location for this service
        address2:
          type:
            - string
            - 'null'
          description: Second part of the address of the location for this service
        city:
          type:
            - string
            - 'null'
          description: City of the location
        country:
          type:
            - string
            - 'null'
          description: Country of the location
        email:
          type:
            - string
            - 'null'
          description: Email of the location for this service
        name:
          type:
            - string
            - 'null'
          description: Name to use in the address of the location for this service
        phone_number:
          type:
            - string
            - 'null'
          description: Phone Number of the location for this service
        state:
          type:
            - string
            - 'null'
          description: State of the location
        zip_code:
          type:
            - string
            - 'null'
          description: Zip code of the location
      description: >-
        The service-specific address of the location. Each object contains
        address type, address1, address2, city, state, country, zip code, phone
        number, and email
      title: Locations.AddressViewModel
    Locations.ServiceTypeEnum:
      type: string
      enum:
        - Receiving
        - Returns
      title: Locations.ServiceTypeEnum
    Locations.ServiceViewModel:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/Locations.AddressViewModel'
        enabled:
          type: boolean
          description: >-
            Indicates if the user is authorized to access this service at the
            location
        service_type:
          $ref: '#/components/schemas/Locations.ServiceTypeEnum'
      title: Locations.ServiceViewModel
    Locations.LocationViewModel:
      type: object
      properties:
        abbreviation:
          type:
            - string
            - 'null'
          description: >-
            Abbreviation of the location. Combination of nearest Airport Code
            and the sequence number.
        access_granted:
          type: boolean
          description: >-
            Indicates whether or not the user is authorized to interact at all
            with the location
        attributes:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Available attributes for the location
        id:
          type: integer
          description: Id of the location in ShipBob’s database
        is_active:
          type: boolean
          description: Indicates if the location is operationally active or inactive
        is_receiving_enabled:
          type: boolean
          description: Indicates if the receiving is enabled for FC
        is_shipping_enabled:
          type: boolean
          description: Indicates if the shipping is enabled for FC
        name:
          type:
            - string
            - 'null'
          description: "Name of the location. Follows the naming convention City (State Code)\r\nfor domestic FCs and City (Country Code) for international FCs"
        region:
          $ref: '#/components/schemas/Locations.FulfillmentCenterRegionViewModel'
        services:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Locations.ServiceViewModel'
          description: Services provided by the location
        timezone:
          type:
            - string
            - 'null'
          description: Time zone of the location
      title: Locations.LocationViewModel
    Locations.FcAttributeViewModel:
      type: object
      properties:
        id:
          type: integer
          description: Unique Id for the fulfillment center attribute
        name:
          type:
            - string
            - 'null'
          description: Name of the attribute.
      title: Locations.FcAttributeViewModel
    Locations.FcTypeViewModel:
      type: object
      properties:
        id:
          type: integer
          description: Unique Id for the fulfillment center type
        name:
          type:
            - string
            - 'null'
          description: Name of the fc type
      title: Locations.FcTypeViewModel
    Locations.OrganizationRoleViewModel:
      type: object
      properties:
        description:
          type:
            - string
            - 'null'
        id:
          type: string
          format: uuid
        name:
          type:
            - string
            - 'null'
      title: Locations.OrganizationRoleViewModel
    Locations.FcTypeViewModelV2:
      type: object
      properties:
        id:
          type: integer
          description: Unique Id for the fulfillment center type
        name:
          type:
            - string
            - 'null'
          description: Name of the fc type
        organization_roles:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Locations.OrganizationRoleViewModel'
        organization_type_id:
          type: string
          format: uuid
        organization_type_name:
          type:
            - string
            - 'null'
      title: Locations.FcTypeViewModelV2
    LocationsInternalLocationViewModelFulfillmentCenterType:
      oneOf:
        - $ref: '#/components/schemas/Locations.FcTypeViewModel'
        - $ref: '#/components/schemas/Locations.FcTypeViewModelV2'
      title: LocationsInternalLocationViewModelFulfillmentCenterType
    Locations.InternalLocationViewModel:
      type: object
      properties:
        abbreviation:
          type:
            - string
            - 'null'
          description: >-
            Abbreviation of the location. Combination of nearest Airport Code
            and the sequence number.
        access_granted:
          type: boolean
          description: >-
            Indicates whether or not the user is authorized to interact at all
            with the location
        attributes:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Available attributes for the location
        id:
          type: integer
          description: Id of the location in ShipBob’s database
        is_active:
          type: boolean
          description: Indicates if the location is operationally active or inactive
        is_receiving_enabled:
          type: boolean
          description: Indicates if the receiving is enabled for FC
        is_shipping_enabled:
          type: boolean
          description: Indicates if the shipping is enabled for FC
        name:
          type:
            - string
            - 'null'
          description: "Name of the location. Follows the naming convention City (State Code)\r\nfor domestic FCs and City (Country Code) for international FCs"
        region:
          $ref: '#/components/schemas/Locations.FulfillmentCenterRegionViewModel'
        services:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Locations.ServiceViewModel'
          description: Services provided by the location
        timezone:
          type:
            - string
            - 'null'
          description: Time zone of the location
        fulfillment_center_attributes:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Locations.FcAttributeViewModel'
        fulfillment_center_type:
          oneOf:
            - $ref: >-
                #/components/schemas/LocationsInternalLocationViewModelFulfillmentCenterType
            - type: 'null'
        is_enabled_for_new_user:
          type: boolean
        is_external:
          type: boolean
      title: Locations.InternalLocationViewModel
    LocationsInternalLocationViewModelV2FulfillmentCenterType:
      oneOf:
        - $ref: '#/components/schemas/Locations.FcTypeViewModel'
        - $ref: '#/components/schemas/Locations.FcTypeViewModelV2'
      title: LocationsInternalLocationViewModelV2FulfillmentCenterType
    Locations.SortCenterViewModel:
      type: object
      properties:
        id:
          type: integer
          description: Unique Id for the fulfillment center
      title: Locations.SortCenterViewModel
    Locations.InternalLocationViewModelV2:
      type: object
      properties:
        abbreviation:
          type:
            - string
            - 'null'
          description: >-
            Abbreviation of the location. Combination of nearest Airport Code
            and the sequence number.
        access_granted:
          type: boolean
          description: >-
            Indicates whether or not the user is authorized to interact at all
            with the location
        attributes:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Available attributes for the location
        id:
          type: integer
          description: Id of the location in ShipBob’s database
        is_active:
          type: boolean
          description: Indicates if the location is operationally active or inactive
        is_receiving_enabled:
          type: boolean
          description: Indicates if the receiving is enabled for FC
        is_shipping_enabled:
          type: boolean
          description: Indicates if the shipping is enabled for FC
        name:
          type:
            - string
            - 'null'
          description: "Name of the location. Follows the naming convention City (State Code)\r\nfor domestic FCs and City (Country Code) for international FCs"
        region:
          $ref: '#/components/schemas/Locations.FulfillmentCenterRegionViewModel'
        services:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Locations.ServiceViewModel'
          description: Services provided by the location
        timezone:
          type:
            - string
            - 'null'
          description: Time zone of the location
        organization_id:
          type: string
          format: uuid
        owner_id:
          type:
            - string
            - 'null'
          format: uuid
        parent_id:
          type:
            - string
            - 'null'
          format: uuid
        fulfillment_center_attributes:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Locations.FcAttributeViewModel'
        fulfillment_center_type:
          oneOf:
            - $ref: >-
                #/components/schemas/LocationsInternalLocationViewModelV2FulfillmentCenterType
            - type: 'null'
        is_enabled_for_new_user:
          type: boolean
        sort_center:
          $ref: '#/components/schemas/Locations.SortCenterViewModel'
      title: Locations.InternalLocationViewModelV2
    Locations.LocationViewModelV2:
      type: object
      properties:
        abbreviation:
          type:
            - string
            - 'null'
          description: >-
            Abbreviation of the location. Combination of nearest Airport Code
            and the sequence number.
        access_granted:
          type: boolean
          description: >-
            Indicates whether or not the user is authorized to interact at all
            with the location
        attributes:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Available attributes for the location
        id:
          type: integer
          description: Id of the location in ShipBob’s database
        is_active:
          type: boolean
          description: Indicates if the location is operationally active or inactive
        is_receiving_enabled:
          type: boolean
          description: Indicates if the receiving is enabled for FC
        is_shipping_enabled:
          type: boolean
          description: Indicates if the shipping is enabled for FC
        name:
          type:
            - string
            - 'null'
          description: "Name of the location. Follows the naming convention City (State Code)\r\nfor domestic FCs and City (Country Code) for international FCs"
        region:
          $ref: '#/components/schemas/Locations.FulfillmentCenterRegionViewModel'
        services:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/Locations.ServiceViewModel'
          description: Services provided by the location
        timezone:
          type:
            - string
            - 'null'
          description: Time zone of the location
        organization_id:
          type: string
          format: uuid
        owner_id:
          type:
            - string
            - 'null'
          format: uuid
        parent_id:
          type:
            - string
            - 'null'
          format: uuid
      title: Locations.LocationViewModelV2
    LocationsGet10LocationOkOneOfArrayItems:
      oneOf:
        - $ref: '#/components/schemas/Locations.LocationViewModel'
        - $ref: '#/components/schemas/Locations.InternalLocationViewModel'
        - $ref: '#/components/schemas/Locations.InternalLocationViewModelV2'
        - $ref: '#/components/schemas/Locations.LocationViewModelV2'
      title: LocationsGet10LocationOkOneOfArrayItems
    Locations.Get.1.0.Location.OK.OneOfArray:
      type: array
      items:
        $ref: '#/components/schemas/LocationsGet10LocationOkOneOfArrayItems'
      title: Locations.Get.1.0.Location.OK.OneOfArray
  securitySchemes:
    PAT:
      type: http
      scheme: bearer
      description: Authentication using Personal Access Token (PAT) token
    OAuth2:
      type: http
      scheme: bearer
      description: OAuth2 authentication using JWT tokens

```

## SDK Code Examples

```python Locations_getLocations_example
import requests

url = "https://api.shipbob.com/2.0/location"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Locations_getLocations_example
const url = 'https://api.shipbob.com/2.0/location';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Locations_getLocations_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.shipbob.com/2.0/location"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Locations_getLocations_example
require 'uri'
require 'net/http'

url = URI("https://api.shipbob.com/2.0/location")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Locations_getLocations_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.shipbob.com/2.0/location")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Locations_getLocations_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.shipbob.com/2.0/location', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Locations_getLocations_example
using RestSharp;

var client = new RestClient("https://api.shipbob.com/2.0/location");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Locations_getLocations_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.shipbob.com/2.0/location")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```