# Sequential IDs management

## Retrieving all sequence schemas

> Gets all sequence schemas.

```json
{"openapi":"3.0.0","info":{"title":"Sequential ID Service","version":"0.0.1"},"tags":[{"name":"Sequential IDs management"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["sequentialid.schema_view"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"sequentialid.schema_view":"schema_view","sequentialid.schema_manage":"schema_manage"}}}}},"schemas":{"SequenceSchemas":{"type":"array","items":{"$ref":"#/components/schemas/SequenceSchema"}},"SequenceSchema":{"type":"object","allOf":[{"$ref":"#/components/schemas/SequenceSchemaCreate"},{"properties":{"active":{"type":"boolean","description":"Flag indicating whether the schema is active."},"id":{"type":"string","description":"ID of the sequence schema."},"counter":{"type":"number","description":"Number of created IDs based on the selected schema."},"metadata":{"type":"object","properties":{"createdAt":{"type":"string","format":"date","description":"Date of creation."},"modifiedAt":{"type":"string","format":"date","description":"Date of last modification."},"version":{"type":"number","description":"The version number."}}}}}]},"SequenceSchemaCreate":{"type":"object","properties":{"name":{"type":"string","description":"The name of the sequence schema."},"schemaType":{"type":"string","pattern":"^[a-zA-Z0-9]*$","description":"The schema type corresponding to the entity it is used for. Possible values are:\n- `orderNoSequence`\n- `invoiceNoSequence`\n- `quoteNoSequence`\n- `pickPackNoSequence`\n- `orderHoldingAreaNoSequence`\n"},"preText":{"type":"string","description":"The prefix of the ID. It can contain placeholders, which are replaced with their values.\nPlaceholders are defined in the `placeholders` property.\n"},"postText":{"type":"string","description":"The suffix of the ID. It can contain placeholders, which are replaced with their values.\nPlaceholders are defined in the `placeholders` property.\n"},"startValue":{"type":"number","description":"The starting value of the sequence. It is used to generate the first ID.\nThe starting value is incremented for each subsequent ID.\n"},"maxValue":{"type":"number","description":"The maximum value of the sequence. It is used to limit the range of generated IDs.\nIf the maximum value is reached, the sequence will not generate any more IDs.\n"},"numberOfDigits":{"type":"number","description":"The number of digits in the generated ID. It is used to format the ID.\nIf the number of digits is less than the maximum value, leading zeros are added.\n"},"placeholders":{"$ref":"#/components/schemas/Placeholders"}},"required":["name","startValue","maxValue","numberOfDigits"]},"Placeholders":{"type":"object","description":"The filler text for values based on certain properties or settings in the system.","additionalProperties":{"type":"object","description":"Properties used as placeholders.","properties":{"required":{"type":"boolean"},"default":{"type":"string"}}}},"error":{"description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"error":{"type":"string"},"timestamp":{"type":"string","format":"date"},"errorDetails":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"field":{"type":"string"}}}}}}},"responses":{"trait_yaasAware_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}}},"paths":{"/sequential-id/{tenant}/schemas":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceSchemas"}}}},"400":{"$ref":"#/components/responses/trait_yaasAware_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"}},"summary":"Retrieving all sequence schemas","description":"Gets all sequence schemas.","operationId":"GET-sequential-id-retrieve-tenant-schemas","tags":["Sequential IDs management"]}}}}
```

## Creating a sequence schema

> Creates a new sequence schema.

