Invoices

Add attachments to a Invoice

Changed on

Beta: Breaking changes may occur without notice.

Stores files in Workiz and attaches them to the Invoice. Send either multipart/form-data with the files in the files field, or JSON with public URLs in attachments, which Workiz downloads during the request. Do not send both. The file type is taken from the file name or URL extension; for a URL without one, set type. URLs that resolve to private or internal network addresses are rejected. The request is all or nothing: if any file is invalid or cannot be downloaded, none are added.

post/v2/invoices/{id}/attachments

Request

Path parameters

idstring required
Example:IV-LwqGJnRwvZPaNe5E

The Invoice ID (prefix IV-).

Headers

Authorizationstring required
Example:Bearer <token>

Bearer Token

Request body

Example request

{
  "attachments": [
    {
      "fileUrl": "https://example.com/files/site-photo.jpg",
      "type": "pdf",
      "name": "site photo"
    }
  ]
}

Response

The created attachments.

idstring

The ID of the attachment (prefix FLE-).

namestring

The name of the attachment.

fileUrlstring

The URL of the attachment.

Example response

[
  {
    "id": "FLE-BA5r7o4bqzR9MONa",
    "name": "file.pdf",
    "fileUrl": "https://example.com/file.pdf"
  }
]

Changes