Set the issuer
curl --request PUT \
--url https://api.cufea.com/v1/tenant/issuer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": {
"city_code": "11001",
"city_name": "Bogotá, D.C.",
"department_code": "11",
"department_name": "Bogotá",
"line": "Cra 7 # 1-10",
"country_code": "CO",
"country_name": "Colombia",
"postal_code": "<string>"
},
"fiscal_responsibilities": [
"R-99-PN"
],
"id_number": "<string>",
"registration_name": "<string>",
"software_id": "<string>",
"test_set_id": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: {
city_code: '11001',
city_name: 'Bogotá, D.C.',
department_code: '11',
department_name: 'Bogotá',
line: 'Cra 7 # 1-10',
country_code: 'CO',
country_name: 'Colombia',
postal_code: '<string>'
},
fiscal_responsibilities: ['R-99-PN'],
id_number: '<string>',
registration_name: '<string>',
software_id: '<string>',
test_set_id: '<string>'
})
};
fetch('https://api.cufea.com/v1/tenant/issuer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cufea.com/v1/tenant/issuer"
payload = {
"address": {
"city_code": "11001",
"city_name": "Bogotá, D.C.",
"department_code": "11",
"department_name": "Bogotá",
"line": "Cra 7 # 1-10",
"country_code": "CO",
"country_name": "Colombia",
"postal_code": "<string>"
},
"fiscal_responsibilities": ["R-99-PN"],
"id_number": "<string>",
"registration_name": "<string>",
"software_id": "<string>",
"test_set_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"address": {
"city_code": "11001",
"city_name": "Bogotá, D.C.",
"department_code": "11",
"department_name": "Bogotá",
"line": "Cra 7 # 1-10",
"country_code": "CO",
"country_name": "Colombia",
"postal_code": "<string>"
},
"fiscal_responsibilities": [
"R-99-PN"
],
"id_number": "<string>",
"id_type": "11",
"organization_type": "1",
"registration_name": "<string>",
"software_id": "<string>",
"tax_scheme": "01",
"test_set_id": "<string>",
"check_digit": "<string>",
"email": "<string>",
"production_software_id": "<string>",
"trade_name": "<string>"
}{
"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>"
}
}Set the issuer
Replaces the issuer party and the DIAN software and test set ids. The software PIN is a secret: set it with PUT /v1/tenant/secrets/software_pin. Omitting production_software_id keeps the one already stored (send it to register the production software). Returns the stored issuer: the owner may read their own data. A tenant provisioned by a partner keeps the NIT its client authorized: another identification answers 409 issuer_nit_locked.
PUT
/
v1
/
tenant
/
issuer
Set the issuer
curl --request PUT \
--url https://api.cufea.com/v1/tenant/issuer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": {
"city_code": "11001",
"city_name": "Bogotá, D.C.",
"department_code": "11",
"department_name": "Bogotá",
"line": "Cra 7 # 1-10",
"country_code": "CO",
"country_name": "Colombia",
"postal_code": "<string>"
},
"fiscal_responsibilities": [
"R-99-PN"
],
"id_number": "<string>",
"registration_name": "<string>",
"software_id": "<string>",
"test_set_id": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: {
city_code: '11001',
city_name: 'Bogotá, D.C.',
department_code: '11',
department_name: 'Bogotá',
line: 'Cra 7 # 1-10',
country_code: 'CO',
country_name: 'Colombia',
postal_code: '<string>'
},
fiscal_responsibilities: ['R-99-PN'],
id_number: '<string>',
registration_name: '<string>',
software_id: '<string>',
test_set_id: '<string>'
})
};
fetch('https://api.cufea.com/v1/tenant/issuer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.cufea.com/v1/tenant/issuer"
payload = {
"address": {
"city_code": "11001",
"city_name": "Bogotá, D.C.",
"department_code": "11",
"department_name": "Bogotá",
"line": "Cra 7 # 1-10",
"country_code": "CO",
"country_name": "Colombia",
"postal_code": "<string>"
},
"fiscal_responsibilities": ["R-99-PN"],
"id_number": "<string>",
"registration_name": "<string>",
"software_id": "<string>",
"test_set_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"address": {
"city_code": "11001",
"city_name": "Bogotá, D.C.",
"department_code": "11",
"department_name": "Bogotá",
"line": "Cra 7 # 1-10",
"country_code": "CO",
"country_name": "Colombia",
"postal_code": "<string>"
},
"fiscal_responsibilities": [
"R-99-PN"
],
"id_number": "<string>",
"id_type": "11",
"organization_type": "1",
"registration_name": "<string>",
"software_id": "<string>",
"tax_scheme": "01",
"test_set_id": "<string>",
"check_digit": "<string>",
"email": "<string>",
"production_software_id": "<string>",
"trade_name": "<string>"
}{
"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
Body
application/json
The issuer: a party with the same fields as an invoice customer, plus the DIAN ids.
Response
Successful Response
The issuer: a party with the same fields as an invoice customer, plus the DIAN ids.