```json
{"openapi":"3.0.0","info":{"title":"Sequential ID Service","version":"0.0.1"},"tags":[{"name":"Sequential IDs management"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["sequentialid.schema_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"sequentialid.schema_view":"schema_view","sequentialid.schema_manage":"schema_manage"}}}}},"responses":{"trait_yaasAware_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"schemas":{"error":{"description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"error":{"type":"string"},"timestamp":{"type":"string","format":"date"},"errorDetails":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"field":{"type":"string"}}}}}},"SequenceSchemaCreate":{"type":"object","properties":{"name":{"type":"string","description":"The name of the sequence schema."},"schemaType":{"type":"string","pattern":"^[a-zA-Z0-9]*$","description":"The schema type corresponding to the entity it is used for. Possible values are:\n- `orderNoSequence`\n- `invoiceNoSequence`\n- `quoteNoSequence`\n- `pickPackNoSequence`\n- `orderHoldingAreaNoSequence`\n"},"preText":{"type":"string","description":"The prefix of the ID. It can contain placeholders, which are replaced with their values.\nPlaceholders are defined in the `placeholders` property.\n"},"postText":{"type":"string","description":"The suffix of the ID. It can contain placeholders, which are replaced with their values.\nPlaceholders are defined in the `placeholders` property.\n"},"startValue":{"type":"number","description":"The starting value of the sequence. It is used to generate the first ID.\nThe starting value is incremented for each subsequent ID.\n"},"maxValue":{"type":"number","description":"The maximum value of the sequence. It is used to limit the range of generated IDs.\nIf the maximum value is reached, the sequence will not generate any more IDs.\n"},"numberOfDigits":{"type":"number","description":"The number of digits in the generated ID. It is used to format the ID.\nIf the number of digits is less than the maximum value, leading zeros are added.\n"},"placeholders":{"$ref":"#/components/schemas/Placeholders"}},"required":["name","startValue","maxValue","numberOfDigits"]},"Placeholders":{"type":"object","description":"The filler text for values based on certain properties or settings in the system.","additionalProperties":{"type":"object","description":"Properties used as placeholders.","properties":{"required":{"type":"boolean"},"default":{"type":"string"}}}}}},"paths":{"/sequential-id/{tenant}/schemas":{"post":{"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"string","description":"ID of the created sequence schema."}}}},"400":{"$ref":"#/components/responses/trait_yaasAware_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"}},"summary":"Creating a sequence schema","description":"Creates a new sequence schema.","operationId":"POST-sequential-id-create-tenant-schema","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceSchemaCreate"}}},"required":true},"tags":["Sequential IDs management"]}}}}
```

## Retrieving a sequence schema

> Gets a sequence schema by its ID.

```json
{"openapi":"3.0.0","info":{"title":"Sequential ID Service","version":"0.0.1"},"tags":[{"name":"Sequential IDs management"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["sequentialid.schema_view"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"sequentialid.schema_view":"schema_view","sequentialid.schema_manage":"schema_manage"}}}}},"schemas":{"SequenceSchema":{"type":"object","allOf":[{"$ref":"#/components/schemas/SequenceSchemaCreate"},{"properties":{"active":{"type":"boolean","description":"Flag indicating whether the schema is active."},"id":{"type":"string","description":"ID of the sequence schema."},"counter":{"type":"number","description":"Number of created IDs based on the selected schema."},"metadata":{"type":"object","properties":{"createdAt":{"type":"string","format":"date","description":"Date of creation."},"modifiedAt":{"type":"string","format":"date","description":"Date of last modification."},"version":{"type":"number","description":"The version number."}}}}}]},"SequenceSchemaCreate":{"type":"object","properties":{"name":{"type":"string","description":"The name of the sequence schema."},"schemaType":{"type":"string","pattern":"^[a-zA-Z0-9]*$","description":"The schema type corresponding to the entity it is used for. Possible values are:\n- `orderNoSequence`\n- `invoiceNoSequence`\n- `quoteNoSequence`\n- `pickPackNoSequence`\n- `orderHoldingAreaNoSequence`\n"},"preText":{"type":"string","description":"The prefix of the ID. It can contain placeholders, which are replaced with their values.\nPlaceholders are defined in the `placeholders` property.\n"},"postText":{"type":"string","description":"The suffix of the ID. It can contain placeholders, which are replaced with their values.\nPlaceholders are defined in the `placeholders` property.\n"},"startValue":{"type":"number","description":"The starting value of the sequence. It is used to generate the first ID.\nThe starting value is incremented for each subsequent ID.\n"},"maxValue":{"type":"number","description":"The maximum value of the sequence. It is used to limit the range of generated IDs.\nIf the maximum value is reached, the sequence will not generate any more IDs.\n"},"numberOfDigits":{"type":"number","description":"The number of digits in the generated ID. It is used to format the ID.\nIf the number of digits is less than the maximum value, leading zeros are added.\n"},"placeholders":{"$ref":"#/components/schemas/Placeholders"}},"required":["name","startValue","maxValue","numberOfDigits"]},"Placeholders":{"type":"object","description":"The filler text for values based on certain properties or settings in the system.","additionalProperties":{"type":"object","description":"Properties used as placeholders.","properties":{"required":{"type":"boolean"},"default":{"type":"string"}}}},"error":{"description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"error":{"type":"string"},"timestamp":{"type":"string","format":"date"},"errorDetails":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"field":{"type":"string"}}}}}}},"responses":{"trait_yaasAware_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"parameters":{"trait_tenant":{"name":"tenant","in":"path","required":true,"description":"The name of your tenant.\n\n**Note**: The tenant name should always be provided in lowercase.\n","schema":{"pattern":"^[a-z][a-z0-9]+$","minLength":3,"maxLength":16,"type":"string"}}}},"paths":{"/sequential-id/{tenant}/schemas/{schemaId}":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceSchema"}}}},"400":{"$ref":"#/components/responses/trait_yaasAware_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"}},"summary":"Retrieving a sequence schema","description":"Gets a sequence schema by its ID.","operationId":"GET-sequential-id-retrieve-schema","parameters":[{"$ref":"#/components/parameters/trait_tenant"}],"tags":["Sequential IDs management"]}}}}
```

