void_sale
Cancel or reverse a completed sale transaction in ConsignCloud by providing the sale ID to correct errors or process returns.
Instructions
Void a sale
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Sale ID |
Implementation Reference
- src/server.ts:456-457 (handler)MCP server handler for the 'void_sale' tool. Extracts the sale ID from input arguments and delegates execution to the ConsignCloudClient's voidSale method, returning the JSON-serialized result.case 'void_sale': return { content: [{ type: 'text', text: JSON.stringify(await client.voidSale((args as any).id), null, 2) }] };
- src/server.ts:128-134 (schema)Input schema validation for the 'void_sale' tool, requiring a single 'id' parameter of type string.inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Sale ID' }, }, required: ['id'], },
- src/server.ts:125-135 (registration)Registration of the 'void_sale' tool in the createTools() function, including name, description, and input schema.{ name: 'void_sale', description: 'Void a sale', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Sale ID' }, }, required: ['id'], }, },
- src/client.ts:184-187 (helper)Core implementation in ConsignCloudClient: performs HTTP POST to `/sales/${id}/void` endpoint and converts the API response using convertSaleResponse.async voidSale(id: string): Promise<Sale> { const response = await this.client.post(`/sales/${id}/void`); return this.convertSaleResponse(response.data); }