update_batch_status
Change batch processing status between draft and submitted states to manage consignment workflows in ConsignCloud.
Instructions
Update batch status (draft or submitted)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Batch ID | |
| status | Yes |
Implementation Reference
- src/server.ts:505-507 (handler)MCP tool handler that extracts id and status from arguments and calls client.updateBatchStatus to execute the tool logic.case 'update_batch_status': const { id: batchId, status } = args as any; return { content: [{ type: 'text', text: JSON.stringify(await client.updateBatchStatus(batchId, status), null, 2) }] };
- src/server.ts:314-325 (registration)Registration of the update_batch_status tool in createTools(), including name, description, and input schema.{ name: 'update_batch_status', description: 'Update batch status (draft or submitted)', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Batch ID' }, status: { type: 'string', enum: ['draft', 'submitted'] }, }, required: ['id', 'status'], }, },
- src/server.ts:317-324 (schema)Input schema definition for the update_batch_status tool, specifying required id (string) and status (enum: draft|submitted).inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Batch ID' }, status: { type: 'string', enum: ['draft', 'submitted'] }, }, required: ['id', 'status'], },
- src/client.ts:258-260 (helper)Client library method that implements the actual API call to update batch status via POST to /batches/{id}/status.async updateBatchStatus(id: string, status: 'draft' | 'submitted'): Promise<Batch> { const response = await this.client.post(`/batches/${id}/status`, { status }); return response.data;