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:id — this is your uploadId for the next step.
Step 2 — Create an ExpenseReceipt
Next, create anExpenseReceipt 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 viaPOST /api/v3/expenseTempItems, referencing the ExpenseReceipt by its id: