Skip to content

Delete an attachment of an order

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

Deletes one file attached to an order. The signed-in member must be the customer or the vendor of the order; either of them can delete any attachment of the order.

orderId
required
integer

Identifier of the order.

Example

4242
attachmentId
required
integer

Identifier of the attachment.

Example

4243

The attachment is deleted.

Media typeapplication/json
object
code
integer
status
string
message
string

Example

{
"code": 200,
"status": "success",
"message": "Attachment deleted successfully"
}

No signed-in member, or the attachment could not be deleted.

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"
}