{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"ee7aefe2-3329-4d11-87a1-21331f1db031","name":"Manual Técnico de Integración","description":"**Este documento proporciona la información necesaria para la integración con Skeelo. La URL base que deberá ser utilizada para pruebas es** [<b>https://hml-dsync.skeelo.com</b>](https://hml-dsync.skeelo.com) **(HOST), referente al ambiente de homologación. La URL de producción será enviada después de las pruebas de integración.**\n\n**Será necesario que nos envíen los IP’s para que realicemos el desbloqueo en nuestro firewall. Los métodos a continuación son personalizables por cliente, es decir, los parámetros pueden variar.**\n\n---\n\n# Soporte\n\n**El soporte del sistema es realizado a través del correo electrónico** [<b>soporte@skeelo.com</b>](https://mailto:soporte@skeelo.com) **donde el equipo de desarrollo recibirá información del solicitante y actuará en la demanda lo más rápido posible.**\n\n---\n\n# Autenticación\n\n**Es realizada usando un basic auth. Basta incluir la header** **`Authorization`** **en las llamadas con el valor enviado durante la integración.**\n\n---\n\n# Criptografía\n\n**Los endpoints cuentan con criptografía usando un JWE. Incluir el token generado en el body de la solicitud, como se describe a continuación.**\n\n## Llave proporcionada\n\n**La llave pública se entrega en formato JWK (JSON Web Key), un string JSON con los siguientes campos:**\n\n| **Campo** | **Valor** | **Descripción** |\n| --- | --- | --- |\n| kty | RSA | Tipo de llave |\n| use | enc | Uso: criptografía |\n| alg | RSA-OAEP-256 | Algoritmo de wrapping de la llave simétrica |\n| kid | UUID | Identificador de la chave |\n| n | Base64url | Módulo RSA (2048 bits) |\n| e | AQAB | Exponente público |\n\n**Ejemplo:**\n\n``` json\n{\n    \"kty\": \"RSA\",\n    \"use\": \"enc\",\n    \"alg\": \"RSA-OAEP-256\",\n    \"kid\": \"uuid\",\n    \"n\": \"...\",\n    \"e\": \"AQAB\"\n}\n\n ```\n\n## Parámetros JWE\n\n| **Parámetro** | **Valor** |\n| --- | --- |\n| Algoritmo (alg) | RSA-OAEP-256 |\n| Criptografía de contenido (enc) | A256GCM |\n| Formato | JWE Compact Serialization |\n\n## Ejemplos de implementación\n\n**Node.js (jose)**\n\n``` javascript\nimport { importJWK, CompactEncrypt } from 'jose'\nconst publicKey = await importJWK(JSON.parse(public_key_string))\nconst jwe = await new CompactEncrypt(\n    new TextEncoder().encode(JSON.stringify(payload))\n)\n    .setProtectedHeader({ alg: 'RSA-OAEP-256', enc: 'A256GCM' })\n    .encrypt(publicKey)\n// jwe = \"eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMjU2R0NNIn0...\"\n\n ```\n\n**Python (jwcrypto)**\n\n``` python\nimport json\nfrom jwcrypto import jwk, jwe\nfrom jwcrypto.common import json_encode\nkey = jwk.JWK(**public_key_dict)\ntoken = jwe.JWE(\n    plaintext=json.dumps(payload).encode(),\n    protected=json_encode({\"alg\": \"RSA-OAEP-256\", \"enc\": \"A256GCM\", \"kid\": public_key_dict[\"kid\"]})\n)\ntoken.add_recipient(key)\nprint(token.serialize(compact=True))\n\n ```\n\n**Java (nimbus-jose-jwt)**\n\n``` java\nRSAKey rsaKey = RSAKey.parse(publicKeyString);\nJWEHeader header = new JWEHeader(\n    JWEAlgorithm.RSA_OAEP_256,\n    EncryptionMethod.A256GCM\n);\nJWEObject jweObject = new JWEObject(header,\n    new Payload(objectMapper.writeValueAsString(payload)));\njweObject.encrypt(new RSAEncrypter(rsaKey));\nString jweToken = jweObject.serialize();\n\n ```\n\n## Envío en la llamada\n\n**El JWE resultante es un string opaco con 5 partes separadas por punto (.):**\n\n```\neyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMjU2R0NNIn0.xxxxx.xxxxx.xxxxx.xxxxx\n\n ```\n\n**Enviar en el body de la llamada:**\n\n``` json\n{\n  \"data\": \"eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMjU2R0NNIn0...\"\n}\n\n ```","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"26617485","team":4083480,"collectionId":"ee7aefe2-3329-4d11-87a1-21331f1db031","publishedId":"2sA3JT1cqh","public":true,"publicUrl":"https://es-docs.skeelo.com","privateUrl":"https://go.postman.co/documentation/26617485-ee7aefe2-3329-4d11-87a1-21331f1db031","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"0BDA6B"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"Este documento proporciona la información necesaria para la integración con Skeelo."},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"0BDA6B"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"0BDA6B"}}]}},"version":"8.11.6","publishDate":"2024-05-16T17:49:40.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":"Este documento proporciona la información necesaria para la integración con Skeelo."},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[{"name":"Staging","id":"bad2f7b2-8914-493c-8b9c-ec9720d42c6d","owner":"26617485","values":[{"key":"HOST","value":"https://hml-dsync.skeelo.com","enabled":true,"type":"default"},{"key":"PARTNER","value":"PARTNER","enabled":true,"type":"default"},{"key":"USER_AGENT","value":"","enabled":true,"type":"default"},{"enabled":true,"key":"JWT_TOKEN","value":"","type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/a50ee0d2681eb86fab635f65e2eb5243404405cc4b6ee98ad2b362f3e501cb2e","favicon":"https://res.cloudinary.com/postman/image/upload/v1714686511/team/jywuwlf6rrhsl776htpw.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Staging","value":"26617485-bad2f7b2-8914-493c-8b9c-ec9720d42c6d"}],"canonicalUrl":"https://es-docs.skeelo.com/view/metadata/2sA3JT1cqh"}