Skip to content

revoke-customer-mandate

Method: POST
Path: /customers/{customer_id}/mandates/{mandate_id}/revoke

Tags: Customers

Summary

Revoke mandate

Description

Revoke a mandate for a given customer.

Storefront SDK Usage

SDK Method: sdk.customer.revokeMandate()

Example:

typescript
const { data, error } = await sdk.customer.revokeMandate({
  mandate_id: "mandate_456"
});

if (error) {
  console.error("Failed to revoke mandate:", error);
  return;
}

console.log("Mandate status:", data.mandate.status);

TypeScript Definition

typescript
"revoke-customer-mandate": {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description Customer Id */
                customer_id: string;
                /** @description Mandate Id */
                mandate_id: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description OK */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        message: string;
                        success: boolean;
                        content: {
                            mandate: components["schemas"]["CustomerMandate"];
                        };
                    };
                };
            };
            400: components["responses"]["BadRequest"];
            401: components["responses"]["Unauthorized"];
            404: components["responses"]["NotFound"];
        };
    };

Component References

ReferenceResolves To
components["schemas"]["CustomerMandate"]CustomerMandate
components["responses"]["BadRequest"]BadRequest
components["responses"]["Unauthorized"]Unauthorized
components["responses"]["NotFound"]NotFound

Responses

200

OK

400

Bad request

401

Not authorized for given operation on the Resource

404

Requested resource not found

OpenAPI Definition

json
{
  "tags": [
    "Customers"
  ],
  "operationId": "revoke-customer-mandate",
  "summary": "Revoke mandate",
  "description": "Revoke a mandate for a given customer.",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/operations/revoke-customer-mandate",
    "description": "API reference for the revoke-customer-mandate operation"
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "message",
              "success",
              "content"
            ],
            "properties": {
              "message": {
                "type": "string"
              },
              "success": {
                "type": "boolean"
              },
              "content": {
                "properties": {
                  "mandate": {
                    "$ref": "#/components/schemas/CustomerMandate"
                  }
                },
                "required": [
                  "mandate"
                ],
                "type": "object"
              }
            }
          }
        }
      }
    },
    "400": {
      "$ref": "#/components/responses/BadRequest"
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    },
    "404": {
      "$ref": "#/components/responses/NotFound"
    }
  },
  "security": [
    {
      "Authorization": []
    }
  ],
  "x-speakeasy-group": "customers",
  "x-speakeasy-ignore": false,
  "x-speakeasy-name-override": "revokeCustomerMandate"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: