{"info":{"_postman_id":"6a4f2a6b-595b-4fd6-a653-0815c5cbbc13","name":"Chipax API v1","description":"<html><head></head><body><h1 id=\"api-de-chipaxcom\">API de Chipax.com</h1>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"API de Chipax.com","slug":"api-de-chipaxcom"}],"owner":"2390349","collectionId":"6a4f2a6b-595b-4fd6-a653-0815c5cbbc13","publishedId":"2s8YzNzing","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-12-05T16:19:21.000Z"},"item":[{"name":"Login","item":[{"name":"Login","event":[{"listen":"test","script":{"id":"501db492-de13-4b57-9cff-084d7a2df05a","exec":["var jsonData = pm.response.json();","","pm.environment.set(\"API_KEY\", jsonData.token);"],"type":"text/javascript"}}],"id":"23d67a09-a7e9-4c36-aad0-3aa9306da3d9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"app_id\": \"tu-app-id\",\n\t\"secret_key\": \"tu-secret-key\"\n}"},"url":"https://api.chipax.com/login","description":"<p>Autenticación API Chipax. Retorna token para hacer consultas con su expiración correspondiente.</p>\n","urlObject":{"path":["login"],"host":["https://api.chipax.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"23d67a09-a7e9-4c36-aad0-3aa9306da3d9"}],"id":"3bbd66f3-2958-445f-8cdb-de0e45dd123d","_postman_id":"3bbd66f3-2958-445f-8cdb-de0e45dd123d","description":""},{"name":"Dtes","item":[{"name":"dtes filtrando /:tipo/:folio","id":"09b12b98-123a-4c38-80ef-c203093c798e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"JWT {{TOKEN}}"}],"url":"https://api.chipax.com/dtes/34/1","description":"<p>Por ejemplo:\n<code>https://api.chipax.com/dtes/34/1</code>\ntraerá las facturas de venta de tipo = 34 (factura electrónica exenta) y folio = 1</p>\n","urlObject":{"path":["dtes","34","1"],"host":["https://api.chipax.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"09b12b98-123a-4c38-80ef-c203093c798e"},{"name":"filter by rut","event":[{"listen":"test","script":{"id":"ee8067e4-c608-4b84-a7c5-63322cad5395","exec":["pm.test(\"Every Dte has the same rut\", function () {","    var jsonData = pm.response.json();","    let testResult = true;","    ","    let rut = jsonData[0].rut;","    ","    for(let dte in jsonData) {","        if (rut != jsonData[dte].rut) {","            testResult = false;","        }","    }","    ","    pm.expect(testResult).to.eql(true);","});"],"type":"text/javascript"}}],"id":"e5828ef3-a4ea-4143-8d86-b3c2aec19f2a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"JWT {{TOKEN}}"}],"url":"https://api.chipax.com/dtes?rut=11111111-1","urlObject":{"path":["dtes"],"host":["https://api.chipax.com"],"query":[{"key":"rut","value":"11111111-1"}],"variable":[]}},"response":[],"_postman_id":"e5828ef3-a4ea-4143-8d86-b3c2aec19f2a"}],"id":"217313a5-4656-4a13-9b8e-c1b7a500b5e3","description":"<p>Para consultar facturas de venta.</p>\n<p>Se puede filtrar por RUT.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>/dtes/:tipo_documento/:folio\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"3950b905-6ef6-42c3-a82d-4ada2070a80b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"b93c5907-8674-401d-a77f-07664bb5c562","type":"text/javascript","exec":[""]}}],"_postman_id":"217313a5-4656-4a13-9b8e-c1b7a500b5e3"},{"name":"Cliente","item":[{"name":"Full List","id":"28b7c269-75b6-4838-a3f7-8c63a24ab4fd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"JWT {{TOKEN}}"}],"url":"https://api.chipax.com/clientes","urlObject":{"path":["clientes"],"host":["https://api.chipax.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"28b7c269-75b6-4838-a3f7-8c63a24ab4fd"},{"name":"Filter By RUT","event":[{"listen":"test","script":{"id":"4c304815-65e6-4716-b6f7-a3abc2d601a1","exec":[""],"type":"text/javascript"}}],"id":"43f8be65-682a-464f-9704-bb80d702ee37","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"JWT {{TOKEN}}"}],"url":"https://api.chipax.com/clientes/11111111-1","urlObject":{"path":["clientes","11111111-1"],"host":["https://api.chipax.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"43f8be65-682a-464f-9704-bb80d702ee37"}],"id":"eeb8d12f-3f6e-400f-857a-1f5650d078f4","_postman_id":"eeb8d12f-3f6e-400f-857a-1f5650d078f4","description":""},{"name":"Flujo Caja (WIP, alpha)","item":[{"name":"Init","id":"1cfe6440-df96-480f-a031-eadadc9ecd66","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"JWT {{TOKEN}}"}],"url":"https://api.chipax.com/flujo-caja/init","urlObject":{"path":["flujo-caja","init"],"host":["https://api.chipax.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"1cfe6440-df96-480f-a031-eadadc9ecd66"},{"name":"Cartolas","id":"0db4cd80-ee4d-45a3-9475-729e4a88644f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"JWT {{TOKEN}}"}],"url":"https://api.chipax.com/flujo-caja/cartolas","urlObject":{"path":["flujo-caja","cartolas"],"host":["https://api.chipax.com"],"query":[{"disabled":true,"key":"end","value":"2018-12-31T03:00:00.000Z"}],"variable":[]}},"response":[],"_postman_id":"0db4cd80-ee4d-45a3-9475-729e4a88644f"},{"name":"Cuentas","id":"8eec5647-7e9f-4f79-bb83-f5ec0b79402e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"JWT {{TOKEN}}"}],"url":"https://api.chipax.com/cuentas","urlObject":{"path":["cuentas"],"host":["https://api.chipax.com"],"query":[{"disabled":true,"key":"start","value":"2018-10-01T03:00:00.000Z"},{"disabled":true,"key":"end","value":"2018-12-31T03:00:00.000Z"}],"variable":[]}},"response":[],"_postman_id":"8eec5647-7e9f-4f79-bb83-f5ec0b79402e"},{"name":"Tipos Cuentas","id":"c7fb804e-bece-40fd-8fa0-5d85161264f1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"JWT {{TOKEN}}"}],"url":"https://api.chipax.com/tipos-cuentas","urlObject":{"path":["tipos-cuentas"],"host":["https://api.chipax.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"c7fb804e-bece-40fd-8fa0-5d85161264f1"},{"name":"Lineas Negocio","id":"ef3bc10e-8b11-4b66-bdca-b81b30dabdf4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"JWT {{TOKEN}}"}],"url":"https://api.chipax.com/lineas-negocio","urlObject":{"path":["lineas-negocio"],"host":["https://api.chipax.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"ef3bc10e-8b11-4b66-bdca-b81b30dabdf4"},{"name":"Cuentas Corrientes","id":"02d22839-c8fe-4761-a897-f2a7bc3e744b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"JWT {{TOKEN}}"}],"url":"https://api.chipax.com/cuentas-corrientes","urlObject":{"path":["cuentas-corrientes"],"host":["https://api.chipax.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"02d22839-c8fe-4761-a897-f2a7bc3e744b"},{"name":"Monedas","id":"15083446-2488-4c7f-8676-dde9b50c8c66","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"JWT {{TOKEN}}"}],"url":"https://api.chipax.com/monedas","urlObject":{"path":["monedas"],"host":["https://api.chipax.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"15083446-2488-4c7f-8676-dde9b50c8c66"},{"name":"Categorias","id":"08ee0f50-c83c-4cb6-b521-353e944931f3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"JWT {{TOKEN}}"}],"url":"https://api.chipax.com/flujo-caja/categorias","urlObject":{"path":["flujo-caja","categorias"],"host":["https://api.chipax.com"],"query":[{"disabled":true,"key":"end","value":"2018-12-31T03:00:00.000Z"}],"variable":[]}},"response":[],"_postman_id":"08ee0f50-c83c-4cb6-b521-353e944931f3"}],"id":"fba1b116-7815-4b81-9f81-e38306c6eada","_postman_id":"fba1b116-7815-4b81-9f81-e38306c6eada","description":""},{"name":"Lineas de Negocios","item":[{"name":"Full List","id":"9370ab2e-2215-446a-833f-0dda44cf7bf1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"JWT {{TOKEN}}","type":"text"}],"url":"https://api.chipax.com/lineas-negocio","urlObject":{"path":["lineas-negocio"],"host":["https://api.chipax.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"9370ab2e-2215-446a-833f-0dda44cf7bf1"}],"id":"64b9aa76-2fa6-45d8-938c-b0c25ddd23eb","_postman_id":"64b9aa76-2fa6-45d8-938c-b0c25ddd23eb","description":""},{"name":"Productos","item":[{"name":"Full List","id":"1761de2d-86c4-4a8c-97ce-44c73bbff7ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"JWT {{TOKEN}}","type":"text"}],"url":"https://api.chipax.com/productos","urlObject":{"path":["productos"],"host":["https://api.chipax.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"1761de2d-86c4-4a8c-97ce-44c73bbff7ec"}],"id":"735901b7-0778-461e-ad9e-15a3e66d5d94","_postman_id":"735901b7-0778-461e-ad9e-15a3e66d5d94","description":""},{"name":"Notas de Venta","item":[{"name":"Full List","id":"7b6d3d0c-64bf-41a6-a798-2ec90736313d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"JWT {{TOKEN}}","type":"text"}],"url":"https://api.chipax.com/notas-venta","urlObject":{"path":["notas-venta"],"host":["https://api.chipax.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"7b6d3d0c-64bf-41a6-a798-2ec90736313d"},{"name":"Crear Notas de Venta","id":"5dddc494-8bfb-4305-b774-6594be2f8454","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"JWT {{TOKEN}}","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"fecha\": \"2019-04-01\",\n  \"fecha_pago\": \"2019-04-23\",\n  \"nota\": \"nota :)\",\n  \"cliente_id\": 0,\n  \"exenta\": false,\n  \"otro_ingreso\": false,\n  \"items\": [\n    {\n      \"fecha\": \"2019-04-01\",\n      \"linea_negocio_id\": 0,\n      \"producto_id\": 0,\n      \"descripcion\": \"Descripción del producto\",\n      \"cantidad\": 10,\n      \"precio_unitario\": 1000,\n      \"descuento\": 0,\n      \"moneda_id\": 1000,\n      \"valor_moneda\": 1\n    }\n  ]\n}"},"url":"https://api.chipax.com/notas-venta","description":"<p>Para crear Notas de Venta primero tiene que consular algunos campos requeridos en la estructura de la Nota de Venta.</p>\n<ul>\n<li><code>cliente_id</code> =&gt; <code>GET /clientes</code></li>\n<li><code>linea_negocio_id</code> =&gt; <code>GET /lineas-negocio</code></li>\n<li><code>producto_id</code> =&gt; <code>GET /productos</code></li>\n<li><code>moneda_id</code> =&gt; <code>GET /monedas</code></li>\n</ul>\n<p>Más abajo hay un ejemplo de un <em>request body</em>, faltaría completar estos campos con los correspondientes a tu cuenta Chipax.</p>\n","urlObject":{"path":["notas-venta"],"host":["https://api.chipax.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"5dddc494-8bfb-4305-b774-6594be2f8454"}],"id":"d628fd81-6c3d-49fa-b425-b510812fad12","event":[{"listen":"prerequest","script":{"id":"ea04fcd0-95a7-45cd-9c4f-02973d9c7161","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"82ba159d-7c77-4ad5-8ab0-1e44fceca836","type":"text/javascript","exec":[""]}}],"_postman_id":"d628fd81-6c3d-49fa-b425-b510812fad12","description":""}],"variable":[{"key":"MasterMindUri","value":"https://api.chipax.com"}]}