Assets - Read assets from the asset table record view (de18263e-…), keyed by _pk_value; rows open by assetRowId and the list sorts newest first. - Update INIT fields to the builder: Asset Details (was Category), Asset State/Priority/Classification options, warranty fields, Brand, ID, Location, and the images field (field_53); Asset Owner is field_51. - Upload photos and an Invoice document before the activity runs, and send the returned file objects. The Invoice field id is a placeholder until the field exists in the builder. - Show every Add Asset field as a list and details column, with option labels, and group related columns into rich cells. - Use the INIT activity's detail view template (a573754f-…). - Drop Assigned by, Condition and Type from the reassign, return and lost forms; add Lost manager name options. Employees - Department is a select from DEPARTMENTS; more employee types; status removed from the forms; rich columns in the employee list. Shared - apiFetch sends FormData bodies as multipart. - Default workflow host is dev-apps.getzino.in. - displayLabel() for readable field labels; Raw response panels removed. - useRecordView accepts an initial sort. - Temporary dev proxy in vite.config.js for rv-screens lookups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
142 lines
6.6 KiB
JSON
142 lines
6.6 KiB
JSON
{
|
|
"info": {
|
|
"name": "Employee Data (Zino)",
|
|
"description": "All 5 APIs used by the Employee Data app. Run 'Login' first - it saves the token automatically for the other requests.",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
|
},
|
|
"variable": [
|
|
{ "key": "auth_url", "value": "https://dev-apps.getzino.in" },
|
|
{ "key": "app_url", "value": "https://dev.getzino.in" },
|
|
{ "key": "token", "value": "" }
|
|
],
|
|
"item": [
|
|
{
|
|
"name": "1. Login",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"if (pm.response.code === 200) {",
|
|
" var t = pm.response.json().token;",
|
|
" pm.collectionVariables.set('token', t);",
|
|
" console.log('Token saved.');",
|
|
"} else {",
|
|
" console.log('Login failed:', pm.response.text());",
|
|
"}"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [{ "key": "Content-Type", "value": "application/json" }],
|
|
"url": { "raw": "{{auth_url}}/usr/login", "host": ["{{auth_url}}"], "path": ["usr", "login"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"email\": \"YOUR_EMAIL\",\n \"password\": \"YOUR_PASSWORD\"\n}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "2. Employee List",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{ "key": "Content-Type", "value": "application/json" },
|
|
{ "key": "Authorization", "value": "Bearer {{token}}" }
|
|
],
|
|
"url": { "raw": "{{app_url}}/app/531/view/recordview", "host": ["{{app_url}}"], "path": ["app", "531", "view", "recordview"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"rv_template_uid\": \"f3b07dfd-ddcf-4039-ba82-078179a16f21\",\n \"preset_alias\": \"\",\n \"params\": {},\n \"search_query\": { \"page\": 1, \"limit\": 10, \"sort_by\": \"\", \"sort_dir\": \"\", \"search\": \"\", \"filters\": [] }\n}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "3. Asset List",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{ "key": "Content-Type", "value": "application/json" },
|
|
{ "key": "Authorization", "value": "Bearer {{token}}" }
|
|
],
|
|
"url": { "raw": "{{app_url}}/app/531/view/recordview", "host": ["{{app_url}}"], "path": ["app", "531", "view", "recordview"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"rv_template_uid\": \"de18263e-dc82-4d4d-98a2-99607104373b\",\n \"preset_alias\": \"\",\n \"params\": {},\n \"search_query\": { \"page\": 1, \"limit\": 10, \"sort_by\": \"\", \"sort_dir\": \"\", \"search\": \"\", \"filters\": [] }\n}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "4. Create Employee",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{ "key": "Content-Type", "value": "application/json" },
|
|
{ "key": "Authorization", "value": "Bearer {{token}}" }
|
|
],
|
|
"url": { "raw": "{{app_url}}/app/531/start", "host": ["{{app_url}}"], "path": ["app", "531", "start"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"activity_id\": \"d42f026c-f9ac-4170-91c4-f1570d815d7a\",\n \"workflow_uuid\": \"f4a303c2-869a-47d5-a5f3-1d2f7d5ae58e\",\n \"version\": 1,\n \"data\": {\n \"field_1\": \"John\",\n \"field_34\": \"Doe\",\n \"field_2\": \"john.doe@example.com\",\n \"field_3\": 9876543210,\n \"field_4\": \"2026-09-23\",\n \"field_6\": \"permanent\",\n \"field_35\": \"Engineering\",\n \"field_36\": \"Developer\",\n \"field_37\": \"active\",\n \"field_38\": \"EMP001\"\n }\n}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "5. Create Asset",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{ "key": "Content-Type", "value": "application/json" },
|
|
{ "key": "Authorization", "value": "Bearer {{token}}" }
|
|
],
|
|
"url": { "raw": "{{app_url}}/app/531/start", "host": ["{{app_url}}"], "path": ["app", "531", "start"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"activity_id\": \"a2405547-0db4-474b-aa76-af1246d01a6a\",\n \"workflow_uuid\": \"b5ea718c-e1a3-4d73-ac72-d0fc25f8b611\",\n \"version\": 1,\n \"data\": {\n \"field_43\": \"laptop\",\n \"field_42\": \"Dell Latitude 5440\",\n \"field_44\": \"SN123456\",\n \"field_45\": \"2026-09-01\",\n \"field_46\": 75000,\n \"field_47\": \"new\"\n }\n}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "6. Update Employee",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{ "key": "Content-Type", "value": "application/json" },
|
|
{ "key": "Authorization", "value": "Bearer {{token}}" }
|
|
],
|
|
"url": { "raw": "{{app_url}}/app/531/activity", "host": ["{{app_url}}"], "path": ["app", "531", "activity"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"activity_id\": \"95d39136-519f-4558-95e4-df326f6fb68c\",\n \"data\": {\n \"field_9\": \"John\",\n \"field_8\": \"Doe\",\n \"field_10\": \"john.doe@example.com\",\n \"field_11\": 9876543210,\n \"field_5\": \"2026-09-23\",\n \"field_7\": \"permanent\",\n \"field_12\": \"Engineering\",\n \"field_13\": \"Senior Developer\",\n \"field_14\": \"active\",\n \"field_15\": \"EMP001\"\n },\n \"instance_id\": \"INSTANCE_ID_FROM_INIT\",\n \"workflow_uuid\": \"f4a303c2-869a-47d5-a5f3-1d2f7d5ae58e\"\n}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "7. Mark Employee Inactive",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{ "key": "Content-Type", "value": "application/json" },
|
|
{ "key": "Authorization", "value": "Bearer {{token}}" }
|
|
],
|
|
"url": { "raw": "{{app_url}}/app/531/activity", "host": ["{{app_url}}"], "path": ["app", "531", "activity"] },
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"activity_id\": \"7dcde7c9-82ce-4dd5-bcca-68fca6904eb4\",\n \"data\": {\n \"field_16\": \"2026-09-25\",\n \"field_33\": \"Reason for leaving\",\n \"field_39\": { \"id\": 8 },\n \"field_40\": { \"id\": 8, \"employee_code\": \"7656565\" }\n },\n \"instance_id\": \"INSTANCE_ID_FROM_INIT\",\n \"workflow_uuid\": \"f4a303c2-869a-47d5-a5f3-1d2f7d5ae58e\"\n}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "8. List Record Views (find rv_template_uid)",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [{ "key": "Authorization", "value": "Bearer {{token}}" }],
|
|
"url": { "raw": "{{auth_url}}/api/apps/531/rv-screens", "host": ["{{auth_url}}"], "path": ["api", "apps", "531", "rv-screens"] }
|
|
}
|
|
}
|
|
]
|
|
}
|