Upload 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
BILL_OF_LADING_PHOTO
,DRIVER_LICENSE_PHOTO
,DRIVER_PHOTO
,DRIVER_SAFETY_CARD_PHOTO
,EXTRA_FILE
,GUEST_VEHICLE_PHOTO
,LICENSE_PLATE_PHOTO
,REAR_TRAILER_PHOTO
,TIRE_PHOTO
,TRAILER_INSIDE_PHOTO
,TRAILER_ISSUE_PHOTO
,TRAILER_LEFT_PHOTO
,TRAILER_RIGHT_PHOTO
,TRAILER_SEAL_PHOTO
,TRUCK_CARRIER_INFO_PHOTO
,TRUCK_ISSUE_PHOTO
,TRUCK_PHOTO
,VISITOR_PERSON_PHOTO
, orWASH_OUT_SLIP_PHOTO
.
Body
Body
curl \
-X POST http://localhost:8080/api/attachment \
-H "Content-Type: application/json" \
-d '"@file"'
curl \
-X POST http://localhost:8080/api/attachment \
-H "Content-Type: application/octet-stream"
# Headers
# Payload
@file
{
"id": 42,
"name": "string",
"type": "BILL_OF_LADING_PHOTO",
"url": "string"
}