{"info":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"19658159","collectionId":"d011a09c-b80a-464e-bf23-45834070001a","publishedId":"UVysywFD","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-04-04T12:23:55.000Z"},"item":[{"name":"Account","item":[{"name":"User Login","event":[{"listen":"test","script":{"id":"d2e02185-cc79-4da1-bfec-97ce445786ee","exec":["var res = pm.response.json();\r","pm.environment.set('token', res.token);\r","\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"0dabf5c4-d9d0-499a-a839-9a5e55f89435","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"Name\": \"{{UserName}}\",\r\n    \"Password\": \"{{UserPassword}}\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/Account","description":"<p>The user login endpoint allows users to authenticate themselves, providing access to functionalities and data based on their specific user permissions. Upon successful login, a session token is issued lasting 6 hours, which can be used to authenticate requests without needing to re-enter credentials.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["Account"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"0dabf5c4-d9d0-499a-a839-9a5e55f89435"},{"name":"Client Login Post","event":[{"listen":"test","script":{"id":"95c8a792-d0b9-4b2f-8825-dbf6d4515825","exec":["var res = pm.response.json();\r","pm.environment.set('token', res.token);\r","\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"0b6c37d8-6689-4ab7-93a0-e53310626860","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"ClientId\":\"{{ClientId}}\",\r\n    \"ClientSecret\":\"{{ClientSecret}}\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/Account/client","description":"<p>Using the client login, you will gain full administrative access to the API. Once generated, the token remains active for 6 hours, eliminating the need to log in for each API request during this period.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["Account","client"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[{"id":"a81f7e68-3ca9-4d37-a1b0-a987fa5a500e","name":"Client Login Post","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"ClientId\":\"{{ClientId}}\",\r\n    \"ClientSecret\":\"{{ClientSecret}}\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/Account/client"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": true,\n    \"token\": \"xyz\"\n}"}],"_postman_id":"0b6c37d8-6689-4ab7-93a0-e53310626860"},{"name":"Get status","event":[{"listen":"test","script":{"id":"252a0224-5d28-4a5d-b496-fe9c6f42dc67","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"a745a309-0d08-42db-b01c-335ebbea0ab2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/Account/status","description":"<p>Retrieves the status of the currently logged-in user.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["Account","status"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[{"id":"ba4c95fd-f282-4c58-9101-fbf1083c58aa","name":"Get status","originalRequest":{"method":"GET","header":[],"url":"{{host}}/Account/status"},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"text/plain; charset=utf-8"},{"key":"Content-Encoding","value":"gzip"},{"key":"Vary","value":"Accept-Encoding"},{"key":"Server","value":"Microsoft-IIS/10.0"},{"key":"X-Powered-By","value":"ASP.NET"},{"key":"Date","value":"Mon, 17 Feb 2025 10:57:03 GMT"}],"cookie":[],"responseTime":null,"body":"Logged in as IMS Case user 'hans'"}],"_postman_id":"a745a309-0d08-42db-b01c-335ebbea0ab2"}],"id":"422f64c6-ab2a-4018-953c-5b558cde32d1","_postman_id":"422f64c6-ab2a-4018-953c-5b558cde32d1","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}}},{"name":"CaseTemplates","item":[{"name":"customfield searches","item":[{"name":"Search cases on customproperty","event":[{"listen":"test","script":{"id":"deaa28b9-a9fc-45b4-8206-172e3e577970","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"3fe6c522-d633-4638-9344-e0a5ca01feb8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/elevsags?$filter=cf84_SagsId eq '1270'","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","elevsags"],"host":["{{host}}"],"query":[{"key":"$filter","value":"cf84_SagsId eq '1270'"}],"variable":[]}},"response":[],"_postman_id":"3fe6c522-d633-4638-9344-e0a5ca01feb8"},{"name":"Search cases on customproperty Date","event":[{"listen":"test","script":{"id":"deaa28b9-a9fc-45b4-8206-172e3e577970","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"eba82fdc-794e-4285-b009-a0eb91b093da","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/elevskabelons?$filter=cf23_Dato_på_ansættelse eq 2024-09-23","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","elevskabelons"],"host":["{{host}}"],"query":[{"key":"$filter","value":"cf23_Dato_på_ansættelse eq 2024-09-23"}],"variable":[]}},"response":[],"_postman_id":"eba82fdc-794e-4285-b009-a0eb91b093da"},{"name":"Search cases on customfieldListItem","event":[{"listen":"test","script":{"id":"a3bed408-bfe2-4974-b934-a5a2b328e8bc","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"84d2353b-d08d-4aa6-bb7b-7d2034e6d3f7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/elevsags?$filter=cf2_musik_ID eq '2'","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","elevsags"],"host":["{{host}}"],"query":[{"key":"$filter","value":"cf2_musik_ID eq '2'"}],"variable":[]}},"response":[],"_postman_id":"84d2353b-d08d-4aa6-bb7b-7d2034e6d3f7"},{"name":"Search contact on customfieldListItem","event":[{"listen":"test","script":{"id":"ac0e8078-1eab-4158-ad9c-1b53f12b0415","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"f33950f2-f32a-44ab-a4a9-a6876117cde7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/contacts?$filter=cf3_kontaktlevel_ID eq '3' &$top=2","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","contacts"],"host":["{{host}}"],"query":[{"key":"$filter","value":"cf3_kontaktlevel_ID eq '3' "},{"key":"$top","value":"2"}],"variable":[]}},"response":[],"_postman_id":"f33950f2-f32a-44ab-a4a9-a6876117cde7"}],"id":"52d4a29e-f042-47aa-b428-d0b918df7db1","_postman_id":"52d4a29e-f042-47aa-b428-d0b918df7db1","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}}},{"name":"Date Searches","item":[{"name":"Search cases on LastModified","event":[{"listen":"test","script":{"id":"9f33b1b4-ed3c-4560-b750-8b944cffe4db","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('value');\r","\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.value;\r","    pm.expect(props[0].Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props[0].EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props[0].CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});"],"type":"text/javascript","packages":{}}}],"id":"8178247e-10bf-4648-864b-ffc59e0b0246","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/elevsags?$filter=LastModified gt 2020-03-23 and LastModified lt 2021-01-23 and Status eq 'active'","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","elevsags"],"host":["{{host}}"],"query":[{"key":"$filter","value":"LastModified gt 2020-03-23 and LastModified lt 2021-01-23 and Status eq 'active'"}],"variable":[]}},"response":[],"_postman_id":"8178247e-10bf-4648-864b-ffc59e0b0246"},{"name":"Search cases on LastModified 2","event":[{"listen":"test","script":{"id":"9f33b1b4-ed3c-4560-b750-8b944cffe4db","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('value');\r","\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.value;\r","    pm.expect(props[0].Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props[0].EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props[0].CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});"],"type":"text/javascript","packages":{}}}],"id":"2f027bd0-2378-48d0-beb9-b6754873b65c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/elevsags?$filter=LastModified gt 2024-05-19 and LastModified le 2024-10-20 and Status eq 'active'","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","elevsags"],"host":["{{host}}"],"query":[{"key":"$filter","value":"LastModified gt 2024-05-19 and LastModified le 2024-10-20 and Status eq 'active'"}],"variable":[]}},"response":[],"_postman_id":"2f027bd0-2378-48d0-beb9-b6754873b65c"}],"id":"4a5449b0-700a-4150-93b1-df1f768b2dcb","_postman_id":"4a5449b0-700a-4150-93b1-df1f768b2dcb","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}}},{"name":"Get case based on template","event":[{"listen":"test","script":{"id":"65600c08-8379-4f89-bbb6-2f84690b0679","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response body has valid structure and data types\", function () {\r","    var jsonData = pm.response.json();\r","    \r","    // Check for existence and type correctness\r","    pm.expect(jsonData).to.have.property('@odata.context');\r","    pm.expect(jsonData).to.have.property('CaseId').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('Title').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('Created').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('Status').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('LastModified').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('CaseNumber').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('CreatedByUserName').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('TemplateName').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('ContactNodeRefIds').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('CaseOwnerUserName').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Add more checks as needed for other fields...\r","});\r","\r","// Check for non-null CaseId and Active status\r","pm.test(\"Validate values\", function() {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.CaseId).to.not.be.null;\r","    pm.expect(jsonData.Status).to.equal('Active');\r","    pm.expect(jsonData.Title).to.equal('bla');\r","    pm.expect(jsonData.CaseNumber).to.equal('20201102-9409');\r","\r","});\r","\r","// Date format validation for 'Created' and 'LastModified' using regex\r","pm.test(\"Datetypes have correct date format\", function () {\r","    // Example format: 2020-02-11T14:31:07+01:00\r","    var dateRegex = /^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{2,3})?(Z|[+-]\\d{2}:\\d{2}))$/;\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.Created).to.match(dateRegex);\r","    pm.expect(jsonData.LastModified).to.match(dateRegex);\r","});"],"type":"text/javascript","packages":{}}}],"id":"1cbebe6f-ac00-4587-9e3c-e5402b5b4664","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/elevsags(ebb8273d-9b21-4441-b85d-bdd7df1c6214)","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","elevsags(ebb8273d-9b21-4441-b85d-bdd7df1c6214)"],"host":["{{host}}"],"query":[{"disabled":true,"key":"filter","value":""}],"variable":[]}},"response":[],"_postman_id":"1cbebe6f-ac00-4587-9e3c-e5402b5b4664"},{"name":"Search cases on properties 1","event":[{"listen":"test","script":{"id":"05988cf9-eca4-4f6e-9368-bc6c48603d8d","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('value');\r","\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.value;\r","    pm.expect(props[0].Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props[0].EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props[0].CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});"],"type":"text/javascript","packages":{}}}],"id":"aba614d8-04fd-4f2d-9eeb-cc4544ef5569","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/elevskabelons?$filter=Status eq 'active' and LastModified lt 2021-11-02","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","elevskabelons"],"host":["{{host}}"],"query":[{"disabled":true,"key":"filter","value":""},{"key":"$filter","value":"Status eq 'active' and LastModified lt 2021-11-02"}],"variable":[]}},"response":[],"_postman_id":"aba614d8-04fd-4f2d-9eeb-cc4544ef5569"},{"name":"Search cases on properties 2","event":[{"listen":"test","script":{"id":"db66742b-cf0c-4d24-85d6-8adf2e93ae09","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('value');\r","\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.value;\r","    pm.expect(props[0].Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props[0].EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props[0].CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});"],"type":"text/javascript","packages":{}}}],"id":"c846be10-3180-4f0b-9ca4-e1614858d7d4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/cases?$top=3&$filter=Status eq 'active' and Created lt 2021-11-02 and CaseNumber eq '1253' ","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","cases"],"host":["{{host}}"],"query":[{"disabled":true,"key":"filter","value":""},{"key":"$top","value":"3"},{"key":"$filter","value":"Status eq 'active' and Created lt 2021-11-02 and CaseNumber eq '1253' "}],"variable":[]}},"response":[],"_postman_id":"c846be10-3180-4f0b-9ca4-e1614858d7d4"},{"name":"Search cases on property Title","event":[{"listen":"test","script":{"id":"4d455bc8-b9fb-4fd7-987c-f93970475464","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('value');\r","\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.value;\r","    pm.expect(props[0].Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props[0].EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props[0].CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});"],"type":"text/javascript","packages":{}}}],"id":"b7a84f71-3868-4fbf-be40-43afb0c4422c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/skabelon2s?$filter=Title eq 'tt'","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","skabelon2s"],"host":["{{host}}"],"query":[{"disabled":true,"key":"filter","value":""},{"key":"$filter","value":"Title eq 'tt'"}],"variable":[]}},"response":[],"_postman_id":"b7a84f71-3868-4fbf-be40-43afb0c4422c"},{"name":"Search cases on properties with paging","event":[{"listen":"test","script":{"id":"05988cf9-eca4-4f6e-9368-bc6c48603d8d","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('value');\r","\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.value;\r","    pm.expect(props[0].Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props[0].EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props[0].CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});"],"type":"text/javascript","packages":{}}}],"id":"4fa78871-d793-493d-b181-35873da2e9e5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/elevskabelons?$filter=Status eq 'active' and LastModified lt 2021-11-02 &$skip=3&$top=4","description":"<p>This endpoint retrieves a customizable subset of cases with a template based on filtering criteria, and supports pagination for navigation through the dataset.</p>\n<p><strong>Query Parameters</strong>:</p>\n<ul>\n<li><p><strong>$filter</strong>:</p>\n<ul>\n<li><p><strong>Purpose</strong>: Filters resources based on specified conditions.</p>\n</li>\n<li><p><strong>Usage</strong>: Apply conditions to refine which records are returned.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>$skip</strong>:</p>\n<ul>\n<li><p><strong>Purpose</strong>: Skips a specified number of records in the dataset.</p>\n</li>\n<li><p><strong>Example</strong>: <code>3</code></p>\n<ul>\n<li><strong>Usage</strong>: Begins the result set after the first 3 records that match the filter.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p><strong>$top</strong>:</p>\n<ul>\n<li><p><strong>Purpose</strong>: Limits the number of records returned.</p>\n</li>\n<li><p><strong>Example</strong>: <code>4</code></p>\n</li>\n</ul>\n</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","elevskabelons"],"host":["{{host}}"],"query":[{"key":"$filter","value":"Status eq 'active' and LastModified lt 2021-11-02 "},{"disabled":true,"key":"filter","value":""},{"key":"$skip","value":"3"},{"key":"$top","value":"4"}],"variable":[]}},"response":[],"_postman_id":"4fa78871-d793-493d-b181-35873da2e9e5"},{"name":"Create case","event":[{"listen":"test","script":{"id":"b4457183-7798-44e1-a667-c701c07ac314","exec":["pm.test(\"Status code is 201\", function () {\r","    pm.response.to.have.status(201);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response body has valid structure and data types\", function () {\r","    var jsonData = pm.response.json();\r","    \r","    // Check for existence and type correctness\r","    pm.expect(jsonData).to.have.property('@odata.context');\r","    pm.expect(jsonData).to.have.property('CaseId').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('Title').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('Created').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('Status').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('LastModified').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('CaseNumber').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('CreatedByUserName').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('TemplateName').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('ContactNodeRefIds').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('CaseOwnerUserName').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Add more checks as needed for other fields...\r","});\r","\r","let responseData = pm.response.json(); // This line gets the response body as a JSON object\r","let caseId = responseData.CaseId; // This line extracts the CaseId from the response\r","\r","// Now, set 'CaseId' as an environment variable\r","pm.environment.set(\"CaseId\", caseId);\r","\r","// Optionally, log the CaseId to ensure it's captured correctly\r","console.log(\"Captured CaseId:\", caseId);\r",""],"type":"text/javascript","packages":{}}}],"id":"fec183a9-c48b-44d9-81b8-1bf5e4b3a93b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"Title\": \"testsag721\",\r\n    \"cf84_SagsId\": \"25\",\r\n    \"cf18_Telefon_nummer_INT\": 995544,\r\n    \"cf23_Dato_på_ansættelse\" : \"2024-09-23\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/elevskabelons","description":"<p>Dates in customfields can only be dates in the following format: \"yyyy-MM-dd\" e.g \"2024-09-23\"</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","elevskabelons"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"fec183a9-c48b-44d9-81b8-1bf5e4b3a93b"},{"name":"Create case under key","event":[{"listen":"test","script":{"id":"d879984f-a85b-4561-9996-4b6bc7b4f900","exec":["pm.test(\"Status code is 201\", function () {\r","    pm.response.to.have.status(201);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response body has valid structure and data types\", function () {\r","    var jsonData = pm.response.json();\r","    \r","    // Check for existence and type correctness\r","    pm.expect(jsonData).to.have.property('@odata.context');\r","    pm.expect(jsonData).to.have.property('CaseId').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('Title').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('Created').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('Status').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('LastModified').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('CaseNumber').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('CreatedByUserName').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('TemplateName').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('ContactNodeRefIds').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('CaseOwnerUserName').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Add more checks as needed for other fields...\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"e911d52c-bb03-4e64-98e4-42f81b5bf1d7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"Title\": \"testsag721\",\r\n    \"cf84_SagsId\": \"25\",\r\n    \"ParentId\": \"54d3b662-6aad-4c46-ad6a-1f2081c06634\",\r\n    \"cf18_Telefon_nummer_INT\": 995544\r\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/elevskabelons","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","elevskabelons"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e911d52c-bb03-4e64-98e4-42f81b5bf1d7"},{"name":"Update case","event":[{"listen":"test","script":{"id":"d2bcdf71-6e37-4e84-a2b6-1db2e5e1689c","exec":["pm.test(\"Status code is 204\", function () {\r","    pm.response.to.have.status(204);\r","});"],"type":"text/javascript","packages":{}}}],"id":"387cc4d2-82af-40e8-8e09-c1b97610ba57","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"Title\": \"title of the subject\",\r\n    \"Description\": \"a description\",\r\n    \"StartDate\": \"2022-01-02\",\r\n    \"CaseOwnerUserName\": \"lsj\",\r\n    \"PrimaryContactNodeRefId\": \"898342f1-4d18-4938-89bd-7b9ce2971bee\",\r\n    \"EndDate\": null,\r\n    \"cf2_music_ID\": \"2\",\r\n    \"cf4_textField\": \"tekst i customfield \",\r\n    \"cf5_employmentDate\": \"2015-10-15\",\r\n    \"cf3_substituteTeacher\": \"lsj\",\r\n    \"cf18_Phone_Number_INT\": 415478,\r\n    \"cf20_decimalNumber\": 1.54,\r\n    \"cf8_Complain_bool\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/elevskabelons(1f7e301a-5e17-4d4e-a9d7-918a35787f4b)","description":"<p>Use this endpoint to update standard properties for a case through its template:</p>\n<p>\"CaseOwnerUserName\" is first available to use from version 20230224.1</p>\n<p>Providing null into the value will remove the value in Visma Case.</p>\n<p>In the example, the EndDate is reset to null.</p>\n<p>It is not possible to update the case status using either of the case update endpoints.</p>\n<p>It is not possible to update custom fields of the group type through the standard IMS Case API.</p>\n<p>Date types like StartDate should be in the following format yyyy-MM-dd</p>\n<p>\"PrimaryContactNodeRefId\" will contain the ID of the contact you want to set as primary part on the case</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","elevskabelons(1f7e301a-5e17-4d4e-a9d7-918a35787f4b)"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"387cc4d2-82af-40e8-8e09-c1b97610ba57"}],"id":"856dd51f-5521-43a2-bade-59f06fe0314d","_postman_id":"856dd51f-5521-43a2-bade-59f06fe0314d","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}}},{"name":"Cases","item":[{"name":"Get cases by filter","item":[{"name":"Search case on Title","event":[{"listen":"test","script":{"id":"1dd0ee8c-94e7-460a-bbcb-5648207ea072","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('value');\r","\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.value;\r","    pm.expect(props[0].Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props[0].EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props[0].CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});"],"type":"text/javascript","packages":{}}}],"id":"f7b710d0-14b6-49d3-8c35-e6ab7d3a21fd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/Cases?$filter=Title eq 'imstestsag'","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Cases"],"host":["{{host}}"],"query":[{"key":"$filter","value":"Title eq 'imstestsag'"}],"variable":[]}},"response":[],"_postman_id":"f7b710d0-14b6-49d3-8c35-e6ab7d3a21fd"},{"name":"Seach case on Title and status closed","event":[{"listen":"test","script":{"id":"315b11fc-e0e0-47fb-942d-7b66efb4e8fb","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('value');\r","\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.value;\r","    pm.expect(props[0].Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props[0].EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props[0].CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});"],"type":"text/javascript","packages":{}}}],"id":"c54a0a8c-0474-4171-920a-57d37fb81be3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/Cases?$filter=Title eq 'imstestsag' and Status eq 'closed'","description":"<p>First available from version 20230710.1</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Cases"],"host":["{{host}}"],"query":[{"key":"$filter","value":"Title eq 'imstestsag' and Status eq 'closed'"}],"variable":[]}},"response":[],"_postman_id":"c54a0a8c-0474-4171-920a-57d37fb81be3"},{"name":"Search case on Title and status active","event":[{"listen":"test","script":{"id":"30353c29-0804-49da-acc5-6c4e5918f879","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('value');\r","\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.value;\r","    pm.expect(props[0].Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props[0].EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props[0].CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});"],"type":"text/javascript","packages":{}}}],"id":"f249e871-ab91-4175-8271-e35258e4e9a6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/Cases?$filter=Title eq 'imstestsag' and Status eq 'active'","description":"<p>First available from version 20230710.1</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Cases"],"host":["{{host}}"],"query":[{"key":"$filter","value":"Title eq 'imstestsag' and Status eq 'active'"}],"variable":[]}},"response":[],"_postman_id":"f249e871-ab91-4175-8271-e35258e4e9a6"},{"name":"Search case on Title and status passive","event":[{"listen":"test","script":{"id":"398a8e6a-71b2-4878-8ac6-b9ddd1e46cf0","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('value');\r","\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.value;\r","    pm.expect(props[0].Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props[0].EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props[0].CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});"],"type":"text/javascript","packages":{}}}],"id":"5753c1e8-5b49-4f99-860d-b6b8d0aa95bc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/Cases?$filter=Title eq 'imstestsag' and Status eq 'passive'","description":"<p>First available from version 20230710.1</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Cases"],"host":["{{host}}"],"query":[{"key":"$filter","value":"Title eq 'imstestsag' and Status eq 'passive'"}],"variable":[]}},"response":[],"_postman_id":"5753c1e8-5b49-4f99-860d-b6b8d0aa95bc"},{"name":"Seach case on Title and status closed with paging","event":[{"listen":"test","script":{"id":"315b11fc-e0e0-47fb-942d-7b66efb4e8fb","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('value');\r","\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.value;\r","    pm.expect(props[0].Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props[0].EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props[0].CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});"],"type":"text/javascript","packages":{}}}],"id":"a167ff03-b0d3-4c46-8966-2b8011262092","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/Cases?$filter=Title eq 'imstestsag' and Status eq 'closed' &$skip=1&$top=2","description":"<p>First available from version 20230710.1</p>\n<p>This endpoint retrieves a customizable subset of cases based on filtering criteria, and supports pagination for navigation through the dataset.</p>\n<p><strong>Query Parameters</strong>:</p>\n<ul>\n<li><p><strong>$filter</strong>:</p>\n<ul>\n<li><p><strong>Purpose</strong>: Filters resources based on specified conditions.</p>\n</li>\n<li><p><strong>Usage</strong>: Apply conditions to refine which records are returned.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>$skip</strong>:</p>\n<ul>\n<li><p><strong>Purpose</strong>: Skips a specified number of records in the dataset.</p>\n</li>\n<li><p><strong>Example</strong>: <code>3</code></p>\n<ul>\n<li><strong>Usage</strong>: Begins the result set after the first 3 records that match the filter.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p><strong>$top</strong>:</p>\n<ul>\n<li><p><strong>Purpose</strong>: Limits the number of records returned.</p>\n</li>\n<li><p><strong>Example</strong>: <code>4</code></p>\n</li>\n</ul>\n</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Cases"],"host":["{{host}}"],"query":[{"key":"$filter","value":"Title eq 'imstestsag' and Status eq 'closed' "},{"key":"$skip","value":"1"},{"key":"$top","value":"2"}],"variable":[]}},"response":[],"_postman_id":"a167ff03-b0d3-4c46-8966-2b8011262092"}],"id":"a459f2dc-8ba7-4ea5-b749-19e7fc5f2ed7","description":"<p>First available from version 20230710.1</p>\n","_postman_id":"a459f2dc-8ba7-4ea5-b749-19e7fc5f2ed7","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}}},{"name":"Date Searches","item":[{"name":"Search case LastModified","event":[{"listen":"test","script":{"id":"e7bf4fbf-474f-40f7-af50-0dab50bb4679","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('value');\r","\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.value;\r","    pm.expect(props[0].Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props[0].EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props[0].CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});"],"type":"text/javascript","packages":{}}}],"id":"0e7abf19-a433-46cb-9b4e-0b27c751b355","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/Cases?$filter=LastModified eq 2024-09-23","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Cases"],"host":["{{host}}"],"query":[{"key":"$filter","value":"LastModified eq 2024-09-23"}],"variable":[]}},"response":[],"_postman_id":"0e7abf19-a433-46cb-9b4e-0b27c751b355"},{"name":"Search case LastModified 2","event":[{"listen":"test","script":{"id":"e7bf4fbf-474f-40f7-af50-0dab50bb4679","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('value');\r","\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.value;\r","    pm.expect(props[0].Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props[0].EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props[0].CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});"],"type":"text/javascript","packages":{}}}],"id":"9c3bcd11-79db-4161-a4ad-492754bf7fbe","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/Cases?$filter=LastModified lt 2024-09-23&$top=4","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Cases"],"host":["{{host}}"],"query":[{"key":"$filter","value":"LastModified lt 2024-09-23"},{"key":"$top","value":"4"}],"variable":[]}},"response":[],"_postman_id":"9c3bcd11-79db-4161-a4ad-492754bf7fbe"}],"id":"679b42a3-273a-4481-8fe7-bd391e4b7186","_postman_id":"679b42a3-273a-4481-8fe7-bd391e4b7186","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}}},{"name":"Search case on CaseNumber","event":[{"listen":"test","script":{"id":"e7bf4fbf-474f-40f7-af50-0dab50bb4679","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('value');\r","\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.value;\r","    pm.expect(props[0].Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props[0].EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props[0].CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props[0].LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});"],"type":"text/javascript","packages":{}}}],"id":"974e7d4a-1daa-459a-a688-a211cd34f182","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/Cases?$filter=CaseNumber eq '1734'","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Cases"],"host":["{{host}}"],"query":[{"key":"$filter","value":"CaseNumber eq '1734'"}],"variable":[]}},"response":[],"_postman_id":"974e7d4a-1daa-459a-a688-a211cd34f182"},{"name":"Get case by id","event":[{"listen":"test","script":{"id":"20320bce-ddb4-47b6-8aba-fc2d00b86afb","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // is not a mistake. At the current release 20230710.1 we do not have odata property in the case standard as a property. Maybe we should change later\r","    pm.expect(jsonData).to.not.have.property('@odata.context');\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('caseId').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('documentIds');\r","    pm.expect(jsonData).to.have.property('documents');\r","    // Correctly check for documentIds and documents to be either null or array\r","    if (jsonData.documentIds !== null) {\r","        pm.expect(jsonData.documentIds).to.be.an('array');\r","    } else {\r","        pm.expect(jsonData.documentIds).to.be.null;\r","    }\r","    if (jsonData.documents !== null) {\r","        pm.expect(jsonData.documents).to.be.an('array');\r","    } else {\r","        pm.expect(jsonData.documents).to.be.null;\r","    }\r","\r","    pm.expect(jsonData).to.have.property('properties').that.is.an('object');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.properties;\r","    pm.expect(props.Status).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props.Title).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props.CreatedByUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props.CaseNumber).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props.Created).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props.Description).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props.StartDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    // Correctly check for properties to be either null or a specific type, only if the value is null!\r","    pm.expect(props.EndDate).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props.ParentId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","    pm.expect(props.CaseOwnerUserName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props.TemplateName).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props.PrimaryContactNodeRefId).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props.ContactNodeRefIds).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(props.LastModified).to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","});\r","\r","// Check for non-null CaseId and Active status\r","pm.test(\"Validate values\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.caseId).to.not.be.null;\r","    pm.expect(jsonData.properties.Status).to.equal('Active');\r","    pm.expect(jsonData.properties.Title).to.equal('title of the subject');\r","    pm.expect(jsonData.properties.CaseNumber).to.equal('1734');\r","    pm.expect(jsonData.properties.ContactNodeRefIds).to.equal('898342f1-4d18-4938-89bd-7b9ce2971bee');\r","\r","});\r","\r",""],"type":"text/javascript","packages":{}}}],"id":"97ae9533-6a3d-40fe-9edd-962967337ad9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/Cases(1f7e301a-5e17-4d4e-a9d7-918a35787f4b)","description":"<p>The \"caseId\" (1f7e301a-5e17-4d4e-a9d7-918a35787f4b) presented here is an example of its typical format. It serves as the unique identifier for the specific case in which you want to get the case. Each case is assigned a unique ID, so if you wish to get another case, you will need to use the corresponding different caseId.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Cases(1f7e301a-5e17-4d4e-a9d7-918a35787f4b)"],"host":["{{host}}"],"query":[{"disabled":true,"key":"filter","value":""}],"variable":[]}},"response":[],"_postman_id":"97ae9533-6a3d-40fe-9edd-962967337ad9"},{"name":"update case","event":[{"listen":"test","script":{"id":"889a4c62-9863-44ff-a73b-fd2315191392","exec":["pm.test(\"Status code is 204\", function () {\r","    pm.response.to.have.status(204);\r","});"],"type":"text/javascript","packages":{}}}],"id":"23365768-3778-4b96-a291-aa0df8e61c4c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"Title\": \"emne\",\r\n    \"Description\": null,\r\n    \"StartDate\": \"2022-01-02T13:02:18Z\",\r\n    \"EndDate\": null,\r\n    \"CaseOwnerUserName\": \"abc\",\r\n    \"PrimaryContactNodeRefId\":\"898342f1-4d18-4938-89bd-7b9ce2971bee\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/cases(1f7e301a-5e17-4d4e-a9d7-918a35787f4b)","description":"<p>Use this endpoint to update standard properties for a case:</p>\n<p>\"CaseOwnerUserName\" is first available to use from version 20230224.1</p>\n<p>Providing null into the value will remove the value in Visma Case.</p>\n<p>\"PrimaryContactNodeRefId\" is available to use from version 20230606.1</p>\n<p>\"PrimaryContactNodeRefId\" will contain the ID of the contact you want to set as primary part on the case</p>\n<p>In the example, the EndDate is reset to null.</p>\n<p>It is not possible to update the case status using either of the case update endpoints.</p>\n<p>It is not possible to update custom fields of the group type through the standard IMS Case API.</p>\n<p>Date types like EndDate should be in the following format yyyy-MM-dd</p>\n<p>The \"caseId\" (1f7e301a-5e17-4d4e-a9d7-918a35787f4b) presented here is an example of its typical format. It serves as the unique identifier for the specific case in which you want to updat the case. Each case is assigned a unique ID, so if you wish to update another case, you will need to use the corresponding different caseId.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","cases(1f7e301a-5e17-4d4e-a9d7-918a35787f4b)"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"23365768-3778-4b96-a291-aa0df8e61c4c"}],"id":"9e118435-adaf-439d-9d35-ac89fe37f97c","_postman_id":"9e118435-adaf-439d-9d35-ac89fe37f97c","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}}},{"name":"Documents","item":[{"name":"Get document by documentId","event":[{"listen":"test","script":{"id":"e44a836b-b06a-4326-ab64-b7405e302632","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // is not a mistake. At the current release 20230710.1 we do not have odata property in the case standard as a property. Maybe we should change later\r","    pm.expect(jsonData).to.not.have.property('@odata.context');\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('documentId').that.is.a('string').and.to.not.be.null;;\r","    pm.expect(jsonData).to.have.property('properties').that.is.an('object').and.to.not.be.null;;\r","    pm.expect(jsonData).to.have.property('files').that.is.an('array').and.to.not.be.null;;\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.properties;\r","    pm.expect(props.Title).to.be.a('string').and.to.not.be.null;\r","    pm.expect(props.Created).that.is.an('string').and.to.not.be.null;;\r","    pm.expect(props.Description).that.is.an('string').and.to.not.be.null;;\r","    pm.expect(props.CreatedByUser).that.is.an('string').and.to.not.be.null;;\r","    pm.expect(props.FolderPath).that.is.an('string').and.to.not.be.null;;\r","});\r","\r","\r",""],"type":"text/javascript","packages":{}}}],"id":"5b8609dd-9da5-4c35-aac9-23a408e753ce","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/cases/2053f746-5e73-4858-87e7-c2c55015c5f9/documents/83bbc455-2396-43a5-9801-adb8842f5c28","description":"<p>The 'IncludeRawFileData' query parameter was introduced in version 20240813.7. If this query parameter is omitted, the default setting will include the raw file data to maintain backward compatibility.</p>\n<p>If the parameter is false \"null\" will be returned in the base64value</p>\n<p>The \"caseId\" (2053f746-5e73-4858-87e7-c2c55015c5f9) presented here is an example of its typical format. It serves as the unique identifier for the specific case in which you want to store the document. Each case is assigned a unique ID, so if you wish to get a document in another case, you will need to use the corresponding different caseId.</p>\n<p>With this endpoint, you can retrieve a document on a case. The document type of the document is returned in the DocumentType property inside properties, which is new in this version.</p>\n<p>DocumentType is the bare node id of the type, and it is the same value the Create document endpoint takes. It is null for a document that has no type.</p>\n<p><strong>Path parameters</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>caseId</td>\n<td>The node id of the case the document is on. e.g. 83bbc455-2396-43a5-9801-adb8842f5c28</td>\n</tr>\n<tr>\n<td>documentId</td>\n<td>The node id of the document. e.g. f84530ee-9e0e-4c6f-8a3e-2b7c4d1a9f11</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Response</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"documentId\": \"83bbc455-2396-43a5-9801-adb8842f5c28\",\n  \"properties\": {\n    \"Title\": \"test.txt\",\n    \"Created\": \"2026-09-08T09:12:44+02:00\",\n    \"Description\": \"tester\",\n    \"CreatedByUser\": \"Administrator\",\n    \"FolderPath\": \"documents\",\n    \"DocumentType\": \"74148a6c-1cce-42e9-9d1e-765218f2d6b6\"\n  },\n  \"files\": [\n    { \"fileId\": \"workspace://SpacesStore/f84530ee-9e0e-4c6f-8a3e-2b7c4d1a9f11\", \"properties\": {} }\n  ]\n}\n\n</code></pre>\n<p>Note that documentId is returned bare while fileId is returned with the workspace://SpacesStore/ prefix. DocumentType follows documentId and is bare.</p>\n<p><strong>Response properties</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>documentId</td>\n<td>string (UUID)</td>\n</tr>\n<tr>\n<td>properties.Title</td>\n<td>string</td>\n</tr>\n<tr>\n<td>properties.Created</td>\n<td>string (ISO date)</td>\n</tr>\n<tr>\n<td>properties.Description</td>\n<td>string</td>\n</tr>\n<tr>\n<td>properties.CreatedByUser</td>\n<td>string</td>\n</tr>\n<tr>\n<td>properties.FolderPath</td>\n<td>string</td>\n</tr>\n<tr>\n<td>properties.DocumentType</td>\n<td>string (UUID)</td>\n</tr>\n<tr>\n<td>files[].fileId</td>\n<td>string. The node ref of the file, with prefix</td>\n</tr>\n</tbody>\n</table>\n</div><p>DocumentType first available from version 20260908.1</p>\n<p><strong>Error handling</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>401 Unauthorized</td>\n<td>No token could be obtained for the session or it was invalid</td>\n</tr>\n<tr>\n<td>404 Not Found</td>\n<td>The EDRMS does not know a document with that id on that case</td>\n</tr>\n<tr>\n<td>502 Bad Gateway</td>\n<td>A backend failure</td>\n</tr>\n</tbody>\n</table>\n</div>","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","cases","2053f746-5e73-4858-87e7-c2c55015c5f9","documents","83bbc455-2396-43a5-9801-adb8842f5c28"],"host":["{{host}}"],"query":[{"disabled":true,"key":"filter","value":""}],"variable":[]}},"response":[{"id":"2f26da25-04db-4b31-bb03-74963ed15252","name":"get documents by documentId includeRawFileData=false","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"{{host}}/v1/cases/2053f746-5e73-4858-87e7-c2c55015c5f9/documents?includeRawFileData=false","host":["{{host}}"],"path":["v1","cases","2053f746-5e73-4858-87e7-c2c55015c5f9","documents"],"query":[{"key":"filter","value":"","disabled":true},{"key":"includeRawFileData","value":"false"}]}},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"documentId\": \"83bbc455-2396-43a5-9801-adb8842f5c28\",\n    \"properties\": {\n        \"Title\": \"test.txt\",\n        \"Created\": \"11/14/2023 13:20:06 +01:00\",\n        \"Description\": \"tester\",\n        \"CreatedByUser\": \"Administrator \",\n        \"FolderPath\": \"documents\"\n    },\n    \"files\": [\n        {\n            \"fileId\": \"workspace://SpacesStore/f84530ee-5cf2-4033-acb7-4361d31d3dc8\",\n            \"properties\": {\n                \"FileName\": \"test.txt\",\n                \"Base64Value\": null,\n                \"IsAppendix\": \"False\"\n            }\n        }\n    ]\n}"},{"id":"22249d72-7374-46ab-9ab4-4bb455184b85","name":"get documents by documentId includeRawFileData=true","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"{{host}}/v1/cases/2053f746-5e73-4858-87e7-c2c55015c5f9/documents?includeRawFileData=true","host":["{{host}}"],"path":["v1","cases","2053f746-5e73-4858-87e7-c2c55015c5f9","documents"],"query":[{"key":"filter","value":"","disabled":true},{"key":"includeRawFileData","value":"true"}]}},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"documentId\": \"83bbc455-2396-43a5-9801-adb8842f5c28\",\n    \"properties\": {\n        \"Title\": \"test.txt\",\n        \"Created\": \"11/14/2023 13:20:06 +01:00\",\n        \"Description\": \"tester\",\n        \"CreatedByUser\": \"Administrator \",\n        \"FolderPath\": \"documents\"\n    },\n    \"files\": [\n        {\n            \"fileId\": \"workspace://SpacesStore/f84530ee-5cf2-4033-acb7-4361d31d3dc8\",\n            \"properties\": {\n                \"FileName\": \"test.txt\",\n                \"Base64Value\": \"dGVzdA==\",\n                \"IsAppendix\": \"False\"\n            }\n        }\n    ]\n}"}],"_postman_id":"5b8609dd-9da5-4c35-aac9-23a408e753ce"},{"name":"Create Document","event":[{"listen":"test","script":{"id":"f159ab6b-5c2c-43e7-bb71-b3a7d3b79017","exec":["pm.test(\"Status code is 201\", function () {\r","    pm.response.to.have.status(201);\r","});\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    pm.expect(jsonData).to.have.property('@odata.context');\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('Title').that.is.a('string').and.to.not.be.null;\r","    pm.expect(jsonData).to.have.property('Created').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('Description').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('CreatedByUser').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","    pm.expect(jsonData).to.have.property('FolderPath').to.satisfy(function (val) { return val === null || typeof val === 'string'; });\r","\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"7ba1a5c2-2e64-4681-a3b7-2acf908087d6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"Title\": \"doc1\",\r\n    \"DocumentType\": \"74148a6c-1cce-42e9-9d1e-765218f2d6b6\",\r\n    \"files\": [\r\n        {\r\n            \"FileName\": \"hej.pdf\",\r\n            \"Base64Value\": \"dGVzdA==\",\r\n            \"IsAppendix\": false\r\n        },\r\n        {\r\n            \"FileName\": \"bilag.pdf\",\r\n            \"Base64Value\": \"dGVzdA==\",\r\n            \"IsAppendix\": true\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/Documents?caseId=109a8a4d-53e2-4a65-8d72-a39e03f74f2f","description":"<p>The \"caseId\" (109a8a4d-53e2-4a65-8d72-a39e03f74f2f) presented here is an example of its typical format. It serves as the unique identifier for the specific case in which you want to store the document. Each case is assigned a unique ID, so if you wish to store a document in another case, you will need to use the corresponding different caseId.</p>\n<p>The <code>IsAppendix</code> attribute determines whether a file is designated as the main document or as an attachment.</p>\n<ul>\n<li><p>If <code>IsAppendix = True</code>, the file is considered an attachment.</p>\n</li>\n<li><p>If <code>IsAppendix = False</code>, the file is regarded as the main document.</p>\n</li>\n</ul>\n<p>Please note that when creating a document, only one file can be designated as the main document.</p>\n<p>With this endpoint, you can create a document on a case.</p>\n<p>A document has one main document and zero or more attachments. The file with IsAppendix false is the main document, and every file with IsAppendix true is an attachment.</p>\n<p><strong>Creating a document with a document type</strong><br />Possible from version 20260910.1 A document can now be created with a document type of your choosing. Send DocumentType in the body, next to Title. Until this version every document was created with one fixed type and the type could not be chosen at all. Type \"Other\"/\"Andet\" was used that is the default.</p>\n<p>DocumentType is the node id of one of the document types the EDRMS has enabled.</p>\n<p>The field is optional and nothing about existing requests changes. A request that leaves DocumentType out creates its document exactly as before, with the default type.</p>\n<p>A document type the EDRMS does not have enabled is answered 400 with DocumentTypeNotFound, and no document is created. That covers all three cases: an id that does not exist, a type that exists but is disabled, and a value that is not a node id at all.</p>\n<p>The document type of a document that already exists can be changed with the Update document endpoint.</p>\n<p><strong>Path parameters</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>caseId</td>\n<td>The node id of the case the document is created on. e.g. 83bbc455-2396-43a5-9801-adb8842f5c28</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Body</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"Title\": \"doc1\",\n  \"DocumentType\": \"74148a6c-1cce-42e9-9d1e-765218f2d6b6\",\n  \"files\": [\n    { \"FileName\": \"hej.pdf\", \"Base64Value\": \"dGVzdA==\", \"IsAppendix\": false },\n    { \"FileName\": \"bilag.pdf\", \"Base64Value\": \"dGVzdA==\", \"IsAppendix\": true }\n  ]\n}\n\n</code></pre>\n<p><strong>Body properties</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Title</td>\n<td>string. The title of the document</td>\n</tr>\n<tr>\n<td>DocumentType</td>\n<td>string (UUID). Optional.</td>\n</tr>\n<tr>\n<td>files</td>\n<td>array. The files of the document</td>\n</tr>\n<tr>\n<td>files[].FileName</td>\n<td>string. The file name with its extension</td>\n</tr>\n<tr>\n<td>files[].Base64Value</td>\n<td>string. The content of the file, base64 encoded</td>\n</tr>\n<tr>\n<td>files[].IsAppendix</td>\n<td>boolean. false for the main document, true for an attachment</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Error handling</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>400 Bad Request</td>\n<td>DocumentTypeNotFound. The document type is not one the EDRMS has enabled: the id is unknown, the type is disabled, or the value is not a node id. No document is created</td>\n</tr>\n<tr>\n<td>400 Bad Request</td>\n<td>CreateDocumentFailed. The document could not be created for any other reason</td>\n</tr>\n<tr>\n<td>401 Unauthorized</td>\n<td>No token could be obtained for the session or it was invalid</td>\n</tr>\n<tr>\n<td>502 Bad Gateway</td>\n<td>A backend failure</td>\n</tr>\n</tbody>\n</table>\n</div><p>DocumentType first available from version 20260910.1</p>\n<p><strong>Response</strong><br />Returns the created document. DocumentType is answered as the bare id, whichever of the two forms was sent.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Documents"],"host":["{{host}}"],"query":[{"key":"caseId","value":"109a8a4d-53e2-4a65-8d72-a39e03f74f2f"}],"variable":[]}},"response":[],"_postman_id":"7ba1a5c2-2e64-4681-a3b7-2acf908087d6"},{"name":"Update Document","event":[{"listen":"test","script":{"type":"text/javascript","exec":["pm.test(\"Status code is 204\", function () {\r","    pm.response.to.have.status(204);\r","});\r",""]}}],"id":"c25c8052-377b-4aac-9b7e-4a112a4b6db6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"Title\": \"new title\",\r\n    \"DocumentType\": \"0881fc82-209a-4ea4-b627-331d4ed12996\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/documents(a813b6b2-3b64-44e4-9e6a-9c9db41f7dc9)","description":"<p>With this endpoint, you can change properties of a document that already exists. The body is a flat dictionary of keys and values, and only the keys you send are changed: a key you leave out keeps the value the document has stored.</p>\n<p>The properties you can change are Title, Description and DocumentType.</p>\n<p>DocumentType is the node id of one of the document types the EDRMS has enabled, read from the Get document types endpoint. A type the EDRMS does not have enabled is answered 400 with DocumentTypeNotFound.</p>\n<p>A document that is CLOSED is answered 400 with UpdateDocumentFailed when the body carries a DocumentType. The title and the description of a closed document can be changed, because the document is opened and closed again around the change, but the type cannot: a closed document keeps the type it was closed with. Nothing in a refused request is written at all, the Title and the Description in it included, so a refused request leaves the document exactly as it was rather than half changed.</p>\n<p>A body that names no key this endpoint knows, the empty body {} among them, changes nothing and is answered 204. That is a success and not an error.</p>\n<p><strong>Path parameters</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>documentId</td>\n<td>The node id of the document. e.g. f84530ee-9e0e-4c6f-8a3e-2b7c4d1a9f11</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Query parameters</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>caseId</td>\n<td>The node id of the case the document is on. e.g. 83bbc455-2396-43a5-9801-adb8842f5c28</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Body</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"Title\": \"new title\",\n  \"Description\": \"new description\",\n  \"DocumentType\": \"74148a6c-1cce-42e9-9d1e-765218f2d6b6\"\n}\n\n</code></pre>\n<p><strong>Body properties</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Title</td>\n<td>string. Optional. The new title of the document</td>\n</tr>\n<tr>\n<td>Description</td>\n<td>string. Optional. The new description of the document</td>\n</tr>\n<tr>\n<td>DocumentType</td>\n<td>string (UUID). Optional. The node id of an enabled document type. Both the bare id and the full node ref are accepted. Not accepted on a closed document</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Error handling</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>204 No Content</td>\n<td>The change went through. There is no body, so read the document back with Get document when you need the result</td>\n</tr>\n<tr>\n<td>400 Bad Request</td>\n<td>UpdateDocumentFailed. A DocumentType was sent for a closed document; the body was not a flat dictionary, a files array among it; or the change did not go through</td>\n</tr>\n<tr>\n<td>400 Bad Request</td>\n<td>DocumentTypeNotFound. A DocumentType was sent that the EDRMS does not have enabled</td>\n</tr>\n<tr>\n<td>401 Unauthorized</td>\n<td>No token could be obtained for the session or it was invalid</td>\n</tr>\n<tr>\n<td>404 Not Found</td>\n<td>The EDRMS does not know a document with that id</td>\n</tr>\n<tr>\n<td>415 Unsupported Media Type</td>\n<td>The request had no body at all</td>\n</tr>\n<tr>\n<td>502 Bad Gateway</td>\n<td>A backend failure</td>\n</tr>\n</tbody>\n</table>\n</div><p>First available from version 20260910.1</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","documents(a813b6b2-3b64-44e4-9e6a-9c9db41f7dc9)"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c25c8052-377b-4aac-9b7e-4a112a4b6db6"},{"name":"Get documents by caseId","event":[{"listen":"test","script":{"id":"57d560df-8340-489b-9139-901a6f298747","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","      var jsonData = pm.response.json();\r","\r","    // Making sure '@odata.context' property does not exist directly in the response\r","    pm.expect(jsonData).to.not.have.property('@odata.context');\r","\r","    // Check if the first document has the 'documentId' and 'files' properties\r","    pm.expect(jsonData[0]).to.have.property('documentId').that.is.a('string');\r","    pm.expect(jsonData[0]).to.have.property('files').that.is.an('array');\r","\r","    // Check properties within 'properties' of the first document\r","    var props = jsonData[0].properties;\r","    pm.expect(props).to.have.property('Title').that.is.a('string');\r","    pm.expect(props).to.have.property('Created').that.is.a('string');\r","    pm.expect(props).to.have.property('Description').that.is.a('string');\r","    pm.expect(props).to.have.property('CreatedByUser').that.is.a('string');\r","    pm.expect(props).to.have.property('FolderPath').that.is.a('string');\r","\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"dd5b14fc-63d4-48e1-acf5-1d2c1af89d77","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/cases/2053f746-5e73-4858-87e7-c2c55015c5f9/documents","description":"<p>The 'IncludeRawFileData' query parameter was introduced in version 20240813.7. If this query parameter is omitted, the default setting will include the raw file data to maintain backward compatibility.</p>\n<p>If the parameter is false \"null\" will be returned in the base64value</p>\n<p>The \"caseId\" (2053f746-5e73-4858-87e7-c2c55015c5f9) presented here is an example of its typical format. It serves as the unique identifier for the specific case in which you want to store the document. Each case is assigned a unique ID, so if you wish to get documents in another case, you will need to use the corresponding different caseId.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","cases","2053f746-5e73-4858-87e7-c2c55015c5f9","documents"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[{"id":"a3164125-7813-4f6c-a966-06ae76625410","name":"get documents by caseId includeRawFileData=false Copy","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"{{host}}/v1/cases/2053f746-5e73-4858-87e7-c2c55015c5f9/documents?includeRawFileData=false","host":["{{host}}"],"path":["v1","cases","2053f746-5e73-4858-87e7-c2c55015c5f9","documents"],"query":[{"key":"filter","value":"","disabled":true},{"key":"includeRawFileData","value":"false"}]}},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"documentId\": \"ea2fb47c-5c92-4bf5-b47c-34a912408030\",\n        \"properties\": {\n            \"Title\": \"test2.txt\",\n            \"Created\": \"11/14/2023 14:25:59 +01:00\",\n            \"Description\": \"test2 beskrivelse\",\n            \"CreatedByUser\": \"Administrator \",\n            \"FolderPath\": \"documents\"\n        },\n        \"files\": [\n            {\n                \"fileId\": \"workspace://SpacesStore/1197f961-2dc9-45cd-8c35-f4a95fddf9e7\",\n                \"properties\": {\n                    \"FileName\": \"test2.txt\",\n                    \"Base64Value\": null,\n                    \"IsAppendix\": \"False\"\n                }\n            }\n        ]\n    },\n    {\n        \"documentId\": \"83bbc455-2396-43a5-9801-adb8842f5c28\",\n        \"properties\": {\n            \"Title\": \"test.txt\",\n            \"Created\": \"11/14/2023 13:20:06 +01:00\",\n            \"Description\": \"tester\",\n            \"CreatedByUser\": \"Administrator \",\n            \"FolderPath\": \"documents\"\n        },\n        \"files\": [\n            {\n                \"fileId\": \"workspace://SpacesStore/f84530ee-5cf2-4033-acb7-4361d31d3dc8\",\n                \"properties\": {\n                    \"FileName\": \"test.txt\",\n                    \"Base64Value\": null,\n                    \"IsAppendix\": \"False\"\n                }\n            }\n        ]\n    }\n]"},{"id":"8cc7a4c9-f87b-4dfb-8f10-29370eefd40d","name":"get documents by caseId includeRawFileData=true","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"{{host}}/v1/cases/2053f746-5e73-4858-87e7-c2c55015c5f9/documents?includeRawFileData=true","host":["{{host}}"],"path":["v1","cases","2053f746-5e73-4858-87e7-c2c55015c5f9","documents"],"query":[{"key":"filter","value":"","disabled":true},{"key":"includeRawFileData","value":"true"}]}},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"documentId\": \"ea2fb47c-5c92-4bf5-b47c-34a912408030\",\n        \"properties\": {\n            \"Title\": \"test2.txt\",\n            \"Created\": \"11/14/2023 14:25:59 +01:00\",\n            \"Description\": \"test2 beskrivelse\",\n            \"CreatedByUser\": \"Administrator \",\n            \"FolderPath\": \"documents\"\n        },\n        \"files\": [\n            {\n                \"fileId\": \"workspace://SpacesStore/1197f961-2dc9-45cd-8c35-f4a95fddf9e7\",\n                \"properties\": {\n                    \"FileName\": \"test2.txt\",\n                    \"Base64Value\": \"dGVzdA==\",\n                    \"IsAppendix\": \"False\"\n                }\n            }\n        ]\n    },\n    {\n        \"documentId\": \"83bbc455-2396-43a5-9801-adb8842f5c28\",\n        \"properties\": {\n            \"Title\": \"test.txt\",\n            \"Created\": \"11/14/2023 13:20:06 +01:00\",\n            \"Description\": \"tester\",\n            \"CreatedByUser\": \"Administrator \",\n            \"FolderPath\": \"documents\"\n        },\n        \"files\": [\n            {\n                \"fileId\": \"workspace://SpacesStore/f84530ee-5cf2-4033-acb7-4361d31d3dc8\",\n                \"properties\": {\n                    \"FileName\": \"test.txt\",\n                    \"Base64Value\": \"dGVzdA==\",\n                    \"IsAppendix\": \"False\"\n                }\n            }\n        ]\n    }\n]"}],"_postman_id":"dd5b14fc-63d4-48e1-acf5-1d2c1af89d77"},{"name":"Get documentypes","event":[{"listen":"test","script":{"type":"text/javascript","exec":["const jsonData = pm.response.json();\r","\r","const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\r","\r","pm.test(\"Status code is 200\", () => pm.response.to.have.status(200));\r","\r","pm.test(\"Content-Type is JSON\", () => {\r","    pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\r","});\r","\r","pm.test(\"Response is an array with more than one item\", () => {\r","    pm.expect(jsonData).to.be.an(\"array\");\r","    pm.expect(jsonData.length).to.be.above(1);\r","});\r","\r","pm.test(\"Every item has only id and name, correctly typed\", () => {\r","    jsonData.forEach((item, i) => {\r","        pm.expect(Object.keys(item).sort(), `item ${i} keys`).to.eql([\"id\", \"name\"]);\r","        pm.expect(item.id, `item ${i} id`).to.match(UUID);\r","        pm.expect(item.name, `item ${i} name`).to.be.a(\"string\").and.to.have.length.above(0);\r","    });\r","});\r","\r","pm.test(\"All ids are unique\", () => {\r","    const ids = jsonData.map(i => i.id);\r","    pm.expect(new Set(ids).size).to.eql(ids.length);\r","});\r","\r","pm.test(\"All names are unique\", () => {\r","    const names = jsonData.map(i => i.name);\r","    pm.expect(new Set(names).size).to.eql(names.length);\r","});\r",""]}}],"id":"ed4e8d09-7d37-4c66-91e0-850958913bcb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/documents/GetDocumentTypes","description":"<p>With this endpoint, you can retrieve the document types that a document can be classified with in the EDRMS. Use the value of the returned Id property as the DocumentType when you create a document with the Create document endpoint.</p>\n<p>Only the document types that are enabled in the EDRMS are returned. A type that is disabled is not one a document may be classified with, so it is not offered here.</p>\n<p><strong>Path parameters</strong><br />None.</p>\n<p><strong>Sorting and paging</strong><br />All enabled types are returned in one call. The list is not an OData entity set: it is not wrapped in value, it carries no @odata.context, and $filter, $expand and $select do not apply to it.</p>\n<p>An EDRMS with no enabled document types is answered with an empty list. That is a success and not an error.</p>\n<p><strong>Error handling</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>401 Unauthorized</td>\n<td>No token could be obtained for the session or it was invalid</td>\n</tr>\n<tr>\n<td>502 Bad Gateway</td>\n<td>A backend failure</td>\n</tr>\n</tbody>\n</table>\n</div><p>First available from version 20260910.1</p>\n<p><strong>Response</strong><br />Returns a plain JSON array of document type objects.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Id</td>\n<td>string (UUID). The value to send as DocumentType when creating a document</td>\n</tr>\n<tr>\n<td>Name</td>\n<td>string. The Danish display name of the type. The English one is not returned</td>\n</tr>\n</tbody>\n</table>\n</div>","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","documents","GetDocumentTypes"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ed4e8d09-7d37-4c66-91e0-850958913bcb"}],"id":"723f0bed-1480-40de-b81b-511503dcee53","_postman_id":"723f0bed-1480-40de-b81b-511503dcee53","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}}},{"name":"Files","item":[{"name":"Create File","event":[{"listen":"test","script":{"id":"4c014253-a4d9-46cd-a302-bd5fede9c3ff","exec":["pm.test(\"Status code is 201\", function () {\r","    pm.response.to.have.status(201);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    pm.expect(jsonData).to.not.have.property('@odata.context');\r","    pm.expect(jsonData).to.have.property('properties');\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('fileId').that.is.a('string').and.to.not.be.null;\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.properties;\r","    pm.expect(props.FileName).to.be.a('string').and.to.not.be.null;\r","    pm.expect(props.Base64Value).to.be.a('string').and.to.not.be.null;\r","    pm.expect(props.IsAppendix).to.be.a('string').and.to.not.be.null;\r","\r","});\r",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"c514585b-baae-4741-8b49-ed5b6c76ba40","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"FileName\": \"hej.pdf\",\r\n    \"Base64Value\": \"dGVzdA==\",\r\n    \"IsAppendix\": false\r\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/cases/109a8a4d-53e2-4a65-8d72-a39e03f74f2f/documents/94e7193a-3b98-47ed-a82a-2b3ffd3b0607/files","description":"<p>First available from version 20260126.1</p>\n<p>File Upload</p>\n<p>POST /v1/cases/{caseId}/documents/{documentId}/files</p>\n<p>an example could look like this<br />{{host}}/v1/cases/4f2eca1a-fb0d-46d5-bd96-8a65f48074ab/documents/c17f507e-c45d-42c3-89b7-59e08567421e/files</p>\n<p>Limits</p>\n<p>Maximum file size: 209 MB - this request is not efficient for large file uploads. We recommend using Create File (Form Data) instead</p>\n<p>Path Parameters</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>caseId</td>\n<td>string</td>\n<td>Yes</td>\n<td>The case ID containing the document</td>\n</tr>\n<tr>\n<td>documentId</td>\n<td>string</td>\n<td>Yes</td>\n<td>The document ID to attach the file to</td>\n</tr>\n</tbody>\n</table>\n</div><p>Query Parameters</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>includeContent</td>\n<td>boolean</td>\n<td>true</td>\n<td>If false, excludes Base64Value from the response for a smaller payload</td>\n</tr>\n</tbody>\n</table>\n</div><p>---<br />Content Types</p>\n<p>The endpoint supports two content types:</p>\n<p>1 JSON (application/json)</p>\n<p>Send the file content as a base64-encoded string.</p>\n<p>Request body:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>FileName</td>\n<td>string</td>\n<td>Yes</td>\n<td>Name of the file including extension</td>\n</tr>\n<tr>\n<td>Base64Value</td>\n<td>string</td>\n<td>Yes</td>\n<td>Base64-encoded file content</td>\n</tr>\n<tr>\n<td>IsAppendix</td>\n<td>string</td>\n<td>No</td>\n<td>\"True\" or \"False\" (default: \"True\")</td>\n</tr>\n</tbody>\n</table>\n</div><p>Example:</p>\n<p>{<br />\"FileName\": \"document.pdf\",<br />\"Base64Value\": \"JVBERi0xLjQKJeLjz9...\"<br />}</p>\n<p>2 Multipart Form Data (multipart/form-data)</p>\n<p>Upload the file directly without base64 encoding.</p>\n<p>Form fields:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>file</td>\n<td>file</td>\n<td>Yes</td>\n<td>The file to upload</td>\n</tr>\n<tr>\n<td>FileName</td>\n<td>text</td>\n<td>No</td>\n<td>Override the filename (defaults to uploaded filename)</td>\n</tr>\n<tr>\n<td>IsAppendix</td>\n<td>text</td>\n<td>No</td>\n<td>\"True\" or \"False\" (default: \"True\")</td>\n</tr>\n</tbody>\n</table>\n</div><p>Postman example:</p>\n<p>1. Set the request type to POST<br />2. Select Body → form-data<br />3. Add the following fields:<br />- Key: file, Type: File, Value: select your file<br />- Key: FileName, Type: Text, Value: mydocument.pdf (optional)<br />- Key: IsAppendix, Type: Text, Value: False (optional, only if you want to override the default)</p>\n<p>---<br />Responses</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>201 Created</td>\n<td>File uploaded successfully</td>\n</tr>\n<tr>\n<td>400 Bad Request</td>\n<td>Invalid request (missing file, invalid data, empty file)</td>\n</tr>\n<tr>\n<td>413 Request Entity Too Large</td>\n<td>File exceeds the 209 MB size limit</td>\n</tr>\n<tr>\n<td>500 Internal Server Error</td>\n<td>Unexpected server error</td>\n</tr>\n</tbody>\n</table>\n</div><p>Success (201 Created) with includeContent=true (default):</p>\n<p>{<br />\"FileId\": \"abc123\",<br />\"Properties\": {<br />\"FileName\": \"document.pdf\",<br />\"Base64Value\": \"JVBERi0xLjQKJeLjz9...\",<br />\"IsAppendix\": \"True\"<br />}<br />}</p>\n<p>Success (201 Created) with includeContent=false****:</p>\n<p>{<br />\"FileId\": \"abc123\",<br />\"Properties\": {<br />\"FileName\": \"document.pdf\",<br />\"IsAppendix\": \"True\"<br />}<br />}</p>\n<p>Error (400 Bad Request):</p>\n<p>{<br />\"errorCode\": \"ERROR_CODE_HERE\"<br />}</p>\n<p>Error (400 Bad Request) - No file provided:</p>\n<p>No file provided. Ensure a file field named 'file' is included.</p>\n<p>Error (400 Bad Request) - Empty file:</p>\n<p>The uploaded file is empty.</p>\n<p>Error (413 Request Entity Too Large):</p>\n<p>Request Entity Too Large</p>\n<p>---<br />Examples</p>\n<p>If you don't want the response to include the base64 value of the created file (omitting the content makes the response faster and reduces network bandwidth):</p>\n<p>cURL with JSON:</p>\n<p>curl -X POST \"<a href=\"https://api.example.com/v1/cases/123/documents/456/files?includeContent=false\">https://api.example.com/v1/cases/123/documents/456/files?includeContent=false\"</a> \\<br />-H \"Authorization: Bearer {token}\" \\<br />-H \"Content-Type: application/json\" \\<br />-d '{<br />\"FileName\": \"report.pdf\",<br />\"Base64Value\": \"JhBEHi0zzKjSK...\"<br />}'</p>\n<p>cURL with multipart/form-data:</p>\n<p>curl -X POST \"<a href=\"https://api.example.com/v1/cases/123/documents/456/files?includeContent=false\">https://api.example.com/v1/cases/123/documents/456/files?includeContent=false\"</a> \\<br />-H \"Authorization: Bearer {token}\" \\<br />-F \"file=@/path/to/report.pdf\"</p>\n<p>You can also include the content by omitting the query parameter or setting includeContent=true. The default behavior is set to include content to maintain backwards<br />compatibility.EndFragment</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","cases","109a8a4d-53e2-4a65-8d72-a39e03f74f2f","documents","94e7193a-3b98-47ed-a82a-2b3ffd3b0607","files"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c514585b-baae-4741-8b49-ed5b6c76ba40"},{"name":"Get file on fileId","event":[{"listen":"test","script":{"id":"23552445-8ba4-4c42-a5c4-6af1c9b4ba04","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    pm.expect(jsonData).to.not.have.property('@odata.context');\r","    pm.expect(jsonData).to.have.property('fileId');\r","    pm.expect(jsonData).to.have.property('properties');\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.properties;\r","    pm.expect(props.FileName).to.be.a('string').and.to.not.be.null;\r","    pm.expect(props.Base64Value).to.be.a('string').and.to.not.be.null;\r","    pm.expect(props.IsAppendix).to.be.a('string').and.to.not.be.null;\r","\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"ca651b5e-b02b-496c-acb6-1b43dc2d4f24","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/cases/4f2eca1a-fb0d-46d5-bd96-8a65f48074ab/documents/1bbbe0e4-18ca-43ff-b019-943457a5fbc3/files/6b0ba60b-b0b6-4755-b5b0-2ee02d075b50","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","cases","4f2eca1a-fb0d-46d5-bd96-8a65f48074ab","documents","1bbbe0e4-18ca-43ff-b019-943457a5fbc3","files","6b0ba60b-b0b6-4755-b5b0-2ee02d075b50"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ca651b5e-b02b-496c-acb6-1b43dc2d4f24"},{"name":"Get files under document","event":[{"listen":"test","script":{"id":"05040046-25d6-4c4d-8f27-fe229f4f07a1","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","      var jsonData = pm.response.json();\r","\r","    // Making sure '@odata.context' property does not exist directly in the response\r","    pm.expect(jsonData).to.not.have.property('@odata.context');\r","\r","    // Check if the first document has the 'documentId' and 'files' properties\r","    pm.expect(jsonData[0]).to.have.property('fileId').that.is.a('string');\r","\r","    // Check properties within 'properties' of the first document\r","    var props = jsonData[0].properties;\r","    pm.expect(props).to.have.property('FileName').that.is.a('string');\r","    pm.expect(props).to.have.property('Base64Value').that.is.a('string');\r","    pm.expect(props).to.have.property('IsAppendix').that.is.a('string');\r","\r","});"],"type":"text/javascript","packages":{}}}],"id":"9d43807f-c47e-424e-a51b-fcf6bc27ee28","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/cases/4f2eca1a-fb0d-46d5-bd96-8a65f48074ab/documents/1bbbe0e4-18ca-43ff-b019-943457a5fbc3/files","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","cases","4f2eca1a-fb0d-46d5-bd96-8a65f48074ab","documents","1bbbe0e4-18ca-43ff-b019-943457a5fbc3","files"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"9d43807f-c47e-424e-a51b-fcf6bc27ee28"},{"name":"Create File (Form Data)","event":[{"listen":"test","script":{"id":"4c014253-a4d9-46cd-a302-bd5fede9c3ff","exec":["pm.test(\"Status code is 201\", function () {\r","    pm.response.to.have.status(201);\r","});\r","\r","\r","// Checking if certain key fields are present and have the appropriate data type\r","pm.test(\"Response has the expected structure\", function () {\r","    var jsonData = pm.response.json();\r","\r","    pm.expect(jsonData).to.not.have.property('@odata.context');\r","    pm.expect(jsonData).to.have.property('properties');\r","\r","    // Check top-level properties\r","    pm.expect(jsonData).to.have.property('fileId').that.is.a('string').and.to.not.be.null;\r","\r","    // Check properties within 'properties'\r","    var props = jsonData.properties;\r","   pm.expect(props.FileName).to.be.a('string').and.to.not.be.null;\r","   pm.expect(props.Base64Value).to.be.undefined;\r","   pm.expect(props.IsAppendix).to.be.a('string').and.to.not.be.null;\r","\r","});\r",""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"1f0b5a9e-2189-41fd-a8fb-8628759ba23a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","uuid":"6ce6a83f-0e5b-410d-b866-71277e71a771","src":"/C:/test.txt"},{"key":"FileName","value":"et bilag.pdf","type":"text","uuid":"5e0ca032-fa80-4b73-9461-7ce1f3d8fc89"},{"key":"IsAppendix","value":"true","type":"text","uuid":"09864a1a-38da-4bb5-a112-4c849b02da81"}]},"url":"{{host}}/v1/cases/109a8a4d-53e2-4a65-8d72-a39e03f74f2f/documents/94e7193a-3b98-47ed-a82a-2b3ffd3b0607/files?includeContent=false","description":"<p>First available from version 20260126.1</p>\n<p>File Upload</p>\n<p>POST /v1/cases/{caseId}/documents/{documentId}/files</p>\n<p>an example could look like this<br />{{host}}/v1/cases/4f2eca1a-fb0d-46d5-bd96-8a65f48074ab/documents/c17f507e-c45d-42c3-89b7-59e08567421e/files</p>\n<p>Limits</p>\n<p>Maximum file size: 209 MB</p>\n<p>Path Parameters</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>caseId</td>\n<td>string</td>\n<td>Yes</td>\n<td>The case ID containing the document</td>\n</tr>\n<tr>\n<td>documentId</td>\n<td>string</td>\n<td>Yes</td>\n<td>The document ID to attach the file to</td>\n</tr>\n</tbody>\n</table>\n</div><p>Query Parameters</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>includeContent</td>\n<td>boolean</td>\n<td>true</td>\n<td>If false, excludes Base64Value from the response for a smaller payload</td>\n</tr>\n</tbody>\n</table>\n</div><p>---<br />Content Types</p>\n<p>The endpoint supports two content types:</p>\n<p>1 JSON (application/json)</p>\n<p>Send the file content as a base64-encoded string.</p>\n<p>Request body:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>FileName</td>\n<td>string</td>\n<td>Yes</td>\n<td>Name of the file including extension</td>\n</tr>\n<tr>\n<td>Base64Value</td>\n<td>string</td>\n<td>Yes</td>\n<td>Base64-encoded file content</td>\n</tr>\n<tr>\n<td>IsAppendix</td>\n<td>string</td>\n<td>No</td>\n<td>\"True\" or \"False\" (default: \"True\")</td>\n</tr>\n</tbody>\n</table>\n</div><p>Example:</p>\n<p>{<br />\"FileName\": \"document.pdf\",<br />\"Base64Value\": \"JVBERi0xLjQKJeLjz9...\"<br />}</p>\n<p>2 Multipart Form Data (multipart/form-data)</p>\n<p>Upload the file directly without base64 encoding.</p>\n<p>Form fields:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>file</td>\n<td>file</td>\n<td>Yes</td>\n<td>The file to upload</td>\n</tr>\n<tr>\n<td>FileName</td>\n<td>text</td>\n<td>Yes</td>\n<td>Name of the file including extension</td>\n</tr>\n<tr>\n<td>IsAppendix</td>\n<td>text</td>\n<td>No</td>\n<td>\"True\" or \"False\" (default: \"True\")</td>\n</tr>\n</tbody>\n</table>\n</div><p>Postman example:</p>\n<p>1. Set the request type to POST<br />2. Select Body → form-data<br />3. Add the following fields:<br />- Key: file, Type: File, Value: select your file<br />- Key: FileName, Type: Text, Value: mydocument.pdf (optional)<br />- Key: IsAppendix, Type: Text, Value: False (optional, only if you want to override the default)</p>\n<p>---<br />Responses</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>201 Created</td>\n<td>File uploaded successfully</td>\n</tr>\n<tr>\n<td>400 Bad Request</td>\n<td>Invalid request (missing file, invalid data, empty file)</td>\n</tr>\n<tr>\n<td>413 Request Entity Too Large</td>\n<td>File exceeds the 209 MB size limit</td>\n</tr>\n<tr>\n<td>500 Internal Server Error</td>\n<td>Unexpected server error</td>\n</tr>\n</tbody>\n</table>\n</div><p>Success (201 Created) with includeContent=true (default):</p>\n<p>{<br />\"FileId\": \"abc123\",<br />\"Properties\": {<br />\"FileName\": \"document.pdf\",<br />\"Base64Value\": \"JVBERi0xLjQKJeLjz9...\",<br />\"IsAppendix\": \"True\"<br />}<br />}</p>\n<p>Success (201 Created) with includeContent=false****:</p>\n<p>{<br />\"FileId\": \"abc123\",<br />\"Properties\": {<br />\"FileName\": \"document.pdf\",<br />\"IsAppendix\": \"True\"<br />}<br />}</p>\n<p>Error (400 Bad Request):</p>\n<p>{<br />\"errorCode\": \"ERROR_CODE_HERE\"<br />}</p>\n<p>Error (400 Bad Request) - No file provided:</p>\n<p>No file provided. Ensure a file field named 'file' is included.</p>\n<p>Error (400 Bad Request) - Empty file:</p>\n<p>The uploaded file is empty.</p>\n<p>Error (413 Request Entity Too Large):</p>\n<p>Request Entity Too Large</p>\n<p>---<br />Examples</p>\n<p>If you don't want the response to include the base64 value of the created file (omitting the content makes the response faster and reduces network bandwidth):</p>\n<p>cURL with JSON:</p>\n<p>curl -X POST \"<a href=\"https://api.example.com/v1/cases/123/documents/456/files?includeContent=false\">https://api.example.com/v1/cases/123/documents/456/files?includeContent=false\"</a> \\<br />-H \"Authorization: Bearer {token}\" \\<br />-H \"Content-Type: application/json\" \\<br />-d '{<br />\"FileName\": \"report.pdf\",<br />\"Base64Value\": \"JhBEHi0zzKjSK...\"<br />}'</p>\n<p>cURL with multipart/form-data:</p>\n<p>curl -X POST \"<a href=\"https://api.example.com/v1/cases/123/documents/456/files?includeContent=false\">https://api.example.com/v1/cases/123/documents/456/files?includeContent=false\"</a> \\<br />-H \"Authorization: Bearer {token}\" \\<br />-F \"file=@/path/to/report.pdf\"</p>\n<p>You can also include the content by omitting the query parameter or setting includeContent=true. The default behavior is set to include content to maintain backwards<br />compatibility.EndFragment</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","cases","109a8a4d-53e2-4a65-8d72-a39e03f74f2f","documents","94e7193a-3b98-47ed-a82a-2b3ffd3b0607","files"],"host":["{{host}}"],"query":[{"key":"includeContent","value":"false"}],"variable":[]}},"response":[],"_postman_id":"1f0b5a9e-2189-41fd-a8fb-8628759ba23a"}],"id":"ec686357-5c62-4b26-8f54-a601fea08ba9","_postman_id":"ec686357-5c62-4b26-8f54-a601fea08ba9","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}}},{"name":"Contacts","item":[{"name":"Search contacts on property","event":[{"listen":"test","script":{"id":"b66a17cb-88a7-4968-ac0f-c59d1f0ffc26","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Validate structure of 'value' array and its contents\r","pm.test(\"value array is present and structured correctly\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.an('string');\r","\r","});"],"type":"text/javascript","packages":{}}}],"id":"0ca006cd-571f-430f-a89a-90355edc3c3e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/Contacts?$filter=FirstName eq 'Ukendt 69535'","description":"<p>Get a list of contacts based on their firstname.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Contacts"],"host":["{{host}}"],"query":[{"key":"$filter","value":"FirstName eq 'Ukendt 69535'"}],"variable":[]}},"response":[{"id":"4885900b-b481-4ea5-b3ad-e9338308c6fe","name":"Search contacts on property","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{host}}/v1/Contacts?$filter=FirstName eq 'Ukendt 69535'","host":["{{host}}"],"path":["v1","Contacts"],"query":[{"key":"$filter","value":"FirstName eq 'Ukendt 69535'"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; odata.metadata=minimal; odata.streaming=true"},{"key":"Server","value":"Microsoft-IIS/10.0"},{"key":"OData-Version","value":"4.0"},{"key":"X-Powered-By","value":"ASP.NET"},{"key":"Date","value":"Mon, 17 Feb 2025 10:42:54 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"@odata.context\": \"https://localhost:44374/v1/$metadata#Contacts\",\n    \"value\": [\n        {\n            \"Id\": \"5f5617c3-b184-4444-95b6-723489a3cf49\",\n            \"FirstName\": \"Ukendt 69535\",\n            \"LastName\": \"Ukendt 69535\",\n            \"BirthDate\": null,\n            \"PhoneNumber\": null,\n            \"MobileNumber\": null,\n            \"PersonId\": \"9405\",\n            \"CprNumber\": \"041492-5555\",\n            \"AddressLine1\": null,\n            \"AddressLine2\": null,\n            \"PostalCode\": null,\n            \"Website\": null,\n            \"LinkedIn\": null,\n            \"Notes\": null,\n            \"CityName\": null,\n            \"Title\": null,\n            \"cf2_Fødselsdag\": \"2025-02-10T01:00:00Z\",\n            \"cf3_kontaktlevel_ID\": null,\n            \"cf4_Forældres_telefonnummer\": null,\n            \"cf5_BarnId\": null,\n            \"cf6_t1\": null,\n            \"cf8_talværdi\": 6,\n            \"cf9_sandtEllerFalsk\": true,\n            \"cf10_Person_der_er_ansvarlig\": \"hh\",\n            \"cf11_decimalVærdi\": 0.07,\n            \"cf12_egenNote\": \"en note til kontakten\",\n            \"cf13_GeId\": null,\n            \"cf14_Phone_Number_INT\": null,\n            \"cf15_Complain_bool\": null\n        }\n    ]\n}"}],"_postman_id":"0ca006cd-571f-430f-a89a-90355edc3c3e"},{"name":"Searh contacts on customfield","event":[{"listen":"test","script":{"id":"ba21d290-9118-45dc-b76c-538583ec4bc5","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Validate structure of 'value' array and its contents\r","pm.test(\"value array is present and structured correctly\", function () {\r","    var jsonData = pm.response.json();\r","     pm.expect(jsonData).to.have.property('@odata.context').that.is.an('string');\r","    pm.expect(jsonData).to.have.property('value').that.is.an('array');\r","\r","    var contact = jsonData.value[0];\r","    pm.expect(contact).to.be.an('object');\r","\r","    // Check for required fields and types\r","    pm.expect(contact).to.have.property('Id').that.is.a('string');\r","    pm.expect(contact).to.have.property('FirstName').that.is.a('string');\r","    pm.expect(contact).to.have.property('LastName').that.is.a('string');\r","    pm.expect(contact).to.have.property('PersonId').that.is.a('string');\r","    pm.expect(contact).to.have.property('CprNumber').that.is.a('string');\r","\r","    // Optional fields can be null\r","    pm.expect(contact.BirthDate, 'BirthDate should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(contact.PhoneNumber, 'PhoneNumber should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(contact.MobileNumber, 'MobileNumber should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(contact.AddressLine1, 'AddressLine1 should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(contact.PostalCode, 'PostalCode should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(contact.CityName, 'CityName should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(contact.Title, 'Title should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","});"],"type":"text/javascript","packages":{}}}],"id":"64ca9724-e2a4-47e7-8edc-f36809791966","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/Contacts?$filter=cf13_GeId eq '1234'","description":"<p>With this endpoint, you can retrieve a list of contacts filtered by the specified custom field. In the provided example, the custom field 'cf13_GeId' is a customfield that is located on the contacts. The prefix 'cf' specifies that its a customfield we are searching on.</p>\n<p>If you are searching based on list items please find the index of the customfield under the Customfield folder in this Postman collection.</p>\n<p>To determine the custom field ID for searching, utilize the 'Get metadata' endpoint and locate the desired property under the Contact entity</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Contacts"],"host":["{{host}}"],"query":[{"key":"$filter","value":"cf13_GeId eq '1234'"}],"variable":[]}},"response":[],"_postman_id":"64ca9724-e2a4-47e7-8edc-f36809791966"},{"name":"Get contact on id","event":[{"listen":"test","script":{"id":"26398ecc-b72e-4b7e-9906-a7baa238f552","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","pm.test(\"validate if structured is correct\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.an('string');\r","\r","    // Check for required fields and types\r","    pm.expect(jsonData).to.have.property('Id').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('FirstName').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('LastName').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('PersonId').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('CprNumber').that.is.a('string');\r","\r","    // Optional fields can be null\r","    pm.expect(jsonData.BirthDate, 'BirthDate should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.PhoneNumber, 'PhoneNumber should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.MobileNumber, 'MobileNumber should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.AddressLine1, 'AddressLine1 should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.PostalCode, 'PostalCode should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.CityName, 'CityName should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.Title, 'Title should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","});"],"type":"text/javascript","packages":{}}}],"id":"6c299db8-dc64-4d70-9893-74b91050f043","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/Contacts(856a2fa0-3987-4fbf-8079-e01cfebc3ae1)","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Contacts(856a2fa0-3987-4fbf-8079-e01cfebc3ae1)"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"6c299db8-dc64-4d70-9893-74b91050f043"},{"name":"Get contact on cpr","event":[{"listen":"test","script":{"id":"26398ecc-b72e-4b7e-9906-a7baa238f552","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","pm.test(\"validate if structured is correct\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.an('string');\r","\r","    // Check for required fields and types\r","    pm.expect(jsonData).to.have.property('Id').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('FirstName').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('LastName').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('PersonId').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('CprNumber').that.is.a('string');\r","\r","    // Optional fields can be null\r","    pm.expect(jsonData.BirthDate, 'BirthDate should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.PhoneNumber, 'PhoneNumber should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.MobileNumber, 'MobileNumber should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.AddressLine1, 'AddressLine1 should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.PostalCode, 'PostalCode should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.CityName, 'CityName should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.Title, 'Title should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","});"],"type":"text/javascript","packages":{}}}],"id":"4dba2019-c8a7-430c-81a1-1fd49bb9e267","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Visma-IMS-Cpr-nummer","value":"784061-1415"}],"url":"{{host}}/v1/Contacts/GetByCpr","description":"<p>Retrieve a contact using their CPR number, include the number in the header key 'Visma-IMS-Cpr-nummer.' The CPR number can be formatted either with or without a dash, such as '041195-4455' or '0411954455.' If multiple contacts share the same CPR, the contact that was created first in the system will be returned.</p>\n<p><strong>Error Handling</strong>:</p>\n<ol>\n<li><p><strong>Contact Not Found</strong>: If the contact cannot be found, an HTTP 404 error with the code 'ContactNotFoundErrorCode' will be returned.</p>\n</li>\n<li><p><strong>Incorrect Format</strong>: An incorrect CPR format will result in an HTTP 400 error with the code 'GetContactIncorrectCprFormatErrorCode.'</p>\n</li>\n<li><p><strong>Unauthorized Access</strong>: If authorization is not provided, an HTTP 401 error will be returned.</p>\n</li>\n</ol>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Contacts","GetByCpr"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[{"id":"397a7a94-e18d-4757-9c57-c99b5ae66538","name":"Get contact on cpr","originalRequest":{"method":"GET","header":[{"key":"Visma-IMS-Cpr-nummer","value":"784061-1415"}],"url":"{{host}}/v1/Contacts/GetByCpr"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json; odata.metadata=minimal; odata.streaming=true"},{"key":"Server","value":"Microsoft-IIS/10.0"},{"key":"OData-Version","value":"4.0"},{"key":"X-Powered-By","value":"ASP.NET"},{"key":"Date","value":"Mon, 17 Feb 2025 11:41:03 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"@odata.context\": \"https://localhost:44374/v1/$metadata#Contacts/$entity\",\n    \"Id\": \"3b86107d-24ad-4a12-b000-8d21d04ddddd\",\n    \"FirstName\": \"Keiuioo\",\n    \"LastName\": \"Kdjsdf\",\n    \"BirthDate\": null,\n    \"PhoneNumber\": null,\n    \"MobileNumber\": null,\n    \"PersonId\": \"6093\",\n    \"CprNumber\": \"7840611415\",\n    \"AddressLine1\": null,\n    \"AddressLine2\": null,\n    \"PostalCode\": null,\n    \"Website\": null,\n    \"LinkedIn\": null,\n    \"Notes\": null,\n    \"CityName\": null,\n    \"Title\": null,\n    \"cf2_Fødselsdag\": null,\n    \"cf3_kontaktlevel_ID\": null,\n    \"cf4_Forældres_telefonnummer\": null,\n    \"cf5_BarnId\": null,\n    \"cf6_t1\": null,\n    \"cf8_talværdi\": null,\n    \"cf9_sandtEllerFalsk\": null,\n    \"cf10_Person_der_er_ansvarlig\": null,\n    \"cf11_decimalVærdi\": null,\n    \"cf12_egenNote\": null,\n    \"cf14_Phone_Number_INT\": null,\n    \"cf15_Complain_bool\": null\n}"}],"_postman_id":"4dba2019-c8a7-430c-81a1-1fd49bb9e267"},{"name":"Create Contact (v 20221216.2)","event":[{"listen":"test","script":{"id":"149670a9-5a73-4a40-8a62-ba6db67293b4","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","pm.test(\"validate if structured is correct\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.an('string');\r","\r","    // Check for required fields and types\r","    pm.expect(jsonData).to.have.property('Id').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('FirstName').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('LastName').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('PersonId').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('CprNumber').that.is.a('string');\r","\r","    // Optional fields can be null\r","    pm.expect(jsonData.BirthDate, 'BirthDate should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.PhoneNumber, 'PhoneNumber should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.MobileNumber, 'MobileNumber should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.AddressLine1, 'AddressLine1 should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.PostalCode, 'PostalCode should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.CityName, 'CityName should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    pm.expect(jsonData.Title, 'Title should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","});"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"50c0bad6-9a4a-401f-9bef-b0df5f26beb4","exec":["function generateCprNumber() {\r","    // Generate a random number for the \"main\" part of the CPR number\r","    const mainPart = Math.floor(100000 + Math.random() * 900000);\r","\r","    // Generate a random number for the \"control\" part of the CPR number\r","    const controlPart = Math.floor(1000 + Math.random() * 9000);\r","\r","    // Combine them with a dash, matching the \"154285-5522\" format\r","    return `${mainPart}-${controlPart}`;\r","}\r","\r","// Generate a unique CPR number\r","const cprNumber = generateCprNumber();\r","\r","// Assuming your body is raw JSON\r","const requestBody = {\r","    \"FirstName\": \"Hans\",\r","    \"LastName\": \"Larsen\",\r","    \"BirthDate\": \"2000-11-25T00:00:00\",\r","    \"CprNumber\": cprNumber, // use the generated unique CPR number\r","    \"cf1_CPR3\": cprNumber  // ensure it matches the \"CprNumber\"\r","};\r","\r","// Set the modified request body\r","pm.request.body.raw = JSON.stringify(requestBody);"],"type":"text/javascript","packages":{}}}],"id":"84b2400d-3838-4804-a654-f443d06cba0f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"FirstName\": \"Hans\",\r\n    \"LastName\": \"Larsen\",\r\n    \"BirthDate\": \"2000-11-25T00:00:00\", \r\n    \"CprNumber\": \"154285-5522\", // this has to be unique. I have made a prescript in postman to make a unique cpr number on every request.\r\n    \"cf1_CPR3\": \"154285-5522\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/Contacts","description":"<p>Create a contact. This endpoint is available from version 20221216.2.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Contacts"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"84b2400d-3838-4804-a654-f443d06cba0f"},{"name":"Create Contact and relate to a case (v 20221216.2)","event":[{"listen":"test","script":{"id":"7b976bea-b310-4a4d-a335-683e50aa93c3","exec":["// Validate Status Code is 200 OK\r","pm.test(\"Status code is 200 OK\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","// Validate response structure\r","pm.test(\"Response structure is correct\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Validate '@odata.context'\r","    pm.expect(jsonData).to.have.property('@odata.context').that.is.a('string');\r","\r","    // Validate crucial fields\r","    pm.expect(jsonData).to.have.property('Id').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('FirstName').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('LastName').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('BirthDate').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('PersonId').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('CprNumber').that.is.a('string');\r","    pm.expect(jsonData).to.have.property('cf1_CPR3').that.is.a('string');\r","\r","});"],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"0c3a138c-f4b1-4e59-9a28-092a5b64ceb7","exec":["function generateCprNumber() {\r","    // Generate a random number for the \"main\" part of the CPR number\r","    const mainPart = Math.floor(100000 + Math.random() * 900000);\r","\r","    // Generate a random number for the \"control\" part of the CPR number\r","    const controlPart = Math.floor(1000 + Math.random() * 9000);\r","\r","    // Combine them with a dash, matching the \"154285-5522\" format\r","    return `${mainPart}-${controlPart}`;\r","}\r","\r","// Generate a unique CPR number\r","const cprNumber = generateCprNumber();\r","\r","// Attempt to get the CaseId from the environment variables\r","var caseId = pm.environment.get(\"CaseId\");\r","\r","// Check if CaseId has been set and has a value\r","if (!caseId) {\r","    // CaseId is null or undefined, log an error or throw an exception\r","    console.error(\"CaseId is not set. Please ensure CaseId has a value. This is important for this test. Either set the env variable or create a case and it should automatically set the CaseId.\");\r","    \r","    // Example: Throwing an error to halt the request\r","    throw new Error(\"CaseId is required but was not found in the environment variables.\");\r","}\r","\r","// Assuming your body is raw JSON\r","const requestBody = {\r","    \"FirstName\": \"Hans\",\r","    \"LastName\": \"Larsen\",\r","    \"BirthDate\": \"2000-11-25T00:00:00\",\r","    \"CprNumber\": cprNumber, // use the generated unique CPR number\r","    \"cf1_CPR3\": cprNumber, // ensure it matches the \"CprNumber\"\r","    \"PrimaryPartyForCaseId\": caseId // has to be unique. A case cannot have multiple primary contacts\r","};\r","\r","// Set the modified request body\r","pm.request.body.raw = JSON.stringify(requestBody);"],"type":"text/javascript","packages":{}}}],"id":"31bc9d6a-3035-4152-9bda-9c7f6e8659e8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"// A unique CPR number must be provided to create each contact. \r\n// Within Postman, I employ a Pre-request Script that dynamically generates the request body.\r\n// The body listed below serves merely as a sample to illustrate the potential structure of such a request.\r\n// Additionally, the PrimaryPartyForCaseId must be unique as each case can only be associated with one primary contact.\r\n{\r\n    \"FirstName\": \"Hans\",\r\n    \"LastName\": \"Larsen\",\r\n    \"BirthDate\": \"2000-11-25T00:00:00\",\r\n    \"CprNumber\": \"154285-5522\",\r\n    \"cf1_CPR3\": \"154285-5522\",\r\n    \"PrimaryPartyForCaseId\": \"2053f746-5e73-4858-87e7-c2c55015c5f9\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/Contacts","description":"<p>Create a contact and relate the contact to a case. The case has to be defined in \"PrimaryPartyForCaseId\". This Id for the case can be obtained under case creation or trough a search on a case. This endpoint is available from version 20221216.2.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Contacts"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"31bc9d6a-3035-4152-9bda-9c7f6e8659e8"},{"name":"Update contact","event":[{"listen":"test","script":{"id":"3106d298-3d8c-4859-a557-b6ae1dd40644","exec":["pm.test(\"Status code is 204\", function () {\r","    pm.response.to.have.status(204);\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"f09e5eae-b5a5-450b-900b-fe63e23d2538","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"FirstName\": \"Ulla\",\r\n    \"LastName\": \"Hansen\",\r\n    \"BirthDate\": \"2001-11-26\",\r\n    \"PhoneNumber\": \"\",\r\n    \"MobileNumber\": \"+4522114455\",\r\n    \"PersonId\": \"2521\",\r\n    \"CityName\": \"Vejle\",\r\n    \"Email\": \"Ulla@ims.test.dk\",\r\n    \"cf2_employmentDate\": \"2010-10-28\",\r\n    \"cf3_kontaktlevel_ID\": \"2\",\r\n    \"cf4_textField\": \"a text\",\r\n    \"cf5_textField\": null,\r\n    \"cf8_talværdi\": 66,\r\n    \"cf10_Person_der_er_ansvarlig\": \"lsj\",\r\n    \"cf11_decimalVærdi\": 1.1,\r\n    \"cf14_Phone_Number_INT\": 415478,\r\n    \"cf15_Complain_bool\": true\r\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/v1/contacts(c612e4c9-0f9d-4b37-817e-59a88d8149fc)","description":"<p>It is possible to update a contact.</p>\n<p>First, you need to obtain the contact ID, and then you can use the endpoint</p>\n<p>Before sending the request, you need to fill in the body with the properties you want to update.</p>\n<p>You can find the properties in the EDM model accessible from the endpoint \"{{host}}/v1/$metadata\".</p>\n<p>Please note that standard fields like PhoneNumber and MobileNumber can be cleared by using empty quotes (\"\"). If you want to clear custom field (\"cf\") values, you should provide null as shown in cf5_textField.</p>\n<p>Date types like BirthDate should be in the following format yyyy-MM-dd</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","contacts(c612e4c9-0f9d-4b37-817e-59a88d8149fc)"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f09e5eae-b5a5-450b-900b-fe63e23d2538"},{"name":"Get cases related to a contact","event":[{"listen":"test","script":{"type":"text/javascript","exec":["const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\n\npm.test(\"Status code is 200\", function () {\n    pm.response.to.have.status(200);\n});\n\npm.test(\"Response body has @odata.context (string) and value (array)\", function () {\n    const body = pm.response.json();\n    pm.expect(body).to.have.property(\"@odata.context\").that.is.a(\"string\");\n    pm.expect(body).to.have.property(\"value\").that.is.an(\"array\");\n});\n\nconst body = pm.response.json();\nconst items = body.value;\n\nif (Array.isArray(items) && items.length > 0) {\n\n    pm.test(\"All items - required string properties exist and are strings (Title, Status, CaseNumber, TemplateName, Description, CaseOwnerUserName)\", function () {\n        const stringProps = [\"Title\", \"Status\", \"CaseNumber\", \"TemplateName\", \"Description\", \"CaseOwnerUserName\"];\n        items.forEach(function (item, i) {\n            stringProps.forEach(function (prop) {\n                pm.expect(item, `item[${i}]`).to.have.property(prop);\n                pm.expect(item[prop], `item[${i}].${prop}`).to.be.a(\"string\");\n            });\n        });\n    });\n\n    pm.test(\"All items - CreatedByUserName is null or string\", function () {\n        items.forEach(function (item, i) {\n            pm.expect(item, `item[${i}]`).to.have.property(\"CreatedByUserName\");\n            const val = item.CreatedByUserName;\n            pm.expect(val === null || typeof val === 'string', `item[${i}].CreatedByUserName`).to.be.true;\n        });\n    });\n\n    pm.test(\"All items - CaseId is a valid UUID\", function () {\n        items.forEach(function (item, i) {\n            pm.expect(item, `item[${i}]`).to.have.property(\"CaseId\");\n            pm.expect(item.CaseId, `item[${i}].CaseId`).to.be.a(\"string\").and.match(uuidRegex);\n        });\n    });\n\n    pm.test(\"All items - PrimaryContactNodeRefId is a valid UUID\", function () {\n        items.forEach(function (item, i) {\n            pm.expect(item, `item[${i}]`).to.have.property(\"PrimaryContactNodeRefId\");\n            pm.expect(item.PrimaryContactNodeRefId, `item[${i}].PrimaryContactNodeRefId`).to.be.a(\"string\").and.match(uuidRegex);\n        });\n    });\n\n    pm.test(\"All items - ContactNodeRefIds is a valid UUID\", function () {\n        items.forEach(function (item, i) {\n            pm.expect(item, `item[${i}]`).to.have.property(\"ContactNodeRefIds\");\n            pm.expect(item.ContactNodeRefIds, `item[${i}].ContactNodeRefIds`).to.be.a(\"string\").and.match(uuidRegex);\n        });\n    });\n\n    pm.test(\"All items - ISO date properties exist, are strings, and are valid dates (Created, LastModified, StartDate)\", function () {\n        const dateProps = [\"Created\", \"LastModified\", \"StartDate\"];\n        items.forEach(function (item, i) {\n            dateProps.forEach(function (prop) {\n                pm.expect(item, `item[${i}]`).to.have.property(prop);\n                pm.expect(item[prop], `item[${i}].${prop}`).to.be.a(\"string\");\n                pm.expect(new Date(item[prop]).toString(), `item[${i}].${prop} is valid date`).to.not.equal(\"Invalid Date\");\n            });\n        });\n    });\n\n    pm.test(\"All items - nullable properties are null or string (EndDate, ParentId, FirstName, UserName, Email)\", function () {\n        const nullableProps = [\"EndDate\", \"ParentId\", \"FirstName\", \"UserName\", \"Email\"];\n        items.forEach(function (item, i) {\n            nullableProps.forEach(function (prop) {\n                pm.expect(item, `item[${i}]`).to.have.property(prop);\n                const val = item[prop];\n                pm.expect(val === null || typeof val === 'string', `item[${i}].${prop}`).to.be.true;\n            });\n        });\n    });\n}\n"]}}],"id":"f5fbc14d-453c-43c5-bbc2-378ff608dcde","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/Contacts(898342f1-4d18-4938-89bd-7b9ce2971bee)/Cases","description":"<h2 id=\"get-the-cases-a-contact-is-related-to\">Get the cases a contact is related to</h2>\n<p><strong>Method:</strong> GET<br /><strong>URL:</strong> <code>{{host}}/v1/Contacts({contactId})/Cases</code></p>\n<p>With this endpoint, you can retrieve the cases that belongs to a contact. <code>contactId</code> is the node id of the contact in the EDRMS. The cases come back as the same Case entity the rest of the API sends.</p>\n<p>The result is limited to the cases the calling user is allowed to see in IMS Case.</p>\n<p>To determine the node id of a contact, utilize the <strong>Search contacts</strong> or <strong>Get contact by CPR</strong> endpoints and use the value of the returned <code>ContactNodeRefId</code> property.</p>\n<h3 id=\"path-parameters\">Path parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>contactId</code></td>\n<td>The node id of the contact. e.g. <code>17f96ce7-f77d-4ee6-81ec-f06727e6de48</code></td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"supported-url-forms\">Supported URL forms</h3>\n<ul>\n<li><p><code>{{host}}/v1/Contacts({contactId})/Cases</code></p>\n</li>\n<li><p><code>{{host}}/v1/contacts/{contactId}/cases</code></p>\n</li>\n<li><p><code>{{host}}/v1/contacts/({contactId})/cases</code></p>\n</li>\n</ul>\n<h3 id=\"sorting-and-paging\">Sorting and paging</h3>\n<p>Newest created case first. At most 100 cases per call. No paging, no <code>$expand</code>/<code>$select</code>.</p>\n<h3 id=\"error-handling\">Error handling</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Meaning</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>400 Bad Request</td>\n<td>Contact id is not a well-formed node id</td>\n</tr>\n<tr>\n<td>401 Unauthorized</td>\n<td>No token could be obtained for the session or it was invalid</td>\n</tr>\n<tr>\n<td>404 Not Found</td>\n<td>IMS Case does not know a contact with that id</td>\n</tr>\n<tr>\n<td>502 Bad Gateway</td>\n<td>A backend failure</td>\n</tr>\n</tbody>\n</table>\n</div><p>First available from version 20260907.1</p>\n<h3 id=\"response\">Response</h3>\n<p>Returns an OData JSON object with a <code>value</code> array of Case objects.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Property</th>\n<th>Type</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>CaseId</td>\n<td>string (UUID)</td>\n</tr>\n<tr>\n<td>Title</td>\n<td>string</td>\n</tr>\n<tr>\n<td>Created</td>\n<td>string (ISO date)</td>\n</tr>\n<tr>\n<td>Status</td>\n<td>string</td>\n</tr>\n<tr>\n<td>LastModified</td>\n<td>string (ISO date)</td>\n</tr>\n<tr>\n<td>PrimaryContactNodeRefId</td>\n<td>string (UUID)</td>\n</tr>\n<tr>\n<td>ContactNodeRefIds</td>\n<td>string (UUID) Comma seperated for multiple values</td>\n</tr>\n<tr>\n<td>CaseNumber</td>\n<td>string</td>\n</tr>\n<tr>\n<td>CreatedByUserName</td>\n<td>string</td>\n</tr>\n<tr>\n<td>TemplateName</td>\n<td>string</td>\n</tr>\n<tr>\n<td>Description</td>\n<td>string</td>\n</tr>\n<tr>\n<td>StartDate</td>\n<td>string (ISO date)</td>\n</tr>\n<tr>\n<td>EndDate</td>\n<td>string (ISO date)</td>\n</tr>\n<tr>\n<td>ParentId</td>\n<td>string</td>\n</tr>\n<tr>\n<td>CaseOwnerUserName</td>\n<td>string</td>\n</tr>\n<tr>\n<td>FirstName</td>\n<td>string</td>\n</tr>\n<tr>\n<td>UserName</td>\n<td>string</td>\n</tr>\n<tr>\n<td>Email</td>\n<td>string</td>\n</tr>\n</tbody>\n</table>\n</div>","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Contacts(898342f1-4d18-4938-89bd-7b9ce2971bee)","Cases"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[{"id":"b4b967ab-3149-4c78-98e7-98920a278b71","name":"200 OK - Cases returned","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"{{host}}/v1/contacts/:contactId/cases","host":["{{host}}"],"path":["v1","contacts",":contactId","cases"],"variable":[{"key":"contactId"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"@odata.context\": \"http://extern-api.imscase.dk/v1/$metadata#Cases\",\n    \"value\": [\n        {\n            \"CaseId\": \"a5000005-0000-4000-8000-000000000001\",\n            \"Title\": \"Sygedagpenge opfølgning\",\n            \"Created\": \"2022-06-30T11:00:00.015+02:00\",\n            \"Status\": \"Closed\",\n            \"LastModified\": \"2022-12-15T10:47:31.204+01:00\",\n            \"PrimaryContactNodeRefId\": \"17f96ce7-f77d-4ee6-81ec-f06727e6de48\",\n            \"ContactNodeRefIds\": \"17f96ce7-f77d-4ee6-81ec-f06727e6de48\",\n            \"CaseNumber\": \"20220630-10237\",\n            \"CreatedByUserName\": \"admin\",\n            \"TemplateName\": \"Borgersag\",\n            \"Description\": \"\",\n            \"StartDate\": null,\n            \"EndDate\": \"2022-12-15T00:00:00+01:00\",\n            \"ParentId\": \"c238cd9d-e4ea-42b5-97e5-db47493bd975\",\n            \"CaseOwnerUserName\": \"mnielsen\",\n            \"FirstName\": null,\n            \"UserName\": null,\n            \"Email\": null\n        },\n        {\n            \"CaseId\": \"a5000005-0000-4000-8000-000000000002\",\n            \"Title\": \"Flytning til plejebolig\",\n            \"Created\": \"2021-09-17T14:20:00.342+02:00\",\n            \"Status\": \"Closed\",\n            \"LastModified\": \"2021-10-04T08:15:09.771+02:00\",\n            \"PrimaryContactNodeRefId\": \"17f96ce7-f77d-4ee6-81ec-f06727e6de48\",\n            \"ContactNodeRefIds\": \"17f96ce7-f77d-4ee6-81ec-f06727e6de48\",\n            \"CaseNumber\": \"20210917-10112\",\n            \"CreatedByUserName\": \"admin\",\n            \"TemplateName\": \"Borgersag\",\n            \"Description\": \"\",\n            \"StartDate\": null,\n            \"EndDate\": null,\n            \"ParentId\": null,\n            \"CaseOwnerUserName\": \"mnielsen\",\n            \"FirstName\": null,\n            \"UserName\": null,\n            \"Email\": null\n        }\n    ]\n}"}],"_postman_id":"f5fbc14d-453c-43c5-bbc2-378ff608dcde"}],"id":"5a7359a7-72a6-4f5f-b697-761f3d140ca3","_postman_id":"5a7359a7-72a6-4f5f-b697-761f3d140ca3","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}}},{"name":"Plan","item":[{"name":"Get Plans","event":[{"listen":"test","script":{"id":"5b6ce5e3-1aa7-43f0-aaed-3c9920a7dfaa","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","pm.test(\"Array field is not empty\", function () {\r","    var jsonData = pm.response.json(); // Get the JSON response body\r","\r","   pm.expect(jsonData).to.not.have.property('@odata.context').that.is.an('string');\r","\r","    pm.expect(jsonData, 'Response JSON should not be empty').to.not.be.empty;\r","});"],"type":"text/javascript","packages":{}}}],"id":"51db4008-5018-4688-b752-b64aed45a969","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/plans","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","plans"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"51db4008-5018-4688-b752-b64aed45a969"}],"id":"496d9a0e-8972-4104-a393-8e7430137bc4","_postman_id":"496d9a0e-8972-4104-a393-8e7430137bc4","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}}},{"name":"Customfields","item":[{"name":"GetCustomfieldlistItems On Contacts","event":[{"listen":"test","script":{"id":"226babb4-66fc-4877-86a3-366f3851fc43","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","pm.test(\"Array is not empty\", function () {\r","    var jsonData = pm.response.json(); // Parse the JSON response\r","    pm.expect(jsonData).to.be.an('array').that.is.not.empty;\r","   pm.expect(jsonData).to.not.have.property('@odata.context').that.is.an('string');\r","\r","});\r","\r","pm.test(\"Each item has 'id' and 'value' with correct types\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Loop through each item in the array\r","    jsonData.forEach(function (item) {\r","        // Check if 'id' and 'value' properties exist\r","        pm.expect(item).to.have.property('id');\r","        pm.expect(item).to.have.property('value');\r","\r","        // Further, check if 'id' is a string (even if numeric, treat as string due to JSON structure)\r","        pm.expect(item.id).to.be.a('string');\r","\r","        // Check if 'value' is a string\r","        pm.expect(item.value).to.be.a('string');\r","    });\r","});"],"type":"text/javascript","packages":{}}}],"id":"beb03663-f767-4d64-adb6-da9b5e0d97f4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/contacts/GetCustomfieldListItems(cf3_kontaktlevel_ID)","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","contacts","GetCustomfieldListItems(cf3_kontaktlevel_ID)"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"beb03663-f767-4d64-adb6-da9b5e0d97f4"},{"name":"GetCustomfieldlistItems On Cases","event":[{"listen":"test","script":{"id":"da4db6dc-818f-48b7-8fd8-71230c4b7850","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","pm.test(\"Array is not empty\", function () {\r","    var jsonData = pm.response.json(); // Parse the JSON response\r","    pm.expect(jsonData).to.be.an('array').that.is.not.empty;\r","       pm.expect(jsonData).to.not.have.property('@odata.context').that.is.an('string');\r","});\r","\r","pm.test(\"Each item has 'id' and 'value' with correct types\", function () {\r","    var jsonData = pm.response.json();\r","\r","    // Loop through each item in the array\r","    jsonData.forEach(function (item) {\r","        // Check if 'id' and 'value' properties exist\r","        pm.expect(item).to.have.property('id');\r","        pm.expect(item).to.have.property('value');\r","\r","        // Further, check if 'id' is a string (even if numeric, treat as string due to JSON structure)\r","        pm.expect(item.id).to.be.a('string');\r","\r","        // Check if 'value' is a string\r","        pm.expect(item.value).to.be.a('string');\r","    });\r","});"],"type":"text/javascript","packages":{}}}],"id":"939f98fc-0bf7-4c80-a35f-9042cf9823b2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/cases/GetCustomfieldListItems(cf2_musik_ID)","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","cases","GetCustomfieldListItems(cf2_musik_ID)"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"939f98fc-0bf7-4c80-a35f-9042cf9823b2"}],"id":"8fd33405-e00c-4f35-af54-acdcf91c3512","_postman_id":"8fd33405-e00c-4f35-af54-acdcf91c3512","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}}},{"name":"Users","item":[{"name":"Get users with pagning (v 20230224.1)","event":[{"listen":"test","script":{"id":"62920115-3a6a-4208-969e-f1394053e472","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","\r","\r","pm.test(\"Array is properly structured and not empty\", function () {\r","    var jsonData = pm.response.json(); // Parse the JSON response\r","\r","    // Check that the response is an array and not empty\r","    pm.expect(jsonData).to.be.an('array').that.is.not.empty;\r","    pm.expect(jsonData).to.not.have.property('@odata.context').that.is.an('string');\r","\r","    // Loop through each object in the array\r","    jsonData.forEach(function (item) {\r","        // Check for 'id' and 'properties' in each item\r","        pm.expect(item).to.have.property('id').that.is.a('string');\r","\r","        // Check 'properties' object and its structure\r","        pm.expect(item).to.have.property('properties').that.is.an('object');\r","\r","        var properties = item.properties;\r","\r","        // Validate properties\r","        pm.expect(properties).to.have.property('UserName').that.is.a('string');\r","        pm.expect(properties).to.have.property('FirstName').that.is.a('string');\r","        pm.expect(properties).to.have.property('LastName').that.is.a('string');\r","        pm.expect(properties).to.have.property('Email').that.is.a('string');\r","\r","        // Validate optional fields can be null\r","        pm.expect(properties.PhoneNumber, 'PhoneNumber should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","        pm.expect(properties.MobileNumber, 'MobileNumber should be null or a string').to.satisfy(val => val === null || typeof val === 'string');\r","    });\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"24f0e982-6325-4801-9625-5361ef4f9ac5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/Users?$skip=2&$top=10","description":"<p>Available from version 20230224.1</p>\n<p>Use this endpoint to get a list of users from Visma Case.</p>\n<p>You will have to be authorized as admin to use this endpoint.</p>\n<p>This endpoint retrieves a subset of users and supports pagination for navigation through the dataset.</p>\n<p><strong>Query Parameters</strong>:</p>\n<ul>\n<li><p><strong>$skip</strong>:</p>\n<ul>\n<li><p><strong>Purpose</strong>: Skips a specified number of records in the dataset.</p>\n</li>\n<li><p><strong>Example</strong>: <code>3</code></p>\n<ul>\n<li><strong>Usage</strong>: Begins the result set after the first 3 records that match the filter.</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p><strong>$top</strong>:</p>\n<ul>\n<li><p><strong>Purpose</strong>: Limits the number of records returned.</p>\n</li>\n<li><p><strong>Example</strong>: <code>4</code></p>\n</li>\n</ul>\n</li>\n</ul>\n<p>If no query paramters are provided Default Skip = 0, Default top=10</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","Users"],"host":["{{host}}"],"query":[{"key":"$skip","value":"2"},{"key":"$top","value":"10"}],"variable":[]}},"response":[],"_postman_id":"24f0e982-6325-4801-9625-5361ef4f9ac5"}],"id":"39c2ad5c-4384-46b4-b4c9-1c7992144d40","_postman_id":"39c2ad5c-4384-46b4-b4c9-1c7992144d40","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}}},{"name":"Get metadata","event":[{"listen":"test","script":{"id":"1e18afa7-9622-474f-8f4e-d2b68395f9b1","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r",""],"type":"text/javascript","packages":{}}}],"id":"43438f82-0d02-4a53-bdea-4fc5848c19d4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{host}}/v1/$metadata","description":"<p>Use this endpoint to retrieve a data model of the system. This data model includes all entities and their associated properties within the system.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"d011a09c-b80a-464e-bf23-45834070001a","id":"d011a09c-b80a-464e-bf23-45834070001a","name":"Visma Case Standard API","type":"collection"}},"urlObject":{"path":["v1","$metadata"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"43438f82-0d02-4a53-bdea-4fc5848c19d4"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]}},"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""],"id":"9b0514f0-e0f2-46dc-8f9a-13fa4e3eacfe"}},{"listen":"test","script":{"type":"text/javascript","exec":[""],"id":"f8477071-b5d0-4e13-9b51-9a13a89babf1"}}],"variable":[{"value":"","type":"string"}]}