> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.monite.com/v2024-01-31/api/approval-policies/get-approval-policies/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.monite.com/_mcp/server. # Get approval policies GET https://api.sandbox.monite.com/v1/approval_policies Retrieve a list of all approval policies with pagination. Reference: https://docs.monite.com/api/approval-policies/get-approval-policies ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Servers - `https://api.sandbox.monite.com/v1` (sandbox, default) - `https://api.monite.com/v1` (eu_production) - `https://us.api.monite.com/v1` (na_production) ## Request ### Query parameters - `process_id` (string, optional) - `order` (enum, optional) — Sort order (ascending by default). Typically used together with the `sort` parameter. - Allowed values: `asc`, `desc` - `limit` (integer, optional, default: 100) — The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page. - `pagination_token` (string, optional) — A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. If not specified, the first page of results will be returned. - `sort` (enum, optional) — The field to sort the results by. Typically used together with the `order` parameter. - Allowed values: `created_at`, `updated_at` - `id__in` (string, optional) - `status` (enum, optional) - Allowed values: `active`, `pending` - `status__in` (enum, optional) - Allowed values: `active`, `pending` - `name` (string, optional) - `name__contains` (string, optional) - `name__ncontains` (string, optional) - `created_by` (string, optional) - `created_at__gt` (datetime, optional) - `created_at__lt` (datetime, optional) - `created_at__gte` (datetime, optional) - `created_at__lte` (datetime, optional) - `updated_at__gt` (datetime, optional) - `updated_at__lt` (datetime, optional) - `updated_at__gte` (datetime, optional) - `updated_at__lte` (datetime, optional) ### Headers - `x-monite-version` (string, required) - `x-monite-entity-id` (string, required) — The ID of the entity that owns the requested resource. ## Response ### 200 Successful Response - `data` (list of ApprovalPolicyResource, required) - `next_pagination_token` (string, optional) — A token that can be sent in the `pagination_token` query parameter to get the next page of results, or `null` if there is no next page (i.e. you've reached the last page). - `prev_pagination_token` (string, optional) — A token that can be sent in the `pagination_token` query parameter to get the previous page of results, or `null` if there is no previous page (i.e. you've reached the first page). ## Errors ### 401 Get Approval Policies Request Unauthorized Error Unauthorized - `error` (ErrorSchema, required) ### 409 Get Approval Policies Request Conflict Error Business logic error - `error` (ErrorSchema, required) ### 422 Get Approval Policies Request Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ### 500 Get Approval Policies Request Internal Server Error Internal Server Error - `error` (ErrorSchema, required) ## Types ### ApprovalPolicyResource - `id` (string, required) - `created_at` (datetime, required) - `updated_at` (datetime, required) - `created_by` (string, required) - `name` (string, required) — The name of the approval policy. - `script` (list of ApprovalPolicyResourceScriptItem, required) — A list of JSON objects that represents the approval policy script. The script contains the logic that determines whether an action should be sent to approval. This field is required, and it should contain at least one script object. - `status` (enum, required) — The current status of the approval policy. - Allowed values: `active`, `pending` - `description` (string, optional) — A brief description of the approval policy. - `ends_at` (datetime, optional) — The date and time (in the ISO 8601 format) when the approval policy stops being active and stops triggering approval workflows.If `ends_at` is provided in the request, then `starts_at` must also be provided and `ends_at` must be later than `starts_at`. The value will be converted to UTC. - `priority` (integer, optional, default: 0) — The priority controls which approval policy takes precedence when a payable matches multiple approval policies. A higher value mean higher priority. - `starts_at` (datetime, optional) — The date and time (in the ISO 8601 format) when the approval policy becomes active. Only payables submitted for approval during the policy's active period will trigger this policy. If omitted or `null`, the policy is effective immediately. The value will be converted to UTC. - `trigger` (ApprovalPolicyResourceTrigger, optional) — A JSON object that represents the trigger for the approval policy. The trigger specifies the event that will trigger the policy to be evaluated. - `updated_by` (string, optional) ### ErrorSchema - `message` (string, required) ### ValidationError - `loc` (list of ValidationErrorLocItem, required) - `msg` (string, required) - `type` (string, required) ### ApprovalPolicyResourceScriptItem ### ApprovalPolicyResourceTrigger A JSON object that represents the trigger for the approval policy. The trigger specifies the event that will trigger the policy to be evaluated. ### ValidationErrorLocItem ## Examples **Response** ```json { "data": [ { "id": "id", "created_at": "2024-01-15T09:30:00Z", "updated_at": "2024-01-15T09:30:00Z", "created_by": "created_by", "name": "name", "script": [ true ], "status": "active", "description": "description", "ends_at": "2024-01-15T09:30:00Z", "priority": 1, "starts_at": "2024-01-15T09:30:00Z", "trigger": true, "updated_by": "updated_by" } ], "next_pagination_token": "next_pagination_token", "prev_pagination_token": "prev_pagination_token" } ``` **SDK Code** ```python import requests url = "https://api.sandbox.monite.com/v1/approval_policies" headers = { "x-monite-version": "2024-01-31", "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4", "Authorization": "Bearer " } response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.sandbox.monite.com/v1/approval_policies'; const options = { method: 'GET', headers: { 'x-monite-version': '2024-01-31', 'x-monite-entity-id': '9d2b4c8f-2087-4738-ba91-7359683c49a4', Authorization: 'Bearer ' } }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.sandbox.monite.com/v1/approval_policies" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-monite-version", "2024-01-31") req.Header.Add("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4") req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.sandbox.monite.com/v1/approval_policies") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-monite-version"] = '2024-01-31' request["x-monite-entity-id"] = '9d2b4c8f-2087-4738-ba91-7359683c49a4' request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.sandbox.monite.com/v1/approval_policies") .header("x-monite-version", "2024-01-31") .header("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.sandbox.monite.com/v1/approval_policies', [ 'headers' => [ 'Authorization' => 'Bearer ', 'x-monite-entity-id' => '9d2b4c8f-2087-4738-ba91-7359683c49a4', 'x-monite-version' => '2024-01-31', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.sandbox.monite.com/v1/approval_policies"); var request = new RestRequest(Method.GET); request.AddHeader("x-monite-version", "2024-01-31"); request.AddHeader("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4"); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-monite-version": "2024-01-31", "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4", "Authorization": "Bearer " ] let request = NSMutableURLRequest(url: NSURL(string: "https://api.sandbox.monite.com/v1/approval_policies")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```