Upload attachment

POST /api/attachment

Upload attachment to the storage and returns the attachment id to be used in other endpoints. The format of the request must be 'multipart/form-data', with that Content-Type and multipart body. Similar to the request generated by the following curl command: curl https://<domain>/api/attachment -F file=@attachment-file.png

Headers

  • Specify effective organization_id for Admin and Group Organization Admins. This is a global header for all endpoints only taken into consideration when it makes sense (it won't be used in Auth, for example)

Query parameters

  • type string

    type

    Values are DRIVER_LICENSE_PHOTO, DRIVER_PHOTO, EXTRA_FILE, GUEST_VEHICLE_PHOTO, TIRE_PHOTO, TRAILER_INSIDE_PHOTO, TRAILER_ISSUE_PHOTO, TRAILER_LEFT_PHOTO, TRAILER_RIGHT_PHOTO, TRAILER_SEAL_PHOTO, TRUCK_ISSUE_PHOTO, or TRUCK_PHOTO.

Responses

  • 201

    Created

    Hide response attributes Show response attributes object
    • id integer(int64)
    • name string
    • type string

      Values are DRIVER_LICENSE_PHOTO, DRIVER_PHOTO, EXTRA_FILE, GUEST_VEHICLE_PHOTO, TIRE_PHOTO, TRAILER_INSIDE_PHOTO, TRAILER_ISSUE_PHOTO, TRAILER_LEFT_PHOTO, TRAILER_RIGHT_PHOTO, TRAILER_SEAL_PHOTO, TRUCK_ISSUE_PHOTO, or TRUCK_PHOTO.

    • url string
  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Not Found

POST /api/attachment
curl \
 -X POST https://api-dev.gatego.io:443/api/attachment \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '"@file"'
Request example
# Headers

# Payload
"@file"
Response examples (201)
{
  "id": 42,
  "name": "string",
  "type": "DRIVER_LICENSE_PHOTO",
  "url": "string"
}