Order Attachments Model

ActionMethodResourceDescription
Get allGET/orders/:order_id/attachmentsGet all attachments with order_id.
GetGET/orders/:order_id/attachments/:attachment_idGet attachment with id order_id and attachment_id.
Create POST/orders/:order_id/attachmentsCreate a attachment with order_id.
Update PUT/orders/:order_id/attachments/:attachment_idUpdate attachment with order_id and attachment_id.
Delete DELETE/orders/:order_id/attachments/:attachment_idDelete attachment with order_id and attachment_id.

The order attachment model is composed of the following attributes:

AttributeTypeRequiredDescriptionWhereable
order_idintegerno, required to createThe attachment's order. (Order ID).No
user_idintegerno, required to createThe attachment's user. (User ID).Yes
typeintegerno, required to createThe attachment's type.Yes
notestringno, required if type 1The attachment's note.No
filebase64 image, url image or File imageno, required if type 2, 3 and 4The attachment's file.No

Attachment types

The type of attachment is used to differentiate them from each other. Notes, images or signatures.

Type numberType NameDescription
1NoteAttachment type 1 is used to add a note to an order in progress.
2ImageAttachment type 2 allows to add pictures or images to an order.
3First SignatureAttachment type 3 is an attachment with a signature this only can be added once. cannot be updated.
4Second SignatureAttachment type 4 is an attachment with a signature this only can be added once. cannot be updated.