Step 3 of 3. Links a file already uploaded to Amazon S3 in step 2 to an existing AP transaction.
Attachments must be enabled for the organization; if they are not, this endpoint returns 403.
Attaching a file to an existing AP transaction takes three calls. Only the first and third are Restaurant365 endpoints; the second is a direct upload to Amazon S3 using a URL the first call returns.
Generate Upload URL — POST /public/v1/accounting/accounts-payable/attachments/upload-url
Upload File to S3 — upload the file from your device to the returned URL
Register Attachment — POST /public/v1/accounting/accounts-payable/attachments
Supported AP transaction types are invoices, credit memos and payments. The transaction must already exist; attaching a file is a separate operation from creating the transaction.
Identifies the R365 tenant the request applies to. Required on every request.
The identifier of the existing AP transaction to attach the file to. This endpoint is not scoped by URL path — the transaction is identified by this field, and its type by formName.
The type of AP transaction being attached to.
The storage file name returned by step 1. Must be the value from that response, not your original file name.
The original file name, including extension, as it should be displayed to users in Restaurant365.
The MIME content type of the uploaded file. Use the same value sent in step 1.
The kind of upload.
The identifier of the user the attachment is recorded against.
Optional source or origin of the upload.
The attachment was registered successfully.
The identifier of the newly registered attachment.
The name of the attachment, if set.
Bad Request — a parameter value is malformed, of the wrong type, or outside its allowed range.
Unauthorized — the bearer token is missing, invalid or expired, or is not valid for the specified tenant.
Forbidden — the caller lacks the permission required for this operation, or attachments are not enabled for this organization.
Not Found — no AP transaction exists with the specified formId, or it is not of the type given by formName.
Conflict — the request conflicts with the current state of the resource and cannot be applied.
Unprocessable Entity — a required parameter is missing, or a supplied parameter value is invalid.
Too Many Requests — the caller has exceeded the rate limit; retry after a short delay.
Internal Server Error — an unexpected error occurred while processing the request.