Skip to content

Sequence

Sequences are used for generating ID, Name, Barcode and DisplayID. See how on the query page.

GET /api/sequence

Response

A list of sequences:

[...
{
"id": string,
"prefix": string,
"minDigits": number,
"nextValue": number,
"type": string,
"pattern": string
}
...]

Where:

  • id This is what is referenced using the !-notation. Must be unique.
  • prefix Short prefix.
  • minDigits Minimum number of digits.
  • nextValue The next used number.
  • type Optional type.
  • pattern Readable example pattern.

POST /api/sequence

Scope: ADMIN

Add or update sequence.

Request

Body

A JSON object with the structure as described above (except pattern).

Examples

A unique sequence for a project.

{
"id": "PRJ0001-DS-Seq",
"prefix": "UN-SEQ-",
"minDigits": 4,
"type": "ProjectSequence",
}

This will generate sequences starting with: UN-SEQ-0001;

Another unique sequence for a project starting from 1000.

{
"id": "PRJ0001-DS-Seq2",
"prefix": "UN-SEQ2-",
"minDigits": 4,
"nextValue": 1000,
"type": "ProjectSequence",
}

This will generate sequences starting with: UN-SEQ2-1000;