---
agentTools:
  projectIndex: https://developer-docs.gomotive.com/llms.txt
---

# List all the company dispatches

**Purpose**: Use this API to list all the available dispatch locations of your vendors. You must specify the ID of the dispatch location as well as the ID of the vendor to fetch a specific location. Otherwise, the API response will list all the available locations for your company.

## Response Parameters

### dispatch\_location

* **Type**: Object
* **Description**: The details of a dispatch location.

### id

* **Type**: Integer
* **Description**: The unique identifier for the dispatch location.

### vendor\_id

* **Type**: String
* **Description**: The identifier for the vendor associated with the dispatch location.

### lat

* **Type**: Integer
* **Description**: The latitude coordinate of the dispatch location.

### lon

* **Type**: Integer
* **Description**: The longitude coordinate of the dispatch location.

### name

* **Type**: String
* **Description**: The name of the dispatch location.

### address1

* **Type**: String
* **Description**: The primary address line for the dispatch location.

### address2

* **Type**: String
* **Description**: The secondary address line for the dispatch location.

### city

* **Type**: String
* **Description**: The city where the dispatch location is situated.

### state

* **Type**: String
* **Description**: The state where the dispatch location is situated.

### zip

* **Type**: String
* **Description**: The ZIP code of the dispatch location.

### country

* **Type**: String
* **Description**: The country where the dispatch location is situated.

### arrive\_radius

* **Type**: Integer
* **Description**: The radius (in meters) around the location where a vehicle is considered to have arrived.

### depart\_radius

* **Type**: Integer
* **Description**: The radius (in meters) around the location where a vehicle is considered to have departed.

### phone

* **Type**: String
* **Description**: The phone number associated with the dispatch location.

***

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Motive",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.gomotive.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/dispatch_locations": {
      "get": {
        "summary": "List all the company dispatches",
        "description": "",
        "operationId": "fetch-a-list-of-all-the-company-dispatches",
        "parameters": [
          {
            "name": "ids[]",
            "in": "query",
            "description": "Specify the IDs of the dispatch locations of the company.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "vendor_ids",
            "in": "query",
            "description": "Specify the IDs of the vendors from where the dispatch originates.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Denotes the number records to be shown per page.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "page_no",
            "in": "query",
            "description": "The current page number.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "List all the dispatch locations": {
                    "value": "   {\n  \"dispatch_locations\": [\n    {\n      \"dispatch_location\": {\n        \"id\": 2,\n        \"vendor_id\": \"DL1\",\n        \"lat\": 2,\n        \"lon\": 3,\n        \"name\": \"Office\",\n        \"address1\": \"350 Sansome St.\",\n        \"address2\": \"San Francisco\",\n        \"city\": \"San Francisco\",\n        \"state\": \"CA\",\n        \"zip\": \"94104\",\n        \"country\": \"US\",\n        \"arrive_radius\": 200,\n        \"depart_radius\": 200,\n        \"phone\": \"(650) 238-9293\"\n      }\n    },\n    {\n      \"dispatch_location\": {\n        \"id\": 2,\n        \"vendor_id\": \"DL2\",\n        \"name\": \"Some Location\",\n        \"lat\": 2,\n        \"lon\": 3,\n        \"address1\": \"320 Sansome St.\",\n        \"address2\": null,\n        \"city\": \"San Francisco\",\n        \"state\": \"CA\",\n        \"zip\": \"94104\",\n        \"country\": \"US\",\n        \"arrive_radius\": 200,\n        \"depart_radius\": 200,\n        \"phone\": null\n      }\n    }\n  ],\n  \"pagination\": {\n    \"per_page\": 25,\n    \"page_no\": 1,\n    \"total\": 2\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "dispatch_locations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dispatch_location": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 2,
                                "default": 0
                              },
                              "vendor_id": {
                                "type": "string",
                                "example": "DL1"
                              },
                              "lat": {
                                "type": "integer",
                                "example": 2,
                                "default": 0
                              },
                              "lon": {
                                "type": "integer",
                                "example": 3,
                                "default": 0
                              },
                              "name": {
                                "type": "string",
                                "example": "Office"
                              },
                              "address1": {
                                "type": "string",
                                "example": "350 Sansome St."
                              },
                              "address2": {
                                "type": "string",
                                "example": "San Francisco"
                              },
                              "city": {
                                "type": "string",
                                "example": "San Francisco"
                              },
                              "state": {
                                "type": "string",
                                "example": "CA"
                              },
                              "zip": {
                                "type": "string",
                                "example": "94104"
                              },
                              "country": {
                                "type": "string",
                                "example": "US"
                              },
                              "arrive_radius": {
                                "type": "integer",
                                "example": 200,
                                "default": 0
                              },
                              "depart_radius": {
                                "type": "integer",
                                "example": 200,
                                "default": 0
                              },
                              "phone": {
                                "type": "string",
                                "example": "(650) 238-9293"
                              }
                            }
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "per_page": {
                          "type": "integer",
                          "example": 25,
                          "default": 0
                        },
                        "page_no": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "total": {
                          "type": "integer",
                          "example": 2,
                          "default": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "66acf64a829e88001980fbf2:66cdc86acf6ddd001472f862"
}
```