POST /counter
Create Counter
POST
/counter
Create a new counter sequence definition.
Inserts a Counter document into the Counter collection. The counter
template and frequency determine how the sequence string is formatted and
when the tick resets. Returns the new counter's _key.
Emits: (direct transaction — no event class)
Required scope: traceability:counter:write
Authorizations
OAuth2PasswordBearer
password Flow
Token URL
"/api/auth"Scopes:
"admin"User can access and edit users and system settings"library"User can access and edit products"production"User can access and edit production plans"operator"User can access the operator panel and make production declarations
Request Body
application/json
JSON "_id": "string", "_key": "string", "_rev": "string", "name": "Work Order Counter", "next_tick": 1, "template": [ [ "WO-", "%Y", "-", "%m", "-" ] ], "frequency": "month", "reset_date": "2026-05-01T00:00:00Z"
{
}
Responses
Successful Response
application/json
JSON "status": 200, "message": "string", "detail": "string"
{
}