Download OpenAPI specification:Download
API for managing safe invoice serial counters
Retrieve a list of all safe invoice serial counters with optional filtering and pagination
| page | integer >= 1 Default: 1 Page number for pagination |
| per_page | integer [ 1 .. 100 ] Default: 25 Number of items per page |
| sort | string Sort field |
| company_namespace | Array of strings Company namespace for filtering |
| rep | string Filter by representative ID |
| warehouse | string Filter by warehouse ID |
| _id | Array of strings Filter by ID |
{- "success": true,
- "data": [
- {
- "_id": "507f1f77bcf86cd799439011",
- "rep": "507f1f77bcf86cd799439012",
- "warehouse": "507f1f77bcf86cd799439013",
- "invoice_type": "sales",
- "current_serial": 1000,
- "last_used_date": "2019-08-24T14:15:22Z",
- "prefix": "INV-2024-",
- "suffix": "string",
- "pad_length": 6,
- "company_namespace": [
- "string"
], - "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "SVClient": 0,
- "__v": 0
}
], - "paging": {
- "total": 0,
- "page": 0,
- "per_page": 0,
- "pages": 0
}
}Create a new safe invoice serial counter entry
| rep required | string Representative ID |
| warehouse required | string Warehouse ID |
| invoice_type required | string Enum: "sales" "return" "proforma" Type of invoice |
| current_serial | integer Default: 0 Starting serial number |
| prefix | string Serial number prefix |
| suffix | string Serial number suffix |
| pad_length | integer Default: 6 Length to pad the serial number |
| company_namespace | Array of strings Company namespace |
{- "rep": "507f1f77bcf86cd799439012",
- "warehouse": "507f1f77bcf86cd799439013",
- "invoice_type": "sales",
- "current_serial": 0,
- "prefix": "INV-2024-",
- "suffix": "string",
- "pad_length": 6,
- "company_namespace": [
- "string"
]
}{- "success": true,
- "data": {
- "_id": "507f1f77bcf86cd799439011",
- "rep": "507f1f77bcf86cd799439012",
- "warehouse": "507f1f77bcf86cd799439013",
- "invoice_type": "sales",
- "current_serial": 1000,
- "last_used_date": "2019-08-24T14:15:22Z",
- "prefix": "INV-2024-",
- "suffix": "string",
- "pad_length": 6,
- "company_namespace": [
- "string"
], - "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "SVClient": 0,
- "__v": 0
}
}Retrieve a specific safe invoice serial counter by its ID
| id required | string Safe invoice serial counter ID |
{- "success": true,
- "data": {
- "_id": "507f1f77bcf86cd799439011",
- "rep": "507f1f77bcf86cd799439012",
- "warehouse": "507f1f77bcf86cd799439013",
- "invoice_type": "sales",
- "current_serial": 1000,
- "last_used_date": "2019-08-24T14:15:22Z",
- "prefix": "INV-2024-",
- "suffix": "string",
- "pad_length": 6,
- "company_namespace": [
- "string"
], - "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "SVClient": 0,
- "__v": 0
}
}Update an existing safe invoice serial counter
| id required | string Safe invoice serial counter ID |
| current_serial | integer Current serial number |
| prefix | string Serial number prefix |
| suffix | string Serial number suffix |
| pad_length | integer Length to pad the serial number |
| company_namespace | Array of strings Company namespace |
{- "current_serial": 0,
- "prefix": "string",
- "suffix": "string",
- "pad_length": 0,
- "company_namespace": [
- "string"
]
}{- "success": true,
- "data": {
- "_id": "507f1f77bcf86cd799439011",
- "rep": "507f1f77bcf86cd799439012",
- "warehouse": "507f1f77bcf86cd799439013",
- "invoice_type": "sales",
- "current_serial": 1000,
- "last_used_date": "2019-08-24T14:15:22Z",
- "prefix": "INV-2024-",
- "suffix": "string",
- "pad_length": 6,
- "company_namespace": [
- "string"
], - "createdAt": "2019-08-24T14:15:22Z",
- "modifiedAt": "2019-08-24T14:15:22Z",
- "SVClient": 0,
- "__v": 0
}
}Get the next available serial number for invoice generation
| rep required | string Representative ID |
| warehouse required | string Warehouse ID |
| invoice_type required | string Enum: "sales" "return" "proforma" Type of invoice |
{- "rep": "string",
- "warehouse": "string",
- "invoice_type": "sales"
}{- "success": true,
- "data": {
- "next_serial": 1001,
- "formatted_serial": "INV-2024-001001"
}
}