{
  "info": {
    "name": "API Factus V2",
    "description": null,
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Auth",
      "item": [
        {
          "name": "auth",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/autenticacion/auth/](https://developers.factus.com.co/autenticacion/auth/)",
            "url": {
              "raw": "{{url_api}}/oauth/token",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "oauth",
                "token"
              ],
              "query": [],
              "variable": []
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "grant_type",
                  "disabled": false,
                  "type": "text",
                  "value": "password"
                },
                {
                  "key": "client_id",
                  "disabled": false,
                  "type": "text",
                  "value": "{{client_id}}"
                },
                {
                  "key": "client_secret",
                  "disabled": false,
                  "type": "text",
                  "value": "{{client_secret}}"
                },
                {
                  "key": "username",
                  "disabled": false,
                  "type": "text",
                  "value": "{{email}}"
                },
                {
                  "key": "password",
                  "disabled": false,
                  "type": "text",
                  "value": "{{password}}"
                }
              ]
            }
          }
        },
        {
          "name": "Refresh Token",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver documentación:**  \n[https://developers.factus.com.co/autenticacion/refresh-token/](https://developers.factus.com.co/autenticacion/refresh-token/)",
            "url": {
              "raw": "{{url_api}}/oauth/token",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "oauth",
                "token"
              ],
              "query": [],
              "variable": []
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "grant_type",
                  "disabled": false,
                  "type": "text",
                  "value": "refresh_token"
                },
                {
                  "key": "client_id",
                  "disabled": false,
                  "type": "text",
                  "value": "{{client_id}}"
                },
                {
                  "key": "client_secret",
                  "disabled": false,
                  "type": "text",
                  "value": "{{client_secret}}"
                },
                {
                  "key": "refresh_token",
                  "disabled": false,
                  "type": "text",
                  "value": "def50200325e90a72ad378d704c108cefa75c5c4a513ca6992fdce87b805b5aff2210857f63e4c0863284f6cfe38dbaa8c9f6dc50b9cb6d0bf8bcca29d5df22a8a7aa0b8efbe44c00cbeb05796d9a1f17fc9850b748e5ec64c8157ea5026dac9943ef3bfebbf1c7c9b0f44d300d7dd20fc27dcbf1791970dc29dc2232afac3fab3d6a253a12e51bcd590c62d5b3ce41d7957ba469b168fc5b557795be11455e22e242cc2f821c923ae7d42b7620a2d37d24ea64a72740c5617e54bd97c20b5be47a3a8d2a06c3de634a5a03cea1640653389ba1e517c63fdcee6a829e09c416d2250d860da6b964a1eed521b142203b3bbf2c139bd16cca0cb343e63bc9e377920dc6ce328219413c9da329de5cd2283d2b423aaf971096e0b1565689fb39bb7d99a94955385bf7ee6ba66949543e18a7c7abb880f8fd7ad376bd1bb07a1cdbf5588071c7e55816a1d14bf84530e316ad2eefd3913c2118e57a19e624869401912357954a20d9694559151b7c1a687e106d405076703f3a0c3002ff0c12b81586c8d8bbd"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Facturas",
      "item": [
        {
          "name": "Salud",
          "item": [
            {
              "name": "SS-CUFE",
              "request": {
                "method": "POST",
                "header": [],
                "auth": {
                  "type": "noauth"
                },
                "description": "",
                "url": {
                  "raw": "{{url_api}}/v2/bills/validate",
                  "protocol": "",
                  "host": [
                    "{{url_api}}"
                  ],
                  "path": [
                    "v2",
                    "bills",
                    "validate"
                  ],
                  "query": [],
                  "variable": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reference_code\": \"{{bill_reference_code}}\",\n  \"document\": \"01\",\n  \"numbering_range_id\": 4,\n  \"operation_type\": \"SS-CUFE\",\n  \"send_email\": false,\n  \"billing_period\": {\n    \"start_date\": \"2025-01-01\",\n    \"start_time\": \"05:11:00\",\n    \"end_date\": \"2025-01-02\",\n    \"end_time\": \"11:59:59\"\n  },\n  \"payment_details\": [\n    {\n      \"payment_form\": 1,\n      \"payment_method_code\": \"10\",\n      \"amount\": \"10000\"\n    }\n  ],\n  \"health\": { // Campos de datos del sector salud\n    \"provider_code\": \"1920304050\",\n    \"payment_method_code\": \"04\",\n    \"coverage_code\": \"10\",\n    \"contract_number\": \"CONT1230\",\n    \"policy_number\": \"\"\n  },\n  \"prepayment_details\": [\n    {\n      \"reference_code\": \"1\",\n      \"received_date\": \"2025-08-1\",\n      \"concept_code\": \"01\",\n      \"amount\": \"5000.00\",\n      \"note\": \"texto libre para notas\"\n    }\n  ],\n  \"customer\": {\n    \"identification_document_code\": \"13\",\n    \"identification\": \"123456789\",\n    \"names\": \"Alan Turing\",\n    \"address\": \"calle 1 # 1-1\",\n    \"email\": \"alan.company@email.com\",\n    \"phone\": \"1234567890\",\n    \"legal_organization_code\": \"2\",\n    \"tribute_code\": \"ZZ\",\n    \"municipality_code\": \"68679\"\n  },\n  \"items\": [\n    {\n      \"code_reference\": \"PROD-000A\",\n      \"name\": \"xxxxxxxxxxxx\",\n      \"quantity\": \"1.00\",\n      \"discount_rate\": \"0.00\",\n      \"price\": \"10000.00\",\n      \"unit_measure_code\": \"94\",\n      \"standard_code\": \"999\",\n      \"taxes\": [\n        {\n          \"is_excluded\": true\n        }\n      ]\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "SS-Recaudo - ingreso propio",
              "request": {
                "method": "POST",
                "header": [],
                "auth": {
                  "type": "noauth"
                },
                "description": "",
                "url": {
                  "raw": "{{url_api}}/v2/bills/validate",
                  "protocol": "",
                  "host": [
                    "{{url_api}}"
                  ],
                  "path": [
                    "v2",
                    "bills",
                    "validate"
                  ],
                  "query": [],
                  "variable": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reference_code\": \"{{bill_reference_code}}\",\n  \"document\": \"01\",\n  \"numbering_range_id\": 4,\n  \"operation_type\": \"SS-Recaudo\",\n  \"send_email\": false,\n  \"payment_details\": [\n    {\n      \"payment_form\": 1,\n      \"payment_method_code\": \"10\",\n      \"amount\": \"10000\"\n    }\n  ],\n  \"beneficiary\": {\n    \"identification_document_code\": \"CC\",\n    \"identification_number\": \"12345678\",\n    \"names\": \"\",\n    \"surnames\": \"\"\n  },\n  \"customer\": {\n    \"identification_document_code\": \"13\",\n    \"identification\": \"123456789\",\n    \"names\": \"Alan Turing\",\n    \"address\": \"calle 1 # 1-1\",\n    \"email\": \"alan.company@email.com\",\n    \"phone\": \"1234567890\",\n    \"legal_organization_code\": \"2\",\n    \"tribute_code\": \"ZZ\",\n    \"municipality_code\": \"68679\"\n  },\n  \"items\": [\n    {\n      \"scheme_id\": 0,\n      \"collection_concept_code\": \"PAC\",\n      \"code_reference\": \"PROD-000A\",\n      \"name\": \"Servicio de salud\",\n      \"quantity\": \"1.00\",\n      \"discount_rate\": \"0.00\",\n      \"price\": \"10000.00\",\n      \"unit_measure_code\": \"94\",\n      \"standard_code\": \"999\",\n      \"taxes\": [\n        {\n          \"is_excluded\": true\n        }\n      ]\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "SS-Recaudo - ingreso terceros",
              "request": {
                "method": "POST",
                "header": [],
                "auth": {
                  "type": "noauth"
                },
                "description": "",
                "url": {
                  "raw": "{{url_api}}/v2/bills/validate",
                  "protocol": "",
                  "host": [
                    "{{url_api}}"
                  ],
                  "path": [
                    "v2",
                    "bills",
                    "validate"
                  ],
                  "query": [],
                  "variable": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reference_code\": \"{{bill_reference_code}}\",\n  \"document\": \"01\",\n  \"numbering_range_id\": 4,\n  \"operation_type\": \"SS-Recaudo\",\n  \"send_email\": false,\n  \"payment_details\": [\n    {\n      \"payment_form\": 1,\n      \"payment_method_code\": \"10\",\n      \"amount\": \"10000\"\n    }\n  ],\n  \"beneficiary\": {\n    \"identification_document_code\": \"CC\",\n    \"identification_number\": \"12345678\",\n    \"names\": \"Pepito\",\n    \"surnames\": \"Perez\"\n  },\n  \"customer\": {\n    \"identification_document_code\": \"13\",\n    \"identification\": \"123456789\",\n    \"names\": \"Alan Turing\",\n    \"address\": \"calle 1 # 1-1\",\n    \"email\": \"alan.company@email.com\",\n    \"phone\": \"1234567890\",\n    \"legal_organization_code\": \"2\",\n    \"tribute_code\": \"ZZ\",\n    \"municipality_code\": \"68679\"\n  },\n  \"items\": [\n    {\n      \"scheme_id\": 1,\n      \"collection_concept_code\": \"PAC\",\n      \"code_reference\": \"PROD-000A\",\n      \"name\": \"Servicio de salud\",\n      \"quantity\": \"1.00\",\n      \"discount_rate\": \"0.00\",\n      \"price\": \"10000.00\",\n      \"unit_measure_code\": \"94\",\n      \"standard_code\": \"999\",\n      \"taxes\": [\n        {\n          \"is_excluded\": true\n        }\n      ],\n      \"mandate\": {\n        \"identification_document_code\": \"13\",\n        \"identification\": \"123456789\"\n      }\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "SS-Reporte",
              "request": {
                "method": "POST",
                "header": [],
                "auth": {
                  "type": "noauth"
                },
                "description": "",
                "url": {
                  "raw": "{{url_api}}/v2/bills/validate",
                  "protocol": "",
                  "host": [
                    "{{url_api}}"
                  ],
                  "path": [
                    "v2",
                    "bills",
                    "validate"
                  ],
                  "query": [],
                  "variable": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reference_code\": \"{{bill_reference_code}}\",\n  \"document\": \"01\",\n  \"numbering_range_id\": 4,\n  \"operation_type\": \"SS-Reporte\",\n  \"send_email\": false,\n  \"billing_period\": {\n    \"start_date\": \"2025-01-01\",\n    \"start_time\": \"05:11:00\",\n    \"end_date\": \"2025-01-02\",\n    \"end_time\": \"11:59:59\"\n  },\n  \"payment_details\": [\n    {\n      \"payment_form\": 1,\n      \"payment_method_code\": \"10\",\n      \"amount\": \"10000\"\n    }\n  ],\n  \"health\": {\n    \"provider_code\": \"1920304050\",\n    \"payment_method_code\": \"04\",\n    \"coverage_code\": \"10\",\n    \"contract_number\": \"CONT1230\",\n    \"policy_number\": \"\"\n  },\n  \"prepayment_details\": [\n    {\n      \"reference_code\": \"1\",\n      \"received_date\": \"2025-08-1\",\n      \"concept_code\": \"01\",\n      \"amount\": \"5000.00\",\n      \"note\": \"texto libre para notas\"\n    }\n  ],\n  \"customer\": {\n    \"identification_document_code\": \"13\",\n    \"identification\": \"123456789\",\n    \"names\": \"Alan Turing\",\n    \"address\": \"calle 1 # 1-1\",\n    \"email\": \"alan.company@email.com\",\n    \"phone\": \"1234567890\",\n    \"legal_organization_code\": \"2\",\n    \"tribute_code\": \"ZZ\",\n    \"municipality_code\": \"68679\"\n  },\n  \"items\": [\n    {\n      \"code_reference\": \"PROD-000A\",\n      \"name\": \"xxxxxxxxxxxxxx\",\n      \"quantity\": \"1.00\",\n      \"discount_rate\": \"0.00\",\n      \"price\": \"10000.00\",\n      \"unit_measure_code\": \"94\",\n      \"standard_code\": \"999\",\n      \"taxes\": [\n        {\n          \"is_excluded\": true\n        }\n      ]\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "SS-SinAporte",
              "request": {
                "method": "POST",
                "header": [],
                "auth": {
                  "type": "noauth"
                },
                "description": "",
                "url": {
                  "raw": "{{url_api}}/v2/bills/validate",
                  "protocol": "",
                  "host": [
                    "{{url_api}}"
                  ],
                  "path": [
                    "v2",
                    "bills",
                    "validate"
                  ],
                  "query": [],
                  "variable": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reference_code\": \"{{bill_reference_code}}\",\n  \"document\": \"01\",\n  \"numbering_range_id\": 4,\n  \"operation_type\": \"SS-SinAporte\",\n  \"send_email\": false,\n  \"billing_period\": {\n    \"start_date\": \"2025-01-01\",\n    \"start_time\": \"05:11:00\",\n    \"end_date\": \"2025-01-02\",\n    \"end_time\": \"11:59:59\"\n  },\n  \"payment_details\": [\n    {\n      \"payment_form\": 1,\n      \"payment_method_code\": \"10\",\n      \"amount\": \"10000\"\n    }\n  ],\n  \"health\": {\n    \"provider_code\": \"1920304050\",\n    \"payment_method_code\": \"04\",\n    \"coverage_code\": \"10\",\n    \"contract_number\": \"CONT1230\",\n    \"policy_number\": \"\"\n  },\n  \"prepayment_details\": [\n    {\n      \"reference_code\": \"1\",\n      \"received_date\": \"2025-08-1\",\n      \"concept_code\": \"01\",\n      \"amount\": \"5000.00\",\n      \"note\": \"texto libre para notas\"\n    }\n  ],\n  \"customer\": {\n    \"identification_document_code\": \"13\",\n    \"identification\": \"123456789\",\n    \"names\": \"Alan Turing\",\n    \"address\": \"calle 1 # 1-1\",\n    \"email\": \"alan.company@email.com\",\n    \"phone\": \"1234567890\",\n    \"legal_organization_code\": \"2\",\n    \"tribute_code\": \"ZZ\",\n    \"municipality_code\": \"68679\"\n  },\n  \"items\": [\n    {\n      \"code_reference\": \"PROD-000A\",\n      \"name\": \"xxxxxxxxxxxxxx\",\n      \"quantity\": \"1.00\",\n      \"discount_rate\": \"0.00\",\n      \"price\": \"10000.00\",\n      \"unit_measure_code\": \"94\",\n      \"standard_code\": \"999\",\n      \"taxes\": [\n        {\n          \"is_excluded\": true\n        }\n      ]\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            }
          ]
        },
        {
          "name": "Crear y validar",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Documentación:**\n\n[https://developers.factus.com.co/facturas/crear-y-validar/](https://developers.factus.com.co/facturas/crear-y-validar/)",
            "url": {
              "raw": "{{url_api}}/v2/bills/validate",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "bills",
                "validate"
              ],
              "query": [],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n    \"reference_code\": \"{{bill_reference_code}}\",\n    \"document\": \"01\",\n    \"numbering_range_id\": 4,\n    \"operation_type\": \"10\", // estandar\n    \"send_email\": false,\n    \"payment_details\": [\n        {\n            \"payment_form\": 1,\n            \"payment_method_code\": \"42\",\n            \"reference_code\": \"pago-001\",\n            \"amount\": \"83300\",\n            \"due_date\": \"2026-03-30\"\n        }\n    ],\n    \"cash_rounding_amount\": \"0.00\",\n    \"observation\": \"Observacion de prueba\",\n    \"customer\": {\n        \"identification_document_code\": \"31\",\n        \"identification\": \"123456789\",\n        \"company\": \"Alan company name\",\n        \"trade_name\": \"Alan trade name\",\n        \"address\": \"calle 1 # 1-1\",\n        \"email\": \"alan.company@email.com\",\n        \"phone\": \"1234567890\",\n        \"legal_organization_code\": \"1\",\n        \"tribute_code\": \"ZZ\",\n        \"municipality_code\": \"68679\"\n    },\n    \"items\": [\n        {\n            \"code_reference\": \"PROD-000A\",\n            \"name\": \"Producto A\",\n            \"quantity\": \"1.00\",\n            \"discount_rate\": \"0.00\",\n            \"price\": \"10000.00\",\n            \"unit_measure_code\": \"94\",\n            \"standard_code\": \"999\",\n            \"taxes\": [\n                {\n                    \"code\": \"01\",\n                    \"rate\": \"19.00\"\n                }\n            ]\n        },\n        {\n            \"code_reference\": \"PROD-000B\",\n            \"name\": \"Producto B\",\n            \"quantity\": \"3.00\",\n            \"discount_rate\": \"0.00\",\n            \"price\": \"20000.00\",\n            \"unit_measure_code\": \"94\",\n            \"standard_code\": \"999\",\n            \"taxes\": [\n                {\n                    \"code\": \"01\",\n                    \"rate\": \"19.00\"\n                }\n            ]\n        }\n    ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Eliminar factura no validada",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/facturas/eliminar/](https://developers.factus.com.co/facturas/eliminar/)",
            "url": {
              "raw": "{{url_api}}/v2/bills/destroy/reference/:reference_code",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "bills",
                "destroy",
                "reference",
                ":reference_code"
              ],
              "query": [],
              "variable": [
                {
                  "key": "reference_code",
                  "value": "{{bill_reference_code}}"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Ver factura",
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/facturas/ver/](https://developers.factus.com.co/facturas/ver/)",
            "url": {
              "raw": "{{url_api}}/v2/bills/:number",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "bills",
                ":number"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": "SETP990001103"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "text"
                }
              }
            }
          }
        },
        {
          "name": "Listar Facturas",
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/facturas/listar-y-filtrar/](https://developers.factus.com.co/facturas/listar-y-filtrar/)",
            "url": {
              "raw": "{{url_api}}/v2/bills",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "bills"
              ],
              "query": [
                {
                  "key": "filter[identification]",
                  "value": "",
                  "description": "Buscar por numero de identificacion"
                },
                {
                  "key": "filter[names]",
                  "value": "",
                  "description": "Buscar por el nombre del cliente"
                },
                {
                  "key": "filter[number]",
                  "value": "",
                  "description": "Buscar por numero de factura"
                },
                {
                  "key": "filter[prefix]",
                  "value": "",
                  "description": "Buscar por prefijo de rango de numeracion"
                },
                {
                  "key": "filter[reference_code]",
                  "value": "",
                  "description": "Buscar por codigo de referencia"
                },
                {
                  "key": "filter[status]",
                  "value": "",
                  "description": "Buscar por estado del documento. 1 = validado, 0 si no esta validado"
                },
                {
                  "key": "page",
                  "value": "2"
                }
              ],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "text"
                }
              }
            }
          }
        },
        {
          "name": "Descargar PDF",
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "Ver Documentación:\n\n[https://developers.factus.com.co/facturas/descargar-pdf/](https://developers.factus.com.co/facturas/descargar-pdf/)",
            "url": {
              "raw": "{{url_api}}/v2/bills/:number/download-pdf",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "bills",
                ":number",
                "download-pdf"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": "SETP990001103"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "text"
                }
              }
            }
          }
        },
        {
          "name": "Descargar XML",
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/facturas/descargar-xml/](https://developers.factus.com.co/facturas/descargar-xml/)",
            "url": {
              "raw": "{{url_api}}/v2/bills/:number/download-xml",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "bills",
                ":number",
                "download-xml"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": "SETP990001103"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "text"
                }
              }
            }
          }
        },
        {
          "name": "Descargar XML AttachedDocument",
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "{{url_api}}/v2/bills/:number/download-attached-document-xml",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "bills",
                ":number",
                "download-attached-document-xml"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": "SETP990001103"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "text"
                }
              }
            }
          }
        },
        {
          "name": "Eventos de factura",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "{{url_api}}/v2/bills/:number/radian/events",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "bills",
                ":number",
                "radian",
                "events"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": "SETP990001095",
                  "description": "Número de factura."
                }
              ]
            }
          }
        },
        {
          "name": "Eventos de una factura",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/facturas/eventos-de-facturas/](https://developers.factus.com.co/facturas/eventos-de-facturas/)",
            "url": {
              "raw": "{{url_api}}/v2/bills/:number/radian/events",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "bills",
                ":number",
                "radian",
                "events"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": "SETP990001095",
                  "description": "Número de factura."
                }
              ]
            }
          }
        },
        {
          "name": "Aceptación tacita",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/facturas/aceptacion-tacita/](https://developers.factus.com.co/facturas/aceptacion-tacita/)",
            "url": {
              "raw": "{{url_api}}/v2/bills/:number/radian/events/:event_type",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "bills",
                ":number",
                "radian",
                "events",
                ":event_type"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": "SETP990001095"
                },
                {
                  "key": "event_type",
                  "value": "034",
                  "description": "Código del evento"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n    \"identification_document_code\": \"13\",\n    \"identification\": \"12345667\",\n    \"dv\": \"\",\n    \"first_name\": \"Pepito\",\n    \"last_name\": \"Perez\",\n    \"job_title\": \"Desarollador de software\",\n    \"organization_department\": \"Sistemas\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Obtener contenido de email",
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/facturas/obtener-contenido-de-correo/](https://developers.factus.com.co/facturas/obtener-contenido-de-correo/)",
            "url": {
              "raw": "{{url_api}}/v2/bills/:number/email-content",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "bills",
                ":number",
                "email-content"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": "SETP990001103"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "text"
                }
              }
            }
          }
        },
        {
          "name": "Enviar correo",
          "request": {
            "method": "POST",
            "header": [],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/facturas/enviar-correo/](https://developers.factus.com.co/facturas/enviar-correo/)",
            "url": {
              "raw": "{{url_api}}/v2/bills/:number/send-email",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "bills",
                ":number",
                "send-email"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": "SETP990001111"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n    \"email\": \"alanturing@enigmasas.com.com\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Notas Crédito",
      "item": [
        {
          "name": "Crear y validar",
          "request": {
            "method": "POST",
            "header": [],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/notas-credito/crear-y-validar/](https://developers.factus.com.co/notas-credito/crear-y-validar/)",
            "url": {
              "raw": "{{url_api}}/v2/credit-notes/validate",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "credit-notes",
                "validate"
              ],
              "query": [],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference_code\": \"{{credit_reference_code}}\",\n  \"correction_concept_code\": \"2\",\n  \"customization_id\": \"20\",\n  \"bill_number\": \"SETP990001131\",\n  \"numbering_range_id\": 5,\n  \"payment_details\": [\n    {\n      \"payment_form\": 1,\n      \"payment_method_code\": \"42\",\n      \"reference_code\": \"pago-001\",\n      \"amount\": \"83300\",\n      \"due_date\": \"2026-03-30\"\n    }\n  ],\n  \"cash_rounding_amount\": \"0.00\",\n  \"health\": { // Campos de datos del sector salud\n    \"provider_code\": \"1920304050\",\n    \"payment_method_code\": \"04\",\n    \"coverage_code\": \"10\",\n    \"contract_number\": \"CONT1230\",\n    \"policy_number\": \"\"\n  },\n  \"observation\": \"descripcion de prueba\",\n  \"customer\": {\n    \"identification_document_code\": \"31\",\n    \"identification\": \"123456789\",\n    \"company\": \"Alan company name\",\n    \"trade_name\": \"Alan trade name\",\n    \"address\": \"calle 1 # 1-1\",\n    \"email\": \"alan.company@email.com\",\n    \"phone\": \"1234567890\",\n    \"legal_organization_code\": \"1\",\n    \"tribute_code\": \"ZZ\",\n    \"municipality_code\": \"68679\"\n  },\n  \"items\": [\n    {\n      \"code_reference\": \"PROD-000A\",\n      \"name\": \"Producto A\",\n      \"quantity\": \"1.00\",\n      \"discount_rate\": \"0.00\",\n      \"price\": \"10000.00\",\n      \"unit_measure_code\": \"94\",\n      \"standard_code\": \"999\",\n      \"taxes\": [\n        {\n          \"code\": \"01\",\n          \"rate\": \"19.00\"\n        }\n      ]\n    },\n    {\n      \"code_reference\": \"PROD-000B\",\n      \"name\": \"Producto B\",\n      \"quantity\": \"3.00\",\n      \"discount_rate\": \"0.00\",\n      \"price\": \"20000.00\",\n      \"unit_measure_code\": \"94\",\n      \"standard_code\": \"999\",\n      \"taxes\": [\n        {\n          \"code\": \"01\",\n          \"rate\": \"19.00\"\n        }\n      ]\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Eliminar nota no validada",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/notas-credito/eliminar/](https://developers.factus.com.co/notas-credito/eliminar/)",
            "url": {
              "raw": "{{url_api}}/v2/credit-notes/reference/:reference_code",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "credit-notes",
                "reference",
                ":reference_code"
              ],
              "query": [],
              "variable": [
                {
                  "key": "reference_code",
                  "value": "{{credit_reference_code}}"
                }
              ]
            }
          }
        },
        {
          "name": "Ver nota crédito",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/notas-credito/ver/](https://developers.factus.com.co/notas-credito/ver/)",
            "url": {
              "raw": "{{url_api}}/v2/credit-notes/:number",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "credit-notes",
                ":number"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": "NC206"
                }
              ]
            }
          }
        },
        {
          "name": "Listar notas crédito",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/notas-credito/ver-filtrar/](https://developers.factus.com.co/notas-credito/ver-filtrar/)",
            "url": {
              "raw": "{{url_api}}/v2/credit-notes",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "credit-notes"
              ],
              "query": [],
              "variable": []
            }
          }
        },
        {
          "name": "Notas crédito",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "{{url_api}}/v2/credit-notes",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "credit-notes"
              ],
              "query": [],
              "variable": []
            }
          }
        },
        {
          "name": "Descargar PDF",
          "request": {
            "method": "GET",
            "header": [],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/notas-credito/descargar-pdf/](https://developers.factus.com.co/notas-credito/descargar-pdf/)",
            "url": {
              "raw": "{{url_api}}/v2/credit-notes/:number/download-pdf",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "credit-notes",
                ":number",
                "download-pdf"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": "NC206"
                }
              ]
            }
          }
        },
        {
          "name": "Descargar XML",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/notas-credito/descargar-xml/](https://developers.factus.com.co/notas-credito/descargar-xml/)",
            "url": {
              "raw": "{{url_api}}/v2/credit-notes/:number/download-xml",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "credit-notes",
                ":number",
                "download-xml"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": "NC72"
                }
              ]
            }
          }
        },
        {
          "name": "Descargar XML AttachedDocument",
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "{{url_api}}/v2/credit-notes/:number/download-attached-document-xml",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "credit-notes",
                ":number",
                "download-attached-document-xml"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": "NC72"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "text"
                }
              }
            }
          }
        },
        {
          "name": "Obtener contenido de correo",
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/notas-credito/obtener-contenido-de-correo/](https://developers.factus.com.co/notas-credito/obtener-contenido-de-correo/)",
            "url": {
              "raw": "{{url_api}}/v2/credit-notes/:number/email-content",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "credit-notes",
                ":number",
                "email-content"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": ""
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "text"
                }
              }
            }
          }
        },
        {
          "name": "Enviar correo",
          "request": {
            "method": "POST",
            "header": [],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/notas-credito/enviar-correo/](https://developers.factus.com.co/notas-credito/enviar-correo/)",
            "url": {
              "raw": "{{url_api}}/v2/bills/:number/send-email",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "bills",
                ":number",
                "send-email"
              ],
              "query": [],
              "variable": [
                {
                  "key": "number",
                  "value": ""
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n    \"email\": \"alanturing@enigmasas.com.com\",\n    \"pdf_base_64_encoded\": \"sdfajdfka....\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Rangos de numeración",
      "item": [
        {
          "name": "Ejemplos de creación de rangos",
          "item": [
            {
              "name": "Crear rango para facturación",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json",
                    "disabled": false,
                    "type": "default"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "disabled": false,
                    "type": "default"
                  }
                ],
                "auth": {
                  "type": "noauth"
                },
                "description": "",
                "url": {
                  "raw": "{{url_api}}/v2/numbering-ranges",
                  "protocol": "",
                  "host": [
                    "{{url_api}}"
                  ],
                  "path": [
                    "v2",
                    "numbering-ranges"
                  ],
                  "query": [],
                  "variable": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"document\": \"21\", // 21 para crear un rango de facturación electrónica\n    \"prefix\": \"SETP\", // Prefijo alfanumérico del rango de numeración (máx. 4 caracteres)\n    \"resolution_number\": \"18760000009\", // número de resolución\n    \"current\": 984000000 // número del consecutivo (es el numero de la siguiente factura) \n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "Crear rango para documento soporte",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json",
                    "disabled": false,
                    "type": "default"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "disabled": false,
                    "type": "default"
                  }
                ],
                "auth": {
                  "type": "noauth"
                },
                "description": "",
                "url": {
                  "raw": "{{url_api}}/v2/numbering-ranges",
                  "protocol": "",
                  "host": [
                    "{{url_api}}"
                  ],
                  "path": [
                    "v2",
                    "numbering-ranges"
                  ],
                  "query": [],
                  "variable": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"document\": \"24\", // 24 para crear un rango de documento soporte\n    \"prefix\": \"SETP\", // Prefijo alfanumérico del rango de numeración (máx. 4 caracteres)\n    \"resolution_number\": \"18760000009\", // número de resolución\n    \"current\": 1 // número del consecutivo (es el número de la siguiente documento soporte)\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "Crear rango para notas credito",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json",
                    "disabled": false,
                    "type": "default"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "disabled": false,
                    "type": "default"
                  }
                ],
                "auth": {
                  "type": "noauth"
                },
                "description": "",
                "url": {
                  "raw": "{{url_api}}/v2/numbering-ranges",
                  "protocol": "",
                  "host": [
                    "{{url_api}}"
                  ],
                  "path": [
                    "v2",
                    "numbering-ranges"
                  ],
                  "query": [],
                  "variable": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"document\": \"22\", // 22 para crear un rango de notas crédito electrónica\n    \"prefix\": \"NCCC\", // Prefijo alfanumérico (máx. 4 caracteres)\n    \"current\": 1 // número del consecutivo (es el número de la siguiente nota crédito)\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            }
          ]
        },
        {
          "name": "Listar rangos",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/rangos-de-numeracion/obtener-rangos/](https://developers.factus.com.co/rangos-de-numeracion/obtener-rangos/)",
            "url": {
              "raw": "{{url_api}}/v2/numbering-ranges",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "numbering-ranges"
              ],
              "query": [
                {
                  "key": "filter[id]",
                  "value": "",
                  "description": "ID del registro"
                },
                {
                  "key": "filter[document]",
                  "value": "21",
                  "description": "Código de documento. 21=Factura de Venta, 22=Nota Crédito, 23=Nota Débito, 24=Documento Soporte, 25=Nota de Ajuste Documento Soporte, 26=Nómina, 27=Nota de Ajuste Nómina, 28=Nota de eliminación de nómina, 30=Factura de talonario o de papel."
                },
                {
                  "key": "filter[resolution_number]",
                  "value": "",
                  "description": "Número de resolución (solo para facturas y docuentos soporte)"
                },
                {
                  "key": "filter[technical_key]",
                  "value": "",
                  "description": "Clave técnica (solo para facturas)"
                },
                {
                  "key": "filter[is_active]",
                  "value": "1",
                  "description": "1 para activo 0 para inactivo"
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Ver rango",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/rangos-de-numeracion/ver-rango/](https://developers.factus.com.co/rangos-de-numeracion/ver-rango/)",
            "url": {
              "raw": "{{url_api}}/v2/numbering-ranges/:numbering_range_id",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "numbering-ranges",
                ":numbering_range_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "numbering_range_id",
                  "value": "190",
                  "description": "ID del rango de numeracion"
                }
              ]
            }
          }
        },
        {
          "name": "Eliminar rango",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/rangos-de-numeracion/eliminar-rango/](https://developers.factus.com.co/rangos-de-numeracion/eliminar-rango/)",
            "url": {
              "raw": "{{url_api}}/v2/numbering-ranges/:numbering_range_id",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "numbering-ranges",
                ":numbering_range_id"
              ],
              "query": [],
              "variable": [
                {
                  "key": "numbering_range_id",
                  "value": "190",
                  "description": "ID del rango de numeración"
                }
              ]
            }
          }
        },
        {
          "name": "Crear rango",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/rangos-de-numeracion/crear-rango/](https://developers.factus.com.co/rangos-de-numeracion/crear-rango/)",
            "url": {
              "raw": "{{url_api}}/v2/numbering-ranges",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "numbering-ranges"
              ],
              "query": [],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n    \"document\": \"22\", \n    \"prefix\": \"CRTE\", \n    \"current\": 1\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Actualizar consecutivo",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/rangos-de-numeracion/actualizar-consecutivo/](https://developers.factus.com.co/rangos-de-numeracion/actualizar-consecutivo/)",
            "url": {
              "raw": "{{url_api}}/v2/numbering-ranges/:numbering_range_id/current",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "numbering-ranges",
                ":numbering_range_id",
                "current"
              ],
              "query": [],
              "variable": [
                {
                  "key": "numbering_range_id",
                  "value": "189"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n    \"current\": 3\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Cambiar estado",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "Ver Documentación:  \n[https://developers.factus.com.co/rangos-de-numeracion/cambiar-estado/](https://developers.factus.com.co/rangos-de-numeracion/cambiar-estado/)",
            "url": {
              "raw": "{{url_api}}/v2/numbering-ranges/:numbering_range_id/toggle-status",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "numbering-ranges",
                ":numbering_range_id",
                "toggle-status"
              ],
              "query": [],
              "variable": [
                {
                  "key": "numbering_range_id",
                  "value": "189"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Rangos asociados al software",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/rangos-de-numeracion/rangos-asociados-al-software/](https://developers.factus.com.co/rangos-de-numeracion/rangos-asociados-al-software/)",
            "url": {
              "raw": "{{url_api}}/v2/numbering-ranges/dian",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "numbering-ranges",
                "dian"
              ],
              "query": [],
              "variable": []
            }
          }
        }
      ]
    },
    {
      "name": "Información de adquirentes",
      "item": [
        {
          "name": "Obtener datos adquiriente",
          "request": {
            "method": "GET",
            "header": [],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**[https://developers.factus.com.co/informacion-adquirientes/obtener-datos-adquiriente/](https://developers.factus.com.co/informacion-adquirientes/obtener-datos-adquiriente/)",
            "url": {
              "raw": "{{url_api}}/v2/dian/acquirer?identification_document_code=13&identification_number=1399991",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "dian",
                "acquirer?identification_document_code=13&identification_number=1399991"
              ],
              "query": [
                {
                  "key": "identification_document_code",
                  "value": "13"
                },
                {
                  "key": "identification_number",
                  "value": "1399991"
                }
              ],
              "variable": []
            }
          }
        }
      ]
    },
    {
      "name": "Recepción de documentos",
      "item": [
        {
          "name": "Cargar factura",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/recepcion-de-documentos/cargar-factura/](https://developers.factus.com.co/recepcion-de-documentos/cargar-factura/)",
            "url": {
              "raw": "{{url_api}}/v2/receptions/upload",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "receptions",
                "upload"
              ],
              "query": [],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n    \"track_id\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Ver facturas",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/recepcion-de-documentos/ver-facturas/](https://developers.factus.com.co/recepcion-de-documentos/ver-facturas/)",
            "url": {
              "raw": "{{url_api}}/v2/receptions/bills",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "receptions",
                "bills"
              ],
              "query": [
                {
                  "key": "filter[id]",
                  "value": "",
                  "description": "ID de la factura"
                },
                {
                  "key": "filter[number]",
                  "value": "",
                  "description": "Número de la factura"
                },
                {
                  "key": "filter[issue_date]",
                  "value": "",
                  "description": "Fecha de emisión de la factura"
                },
                {
                  "key": "filter[cufe]",
                  "value": "",
                  "description": "CUFE de la factura"
                },
                {
                  "key": "filter[company_nit]",
                  "value": "",
                  "description": "NIT de la empresa o persona que te emitio la factura"
                },
                {
                  "key": "filter[company_name]",
                  "value": "",
                  "description": "Nombre de la persona o empresa que te emitio la factura"
                },
                {
                  "key": "filter[completed_events]",
                  "value": "",
                  "description": "Usa 1 para listar las facturas que no tienen eventos pendientes por emitir y 0 para mostrar las facturas que tienen eventos pendientes por emitir."
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Emitir evento",
          "request": {
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/recepcion-de-documentos/emitir-evento/](https://developers.factus.com.co/recepcion-de-documentos/emitir-evento/)",
            "url": {
              "raw": "{{url_api}}/v2/receptions/bills/:bill_id/radian/events/:event_type",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "receptions",
                "bills",
                ":bill_id",
                "radian",
                "events",
                ":event_type"
              ],
              "query": [],
              "variable": [
                {
                  "key": "bill_id",
                  "value": "",
                  "description": "ID de la factura electrónica"
                },
                {
                  "key": "event_type",
                  "value": "",
                  "description": "Código del evento a emitir"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n    \"identification_document_code\": \"13\",\n    \"identification\": \"12345667\",\n    \"dv\": \"\",\n    \"first_name\": \"Pepito\",\n    \"last_name\": \"Perez\",\n    \"job_title\": \"Desarollador de software\",\n    \"organization_department\": \"Sistemas\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Suscripciones",
      "item": [
        {
          "name": "Suscripciones",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/suscripciones/suscripciones/](https://developers.factus.com.co/suscripciones/suscripciones/)",
            "url": {
              "raw": "{{url_api}}/v2/subscriptions",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "subscriptions"
              ],
              "query": [],
              "variable": []
            }
          }
        }
      ]
    },
    {
      "name": "Empresa",
      "item": [
        {
          "name": "Ver empresa",
          "request": {
            "method": "GET",
            "header": [],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/empresas/ver/](https://developers.factus.com.co/empresas/ver/)",
            "url": {
              "raw": "{{url_api}}/v2/companies",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "companies"
              ],
              "query": [],
              "variable": []
            }
          }
        },
        {
          "name": "Actualizar empresa",
          "request": {
            "method": "PUT",
            "header": [],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/empresas/actualizar/](https://developers.factus.com.co/empresas/actualizar/)",
            "url": {
              "raw": "{{url_api}}/v2/companies",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "companies"
              ],
              "query": [],
              "variable": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"legal_organization_code\": \"1\",\n  \"company\": \"HALLTEC S.A.S.\",\n  \"trade_name\": null,\n  \"email\": \"yocahe5@gmail.com\",\n  \"address\": \"calle 11 8-84\",\n  \"registration_code\": \"33253427\",\n  \"economic_activity\": \"6311\",\n  \"phone\": \"3165584659\",\n  \"municipality_code\": \"68872\",\n  \"tribute_code\": \"01\",\n  \"responsibilities\": \"R-99-PN,O-15\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Actualizar logo de la empresa",
          "request": {
            "method": "POST",
            "header": [],
            "auth": {
              "type": "noauth"
            },
            "description": "**Ver Documentación:**\n\n[https://developers.factus.com.co/empresas/actualizar-imagen/](https://developers.factus.com.co/empresas/actualizar-imagen/)",
            "url": {
              "raw": "{{url_api}}/v2/companies/logo",
              "protocol": "",
              "host": [
                "{{url_api}}"
              ],
              "path": [
                "v2",
                "companies",
                "logo"
              ],
              "query": [],
              "variable": []
            },
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "image",
                  "disabled": false,
                  "type": "file",
                  "src": "/Users/ivan/Pictures/logos/default2-250x250.png"
                }
              ]
            }
          }
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "bill_reference_code",
      "value": "",
      "type": "default"
    },
    {
      "key": "version",
      "value": "",
      "type": "default"
    },
    {
      "key": "credit_reference_code",
      "value": "",
      "type": "default"
    },
    {
      "key": "url_api",
      "value": "",
      "type": "default"
    },
    {
      "key": "client_id",
      "value": "",
      "type": "default"
    },
    {
      "key": "client_secret",
      "value": "",
      "type": "default"
    },
    {
      "key": "email",
      "value": "",
      "type": "default"
    },
    {
      "key": "password",
      "value": "",
      "type": "default"
    },
    {
      "key": "access_token",
      "value": "",
      "type": "default"
    }
  ],
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          "const urlAPI = pm.environment.get(\"url_api\");",
          "const clientID = pm.environment.get(\"client_id\");",
          "const clientSecret = pm.environment.get(\"client_secret\");",
          "const username = pm.environment.get(\"email\");",
          "const password = pm.environment.get(\"password\");",
          "await pm.sendRequest({",
          "    url: urlAPI + '/oauth/token',",
          "    method: 'POST',",
          "    header: {",
          "        'Accept': 'application/json',",
          "        \"Content-Type\": \"application/x-www-form-urlencoded\"",
          "    },",
          "    body: {",
          "        mode: \"urlencoded\",",
          "",
          "        urlencoded: [{",
          "            key: \"grant_type\",",
          "            value: 'password'",
          "        }, {",
          "            key: \"client_id\",",
          "            value: clientID",
          "        }, {",
          "            key: \"client_secret\",",
          "            value: clientSecret",
          "        }, {",
          "            key: \"username\",",
          "            value: username",
          "        }, {",
          "            key: \"password\",",
          "            value: password",
          "        }]",
          "    }",
          "}, async function(err, res) {",
          "    if (err) {",
          "        console.error(err);",
          "    } else {",
          "        pm.environment.set('access_token', res.json().access_token);",
          "    }",
          "});"
        ]
      }
    }
  ]
}