Skip to main content
POST
Create carrier invoice
This endpoint allows factoring or payment platforms to push carrier invoices directly into Alvys and associate them with the relevant trip. The request uses multipart/form-data and must contain exactly one file.

Path Parameters

Request Body

Content-Type: multipart/form-data

Example Request (cURL)


Responses

200 OK

Returns metadata for the uploaded carrier invoice attachment.

400 Bad Request

Returned when required fields are missing or the multipart request is invalid.

401 Unauthorized

Returned when authentication is missing or invalid.

403 Forbidden

Returned when access to this endpoint is not allowed.

404 Not Found

Returned when the specified TripId does not exist.

413 Content Too Large

Returned when the uploaded file exceeds the allowed size limit.

415 Unsupported Media Type

Returned when the uploaded file type is not supported.

Response Body


Example Response


Notes

  • The request must include exactly one file.
  • The uploaded document will be associated with the specified TripId.
  • This endpoint is typically used by factoring or payment platforms to submit carrier invoices programmatically.
  • Response schema uses the standard AttachmentResponse model.
  • Supports multipart/form-data upload only.
Example integration use case: Carriers upload invoices to a factoring/payment platform (e.g., EPay), which then pushes the invoice to Alvys via this endpoint so the invoice is attached to the relevant trip.

Validation Notes

PaymentType currently accepts any string value. If the provided value does not match a configured payment type, the system defaults to 30-day payment terms. Recommended improvement: The API should validate PaymentType against configured carrier payment terms and return 400 Bad Request when an invalid value is provided.

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

version
string
default:1.0
required

API version (e.g., 1.0)

Example:

"1.0"

Body

multipart/form-data
File
file
required
TripId
string
required
CarrierInvoiceNumber
string
PaymentType
string

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