void_sale
Cancel a completed sale transaction in ConsignCloud by providing the sale ID to reverse the sale and update inventory records.
Instructions
Void a sale
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Sale ID |
Implementation Reference
- src/server.ts:125-135 (registration)Registration of the 'void_sale' MCP tool, including name, description, and input schema requiring a sale ID.{ name: 'void_sale', description: 'Void a sale', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Sale ID' }, }, required: ['id'], }, },
- src/server.ts:456-457 (handler)MCP server request handler case for 'void_sale' tool. Parses args, calls client.voidSale(id), and returns JSON response.case 'void_sale': return { content: [{ type: 'text', text: JSON.stringify(await client.voidSale((args as any).id), null, 2) }] };
- src/client.ts:184-187 (handler)Core implementation of voidSale: Makes POST request to ConsignCloud API endpoint `/sales/${id}/void` and converts the response using convertSaleResponse.async voidSale(id: string): Promise<Sale> { const response = await this.client.post(`/sales/${id}/void`); return this.convertSaleResponse(response.data); }