Safe Invoice Serial Counter API (1.0.0)

Download OpenAPI specification:Download

API for managing safe invoice serial counters

Safe Invoice Serial Counter

Safe invoice serial counter management operations

Get all safe invoice serial counters

Retrieve a list of all safe invoice serial counters with optional filtering and pagination

Authorizations:
ApiKeyAuth
query Parameters
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

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": [
    ],
  • "paging": {
    }
}

Create a new safe invoice serial counter

Create a new safe invoice serial counter entry

Authorizations:
ApiKeyAuth
Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "rep": "507f1f77bcf86cd799439012",
  • "warehouse": "507f1f77bcf86cd799439013",
  • "invoice_type": "sales",
  • "current_serial": 0,
  • "prefix": "INV-2024-",
  • "suffix": "string",
  • "pad_length": 6,
  • "company_namespace": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

Get safe invoice serial counter by ID

Retrieve a specific safe invoice serial counter by its ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Safe invoice serial counter ID

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

Update safe invoice serial counter

Update an existing safe invoice serial counter

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Safe invoice serial counter ID

Request Body schema: application/json
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

Responses

Request samples

Content type
application/json
{
  • "current_serial": 0,
  • "prefix": "string",
  • "suffix": "string",
  • "pad_length": 0,
  • "company_namespace": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}

Delete safe invoice serial counter

Delete a safe invoice serial counter by ID

Authorizations:
ApiKeyAuth
path Parameters
id
required
string

Safe invoice serial counter ID

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Get next serial number

Get the next available serial number for invoice generation

Authorizations:
ApiKeyAuth
Request Body schema: application/json
rep
required
string

Representative ID

warehouse
required
string

Warehouse ID

invoice_type
required
string
Enum: "sales" "return" "proforma"

Type of invoice

Responses

Request samples

Content type
application/json
{
  • "rep": "string",
  • "warehouse": "string",
  • "invoice_type": "sales"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "data": {
    }
}