curl --request PUT \
--url https://api.cufea.com/v1/tenant/numbering-range \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"end_date": "2023-12-25",
"prefix": "<string>",
"range_from": 499999999,
"range_to": 499999999,
"resolution_number": "18760000001",
"start_date": "2023-12-25"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
end_date: '2023-12-25',
prefix: '<string>',
range_from: 499999999,
range_to: 499999999,
resolution_number: '18760000001',
start_date: '2023-12-25'
})
};
fetch('https://api.cufea.com/v1/tenant/numbering-range', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cufea.com/v1/tenant/numbering-range"
payload = {
"end_date": "2023-12-25",
"prefix": "<string>",
"range_from": 499999999,
"range_to": 499999999,
"resolution_number": "18760000001",
"start_date": "2023-12-25"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"end_date": "2023-12-25",
"prefix": "<string>",
"range_from": 499999999,
"range_to": 499999999,
"resolution_number": "18760000001",
"start_date": "2023-12-25"
}{
"code": "unauthorized",
"detail": "Missing or invalid API key.",
"request_id": "3668a7374b1e4314b2f932a5620da1f1",
"status": 401,
"title": "Unauthorized",
"type": "urn:cufea:problem:unauthorized"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"dian": {
"rule": "<string>",
"text": "<string>"
}
}{
"code": "validation_error",
"detail": "The request is not valid; see `errors` for the offending fields.",
"errors": [
{
"loc": [
"body",
"customer"
],
"msg": "Field required"
},
{
"loc": [
"body",
"lines"
],
"msg": "List should have at least 1 item after validation, not 0"
}
],
"request_id": "88272d6eb903438690d3193e3113270a",
"status": 422,
"title": "Request validation failed",
"type": "urn:cufea:problem:validation_error"
}{
"code": "rate_limited",
"detail": "This API key made more than 120 requests in the current window. Retry after 17 seconds.",
"request_id": "5d1c0b6f2e8a4f0c9a7b3e2d1c0f9a8b",
"status": 429,
"title": "Too Many Requests",
"type": "urn:cufea:problem:rate_limited"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"dian": {
"rule": "<string>",
"text": "<string>"
}
}Add or update one numbering range
Adds or updates the range of its resolution and prefix; the other series of the tenant stay as they are. The technical key is a secret: set it with PUT /v1/tenant/secrets/technical_key. A replacement may not end below a number already issued for that series (409 numbering_range_in_use). Send ?environment=production to prepare a production range before promotion. The sandbox range is Cufea’s.
curl --request PUT \
--url https://api.cufea.com/v1/tenant/numbering-range \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"end_date": "2023-12-25",
"prefix": "<string>",
"range_from": 499999999,
"range_to": 499999999,
"resolution_number": "18760000001",
"start_date": "2023-12-25"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
end_date: '2023-12-25',
prefix: '<string>',
range_from: 499999999,
range_to: 499999999,
resolution_number: '18760000001',
start_date: '2023-12-25'
})
};
fetch('https://api.cufea.com/v1/tenant/numbering-range', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cufea.com/v1/tenant/numbering-range"
payload = {
"end_date": "2023-12-25",
"prefix": "<string>",
"range_from": 499999999,
"range_to": 499999999,
"resolution_number": "18760000001",
"start_date": "2023-12-25"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"end_date": "2023-12-25",
"prefix": "<string>",
"range_from": 499999999,
"range_to": 499999999,
"resolution_number": "18760000001",
"start_date": "2023-12-25"
}{
"code": "unauthorized",
"detail": "Missing or invalid API key.",
"request_id": "3668a7374b1e4314b2f932a5620da1f1",
"status": 401,
"title": "Unauthorized",
"type": "urn:cufea:problem:unauthorized"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"dian": {
"rule": "<string>",
"text": "<string>"
}
}{
"code": "validation_error",
"detail": "The request is not valid; see `errors` for the offending fields.",
"errors": [
{
"loc": [
"body",
"customer"
],
"msg": "Field required"
},
{
"loc": [
"body",
"lines"
],
"msg": "List should have at least 1 item after validation, not 0"
}
],
"request_id": "88272d6eb903438690d3193e3113270a",
"status": 422,
"title": "Request validation failed",
"type": "urn:cufea:problem:validation_error"
}{
"code": "rate_limited",
"detail": "This API key made more than 120 requests in the current window. Retry after 17 seconds.",
"request_id": "5d1c0b6f2e8a4f0c9a7b3e2d1c0f9a8b",
"status": 429,
"title": "Too Many Requests",
"type": "urn:cufea:problem:rate_limited"
}{
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"dian": {
"rule": "<string>",
"text": "<string>"
}
}Authorizations
Query Parameters
Stage to read or write; default: the stage of this API key. A key reads only its own stage. It writes only its own stage too, with one exception: a test key may write (never read) the production secrets and ranges the promotion needs. A sandbox key writes no configuration: the sandbox stage is Cufea's.
sandbox, test, production Body
The DIAN numbering resolution. The technical key is a secret, set apart.
Response
Successful Response
The DIAN numbering resolution. The technical key is a secret, set apart.