111 lines
4.5 KiB
JSON
111 lines
4.5 KiB
JSON
{
|
|
"info": {
|
|
"name": "Kumare Time Server - Visma Adapter",
|
|
"description": "Endpoints reales para probar el adapter kumare-adapter-spring-visma-time a través del test harness time-server. No requiere base de datos: son passthroughs directos al API de VismaTime (GeoVictoria).",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
|
},
|
|
"variable": [
|
|
{ "key": "baseUrl", "value": "http://localhost:8080/time/api" },
|
|
{ "key": "userId", "value": "11111111" },
|
|
{ "key": "punchKey", "value": "" }
|
|
],
|
|
"item": [
|
|
{
|
|
"name": "Employee list",
|
|
"request": {
|
|
"method": "GET",
|
|
"url": { "raw": "{{baseUrl}}/clientele/clients/employee", "host": ["{{baseUrl}}"], "path": ["clientele", "clients", "employee"] }
|
|
}
|
|
},
|
|
{
|
|
"name": "Punch list",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [{ "key": "Content-Type", "value": "application/json" }],
|
|
"url": { "raw": "{{baseUrl}}/clientele/clients/punch/list", "host": ["{{baseUrl}}"], "path": ["clientele", "clients", "punch", "list"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"start\": \"2026-08-01\",\n \"end\": \"2026-08-12\",\n \"pageNumber\": 0\n}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Punch list (paged)",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [{ "key": "Content-Type", "value": "application/json" }],
|
|
"url": { "raw": "{{baseUrl}}/clientele/clients/punch/page", "host": ["{{baseUrl}}"], "path": ["clientele", "clients", "punch", "page"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"start\": \"2026-08-01\",\n \"end\": \"2026-08-12\",\n \"pageNumber\": 0\n}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Punch add",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"exec": [
|
|
"var body = pm.response.json();",
|
|
"if (body && body.punch && body.punch.token) {",
|
|
" pm.collectionVariables.set('punchKey', body.punch.token);",
|
|
"}"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [{ "key": "Content-Type", "value": "application/json" }],
|
|
"url": { "raw": "{{baseUrl}}/clientele/clients/punch/add", "host": ["{{baseUrl}}"], "path": ["clientele", "clients", "punch", "add"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"userId\": \"{{userId}}\",\n \"type\": \"ENTER\",\n \"date\": \"2026-08-12T09:00:00\"\n}"
|
|
}
|
|
},
|
|
"description": "type acepta ENTER o EXIT (PunchType). El token de la respuesta se guarda automáticamente en {{punchKey}} para usarlo en 'Punch delete'."
|
|
},
|
|
{
|
|
"name": "Punch delete",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [{ "key": "Content-Type", "value": "application/json" }],
|
|
"url": { "raw": "{{baseUrl}}/clientele/clients/punch/delete", "host": ["{{baseUrl}}"], "path": ["clientele", "clients", "punch", "delete"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"key\": \"{{punchKey}}\"\n}"
|
|
}
|
|
},
|
|
"description": "Usa el token guardado por 'Punch add' (variable {{punchKey}}), o pegá uno manualmente."
|
|
},
|
|
{
|
|
"name": "Punch add multiple",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [{ "key": "Content-Type", "value": "application/json" }],
|
|
"url": { "raw": "{{baseUrl}}/clientele/clients/punch/multiple", "host": ["{{baseUrl}}"], "path": ["clientele", "clients", "punch", "multiple"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "[\n {\n \"userIdentifier\": \"{{userId}}\",\n \"type\": \"Ingreso\",\n \"date\": \"20260812090000\"\n }\n]"
|
|
}
|
|
},
|
|
"description": "type acepta \"Ingreso\" o \"Salida\" (texto crudo del API de Visma, no el enum PunchType). date en formato yyyyMMddHHmmss."
|
|
},
|
|
{
|
|
"name": "Attendance book",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [{ "key": "Content-Type", "value": "application/json" }],
|
|
"url": { "raw": "{{baseUrl}}/clientele/clients/attendance/book", "host": ["{{baseUrl}}"], "path": ["clientele", "clients", "attendance", "book"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"start\": \"2026-08-01\",\n \"end\": \"2026-08-12\",\n \"userIds\": \"{{userId}}\"\n}"
|
|
}
|
|
},
|
|
"description": "userIds acepta varios identificadores separados por coma, sin espacio (ej. \"11111111,22222222\")."
|
|
}
|
|
]
|
|
}
|