## Deleting a sequence schema

> Deletes a sequence schema by its ID.

```json
{"openapi":"3.0.0","info":{"title":"Sequential ID Service","version":"0.0.1"},"tags":[{"name":"Sequential IDs management"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["sequentialid.schema_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"sequentialid.schema_view":"schema_view","sequentialid.schema_manage":"schema_manage"}}}}},"responses":{"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"common_response_InternalServerError_500":{"description":"Internal Server Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/coreError"}}}}},"schemas":{"error":{"description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"error":{"type":"string"},"timestamp":{"type":"string","format":"date"},"errorDetails":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"field":{"type":"string"}}}}}},"coreError":{"type":"object","properties":{"status":{"type":"string","description":"HTTP Status."},"message":{"type":"string","description":"Error message."}}}},"parameters":{"trait_tenant":{"name":"tenant","in":"path","required":true,"description":"The name of your tenant.\n\n**Note**: The tenant name should always be provided in lowercase.\n","schema":{"pattern":"^[a-z][a-z0-9]+$","minLength":3,"maxLength":16,"type":"string"}}}},"paths":{"/sequential-id/{tenant}/schemas/{schemaId}":{"delete":{"responses":{"204":{"description":"Successful schema removal"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"},"500":{"$ref":"#/components/responses/common_response_InternalServerError_500"}},"summary":"Deleting a sequence schema","description":"Deletes a sequence schema by its ID.","operationId":"DELETE-sequential-id-remove-schema","parameters":[{"$ref":"#/components/parameters/trait_tenant"}],"tags":["Sequential IDs management"]}}}}
```

## Activating a sequence schema

> Sets the schema as active in the system.

```json
{"openapi":"3.0.0","info":{"title":"Sequential ID Service","version":"0.0.1"},"tags":[{"name":"Sequential IDs management"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["sequentialid.schema_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"sequentialid.schema_view":"schema_view","sequentialid.schema_manage":"schema_manage"}}}}},"responses":{"trait_yaasAware_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"trait_yaasAware_404":{"description":"Resource does not exist.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"schemas":{"error":{"description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"error":{"type":"string"},"timestamp":{"type":"string","format":"date"},"errorDetails":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"field":{"type":"string"}}}}}}},"parameters":{"trait_tenant":{"name":"tenant","in":"path","required":true,"description":"The name of your tenant.\n\n**Note**: The tenant name should always be provided in lowercase.\n","schema":{"pattern":"^[a-z][a-z0-9]+$","minLength":3,"maxLength":16,"type":"string"}}}},"paths":{"/sequential-id/{tenant}/schemas/{schemaId}/setActive":{"post":{"responses":{"200":{"description":"Schema set to active"},"400":{"$ref":"#/components/responses/trait_yaasAware_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"},"404":{"$ref":"#/components/responses/trait_yaasAware_404"}},"summary":"Activating a sequence schema","description":"Sets the schema as active in the system.","operationId":"POST-sequential-id-activate-schema","parameters":[{"$ref":"#/components/parameters/trait_tenant"}],"tags":["Sequential IDs management"]}}}}
```

