pos-remove-loyalty-points
Method: DELETE
Path: /pos/carts/{id}/loyalty-points
Tags: Carts
Summary
Remove loyalty points
Description
Removes redeemed loyalty points from the cart. Returns a fully updated Cart object with recalculated totals.
Pos SDK Usage
SDK Method: pos.removeLoyaltyPoints()
Example:
typescript
const { data, error } = await pos.removeLoyaltyPoints({
id: "01H9CART12345ABCDE"
});
if (error) {
console.error("Failed to remove loyalty points:", error.message);
} else {
console.log("Loyalty points removed, new total:", data.cart.grand_total);
}TypeScript Definition
typescript
"pos-remove-loyalty-points": {
parameters: {
query?: never;
header?: never;
path: {
/** @description Cart ID */
id: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message: string;
success: boolean;
content: {
cart: components["schemas"]["CartRead"];
};
};
};
};
400: components["responses"]["BadRequest"];
401: components["responses"]["Unauthorized"];
403: components["responses"]["Forbidden"];
/** @description The active cart or requested customer resource was not found. */
404: components["responses"]["NotFound"];
408: components["responses"]["RequestTimeout"];
500: components["responses"]["InternalServerError"];
504: components["responses"]["GatewayTimeout"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["CartRead"] | CartRead |
components["responses"]["BadRequest"] | BadRequest |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["Forbidden"] | Forbidden |
components["responses"]["NotFound"] | NotFound |
components["responses"]["RequestTimeout"] | RequestTimeout |
components["responses"]["InternalServerError"] | InternalServerError |
components["responses"]["GatewayTimeout"] | GatewayTimeout |
Parameters
- id (path): Cart ID
Responses
200
OK
400
Bad request
401
Authentication failed. Codes include token-required, token-expired and token_not_valid for an invalid or expired token.
403
Access denied. token-required requires an authenticated session; permission-denied means the caller cannot access this resource. On POS, session-expired requires signing in again.
404
Requested resource not found
408
500
The request failed because of an unexpected error.
504
The request timed out.
OpenAPI Definition
json
{
"operationId": "pos-remove-loyalty-points",
"summary": "Remove loyalty points",
"description": "Removes redeemed loyalty points from the cart. Returns a fully updated `Cart` object with recalculated totals.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Cart ID",
"required": true,
"schema": {
"type": "string",
"maxLength": 128,
"minLength": 1,
"pattern": "^[A-Za-z0-9_-]{1,128}$"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"cart": {
"$ref": "#/components/schemas/CartRead"
}
},
"required": [
"cart"
],
"type": "object"
}
},
"required": [
"message",
"success",
"content"
]
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"description": "The active cart or requested customer resource was not found.",
"$ref": "#/components/responses/NotFound"
},
"408": {
"$ref": "#/components/responses/RequestTimeout"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
},
"504": {
"$ref": "#/components/responses/GatewayTimeout"
}
},
"externalDocs": {
"url": "https://llm-docs.commercengine.io/admin-pos/operations/pos-remove-loyalty-points"
},
"security": [
{
"Authorization": []
}
],
"tags": [
"Carts"
],
"x-speakeasy-group": "pos",
"x-speakeasy-name-override": "removeLoyaltyPoints"
}Auto-generated from OpenAPI spec and TypeScript definitions