> ## 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 outbound visibility history

> Retrieve the outbound visibility update history for a load by load number, listing every position ping and status event Alvys pushed to customer platforms.

This endpoint provides access to outbound updates for a specific load by using the `loadNumber` and `version` in your request. To use outbound visibility, customers must first set up an EDI integration in EDI Tenders. Auto-updates can be configured either in EDI Tenders or on the Company Details page within Alvys platform. Based on the configured auto-updates settings, the updates are shared automatically, including event type details, location, date shared, and the error details if any issues encountered. For more information on how versioning works and how to include it in your requests, please refer to the [Versioning](/docs/versioning) page.

### Request Parameters

The following parameters are required in the URL:

| Parameter  | Type   | Required | Description                                          |
| ---------- | ------ | -------- | ---------------------------------------------------- |
| version    | String | Yes      | The API version you are using (e.g., "v1").          |
| loadNumber | String | Yes      | The unique number assigned to the load for tracking. |

#### Example CURL Request

```bash theme={null}
curl --location 'https://integrations.alvys.com/api/p/v1/visibility/outbound/12345/history' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
```

Replace `YOUR_ACCESS_TOKEN` with your actual Bearer token and `12345` with the load number you wish to track.

### Response Fields

The following fields are included in the response:

| Field                 | Type               | Description                                                                                                                    |
| --------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| Id                    | String             | The unique identifier of the outbound update.                                                                                  |
| ExternalId            | String             | The external ID related to the update.                                                                                         |
| TripNumber            | String             | The trip number linked to the load.                                                                                            |
| LoadNumber            | String             | The load number for which the update is recorded.                                                                              |
| EventType             | String             | The type of event, typically "Location".                                                                                       |
| SharedAt              | String (Date-Time) | The date and time when the update was shared.                                                                                  |
| Destination           | String             | The destination of the load.                                                                                                   |
| TruckNumber           | String             | The number of the truck transporting the load.                                                                                 |
| DriverName            | String             | The name of the driver.                                                                                                        |
| TrailerNumber         | String             | The number of the trailer being used.                                                                                          |
| StopId                | String             | The ID of the stop associated with the update.                                                                                 |
| LocationId            | String             | The ID of the location related to the update.                                                                                  |
| SharedBy              | String             | The entity (user or system) that shared the update.                                                                            |
| Reason                | String             | The reason for the update, if provided.  There is defined list on system, depending on integration. E.g.: "AY" - Missed Pickup |
| Address               | Object             | The address details of the location update.                                                                                    |
| Address.Street        | String             | The street of the location.                                                                                                    |
| Address.City          | String             | The city of the location.                                                                                                      |
| Address.State         | String             | The state of the location.                                                                                                     |
| Address.ZipCode       | String             | The postal code of the location.                                                                                               |
| Coordinates           | Object             | The geographic coordinates of the location.                                                                                    |
| Coordinates.Latitude  | String             | The latitude of the location.                                                                                                  |
| Coordinates.Longitude | String             | The longitude of the location.                                                                                                 |
| Status                | String             | The status of the update (e.g., "Completed", "Failed").                                                                        |
| Error                 | String             | Any error message, if the update could not be processed.                                                                       |

#### Example Response

```json theme={null}
[
  {
    "Id": "9b834b4c77124b8f8f0d97b56b7dabc4",
    "ExternalId": "EXT-002",
    "TripNumber": "TRIP54321",
    "LoadNumber": "LOAD54321",
    "EventType": "Location",
    "SharedAt": "2024-11-11T15:06:23.767Z",
    "Destination": "New York, NY",
    "TruckNumber": "TRK12345",
    "DriverName": "Jane Doe",
    "TrailerNumber": "TRL54321",
    "StopId": "STOP002",
    "LocationId": "LOC002",
    "SharedBy": "EDI System",
    "Reason": "AY", //MP - Missed Pickup
    "Address": {
      "Street": "456 Elm St",
      "City": "New York",
      "State": "NY",
      "ZipCode": "10001"
    },
    "Coordinates": {
      "Latitude": "40.712776",
      "Longitude": "-74.005974"
    },
    "Status": "Completed",
    "Error": ""
  }
]
```

### Rate Limits

All endpoints are subject to rate limits to protect the API from traffic spikes. For detailed information on rate limits, please refer to the [Rate Limits](/docs/rate-limits) section.

This page is interactive, allowing you to try a request by completing the fields for the parameters below. As you fill out the parameters, the CURL command on the right side of the page will be automatically updated. Alternatively, you can fork our [Public API Postman Collection](https://app.getpostman.com/run-collection/39138316-54c493c3-15e5-4fd7-a651-6e45b308548f?action=collection%2Ffork\&source=rip_markdown\&collection-url=entityId%3D39138316-54c493c3-15e5-4fd7-a651-6e45b308548f%26entityType%3Dcollection%26workspaceId%3Dc0255544-5964-4c52-9d24-05b30a9b021c) directly. Make sure to authorize yourself before trying a request.


## OpenAPI

````yaml GET /api/p/v{version}/visibility/outbound/{loadNumber}/history
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}/visibility/outbound/{loadNumber}/history:
    get:
      tags:
        - Visibility
      summary: Get outbound visibility history
      parameters:
        - name: loadNumber
          in: path
          required: true
          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:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/Alvys.Models.Visibility.VisibilityHistoryResponse
        '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.Visibility.VisibilityHistoryResponse:
      required:
        - Destination
        - EventType
        - Id
        - SharedAt
        - Status
      type: object
      properties:
        Id:
          type: string
        ExternalId:
          type: string
          nullable: true
        TripNumber:
          type: string
          nullable: true
        LoadNumber:
          type: string
          nullable: true
        EventType:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Features.VisibilityServices.New.VisibilityEventType
        SharedAt:
          type: string
          format: date-time
        Destination:
          type: string
        TruckNumber:
          type: string
          nullable: true
        DriverName:
          type: string
          nullable: true
        TrailerNumber:
          type: string
          nullable: true
        StopId:
          type: string
          nullable: true
        LocationId:
          type: string
          nullable: true
        SharedBy:
          type: string
          nullable: true
        Reason:
          type: string
          nullable: true
        Address:
          allOf:
            - $ref: '#/components/schemas/Alvys.Features.Locations.ShortAddress'
          nullable: true
        Coordinates:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Coordinates'
          nullable: true
        Status:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Features.VisibilityServices.New.OutboundMessageStatus
        Error:
          type: string
          nullable: true
      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.VisibilityServices.New.VisibilityEventType:
      enum:
        - Location
        - Arrival
        - Departure
        - Appointment
        - Loading
        - Unloading
        - ShipmentDelayed
        - ShipmentReconsigned
        - EstimatedDelivery
        - DeliveryNotCompleted
        - DocumentsUpload
        - ArrivedAtCustoms
        - CustomsReleased
      type: string
    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.Coordinates:
      required:
        - Latitude
        - Longitude
      type: object
      properties:
        Latitude:
          type: string
        Longitude:
          type: string
      additionalProperties: false
    Alvys.Features.VisibilityServices.New.OutboundMessageStatus:
      enum:
        - Completed
        - Active
        - Cancelled
        - Failed
      type: string
  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>`.

````