## Retrieving all sequence schema types

> Gets all sequence schemas.

```json
{"openapi":"3.0.0","info":{"title":"Sequential ID Service","version":"0.0.1"},"tags":[{"name":"Sequential IDs management"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["sequentialid.schema_view"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"sequentialid.schema_view":"schema_view","sequentialid.schema_manage":"schema_manage"}}}}},"schemas":{"SequenceSchemas":{"type":"array","items":{"$ref":"#/components/schemas/SequenceSchema"}},"SequenceSchema":{"type":"object","allOf":[{"$ref":"#/components/schemas/SequenceSchemaCreate"},{"properties":{"active":{"type":"boolean","description":"Flag indicating whether the schema is active."},"id":{"type":"string","description":"ID of the sequence schema."},"counter":{"type":"number","description":"Number of created IDs based on the selected schema."},"metadata":{"type":"object","properties":{"createdAt":{"type":"string","format":"date","description":"Date of creation."},"modifiedAt":{"type":"string","format":"date","description":"Date of last modification."},"version":{"type":"number","description":"The version number."}}}}}]},"SequenceSchemaCreate":{"type":"object","properties":{"name":{"type":"string","description":"The name of the sequence schema."},"schemaType":{"type":"string","pattern":"^[a-zA-Z0-9]*$","description":"The schema type corresponding to the entity it is used for. Possible values are:\n- `orderNoSequence`\n- `invoiceNoSequence`\n- `quoteNoSequence`\n- `pickPackNoSequence`\n- `orderHoldingAreaNoSequence`\n"},"preText":{"type":"string","description":"The prefix of the ID. It can contain placeholders, which are replaced with their values.\nPlaceholders are defined in the `placeholders` property.\n"},"postText":{"type":"string","description":"The suffix of the ID. It can contain placeholders, which are replaced with their values.\nPlaceholders are defined in the `placeholders` property.\n"},"startValue":{"type":"number","description":"The starting value of the sequence. It is used to generate the first ID.\nThe starting value is incremented for each subsequent ID.\n"},"maxValue":{"type":"number","description":"The maximum value of the sequence. It is used to limit the range of generated IDs.\nIf the maximum value is reached, the sequence will not generate any more IDs.\n"},"numberOfDigits":{"type":"number","description":"The number of digits in the generated ID. It is used to format the ID.\nIf the number of digits is less than the maximum value, leading zeros are added.\n"},"placeholders":{"$ref":"#/components/schemas/Placeholders"}},"required":["name","startValue","maxValue","numberOfDigits"]},"Placeholders":{"type":"object","description":"The filler text for values based on certain properties or settings in the system.","additionalProperties":{"type":"object","description":"Properties used as placeholders.","properties":{"required":{"type":"boolean"},"default":{"type":"string"}}}},"error":{"description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"error":{"type":"string"},"timestamp":{"type":"string","format":"date"},"errorDetails":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"field":{"type":"string"}}}}}}},"responses":{"trait_yaasAware_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}}},"paths":{"/sequential-id/{tenant}/schemas/types/{schemaType}":{"get":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SequenceSchemas"}}}},"400":{"$ref":"#/components/responses/trait_yaasAware_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"}},"summary":"Retrieving all sequence schema types","description":"Gets all sequence schemas.","operationId":"GET-sequential-id-retrieve-schema-types","tags":["Sequential IDs management"]}}}}
```

## Creating a nextId for a sequence schema type

