pos-delete-cart
Method: DELETE
Path: /pos/carts/{id}
Tags: POS
Summary
Delete cart
Description
delete all items from the cart.
Pos SDK Usage
SDK Method: pos.deleteCart()
Example:
typescript
const { data, error } = await pos.deleteCart({
id: "01H9CART12345ABCDE"
});
if (error) {
console.error("Failed to delete cart:", error.message);
} else {
console.log("Cart deleted:", data.message);
}TypeScript Definition
typescript
"pos-delete-cart": {
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": {
/** @example All cart items are removed. */
readonly message: string;
readonly success: boolean;
};
};
};
401: components["responses"]["Unauthorized"];
404: components["responses"]["NotFound"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["NotFound"] | NotFound |
Parameters
- id (path): Cart ID
Responses
200
OK
401
Not authorized for given operation on the Resource
404
Requested resource not found
OpenAPI Definition
json
{
"tags": [
"POS"
],
"operationId": "pos-delete-cart",
"summary": "Delete cart",
"description": "delete all items from the cart.",
"parameters": [
{
"name": "id",
"in": "path",
"description": "Cart ID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"message",
"success"
],
"properties": {
"message": {
"type": "string",
"examples": [
"All cart items are removed."
],
"readOnly": true
},
"success": {
"type": "boolean",
"readOnly": true
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"404": {
"$ref": "#/components/responses/NotFound"
}
},
"security": [
{
"Authorization": []
}
],
"x-speakeasy-group": "pos",
"x-speakeasy-ignore": true,
"x-speakeasy-name-override": "deleteCart"
}Auto-generated from OpenAPI spec and TypeScript definitions