openapi: 3.2.0 info: title: Monite Approval policies API contact: name: Monite team url: https://monite.com/about/ email: developers@monite.com termsOfService: https://monite.com/terms version: '1.0' description: 'Operations tagged Approval policies across 3 of this provider''s published API definitions: monite-openapi-2023-09-01.json, monite-openapi-2024-05-25.json, monite-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.dev.monite.com/v1 description: Development environment - url: https://api.sandbox.monite.com/v1 description: Sandbox environment - url: https://api.monite.com/v1 description: Production environment (Europe) - url: https://us.api.monite.com/v1 description: Production environment (North America) - url: https://api.monite.oaknorth.co.uk/v1 description: Oak POC environment tags: - name: Approval policies paths: /approval_policies: get: tags: - Approval policies summary: Get approval policies description: Retrieve a list of all approval policies with pagination. operationId: get_approval_policies parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - required: false schema: type: string format: uuid name: process_id in: query - description: Sort order (ascending by default). Typically used together with the `sort` parameter. required: false schema: allOf: - $ref: '#/components/schemas/OrderEnum' default: asc name: order in: query - description: 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. required: false schema: type: integer maximum: 100.0 minimum: 1.0 default: 100 name: limit in: query - description: '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.' required: false schema: type: string name: pagination_token in: query - description: The field to sort the results by. Typically used together with the `order` parameter. required: false schema: allOf: - $ref: '#/components/schemas/ApprovalPolicyCursorFields' name: sort in: query - required: false schema: items: type: string format: uuid type: array name: id__in in: query - required: false schema: type: string enum: - active - pending name: status in: query - required: false schema: items: type: string enum: - active - pending type: array name: status__in in: query - required: false schema: type: string name: name in: query - required: false schema: type: string name: name__contains in: query - required: false schema: type: string name: name__ncontains in: query - required: false schema: type: string format: uuid name: created_by in: query - required: false schema: type: string format: date-time name: created_at__gt in: query - required: false schema: type: string format: date-time name: created_at__lt in: query - required: false schema: type: string format: date-time name: created_at__gte in: query - required: false schema: type: string format: date-time name: created_at__lte in: query - required: false schema: type: string format: date-time name: updated_at__gt in: query - required: false schema: type: string format: date-time name: updated_at__lt in: query - required: false schema: type: string format: date-time name: updated_at__gte in: query - required: false schema: type: string format: date-time name: updated_at__lte in: query - description: The ID of the entity that owns the requested resource. required: true schema: type: string format: uuid examples: - 9d2b4c8f-2087-4738-ba91-7359683c49a4 name: x-monite-entity-id in: header responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ApprovalPolicyResourceList' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '409': description: Business logic error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] post: tags: - Approval policies summary: Create an approval policy description: Create a new approval policy. operationId: post_approval_policies parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - description: The ID of the entity that owns the requested resource. required: true schema: type: string format: uuid examples: - 9d2b4c8f-2087-4738-ba91-7359683c49a4 name: x-monite-entity-id in: header requestBody: content: application/json: schema: $ref: '#/components/schemas/ApprovalPolicyCreate' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ApprovalPolicyResource' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '400': description: 'Possible responses: `Script validation error: {errors}.`' content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] servers: - url: https://api.dev.monite.com/v1 description: Development environment - url: https://api.sandbox.monite.com/v1 description: Sandbox environment - url: https://api.monite.com/v1 description: Production environment (Europe) - url: https://us.api.monite.com/v1 description: Production environment (North America) - url: https://api.monite.oaknorth.co.uk/v1 description: Oak POC environment /approval_policies/{approval_policy_id}: get: tags: - Approval policies summary: Get an approval policy by ID description: Retrieve a specific approval policy. operationId: get_approval_policies_id parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - required: true schema: type: string format: uuid name: approval_policy_id in: path - description: The ID of the entity that owns the requested resource. required: true schema: type: string format: uuid examples: - 9d2b4c8f-2087-4738-ba91-7359683c49a4 name: x-monite-entity-id in: header responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ApprovalPolicyResource' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '409': description: Business logic error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] patch: tags: - Approval policies summary: Update an approval policy description: Update an existing approval policy. operationId: patch_approval_policies_id parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - required: true schema: type: string format: uuid name: approval_policy_id in: path - description: The ID of the entity that owns the requested resource. required: true schema: type: string format: uuid examples: - 9d2b4c8f-2087-4738-ba91-7359683c49a4 name: x-monite-entity-id in: header requestBody: content: application/json: schema: $ref: '#/components/schemas/ApprovalPolicyUpdate' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ApprovalPolicyResource' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '400': description: 'Possible responses: `Script validation error: {errors}.`' content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] delete: tags: - Approval policies summary: Delete an approval policy description: Delete an existing approval policy. operationId: delete_approval_policies_id parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - required: true schema: type: string format: uuid name: approval_policy_id in: path - description: The ID of the entity that owns the requested resource. required: true schema: type: string format: uuid examples: - 9d2b4c8f-2087-4738-ba91-7359683c49a4 name: x-monite-entity-id in: header responses: '204': description: Successful Response '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '409': description: Business logic error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] servers: - url: https://api.dev.monite.com/v1 description: Development environment - url: https://api.sandbox.monite.com/v1 description: Sandbox environment - url: https://api.monite.com/v1 description: Production environment (Europe) - url: https://us.api.monite.com/v1 description: Production environment (North America) - url: https://api.monite.oaknorth.co.uk/v1 description: Oak POC environment /approval_policies/{approval_policy_id}/processes: get: tags: - Approval policies summary: Get approval processes created from a policy description: Retrieve a list of all approval policy processes. operationId: get_approval_policies_id_processes parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - required: true schema: type: string format: uuid name: approval_policy_id in: path - description: The ID of the entity that owns the requested resource. required: true schema: type: string format: uuid examples: - 9d2b4c8f-2087-4738-ba91-7359683c49a4 name: x-monite-entity-id in: header responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ApprovalProcessResourceList' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '409': description: Business logic error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] servers: - url: https://api.dev.monite.com/v1 description: Development environment - url: https://api.sandbox.monite.com/v1 description: Sandbox environment - url: https://api.monite.com/v1 description: Production environment (Europe) - url: https://us.api.monite.com/v1 description: Production environment (North America) - url: https://api.monite.oaknorth.co.uk/v1 description: Oak POC environment /approval_policies/{approval_policy_id}/processes/{process_id}: get: tags: - Approval policies summary: Get an approval process by ID description: Retrieve a specific approval policy process. operationId: get_approval_policies_id_processes_id parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - required: true schema: type: string format: uuid name: approval_policy_id in: path - required: true schema: type: string format: uuid name: process_id in: path - description: The ID of the entity that owns the requested resource. required: true schema: type: string format: uuid examples: - 9d2b4c8f-2087-4738-ba91-7359683c49a4 name: x-monite-entity-id in: header responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ProcessResource' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '404': description: 'Possible responses: `Approval policy with ID {id} not found.`, `Approval policy process with ID {id} not found.`' content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] servers: - url: https://api.dev.monite.com/v1 description: Development environment - url: https://api.sandbox.monite.com/v1 description: Sandbox environment - url: https://api.monite.com/v1 description: Production environment (Europe) - url: https://us.api.monite.com/v1 description: Production environment (North America) - url: https://api.monite.oaknorth.co.uk/v1 description: Oak POC environment /approval_policies/{approval_policy_id}/processes/{process_id}/cancel: post: tags: - Approval policies summary: Cancel an approval process description: Cancel an ongoing approval process for a specific approval policy. operationId: post_approval_policies_id_processes_id_cancel parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - required: true schema: type: string format: uuid name: approval_policy_id in: path - required: true schema: type: string format: uuid name: process_id in: path - description: The ID of the entity that owns the requested resource. required: true schema: type: string format: uuid examples: - 9d2b4c8f-2087-4738-ba91-7359683c49a4 name: x-monite-entity-id in: header responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ProcessResource' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '404': description: 'Possible responses: `Approval policy with ID {id} not found.`, `Approval policy process with ID {id} not found.`' content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '409': description: 'Possible responses: `Action is not allowed for approval policy process with id {id} because it is not in one of the following statuses: {possible_statuses}`' content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] servers: - url: https://api.dev.monite.com/v1 description: Development environment - url: https://api.sandbox.monite.com/v1 description: Sandbox environment - url: https://api.monite.com/v1 description: Production environment (Europe) - url: https://us.api.monite.com/v1 description: Production environment (North America) - url: https://api.monite.oaknorth.co.uk/v1 description: Oak POC environment /approval_policies/{approval_policy_id}/processes/{process_id}/steps: get: tags: - Approval policies summary: Get the steps of an approval process description: Retrieve a list of approval policy process steps. operationId: get_approval_policies_id_processes_id_steps parameters: - required: true schema: type: string format: date example: '2023-09-01' name: x-monite-version in: header - required: true schema: type: string format: uuid name: approval_policy_id in: path - required: true schema: type: string format: uuid name: process_id in: path - description: The ID of the entity that owns the requested resource. required: true schema: type: string format: uuid examples: - 9d2b4c8f-2087-4738-ba91-7359683c49a4 name: x-monite-entity-id in: header responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ApprovalProcessStepResourceList' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '404': description: 'Possible responses: `Approval policy with ID {id} not found.`, `Approval policy process with ID {id} not found.`' content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/ErrorSchemaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: - HTTPBearer: [] servers: - url: https://api.dev.monite.com/v1 description: Development environment - url: https://api.sandbox.monite.com/v1 description: Sandbox environment - url: https://api.monite.com/v1 description: Production environment (Europe) - url: https://us.api.monite.com/v1 description: Production environment (North America) - url: https://api.monite.oaknorth.co.uk/v1 description: Oak POC environment components: schemas: ApprovalProcessStepResourceList: properties: data: items: $ref: '#/components/schemas/ApprovalProcessStepResource' type: array type: object required: - data ApprovalProcessStepResource: properties: approval_request_id: type: string format: uuid approved_by: items: type: string format: uuid type: array object_id: type: string format: uuid rejected_by: type: string format: uuid required_approval_count: type: integer minimum: 1.0 role_ids: items: type: string format: uuid type: array status: $ref: '#/components/schemas/ApprovalProcessStepStatus' user_ids: items: type: string format: uuid type: array type: object required: - approved_by - object_id - required_approval_count - role_ids - status - user_ids OrderEnum: type: string enum: - asc - desc ApprovalPolicyCreate: properties: description: type: string maxLength: 255 description: A brief description of the approval policy. ends_at: type: string format: date-time description: 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. name: type: string maxLength: 255 description: The name of the approval policy. priority: type: integer maximum: 32767.0 minimum: -32768.0 description: The priority controls which approval policy takes precedence when a payable matches multiple approval policies. A higher value mean higher priority. default: 0 script: items: anyOf: - type: boolean - type: number minimum: 1.0 - type: string - items: {} type: array - type: object type: array description: 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. starts_at: type: string format: date-time description: 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: anyOf: - type: boolean - type: number - type: string - items: {} type: array - type: object description: A JSON object that represents the trigger for the approval policy. The trigger specifies the event that will trigger the policy to be evaluated. example: '{amount >= 1000}' additionalProperties: false type: object required: - name - script ApprovalPolicyCursorFields: type: string enum: - created_at - updated_at ApprovalProcessStepStatus: type: string enum: - waiting - approved - rejected - canceled - failed - not_started - skipped HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array type: object ApprovalPolicyStatus: type: string enum: - active - deleted - pending ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array msg: type: string type: type: string type: object required: - loc - msg - type ApprovalPolicyResource: properties: id: type: string format: uuid created_at: type: string format: date-time updated_at: type: string format: date-time created_by: type: string format: uuid description: type: string maxLength: 255 description: A brief description of the approval policy. ends_at: type: string format: date-time description: 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. name: type: string maxLength: 255 description: The name of the approval policy. priority: type: integer maximum: 32767.0 minimum: -32768.0 description: The priority controls which approval policy takes precedence when a payable matches multiple approval policies. A higher value mean higher priority. default: 0 script: items: anyOf: - type: boolean - type: number minimum: 1.0 - type: string - items: {} type: array - type: object type: array description: 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. starts_at: type: string format: date-time description: 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. status: type: string enum: - active - pending description: The current status of the approval policy. example: active trigger: anyOf: - type: boolean - type: number - type: string - items: {} type: array - type: object description: A JSON object that represents the trigger for the approval policy. The trigger specifies the event that will trigger the policy to be evaluated. example: '{amount >= 1000}' updated_by: type: string format: uuid type: object required: - id - created_at - updated_at - created_by - name - script - status ProcessResource: properties: id: type: string format: uuid created_at: type: string format: date-time updated_at: type: string format: date-time created_by: type: string format: uuid error: type: object description: The error for the process. input: type: object description: The input for the script. metadata: type: object description: The metadata for the process. script_snapshot: anyOf: - type: boolean - type: number - type: string - items: {} type: array - type: object description: The script snapshot taken when script started. status: allOf: - $ref: '#/components/schemas/ProcessStatusEnum' description: Tthe current status of the approval policy process. updated_by: type: string format: uuid type: object required: - id - created_at - input - metadata - status ApprovalPolicyUpdate: properties: description: type: string description: A brief description of the approval policy. ends_at: type: string format: date-time description: 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. name: type: string description: The name of the approval policy. priority: type: integer maximum: 32767.0 minimum: -32768.0 description: The priority controls which approval policy takes precedence when a payable matches multiple approval policies. A higher value mean higher priority. script: items: anyOf: - type: boolean - type: number minimum: 1.0 - type: string - items: {} type: array - type: object type: array description: 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. starts_at: type: string format: date-time description: 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. status: allOf: - $ref: '#/components/schemas/ApprovalPolicyStatus' description: A string that represents the current status of the approval policy. trigger: anyOf: - type: boolean - type: number - type: string - items: {} type: array - type: object description: A JSON object that represents the trigger for the approval policy. The trigger specifies the event that will trigger the policy to be evaluated. example: '{amount >= 1000}' additionalProperties: false type: object ApprovalPolicyResourceList: properties: data: items: $ref: '#/components/schemas/ApprovalPolicyResource' type: array next_pagination_token: type: string description: 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: type: string description: 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). additionalProperties: false type: object required: - data ErrorSchemaResponse: properties: error: $ref: '#/components/schemas/ErrorSchema' type: object required: - error ApprovalProcessResourceList: properties: data: items: $ref: '#/components/schemas/ProcessResource' type: array type: object required: - data ProcessStatusEnum: type: string enum: - succeeded - waiting - failed - running - canceled - timed_out ErrorSchema: properties: message: type: string type: object required: - message securitySchemes: HTTPBearer: type: http scheme: bearer x-refined-from: - monite-openapi-2023-09-01.json - monite-openapi-2024-05-25.json - monite-openapi.yml