salesPolicy
Requires at least one of the permissions sales:quote:create, sales:quote:update, sales:sales_order:create, sales:sales_order:ship, sales:sales_order:update or settings:tenant:read.
Returns the organization-wide sales policy: the highest discount a manual price override may imply and whether goods ship only after an invoice. Needs settings:tenant:read, or the permission to create or update quotes or sales orders, or to ship.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query SalesPolicy {
salesPolicy {
maxDiscountPercent
requireInvoiceBeforeShip
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query SalesPolicy {\n salesPolicy {\n maxDiscountPercent\n requireInvoiceBeforeShip\n }\n}"
}
EOF
Response:
{
"data": {
"salesPolicy": {
"maxDiscountPercent": 0,
"requireInvoiceBeforeShip": true
}
}
}
salesPolicy: SalesPolicy!
Type
SalesPolicy object
The organization-wide sales policy.