updatePurchaseSettings
Requires at least one of the permissions settings:purchase:update or settings:tenant:update.
Updates the purchase settings: the default supplier, purchaser, payment terms and receiving warehouse, whether goods receipts and purchase returns are enabled, and the approval requirements for purchases. Needs the purchase settings update permission, or the tenant settings update permission.
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
mutation UpdatePurchaseSettings($input: PurchaseSettingsInput!) {
updatePurchaseSettings(input: $input) {
id
createdAt
category
dataType
description
enteredBy
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation UpdatePurchaseSettings($input: PurchaseSettingsInput!) {\n updatePurchaseSettings(input: $input) {\n id\n createdAt\n category\n dataType\n description\n enteredBy\n }\n}",
"variables": {
"input": {}
}
}
EOF
Variables:
{
"input": {}
}
Response:
{
"data": {
"updatePurchaseSettings": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"category": "ACCOUNTING",
"dataType": "ARRAY",
"description": "string",
"enteredBy": "string"
}
]
}
}
updatePurchaseSettings(
input: PurchaseSettingsInput!
): [TenantSetting!]!
Arguments
updatePurchaseSettings.input ● PurchaseSettingsInput! non-null input
The details of the purchase settings request.
Type
TenantSetting object
A setting of the organization.