HomeGuidesRecipesAPI ExplorerForumSupport
Partner Portal
Partner Portal

Approval requests

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:

curl GET 'https://api.sandbox.monite.com/v1/approval_requests?order=asc&limit=100' \
     -H 'X-Monite-Version: 2023-09-01' \
     -H 'X-Monite-Entity-Id: ENTITY_ID' \
     -H 'Authorization: Bearer YOUR_PARTNER_TOKEN' 

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

{
  "data": [
    {
      "object_type": "account",
      "object_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "required_approval_count": 1,
      "status": "waiting",
      "user_ids": [
        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      ],
      "role_ids": [
        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      ],
      "approved_by": [
        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      ],
      "rejected_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "created_by": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5",
      "created_at": "2023-06-19T10:20:20.372Z",
      "updated_at": "2023-06-19T10:20:20.372Z"
    }
  ],
  "prev_pagination_token": null,
  "next_pagination_token": null
}

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.