Skip to main content
PATCH
Change trip document type
Change the type Alvys files a trip document under. This is the endpoint to use when a driver uploads paperwork that arrives without a real type (it lands as Unclassified) and something downstream — a person or a workflow that classifies the file — needs to write the right type back. The document keeps its id, its file and its download link. Only the type changes, and the change is recorded in the trip’s document history.

Request Parameters

Request Body

Allowed document types

  • Proof of Delivery
  • Bill of Lading
  • Carrier Rate Confirmation
  • Load Manifest
  • Trip Report
  • Temp. Log
  • Proof of Pickup
  • Scale Ticket
  • Notice of Assignment
  • NOA
  • Shipping Labels
  • Receipt
Anything outside this list returns 400. The list is the same one Upload trip document accepts, so you cannot reach a type by changing a document that you could not have uploaded in the first place. Driver photo types such as Seal, Trailer Photo, Load Securement and Temperature Settings are not on the list, so a document cannot be filed under those through the API.

Documents that cannot be changed

A Carrier Invoice is refused with 422. The carrier invoice number and payment terms are held on the document itself, and changing its type would discard them.

Trips that share a load

A load can have several trips, and List trip documents can return a document that belongs to one of the sibling trips. Changing one of those returns 409, naming the trip that owns it — re-send the request against that trip. A document on another load returns 404.

Example cURL Request

Example Response (200 OK)

The updated document.

Errors

Repeat calls

Calling this endpoint again is not free. Each call re-runs the change, and setting a document to Proof of Delivery sends it to the customer’s visibility integration every time. Call it once per classification, and only when the type is actually changing.

Rate Limits

All endpoints are subject to rate limits to protect the API from traffic spikes. For detailed information, see the Rate Limits section.

Try It Out

This page is interactive, allowing you to try a request by specifying the API version, tripId and documentId in the URL path. ⚠️ Don’t forget: make sure to authorize yourself before trying a request.

Authorizations

Authorization
string
header
required

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>.

Path Parameters

tripId
string
required
documentId
string
required
version
string
default:1.0
required

API version (e.g., 1.0)

Example:

"1.0"

Body

DocumentType
string
required

The document type to set. Must be one the endpoint's parent accepts, spelled exactly as listed in the endpoint description. Matched without case sensitivity and stored in Alvys' own casing.

Minimum string length: 1

Response

OK

id
string
required
AttachmentPath
string
required
AttachmentType
string
required
ParentId
string
required
ParentType
string
required
AttachmentSize
integer<int64> | null
UploadedAt
string<date-time> | null
UploadedBy
string | null
DownloadUrl
string | null
ExpiresAt
string<date-time> | null