Skip to main content
When an expense nature requires a receipt (i.e. the receipt is mandatory), you must follow a three-step process to attach it. You cannot pass a file upload ID directly in the expenseReceipts array — doing so will result in a 403 Forbidden error.

Step 1 — Upload the file

First, upload the receipt file (image, PDF, etc.) using the Files API:
Save the returned id — this is your uploadId for the next step.

Step 2 — Create an ExpenseReceipt

Next, create an ExpenseReceipt resource by calling POST /api/v3/expenseReceipts. This step links the uploaded file to the Expenses module:
Save the returned id (here f0d01fd0-...) — this is the ExpenseReceipt ID you will reference in the expense.

Step 3 — Create the expense with the receipt attached

Finally, create the expense via POST /api/v3/expenseTempItems, referencing the ExpenseReceipt by its id:
Do not pass the file upload ID (from step 1) directly in expenseReceipts. You must create an ExpenseReceipt resource first (step 2) and reference that ID. Passing the upload ID directly will result in a 403 Forbidden error with the message: “Property Id of type CleemyFile is not writable”.

Summary