Loads
Change load document type
Change the document type of a file already attached to a load, for example after classifying an upload that arrived without the right type.
PATCH
Change load document type
Change the type Alvys files a load document under. Use it when a document was uploaded with the wrong type, or when a workflow classifies a file after it was attached and needs to write that classification back.
The document keeps its id, its file and its download link. Only the type changes, and the change is recorded in the load’s document history.
Which documents belong here
Only the load’s own documents. List load documents also returns the documents of the load’s trips, so checkParentType on the row first:
Sending a trip document here returns
404.
Request Parameters
Request Body
Allowed document types
- Customer Rate and Load Confirmation
- Customer Load Confirmation
- Customer Rate Confirmation
- Signed Customer Rate Confirmation
- Proof of Delivery
- Proof of Pickup
- Bill of Lading
- Shipping Labels
400. The list is the same one Upload load document accepts, so you cannot reach a type by changing a document that you could not have uploaded in the first place.
Documents that cannot be changed
Invoice documents are refused with422. Alvys billing, factoring and settlement look these up by their type, so changing one would quietly detach it from the invoice it belongs to, and the type cannot be set back through this API.
This covers Invoice, Customer Invoice, Supplemental Invoice, Summary Invoice, Summary Excel, Merged, Merged Invoice and Carrier Invoice.
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, loadNumber and documentId in the URL path. ⚠️ Don’t forget: make sure to authorize yourself before trying a request.Authorizations
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
API version (e.g., 2.0)
Example:
"1.0"
Body
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