{"info":{"name":"Carbob API","description":"# \ud83d\udcda Documenta\u00e7\u00e3o Completa da API Carbob\n\nA API utiliza **Laravel Passport** para autentica\u00e7\u00e3o OAuth2 com suporte a multi-tenancy. Todas as rotas protegidas requerem os headers `Authorization` (Bearer token) e `X-TENANT-ID`.\n\n---\n\n## \ud83d\udd10 Autentica\u00e7\u00e3o\n\nA API suporta autentica\u00e7\u00e3o via **OAuth2 Bearer Token**. Para obter um token:\n\n1. **Registar Tenant**: Use `POST \/v1\/auth\/register` para criar uma nova conta\n2. **Obter Token**: Use `POST \/v1\/oauth\/token` para autenticar e obter um access token\n3. **Usar Token**: Adicione o header `Authorization: Bearer <token>` em todas as requisi\u00e7\u00f5es protegidas\n4. **Identificar Tenant**: Adicione o header `X-TENANT-ID: <tenant_id>` para identificar o tenant\n\n---\n\n## \ud83d\udce6 Versionamento da API\n\nA API suporta acesso aos endpoints de duas formas:\n\n### \u2705 Rotas Versionadas\n`\/v1\/{resource}` - Sempre funcionam, garantem compatibilidade total\n\n### \u26a1 Rotas sem Vers\u00e3o\n`\/{resource}` - Apontam para a vers\u00e3o padr\u00e3o configurada (atualmente **v1**)\n\n### Exemplos\n- `POST \/v1\/auth\/register` ou `POST \/auth\/register` - Ambas funcionam\n- `GET \/v1\/clients` ou `GET \/clients` - Ambas funcionam\n\n> **Nota:** Rotas OAuth (`\/oauth\/*`) n\u00e3o t\u00eam vers\u00e3o.\n\n---\n\n## \ud83c\udfaf Funcionalidades Principais\n\n- \ud83d\udd11 **Autentica\u00e7\u00e3o e Gest\u00e3o de Utilizadores** - Registro, login, perfis e permiss\u00f5es\n- \ud83d\udccb **Gest\u00e3o de Planos e Contratos** - Subscri\u00e7\u00f5es, upgrades e downgrades\n- \ud83c\udfe2 **Sistema Multi-Tenancy** - Isolamento completo de dados por tenant\n- \ud83d\ude97 **Gest\u00e3o de Clientes e Frotas** - Clientes, ve\u00edculos e atribui\u00e7\u00f5es\n- \ud83d\udcca **Hist\u00f3rico de Altera\u00e7\u00f5es** - Auditoria completa de todas as opera\u00e7\u00f5es\n- \ud83d\udcf1 **Cat\u00e1logo de Ve\u00edculos** - Base de dados de marcas, modelos e vers\u00f5es\n\n---\n\n## \ud83d\udca1 Como Usar Esta Documenta\u00e7\u00e3o\n\n1. **\ud83d\udcdd Explorar Endpoints**: Navegue pelos grupos de tags \u00e0 esquerda\n2. **\ud83d\udd13 Autorizar**: Clique no bot\u00e3o **\"Authorize\"** no topo e insira seu Bearer token\n3. **\ud83e\uddea Testar**: Use \"Try it out\" em qualquer endpoint para testar diretamente\n4. **\ud83d\udccb Headers Obrigat\u00f3rios**:\n   - `Authorization: Bearer <token>`\n   - `X-TENANT-ID: <tenant_id>`\n\n---\n\n## \ud83d\ude80 Come\u00e7ar Rapidamente\n\n```bash\n# 1. Registar nova conta\nPOST \/v1\/auth\/register\n{\n  \"name\": \"Empresa Exemplo\",\n  \"email\": \"admin@exemplo.pt\",\n  \"password\": \"senha-segura\"\n}\n\n# 2. Obter token de acesso\nPOST \/v1\/oauth\/token\ngrant_type=password&client_id=1&client_secret=secret&username=admin@exemplo.pt&password=senha-segura\n\n# 3. Usar o token nas requisi\u00e7\u00f5es\nGET \/v1\/clients\nHeaders:\n  Authorization: Bearer <access_token>\n  X-TENANT-ID: <tenant_id>\n```\n\n---\n\n**Licen\u00e7a:** MIT | **Suporte:** [Contactar Carbob API Support](mailto:support@carbob.com)","schema":"https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json","version":"1.0.0"},"variable":[{"key":"base_url","value":"https:\/\/apidev.carbob.pt","type":"string"},{"key":"api_path","value":"\/v1","type":"string"},{"key":"access_token","value":"","type":"string"},{"key":"refresh_token","value":"","type":"string"},{"key":"tenant_id","value":"","type":"string"},{"key":"user_id","value":"","type":"string"},{"key":"user_email","value":"test@example.com","type":"string"},{"key":"user_password","value":"password123","type":"string"},{"key":"client_id","value":"","type":"string"},{"key":"clients_fleet_id","value":"","type":"string"},{"key":"reset_token","value":"","type":"string"},{"key":"new_password","value":"newpassword123","type":"string"}],"item":[{"name":"Authentication","item":[{"name":"Register a new tenant and user","request":{"method":"POST","header":[{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/auth\/register","host":["{{base_url}}"],"path":["v1","auth","register"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    if (response.tenant_id) {","        pm.collectionVariables.set('tenant_id', response.tenant_id);","        console.log('Tenant ID saved:', response.tenant_id);","    }","    if (response.user_id) {","        pm.collectionVariables.set('user_id', response.user_id);","        console.log('User ID saved:', response.user_id);","    }","}"]}},{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Send password reset link","request":{"method":"POST","header":[{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/auth\/forgot-password","host":["{{base_url}}"],"path":["v1","auth","forgot-password"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Accept user invite via token","request":{"method":"POST","header":[{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/auth\/accept-invite","host":["{{base_url}}"],"path":["v1","auth","accept-invite"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Reset user password","request":{"method":"POST","header":[{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/auth\/reset-password","host":["{{base_url}}"],"path":["v1","auth","reset-password"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Get Google OAuth authorization URL","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/auth\/google\/redirect","host":["{{base_url}}"],"path":["v1","auth","google","redirect"],"query":[{"key":"redirect_uri","value":"","description":""}]}}},{"name":"Handle Google OAuth callback (SPA flow)","request":{"method":"POST","header":[{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/auth\/google\/callback","host":["{{base_url}}"],"path":["v1","auth","google","callback"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]}]},{"name":"Change History","item":[{"name":"Get change history for a specific source record","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/change-history\/{{{source}}}\/{{{sourceId}}}","host":["{{base_url}}"],"path":["v1","change-history","{{{source}}}","{{{sourceId}}}"]}}}]},{"name":"Clients","item":[{"name":"Display a listing of clients","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/clients","host":["{{base_url}}"],"path":["v1","clients"],"query":[{"key":"search","value":"","description":""},{"key":"email","value":"","description":""},{"key":"fiscal_id","value":"","description":""},{"key":"name","value":"","description":""},{"key":"type","value":"","description":""},{"key":"preferred_contact_method","value":"","description":""},{"key":"sort_by","value":"","description":""},{"key":"sort_dir","value":"","description":""},{"key":"limit","value":"","description":""},{"key":"offset","value":"","description":""}]}}},{"name":"Store a newly created client","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/clients","host":["{{base_url}}"],"path":["v1","clients"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"List payments recorded on this client's repair orders","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/clients\/{{{client}}}\/payments","host":["{{base_url}}"],"path":["v1","clients","{{{client}}}","payments"]}}},{"name":"Display the specified client","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/clients\/{{{client}}}","host":["{{base_url}}"],"path":["v1","clients","{{{client}}}"]}}},{"name":"Update the specified client","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/clients\/{{{client}}}","host":["{{base_url}}"],"path":["v1","clients","{{{client}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Partially update a client (notes only)","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/clients\/{{{client}}}","host":["{{base_url}}"],"path":["v1","clients","{{{client}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Remove the specified client","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/clients\/{{{client}}}","host":["{{base_url}}"],"path":["v1","clients","{{{client}}}"]}}},{"name":"Lookup NIF information from external service","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/clients\/nif\/{{{nif}}}","host":["{{base_url}}"],"path":["v1","clients","nif","{{{nif}}}"]}}}]},{"name":"Contracts","item":[{"name":"Get all contracts for a tenant","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/contracts","host":["{{base_url}}"],"path":["v1","contracts"]}}},{"name":"Create a new contract","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/contracts","host":["{{base_url}}"],"path":["v1","contracts"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Get the current active contract","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/contracts\/current","host":["{{base_url}}"],"path":["v1","contracts","current"]}}},{"name":"Cancel the current active contract","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/contracts\/current","host":["{{base_url}}"],"path":["v1","contracts","current"]}}},{"name":"Upgrade tenant to a new plan","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/contracts\/upgrade","host":["{{base_url}}"],"path":["v1","contracts","upgrade"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Downgrade tenant to a new plan","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/contracts\/downgrade","host":["{{base_url}}"],"path":["v1","contracts","downgrade"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Request contract renewal \/ activation","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/contracts\/request-renewal","host":["{{base_url}}"],"path":["v1","contracts","request-renewal"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Cancel a contract","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/contracts\/{{{contract}}}","host":["{{base_url}}"],"path":["v1","contracts","{{{contract}}}"]}}}]},{"name":"Dashboard","item":[{"name":"Dashboard summary","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/dashboard\/summary","host":["{{base_url}}"],"path":["v1","dashboard","summary"],"query":[{"key":"month","value":"","description":""},{"key":"year","value":"","description":""},{"key":"workshop_id","value":"","description":""}]}}},{"name":"Financial metrics","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/dashboard\/financial","host":["{{base_url}}"],"path":["v1","dashboard","financial"],"query":[{"key":"period","value":"","description":""},{"key":"workshop_id","value":"","description":""}]}}},{"name":"Work order pipeline metrics","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/dashboard\/work-orders","host":["{{base_url}}"],"path":["v1","dashboard","work-orders"],"query":[{"key":"period","value":"","description":""},{"key":"workshop_id","value":"","description":""}]}}},{"name":"Estimate pipeline metrics","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/dashboard\/estimates","host":["{{base_url}}"],"path":["v1","dashboard","estimates"],"query":[{"key":"period","value":"","description":""},{"key":"workshop_id","value":"","description":""}]}}},{"name":"Client metrics","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/dashboard\/clients","host":["{{base_url}}"],"path":["v1","dashboard","clients"],"query":[{"key":"period","value":"","description":""},{"key":"workshop_id","value":"","description":""}]}}},{"name":"Vehicle metrics","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/dashboard\/vehicles","host":["{{base_url}}"],"path":["v1","dashboard","vehicles"],"query":[{"key":"period","value":"","description":""},{"key":"workshop_id","value":"","description":""}]}}},{"name":"Operational funnel trends","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/dashboard\/trends","host":["{{base_url}}"],"path":["v1","dashboard","trends"],"query":[{"key":"period","value":"","description":""},{"key":"workshop_id","value":"","description":""}]}}},{"name":"Recent estimates","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/dashboard\/recent-estimates","host":["{{base_url}}"],"path":["v1","dashboard","recent-estimates"],"query":[{"key":"period","value":"","description":""},{"key":"workshop_id","value":"","description":""}]}}},{"name":"Recent work orders","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/dashboard\/recent-work-orders","host":["{{base_url}}"],"path":["v1","dashboard","recent-work-orders"],"query":[{"key":"period","value":"","description":""},{"key":"workshop_id","value":"","description":""}]}}}]},{"name":"Development","item":[{"name":"Test email sending via configured mail provider","request":{"method":"POST","header":[{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/dev\/email","host":["{{base_url}}"],"path":["v1","dev","email"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Test SMS sending via SmsService","request":{"method":"POST","header":[{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/dev\/sms","host":["{{base_url}}"],"path":["v1","dev","sms"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Test WhatsApp sending via WhatsAppService","request":{"method":"POST","header":[{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/dev\/whatsapp","host":["{{base_url}}"],"path":["v1","dev","whatsapp"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Preview email template and optionally send it","request":{"method":"POST","header":[{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/dev\/email-template","host":["{{base_url}}"],"path":["v1","dev","email-template"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]}]},{"name":"Estimates","item":[{"name":"Create a new estimate in draft status","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates","host":["{{base_url}}"],"path":["v1","estimates"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"List all estimates for current tenant","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates","host":["{{base_url}}"],"path":["v1","estimates"],"query":[{"key":"limit","value":"","description":""},{"key":"offset","value":"","description":""},{"key":"search","value":"","description":""},{"key":"sort_by","value":"","description":""},{"key":"sort_dir","value":"","description":""},{"key":"is_archived","value":"","description":""},{"key":"status","value":"","description":""},{"key":"client_id","value":"","description":""},{"key":"vehicle_id","value":"","description":""}]}}},{"name":"Save\/update draft content (full or partial)","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/draft","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","draft"]},"body":{"mode":"raw","raw":"{\n    \"update_type\": \"partial\",\n    \"content\": {}\n}","options":{"raw":{"language":"json"}}}}},{"name":"Discard draft and return to ready status","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/draft","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","draft"]}}},{"name":"Update draft client section","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/client\/draft","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","client","draft"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Get client from estimate draft or version","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/client","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","client"],"query":[{"key":"status","value":"","description":""}]}}},{"name":"Update draft vehicle section","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/vehicle\/draft","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","vehicle","draft"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Get vehicle from estimate draft or version","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/vehicle","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","vehicle"],"query":[{"key":"status","value":"","description":""}]}}},{"name":"Finalize estimate (create version from draft)","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/finalize","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","finalize"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Save a new version of a finalized estimate","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/save","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","save"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Reopen estimate (create draft from current version)","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/reopen","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","reopen"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Permanently delete an estimate","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}"]}}},{"name":"Update estimate notes and comments","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Display the specified estimate","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}"]}}},{"name":"Send estimate to client","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/send","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","send"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Get or generate share URL for estimate","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/share-url","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","share-url"]}}},{"name":"Get send history for estimate","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/send-history","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","send-history"]}}},{"name":"Download estimate PDF","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/pdf","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","pdf"],"query":[{"key":"show_client_notes","value":"","description":""},{"key":"show_detailed_prices","value":"","description":""},{"key":"show_part_reference","value":"","description":""},{"key":"show_quantities","value":"","description":""}]}}},{"name":"Preview estimate PDF with mock data (development\/testing)","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/dev\/pdf","host":["{{base_url}}"],"path":["v1","estimates","dev","pdf"],"query":[{"key":"template","value":"","description":"Get query parameters"},{"key":"version","value":"","description":""},{"key":"data","value":"normal","description":""},{"key":"client","value":"","description":""},{"key":"vehicle","value":"","description":""},{"key":"services","value":"","description":""},{"key":"estimate","value":"","description":""}]}}},{"name":"Accept estimate","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/accept","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","accept"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Reject estimate","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/reject","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","reject"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Archive an estimate","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/archive","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","archive"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Unarchive an estimate","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/unarchive","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","unarchive"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Get estimate history timeline","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/history","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","history"]}}},{"name":"List all versions for an estimate","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/versions","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","versions"]}}},{"name":"Display a specific version","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/versions\/{{{version}}}","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","versions","{{{version}}}"]}}},{"name":"Validate estimate for finalization","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/validation","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","validation"]}}},{"name":"Create a new item in estimate draft","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/services\/draft","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","services","draft"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Update an existing item in estimate draft","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/services\/draft\/{{{serviceId}}}","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","services","draft","{{{serviceId}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"estimate.deleteService","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/services\/draft\/{{{serviceId}}}","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","services","draft","{{{serviceId}}}"]}}},{"name":"Add a manual (non-catalog) part to an estimate service group","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/services\/draft\/{{{serviceId}}}\/parts","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","services","draft","{{{serviceId}}}","parts"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Add a manual (non-catalog) labor line to an estimate service group","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/services\/draft\/{{{serviceId}}}\/labor","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","services","draft","{{{serviceId}}}","labor"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Add a catalog part to an estimate service group (CAR-324)","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/services\/draft\/{{{serviceId}}}\/parts\/from-catalog","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","services","draft","{{{serviceId}}}","parts","from-catalog"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Add a catalog labor entry to an estimate service group (CAR-324)","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/services\/draft\/{{{serviceId}}}\/labor\/from-catalog","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","services","draft","{{{serviceId}}}","labor","from-catalog"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Update pricing of a part line within an estimate service group (CAR-327)","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/services\/draft\/{{{serviceId}}}\/parts\/{{{partId}}}\/pricing","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","services","draft","{{{serviceId}}}","parts","{{{partId}}}","pricing"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Update pricing of a labor line within an estimate service group (CAR-327)","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/services\/draft\/{{{serviceId}}}\/labor\/{{{laborId}}}\/pricing","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","services","draft","{{{serviceId}}}","labor","{{{laborId}}}","pricing"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Get items from estimate draft or version","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/services","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","services"],"query":[{"key":"status","value":"","description":""}]}}},{"name":"Approve items in the current version","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/services\/approve","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","services","approve"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Reject items in the current version","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/services\/reject","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","services","reject"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Reset item approvals in the current version","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/services\/reset-approval","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","services","reset-approval"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Manually recalculate estimate draft totals","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{id}}}\/draft\/recalculate","host":["{{base_url}}"],"path":["v1","estimates","{{{id}}}","draft","recalculate"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Get deferred (rejected) items for a vehicle","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/vehicle\/{{{vehicleId}}}\/deferred-items","host":["{{base_url}}"],"path":["v1","estimates","vehicle","{{{vehicleId}}}","deferred-items"]}}}]},{"name":"Inspection","item":[{"name":"Get full tree of inspection categories and their items","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/inspection\/tree","host":["{{base_url}}"],"path":["v1","inspection","tree"]}}}]},{"name":"Inspection Categories","item":[{"name":"inspectionCategory.index","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/inspection\/categories","host":["{{base_url}}"],"path":["v1","inspection","categories"]}}},{"name":"inspectionCategory.store","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/inspection\/categories","host":["{{base_url}}"],"path":["v1","inspection","categories"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"inspectionCategory.show","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/inspection\/categories\/{{{id}}}","host":["{{base_url}}"],"path":["v1","inspection","categories","{{{id}}}"]}}},{"name":"inspectionCategory.update","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/inspection\/categories\/{{{id}}}","host":["{{base_url}}"],"path":["v1","inspection","categories","{{{id}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"inspectionCategory.destroy","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/inspection\/categories\/{{{id}}}","host":["{{base_url}}"],"path":["v1","inspection","categories","{{{id}}}"]}}}]},{"name":"Inspection Items","item":[{"name":"inspectionItem.index","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/inspection\/items","host":["{{base_url}}"],"path":["v1","inspection","items"],"query":[{"key":"category_id","value":"","description":""}]}}},{"name":"inspectionItem.store","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/inspection\/items","host":["{{base_url}}"],"path":["v1","inspection","items"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"inspectionItem.show","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/inspection\/items\/{{{id}}}","host":["{{base_url}}"],"path":["v1","inspection","items","{{{id}}}"]}}},{"name":"inspectionItem.update","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/inspection\/items\/{{{id}}}","host":["{{base_url}}"],"path":["v1","inspection","items","{{{id}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"inspectionItem.destroy","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/inspection\/items\/{{{id}}}","host":["{{base_url}}"],"path":["v1","inspection","items","{{{id}}}"]}}}]},{"name":"Integrations","item":[{"name":"integration.index","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/integrations","host":["{{base_url}}"],"path":["v1","integrations"],"query":[{"key":"service_type","value":"","description":""}]}}},{"name":"integration.store","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/integrations","host":["{{base_url}}"],"path":["v1","integrations"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"integration.show","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/integrations\/{{{id}}}","host":["{{base_url}}"],"path":["v1","integrations","{{{id}}}"]}}}]},{"name":"Item Categories","item":[{"name":"itemCategory.index","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/item-categories","host":["{{base_url}}"],"path":["v1","item-categories"],"query":[{"key":"limit","value":"","description":""},{"key":"offset","value":"","description":""},{"key":"search","value":"","description":""},{"key":"is_active","value":"","description":""}]}}},{"name":"itemCategory.store","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/item-categories","host":["{{base_url}}"],"path":["v1","item-categories"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"itemCategory.show","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/item-categories\/{{{id}}}","host":["{{base_url}}"],"path":["v1","item-categories","{{{id}}}"]}}},{"name":"itemCategory.update","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/item-categories\/{{{id}}}","host":["{{base_url}}"],"path":["v1","item-categories","{{{id}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"itemCategory.destroy","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/item-categories\/{{{id}}}","host":["{{base_url}}"],"path":["v1","item-categories","{{{id}}}"]}}},{"name":"itemCategory.setActive","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/item-categories\/{{{id}}}\/active","host":["{{base_url}}"],"path":["v1","item-categories","{{{id}}}","active"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}}]},{"name":"Items","item":[{"name":"List items","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/items","host":["{{base_url}}"],"path":["v1","items"],"query":[{"key":"limit","value":"","description":""},{"key":"offset","value":"","description":""},{"key":"search","value":"","description":""},{"key":"type","value":"","description":""},{"key":"category_id","value":"","description":""},{"key":"category_ids[]","value":"","description":""},{"key":"is_active","value":"","description":""},{"key":"workshop_ids[]","value":"","description":""},{"key":"code","value":"","description":""},{"key":"barcode","value":"","description":""},{"key":"product_type","value":"","description":""},{"key":"kind","value":"","description":""},{"key":"sort_by","value":"","description":""},{"key":"sort_dir","value":"","description":""}]}}},{"name":"Create item","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/items","host":["{{base_url}}"],"path":["v1","items"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"List items available for a specific workshop","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/items\/workshop\/{{{workshop_id}}}","host":["{{base_url}}"],"path":["v1","items","workshop","{{{workshop_id}}}"],"query":[{"key":"limit","value":"","description":""},{"key":"offset","value":"","description":""},{"key":"search","value":"","description":""},{"key":"type","value":"","description":""},{"key":"category_id","value":"","description":""},{"key":"category_ids[]","value":"","description":""},{"key":"is_active","value":"","description":""},{"key":"workshop_ids[]","value":"","description":""},{"key":"code","value":"","description":""},{"key":"barcode","value":"","description":""},{"key":"product_type","value":"","description":""},{"key":"kind","value":"","description":""},{"key":"sort_by","value":"","description":""},{"key":"sort_dir","value":"","description":""}]}}},{"name":"Get item details","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/items\/{{{item_id}}}","host":["{{base_url}}"],"path":["v1","items","{{{item_id}}}"]}}},{"name":"Update item","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/items\/{{{item_id}}}","host":["{{base_url}}"],"path":["v1","items","{{{item_id}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Delete item","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/items\/{{{item_id}}}","host":["{{base_url}}"],"path":["v1","items","{{{item_id}}}"]}}},{"name":"List customizations of an item across services (children\/pricing overrides)","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/items\/{{{item_id}}}\/customizations","host":["{{base_url}}"],"path":["v1","items","{{{item_id}}}","customizations"]}}},{"name":"Restrict item to specific workshops","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/items\/{{{item_id}}}\/restrict","host":["{{base_url}}"],"path":["v1","items","{{{item_id}}}","restrict"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]}]},{"name":"Job Board","item":[{"name":"Get the job board snapshot: columns + cards grouped by column + user preferences","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/job-board","host":["{{base_url}}"],"path":["v1","job-board"],"query":[{"key":"estimate_sort_by","value":"","description":""},{"key":"estimate_sort_direction","value":"","description":""},{"key":"filter_assigned_user_ids[]","value":"","description":""},{"key":"filter_approval_statuses[]","value":"","description":""},{"key":"filter_tag_ids[]","value":"","description":""},{"key":"filter_tag_colors[]","value":"","description":""}]}}},{"name":"List workflow columns (without cards)","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/job-board\/columns","host":["{{base_url}}"],"path":["v1","job-board","columns"]}}},{"name":"Create a new work-orders workflow column","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/job-board\/columns","host":["{{base_url}}"],"path":["v1","job-board","columns"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Rename a workflow column","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/job-board\/columns\/{{{id}}}","host":["{{base_url}}"],"path":["v1","job-board","columns","{{{id}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Delete a workflow column. If it has linked ORs, target_column_id is required","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/job-board\/columns\/{{{id}}}","host":["{{base_url}}"],"path":["v1","job-board","columns","{{{id}}}"],"query":[{"key":"target_column_id","value":"","description":""}]}}},{"name":"Get the authenticated user's job board preferences","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/job-board\/preferences","host":["{{base_url}}"],"path":["v1","job-board","preferences"]}}},{"name":"Update the authenticated user's job board preferences.\nPartial update \u2014 only fields present in the body are changed","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/job-board\/preferences","host":["{{base_url}}"],"path":["v1","job-board","preferences"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}}]},{"name":"OAuth2","item":[{"name":"Issue access token with tenant_id","request":{"method":"POST","header":[{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/oauth\/token","host":["{{base_url}}"],"path":["v1","oauth","token"]},"body":{"mode":"urlencoded","urlencoded":[]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 200) {","    const response = pm.response.json();","    if (response.access_token) {","        pm.collectionVariables.set('access_token', response.access_token);","        console.log('Access token saved');","    }","    if (response.refresh_token) {","        pm.collectionVariables.set('refresh_token', response.refresh_token);","        console.log('Refresh token saved');","    }","}"]}},{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Refresh access token with tenant_id","request":{"method":"POST","header":[{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/oauth\/token\/refresh","host":["{{base_url}}"],"path":["v1","oauth","token","refresh"]},"body":{"mode":"urlencoded","urlencoded":[]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 200) {","    const response = pm.response.json();","    if (response.access_token) {","        pm.collectionVariables.set('access_token', response.access_token);","        console.log('New access token saved');","    }","    if (response.refresh_token) {","        pm.collectionVariables.set('refresh_token', response.refresh_token);","        console.log('New refresh token saved');","    }","}"]}},{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]}]},{"name":"Payment Types","item":[{"name":"paymentType.index","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/payment-types","host":["{{base_url}}"],"path":["v1","payment-types"]}}},{"name":"paymentType.toggle","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/payment-types\/{{{id}}}\/toggle","host":["{{base_url}}"],"path":["v1","payment-types","{{{id}}}","toggle"]}}}]},{"name":"Plans","item":[{"name":"List all available subscription plans","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/plans","host":["{{base_url}}"],"path":["v1","plans"]}}},{"name":"Compare plans side by side","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/plans\/compare","host":["{{base_url}}"],"path":["v1","plans","compare"]}}},{"name":"Get details of a specific plan","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/plans\/{{{type}}}","host":["{{base_url}}"],"path":["v1","plans","{{{type}}}"]}}}]},{"name":"Public Estimates","item":[{"name":"View public estimate (current version)","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/public\/estimates\/{{{token}}}","host":["{{base_url}}"],"path":["v1","public","estimates","{{{token}}}"],"query":[{"key":"version","value":"","description":"Check if version is provided via query string"}]}}},{"name":"View public estimate (specific version)","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/public\/estimates\/{{{token}}}\/{{{version}}}","host":["{{base_url}}"],"path":["v1","public","estimates","{{{token}}}","{{{version}}}"]}}},{"name":"Download public estimate PDF","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/public\/estimates\/{{{token}}}\/pdf","host":["{{base_url}}"],"path":["v1","public","estimates","{{{token}}}","pdf"],"query":[{"key":"version","value":"","description":"Check if version is provided via query string"}]}}}]},{"name":"Services","item":[{"name":"List services","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/services","host":["{{base_url}}"],"path":["v1","services"],"query":[{"key":"limit","value":"","description":""},{"key":"offset","value":"","description":""},{"key":"search","value":"","description":""},{"key":"category_id","value":"","description":""},{"key":"category_ids[]","value":"","description":""},{"key":"is_active","value":"","description":""},{"key":"workshop_ids[]","value":"","description":""},{"key":"sort_by","value":"","description":""},{"key":"sort_dir","value":"","description":""}]}}},{"name":"Create service","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/services","host":["{{base_url}}"],"path":["v1","services"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Get service details","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/services\/{{{service_id}}}","host":["{{base_url}}"],"path":["v1","services","{{{service_id}}}"]}}},{"name":"Update service","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/services\/{{{service_id}}}","host":["{{base_url}}"],"path":["v1","services","{{{service_id}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Delete service","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/services\/{{{service_id}}}","host":["{{base_url}}"],"path":["v1","services","{{{service_id}}}"]}}},{"name":"Restrict service to specific workshops","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/services\/{{{service_id}}}\/restrict","host":["{{base_url}}"],"path":["v1","services","{{{service_id}}}","restrict"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Add item to service","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/services\/{{{service_id}}}\/items","host":["{{base_url}}"],"path":["v1","services","{{{service_id}}}","items"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Update item within service","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/services\/{{{service_id}}}\/items\/{{{item_id}}}","host":["{{base_url}}"],"path":["v1","services","{{{service_id}}}","items","{{{item_id}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Remove item from service","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/services\/{{{service_id}}}\/items\/{{{item_id}}}","host":["{{base_url}}"],"path":["v1","services","{{{service_id}}}","items","{{{item_id}}}"]}}},{"name":"Reset pricing customizations on a service line item back to catalog defaults","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/services\/{{{service_id}}}\/items\/{{{service_item_id}}}\/pricing","host":["{{base_url}}"],"path":["v1","services","{{{service_id}}}","items","{{{service_item_id}}}","pricing"]}}},{"name":"Activate or deactivate a service","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/services\/{{{service_id}}}\/active","host":["{{base_url}}"],"path":["v1","services","{{{service_id}}}","active"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Duplicate a service (clones service + line items, name prefixed \"C\u00f3pia de \")","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/services\/{{{service_id}}}\/duplicate","host":["{{base_url}}"],"path":["v1","services","{{{service_id}}}","duplicate"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]}]},{"name":"Suppliers","item":[{"name":"supplier.index","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/suppliers","host":["{{base_url}}"],"path":["v1","suppliers"]}}},{"name":"supplier.store","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/suppliers","host":["{{base_url}}"],"path":["v1","suppliers"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"supplier.show","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/suppliers\/{{{id}}}","host":["{{base_url}}"],"path":["v1","suppliers","{{{id}}}"]}}},{"name":"supplier.update","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/suppliers\/{{{id}}}","host":["{{base_url}}"],"path":["v1","suppliers","{{{id}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"supplier.destroy","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/suppliers\/{{{id}}}","host":["{{base_url}}"],"path":["v1","suppliers","{{{id}}}"]}}}]},{"name":"Support","item":[{"name":"support.request","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/support\/request","host":["{{base_url}}"],"path":["v1","support","request"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Get account manager contact details","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/support\/account-manager","host":["{{base_url}}"],"path":["v1","support","account-manager"]}}}]},{"name":"System","item":[{"name":"Health check endpoint","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/health","host":["{{base_url}}"],"path":["v1","health"]}}},{"name":"Ping endpoint","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/ping","host":["{{base_url}}"],"path":["v1","ping"]}}}]},{"name":"SystemAnnouncements","item":[{"name":"systemAnnouncements.index","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/system\/announcements","host":["{{base_url}}"],"path":["v1","system","announcements"]}}}]},{"name":"Tags","item":[{"name":"entityTags.syncWorkOrder","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{workOrder}}}\/tags","host":["{{base_url}}"],"path":["v1","work-orders","{{{workOrder}}}","tags"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"entityTags.syncEstimate","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/estimates\/{{{estimate}}}\/tags","host":["{{base_url}}"],"path":["v1","estimates","{{{estimate}}}","tags"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"tag.index","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tags","host":["{{base_url}}"],"path":["v1","tags"],"query":[{"key":"entity_type","value":"","description":""},{"key":"include_archived","value":"","description":""}]}}},{"name":"tag.store","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tags","host":["{{base_url}}"],"path":["v1","tags"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"tag.update","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tags\/{{{id}}}","host":["{{base_url}}"],"path":["v1","tags","{{{id}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"tag.destroy","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tags\/{{{id}}}","host":["{{base_url}}"],"path":["v1","tags","{{{id}}}"]}}},{"name":"tag.archive","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tags\/{{{id}}}\/archive","host":["{{base_url}}"],"path":["v1","tags","{{{id}}}","archive"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"tag.unarchive","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tags\/{{{id}}}\/unarchive","host":["{{base_url}}"],"path":["v1","tags","{{{id}}}","unarchive"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]}]},{"name":"Tenant","item":[{"name":"Get tenant subscription status","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tenant\/status","host":["{{base_url}}"],"path":["v1","tenant","status"]}}},{"name":"Update tenant subscription","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tenant\/subscription","host":["{{base_url}}"],"path":["v1","tenant","subscription"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Get tenant settings","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tenant\/settings","host":["{{base_url}}"],"path":["v1","tenant","settings"]}}},{"name":"Update tenant settings","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tenant\/settings","host":["{{base_url}}"],"path":["v1","tenant","settings"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Upload tenant logo","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tenant\/settings\/logo","host":["{{base_url}}"],"path":["v1","tenant","settings","logo"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Delete tenant logo","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tenant\/settings\/logo","host":["{{base_url}}"],"path":["v1","tenant","settings","logo"]}}}]},{"name":"Tenant Labor Prices","item":[{"name":"Display a listing of labor prices","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tenant-labor-prices","host":["{{base_url}}"],"path":["v1","tenant-labor-prices"]}}},{"name":"Store a newly created labor price","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tenant-labor-prices","host":["{{base_url}}"],"path":["v1","tenant-labor-prices"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Display the specified labor price","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tenant-labor-prices\/{{{id}}}","host":["{{base_url}}"],"path":["v1","tenant-labor-prices","{{{id}}}"]}}},{"name":"Update the specified labor price","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tenant-labor-prices\/{{{id}}}","host":["{{base_url}}"],"path":["v1","tenant-labor-prices","{{{id}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Remove the specified labor price","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tenant-labor-prices\/{{{id}}}","host":["{{base_url}}"],"path":["v1","tenant-labor-prices","{{{id}}}"]}}},{"name":"Set a labor price as default","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/tenant-labor-prices\/{{{id}}}\/set-default","host":["{{base_url}}"],"path":["v1","tenant-labor-prices","{{{id}}}","set-default"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]}]},{"name":"User Management","item":[{"name":"List users","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users","host":["{{base_url}}"],"path":["v1","users"]}}},{"name":"Create a new user in the tenant","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users","host":["{{base_url}}"],"path":["v1","users"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Invite user","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users\/invitations","host":["{{base_url}}"],"path":["v1","users","invitations"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Update user roles","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users\/{{{user}}}\/roles","host":["{{base_url}}"],"path":["v1","users","{{{user}}}","roles"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Delete a pending user","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users\/{{{user}}}","host":["{{base_url}}"],"path":["v1","users","{{{user}}}"]}}},{"name":"Show the specified user","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users\/{{{user}}}","host":["{{base_url}}"],"path":["v1","users","{{{user}}}"]}}},{"name":"Resend invite email","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users\/{{{user}}}\/resend-invite","host":["{{base_url}}"],"path":["v1","users","{{{user}}}","resend-invite"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Deactivate user","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users\/{{{user}}}\/deactivate","host":["{{base_url}}"],"path":["v1","users","{{{user}}}","deactivate"]}}},{"name":"Update user workshop access","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users\/{{{user}}}\/workshop-access","host":["{{base_url}}"],"path":["v1","users","{{{user}}}","workshop-access"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}}]},{"name":"User Profile","item":[{"name":"Get current user information","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/user","host":["{{base_url}}"],"path":["v1","user"]}}},{"name":"Update user information","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/user","host":["{{base_url}}"],"path":["v1","user"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Get effective permissions for the current user","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/user\/permissions","host":["{{base_url}}"],"path":["v1","user","permissions"]}}},{"name":"Change user password","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/user\/change-password","host":["{{base_url}}"],"path":["v1","user","change-password"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Force change password (first login)","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/user\/force-change-password","host":["{{base_url}}"],"path":["v1","user","force-change-password"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Debug endpoint to validate permissions and token access","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/user\/debug-permissions","host":["{{base_url}}"],"path":["v1","user","debug-permissions"],"query":[{"key":"check_permission","value":"","description":""}]}}}]},{"name":"User Roles","item":[{"name":"List available roles","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users\/roles","host":["{{base_url}}"],"path":["v1","users","roles"]}}},{"name":"Create a custom role","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users\/roles","host":["{{base_url}}"],"path":["v1","users","roles"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"List system roles","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users\/roles\/system","host":["{{base_url}}"],"path":["v1","users","roles","system"]}}},{"name":"List available permissions","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users\/roles\/permissions","host":["{{base_url}}"],"path":["v1","users","roles","permissions"]}}},{"name":"Get a specific role","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users\/roles\/{{{roleId}}}","host":["{{base_url}}"],"path":["v1","users","roles","{{{roleId}}}"]}}},{"name":"Update a custom role","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users\/roles\/{{{roleId}}}","host":["{{base_url}}"],"path":["v1","users","roles","{{{roleId}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Delete a custom role","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/users\/roles\/{{{roleId}}}","host":["{{base_url}}"],"path":["v1","users","roles","{{{roleId}}}"]}}}]},{"name":"Vehicle Catalog","item":[{"name":"List all active vehicle brands","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/vehicle-catalog\/brands","host":["{{base_url}}"],"path":["v1","vehicle-catalog","brands"]}}},{"name":"Get a specific brand with its models","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/vehicle-catalog\/brands\/{{{brand}}}","host":["{{base_url}}"],"path":["v1","vehicle-catalog","brands","{{{brand}}}"]}}},{"name":"List all models for a specific brand","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/vehicle-catalog\/brands\/{{{brand}}}\/models","host":["{{base_url}}"],"path":["v1","vehicle-catalog","brands","{{{brand}}}","models"]}}},{"name":"Get a specific model with its versions","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/vehicle-catalog\/models\/{{{model}}}","host":["{{base_url}}"],"path":["v1","vehicle-catalog","models","{{{model}}}"]}}},{"name":"List distinct variants for a specific model","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/vehicle-catalog\/models\/{{{model}}}\/variants","host":["{{base_url}}"],"path":["v1","vehicle-catalog","models","{{{model}}}","variants"]}}},{"name":"List all versions for a specific model","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/vehicle-catalog\/models\/{{{model}}}\/versions","host":["{{base_url}}"],"path":["v1","vehicle-catalog","models","{{{model}}}","versions"],"query":[{"key":"variant","value":"","description":""}]}}},{"name":"Get a specific version with full details","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/vehicle-catalog\/versions\/{{{version}}}","host":["{{base_url}}"],"path":["v1","vehicle-catalog","versions","{{{version}}}"]}}},{"name":"Search vehicles by brand, model, or version name","request":{"method":"GET","header":[],"url":{"raw":"{{base_url}}\/v1\/vehicle-catalog\/search\/{{{query}}}","host":["{{base_url}}"],"path":["v1","vehicle-catalog","search","{{{query}}}"]}}}]},{"name":"Vehicles","item":[{"name":"Resolve vehicle information by license plate","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/resolve-by-plate","host":["{{base_url}}"],"path":["v1","vehicles","resolve-by-plate"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Resolve vehicle information by VIN","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/resolve-by-vin","host":["{{base_url}}"],"path":["v1","vehicles","resolve-by-vin"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"List vehicles","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles","host":["{{base_url}}"],"path":["v1","vehicles"],"query":[{"key":"client_id","value":"","description":""},{"key":"brand_id","value":"","description":""},{"key":"model_id","value":"","description":""},{"key":"status[]","value":"","description":""},{"key":"search","value":"","description":""},{"key":"limit","value":"","description":""},{"key":"offset","value":"","description":""},{"key":"sort_by","value":"","description":""},{"key":"sort_dir","value":"","description":""}]}}},{"name":"Create vehicle","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles","host":["{{base_url}}"],"path":["v1","vehicles"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Get vehicle details","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}"]}}},{"name":"Update vehicle","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Partial update of a vehicle (e.g. only client_id).\nOnly sent fields are updated","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Delete vehicle","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}"]}}},{"name":"Transfer vehicle to a new owner","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/transfer","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","transfer"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Get possible gearbox types","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/maintenance\/gearbox-types","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","maintenance","gearbox-types"]}}},{"name":"Get maintenance variables","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/maintenance\/variables","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","maintenance","variables"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Get service proposal","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/maintenance\/service-proposal","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","maintenance","service-proposal"],"query":[{"key":"kilometers","value":"","description":""},{"key":"qual_col_id","value":"","description":""},{"key":"plate_registration_date","value":"","description":""}]}}},{"name":"Get maintenance services","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/maintenance\/services","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","maintenance","services"],"query":[{"key":"kilometers","value":"","description":""},{"key":"qual_col_id","value":"","description":""}]}}},{"name":"Get maintenance operations","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/maintenance\/operations","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","maintenance","operations"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Get maintenance parts","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/maintenance\/parts","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","maintenance","parts"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Get service tree","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/service-tree","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","service-tree"],"query":[{"key":"search_text","value":"","description":""}]}}},{"name":"Get service tree work steps by sub-group","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/service-tree\/work-steps-for-sub-group","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","service-tree","work-steps-for-sub-group"],"query":[{"key":"sub_group_id","value":"","description":""}]}}},{"name":"Get service tree work steps by item\/operation","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/service-tree\/work-steps","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","service-tree","work-steps"],"query":[{"key":"item_mp_id","value":"","description":""},{"key":"kor_id","value":"","description":""}]}}},{"name":"Get repair graphic list (main groups tree)","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/repair-diagram","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","repair-diagram"],"query":[{"key":"search_text","value":"","description":""}]}}},{"name":"Get repair graphic vehicle image","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/repair-diagram\/vehicle-image","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","repair-diagram","vehicle-image"]}}},{"name":"Get repair graphic main group image","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/repair-diagram\/main-group-image","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","repair-diagram","main-group-image"],"query":[{"key":"main_group_id","value":"","description":""}]}}},{"name":"Get repair graphic sub-group image","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/repair-diagram\/sub-group-image","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","repair-diagram","sub-group-image"],"query":[{"key":"main_group_id","value":"","description":""},{"key":"sub_group_id","value":"","description":""}]}}},{"name":"Get repair graphic work steps","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/vehicles\/{{{vehicle_id}}}\/repair-diagram\/work-steps","host":["{{base_url}}"],"path":["v1","vehicles","{{{vehicle_id}}}","repair-diagram","work-steps"],"query":[{"key":"item_mp_id","value":"","description":""}]}}}]},{"name":"Work Orders","item":[{"name":"List work orders for the current tenant","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders","host":["{{base_url}}"],"path":["v1","work-orders"],"query":[{"key":"limit","value":"","description":""},{"key":"offset","value":"","description":""},{"key":"search","value":"","description":""},{"key":"sort_by","value":"","description":""},{"key":"sort_dir","value":"","description":""},{"key":"is_archived","value":"","description":""},{"key":"status","value":"","description":""},{"key":"client_id","value":"","description":""},{"key":"vehicle_id","value":"","description":""}]}}},{"name":"Create a work order manually (all fields optional)","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders","host":["{{base_url}}"],"path":["v1","work-orders"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Create a work order from an estimate (copies content and links estimate)","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/from-estimate","host":["{{base_url}}"],"path":["v1","work-orders","from-estimate"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Get a work order by ID with content","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}"]}}},{"name":"Update work order (client and\/or vehicle)","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Permanently delete a work order.\nBlocked if there are recorded payments or attached invoices","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}"]}}},{"name":"Update work order title","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/title","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","title"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Get work order history (events log)","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/history","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","history"]}}},{"name":"List payments for a work order","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/payments","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","payments"]}}},{"name":"Record a payment for a work order","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/payments","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","payments"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Mark work order as completed (complete repair)","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/complete-repair","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","complete-repair"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Schedule or reschedule a work order appointment date","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/schedule","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","schedule"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Set or update a work order delivery deadline","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/deadline","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","deadline"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Register vehicle reception for a work order.\nTransitions status to InProgress","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/receive-vehicle","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","receive-vehicle"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Register vehicle delivery, completing and archiving the work order","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/deliver-vehicle","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","deliver-vehicle"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Cancel a work order and auto-archive it","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/cancel","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","cancel"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Archive a work order","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/archive","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","archive"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Unarchive a work order. Reverts status to Pending","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/unarchive","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","unarchive"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Reopen a completed or cancelled work order, resetting it to Pending","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/reopen","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","reopen"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Move a work order to a job board workflow column (visual placement only).\nPass workflow_column_id = null to detach the OR from the board","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/workflow-column","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","workflow-column"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"List estimates linked to a work order","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/estimates","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","estimates"]}}},{"name":"Create an estimate from a work order (blank or based on previous)","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/estimates","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","estimates"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Assign responsible users to a work order","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/users","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","users"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"List invoices for a work order","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/invoices","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","invoices"]}}},{"name":"Attach an invoice to a work order","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/invoices","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","invoices"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Cancel a payment (soft cancel, not delete)","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/payments\/{{{paymentId}}}\/cancel","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","payments","{{{paymentId}}}","cancel"]}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Link an estimate to the work order and copy content (client, vehicle, services)","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/link-estimate","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","link-estimate"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Download work order as PDF","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/pdf","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","pdf"]}}},{"name":"Get or generate share URL for work order","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/share-url","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","share-url"]}}},{"name":"Send work order to client via email or SMS","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/send","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","send"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Save\/update work order content (full content payload)","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/content","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","content"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Save\/update work order inspections","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/inspections","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","inspections"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"List services from work order content.\nSupports ?include=all|labor|parts to filter response","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services"],"query":[{"key":"include","value":"all","description":""}]}}},{"name":"Add a service to the work order","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Update a service in the work order","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services\/{{{serviceId}}}","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services","{{{serviceId}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Delete a service from the work order","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services\/{{{serviceId}}}","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services","{{{serviceId}}}"]}}},{"name":"Add a manual (non-catalog) part to a WorkOrder service group","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services\/{{{serviceId}}}\/parts","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services","{{{serviceId}}}","parts"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Add a manual (non-catalog) labor line to a WorkOrder service group","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services\/{{{serviceId}}}\/labor","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services","{{{serviceId}}}","labor"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Add a catalog part to a WorkOrder service group (CAR-324)","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services\/{{{serviceId}}}\/parts\/from-catalog","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services","{{{serviceId}}}","parts","from-catalog"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Add a catalog labor entry to a WorkOrder service group (CAR-324)","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services\/{{{serviceId}}}\/labor\/from-catalog","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services","{{{serviceId}}}","labor","from-catalog"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Update pricing of a part line in a WorkOrder service group (CAR-327)","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services\/{{{serviceId}}}\/parts\/{{{partId}}}\/pricing","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services","{{{serviceId}}}","parts","{{{partId}}}","pricing"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Update pricing of a labor line in a WorkOrder service group (CAR-327)","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services\/{{{serviceId}}}\/labor\/{{{laborId}}}\/pricing","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services","{{{serviceId}}}","labor","{{{laborId}}}","pricing"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Update a service status (Pending\/InProgress\/Completed).\nCompleting a service cascades to all labor items","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services\/{{{serviceId}}}\/status","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services","{{{serviceId}}}","status"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Assign a technician to a service (and optionally all labor items)","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services\/{{{serviceId}}}\/assign-technician","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services","{{{serviceId}}}","assign-technician"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Assign a technician to a specific labor item","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services\/{{{serviceId}}}\/labor\/{{{laborId}}}\/assign-technician","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services","{{{serviceId}}}","labor","{{{laborId}}}","assign-technician"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Update a labor item status (Pending\/Completed).\nRecomputes parent service status automatically","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services\/{{{serviceId}}}\/labor\/{{{laborId}}}\/status","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services","{{{serviceId}}}","labor","{{{laborId}}}","status"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Update part tracking fields (received, stock, used)","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/services\/{{{serviceId}}}\/parts\/{{{partId}}}","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","services","{{{serviceId}}}","parts","{{{partId}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"List part orders for a work order","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/part-orders","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","part-orders"]}}},{"name":"Create a part order for a work order","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/part-orders","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","part-orders"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Get a part order by ID with lines","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/part-orders\/{{{partOrderId}}}","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","part-orders","{{{partOrderId}}}"]}}},{"name":"Update part order status (e.g. Cancelled, Delivered, Late)","request":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/part-orders\/{{{partOrderId}}}","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","part-orders","{{{partOrderId}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Copy parts from work order content to a part order","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/part-orders\/{{{partOrderId}}}\/copy-parts","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","part-orders","{{{partOrderId}}}","copy-parts"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"List parts from work order content that are not yet fully ordered","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/unordered-parts","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","unordered-parts"]}}},{"name":"Receive part order lines (update received_qty). Use receive_all or per-line","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/work-orders\/{{{id}}}\/part-orders\/{{{partOrderId}}}\/receive","host":["{{base_url}}"],"path":["v1","work-orders","{{{id}}}","part-orders","{{{partOrderId}}}","receive"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]}]},{"name":"Workshops","item":[{"name":"Display a listing of workshops","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/workshops","host":["{{base_url}}"],"path":["v1","workshops"]}}},{"name":"Store a newly created workshop","request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/workshops","host":["{{base_url}}"],"path":["v1","workshops"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}},"event":[{"listen":"test","script":{"type":"text\/javascript","exec":["if (pm.response.code === 201) {","    const response = pm.response.json();","    \/\/ Try to extract common ID fields","    const idFields = ['id', 'client_id', 'clients_fleet_id', 'fleet_id', 'vehicle_id', 'user_id'];","    idFields.forEach(field => {","        if (response[field]) {","            pm.collectionVariables.set(field, response[field]);","            console.log(field + ' saved:', response[field]);","        }","    });","}"]}}]},{"name":"Display the specified workshop","request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/workshops\/{{{workshop}}}","host":["{{base_url}}"],"path":["v1","workshops","{{{workshop}}}"]}}},{"name":"Update the specified workshop","request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"},{"key":"Content-Type","value":"application\/json","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/workshops\/{{{workshop}}}","host":["{{base_url}}"],"path":["v1","workshops","{{{workshop}}}"]},"body":{"mode":"raw","raw":"[]","options":{"raw":{"language":"json"}}}}},{"name":"Remove the specified workshop","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":{"raw":"{{base_url}}\/v1\/workshops\/{{{workshop}}}","host":["{{base_url}}"],"path":["v1","workshops","{{{workshop}}}"]}}}]}],"event":[{"listen":"prerequest","script":{"type":"text\/javascript","exec":["\/\/ Log request details","console.log('Making request to:', pm.request.url.toString());","console.log('Method:', pm.request.method);","console.log('Headers:', pm.request.headers);"]}},{"listen":"test","script":{"type":"text\/javascript","exec":["\/\/ Log response details","console.log('Response status:', pm.response.code);","console.log('Response time:', pm.response.responseTime + 'ms');","","\/\/ Basic response validation","pm.test('Response time is less than 5000ms', function () {","    pm.expect(pm.response.responseTime).to.be.below(5000);","});","","pm.test('Response has status code', function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201, 204, 400, 401, 403, 404, 422, 500]);","});"]}}]}