> ## Documentation Index
> Fetch the complete documentation index at: https://developer.findity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Approvals

> List the reports waiting for an approver, show the approval guidance for each expense, and approve or reject reports one at a time or in bulk.

This guide covers the approver's side of the expense flow. Employees submit reports (see [Expense reports](https://developer.findity.com/docs/expense-reports.md)), Findity routes each report to its approvers according to the organization's approval setup (see [Approval structures](https://developer.findity.com/docs/approval-structures.md)), and you'll build the approver's view: find the reports waiting for the approver, show the Compliance Agent's verdict next to each expense, and send the approver's decision back.

## Overview

An **approver** is a user who reviews expense reports for an organization. When an employee submits a report, Findity puts it in the **approval list** of each approver on the report's **approval chain**: the approval step that report is in. The approver opens the report, checks its expenses, and then either approves the report or rejects one or more expenses with a comment.

Where approval guidance is switched on for the organization, the **Compliance Agent** checks every expense before the approver opens it. It marks each expense **Ready for approval** or **Needs review**, with the reasons, such as an invalid receipt photo or an amount far above what the organization usually approves. The guidance is a recommendation: the approver still makes the decision.

**Bulk approval** lets the approver approve several reports in one action, for example all reports marked Ready for approval. In the API, you send the approvals together in one bulk request.

The steps follow that job: find the reports, show the guidance, open an expense, decide on one report, then decide on several.

## Prerequisites

1. **Approval is set up for the organization**, with your approver on it. An organization admin or your provisioning sets this up with the Admin API. See [Getting started with the Admin API](https://developer.findity.com/docs/getting-started-with-admin-api.md), Step 6, and [Approval structures](https://developer.findity.com/docs/approval-structures.md).
2. **A user access token for the approver.** Every request in this guide acts as the approver, so it needs a user-scoped token from the authorization grant flow, not a `client_credentials` token. See [Authentication](https://developer.findity.com/docs/accessing.md). Requesting codes for other users needs a permission on your API key that Findity grants.
3. **The approver can approve in the organization.** `meta.permissions.canApprove` is `true` on the organization returned by `GET /me/organizations/{organizationId}?include=meta.permissions`.
4. **Approval guidance is switched on for the organization** (only needed for Step 2 and Step 3). Findity switches it on per organization; it can't be switched on through the API. It is off when AI features are switched off for the organization. Without it, everything else in this guide works, and the responses carry no guidance.

> [!WARNING]
>
> Request the approver's authorization code with their **person id** as `user_id`. The user `id` that the Admin API returns when you create a user is a different id, and the authorization grant rejects it with `400 invalid_request` ("invalid user\_id"). Read the person id from `person.id` on the user, as described in [Getting started with the Admin API](https://developer.findity.com/docs/getting-started-with-admin-api.md), Step 6.

## Key concepts

<table>
  <colgroup>
    <col width="197" />

    <col width="523" />
  </colgroup>

  <thead>
    <tr>
      <th>Concept</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>**Approval list**</td>
      <td>The reports waiting for the signed-in approver in one organization. Reports leave the list once the approver has approved or rejected them.</td>
    </tr>

    <tr>
      <td>**`approvalChainId`**</td>
      <td>Identifies the approval step the approver acts in on a report. It is a short numeric string, such as `"220451"`, not a 32-character id. Every approve or reject call needs it.</td>
    </tr>

    <tr>
      <td>**`approvalInstanceStatus`**</td>
      <td>The status of the approver's own step on the report: `APPROVAL` (waiting), `APPROVED`, `AUTO_APPROVED` or `REJECTED`.</td>
    </tr>

    <tr>
      <td>**Approval guidance**</td>
      <td>The Compliance Agent's verdict on an expense: Ready for approval, Needs review, or not checked yet. It comes as labels, as data in `meta.autoApproval`, and as a ready-made field in the expense's approval fields.</td>
    </tr>

    <tr>
      <td>**Reason**</td>
      <td>One check behind a verdict, such as `NOT_VALID_RECEIPT`, with a `description` in the approver's language.</td>
    </tr>

    <tr>
      <td>**Bulk request**</td>
      <td>One `POST /bulk` call that runs up to 50 calls to the same endpoint, such as several approvals.</td>
    </tr>
  </tbody>
</table>

## API endpoints

All endpoints use the Expense API base URL. Examples in this guide use the **stage** environment. Switch to the production host (`https://api.findity.com/api/v1/expense`) only when you're ready to go live.

```text theme={"system"}
https://stage-api.findity.com/api/v1/expense
```

<table>
  <colgroup>
    <col width="263" />

    <col width="100" />

    <col width="349" />
  </colgroup>

  <thead>
    <tr>
      <th>Operation</th>
      <th>Method</th>
      <th>Endpoint</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>List reports waiting for approval</td>
      <td>`GET`</td>
      <td>`/me/organizations/{organizationId}/approvals`</td>
    </tr>

    <tr>
      <td>Get an expense's approval fields</td>
      <td>`GET`</td>
      <td>`/me/organizations/{organizationId}/approvals/expense/{expenseId}/fields`</td>
    </tr>

    <tr>
      <td>Approve or reject a report</td>
      <td>`PUT`</td>
      <td>`/me/organizations/{organizationId}/approvals/{expenseReportId}`</td>
    </tr>

    <tr>
      <td>Approve several reports</td>
      <td>`POST`</td>
      <td>`/bulk`</td>
    </tr>
  </tbody>
</table>

### Required headers

<table>
  <colgroup>
    <col width="133" />

    <col width="569" />
  </colgroup>

  <thead>
    <tr>
      <th>Header</th>
      <th>Value</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`Content-Type`</td>
      <td>`application/json` (on `PUT` and `POST`)</td>
    </tr>

    <tr>
      <td>`Authorization`</td>
      <td>`Bearer {access_token}` (the approver's user access token)</td>
    </tr>
  </tbody>
</table>

## Step 1 — Find the reports waiting for the approver

Start by listing the approver's queue. Each report in it carries the `approvalChainId` that the approve and reject calls need, and, with the right `include` values, the guidance for the report and for each expense.

`GET /me/organizations/{organizationId}/approvals`

### Query parameters

<table>
  <colgroup>
    <col width="102" />

    <col width="100" />

    <col width="185" />

    <col width="325" />
  </colgroup>

  <thead>
    <tr>
      <th>Parameter</th>
      <th>Type</th>
      <th>Default</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`include`</td>
      <td>string</td>
      <td>none</td>
      <td>Comma-separated extra sections. For this guide: `meta.abbreviation`, `expenseRecords.meta.abbreviation` and `expenseRecords.meta.autoApproval`.</td>
    </tr>

    <tr>
      <td>`statuses`</td>
      <td>string</td>
      <td>reports waiting for the approver</td>
      <td>Comma-separated `approvalInstanceStatus` values, such as `APPROVED,REJECTED`, to list reports the approver has already handled.</td>
    </tr>

    <tr>
      <td>`max`</td>
      <td>integer</td>
      <td>`10`</td>
      <td>Page size, `1` to `1000`.</td>
    </tr>

    <tr>
      <td>`offset`</td>
      <td>integer</td>
      <td>`0`</td>
      <td>Number of reports to skip.</td>
    </tr>
  </tbody>
</table>

The list is paginated: `meta.total` is the number of matching reports and `meta.count` the number on this page. Page through with `offset` until you have `meta.total` reports.

```sh cURL theme={"system"}
curl -X GET \
  "https://stage-api.findity.com/api/v1/expense/me/organizations/d238c3f4555c48f697375af96cd49196/approvals?include=meta.abbreviation,expenseRecords.meta.abbreviation,expenseRecords.meta.autoApproval" \
  -H "Authorization: Bearer {access_token}"
```

This lists the reports waiting for the approver, with display values and labels for each report and each expense, and the Agent's verdict for each expense.

**Example response** (status `200 OK`, one report shown, trimmed to the fields this guide uses)

```json JSON theme={"system"}
{
  "meta": { "total": 5, "count": 5 },
  "data": [
    {
      "id": "9c245d136dcb4e4c959ded57085ce3e8",
      "name": "Sales conference Stockholm",
      "status": "APPROVAL",
      "processStatus": "PROCESSING",
      "reimbursement": 1570.0,
      "reimbursementCurrency": "SEK",
      "approvalChainId": "220451",
      "approvalInstanceStatus": "APPROVAL",
      "meta": {
        "abbreviation": {
          "userDescription": "Sales conference Stockholm",
          "reimbursementDescription": "1 570,00 SEK",
          "labels": [
            {
              "property": "label.autoApproval",
              "text": "Needs review",
              "priority": "NORMAL",
              "type": "WARNING",
              "iconUrl": "https://stage-api.findity.com/api/images/icons/ic_ai_sparkles.svg"
            },
            {
              "property": "label.expenseType",
              "text": "Report: 2 expenses",
              "priority": "NORMAL",
              "type": "NORMAL",
              "iconUrl": "https://stage-api.findity.com/api/images/ic_report.svg"
            }
          ]
        },
        "requirements": {
          "approval": { "requireNextStepApprovers": false }
        }
      },
      "expenseRecords": [
        {
          "id": "004a5280ee964e488ddfe2c1cf063a92",
          "reimbursement": 1250.0,
          "reimbursementCurrency": "SEK",
          "meta": {
            "abbreviation": {
              "userDescription": "Dinner after conference",
              "reimbursementDescription": "1 250,00 SEK",
              "labels": [
                {
                  "property": "label.expenseType",
                  "text": "Expense",
                  "priority": "NORMAL",
                  "type": "NORMAL",
                  "iconUrl": "https://stage-api.findity.com/api/resources/8ab28c4e8d5acac0018d5ad37c530002"
                },
                {
                  "property": "label.autoApproval",
                  "text": "Needs review",
                  "priority": "NORMAL",
                  "type": "WARNING",
                  "iconUrl": "https://stage-api.findity.com/api/images/icons/ic_ai_sparkles.svg"
                }
              ]
            },
            "autoApproval": {
              "status": "REJECTED",
              "rejectReasons": [
                {
                  "reason": "NOT_VALID_RECEIPT",
                  "description": "Expense without valid receipt photo."
                }
              ]
            }
          }
        },
        {
          "id": "a51fd4b1c8bb4c6da9c7beff1e723d7e",
          "reimbursement": 320.0,
          "reimbursementCurrency": "SEK",
          "meta": {
            "abbreviation": {
              "userDescription": "Taxi to conference",
              "reimbursementDescription": "320,00 SEK",
              "labels": [
                {
                  "property": "label.expenseType",
                  "text": "Expense",
                  "priority": "NORMAL",
                  "type": "NORMAL",
                  "iconUrl": "https://stage-api.findity.com/api/resources/8ab28c4e8d5acac0018d5ad37c530002"
                },
                {
                  "property": "label.autoApproval",
                  "text": "Needs review",
                  "priority": "NORMAL",
                  "type": "WARNING",
                  "iconUrl": "https://stage-api.findity.com/api/images/icons/ic_ai_sparkles.svg"
                }
              ]
            },
            "autoApproval": {
              "status": "REJECTED",
              "rejectReasons": [
                {
                  "reason": "NOT_VALID_RECEIPT",
                  "description": "Expense without valid receipt photo."
                }
              ]
            }
          }
        }
      ]
    }
  ]
}
```

Keep each report's `id` and `approvalChainId`: Step 4 and Step 5 need both. `meta.requirements.approval.requireNextStepApprovers` tells you whether the approver must choose the next step's approvers when approving (see Step 4).

## Step 2 — Show the approval guidance

Show the verdict where the approver decides: in the approval list and next to each expense. The response from Step 1 carries it in two forms.

**Labels.** With `meta.abbreviation`, a report carries a label whose `property` is `label.autoApproval`. An expense carries the same label only when you request both `expenseRecords.meta.abbreviation` and `expenseRecords.meta.autoApproval`. Show the label's `text`, style it by `type`, and show the icon from `iconUrl` to make clear the label comes from the Agent.

<table>
  <colgroup>
    <col width="325" />

    <col width="165" />

    <col width="236" />
  </colgroup>

  <thead>
    <tr>
      <th>Verdict</th>
      <th>`text`</th>
      <th>`type`</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Ready for approval</td>
      <td>`Ready for approval`</td>
      <td>`SUCCESS`</td>
    </tr>

    <tr>
      <td>Ready, and the approver has auto approval switched on</td>
      <td>`Auto-approved`</td>
      <td>`SUCCESS`</td>
    </tr>

    <tr>
      <td>Needs review</td>
      <td>`Needs review`</td>
      <td>`WARNING`</td>
    </tr>
  </tbody>
</table>

A report is Ready for approval only when all its expenses are, and Needs review when at least one expense needs review. Reports that auto approval has already approved carry a second label, `label.autoApproved`, with the text `Auto-approved`.

**Verdict data.** `meta.autoApproval` on each expense holds the verdict as data, for sorting, filtering and showing the reasons:

<table>
  <colgroup>
    <col width="133" />

    <col width="597" />
  </colgroup>

  <thead>
    <tr>
      <th>Field</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`status`</td>
      <td>`APPROVED` (Ready for approval), `REJECTED` (Needs review), or `PENDING` (the Agent hasn't checked the expense yet; show no guidance).</td>
    </tr>

    <tr>
      <td>`rejectReasons`</td>
      <td>Present when there are reasons. Each entry has a `reason` code and a `description` to show as is.</td>
    </tr>
  </tbody>
</table>

> [!NOTE]
>
> `APPROVED` and `REJECTED` in `meta.autoApproval.status` are the Agent's recommendation, not the approval decision. Don't show them as the report's or the expense's status.

> [!NOTE]
>
> Label texts and reason descriptions come in the approver's language: an approver with Swedish as their language gets `Behöver granskas` instead of `Needs review`. Build your logic on `type`, `status` and `reason`, never on the text.

The `reason` codes and their descriptions:

<table>
  <colgroup>
    <col width="253" />

    <col width="494" />
  </colgroup>

  <thead>
    <tr>
      <th>`reason`</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`SIMILAR_REJECTED_ORG`</td>
      <td>Similar expenses have previously been rejected.</td>
    </tr>

    <tr>
      <td>`SIMILAR_REJECTED_PERSON`</td>
      <td>Similar expenses from this employee have previously been rejected.</td>
    </tr>

    <tr>
      <td>`SIMILAR_REJECTED_GLOBAL`</td>
      <td>Similar expenses in the system have previously been rejected.</td>
    </tr>

    <tr>
      <td>`POLICY_FAILURE`</td>
      <td>Violates the company's expense policy. When a specific policy rule is broken, the description quotes it.</td>
    </tr>

    <tr>
      <td>`NOT_VALID_RECEIPT`</td>
      <td>Expense without valid receipt photo.</td>
    </tr>

    <tr>
      <td>`DEVIATING_AMOUNT_ORG`</td>
      <td>The amount deviates from what is usually approved in the organisation.</td>
    </tr>

    <tr>
      <td>`DEVIATING_AMOUNT_PERSON`</td>
      <td>The amount deviates from what this employee usually submits.</td>
    </tr>

    <tr>
      <td>`DEVIATING_AMOUNT_GLOBAL`</td>
      <td>The amount deviates from the global average for this type of expense.</td>
    </tr>

    <tr>
      <td>`PREDICT_AMOUNT_DEVIATION`</td>
      <td>The entered amount deviates greatly from the predicted amount.</td>
    </tr>

    <tr>
      <td>`WEEKEND_PURCHASE_DATE`</td>
      <td>The purchase was made during a weekend.</td>
    </tr>

    <tr>
      <td>`SPECIAL_ITEM_ALCOHOL`</td>
      <td>The expense seems to contain alcohol.</td>
    </tr>

    <tr>
      <td>`SPECIAL_ITEM_TOBACCO`</td>
      <td>The expense seems to contain tobacco.</td>
    </tr>

    <tr>
      <td>`DUPLICATE_EXPENSE_PERSON`</td>
      <td>The receipt appears to have already been submitted by this employee.</td>
    </tr>

    <tr>
      <td>`DUPLICATE_EXPENSE_ORG`</td>
      <td>The receipt appears to have already been submitted in the organisation.</td>
    </tr>

    <tr>
      <td>`NO_RECEIPT_MILEAGE`</td>
      <td>Recommendation to review all mileage separately.</td>
    </tr>

    <tr>
      <td>`NO_RECEIPT_PER_DIEM`</td>
      <td>Recommendation to review all per diem separately.</td>
    </tr>

    <tr>
      <td>`NO_RECEIPT_FOOD_BENEFIT`</td>
      <td>Recommendation to review all meal benefits separately.</td>
    </tr>

    <tr>
      <td>`NO_RECEIPT_FUEL_BENEFIT`</td>
      <td>Recommendation to review all fuel benefits separately.</td>
    </tr>

    <tr>
      <td>`NO_RECEIPT_CONGESTION_BENEFIT`</td>
      <td>Recommendation to review all congestion charges separately.</td>
    </tr>

    <tr>
      <td>`NO_SIMILAR_EXPENSES_FOUND`</td>
      <td>Found no similar expenses to compare with.</td>
    </tr>

    <tr>
      <td>`PREVIOUSLY_REJECTED`</td>
      <td>The expense has previously been rejected.</td>
    </tr>

    <tr>
      <td>`SIMILAR_SENT_BACK_BY_ADMIN_ORG`</td>
      <td>Similar expenses sent back to user from admin in this org.</td>
    </tr>

    <tr>
      <td>`SIMILAR_EDITED_BY_ADMIN_ORG`</td>
      <td>Similar expenses edited by admin in this org.</td>
    </tr>
  </tbody>
</table>

New codes may be added. Show the `description` of a code your app doesn't recognize rather than hiding it.

## Step 3 — Open an expense for review

When the approver opens an expense, fetch its approval fields: the expense's details as read-only fields. If approval guidance is switched on, the response includes the guidance as a ready-made field.

`GET /me/organizations/{organizationId}/approvals/expense/{expenseId}/fields`

`{expenseId}` is the `id` of an expense in `expenseRecords` from Step 1.

```sh cURL theme={"system"}
curl -X GET \
  "https://stage-api.findity.com/api/v1/expense/me/organizations/d238c3f4555c48f697375af96cd49196/approvals/expense/004a5280ee964e488ddfe2c1cf063a92/fields" \
  -H "Authorization: Bearer {access_token}"
```

This returns the fields of the dinner expense from Step 1, with every field disabled. The response object has `fields`, `meta`, `splits` and `validationErrors`; the guidance is the field in `fields` whose `property` is `autoApprovalInfo`.

**Example response** (status `200 OK`, the `autoApprovalInfo` field only)

```json JSON theme={"system"}
{
  "name": "Needs review",
  "property": "autoApprovalInfo",
  "controlType": "INFORMATION",
  "informationType": "WARNING",
  "iconUrl": "https://stage-api.findity.com/api/images/icons/ic_ai_sparkles.svg",
  "value": "• Expense without valid receipt photo.",
  "mandatory": false,
  "visible": true,
  "disabled": true,
  "dismissible": false,
  "custom": false,
  "error": null,
  "errorText": null
}
```

The field appears as a banner only if your approval view renders `INFORMATION` fields. If it doesn't, add support for it:

* Use `name` as the heading, and style the banner by `informationType`: `SUCCESS` for Ready for approval, `WARNING` for Needs review.
* Show `value` with its line breaks. Each reason is on its own line and starts with a bullet.
* Show the icon from `iconUrl`.
* Render nothing when `visible` is `false`: the Agent hasn't checked the expense.

For a Ready for approval expense, `value` lists the checks that passed. The report's approval fields (`GET /me/organizations/{organizationId}/approvals/expensereports/{expenseReportId}/fields`) don't include this field; it exists only per expense. See [Dynamic fields](https://developer.findity.com/docs/dynamic-fields) for rendering fields in general.

## Step 4 — Approve or reject a report

Send the approver's decision on one report. Expenses you list in `rejectedExpenseRecords` are rejected. With nothing in `rejectedExpenseRecords`, the whole report is approved.

`PUT /me/organizations/{organizationId}/approvals/{expenseReportId}`

### Request body

<table>
  <colgroup>
    <col width="197" />

    <col width="135" />

    <col width="108" />

    <col width="290" />
  </colgroup>

  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Required</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`approvalChainId`</td>
      <td>string</td>
      <td>Yes</td>
      <td>The report's `approvalChainId` from Step 1.</td>
    </tr>

    <tr>
      <td>`rejectedExpenseRecords`</td>
      <td>array</td>
      <td>Optional</td>
      <td>Expenses to reject, each with `id` (an expense `id` from the report) and an optional `rejectComment` that the employee sees.</td>
    </tr>

    <tr>
      <td>`approverComment`</td>
      <td>string</td>
      <td>Optional</td>
      <td>Comment saved on the approval step and shown in the report's approval history.</td>
    </tr>

    <tr>
      <td>`nextStepApproverIds`</td>
      <td>array of strings</td>
      <td>Conditional</td>
      <td>Person ids of the approvers for the next step. Send it only when `meta.requirements.approval.requireNextStepApprovers` is `true` on the report; otherwise the call fails with `400 INVALID_PARAMETER` ("nextStepApproverIds not allowed").</td>
    </tr>
  </tbody>
</table>

> [!WARNING]
>
> Rejecting even one expense sends the **whole report** back to the employee. The report's `processStatus` becomes `REJECTED`, the rejected expenses get status `REJECTED`, and the expenses you didn't list keep status `APPROVAL`: they are **not** approved. The employee gets a notification, and each `rejectComment` is sent to them as a message. Rejecting one part of a split expense rejects all its parts.

Approve the whole report:

```sh cURL theme={"system"}
curl -X PUT \
  "https://stage-api.findity.com/api/v1/expense/me/organizations/d238c3f4555c48f697375af96cd49196/approvals/67f5bd5764384d7ebecc287b410048fa" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "approvalChainId": "220448",
    "approverComment": "Approved, thanks."
  }'
```

This approves the report "Client visit Gothenburg" and its one expense, with a comment in the approval history.

**Example response** (status `200 OK`, trimmed)

```json JSON theme={"system"}
{
  "id": "67f5bd5764384d7ebecc287b410048fa",
  "name": "Client visit Gothenburg",
  "status": "APPROVED",
  "processStatus": "PROCESSING",
  "version": 4,
  "sent": "2026-11-23T15:26:54Z",
  "reimbursementCurrency": "SEK",
  "type": "MANUAL",
  "expenseRecords": [
    {
      "id": "2fef830a46e0457bbe3ed9d9bcd1f7af",
      "status": "APPROVED",
      "processStatus": "PROCESSING",
      "rejectComment": ""
    }
  ],
  "hasDuplicateExpenseViolations": false
}
```

The response is the report after the decision. It doesn't include `approvalChainId` or the `reimbursement` amount. Once the last approval step is done, Findity moves the report on, so its `status` can already be past `APPROVED` (for example `SENT`) when you read it again.

Reject the dinner from Step 1 and send the report back:

```sh cURL theme={"system"}
curl -X PUT \
  "https://stage-api.findity.com/api/v1/expense/me/organizations/d238c3f4555c48f697375af96cd49196/approvals/9c245d136dcb4e4c959ded57085ce3e8" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "approvalChainId": "220451",
    "rejectedExpenseRecords": [
      {
        "id": "004a5280ee964e488ddfe2c1cf063a92",
        "rejectComment": "Please attach the itemized receipt for this dinner."
      }
    ]
  }'
```

This rejects the dinner with a comment. The taxi isn't approved; it waits in the report until the employee resubmits.

**Example response** (status `200 OK`, trimmed)

```json JSON theme={"system"}
{
  "id": "9c245d136dcb4e4c959ded57085ce3e8",
  "name": "Sales conference Stockholm",
  "status": "APPROVAL",
  "processStatus": "REJECTED",
  "expenseRecords": [
    {
      "id": "004a5280ee964e488ddfe2c1cf063a92",
      "status": "REJECTED",
      "processStatus": "REJECTED",
      "rejectComment": "Please attach the itemized receipt for this dinner."
    },
    {
      "id": "a51fd4b1c8bb4c6da9c7beff1e723d7e",
      "status": "APPROVAL",
      "processStatus": "PROCESSING",
      "rejectComment": ""
    }
  ]
}
```

### Retrying after a timeout

A decision can't be applied twice. If a call times out and you resend it, the second call fails instead of acting again: on a report that was approved, it returns `400 REPORT_HAS_WRONG_STATUS_CAN_NOT_BE_APPROVED`; on a report that was rejected, it returns `403` ("Cannot approve this report"). To find out whether the first call went through, list the approval queue again (Step 1): a report the approver has handled is no longer in it, and `statuses=APPROVED,REJECTED` shows how it was handled.

## Step 5 — Approve several reports at once

To approve several reports in one action, send the approvals in one bulk request. Each entry in `requests` is the same `PUT` as in Step 4, for one report.

`POST /bulk`

### Request body

| Field | Type | Required | Description |
| - | - | - | - |
| `requests` | array | Yes | 1 to 50 calls. All must go to the same endpoint, so a batch of approvals can't include other calls. |
| `requests[].id` | string | Optional | Your own id for the entry, returned in its result. Use the report id to match results to reports. Defaults to the entry's position. |
| `requests[].method` | string | Yes | `PUT` for approvals. |
| `requests[].path` | string | Yes | The full path, starting with `/v1/expense/`. |
| `requests[].body` | object | Yes, for approvals | The Step 4 body for that report. |

```sh cURL theme={"system"}
curl -X POST \
  "https://stage-api.findity.com/api/v1/expense/bulk" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "requests": [
      {
        "id": "476977f7a05d4faebe50d8354a61a0b3",
        "method": "PUT",
        "path": "/v1/expense/me/organizations/d238c3f4555c48f697375af96cd49196/approvals/476977f7a05d4faebe50d8354a61a0b3",
        "body": { "approvalChainId": "220454" }
      },
      {
        "id": "eee6757ad0c84a66b230868ab6b7e57e",
        "method": "PUT",
        "path": "/v1/expense/me/organizations/d238c3f4555c48f697375af96cd49196/approvals/eee6757ad0c84a66b230868ab6b7e57e",
        "body": { "approvalChainId": "220457" }
      },
      {
        "id": "67f5bd5764384d7ebecc287b410048fa",
        "method": "PUT",
        "path": "/v1/expense/me/organizations/d238c3f4555c48f697375af96cd49196/approvals/67f5bd5764384d7ebecc287b410048fa",
        "body": { "approvalChainId": "220448" }
      }
    ]
  }'
```

This approves two waiting reports, "Workshop Malmo" and "Team offsite", and tries the "Client visit Gothenburg" report again, which Step 4 already approved.

**Example response** (status `200 OK`, entry bodies trimmed)

```json JSON theme={"system"}
{
  "responses": [
    {
      "id": "476977f7a05d4faebe50d8354a61a0b3",
      "index": 0,
      "status": 200,
      "headers": { "Content-Type": "application/json;charset=UTF-8" },
      "body": { "id": "476977f7a05d4faebe50d8354a61a0b3", "status": "APPROVED", "processStatus": "PROCESSING" }
    },
    {
      "id": "eee6757ad0c84a66b230868ab6b7e57e",
      "index": 1,
      "status": 200,
      "headers": { "Content-Type": "application/json;charset=UTF-8" },
      "body": { "id": "eee6757ad0c84a66b230868ab6b7e57e", "status": "APPROVED", "processStatus": "PROCESSING" }
    },
    {
      "id": "67f5bd5764384d7ebecc287b410048fa",
      "index": 2,
      "status": 400,
      "headers": { "Content-Type": "application/json;charset=UTF-8" },
      "body": {
        "result": "error",
        "requestId": "f12237d5-ce40-4e91-a947-6f915f49834e",
        "description": "Expense report was in status SENT, cannot approve report",
        "code": "REPORT_HAS_WRONG_STATUS_CAN_NOT_BE_APPROVED"
      }
    }
  ]
}
```

The bulk call answers `200` whenever the batch itself is valid, even when some approvals fail. Each approval runs on its own and nothing is rolled back, so read every entry's `status`: here the first two reports were approved and the third was not. A successful entry's `body` is the full report, as in Step 4.

> [!WARNING]
>
> A batch holds at most 50 calls. Split a longer list into several bulk requests. A batch that is too long, empty, mixes endpoints, or has a path outside `/v1/expense/` is rejected as a whole with `400 INVALID_PARAMETER`, and none of its approvals run.

## Common integration patterns

**Approve everything marked Ready for approval.** List the queue with `include=meta.abbreviation` (Step 1) and pick the reports whose `label.autoApproval` label has `type` `SUCCESS`. Let the approver confirm the selection, then approve them with one bulk request per 50 reports (Step 5). Then list the queue again: reports that failed are still in it.

**Put the reports that need review first.** Sort the approver's queue so reports with a `WARNING` guidance label come first, and show each expense's `meta.autoApproval.rejectReasons` in the list (Step 1 and Step 2). Approvers then spend their time where the Agent found something.

**Start the rejection comment from the Agent's reason.** When the approver rejects an expense the Agent flagged, prefill `rejectComment` with the reason's `description` and let the approver edit it before sending (Step 4).

## Error handling

Errors come as a JSON object with `result`, a `requestId`, a `description` and, for most errors, a machine-readable `code`:

```json JSON theme={"system"}
{
  "result": "error",
  "requestId": "fe1590b0-bbbe-4e16-9991-99956b98441b",
  "description": "Could not find expense record",
  "code": "EXPENSE_RECORD_NOT_FOUND"
}
```

Branch on `code` and the status, not on `description`.

| Status code | Error code | Description |
| - | - | - |
| `400` | `INVALID_JSON_BODY` | The body isn't valid JSON. Check the request body. |
| `400` | `NO_KNOWN_JSON_PROPERTIES` | The body has no field the endpoint knows, for example a misspelled `approverComment`. Check the field names. |
| `400` | `REPORT_HAS_WRONG_STATUS_CAN_NOT_BE_APPROVED` | The report isn't waiting for approval any more, for example because it was already approved. Refresh the approval list. |
| `400` | `INVALID_PARAMETER` | `nextStepApproverIds` was sent when it isn't allowed, is missing when it's required, or names someone who can't approve the next step. For `POST /bulk`, the batch is empty, has more than 50 calls, mixes endpoints, or has an invalid path. The `description` says which. |
| `401` | None | The access token is missing, invalid or expired. The body is `{"result":"unauthorized"}`. Get a new token and retry. |
| `403` | None | The user isn't the current approver of this report, or the report was already rejected. The `description` is `Cannot approve this report`. Refresh the approval list. |
| `404` | `EXPENSE_REPORT_NOT_FOUND` | No report with this id is accessible. Use a report `id` from the approval list. |
| `404` | `APPROVAL_CHAIN_NOT_FOUND` | `approvalChainId` is missing or doesn't belong to this report. Use the `approvalChainId` from the approval list. |
| `404` | `EXPENSE_RECORD_NOT_FOUND` | An `id` in `rejectedExpenseRecords` isn't an expense in this report. Use the expense ids from the report's `expenseRecords`. |

In a bulk request, each approval's error comes back in its own entry, with the same status and body as above.

## Next steps

> [card] [Expense reports](https://developer.findity.com/docs/expense-reports.md)
>
> Create, submit and track the reports that approvers review.

> [card] [Dynamic fields](https://developer.findity.com/docs/dynamic-fields)
>
> Render the approval fields, including information fields such as the approval guidance.

> [card] [Approval structures](https://developer.findity.com/docs/approval-structures.md)
>
> Set up who approves which reports, in how many steps.

> [card] [Authentication](https://developer.findity.com/docs/accessing.md)
>
> Get the approver's user access token with the authorization grant flow.
