Sequential IDs management
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match required scopes.
GET /sequential-id/sequenceSchemas HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"id": "sequentialId",
"name": "order_number",
"schemaType": "orderNoSequence",
"active": true,
"preText": "C-",
"postText": "-A",
"startValue": 100,
"maxValue": 999999999,
"numberOfDigits": 9,
"counter": 109,
"placeholders": {
"__year__": {
"required": true
}
}
}
]
The name of the sequence schema.
The schema type corresponding to the entity it is used for. Possible values are:
orderNoSequence
invoiceNoSequence
quoteNoSequence
pickPackNoSequence
orderHoldingAreaNoSequence
^[a-zA-Z0-9]*$
The prefix of the ID. It can contain placeholders, which are replaced with their values.
Placeholders are defined in the placeholders
property.
The suffix of the ID. It can contain placeholders, which are replaced with their values.
Placeholders are defined in the placeholders
property.
The starting value of the sequence. It is used to generate the first ID. The starting value is incremented for each subsequent ID.
The maximum value of the sequence. It is used to limit the range of generated IDs. If the maximum value is reached, the sequence will not generate any more IDs.
The number of digits in the generated ID. It is used to format the ID. If the number of digits is less than the maximum value, leading zeros are added.
Request syntactically incorrect. Any details will be provided within the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match required scopes.
POST /sequential-id/sequenceSchemas HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 187
{
"name": "invoiceNoSequence",
"schemaType": "invoiceNoSequence",
"preText": "INV__num__",
"maxValue": 999999999,
"numberOfDigits": 4,
"startValue": 1000,
"placeholders": {
"__num__": {
"required": true
}
}
}
text
Creates and returns the nextId in the sequence. If you specify the sequenceKey
parameter in request body, the nextId number is generated for this sequence, otherwise default pool is used.
This endpoint is deprecated
. Please use the /sequential-id/{tenant}/schemas/types/{schemaType}/nextId instead.
The sequence schema to generate the nextId for.
Value used to resolve certain placeholders.
Placeholders such as __year__, __month__, __day__, __hour__, __minute__, __second__, and __country__, which are defined in the schema, can have default values computed when their counterparts are missing in the request body.
The default values are derived from the site
. Specifically:
- All date-related placeholders are computed based on the
site.homeBase.timezone
field. - The country placeholder is replaced with the value of
site.homeBase.address.country
.
If these values are missing in site
, the following defaults are used:
UTC
fortimezone
DE
forcountry
The number of IDs to create sequentially in one request.
The pattern to follow for the nextID.
The filler text for values based on certain properties or settings in the system.
Request syntactically incorrect. Any details will be provided within the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match required scopes.
Resource does not exist.
POST /sequential-id/sequenceSchemas/{sequenceSchema}/nextIds HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 93
{
"numberOfIds": 3,
"sequenceKey": "2016-05",
"placeholders": {
"__year__": "2016",
"__month__": "05"
}
}
{
"ids": [
"C-2016-06-0000000045-D",
"asfasf2323"
]
}
The name of your tenant.
Note: The tenant name should always be provided in lowercase.
[a-zA-Z0-9_-]+
Request syntactically incorrect. Any details will be provided within the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match required scopes.
GET /sequential-id/{tenant}/schemas HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"name": "testSchema",
"schemaType": "orderNoSequence",
"active": true,
"preText": "C-__year__-__month__-",
"postText": "-D",
"startValue": 1,
"maxValue": 999999999,
"numberOfDigits": 9,
"counter": 45684,
"placeholders": {
"__year__": {
"required": true
},
"__month__": {
"required": true
}
}
},
{
"name": "customer_number",
"startValue": 1,
"schemaType": "orderNoSequence",
"preText": "C-",
"minValue": 100,
"maxValue": 999999999,
"numberOfDigits": 9,
"counter": 109
}
]
The name of your tenant.
Note: The tenant name should always be provided in lowercase.
[a-zA-Z0-9_-]+
The name of the sequence schema.
The schema type corresponding to the entity it is used for. Possible values are:
orderNoSequence
invoiceNoSequence
quoteNoSequence
pickPackNoSequence
orderHoldingAreaNoSequence
^[a-zA-Z0-9]*$
The prefix of the ID. It can contain placeholders, which are replaced with their values.
Placeholders are defined in the placeholders
property.
The suffix of the ID. It can contain placeholders, which are replaced with their values.
Placeholders are defined in the placeholders
property.
The starting value of the sequence. It is used to generate the first ID. The starting value is incremented for each subsequent ID.
The maximum value of the sequence. It is used to limit the range of generated IDs. If the maximum value is reached, the sequence will not generate any more IDs.
The number of digits in the generated ID. It is used to format the ID. If the number of digits is less than the maximum value, leading zeros are added.
Request syntactically incorrect. Any details will be provided within the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match required scopes.
POST /sequential-id/{tenant}/schemas HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 233
{
"name": "testSchema",
"schemaType": "orderNoSequence",
"preText": "C-__year__-__month__-",
"postText": "-D",
"maxValue": 999999999,
"numberOfDigits": 9,
"startValue": 3,
"placeholders": {
"__year__": {
"required": true
},
"__month__": {
"required": true
}
}
}
text
The ID of the schema to retrieve.
The name of your tenant.
Note: The tenant name should always be provided in lowercase.
^[a-z][a-z0-9]+$
Request syntactically incorrect. Any details will be provided within the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match required scopes.
GET /sequential-id/{tenant}/schemas/{schemaId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"name": "testSchema",
"schemaType": "orderNoSequence",
"active": true,
"preText": "C-__year__-__month__-",
"postText": "-D",
"startValue": 1,
"maxValue": 999999999,
"numberOfDigits": 9,
"counter": 45684,
"placeholders": {
"__year__": {
"required": true
},
"__month__": {
"required": true
}
}
}
The ID of the schema to activate.
The name of your tenant.
Note: The tenant name should always be provided in lowercase.
^[a-z][a-z0-9]+$
Schema set to active
Request syntactically incorrect. Any details will be provided within the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match required scopes.
Resource does not exist.
POST /sequential-id/{tenant}/schemas/{schemaId}/setActive HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
The schema type corresponding to the entity it is used for. Possible values are:
orderNoSequence
invoiceNoSequence
quoteNoSequence
pickPackNoSequence
orderHoldingAreaNoSequence
The name of your tenant.
Note: The tenant name should always be provided in lowercase.
[a-zA-Z0-9_-]+
Request syntactically incorrect. Any details will be provided within the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match required scopes.
GET /sequential-id/{tenant}/schemas/types/{schemaType} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"name": "testSchema",
"schemaType": "orderNoSequence",
"active": true,
"preText": "C-__year__-__month__-",
"postText": "-D",
"startValue": 1,
"maxValue": 999999999,
"numberOfDigits": 9,
"counter": 45684,
"placeholders": {
"__year__": {
"required": true
},
"__month__": {
"required": true
}
}
},
{
"name": "customer_number",
"startValue": 1,
"schemaType": "orderNoSequence",
"preText": "C-",
"minValue": 100,
"maxValue": 999999999,
"numberOfDigits": 9,
"counter": 109
}
]
The schema type corresponding to the entity it is used for. Possible values are:
orderNoSequence
invoiceNoSequence
quoteNoSequence
pickPackNoSequence
orderHoldingAreaNoSequence
The name of your tenant.
Note: The tenant name should always be provided in lowercase.
^[a-z][a-z0-9]+$
Value used to resolve certain placeholders.
Placeholders such as __year__, __month__, __day__, __hour__, __minute__, __second__, and __country__, which are defined in the schema, can have default values computed when their counterparts are missing in the request body.
The default values are derived from the site
. Specifically:
- All date-related placeholders are computed based on the
site.homeBase.timezone
field. - The country placeholder is replaced with the value of
site.homeBase.address.country
.
If these values are missing in site
, the following defaults are used:
UTC
fortimezone
DE
forcountry
The pattern to follow for the nextID.
The filler text for values based on certain properties or settings in the system.
Request syntactically incorrect. Any details will be provided within the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match required scopes.
Resource does not exist.
POST /sequential-id/{tenant}/schemas/types/{schemaType}/nextId HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 77
{
"sequenceKey": "2016-05",
"placeholders": {
"__year__": "2016",
"__month__": "05"
}
}
{
"id": "B7012562"
}
Value used to resolve certain placeholders.
Placeholders such as __year__, __month__, __day__, __hour__, __minute__, __second__, and __country__, which are defined in the schema, can have default values computed when their counterparts are missing in the request body.
The default values are derived from the site
. Specifically:
- All date-related placeholders are computed based on the
site.homeBase.timezone
field. - The country placeholder is replaced with the value of
site.homeBase.address.country
.
If these values are missing in site
, the following defaults are used:
UTC
fortimezone
DE
forcountry
Request syntactically incorrect. Any details will be provided within the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match required scopes.
POST /sequential-id/sequenceSchemaBatch/nextIds HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 159
{
"testSchema": {
"sequenceKey": "2016-05",
"placeholders": {
"__year__": "2016",
"__month__": "05"
}
},
"testSchema2": {
"numberOfIds": 2,
"placeholders": {
"--prefix--": "C-"
}
}
}
{
"testSchema": {
"ids": [
"C-2016-05-0000000045-D",
"C-2016-05-0000000045-D"
]
}
}
Was this helpful?