Skip to main content

Health

Descripción

ENVIO DE FACTURA SECTOR SALUD

  • Aplica la misma documentacion que el PRIMER ENVIO DE FACTURA de la seccion 02 - PRIMEROS ENVIOS.

  • Este ejemplo ilustra como se debe utilizar la API para enviar una factura para EL SECTOR SALUD, se utliza para este fin los campos en el grupo health_fields

Endpoint

  • Método: POST
  • URL: {{BASE_URL}}/api/ubl2.1/invoice

Autenticación

Bearer {{API_TOKEN}}

Headers

HeaderValor
Content-Typeapplication/json
Acceptapplication/json

Body

Tipo: json

{
"number": 990060206,
"type_document_id": 1,
"date": "2025-01-29",
"time": "04:08:12",
"resolution_number": "18760000001",
"prefix": "SETP",
"disable_confirmation_text": true,
"establishment_name": "TORRE SOFTWARE",
"establishment_address": "BRR LIMONAR MZ 6 CS 3 ET 1 PISO 2",
"establishment_phone": "3226563672",
"establishment_municipality": 600,
"atacheddocument_name_prefix": "FES-SETP990000244-",
"establishment_email": "alternate_email@alternate.com",
"sendmail": true,
"seze": "2021-2017",
"health_fields": {
"invoice_period_start_date": "2025-01-01",
"invoice_period_end_date": "2025-01-29",
"health_type_operation_id": 1,
"print_users_info_to_pdf": true, // mostrar informacion de pacientes en el PDF
"users_info":[ // pacientes
{
"provider_code": "AF-0000500-85-XX-001", // codigo proveedor
"health_type_document_identification_id": 1, // tipo de documento de identificacion
"identification_number": "A89008003", // numero de documento de identificacion
"surname": "OBANDO",
"second_surname": "LONDOÑO",
"first_name": "ALEXANDER",
"middle_name": "ANDRES",
"health_type_user_id": 1, // tipo de usuario sector salud
"health_contracting_payment_method_id": 2, // metodo de pago del contrato
"health_coverage_id": 5, // tipo de covertura
"autorization_numbers": "A12345;604567;AX-2345", // numero de autorizacion
"mipres": "RNA3D345;664FF04567;ARXXX-2765345",
"mipres_delivery": "RN6645G-345;6-064XX54FF04567;XXX-2-OO-987D65345",
"contract_number": "1000-2021-0005698", // numero de contracto
"policy_number": "1045-2FG01-0567228", // numero de poliza
"co_payment": "3300.00", // copago
"moderating_fee": "5800.00", // cuota moderadora
"recovery_fee": "105000.00", // cuota de recuperacion
"shared_payment": "225000.00" // pago compartido
},
{
"provider_code": "AF-0000500-85-XX-002",
"identification_number": "41946692",
"health_contracting_payment_method_id": 3,
"health_coverage_id": 3,
"autorization_numbers": "A12345;604567;AX-2345",
"mipres": "RNA3D345;664FF04567;ARXXX-2765345",
"mipres_delivery": "RN6645G-345;6-064XX54FF04567;XXX-2-OO-987D65345",
"contract_number": "1000-2021-0005698",
"policy_number": "1045-2FG01-0567228",
"co_payment": "3300.00",
"moderating_fee": "5800.00",
"recovery_fee": "105000.00",
"shared_payment": "225000.00"
}
]
},
"customer": {
"identification_number": 900166483,
"dv": 1,
"name": "INVERSIONES DAVAL SAS",
"phone": "3103891693",
"address": "CLL 4 NRO 33-90",
"email": "alexanderobandolondono@gmail.com",
"merchant_registration": "0000000-00",
"type_document_identification_id": 6,
"type_organization_id": 1,
"type_liability_id": 7,
"municipality_id": 822,
"type_regime_id": 1
},
"payment_form": {
"payment_form_id": 2,
"payment_method_id": 30,
"payment_due_date": "2025-01-29",
"duration_measure": "30"
},
"prepaid_payment": {
"idpayment": "A3123856",
"prepaid_payment_type_id": 1,
"paidamount": "100000.00",
"receiveddate": "2025-01-28",
"paiddate": "2025-01-28",
"instructionid": "PRUEBA DE PREPAGO RECIBIDO"
},
"allowance_charges": [
{
"discount_id": 1,
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "230000.00",
"base_amount": "9663865.54"
}
],
"legal_monetary_totals": {
"line_extension_amount": "9663865.54",
"tax_exclusive_amount": "9663865.55",
"tax_inclusive_amount": "11500000.00",
"allowance_total_amount": "230000.00",
"charge_total_amount": "0.00",
"pre_paid_amount": "100000.00",
"payable_amount": "11170000.00"
},
"tax_totals":
[
{
"tax_id": 1,
"tax_amount": "1836134.45",
"percent": "19",
"taxable_amount": "9663865.55"
}
],
"invoice_lines":
[
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "1260504.20",
"free_of_charge_indicator": false,
"allowance_charges": [{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "30000.00",
"base_amount": "1500000.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "239495.80",
"taxable_amount": "1260504.20",
"percent": "19.00"
}
],
"description": "BONOS POR SERVICIOS",
"code": "BONOS",
"type_item_identification_id": 4,
"price_amount": "1290504.20",
"base_quantity": "1"
}
,
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "8403361.34",
"free_of_charge_indicator": false,
"allowance_charges": [{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "200000.00",
"base_amount": "10000000.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "1596638.65",
"taxable_amount": "8403361.34",
"percent": "19.00"
}
],
"description": "COMISION POR SERVICIOS",
"notes": "ESTA ES UNA PRUEBA DE NOTA DE DETALLE DE LINEA.",
"code": "COMISION",
"type_item_identification_id": 4,
"price_amount": "8603361.34",
"base_quantity": "1"
}

]
}

