Solid Commerce Docs
POST/v1/orders/{id}/items/{itemId}/cancel

POST /v1/orders/{id}/items/{itemId}/cancel

Scopes: orders:orders:write

Requires scope: orders:orders:write.

Parameters

NameInTypeRequiredDescription
idpathinteger<int64>yes
itemIdpathinteger<int64>yes

Request body

FieldTypeRequiredDescription
reasonstringno
notify_buyerbooleanno

Examples

import { SolidCommerceClient } from '@solidcommerce/sdk';

const client = new SolidCommerceClient({
  apiKey: process.env.SOLIDCOMMERCE_API_KEY!,
});

const { data, error } = await client.raw.POST('/v1/orders/{id}/items/{itemId}/cancel', {
  // params: { path: { id: '...' }, query: { limit: 25 } },
  // body: { /* request body */ },
});

if (error) throw error;
console.log(data);