Learn how to manage the approval requests that move the payables across its lifecycle.

Overview

Approval requests are automatically sent to users when their approval is needed for specific transactions in an approval policy. These requests ensure proper authorization and control over the payables within the entity. By reviewing and granting approval, users help maintain compliance, prevent unauthorized spending, and support financial accountability.

List all approval requests

To list all approval requests of a specific entity, call GET /approval_requests:

1curl GET 'https://api.sandbox.monite.com/v1/approval_requests?order=asc&limit=100' \
2 -H 'X-Monite-Version: 2024-05-25' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer YOUR_PARTNER_TOKEN'

The success response contains information about all approval requests of the supplied entity:

1{
2 "data": [
3 {
4 "object_type": "account",
5 "object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
6 "required_approval_count": 1,
7 "status": "waiting",
8 "user_ids": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
9 "role_ids": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
10 "approved_by": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
11 "rejected_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
12 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
13 "created_by": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5",
14 "created_at": "2023-06-19T10:20:20.372Z",
15 "updated_at": "2023-06-19T10:20:20.372Z"
16 }
17 ],
18 "prev_pagination_token": null,
19 "next_pagination_token": null
20}

The prev_pagination_token and next_pagination_token fields are pagination tokens. You can sort and filter the results by ID, user, status, and other fields. For the full list of available sort and filter parameters, see the GET /approval_requests endpoint.

Some examples:

  • GET /approval_requests?status__in=rejected&status__in=waiting - get all rejected and pending approval requests.
  • GET /approval_requests?created_at__gte=2022-01-01T00%3A00%3A00 - get all approval requests created on or after January 1, 2022.

Retrieve an approval request

To retrieve a specific approval request, call GET /approval_requests/{approval_request_id}.

Approve a request

To approve a request, call PUT /approval_requests/{approval_request_id}/approve.

Reject a request

To reject a request, call PUT /approvals/{approval_request_id}/reject.

Cancel a request

To cancel a request, call PUT /approvals/{approval_request_id}/cancel.