Attachment GET
The Attachment Get API allows you to get the list of attachments for the requested entity from WMS. The API supports both entity by ID and entity by filters.
API
POST.../attachment/get/
Query String Parameters
Name | Required | Description |
---|---|---|
company_id | X | This is required for all entities |
facility_id | C | This is required only for facility level entities – Inbound LPN, Inbound Shipment, Outbound LPN, Outbound Load and Pallet. Not required for LPN Type |
entity | X | Represents the entity - IBLPN, IBSHIPMENT, OBLPN, LPNTYPE, OBLOAD, PALLET for which the request is being made. |
entity_id | O | Represents the unique ID of the entity, such as Container ID, IB Shipment ID. If entity_key is not populated, this field has to be populated |
entity_key | O | Represents the nbr or code of the entity such Container Nbr, Shipment Nbr, LPN Type Code. If entity_id is not populated, this field has to be populated |
Where X = Required; C = Conditional and O = Optional
Response
The response contains paginated results with the following fields:
- attachment_id - Unique ID of the attachment
- attachment_name - Name of the attachment
- attachment_data – Based 64 encoded attachment data
- delete_permission - A boolean value (True or False) that indicates if the
requesting user has delete permission for the requested entity
- If entity is IBLPN or OBLPN, the value of "container / Delete Files" permission is returned for the requesting user
- If entity is LPNTYPE, the value of "LPN Type / Delete Files" permission is returned for the requesting user
- If entity is IBSHIPMENT, the value of "ib shipment / Delete Files" permission is returned for the requesting user
- If entity is OBLOAD, the value of "load / Delete Files" permission is returned for the requesting user
- If entity is PALLET, the value of "Pallet / Delete Files" permission is returned for the requesting user
Example Requests
Entity by ID
GET.../attachment/get?company_id=354&facility_id=572&entity=IBLPN&entity_id=12345
(where entity id is the ID of the container)
Entity by Filters
GET.../attachment/get?company_id=354&facility_id=572&entity=IBLPN&entity_key=LPN123
(where entity key is the container nbr)
Example Response
{
"result_count": 2,
"page_count": 1,
"page_nbr": 1,
"next_page": null,
"previous_page": null,
"results": [
{
"attachment_id": "1234567890",
"attachment_name": "IBLPN_LPN123_01242024090005.jpg",
"attachment_data": "data:@file/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/…", (base64 encoded)
"delete_permission": "true"
},
{
"attachment_id": "5723497522",
"attachment_name": " IBLPN_LPN123_01242024091017.docx",
"attachment_data": "data:@file/vnd.openxmlformats-officedocument.wordprocessingml.document;base64,UEsDBBQABgAIAGCnNFWaPJ7…", (base64 encoded)
"delete_permission": "true"
}
]
}