Delete an attachment of an order
DELETE
/orders/{orderId}/attachments/{attachmentId}
const url = 'https://acme.mykreezalid.com/front_api/v1/orders/4242/attachments/4243';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”orderId
required
integer
Identifier of the order.
Example
4242attachmentId
required
integer
Identifier of the attachment.
Example
4243Responses
Section titled “Responses”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"}