Skip to main content

Health Multiples pacientes

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 de tipo SS-recaudo donde se informa el tercero responsable del recaudo

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": 9900001023,
"type_document_id": 1,
"prefix": "SETP",
"resolution_number": "18760000001",
"customer": {
"identification_number": "900123456",
"name": "Proveedor Ejemplo S.A.S.",
"phone": "3001234567",
"address": "Calle Falsa 123",
"email": "contacto@proveedorejemplo.com",
"merchant_registration": "000001",
"type_document_identification_id": 3,
"type_organization_id": 2,
"municipality_id_fact": 11001,
"type_regime_id": 2,
"type_liability_id": 117
},
"tax_totals": [],
"legal_monetary_totals": {
"line_extension_amount": "120000.00",
"tax_exclusive_amount": "120000.00",
"tax_inclusive_amount": "120000.00",
"allowance_total_amount": "0.00",
"charge_total_amount": "0.00",
"payable_amount": "120000.00"
},
"allowance_charges": [],
"invoice_lines": [
{
"unit_measure_id": "70",
"invoiced_quantity": 3,
"line_extension_amount": "120000.00",
"notes": null,
"free_of_charge_indicator": false,
"allowance_charges": [],
"tax_totals": [],
"description": "Consultas médicas",
"code": "CONS01",
"type_item_identification_id": 4,
"price_amount": "40000.00",
"base_quantity": 3
}
],
"with_holding_tax_total": [],
"health_fields": {
"invoice_period_start_date": "2025-05-01",
"invoice_period_end_date": "2025-05-31",
"health_type_operation_id": 1,
"print_users_info_to_pdf": true,
"users_info": [
{
"provider_code": "900123456",
"health_type_document_identification_id": 1,
"identification_number": "11223344",
"surname": "Apellido1",
"second_surname": "Apellido2",
"first_name": "Nombre1",
"middle_name": "Nombre2",
"health_type_user_id": 4,
"health_contracting_payment_method_id": 4,
"health_coverage_id": 10,
"co_payment": 5000,
"moderating_fee": "0",
"recovery_fee": 0,
"shared_payment": 0
},
{
"provider_code": "900123456",
"health_type_document_identification_id": 1,
"identification_number": "55667788",
"surname": "Apellido3",
"second_surname": "Apellido4",
"first_name": "Nombre3",
"middle_name": "Nombre4",
"health_type_user_id": 4,
"health_contracting_payment_method_id": 4,
"health_coverage_id": 10,
"co_payment": 0,
"moderating_fee": "4000",
"recovery_fee": 0,
"shared_payment": 0
},
{
"provider_code": "900123456",
"health_type_document_identification_id": 1,
"identification_number": "99887766",
"surname": "Apellido5",
"second_surname": "Apellido6",
"first_name": "Nombre5",
"middle_name": "Nombre6",
"health_type_user_id": 4,
"health_contracting_payment_method_id": 4,
"health_coverage_id": 10,
"co_payment": 0,
"moderating_fee": "0",
"recovery_fee": 0,
"shared_payment": 0
}
]
}
}

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": 9900001023,
"type_document_id": 1,
"prefix": "SETP",
"resolution_number": "18760000001",
"customer": {
"identification_number": "900123456",
"name": "Proveedor Ejemplo S.A.S.",
"phone": "3001234567",
"address": "Calle Falsa 123",
"email": "contacto@proveedorejemplo.com",
"merchant_registration": "000001",
"type_document_identification_id": 3,
"type_organization_id": 2,
"municipality_id_fact": 11001,
"type_regime_id": 2,
"type_liability_id": 117
},
"tax_totals": [],
"legal_monetary_totals": {
"line_extension_amount": "120000.00",
"tax_exclusive_amount": "120000.00",
"tax_inclusive_amount": "120000.00",
"allowance_total_amount": "0.00",
"charge_total_amount": "0.00",
"payable_amount": "120000.00"
},
"allowance_charges": [],
"invoice_lines": [
{
"unit_measure_id": "70",
"invoiced_quantity": 3,
"line_extension_amount": "120000.00",
"notes": null,
"free_of_charge_indicator": false,
"allowance_charges": [],
"tax_totals": [],
"description": "Consultas médicas",
"code": "CONS01",
"type_item_identification_id": 4,
"price_amount": "40000.00",
"base_quantity": 3
}
],
"with_holding_tax_total": [],
"health_fields": {
"invoice_period_start_date": "2025-05-01",
"invoice_period_end_date": "2025-05-31",
"health_type_operation_id": 1,
"print_users_info_to_pdf": true,
"users_info": [
{
"provider_code": "900123456",
"health_type_document_identification_id": 1,
"identification_number": "11223344",
"surname": "Apellido1",
"second_surname": "Apellido2",
"first_name": "Nombre1",
"middle_name": "Nombre2",
"health_type_user_id": 4,
"health_contracting_payment_method_id": 4,
"health_coverage_id": 10,
"co_payment": 5000,
"moderating_fee": "0",
"recovery_fee": 0,
"shared_payment": 0
},
{
"provider_code": "900123456",
"health_type_document_identification_id": 1,
"identification_number": "55667788",
"surname": "Apellido3",
"second_surname": "Apellido4",
"first_name": "Nombre3",
"middle_name": "Nombre4",
"health_type_user_id": 4,
"health_contracting_payment_method_id": 4,
"health_coverage_id": 10,
"co_payment": 0,
"moderating_fee": "4000",
"recovery_fee": 0,
"shared_payment": 0
},
{
"provider_code": "900123456",
"health_type_document_identification_id": 1,
"identification_number": "99887766",
"surname": "Apellido5",
"second_surname": "Apellido6",
"first_name": "Nombre5",
"middle_name": "Nombre6",
"health_type_user_id": 4,
"health_contracting_payment_method_id": 4,
"health_coverage_id": 10,
"co_payment": 0,
"moderating_fee": "0",
"recovery_fee": 0,
"shared_payment": 0
}
]
}
}'

Probar endpoint

POST
Health Multiples pacientes
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í.