Skip to content

Get an attachment of an order

GET
/orders/{orderId}/attachments/{attachmentId}
curl --request GET \
--url https://acme.mykreezalid.com/front_api/v1/orders/4242/attachments/4243 \
--header 'Authorization: Bearer <token>'

Returns one file attached to an order. The signed-in member must be the customer or the vendor of the order. Note the spelling of the response key: attachement.

orderId
required
integer

Identifier of the order.

Example

4242
attachmentId
required
integer

Identifier of the attachment.

Example

4243

The attachment.

Media typeapplication/json
object
attachement

A file attached to an order by its customer or its vendor.

object
id
integer
order_id
integer
createdBy

Identifier of the member who attached the file.

integer
updatedBy

Identifier of the member who last changed the attachment. Returned by the list and read operations only.

integer
nullable
name

Name given to the attachment.

string
nullable
type
string
Allowed values: USER_MANUAL WARRANTY CERTIFICATES DELIVERY_BILL CUSTOMER_INVOICE OTHER
url

Public link to the file.

string format: uri
filename

Name of the stored file.

string
created
string format: date-time
modified
string format: date-time

Example

{
"attachement": {
"id": 4242,
"order_id": 4243,
"createdBy": 4244,
"name": "Invoice October",
"type": "USER_MANUAL",
"filename": "6526f1a3b2c4d.pdf"
}
}

No signed-in member.

Media typeapplication/json

Error body returned by the Front API when it refuses a request.

object
code

HTTP status code, repeated in the body.

integer
status
string
message

Human-readable reason.

string

Example

{
"code": 403,
"status": "error",
"message": "Token not found in request"
}

The attachment does not exist on this order, or the signed-in member is neither the customer nor the vendor of the order.

Media typeapplication/json

Error body returned by the Front API when it refuses a request.

object
code

HTTP status code, repeated in the body.

integer
status
string
message

Human-readable reason.

string

Example

{
"code": 403,
"status": "error",
"message": "Token not found in request"
}