> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alvys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get location

> Retrieve saved location records from Alvys, including shipper and consignee addresses, contact details, receiving hours, and geocoded coordinates.

The endpoint for retrieving **a single location** requires specifying the API **version** in the path and **one** identifier in the query: either `id` **or** `companyNumber`. For details on how versioning works, see the [Versioning](/docs/versioning) page.

### Request Parameters

**Path parameters**

| Parameter     | Type   | Required               | Description                                                          |
| ------------- | ------ | ---------------------- | -------------------------------------------------------------------- |
| version       | String | Yes                    | The API version to use.                                              |
| id            | String | Conditionally required | The unique Location ID. Required if `companyNumber` is not provided. |
| companyNumber | String | Conditionally required | The company number. Required if `id` is not provided.                |

> Exactly **one** of `id` or `companyNumber` must be provided.

#### Example cURL requests

Lookup by **id**:

```bash theme={null}
curl --location 'https://integrations.alvys.com/api/p/v1/locations?id=120f97b9-1aa2-4201-b1aa-24...' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
```

Lookup by **companyNumber**:

```bash theme={null}
curl --location 'https://integrations.alvys.com/api/p/v1/locations?companyNumber=MGD0012312345' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
```

### Response Parameters

| Parameter               | Type              | Description                                                                               |
| ----------------------- | ----------------- | ----------------------------------------------------------------------------------------- |
| Id                      | String            | Unique location identifier.                                                               |
| Name                    | String            | Location name.                                                                            |
| CompanyNumber           | String            | Company number for this location. This is provided when uploading files for that company. |
| Type                    | String            | Location type (e.g., Terminal, Shipper/Consignee, Cold Warehouse, Dry Warehouse).         |
| Status                  | String            | Location status (e.g., Active, Disabled, Inactive).                                       |
| PhysicalAddress         | Object            | Address block.                                                                            |
| PhysicalAddress.Street  | String            | Street line.                                                                              |
| PhysicalAddress.City    | String            | City.                                                                                     |
| PhysicalAddress.State   | String            | State/Province.                                                                           |
| PhysicalAddress.ZipCode | String            | ZIP/Postal code.                                                                          |
| Email                   | Array of String   | Email addresses.                                                                          |
| Phone                   | Array of String   | Phone numbers.                                                                            |
| Fax                     | String            | Fax number.                                                                               |
| DateCreated             | String (DateTime) | Creation timestamp (UTC).                                                                 |
| ExternalId              | String            | External reference ID (if any).                                                           |
| Notes                   | Array of Object   | Notes attached to the location.                                                           |
| Notes\[].id             | String            | Note identifier.                                                                          |
| Notes\[].Description    | String            | Note text.                                                                                |
| Notes\[].NoteType       | String            | Type/category of the note.                                                                |
| Notes\[].Time           | String (DateTime) | Timestamp of the note (UTC).                                                              |
| Notes\[].User           | String            | Author/user who added the note.                                                           |

#### Example Response

```json theme={null}
{
  "Id": "loc-45678",
  "Name": "Alvys Teminal Group LLC",
  "CompanyNumber": "LP-12345",
  "Type": "Terminal",
  "Status": "Active",
  "PhysicalAddress": {
    "Street": "001 Main St",
    "City": "Dallas",
    "State": "TX",
    "ZipCode": "70000"
  },
  "Email": ["terminal@acme.example"],
  "Phone": ["+1-214-555-0100"],
  "Fax": null,
  "DateCreated": "2025-09-08T16:01:26.908Z",
  "ExternalId": "EXT-001",
  "Notes": [
    {
      "id": "n-001",
      "Description": "24/7 gate access",
      "NoteType": "General",
      "Time": "2025-09-08T18:10:00Z",
      "User": "dispatch@acme.example"
    }
  ]
}
```

#### Rate Limits

All endpoints are subject to platform rate limits. See [Rate Limits](/docs/rate-limits).


## OpenAPI

````yaml GET /api/p/v{version}/locations
openapi: 3.0.1
info:
  title: Alvys
  description: >-
    Alvys provides a robust set of REST APIs to allow you to integrate Alvys
    into virtually any platform. These APIs cover most of Alvys' major product
    areas with additional endpoints being added regularly based on customer
    requests.
  contact:
    name: Alvys Support
    url: https://www.alvys.com/resources/contact/
  version: v1
servers:
  - url: https://integrations.alvys.com
    description: Public API Server
  - url: https://api.alvys.com/
    description: Public API Server
security:
  - Public: []