> Creates and returns the \`nextId\` according to the specified sequence.\
> If you specify the \`sequenceKey\` in request body, the \`nextId\` number is generated for this sequence, otherwise default pool is used.

```json
{"openapi":"3.0.0","info":{"title":"Sequential ID Service","version":"0.0.1"},"tags":[{"name":"Sequential IDs management"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["sequentialid.schema_view"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"sequentialid.schema_view":"schema_view","sequentialid.schema_manage":"schema_manage"}}}}},"schemas":{"NextIdResponse":{"type":"object","properties":{"id":{"type":"string","description":"The created nextID according to the selected schema."}}},"error":{"description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"error":{"type":"string"},"timestamp":{"type":"string","format":"date"},"errorDetails":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"field":{"type":"string"}}}}}},"NextIdCommandRequest":{"type":"object","properties":{"sequenceKey":{"type":"string","description":"The pattern to follow for the nextID."},"placeholders":{"additionalProperties":{"type":"string","description":"Additional property used as a placeholder."},"description":"The filler text for values based on certain properties or settings in the system."}}}},"responses":{"trait_yaasAware_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"trait_yaasAware_404":{"description":"Resource does not exist.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}}},"paths":{"/sequential-id/{tenant}/schemas/types/{schemaType}/nextId":{"post":{"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NextIdResponse"}}}},"400":{"$ref":"#/components/responses/trait_yaasAware_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"},"404":{"$ref":"#/components/responses/trait_yaasAware_404"}},"summary":"Creating a nextId for a sequence schema type","description":"Creates and returns the `nextId` according to the specified sequence.\nIf you specify the `sequenceKey` in request body, the `nextId` number is generated for this sequence, otherwise default pool is used.","operationId":"POST-sequential-id-create-schema-type-nextId","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NextIdCommandRequest"}}},"required":true},"tags":["Sequential IDs management"]}}}}
```

## Creating nextIds for sequence schema types

> Creates and returns multiple \`nextIds\` for the specified sequence schemas.\
> If you specify the \`sequenceKey\` in request body, the \`nextIds\` numbers are generated for this sequence, otherwise default pool is used.

```json
{"openapi":"3.0.0","info":{"title":"Sequential ID Service","version":"0.0.1"},"tags":[{"name":"Sequential IDs management"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["sequentialid.schema_view"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"sequentialid.schema_view":"schema_view","sequentialid.schema_manage":"schema_manage"}}}}},"schemas":{"SchemaBatchNextIdResponse":{"type":"object","additionalProperties":{"type":"object","description":"Properties used as placeholders.","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"The sequence ID(s) created according to the selected schema."}}}},"error":{"description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"error":{"type":"string"},"timestamp":{"type":"string","format":"date"},"errorDetails":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"field":{"type":"string"}}}}}},"SchemaBatchNextIdRequest":{"type":"object","additionalProperties":{"type":"object","properties":{"numberOfIds":{"type":"number","minimum":1,"description":"The number of IDs to create sequentially in one request."},"sequenceKey":{"type":"string","description":"The pattern to follow for the nextID."},"placeholders":{"additionalProperties":{"type":"string","description":"Additional property used as a placeholder."},"description":"The filler text for values based on certain properties or settings in the system."}}}}},"responses":{"trait_yaasAware_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}},"Unauthorized_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error"}}}}},"parameters":{"trait_siteCode":{"name":"siteCode","in":"query","required":false,"description":"Value used to resolve certain placeholders.\n\nPlaceholders such as **\\_\\_year__**, **\\_\\_month__**, **\\_\\_day__**, **\\_\\_hour__**, **\\_\\_minute__**, **\\_\\_second__**, and **\\_\\_country__**, \nwhich are defined in the schema, can have default values computed when their counterparts are missing in the request body.\n\nThe default values are derived from the `site`. Specifically:\n- All date-related placeholders are computed based on the `site.homeBase.timezone` field.\n- The **__country__** placeholder is replaced with the value of `site.homeBase.address.country`.\n\nIf these values are missing in `site`, the following defaults are used:\n- `UTC` for `timezone`\n- `DE` for `country`\n","schema":{"type":"string"}}}},"paths":{"/sequential-id/sequenceSchemaBatch/nextIds":{"post":{"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaBatchNextIdResponse"}}}},"400":{"$ref":"#/components/responses/trait_yaasAware_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"}},"summary":"Creating nextIds for sequence schema types","description":"Creates and returns multiple `nextIds` for the specified sequence schemas.\nIf you specify the `sequenceKey` in request body, the `nextIds` numbers are generated for this sequence, otherwise default pool is used.","parameters":[{"$ref":"#/components/parameters/trait_siteCode"}],"operationId":"POST-sequential-id-create-schema-types-nextIds","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaBatchNextIdRequest"}}},"required":true},"tags":["Sequential IDs management"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/api-references-1/readme/api-reference-33/sequential-ids-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
