organizationDataSummary
Requires the permissions settings:organization:update and settings:system:update.
Counts the records a data reset would delete: products, variants, partners, quotes, sales and purchase orders, invoices, credit notes, payments, discount schemes, categories and brands. Needs the same permissions as resetOrganizationData: organization settings update and system settings update.
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 OrganizationDataSummary {
organizationDataSummary {
brands
categories
creditNotes
discountSchemes
invoices
partners
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query OrganizationDataSummary {\n organizationDataSummary {\n brands\n categories\n creditNotes\n discountSchemes\n invoices\n partners\n }\n}"
}
EOF
Response:
{
"data": {
"organizationDataSummary": {
"brands": 0,
"categories": 0,
"creditNotes": 0,
"discountSchemes": 0,
"invoices": 0,
"partners": 0
}
}
}
organizationDataSummary: ResetDataSummary!
Type
ResetDataSummary object
How many records a data reset would delete.