> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metrifox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke promotional credit

> Revoke a promotional credit from specific customers or from all customers

<Note>
  Customers are identified by their `customer_key`. Use `revoke_from: "specific"` with a `customer_keys` array to revoke from a chosen set of customers, or `revoke_from: "all"` to revoke from every customer that currently holds this promotional credit.
</Note>

<Note>
  Only customers with an active grant for this promotional credit are affected. Revoking takes effect immediately.
</Note>


## OpenAPI

````yaml POST /api/v1/credit_systems/promotional-credits/{id}/revoke
openapi: 3.0.1
info:
  title: Metrifox API Documentation
  version: v1
  description: >-
    Welcome to Metrifox Platform's API documentation. This comprehensive API
    suite enables seamless integration with our platform, providing secure and
    efficient access to our services.
servers:
  - url: https://{defaultHost}
    variables:
      defaultHost:
        default: api.metrifox.com
security:
  - api_key: []
paths:
  /api/v1/credit_systems/promotional-credits/{id}/revoke:
    post:
      tags:
        - Promotional Credits
      summary: Revoke a promotional credit from customers
      description: >
        Revokes a previously granted promotional credit from one or more
        customers. The customers stop receiving

        new benefit from this promotion immediately (`active` becomes false and
        `revoked_at` is set).


        Identify customers by their `customer_key`. Set `revoke_from` to
        `specific` and pass `customer_keys` to

        revoke from a chosen set of customers, or set `revoke_from` to `all` to
        revoke from every customer that

        currently holds this promotional credit.


        Only customers with an **active** grant for this promotional credit are
        affected.
      operationId: revokePromotionalCredit
      parameters:
        - name: id
          in: path
          required: true
          description: The unique identifier of the promotional credit to revoke
          schema:
            type: string
            format: uuid
          example: 625f5cee-259b-4994-b7eb-416b9e551f2c
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                revoke_from:
                  type: string
                  enum:
                    - specific
                    - all
                  default: specific
                  description: >
                    `specific` revokes only from the customers listed in
                    `customer_keys`.

                    `all` revokes from every customer that currently holds this
                    promotional credit.
                  example: specific
                customer_keys:
                  type: array
                  items:
                    type: string
                  description: >-
                    The customer keys to revoke the promotional credit from.
                    Required when `revoke_from` is `specific`.
                  example:
                    - cust_001
      responses:
        '200':
          description: Promotional credit revoked
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Promotional credit revoked
                  meta:
                    type: object
                  data:
                    type: array
                    items: c572bbb8-743b-48ec-a774-225bf247080b
                  errors:
                    type: object
              example:
                statusCode: 200
                message: Promotional credit revoked
                meta: {}
                data:
                  - id: a1b2c3d4-0000-0000-0000-000000000001
                    customer_id: f4a2f74c-661b-428c-87f8-75cc1aa19c4c
                    customer_key: cust_001
                    customer_name: Acme Inc
                    customer_email: billing@acme.test
                    active: false
                    applied_at: '2026-06-01T10:00:00Z'
                    revoked_at: '2026-06-05T12:00:00Z'
                    created_at: '2026-06-01T10:00:00Z'
                errors: {}
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: >-
            Promotional credit not found, or no active grants exist for the
            specified customers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                statusCode: 404
                message: No active grants found
                errors: {}
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >
            curl -X POST
            https://api.metrifox.com/api/v1/credit_systems/promotional-credits/625f5cee-259b-4994-b7eb-416b9e551f2c/revoke
            \
              -H "x-api-key: your_api_key" \
              -H "Content-Type: application/json" \
              -d '{
                "revoke_from": "specific",
                "customer_keys": ["cust_001"]
              }'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: Error message
        errors:
          type: object
          additionalProperties: true
          description: Detailed error information
  securitySchemes:
    api_key:
      type: apiKey
      name: x-api-key
      in: header

````