Invoices
Add attachments to a Invoice
Changed onBeta: 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
- Base URLhttps://api.workiz.com/crm/api
- Authnone declared. Required headers: Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
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.
Example response
[
{
"id": "FLE-BA5r7o4bqzR9MONa",
"name": "file.pdf",
"fileUrl": "https://example.com/file.pdf"
}
]Changes
- info
endpoint added
- info