{"info":{"_postman_id":"36732947-265f-4415-a799-504d54193762","name":"Capway sample collection","description":"Test-only collection based on the supplied TestCase.json. Run the token request first, then create the case. OAuth 2.0 Client Credentials: client ID and secret via Basic Auth at the token endpoint; API requests use a Bearer token. No scope. Credentials and tokens are not included. PUT creates an actual case in the test environment. Payload structure and supplied financial values are preserved; creditor reference, debtor ID and email use environment variables. No API requests were executed when preparing this collection.","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json","_exporter_id":"38820305"},"item":[{"name":"v1","item":[{"name":"Cases","item":[{"name":"CreateCase","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"[\n  {\n    \"clientReferenceNumber\": \"{{clientReferenceNumber}}\",\n    \"currencyCode\": \"SEK\",\n    \"service\": \"PreCollection\",\n    \"debtors\": [\n      {\n        \"idNumber\": \"{{debtorIdNumber}}\",\n        \"juridicalType\": 0,\n        \"debtorRole\": \"Debtor\",\n        \"firstname\": \"Test\",\n        \"lastname\": \"Person\",\n        \"street\": \"Testgatan 1\",\n        \"city\": \"Stockholm\",\n        \"zipCode\": \"11122\",\n        \"countryCode\": \"SE\",\n        \"emails\": [\n          \"{{debtorEmail}}\"\n        ],\n        \"languageCode\": \"SV\",\n        \"currencyCode\": \"SEK\"\n      }\n    ],\n    \"debts\": [\n      {\n        \"description\": \"Test Collection Case\",\n        \"currencyCode\": \"SEK\",\n        \"remainingPrincipal\": 1000.0,\n        \"remainingVAT\": 250.0,\n        \"billDate\": \"2026-06-01T00:00:00\",\n        \"dueDate\": \"2026-06-11T00:00:00\",\n        \"interestRate\": 8,\n        \"interestCode\": \"OGR\"\n      }\n    ]\n  }\n]","options":{"raw":{"language":"json"}}},"url":{"raw":"{{baseURL}}/v1/Cases","host":["{{baseURL}}"],"path":["v1","Cases"],"query":[{"key":"async","value":"true","description":"Optional. Omitted by default; the source documents true as the default.","disabled":true}]},"description":"Creates a test case using the supplied payload structure. Authorization is inherited from the collection. clientReferenceNumber must belong to the creditor enabled for your test credentials. Service and interest code must exist in the test configuration. The source financial amounts and dates are retained."},"response":[]},{"name":"GetCases","request":{"method":"GET","header":[],"url":{"raw":"{{baseURL}}/v1/Cases?$filter=remainingSum gt 0","host":["{{baseURL}}"],"path":["v1","Cases"],"query":[{"key":"$filter","value":"remainingSum gt 0"}]}},"response":[]},{"name":"GetCaseDetails","request":{"method":"GET","header":[],"url":{"raw":"{{baseURL}}/v1/Cases/{{caseGuid}}","host":["{{baseURL}}"],"path":["v1","Cases","{{caseGuid}}"]}},"response":[]},{"name":"GetCaseFees","request":{"method":"GET","header":[],"url":{"raw":"{{baseURL}}/v1/Cases/{{caseGuid}}/Fees","host":["{{baseURL}}"],"path":["v1","Cases","{{caseGuid}}","Fees"]}},"response":[]},{"name":"CloseCase","request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{accessToken}}","type":"string"}]},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"closureCode\": \"RETRIEVED\",\n  \"note\": \"Test\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{baseURL}}/v1/Cases/{{caseGuid}}/Close","host":["{{baseURL}}"],"path":["v1","Cases","{{caseGuid}}","Close"]}},"response":[]},{"name":"PutPayment","request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n  \"paymentReference\": \"12345\",\n  \"paymentDate\": \"2026-08-24T14:15:22Z\",\n  \"paymentAmount\": 100.50,\n  \"currencyCode\": \"SEK\",\n  \"source\": \"BG\",\n  \"specification\": [\n    {\n      \"invoiceReference\": \"110023\",\n      \"principalAmount\": 100.50,\n      \"interestAmount\": 0.0\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{baseURL}}/v1/Cases/{{caseGuid}}/Payments","host":["{{baseURL}}"],"path":["v1","Cases","{{caseGuid}}","Payments"]}},"response":[]}]}]}],"auth":{"type":"oauth2","oauth2":[{"key":"tokenType","value":"bearer","type":"string"},{"key":"clientId","value":"","type":"string"},{"key":"accessTokenUrl","value":"https://apitest.capway.se/oauth/token","type":"string"},{"key":"tokenName","value":"capway-test","type":"string"},{"key":"addTokenTo","value":"header","type":"string"},{"key":"clientSecret","value":"","type":"string"},{"key":"grant_type","value":"client_credentials","type":"string"}]}}