tags:
  - name: Authentication
    description: Obtain an OAuth 2.0 access token for the Alvys Public API.
  - name: Carrier Settlement Statements
    description: >-
      Search carrier settlement statements and retrieve a single statement by
      number.
  - name: Carriers
    description: Read carrier records, search carriers, and manage carrier documents.
  - name: Customers
    description: Create, read, update, delete, and search customer records.
  - name: Deductions
    description: >-
      Create one-time deductions and search or delete existing deduction
      records.
  - name: DispatchPreferences
    description: Dispatch preferences endpoints for reading dispatch rules and preferences.
  - name: Driver Settlement Statements
    description: >-
      Search driver settlement statements and retrieve a single statement by
      number.
  - name: Drivers
    description: >-
      Read driver records, search drivers and driver events, and manage driver
      documents.
  - name: Fuel
    description: Read and search fuel transactions.
  - name: Invoices
    description: >-
      Read invoices, create carrier invoices, and record carrier and customer
      payments.
  - name: Loads
    description: Read, update, search loads, and manage load documents and notes.
  - name: Locations
    description: Read and search company location details.
  - name: Maintenance
    description: Read and search maintenance records.
  - name: Tenders
    description: Create, accept, reject, cancel, update, and search inbound EDI tenders.
  - name: Tolls
    description: Read and search toll transactions.
  - name: Trailers
    description: Read trailers, search trailer events, and manage trailer documents.
  - name: Trips
    description: >-
      Read, search trips, manage trip documents, and record stop appointments,
      arrivals, and departures.
  - name: Trucks
    description: Read trucks, search truck events, and manage truck documents.
  - name: Users
    description: List and search users.
  - name: Visibility
    description: >-
      Read inbound and outbound visibility history and search outbound
      visibility errors.
  - name: Webhooks
    description: >-
      Create, read, update, delete, enable, disable, verify, test, and rotate
      secrets for webhook subscriptions; read event types, delivery logs, and
      health metrics.
paths:
  /api/p/v{version}/locations:
    get:
      tags:
        - Locations
      summary: Get location
      parameters:
        - name: id
          in: query
          schema:
            type: string
        - name: companyNumber
          in: query
          schema:
            type: string
        - name: version
          in: path
          description: API version (e.g., 1.0)
          required: true
          schema:
            type: string
            default: '1.0'
            example: '1.0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Alvys.Models.Locations.LocationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
        '429':
          description: Too Many Requests
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
      security:
        - Public: []
components:
  schemas:
    Alvys.Models.Locations.LocationResponse:
      required:
        - CompanyNumber
        - Email
        - Id
        - Name
        - Notes
        - Phone
        - Status
        - Type
      type: object
      properties:
        Id:
          type: string
        Name:
          type: string
        CompanyNumber:
          type: string
        Type:
          type: string
        Status:
          type: string
        PhysicalAddress:
          allOf:
            - $ref: '#/components/schemas/Alvys.Features.Locations.ShortAddress'
          nullable: true
        Email:
          type: array
          items:
            type: string
        Phone:
          type: array
          items:
            type: string
        Fax:
          type: string
          nullable: true
        DateCreated:
          type: string
          format: date-time
          nullable: true
        ExternalId:
          type: string
          nullable: true
        Notes:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Notes.NoteDto'
      additionalProperties: false
    Microsoft.AspNetCore.Mvc.ProblemDetails:
      type: object
      properties:
        Type:
          type: string
          nullable: true
        Title:
          type: string
          nullable: true
        Status:
          type: integer
          format: int32
          nullable: true
        Detail:
          type: string
          nullable: true
        Instance:
          type: string
          nullable: true
      additionalProperties: {}
    Alvys.Features.Locations.ShortAddress:
      required:
        - City
        - State
        - Street
        - ZipCode
      type: object
      properties:
        Street:
          type: string
        City:
          type: string
        State:
          type: string
        ZipCode:
          type: string
      additionalProperties: false
    Alvys.Models.Notes.NoteDto:
      required:
        - Description
        - id
        - NoteType
        - User
      type: object
      properties:
        id:
          type: string
        Description:
          type: string
        NoteType:
          type: string
        Time:
          type: string
          format: date-time
          nullable: true
        User:
          type: string
        UserId:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    Public:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        OAuth 2.0 client-credentials access token. Obtain one from
        https://auth.alvys.com/oauth/token (grant_type=client_credentials,
        audience=https://api.alvys.com/public/), then paste it here. The
        playground sends it as `Authorization: Bearer <token>`.

````