{ "info": { "_postman_id": "d5575dd2-7e6f-4675-9f82-b52f22de8de0", "name": "hyb-oa P0 MVP", "description": "P0 vertical slice: login -> draft -> upload -> bind -> submit -> approve", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "1. Login Employee", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "x-device-fingerprint", "value": "{{deviceFingerprint}}" } ], "url": "{{baseUrl}}/api/auth/login", "body": { "mode": "raw", "raw": "{\n \"identifier\": \"{{employeeIdentifier}}\",\n \"password\": \"{{employeePassword}}\"\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "const json = pm.response.json();", "pm.environment.set('employeeAccessToken', json.data.accessToken);" ] } } ] }, { "name": "2. Create Reimbursement", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{employeeAccessToken}}" } ], "url": "{{baseUrl}}/api/reimbursements", "body": { "mode": "raw", "raw": "{\n \"description\": \"P0 冒烟报销单\"\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "const json = pm.response.json();", "pm.environment.set('reimbursementId', json.data.id);" ] } } ] }, { "name": "3. Upload Invoice", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{employeeAccessToken}}" } ], "url": "{{baseUrl}}/api/invoice-pool/upload", "body": { "mode": "formdata", "formdata": [ { "key": "file", "type": "file", "src": "{{sampleInvoiceFile}}" }, { "key": "ocr_type", "type": "text", "value": "general" } ] } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "const json = pm.response.json();", "pm.environment.set('invoicePoolId', json.data.invoicePoolId);" ] } } ] }, { "name": "4. Bind Invoice", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{employeeAccessToken}}" } ], "url": "{{baseUrl}}/api/invoice-pool/{{invoicePoolId}}/bind", "body": { "mode": "raw", "raw": "{\n \"reimbursementId\": \"{{reimbursementId}}\"\n}" } } }, { "name": "5. Submit Reimbursement", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{employeeAccessToken}}" } ], "url": "{{baseUrl}}/api/reimbursements/{{reimbursementId}}/submit" }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "const json = pm.response.json();", "pm.environment.set('workflowTaskId', json.data.currentTaskId);", "pm.environment.set('workflowInstanceId', json.data.workflowInstanceId);" ] } } ] }, { "name": "6. Login CEO", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "x-device-fingerprint", "value": "{{deviceFingerprint}}" } ], "url": "{{baseUrl}}/api/auth/login", "body": { "mode": "raw", "raw": "{\n \"identifier\": \"{{ceoIdentifier}}\",\n \"password\": \"{{ceoPassword}}\"\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "const json = pm.response.json();", "pm.environment.set('ceoAccessToken', json.data.accessToken);" ] } } ] }, { "name": "7. Approve Workflow Task", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{ceoAccessToken}}" } ], "url": "{{baseUrl}}/api/workflow/tasks/{{workflowTaskId}}/approve" } }, { "name": "8. Get Signed URL", "request": { "method": "POST", "header": [ { "key": "Authorization", "value": "Bearer {{employeeAccessToken}}" } ], "url": "{{baseUrl}}/api/invoice-pool/{{invoicePoolId}}/signed-url" } } ] }