copilotSupplierRules
Requires permission catalog:copilot:chat.
Lists the organization's saved supplier import rules, one per supplier, that the copilot applies when it reads a supplier's file. Needs the catalog copilot feature on the plan and permission to chat with the copilot.
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 CopilotSupplierRules {
copilotSupplierRules {
supplierName
columnMap
moqRule
priceRule
savedAt
savedBy
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CopilotSupplierRules {\n copilotSupplierRules {\n supplierName\n columnMap\n moqRule\n priceRule\n savedAt\n savedBy\n }\n}"
}
EOF
Response:
{
"data": {
"copilotSupplierRules": [
{
"supplierName": "string",
"columnMap": {},
"moqRule": "string",
"priceRule": "string",
"savedAt": "string",
"savedBy": "string"
}
]
}
}
copilotSupplierRules: [SupplierRuleType!]!
Type
SupplierRuleType object
A saved way of reading one supplier's price list.