Delete Attachment

Changed on

Removes an attachment from a Sales Invoice. Once deleted the file no longer appears in the invoice's attachments array and its URL stops resolving. The invoice itself and its line items are unaffected. Retrieve the attachment_id from the Add Attachment response or from the data.attachments array returned by Retrieve a Sales Invoice Details.

delete/sales-invoices/{invoice_id}/attachments/{attachment_id}

Request

  • Base URL
    https://open-api.stag-v2.paper.id/api/v1
  • URL
    https://open-api.stag-v2.paper.id/api/v1/sales-invoices/{invoice_id}/attachments/{attachment_id}
  • Auth
    API key in header client_id and API key in header client_secret

Path parameters

invoice_idstring required

Unique identifier of the Sales Invoice that will receive the file. Returned by the Create Sales Invoice and List Sales Invoices endpoints.

attachment_idstring required

Unique identifier of the attachment to remove.

Headers

client_idstring required

Your Client ID credential

client_secretstring required

Your Client secret credential

Response

200

status_codeinteger

HTTP status of the operation.

messagestring

Human-readable outcome of the request.

Example response

{
  "status_code": 201,
  "data": {
    "document_id": "aad61dca-9be0-4663-9e9a-dd8d76c0b077",
    "attachment_id": "get.paper.id/21d1rdK"
  }
}

Changes