Register an e-NCF range authorized in the OFV
const url = 'https://acme.gravitastec.com/api/v1/companies/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ncf-ranges';const options = { method: 'POST', headers: { 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"environment":"testecf","ecfType":31,"from":1,"to":1,"expiresOn":"2026-04-15","lowThreshold":100}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://acme.gravitastec.com/api/v1/companies/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ncf-ranges \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --data '{ "environment": "testecf", "ecfType": 31, "from": 1, "to": 1, "expiresOn": "2026-04-15", "lowThreshold": 100 }'Registers a range in an environment of the credential’s class: ecf for a production credential, testecf or certecf for a test credential. Without environment, a production credential uses ecf and a test credential the environment its documents are issued in (testecf while the company is in the test stage, certecf afterwards). Registering the same range again returns it unchanged. Documents waiting for a number are not numbered automatically.
Authorizations
Sección titulada «Authorizations»Parameters
Sección titulada «Parameters»Path Parameters
Sección titulada «Path Parameters»Header Parameters
Sección titulada «Header Parameters»Request Bodyrequired
Sección titulada «Request Bodyrequired»object
Optional; must belong to the credential class
Required except for types 32 and 34, where it must be omitted
Responses
Sección titulada «Responses»Registered
object
Example
{ "environment": "testecf", "status": "active"}Not found or outside the credential scope
object
object
Stable snake_case rule code when the rule has one (e.g. modified_same_type, foreign_id_in_rnc, emitter_rnc_mismatch, encf_invalid, encf_type_mismatch, encf_not_in_range, encf_already_used, sequence_expiry_mismatch).
Example generated
{ "type": "example", "title": "example", "status": 1, "code": "example", "errors": [ { "path": "example", "message": "example", "code": "example" } ]}Overlaps an existing range (code range_overlap)
All validation errors with field paths; the document is not numbered
object
object
Stable snake_case rule code when the rule has one (e.g. modified_same_type, foreign_id_in_rnc, emitter_rnc_mismatch, encf_invalid, encf_type_mismatch, encf_not_in_range, encf_already_used, sequence_expiry_mismatch).
Example generated
{ "type": "example", "title": "example", "status": 1, "code": "example", "errors": [ { "path": "example", "message": "example", "code": "example" } ]}