Approval rules

Approval rules are used to verify the integrity of an order. Common examples include orders requiring managerial approval, approval for orders that contain a specific product category, approval for quantity thresholds, or approval for orders that exceed a specific price. Properties are also available to control the triggers and timing for processing approvals whether parallel to another rule, or in succession of a previous rule.

List approval rules

Request

Security
OAuth2(Required scopes: FullAccessApprovalRuleAdminApprovalRuleReader)
Path
buyerIDstringrequired

ID of the buyer.

Query
searchstring

Word or phrase to search for.

searchOnArray of strings

Comma-delimited list of fields to search on.

Items Enum:"ID""Name""Description""RuleExpression"
sortByArray of strings

Comma-delimited list of fields to sort by.

Items Enum:"Name""ID""ApprovingGroupID""RuleExpression""!Name""!ID""!ApprovingGroupID""!RuleExpression"
pageinteger

Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

Default:1
pageSizeinteger, <= 100

Number of results to return per page.

Default:20
filtersobject

An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

curl -i -X GET \
  'https://api.ordercloud.io/v1/buyers/{buyerID}/approvalrules?search=string&searchOn=ID&sortBy=Name&page=1&pageSize=20&filters=' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Bodyapplication/json
ItemsArray of objects(ApprovalRule)
Example:
[ { "ID": "", "Name": "", "Description": "", "ApprovingGroupID": "", "RuleExpression": "", "xp": {} } ]
Metaobject(Meta)
Response
{ "Items": [ { … } ], "Meta": { "Page": 0, "PageSize": 0, "TotalCount": 0, "TotalPages": 0, "ItemRange": [ … ], "NextPageKey": "string" } }