Ejemplo cURL

curl --request POST \
--url "{{BASE_URL}}/api/ubl2.1/invoice" \
--header "Authorization: Bearer {{API_TOKEN}}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"number": 990060206,
"type_document_id": 1,
"date": "2025-01-29",
"time": "04:08:12",
"resolution_number": "18760000001",
"prefix": "SETP",
"disable_confirmation_text": true,
"establishment_name": "TORRE SOFTWARE",
"establishment_address": "BRR LIMONAR MZ 6 CS 3 ET 1 PISO 2",
"establishment_phone": "3226563672",
"establishment_municipality": 600,
"atacheddocument_name_prefix": "FES-SETP990000244-",
"establishment_email": "alternate_email@alternate.com",
"sendmail": true,
"seze": "2021-2017",
"health_fields": {
"invoice_period_start_date": "2025-01-01",
"invoice_period_end_date": "2025-01-29",
"health_type_operation_id": 1,
"print_users_info_to_pdf": true, // mostrar informacion de pacientes en el PDF
"users_info":[ // pacientes
{
"provider_code": "AF-0000500-85-XX-001", // codigo proveedor
"health_type_document_identification_id": 1, // tipo de documento de identificacion
"identification_number": "A89008003", // numero de documento de identificacion
"surname": "OBANDO",
"second_surname": "LONDOÑO",
"first_name": "ALEXANDER",
"middle_name": "ANDRES",
"health_type_user_id": 1, // tipo de usuario sector salud
"health_contracting_payment_method_id": 2, // metodo de pago del contrato
"health_coverage_id": 5, // tipo de covertura
"autorization_numbers": "A12345;604567;AX-2345", // numero de autorizacion
"mipres": "RNA3D345;664FF04567;ARXXX-2765345",
"mipres_delivery": "RN6645G-345;6-064XX54FF04567;XXX-2-OO-987D65345",
"contract_number": "1000-2021-0005698", // numero de contracto
"policy_number": "1045-2FG01-0567228", // numero de poliza
"co_payment": "3300.00", // copago
"moderating_fee": "5800.00", // cuota moderadora
"recovery_fee": "105000.00", // cuota de recuperacion
"shared_payment": "225000.00" // pago compartido
},
{
"provider_code": "AF-0000500-85-XX-002",
"identification_number": "41946692",
"health_contracting_payment_method_id": 3,
"health_coverage_id": 3,
"autorization_numbers": "A12345;604567;AX-2345",
"mipres": "RNA3D345;664FF04567;ARXXX-2765345",
"mipres_delivery": "RN6645G-345;6-064XX54FF04567;XXX-2-OO-987D65345",
"contract_number": "1000-2021-0005698",
"policy_number": "1045-2FG01-0567228",
"co_payment": "3300.00",
"moderating_fee": "5800.00",
"recovery_fee": "105000.00",
"shared_payment": "225000.00"
}
]
},
"customer": {
"identification_number": 900166483,
"dv": 1,
"name": "INVERSIONES DAVAL SAS",
"phone": "3103891693",
"address": "CLL 4 NRO 33-90",
"email": "alexanderobandolondono@gmail.com",
"merchant_registration": "0000000-00",
"type_document_identification_id": 6,
"type_organization_id": 1,
"type_liability_id": 7,
"municipality_id": 822,
"type_regime_id": 1
},
"payment_form": {
"payment_form_id": 2,
"payment_method_id": 30,
"payment_due_date": "2025-01-29",
"duration_measure": "30"
},
"prepaid_payment": {
"idpayment": "A3123856",
"prepaid_payment_type_id": 1,
"paidamount": "100000.00",
"receiveddate": "2025-01-28",
"paiddate": "2025-01-28",
"instructionid": "PRUEBA DE PREPAGO RECIBIDO"
},
"allowance_charges": [
{
"discount_id": 1,
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "230000.00",
"base_amount": "9663865.54"
}
],
"legal_monetary_totals": {
"line_extension_amount": "9663865.54",
"tax_exclusive_amount": "9663865.55",
"tax_inclusive_amount": "11500000.00",
"allowance_total_amount": "230000.00",
"charge_total_amount": "0.00",
"pre_paid_amount": "100000.00",
"payable_amount": "11170000.00"
},
"tax_totals":
[
{
"tax_id": 1,
"tax_amount": "1836134.45",
"percent": "19",
"taxable_amount": "9663865.55"
}
],
"invoice_lines":
[
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "1260504.20",
"free_of_charge_indicator": false,
"allowance_charges": [{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "30000.00",
"base_amount": "1500000.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "239495.80",
"taxable_amount": "1260504.20",
"percent": "19.00"
}
],
"description": "BONOS POR SERVICIOS",
"code": "BONOS",
"type_item_identification_id": 4,
"price_amount": "1290504.20",
"base_quantity": "1"
}
,
{
"unit_measure_id": 70,
"invoiced_quantity": "1",
"line_extension_amount": "8403361.34",
"free_of_charge_indicator": false,
"allowance_charges": [{
"charge_indicator": false,
"allowance_charge_reason": "DESCUENTO GENERAL",
"amount": "200000.00",
"base_amount": "10000000.00"
}
],
"tax_totals": [
{
"tax_id": 1,
"tax_amount": "1596638.65",
"taxable_amount": "8403361.34",
"percent": "19.00"
}
],
"description": "COMISION POR SERVICIOS",
"notes": "ESTA ES UNA PRUEBA DE NOTA DE DETALLE DE LINEA.",
"code": "COMISION",
"type_item_identification_id": 4,
"price_amount": "8603361.34",
"base_quantity": "1"
}

]
}'

Probar endpoint

POST
Health
BASE URL
Se guarda localmente en tu navegador.
BEARER TOKEN
Se guarda solo en esta sesión/pestaña.
URL FINAL
/api/ubl2.1/invoice
BODY JSON
RESPUESTA
Envía la solicitud para ver la respuesta aquí.