Skip to documentation
Billing & payoutsDiscounts

Discounts

Methods, permissions, request fields and response schemas for discounts.

Read and search

Retrieve current records, history and status.

Read volume discountsOrganization's enabled flag and discount tiers. This setting need not be visible in every UI build.GET/volume-discounts
Token scope organization:readActor permission managerAction type read
Explore this request

Edit example fields and validate the request against its schema.

What you receive

Organization's enabled flag and discount tiers. This setting need not be visible in every UI build.

Request example · cURL

Replace example IDs and values. Supply the token from your secret store. Each intended write uses one stable $ACTION_KEY.

curl -X GET "$BASE/volume-discounts" \
  -H "Authorization: Bearer $ALLPROFILES_API_TOKEN"
Success response schema · HTTP 200
{
  "application/json": {
    "schema": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "tiers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "minQuantity": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "discountPercent": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              }
            },
            "required": [
              "minQuantity",
              "discountPercent"
            ],
            "additionalProperties": true
          }
        }
      },
      "required": [
        "enabled",
        "tiers"
      ],
      "additionalProperties": true
    }
  }
}
Errors and recovery
400
Invalid JSON, request fields, query, path identifier or missing Idempotency-Key.
401
Missing, invalid, revoked or expired organization API token; its issuing actor must still be the current organization owner.
403
Token scope or actor capability denied, disabled/banned account, or action unavailable.
404
Unknown route or resource not accessible in the bound organization. Cross-tenant resources are not enumerated.
409
Conflicting profile/rental state, duplicate resource, idempotency payload mismatch or operation still in progress.
410
event_cursor_expired: the event cursor is behind retained history. Reconcile current resources and start from the supplied recovery cursor.
422
Business validation/moderation rejected the operation. CHAT_MESSAGE_BLOCKED was not delivered.
429
API rate/concurrency limit exceeded; use backoff and Retry-After when present.
500
Internal operation error. Sensitive implementation details are not returned. Investigate using the request ID before repeating a write.
503
Provider or configuration unavailable; uncertain writes must retain the same Idempotency-Key.

These are documented API errors. The local sandbox checks schema fields only and does not test authorization, moderation or provider behavior.

Financial fields named ...Cents or ...InCents use integer cents. Path fields and nested constraints are shown above and in the downloadable OpenAPI contract.

Update and configure

Change existing records, assignments and configuration.

Replace volume discountsValidated discount ladder. Each minimum quantity must be distinct and discounts must satisfy the existing service rules.PUT/volume-discounts
Token scope organization:writeActor permission managerAction type write

Send Idempotency-Key. Retry the same intended action with the same key and exact payload to retrieve its saved result.

Request body

FieldTypeDescription and constraints
enabledRequiredboolean
tiersOptionalarray of objectAt least 0 items · At most 100 items
Nested fields
FieldTypeDescription and constraints
minQuantityRequiredintegerMinimum 1 · Maximum 9007199254740991
discountPercentRequiredintegerMinimum 1 · Maximum 100
Explore this request

Edit example fields and validate the request against its schema.

What you receive

Validated discount ladder. Each minimum quantity must be distinct and discounts must satisfy the existing service rules.

Request example · cURL

Replace example IDs and values. Supply the token from your secret store. Each intended write uses one stable $ACTION_KEY.

curl -X PUT "$BASE/volume-discounts" \
  -H "Authorization: Bearer $ALLPROFILES_API_TOKEN" \
  -H "Idempotency-Key: $ACTION_KEY" \
  -H "Content-Type: application/json" \
  --data '{"enabled":false}'
Full JSON request schema
{
  "type": "object",
  "properties": {
    "enabled": {
      "type": "boolean"
    },
    "tiers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "minQuantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "discountPercent": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          }
        },
        "required": [
          "minQuantity",
          "discountPercent"
        ],
        "additionalProperties": false
      },
      "maxItems": 100,
      "minItems": 0
    }
  },
  "required": [
    "enabled"
  ],
  "additionalProperties": false
}
Success response schema · HTTP 200
{
  "application/json": {
    "schema": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "tiers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "minQuantity": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "discountPercent": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              }
            },
            "required": [
              "minQuantity",
              "discountPercent"
            ],
            "additionalProperties": true
          }
        }
      },
      "required": [
        "enabled",
        "tiers"
      ],
      "additionalProperties": true
    }
  }
}
Errors and recovery
400
Invalid JSON, request fields, query, path identifier or missing Idempotency-Key.
401
Missing, invalid, revoked or expired organization API token; its issuing actor must still be the current organization owner.
403
Token scope or actor capability denied, disabled/banned account, or action unavailable.
404
Unknown route or resource not accessible in the bound organization. Cross-tenant resources are not enumerated.
409
Conflicting profile/rental state, duplicate resource, idempotency payload mismatch or operation still in progress.
410
event_cursor_expired: the event cursor is behind retained history. Reconcile current resources and start from the supplied recovery cursor.
422
Business validation/moderation rejected the operation. CHAT_MESSAGE_BLOCKED was not delivered.
429
API rate/concurrency limit exceeded; use backoff and Retry-After when present.
500
Internal operation error. Sensitive implementation details are not returned. Investigate using the request ID before repeating a write.
503
Provider or configuration unavailable; uncertain writes must retain the same Idempotency-Key.

These are documented API errors. The local sandbox checks schema fields only and does not test authorization, moderation or provider behavior.

Financial fields named ...Cents or ...InCents use integer cents. Path fields and nested constraints are shown above and in the downloadable OpenAPI contract.