v1

latestOpenAPI 3.1.0Apache 2.02026-07-22160175414.0 KB
ExpenseTempItems

Create a new temporary expense

Create a new temporary-expense-item.

Attaching a receipt: if the expense nature requires a receipt, you must first upload the file via POST /lucca-files/api/uploads, then create an ExpenseReceipt via POST /api/v3/expenseReceipts, and finally reference the receipt's id in the expenseReceipts array. Do not pass the file upload ID directly — see the Attaching receipts guide for the full workflow.

post/api/v3/expenseTempItems

Request body

idinteger required
purchasedOnstring date required

Day the expense was made.

expenseNatureIdinteger required

Nature of the expense: Meals, Train, Taxi, Hotels, Taxi, Mileage... List depends on the app configuration.

quantityinteger required

The quantity when the expense type is 'Quantity'.

effectiveQuantityinteger

Calculated quantity when the expense type is 'Quantity' or 'Invitations' (number of attendees).

customFieldsobject nullable

Values for custom fields.

merchantstring nullable

Merchant of the expense.

commentstring nullable
ownerIdinteger required

Unique identifier of the user that made this expense.

paymentMethodId0 | 1 | 3 required

How this expense was made: the owner used his money, an enterprise debit card, or a Cleemy card:

  • 0: User
  • 1: CorporateCard
  • 3: Cleemy Card
deviceId'Web' required

Example request

{
  "expenseReceipts": [
    {
      "id": "f0d01fd0-5f27-4061-8dca-bee6318b0103",
      "originalReceipt": {
        "id": "cb0aae89-56c9-48db-9052-48981660e0f7",
        "name": "receipt-f0d01fd0-5f27-4061-8dca-bee6318b0103.pdf",
        "href": "https://example.ilucca.net/api/v3/ExpenseReceipts/f0d01fd0-5f27-4061-8dca-bee6318b0103/originalReceiptFile",
        "extension": ".pdf"
      },
      "receiptPreview": {
        "id": "cb0aae89-56c9-48db-9052-48981660e0f7",
        "name": "receipt-f0d01fd0-5f27-4061-8dca-bee6318b0103-preview.pdf",
        "href": "https://example.ilucca.net/api/v3/ExpenseReceipts/f0d01fd0-5f27-4061-8dca-bee6318b0103/receiptPreviewFile",
        "extension": ".pdf"
      }
    }
  ]
}

Response

OK

Example response

{
  "data": {
    "expenseReceipts": [
      {
        "id": "f0d01fd0-5f27-4061-8dca-bee6318b0103",
        "originalReceipt": {
          "id": "cb0aae89-56c9-48db-9052-48981660e0f7",
          "name": "receipt-f0d01fd0-5f27-4061-8dca-bee6318b0103.pdf",
          "href": "https://example.ilucca.net/api/v3/ExpenseReceipts/f0d01fd0-5f27-4061-8dca-bee6318b0103/originalReceiptFile",
          "extension": ".pdf"
        },
        "receiptPreview": {
          "id": "cb0aae89-56c9-48db-9052-48981660e0f7",
          "name": "receipt-f0d01fd0-5f27-4061-8dca-bee6318b0103-preview.pdf",
          "href": "https://example.ilucca.net/api/v3/ExpenseReceipts/f0d01fd0-5f27-4061-8dca-bee6318b0103/receiptPreviewFile",
          "extension": ".pdf"
        }
      }
    ]
  }
}