{"info":{"_postman_id":"47adb708-1bfc-4dcf-b333-64fc6cdf6602","name":"third-party-api -Testins","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"endpoints","item":[{"name":"Get branches","_postman_id":"fdef8ce8-6464-42d5-9923-056a03c69a35","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"GET","header":[],"url":"{{third-party-api}}/api/business/{{business}}/branch"},"response":[{"id":"f5be2e4f-c00d-4ecc-a832-25657f040ddc","name":"Get branches Demo US response","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{third-party-api}}/api/business/{{business}}/branch?","host":["{{third-party-api}}"],"path":["api","business","{{business}}","branch"],"query":[{"key":"third-party-gateway-url","value":"http://api-gateway-dev.phorest.com/third-party-api-server","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Wed, 26 Jun 2019 16:04:33 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"transfer-encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"_embedded\": {\n        \"branches\": [\n            {\n                \"branchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"name\": \"usa1\"\n            },\n            {\n                \"branchId\": \"A3xwBGS9_UfxmXS8BSztpw\",\n                \"name\": \"usa2\"\n            },\n            {\n                \"branchId\": \"LofVVHYrbIPBAphHAjR8ew\",\n                \"name\": \"usa3\"\n            }\n        ]\n    },\n    \"page\": {\n        \"size\": 3,\n        \"totalElements\": 3,\n        \"totalPages\": 1,\n        \"number\": 0\n    }\n}"}]},{"name":"Get list of clients from business","_postman_id":"4726e3d4-871e-4d4c-a273-cfa55cb3d801","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"GET","header":[],"url":"{{third-party-api}}/api/business/{{business}}/client","description":"Target: third-party-api"},"response":[]},{"name":"Create Booking","event":[{"listen":"prerequest","script":{"id":"fca17588-9af1-492c-bce9-9576b3e1e434","exec":[""],"type":"text/javascript"}}],"_postman_id":"9c91eceb-a228-4f64-b89b-acd04677355f","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\"bookingStatus\": \"RESERVED\",\n  \"clientAppointmentSchedules\": [\n    {\n      \"clientId\": \"{{client-id}}\",\n      \"serviceSchedules\": [\n        {\n          \"serviceId\": \"{{service-id}}\",\n          \"staffId\": \"{{staff-id}}\",\n          \"startTime\": \"{{todays_date}}T14:30:00.000Z\",\n          \"endTime\": \"{{todays_date}}T15:00:00.000Z\"\n        }\n      ]\n    }\n  ],\n  \"clientId\": \"{{client-id}}\"\n}\n\n"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/booking","description":"Target: third-party-api\n\nNote that timezones and staff availibility are a factor. For the branch that you are targeting you need to ensure that the staff member is available, enabled for online booking and qualifed for the service.\n\nFor branches in timezones outside of your local timezone, e.g when using usa1, you will beed to add/subtract the time difference to get a valid slot.\n\nThe default variables only account for the staff availility."},"response":[{"id":"3e460a22-14a8-48f9-bfcb-26239458fefd","name":"Create Booking with single service for today","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\"bookingStatus\": \"RESERVED\",\n  \"clientAppointmentSchedules\": [\n    {\n      \"clientId\": \"{{client-id}}\",\n      \"serviceSchedules\": [\n        {\n          \"serviceId\": \"{{service-id}}\",\n          \"staffId\": \"{{staff-id}}\",\n          \"startTime\": \"{{todays_date}}T14:30:00.000Z\",\n          \"endTime\": \"{{todays_date}}T15:00:00.000Z\"\n        }\n      ]\n    }\n  ],\n  \"clientId\": \"{{client-id}}\"\n}\n\n"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/booking"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Application-Context","value":"application:10180"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Wed, 27 Nov 2019 14:25:40 GMT"}],"cookie":[],"body":"{\n    \"bookingId\": \"thrCi3BV5Q98o364zDLkhQ\",\n    \"clientId\": \"iYDLKoLEeBvHan3RTrKjKA\",\n    \"schedules\": [\n        {\n            \"serviceId\": \"LM5pKM5HD4quKM5MasI69A\",\n            \"startTime\": \"2019-11-28T14:30:00.000Z\",\n            \"endTime\": \"2019-11-28T15:00:00.000Z\",\n            \"appointmentId\": \"CrCMe4U-r4vx7I8UzK2h2Q\",\n            \"staffId\": \"XwC_dE9fyD2YUYvJV0zmYQ\",\n            \"alternativeStaffMember\": false,\n            \"staffRequest\": false\n        }\n    ],\n    \"clientAppointmentSchedules\": [\n        {\n            \"clientId\": \"iYDLKoLEeBvHan3RTrKjKA\",\n            \"serviceSchedules\": [\n                {\n                    \"serviceId\": \"LM5pKM5HD4quKM5MasI69A\",\n                    \"startTime\": \"2019-11-28T14:30:00.000Z\",\n                    \"endTime\": \"2019-11-28T15:00:00.000Z\",\n                    \"appointmentId\": \"CrCMe4U-r4vx7I8UzK2h2Q\",\n                    \"staffId\": \"XwC_dE9fyD2YUYvJV0zmYQ\",\n                    \"alternativeStaffMember\": false,\n                    \"staffRequest\": false\n                }\n            ]\n        }\n    ]\n}"},{"id":"b2606516-0b34-4a08-b845-88095cbfb10c","name":"Create Booking tmp","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\"bookingStatus\": \"ACTIVE\",\n  \"clientAppointmentSchedules\": [\n    {\n      \"clientId\": \"{{client-id}}\",\n      \"serviceSchedules\": [\n        {\n          \"serviceId\": \"{{service-id}}\",\n          \"staffId\": \"{{staff-id}}\",\n          \"startTime\": \"2019-07-02T18:30:00.000Z\",\n          \"endTime\": \"2019-07-02T19:00:00.000Z\"\n        },\n        {\n          \"serviceId\": \"{{service-id}}\",\n          \"staffId\": \"{{staff-id}}\",\n          \"startTime\": \"2019-07-02T19:30:00.000Z\",\n          \"endTime\": \"2019-07-02T20:00:00.000Z\"\n        }\n      ]\n    }\n  ],\n  \"clientId\": \"{{client-id}}\"\n}\n\n"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/booking"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Application-Context","value":"application:10180"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Thu, 22 Aug 2019 11:34:19 GMT"}],"cookie":[],"body":"{\n    \"bookingId\": \"GMVzJ4jJYJzP2faK2XBwyA\",\n    \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n    \"schedules\": [\n        {\n            \"serviceId\": \"osJCzJJNTgIP9zrohRSgtg\",\n            \"startTime\": \"2019-07-02T18:30:00.000Z\",\n            \"endTime\": \"2019-07-02T19:00:00.000Z\",\n            \"appointmentId\": \"Hwyw3yuH9LY4fz05GuskCA\",\n            \"staffId\": \"vBzH1k0wppeP93_SxRr-7g\",\n            \"alternativeStaffMember\": false,\n            \"staffRequest\": false\n        },\n        {\n            \"serviceId\": \"osJCzJJNTgIP9zrohRSgtg\",\n            \"startTime\": \"2019-07-02T19:30:00.000Z\",\n            \"endTime\": \"2019-07-02T20:00:00.000Z\",\n            \"appointmentId\": \"d9Rj_Ayfl5E2aq2_LA3Wuw\",\n            \"staffId\": \"vBzH1k0wppeP93_SxRr-7g\",\n            \"alternativeStaffMember\": false,\n            \"staffRequest\": false\n        }\n    ],\n    \"clientAppointmentSchedules\": [\n        {\n            \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n            \"serviceSchedules\": [\n                {\n                    \"serviceId\": \"osJCzJJNTgIP9zrohRSgtg\",\n                    \"startTime\": \"2019-07-02T18:30:00.000Z\",\n                    \"endTime\": \"2019-07-02T19:00:00.000Z\",\n                    \"appointmentId\": \"Hwyw3yuH9LY4fz05GuskCA\",\n                    \"staffId\": \"vBzH1k0wppeP93_SxRr-7g\",\n                    \"alternativeStaffMember\": false,\n                    \"staffRequest\": false\n                },\n                {\n                    \"serviceId\": \"osJCzJJNTgIP9zrohRSgtg\",\n                    \"startTime\": \"2019-07-02T19:30:00.000Z\",\n                    \"endTime\": \"2019-07-02T20:00:00.000Z\",\n                    \"appointmentId\": \"d9Rj_Ayfl5E2aq2_LA3Wuw\",\n                    \"staffId\": \"vBzH1k0wppeP93_SxRr-7g\",\n                    \"alternativeStaffMember\": false,\n                    \"staffRequest\": false\n                }\n            ]\n        }\n    ]\n}"},{"id":"cc55f8af-e74d-4348-a72a-596e7d64a006","name":"Create Booking with one client and one service","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\"bookingStatus\": \"ACTIVE\",\n  \"clientAppointmentSchedules\": [\n    {\n      \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n      \"serviceSchedules\": [\n        {\n          \"serviceId\": \"osJCzJJNTgIP9zrohRSgtg\",\n          \"staffId\": \"vBzH1k0wppeP93_SxRr-7g\",\n          \"startTime\": \"2019-07-02T13:30:00.000Z\",\n          \"endTime\": \"2019-07-02T14:00:00.000Z\"\n        }\n      ]\n    }\n  ],\n  \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\"\n}\n\n"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/booking"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Application-Context","value":"application:10180"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Wed, 26 Jun 2019 14:38:24 GMT"}],"cookie":[],"body":"{\n    \"bookingId\": \"GMVzJ4jJYJzP2faK2XBwyA\",\n    \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n    \"depositAmount\": 0,\n    \"schedules\": [\n        {\n            \"serviceId\": \"osJCzJJNTgIP9zrohRSgtg\",\n            \"startTime\": \"2019-07-02T13:30:00.000Z\",\n            \"endTime\": \"2019-07-02T14:00:00.000Z\",\n            \"appointmentId\": \"bFElWkNCdEsMksj7e1QtBw\",\n            \"staffId\": \"vBzH1k0wppeP93_SxRr-7g\",\n            \"alternativeStaffMember\": false,\n            \"staffRequest\": false\n        }\n    ],\n    \"clientAppointmentSchedules\": [\n        {\n            \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n            \"serviceSchedules\": [\n                {\n                    \"serviceId\": \"osJCzJJNTgIP9zrohRSgtg\",\n                    \"startTime\": \"2019-07-02T13:30:00.000Z\",\n                    \"endTime\": \"2019-07-02T14:00:00.000Z\",\n                    \"appointmentId\": \"bFElWkNCdEsMksj7e1QtBw\",\n                    \"staffId\": \"vBzH1k0wppeP93_SxRr-7g\",\n                    \"alternativeStaffMember\": false,\n                    \"staffRequest\": false\n                }\n            ]\n        }\n    ]\n}"}]},{"name":"Get list of services from branch","_postman_id":"76137f7b-b50e-4e23-aaec-acefc56caaaa","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"GET","header":[],"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/service"},"response":[]},{"name":"Get list of staff from branch","_postman_id":"feda5166-32fb-46f3-a4fc-14c265dda81e","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"GET","header":[],"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/staff"},"response":[]},{"name":"Create a client for business","_postman_id":"8dcf0cb2-3862-4d04-8c4a-ba7626de9bbd","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"firstName\": \"Sean\",\n    \"lastName\": \"Greenspan the Second\",\n    \"mobile\": \"353844344455\",\n    \"landLine\": \"\",\n    \"email\": \"sgreen3@mail.com\",\n    \"address\": {\n        \"streetAddress1\": \"13 MadHaus Range\",\n        \"streetAddress2\": \"Electric Avenue\",\n        \"city\": \"\",\n        \"state\": \"\",\n        \"postalCode\": \"\",\n        \"country\": \"\"\n    },\n    \"clientSince\": \"{{todays-date}}T04:00:00.000Z\",\n    \"gender\": \"MALE\",\n    \"notes\": \"Hello\",\n    \"smsMarketingConsent\": true,\n    \"emailMarketingConsent\": true,\n    \"smsReminderConsent\": true,\n    \"emailReminderConsent\": true,\n    \"preferredStaffId\": \"{{staff-id}}\",\n    \"creditAccount\": {\n        \"outstandingBalance\": 90,\n        \"creditDays\": 0,\n        \"creditLimit\": 100\n    },\n    \"creatingBranchId\": \"{{branch}}\",\n    \"archived\": false,\n    \"deleted\": false,\n    \"banned\": false\n}"},"url":"{{third-party-api}}/api/business/{{business}}/client/","description":"Phone number must be unique.\nDo not include clientId as this is created for you."},"response":[{"id":"e5932a5c-b5a1-4e86-b3c0-b84ceb553a26","name":"Create a client for business Sean Greenspan","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"firstName\": \"Sean\",\n    \"lastName\": \"Greenspan the Second\",\n    \"mobile\": \"353844344455\",\n    \"landLine\": \"\",\n    \"email\": \"sgreen3@mail.com\",\n    \"address\": {\n        \"streetAddress1\": \"13 MadHaus Range\",\n        \"streetAddress2\": \"Electric Avenue\",\n        \"city\": \"\",\n        \"state\": \"\",\n        \"postalCode\": \"\",\n        \"country\": \"\"\n    },\n    \"clientSince\": \"2017-09-07T04:00:00.000Z\",\n    \"gender\": \"MALE\",\n    \"notes\": \"Hello\",\n    \"smsMarketingConsent\": true,\n    \"emailMarketingConsent\": true,\n    \"smsReminderConsent\": true,\n    \"emailReminderConsent\": true,\n    \"preferredStaffId\": \"XaAp4WctXOD7Lml0M-GtEA\",\n    \"creditAccount\": {\n        \"outstandingBalance\": 90,\n        \"creditDays\": 0,\n        \"creditLimit\": 100\n    },\n    \"creatingBranchId\": \"wONK7yYseMhDK1kkDyA5yg\",\n    \"archived\": false,\n    \"deleted\": false,\n    \"banned\": false\n}"},"url":"{{third-party-api}}/api/business/{{business}}/client/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Wed, 26 Jun 2019 10:33:00 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Content-Length","value":"869"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"clientId\": \"WROpR24FGaWMFKgS4zwByw\",\n    \"version\": 1,\n    \"firstName\": \"Sean\",\n    \"lastName\": \"Greenspan the Second\",\n    \"mobile\": \"353844344455\",\n    \"landLine\": \"\",\n    \"email\": \"sgreen3@mail.com\",\n    \"address\": {\n        \"streetAddress1\": \"13 MadHaus Range\",\n        \"streetAddress2\": \"Electric Avenue\",\n        \"city\": \"\",\n        \"state\": \"\",\n        \"postalCode\": \"\",\n        \"country\": \"\"\n    },\n    \"clientSince\": \"2017-09-07T04:00:00.000Z\",\n    \"gender\": \"MALE\",\n    \"notes\": \"Hello\",\n    \"smsMarketingConsent\": true,\n    \"emailMarketingConsent\": true,\n    \"smsReminderConsent\": true,\n    \"emailReminderConsent\": true,\n    \"preferredStaffId\": \"XaAp4WctXOD7Lml0M-GtEA\",\n    \"creditAccount\": {\n        \"outstandingBalance\": 0,\n        \"creditDays\": 0,\n        \"creditLimit\": 0\n    },\n    \"creatingBranchId\": \"wONK7yYseMhDK1kkDyA5yg\",\n    \"archived\": false,\n    \"deleted\": false,\n    \"banned\": false\n}"}]},{"name":"Update a client for a business","_postman_id":"b33e18d3-0aef-45f5-a3c0-df57341ab19d","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n                \"clientId\": \"{{client-id}}\",\n                \"version\": 31,\n                \"firstName\": \"Amy\",\n                \"lastName\": \"Green\",\n                \"mobile\": \"1237853732181\",\n                \"landLine\": \"\",\n                \"email\": \"v@gmail.com\",\n                \"address\": {\n                    \"streetAddress1\": \"13 Woodgrille Park\",\n                    \"streetAddress2\": \"\",\n                    \"city\": \"\",\n                    \"state\": \"\",\n                    \"postalCode\": \"\",\n                    \"country\": \"\"\n                },\n                \"clientSince\": \"{{todays-date}}T04:00:00.000Z\",\n                \"gender\": \"FEMALE\",\n                \"notes\": \"\",\n                \"smsMarketingConsent\": true,\n                \"emailMarketingConsent\": true,\n                \"smsReminderConsent\": true,\n                \"emailReminderConsent\": true,\n                \"preferredStaffId\": \"XaAp4WctXOD7Lml0M-GtEA\",\n                \"creditAccount\": {\n                    \"creditDays\": 0,\n                    \"creditLimit\": 100\n                },\n                \"creatingBranchId\": \"wONK7yYseMhDK1kkDyA5yg\",\n                \"archived\": false,\n                \"deleted\": false,\n                \"banned\": false\n            }"},"url":"{{third-party-api}}/api/business/{{business}}/client/{{client-id}}","description":"You must increment the version or the put will fail."},"response":[]},{"name":"Get List of Appointments","_postman_id":"d4aff013-1645-4569-b466-6bdd9173239a","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"GET","header":[{"key":"","value":"","type":"text","disabled":true}],"url":{"raw":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/appointment?from_date={{todays-date}}&client_id={{client-id}}&to_date={{next-months-date}}","host":["{{third-party-api}}"],"path":["api","business","{{business}}","branch","{{branch}}","appointment"],"query":[{"key":"from_date","value":"{{todays-date}}"},{"key":"client_id","value":"{{client-id}}"},{"key":"fetch_canceled","value":"true","disabled":true},{"key":"to_date","value":"{{next-months-date}}"}]}},"response":[]},{"name":"Create a purchase associated with a branch","_postman_id":"6037d0e4-fc4d-4be8-a139-8df73ec12961","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"GET","header":[],"url":{"raw":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/appointment?from_date=2019-07-02&to_date=2019-07-02","host":["{{third-party-api}}"],"path":["api","business","{{business}}","branch","{{branch}}","appointment"],"query":[{"key":"from_date","value":"2019-07-02"},{"key":"to_date","value":"2019-07-02"}]}},"response":[]},{"name":"Get Staff Worktime Tables","_postman_id":"3ab22259-aca1-4ca4-9872-7537b9b3ed37","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"GET","header":[],"url":{"raw":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/staff/worktimetable?from_date={{todays-date}}&to_date={{tomorrows-date}}","host":["{{third-party-api}}"],"path":["api","business","{{business}}","branch","{{branch}}","staff","worktimetable"],"query":[{"key":"from_date","value":"{{todays-date}}"},{"key":"to_date","value":"{{tomorrows-date}}"}]}},"response":[]},{"name":"Get Branch Timetable","_postman_id":"913cb2fd-34e2-4782-be53-f7bbe55f26bb","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"GET","header":[],"url":{"raw":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/worktimetable?from_date=2019-07-02&to_date=2019-07-09","host":["{{third-party-api}}"],"path":["api","business","{{business}}","branch","{{branch}}","worktimetable"],"query":[{"key":"from_date","value":"2019-07-02"},{"key":"to_date","value":"2019-07-09"}]},"description":"Max range is one month."},"response":[]},{"name":"Activate Booking","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["pm.environment.set(\"booking-id\", \"-VPL9g5--a8QrmEsEhz9lQ\");"]}}],"_postman_id":"f858009c-b1bf-4bb2-9e7d-cb012f15d726","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"depositAmount\" : 2.0\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/booking/{{booking-id}}/activate"},"response":[]},{"name":"Add appointment note","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["pm.environment.set(\"appointment-id\", \"T76JOcol8qVIAguT3K0yeQ\");"]}}],"_postman_id":"4cf8b809-1337-461d-95bd-1c83e228b4ae","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"serviceNote\" : \" ,Second part of the note\"\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/appointment/{{appointment-id}}/note"},"response":[]},{"name":"Create a purchase","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["rand_number_5 = Math.floor((Math.random() + 1) * 10000);","pm.environment.set(\"rand_number_5\", rand_number_5);"]}}],"_postman_id":"030aed13-6d5e-440d-b915-7a7a5eda07ea","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"courseId\": \"{{course-id}}\",\n      \"price\": 100,\n      \"staffId\": \"{{staff-id}}\",\n      \"taxRates\":[\n      \t{\n            \"name\": \"Service new\",\n            \"rate\": 20.0000\n      \t}\n      ]\n    }\n  ],\n  \"number\": \"asdf{{rand_number_5}}e5d3asdf\",\n  \"payments\": [\n    {\n      \"amount\": 120,\n      \"customPaymentTypeId\": \"RCq7f3ez5JC2qxGlq434qQ\",\n      \"customTypeCode\": \"CPT\",\n      \"customTypeName\": \"Custom payment customTypeName\",\n      \"paymentId\": \"uXguBGPZREMUxqeEgxIjlg\",\n      \"type\": \"CREDIT\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"response":[{"id":"0bf703e1-effa-4be2-9e03-a5b80e03b045","name":"Create a purchase: Minimum required for a successful request.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"appointmentId\": \"{{appointment-id}}\",\n      \"price\": 90,\n      \"staffId\": \"{{staff-id}}\"\n    }\n  ],\n  \"number\": \"asdf1563afe5d3asdf\",\n  \"payments\": [\n    {\n      \"amount\": 90,\n      \"type\": \"CREDIT\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Tue, 03 Sep 2019 11:21:25 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"transfer-encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"purchaseId\": \"sxNIc1kWiVJsYkAT3PcSKw\",\n    \"number\": \"asdf1563afe5d3asdf\",\n    \"transactionNumber\": \"3563\",\n    \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n    \"payments\": [\n        {\n            \"paymentId\": \"6KSyoFI4gBkOaloGOpzkDA\",\n            \"type\": \"CREDIT\",\n            \"amount\": 90,\n            \"customTypeName\": \"BACON\",\n            \"customTypeCode\": \"BA\"\n        }\n    ],\n    \"items\": [\n        {\n            \"purchaseItemId\": \"Z3j9Om4FX18_l8z2wexMxw\",\n            \"description\": \"Blowout\",\n            \"price\": 90,\n            \"staffId\": \"vBzH1k0wppeP93_SxRr-7g\",\n            \"details\": {\n                \"totalAmount\": 90,\n                \"taxAmount\": 0,\n                \"taxIncluded\": false,\n                \"taxRates\": [\n                    {\n                        \"name\": \"Service 0\",\n                        \"rate\": 0\n                    }\n                ]\n            },\n            \"childPurchaseItems\": [],\n            \"quantity\": 1\n        }\n    ],\n    \"details\": {\n        \"totalAmount\": 90,\n        \"taxAmount\": 0,\n        \"taxes\": [\n            {\n                \"taxAmount\": 0,\n                \"taxRate\": {\n                    \"name\": \"Service 0\",\n                    \"rate\": 0\n                }\n            }\n        ]\n    }\n}"},{"id":"639f3b57-9882-4f1a-b98d-627e884d205d","name":"Create a purchase with tax not included.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"courseId\": \"{{course-id}}\",\n      \"price\": 100,\n      \"staffId\": \"{{staff-id}}\",\n      \"taxRates\": [\n      \t{\n      \t\t\"taxId\": \"1234\",\n      \t\t\"name\" : \"testTax\",\n      \t\t\"rate\": 20\n      \t}\n      \t]\n    }\n  ],\n  \"number\": \"asdf{{rand_number_5}}e5d3asdf\",\n  \"payments\": [\n    {\n      \"amount\": 120,\n      \"customPaymentTypeId\": \"RCq7f3ez5JC2qxGlq434qQ\",\n      \"customTypeCode\": \"CPT\",\n      \"customTypeName\": \"Custom payment customTypeName\",\n      \"paymentId\": \"uXguBGPZREMUxqeEgxIjlg\",\n      \"type\": \"CREDIT\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Wed, 11 Mar 2020 14:32:36 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Content-Length","value":"1409"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"purchaseId\": \"436XRXF9NeT54wXzwrDXHw\",\n    \"number\": \"asdf17477e5d3asdf\",\n    \"transactionNumber\": \"4794\",\n    \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n    \"payments\": [\n        {\n            \"paymentId\": \"pmN2esUUHf5zRaXRyi4z5w\",\n            \"type\": \"CREDIT\",\n            \"amount\": 120,\n            \"customTypeName\": \"BACON\",\n            \"customTypeCode\": \"BA\"\n        }\n    ],\n    \"items\": [\n        {\n            \"purchaseItemId\": \"7qdw2OXYzREizRjwZbrFAA\",\n            \"description\": \"course\",\n            \"price\": 100,\n            \"courseId\": \"9ju3jb33zsEfi1InAp5dsA\",\n            \"staffId\": \"mWkA6EjdLDyTGL7APWsPxw\",\n            \"details\": {\n                \"totalAmount\": 100,\n                \"taxAmount\": 0,\n                \"taxIncluded\": false,\n                \"taxRates\": []\n            },\n            \"childPurchaseItems\": [\n                {\n                    \"purchaseItemId\": \"MDqWbrupA8tF13TbWhD9sQ\",\n                    \"description\": \"course - Shoulder Length Color\",\n                    \"price\": 100,\n                    \"staffId\": \"mWkA6EjdLDyTGL7APWsPxw\",\n                    \"details\": {\n                        \"totalAmount\": 100,\n                        \"taxAmount\": 20,\n                        \"taxIncluded\": false,\n                        \"taxRates\": [\n                            {\n                                \"name\": \"Service\",\n                                \"rate\": 20\n                            }\n                        ]\n                    },\n                    \"childPurchaseItems\": [],\n                    \"quantity\": 1\n                }\n            ],\n            \"quantity\": 1\n        }\n    ],\n    \"details\": {\n        \"totalAmount\": 100,\n        \"taxAmount\": 20,\n        \"changeAmount\": 0,\n        \"taxes\": [\n            {\n                \"taxAmount\": 20,\n                \"taxRate\": {\n                    \"name\": \"Service\",\n                    \"rate\": 20\n                }\n            }\n        ]\n    }\n}"},{"id":"63b3113f-190e-4be1-b06e-2bb33925f287","name":"Create a purchase with a taxrate for tax not included salon.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"courseId\": \"{{course-id}}\",\n      \"price\": 100,\n      \"staffId\": \"{{staff-id}}\",\n      \"taxRates\":[\n      \t{\n            \"name\": \"Service new\",\n            \"rate\": 20.0000\n      \t}\n      ]\n    }\n  ],\n  \"number\": \"asdf{{rand_number_5}}e5d3asdf\",\n  \"payments\": [\n    {\n      \"amount\": 120,\n      \"customPaymentTypeId\": \"RCq7f3ez5JC2qxGlq434qQ\",\n      \"customTypeCode\": \"CPT\",\n      \"customTypeName\": \"Custom payment customTypeName\",\n      \"paymentId\": \"uXguBGPZREMUxqeEgxIjlg\",\n      \"type\": \"CREDIT\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Tue, 21 Apr 2020 09:18:21 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Content-Length","value":"1418"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"purchaseId\": \"lR9mSx-paaYKoUVwC99W8A\",\n    \"number\": \"asdf15832e5d3asdf\",\n    \"transactionNumber\": \"5044\",\n    \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n    \"payments\": [\n        {\n            \"paymentId\": \"VfYi0t-k1ppHd6MSFM6h8A\",\n            \"type\": \"CREDIT\",\n            \"amount\": 120,\n            \"customTypeName\": \"BACON\",\n            \"customTypeCode\": \"BA\"\n        }\n    ],\n    \"items\": [\n        {\n            \"purchaseItemId\": \"7yH0MFFy6PGcpMy3MxGA5Q\",\n            \"description\": \"course\",\n            \"price\": 100,\n            \"courseId\": \"9ju3jb33zsEfi1InAp5dsA\",\n            \"staffId\": \"mWkA6EjdLDyTGL7APWsPxw\",\n            \"details\": {\n                \"totalAmount\": 100,\n                \"taxAmount\": 20,\n                \"taxIncluded\": false,\n                \"taxRates\": []\n            },\n            \"childPurchaseItems\": [\n                {\n                    \"purchaseItemId\": \"XzVBZ3p9wn445lEHA2G7yw\",\n                    \"description\": \"course - Shoulder Length Color\",\n                    \"price\": 100,\n                    \"staffId\": \"mWkA6EjdLDyTGL7APWsPxw\",\n                    \"details\": {\n                        \"totalAmount\": 100,\n                        \"taxAmount\": 20,\n                        \"taxIncluded\": false,\n                        \"taxRates\": [\n                            {\n                                \"name\": \"Service new\",\n                                \"rate\": 20\n                            }\n                        ]\n                    },\n                    \"childPurchaseItems\": [],\n                    \"quantity\": 1\n                }\n            ],\n            \"quantity\": 1\n        }\n    ],\n    \"details\": {\n        \"totalAmount\": 100,\n        \"taxAmount\": 20,\n        \"changeAmount\": 0,\n        \"taxes\": [\n            {\n                \"taxAmount\": 20,\n                \"taxRate\": {\n                    \"name\": \"Service new\",\n                    \"rate\": 20\n                }\n            }\n        ]\n    }\n}"},{"id":"74883d3f-b866-419b-8751-e5c08cd68dd5","name":"Create a purchase: Use an invalid payment type.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"appointmentId\": \"{{appointment2-id}}\",\n      \"price\": 90,\n      \"staffId\": \"{{staff-id}}\"\n    }\n  ],\n  \"number\": \"asdf1585afe5d5asdf\",\n  \"payments\": [\n    {\n      \"amount\": 90,\n      \"type\": \"invalid type\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Date","value":"Tue, 03 Sep 2019 11:37:56 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"transfer-encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"statusCode\": 400,\n    \"id\": \"60c9b07f-0322-468a-8791-5cf818426b2b\",\n    \"detail\": \"Invalid request\"\n}"},{"id":"b2f7aa44-ba56-4756-b3d5-3be29eaaf9f6","name":"Create a purchase: 400 Response when the request body is empty with message about the required elements.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Date","value":"Tue, 03 Sep 2019 11:12:17 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Content-Length","value":"167"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"statusCode\": 400,\n    \"id\": \"d14a367b-c7aa-44e7-a4e2-cbd7f978cf7c\",\n    \"detail\": \"items size must be between 1 and 2147483647,number may not be empty,clientId may not be empty\"\n}"},{"id":"b323b4d2-1a15-49e0-a1d1-c42d40d1c603","name":"Create a purchase: Pay with a custom payment Type.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"appointmentId\": \"{{appointment-id}}\",\n      \"price\": 90,\n      \"staffId\": \"{{staff-id}}\"\n    }\n  ],\n  \"number\": \"asdf1563afe5848sdf\",\n  \"payments\": [\n    {\n      \"amount\": 90,\n      \"customPaymentTypeId\": \"RCq7f3ez5JC2qxGlq434qQ\",\n      \"customTypeCode\": \"BA\",\n      \"customTypeName\": \"BACON\",\n      \"type\": \"OTHER\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Wed, 04 Sep 2019 09:03:07 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"transfer-encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"purchaseId\": \"buVQ7HCqdtvDvP2q-6YSSw\",\n    \"number\": \"asdf1563afe5848sdf\",\n    \"transactionNumber\": \"3569\",\n    \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n    \"payments\": [\n        {\n            \"paymentId\": \"YrWoO_zKG4GaSp0A3Z8WUg\",\n            \"type\": \"OTHER\",\n            \"amount\": 90,\n            \"customTypeName\": \"BACON\",\n            \"customTypeCode\": \"BA\"\n        }\n    ],\n    \"items\": [\n        {\n            \"purchaseItemId\": \"uOPkZFzCc82AilqseO1taA\",\n            \"description\": \"Blowout\",\n            \"price\": 90,\n            \"staffId\": \"vBzH1k0wppeP93_SxRr-7g\",\n            \"details\": {\n                \"totalAmount\": 90,\n                \"taxAmount\": 0,\n                \"taxIncluded\": false,\n                \"taxRates\": [\n                    {\n                        \"name\": \"Service 0\",\n                        \"rate\": 0\n                    }\n                ]\n            },\n            \"childPurchaseItems\": [],\n            \"quantity\": 1\n        }\n    ],\n    \"details\": {\n        \"totalAmount\": 90,\n        \"taxAmount\": 0,\n        \"taxes\": [\n            {\n                \"taxAmount\": 0,\n                \"taxRate\": {\n                    \"name\": \"Service 0\",\n                    \"rate\": 0\n                }\n            }\n        ]\n    }\n}"},{"id":"c0bfebf4-caaf-46ab-a478-881de92013d2","name":"Create a purchase with demo ie on dev with an appointment","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"details\": {\n    \"totalAmount\": 100.0\n  },\n  \"items\": [\n    {\n      \"appointmentId\": \"--C2J5BOx5pBN-AIgbm8gQ\",\n      \"details\": {\n        \"totalAmount\": 100.0\n      },\n      \"price\": 100.0,\n      \"staffId\": \"{{staff-id}}\"\n    }\n  ],\n  \"number\": \"588b1601-cd57-40ad-b206-ffb5e5b9919l\",\n  \"payments\": [\n    {\n      \"amount\": 100.0,\n      \"paymentId\": \"uXguBGPZREMUx8d6gxIjlg\",\n      \"type\": \"CREDIT\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Application-Context","value":"application:10180"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Tue, 27 Aug 2019 13:41:27 GMT"}],"cookie":[],"body":"{\n    \"purchaseId\": \"EGlg3X-3pEGwcLd4WjPNfQ\",\n    \"number\": \"588b1601-cd57-40ad-b206-ffb5e5b9919l\",\n    \"transactionNumber\": \"51602\",\n    \"clientId\": \"4-Dr0i3cqGz5-g2TPsBheA\",\n    \"payments\": [\n        {\n            \"paymentId\": \"hV-FqZm9BAeG6IRzeydivg\",\n            \"type\": \"CREDIT\",\n            \"amount\": 100\n        }\n    ],\n    \"items\": [\n        {\n            \"purchaseItemId\": \"k4ovW6cRUkKlxVkG3xdBpA\",\n            \"description\": \"service1565244257927\",\n            \"price\": 100,\n            \"staffId\": \"HmLIxL_FZYOke3eM5bSgdw\",\n            \"details\": {\n                \"totalAmount\": 100,\n                \"taxAmount\": 17.36,\n                \"taxIncluded\": true,\n                \"taxRates\": [\n                    {\n                        \"name\": \"Service\",\n                        \"rate\": 21\n                    }\n                ]\n            },\n            \"childPurchaseItems\": [],\n            \"quantity\": 1\n        }\n    ],\n    \"details\": {\n        \"totalAmount\": 100,\n        \"taxAmount\": 17.36,\n        \"taxes\": [\n            {\n                \"taxAmount\": 17.36,\n                \"taxRate\": {\n                    \"name\": \"Service\",\n                    \"rate\": 21\n                }\n            }\n        ]\n    }\n}"},{"id":"cfbd9af7-790b-444f-bf5b-5bb8e35b0f03","name":"Create a purchase: Split payment with two types of payment. ","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"appointmentId\": \"{{appointment-id}}\",\n      \"price\": 90,\n      \"staffId\": \"{{staff-id}}\"\n    }\n  ],\n  \"number\": \"asdf1563afe5d5asdf\",\n  \"payments\": [\n    {\n      \"amount\": 45,\n      \"type\": \"CASH\"\n    },\n    {\n      \"amount\": 45,\n      \"type\": \"CREDIT\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Tue, 03 Sep 2019 11:24:00 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"transfer-encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"purchaseId\": \"_2FGnpqjsXpybsMnOUDl4g\",\n    \"number\": \"asdf1563afe5d5asdf\",\n    \"transactionNumber\": \"3564\",\n    \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n    \"payments\": [\n        {\n            \"paymentId\": \"QKafM5rSffth_xo7O3-c6w\",\n            \"type\": \"CASH\",\n            \"amount\": 45\n        },\n        {\n            \"paymentId\": \"cp4y-6HUBpMxCXu6i_vK9w\",\n            \"type\": \"CREDIT\",\n            \"amount\": 45\n        }\n    ],\n    \"items\": [\n        {\n            \"purchaseItemId\": \"weQYs3KES1eMDvumifT_Mw\",\n            \"description\": \"Blowout\",\n            \"price\": 90,\n            \"staffId\": \"vBzH1k0wppeP93_SxRr-7g\",\n            \"details\": {\n                \"totalAmount\": 90,\n                \"taxAmount\": 0,\n                \"taxIncluded\": false,\n                \"taxRates\": [\n                    {\n                        \"name\": \"Service 0\",\n                        \"rate\": 0\n                    }\n                ]\n            },\n            \"childPurchaseItems\": [],\n            \"quantity\": 1\n        }\n    ],\n    \"details\": {\n        \"totalAmount\": 90,\n        \"taxAmount\": 0,\n        \"taxes\": [\n            {\n                \"taxAmount\": 0,\n                \"taxRate\": {\n                    \"name\": \"Service 0\",\n                    \"rate\": 0\n                }\n            }\n        ]\n    }\n}"},{"id":"e063ba84-1fb1-456d-87b1-a3e20e61bc90","name":"Create a purchase: Payments do not equal cost of purchase.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"appointmentId\": \"{{appointment2-id}}\",\n      \"price\": 90,\n      \"staffId\": \"{{staff-id}}\"\n    }\n  ],\n  \"number\": \"asdf1585afe5d5asdf\",\n  \"payments\": [\n    {\n      \"amount\": 70,\n      \"type\": \"CASH\"\n      \n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Date","value":"Tue, 03 Sep 2019 11:53:21 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"transfer-encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"statusCode\": 400,\n    \"id\": \"b1be1886-d9fc-488c-a176-af26de4bbfca\",\n    \"detail\": \"Purchase invalid: The total payment amount 70 does not equal the total cost of the items purchased 90\"\n}"}]},{"name":"Create a purchasefor a product","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["rand_number_5 = Math.floor((Math.random() + 1) * 10000);","pm.environment.set(\"rand_number_5\", rand_number_5);"]}}],"_postman_id":"b0a81f3b-ba02-4cb1-bb85-9ac7afd5d285","request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"courseId\": \"{{branch-product-id}}\",\n      \"price\": 100,\n      \"staffId\": \"{{staff-id}}\",\n      \"taxRates\":[\n      \t{\n            \"name\": \"Product Tac Rate\",\n            \"rate\": 20.0000\n      \t}\n      ]\n    }\n  ],\n  \"number\": \"asdf{{rand_number_5}}e5d3asdf\",\n  \"payments\": [\n    {\n      \"amount\": 120,\n      \"customPaymentTypeId\": \"RCq7f3ez5JC2qxGlq434qQ\",\n      \"customTypeCode\": \"CPT\",\n      \"customTypeName\": \"Custom payment customTypeName\",\n      \"paymentId\": \"uXguBGPZREMUxqeEgxIjlg\",\n      \"type\": \"CREDIT\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"response":[{"id":"04afc68e-80c4-4c12-a7e1-d3a3647054b0","name":"Create a purchase with demo ie on dev with an appointment","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"details\": {\n    \"totalAmount\": 100.0\n  },\n  \"items\": [\n    {\n      \"appointmentId\": \"--C2J5BOx5pBN-AIgbm8gQ\",\n      \"details\": {\n        \"totalAmount\": 100.0\n      },\n      \"price\": 100.0,\n      \"staffId\": \"{{staff-id}}\"\n    }\n  ],\n  \"number\": \"588b1601-cd57-40ad-b206-ffb5e5b9919l\",\n  \"payments\": [\n    {\n      \"amount\": 100.0,\n      \"paymentId\": \"uXguBGPZREMUx8d6gxIjlg\",\n      \"type\": \"CREDIT\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Application-Context","value":"application:10180"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Tue, 27 Aug 2019 13:41:27 GMT"}],"cookie":[],"body":"{\n    \"purchaseId\": \"EGlg3X-3pEGwcLd4WjPNfQ\",\n    \"number\": \"588b1601-cd57-40ad-b206-ffb5e5b9919l\",\n    \"transactionNumber\": \"51602\",\n    \"clientId\": \"4-Dr0i3cqGz5-g2TPsBheA\",\n    \"payments\": [\n        {\n            \"paymentId\": \"hV-FqZm9BAeG6IRzeydivg\",\n            \"type\": \"CREDIT\",\n            \"amount\": 100\n        }\n    ],\n    \"items\": [\n        {\n            \"purchaseItemId\": \"k4ovW6cRUkKlxVkG3xdBpA\",\n            \"description\": \"service1565244257927\",\n            \"price\": 100,\n            \"staffId\": \"HmLIxL_FZYOke3eM5bSgdw\",\n            \"details\": {\n                \"totalAmount\": 100,\n                \"taxAmount\": 17.36,\n                \"taxIncluded\": true,\n                \"taxRates\": [\n                    {\n                        \"name\": \"Service\",\n                        \"rate\": 21\n                    }\n                ]\n            },\n            \"childPurchaseItems\": [],\n            \"quantity\": 1\n        }\n    ],\n    \"details\": {\n        \"totalAmount\": 100,\n        \"taxAmount\": 17.36,\n        \"taxes\": [\n            {\n                \"taxAmount\": 17.36,\n                \"taxRate\": {\n                    \"name\": \"Service\",\n                    \"rate\": 21\n                }\n            }\n        ]\n    }\n}"},{"id":"103136cd-0c25-46eb-a92b-df3868aa1a99","name":"Create a purchase: Split payment with two types of payment. ","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"appointmentId\": \"{{appointment-id}}\",\n      \"price\": 90,\n      \"staffId\": \"{{staff-id}}\"\n    }\n  ],\n  \"number\": \"asdf1563afe5d5asdf\",\n  \"payments\": [\n    {\n      \"amount\": 45,\n      \"type\": \"CASH\"\n    },\n    {\n      \"amount\": 45,\n      \"type\": \"CREDIT\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Tue, 03 Sep 2019 11:24:00 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"transfer-encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"purchaseId\": \"_2FGnpqjsXpybsMnOUDl4g\",\n    \"number\": \"asdf1563afe5d5asdf\",\n    \"transactionNumber\": \"3564\",\n    \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n    \"payments\": [\n        {\n            \"paymentId\": \"QKafM5rSffth_xo7O3-c6w\",\n            \"type\": \"CASH\",\n            \"amount\": 45\n        },\n        {\n            \"paymentId\": \"cp4y-6HUBpMxCXu6i_vK9w\",\n            \"type\": \"CREDIT\",\n            \"amount\": 45\n        }\n    ],\n    \"items\": [\n        {\n            \"purchaseItemId\": \"weQYs3KES1eMDvumifT_Mw\",\n            \"description\": \"Blowout\",\n            \"price\": 90,\n            \"staffId\": \"vBzH1k0wppeP93_SxRr-7g\",\n            \"details\": {\n                \"totalAmount\": 90,\n                \"taxAmount\": 0,\n                \"taxIncluded\": false,\n                \"taxRates\": [\n                    {\n                        \"name\": \"Service 0\",\n                        \"rate\": 0\n                    }\n                ]\n            },\n            \"childPurchaseItems\": [],\n            \"quantity\": 1\n        }\n    ],\n    \"details\": {\n        \"totalAmount\": 90,\n        \"taxAmount\": 0,\n        \"taxes\": [\n            {\n                \"taxAmount\": 0,\n                \"taxRate\": {\n                    \"name\": \"Service 0\",\n                    \"rate\": 0\n                }\n            }\n        ]\n    }\n}"},{"id":"23ccd587-40e0-4284-b448-14802ce19c20","name":"Create a purchase: Pay with a custom payment Type.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"appointmentId\": \"{{appointment-id}}\",\n      \"price\": 90,\n      \"staffId\": \"{{staff-id}}\"\n    }\n  ],\n  \"number\": \"asdf1563afe5848sdf\",\n  \"payments\": [\n    {\n      \"amount\": 90,\n      \"customPaymentTypeId\": \"RCq7f3ez5JC2qxGlq434qQ\",\n      \"customTypeCode\": \"BA\",\n      \"customTypeName\": \"BACON\",\n      \"type\": \"OTHER\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Wed, 04 Sep 2019 09:03:07 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"transfer-encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"purchaseId\": \"buVQ7HCqdtvDvP2q-6YSSw\",\n    \"number\": \"asdf1563afe5848sdf\",\n    \"transactionNumber\": \"3569\",\n    \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n    \"payments\": [\n        {\n            \"paymentId\": \"YrWoO_zKG4GaSp0A3Z8WUg\",\n            \"type\": \"OTHER\",\n            \"amount\": 90,\n            \"customTypeName\": \"BACON\",\n            \"customTypeCode\": \"BA\"\n        }\n    ],\n    \"items\": [\n        {\n            \"purchaseItemId\": \"uOPkZFzCc82AilqseO1taA\",\n            \"description\": \"Blowout\",\n            \"price\": 90,\n            \"staffId\": \"vBzH1k0wppeP93_SxRr-7g\",\n            \"details\": {\n                \"totalAmount\": 90,\n                \"taxAmount\": 0,\n                \"taxIncluded\": false,\n                \"taxRates\": [\n                    {\n                        \"name\": \"Service 0\",\n                        \"rate\": 0\n                    }\n                ]\n            },\n            \"childPurchaseItems\": [],\n            \"quantity\": 1\n        }\n    ],\n    \"details\": {\n        \"totalAmount\": 90,\n        \"taxAmount\": 0,\n        \"taxes\": [\n            {\n                \"taxAmount\": 0,\n                \"taxRate\": {\n                    \"name\": \"Service 0\",\n                    \"rate\": 0\n                }\n            }\n        ]\n    }\n}"},{"id":"2b8646bf-6ac4-4afe-b125-d84ba051c328","name":"Create a purchase with a taxrate for tax not included salon.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"courseId\": \"{{course-id}}\",\n      \"price\": 100,\n      \"staffId\": \"{{staff-id}}\",\n      \"taxRates\":[\n      \t{\n            \"name\": \"Service new\",\n            \"rate\": 20.0000\n      \t}\n      ]\n    }\n  ],\n  \"number\": \"asdf{{rand_number_5}}e5d3asdf\",\n  \"payments\": [\n    {\n      \"amount\": 120,\n      \"customPaymentTypeId\": \"RCq7f3ez5JC2qxGlq434qQ\",\n      \"customTypeCode\": \"CPT\",\n      \"customTypeName\": \"Custom payment customTypeName\",\n      \"paymentId\": \"uXguBGPZREMUxqeEgxIjlg\",\n      \"type\": \"CREDIT\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Tue, 21 Apr 2020 09:18:21 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Content-Length","value":"1418"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"purchaseId\": \"lR9mSx-paaYKoUVwC99W8A\",\n    \"number\": \"asdf15832e5d3asdf\",\n    \"transactionNumber\": \"5044\",\n    \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n    \"payments\": [\n        {\n            \"paymentId\": \"VfYi0t-k1ppHd6MSFM6h8A\",\n            \"type\": \"CREDIT\",\n            \"amount\": 120,\n            \"customTypeName\": \"BACON\",\n            \"customTypeCode\": \"BA\"\n        }\n    ],\n    \"items\": [\n        {\n            \"purchaseItemId\": \"7yH0MFFy6PGcpMy3MxGA5Q\",\n            \"description\": \"course\",\n            \"price\": 100,\n            \"courseId\": \"9ju3jb33zsEfi1InAp5dsA\",\n            \"staffId\": \"mWkA6EjdLDyTGL7APWsPxw\",\n            \"details\": {\n                \"totalAmount\": 100,\n                \"taxAmount\": 20,\n                \"taxIncluded\": false,\n                \"taxRates\": []\n            },\n            \"childPurchaseItems\": [\n                {\n                    \"purchaseItemId\": \"XzVBZ3p9wn445lEHA2G7yw\",\n                    \"description\": \"course - Shoulder Length Color\",\n                    \"price\": 100,\n                    \"staffId\": \"mWkA6EjdLDyTGL7APWsPxw\",\n                    \"details\": {\n                        \"totalAmount\": 100,\n                        \"taxAmount\": 20,\n                        \"taxIncluded\": false,\n                        \"taxRates\": [\n                            {\n                                \"name\": \"Service new\",\n                                \"rate\": 20\n                            }\n                        ]\n                    },\n                    \"childPurchaseItems\": [],\n                    \"quantity\": 1\n                }\n            ],\n            \"quantity\": 1\n        }\n    ],\n    \"details\": {\n        \"totalAmount\": 100,\n        \"taxAmount\": 20,\n        \"changeAmount\": 0,\n        \"taxes\": [\n            {\n                \"taxAmount\": 20,\n                \"taxRate\": {\n                    \"name\": \"Service new\",\n                    \"rate\": 20\n                }\n            }\n        ]\n    }\n}"},{"id":"5192a85f-aa5c-4f21-be0e-bf0117c4af89","name":"Create a purchase: 400 Response when the request body is empty with message about the required elements.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Date","value":"Tue, 03 Sep 2019 11:12:17 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Content-Length","value":"167"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"statusCode\": 400,\n    \"id\": \"d14a367b-c7aa-44e7-a4e2-cbd7f978cf7c\",\n    \"detail\": \"items size must be between 1 and 2147483647,number may not be empty,clientId may not be empty\"\n}"},{"id":"5dacfe06-d900-4b03-ad6a-889020d43950","name":"Create a purchase with tax not included.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"courseId\": \"{{course-id}}\",\n      \"price\": 100,\n      \"staffId\": \"{{staff-id}}\",\n      \"taxRates\": [\n      \t{\n      \t\t\"taxId\": \"1234\",\n      \t\t\"name\" : \"testTax\",\n      \t\t\"rate\": 20\n      \t}\n      \t]\n    }\n  ],\n  \"number\": \"asdf{{rand_number_5}}e5d3asdf\",\n  \"payments\": [\n    {\n      \"amount\": 120,\n      \"customPaymentTypeId\": \"RCq7f3ez5JC2qxGlq434qQ\",\n      \"customTypeCode\": \"CPT\",\n      \"customTypeName\": \"Custom payment customTypeName\",\n      \"paymentId\": \"uXguBGPZREMUxqeEgxIjlg\",\n      \"type\": \"CREDIT\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Wed, 11 Mar 2020 14:32:36 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Content-Length","value":"1409"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"purchaseId\": \"436XRXF9NeT54wXzwrDXHw\",\n    \"number\": \"asdf17477e5d3asdf\",\n    \"transactionNumber\": \"4794\",\n    \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n    \"payments\": [\n        {\n            \"paymentId\": \"pmN2esUUHf5zRaXRyi4z5w\",\n            \"type\": \"CREDIT\",\n            \"amount\": 120,\n            \"customTypeName\": \"BACON\",\n            \"customTypeCode\": \"BA\"\n        }\n    ],\n    \"items\": [\n        {\n            \"purchaseItemId\": \"7qdw2OXYzREizRjwZbrFAA\",\n            \"description\": \"course\",\n            \"price\": 100,\n            \"courseId\": \"9ju3jb33zsEfi1InAp5dsA\",\n            \"staffId\": \"mWkA6EjdLDyTGL7APWsPxw\",\n            \"details\": {\n                \"totalAmount\": 100,\n                \"taxAmount\": 0,\n                \"taxIncluded\": false,\n                \"taxRates\": []\n            },\n            \"childPurchaseItems\": [\n                {\n                    \"purchaseItemId\": \"MDqWbrupA8tF13TbWhD9sQ\",\n                    \"description\": \"course - Shoulder Length Color\",\n                    \"price\": 100,\n                    \"staffId\": \"mWkA6EjdLDyTGL7APWsPxw\",\n                    \"details\": {\n                        \"totalAmount\": 100,\n                        \"taxAmount\": 20,\n                        \"taxIncluded\": false,\n                        \"taxRates\": [\n                            {\n                                \"name\": \"Service\",\n                                \"rate\": 20\n                            }\n                        ]\n                    },\n                    \"childPurchaseItems\": [],\n                    \"quantity\": 1\n                }\n            ],\n            \"quantity\": 1\n        }\n    ],\n    \"details\": {\n        \"totalAmount\": 100,\n        \"taxAmount\": 20,\n        \"changeAmount\": 0,\n        \"taxes\": [\n            {\n                \"taxAmount\": 20,\n                \"taxRate\": {\n                    \"name\": \"Service\",\n                    \"rate\": 20\n                }\n            }\n        ]\n    }\n}"},{"id":"c2592676-3dd8-48f2-82cb-caff08500c06","name":"Create a purchase: Use an invalid payment type.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"appointmentId\": \"{{appointment2-id}}\",\n      \"price\": 90,\n      \"staffId\": \"{{staff-id}}\"\n    }\n  ],\n  \"number\": \"asdf1585afe5d5asdf\",\n  \"payments\": [\n    {\n      \"amount\": 90,\n      \"type\": \"invalid type\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Date","value":"Tue, 03 Sep 2019 11:37:56 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"transfer-encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"statusCode\": 400,\n    \"id\": \"60c9b07f-0322-468a-8791-5cf818426b2b\",\n    \"detail\": \"Invalid request\"\n}"},{"id":"f581553d-0ecf-472b-ae3d-8da7d4dfecf1","name":"Create a purchase: Minimum required for a successful request.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"appointmentId\": \"{{appointment-id}}\",\n      \"price\": 90,\n      \"staffId\": \"{{staff-id}}\"\n    }\n  ],\n  \"number\": \"asdf1563afe5d3asdf\",\n  \"payments\": [\n    {\n      \"amount\": 90,\n      \"type\": \"CREDIT\"\n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Tue, 03 Sep 2019 11:21:25 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"transfer-encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"purchaseId\": \"sxNIc1kWiVJsYkAT3PcSKw\",\n    \"number\": \"asdf1563afe5d3asdf\",\n    \"transactionNumber\": \"3563\",\n    \"clientId\": \"8CdZjpGPJz71sjLPT9ySLQ\",\n    \"payments\": [\n        {\n            \"paymentId\": \"6KSyoFI4gBkOaloGOpzkDA\",\n            \"type\": \"CREDIT\",\n            \"amount\": 90,\n            \"customTypeName\": \"BACON\",\n            \"customTypeCode\": \"BA\"\n        }\n    ],\n    \"items\": [\n        {\n            \"purchaseItemId\": \"Z3j9Om4FX18_l8z2wexMxw\",\n            \"description\": \"Blowout\",\n            \"price\": 90,\n            \"staffId\": \"vBzH1k0wppeP93_SxRr-7g\",\n            \"details\": {\n                \"totalAmount\": 90,\n                \"taxAmount\": 0,\n                \"taxIncluded\": false,\n                \"taxRates\": [\n                    {\n                        \"name\": \"Service 0\",\n                        \"rate\": 0\n                    }\n                ]\n            },\n            \"childPurchaseItems\": [],\n            \"quantity\": 1\n        }\n    ],\n    \"details\": {\n        \"totalAmount\": 90,\n        \"taxAmount\": 0,\n        \"taxes\": [\n            {\n                \"taxAmount\": 0,\n                \"taxRate\": {\n                    \"name\": \"Service 0\",\n                    \"rate\": 0\n                }\n            }\n        ]\n    }\n}"},{"id":"f844d436-e895-4400-824a-a14af86c8177","name":"Create a purchase: Payments do not equal cost of purchase.","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientId\": \"{{client-id}}\",\n  \"items\": [\n    {\n      \"appointmentId\": \"{{appointment2-id}}\",\n      \"price\": 90,\n      \"staffId\": \"{{staff-id}}\"\n    }\n  ],\n  \"number\": \"asdf1585afe5d5asdf\",\n  \"payments\": [\n    {\n      \"amount\": 70,\n      \"type\": \"CASH\"\n      \n    }\n  ]\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/purchase"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Date","value":"Tue, 03 Sep 2019 11:53:21 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"transfer-encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"statusCode\": 400,\n    \"id\": \"b1be1886-d9fc-488c-a176-af26de4bbfca\",\n    \"detail\": \"Purchase invalid: The total payment amount 70 does not equal the total cost of the items purchased 90\"\n}"}]},{"name":"Get List of Vouchers for Business","_postman_id":"bc79c08e-abd0-46cf-a521-122d1e11bfdb","request":{"method":"GET","header":[],"url":{"raw":"{{third-party-api}}/api/business/{{business}}/voucher?","host":["{{third-party-api}}"],"path":["api","business","{{business}}","voucher"],"query":[{"key":"serialNumber","value":"40063","disabled":true},{"key":"clientId","value":"T0fV-T9DTWb3HxfbWWUkxA","disabled":true}]}},"response":[{"id":"30563e14-1211-435e-a7af-80507f171a14","name":"Get List of Vouchers for Business: Get all vouchers for a business.","originalRequest":{"method":"GET","header":[],"url":"{{third-party-api}}/api/business/{{business}}/voucher"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Wed, 04 Sep 2019 10:07:23 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Content-Length","value":"6775"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"_embedded\": {\n        \"vouchers\": [\n            {\n                \"voucherId\": \"MpbevxTUvMFy86oi_AqFKw\",\n                \"serialNumber\": \"40065\",\n                \"issueDate\": \"2019-08-29T09:43:28.000Z\",\n                \"expiryDate\": \"2021-05-29T09:43:28.000Z\",\n                \"creatingBranchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 28\n            },\n            {\n                \"voucherId\": \"Dz5ht9G4ausnYRAZuBFjPA\",\n                \"serialNumber\": \"40064\",\n                \"issueDate\": \"2019-05-21T10:59:48.000Z\",\n                \"expiryDate\": \"2021-02-21T11:59:48.000Z\",\n                \"clientId\": \"SGIcAS9iUjzV52-2TpXfnQ\",\n                \"creatingBranchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 60\n            },\n            {\n                \"voucherId\": \"OxQ1q0vl1aFdtCINxNx9OQ\",\n                \"serialNumber\": \"40063\",\n                \"issueDate\": \"2019-05-20T16:12:36.000Z\",\n                \"expiryDate\": \"2021-02-20T17:12:36.000Z\",\n                \"clientId\": \"D2kdRvFS0Ku2oTI9XC0v1A\",\n                \"creatingBranchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 100\n            },\n            {\n                \"voucherId\": \"WXiWDgFrmkHyyCxd4H4p_w\",\n                \"serialNumber\": \"40061\",\n                \"issueDate\": \"2019-05-16T15:16:56.000Z\",\n                \"expiryDate\": \"2021-02-16T16:16:56.000Z\",\n                \"clientId\": \"VTbuQKXe0AvyB34OHMQS-w\",\n                \"creatingBranchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"originalBalance\": 200,\n                \"remainingBalance\": 26\n            },\n            {\n                \"voucherId\": \"XX46ZvQSjS2wc2unJ2HtDg\",\n                \"serialNumber\": \"40059\",\n                \"issueDate\": \"2019-05-16T14:54:05.000Z\",\n                \"expiryDate\": \"2021-02-16T15:54:05.000Z\",\n                \"clientId\": \"T0fV-T9DTWb3HxfbWWUkxA\",\n                \"creatingBranchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 100\n            },\n            {\n                \"voucherId\": \"m3dB4glprvYEKe-JF3KOgg\",\n                \"serialNumber\": \"40058\",\n                \"issueDate\": \"2019-05-16T13:46:22.000Z\",\n                \"expiryDate\": \"2021-02-16T14:46:22.000Z\",\n                \"clientId\": \"kb5bhMchT7w9n74N2X1klw\",\n                \"creatingBranchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 0.04\n            },\n            {\n                \"voucherId\": \"A5ABg0pk-QPVpG7wKjQE3w\",\n                \"serialNumber\": \"60051\",\n                \"issueDate\": \"2019-05-09T11:25:08.000Z\",\n                \"expiryDate\": \"2021-02-09T12:25:08.000Z\",\n                \"clientId\": \"lnDRdv9Ec3GQq0QpuUJjZw\",\n                \"creatingBranchId\": \"LofVVHYrbIPBAphHAjR8ew\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 0.04\n            },\n            {\n                \"voucherId\": \"o1GMFxmjzauY8InF0Pu9ZA\",\n                \"serialNumber\": \"40057\",\n                \"issueDate\": \"2019-05-09T10:58:14.000Z\",\n                \"expiryDate\": \"2021-02-09T11:58:14.000Z\",\n                \"clientId\": \"HKk8Fj8U6dPrwemlScIsxA\",\n                \"creatingBranchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 0.04\n            },\n            {\n                \"voucherId\": \"xQnutw4LhFbTYVLRKfv9XQ\",\n                \"serialNumber\": \"40056\",\n                \"issueDate\": \"2019-05-09T10:56:05.000Z\",\n                \"expiryDate\": \"2021-02-09T11:56:05.000Z\",\n                \"clientId\": \"p0fGyH1H3Lqx-RXlng8BOg\",\n                \"creatingBranchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 100\n            },\n            {\n                \"voucherId\": \"1y-bQELuzSomIF4lL7GVTg\",\n                \"serialNumber\": \"40053\",\n                \"issueDate\": \"2019-05-07T16:16:44.000Z\",\n                \"expiryDate\": \"2021-02-07T17:16:44.000Z\",\n                \"clientId\": \"uh767rwakuCqXl3xeT_-xg\",\n                \"creatingBranchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"originalBalance\": 150,\n                \"remainingBalance\": 150\n            },\n            {\n                \"voucherId\": \"jHvNOLRzaQjKqctEUWNVNg\",\n                \"serialNumber\": \"40052\",\n                \"issueDate\": \"2019-05-07T16:13:21.000Z\",\n                \"expiryDate\": \"2021-02-07T17:13:21.000Z\",\n                \"clientId\": \"uh767rwakuCqXl3xeT_-xg\",\n                \"creatingBranchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"originalBalance\": 150,\n                \"remainingBalance\": 150\n            },\n            {\n                \"voucherId\": \"10VVv_fSWQo7pOzXKXxcAA\",\n                \"serialNumber\": \"40051\",\n                \"issueDate\": \"2019-05-07T15:36:43.000Z\",\n                \"expiryDate\": \"2021-02-07T16:36:43.000Z\",\n                \"clientId\": \"uh767rwakuCqXl3xeT_-xg\",\n                \"creatingBranchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 100\n            },\n            {\n                \"voucherId\": \"--uW6qiJUf-cBY92PvqFyQ\",\n                \"serialNumber\": \"40050\",\n                \"issueDate\": \"2019-05-07T15:04:34.000Z\",\n                \"expiryDate\": \"2021-02-07T16:04:34.000Z\",\n                \"clientId\": \"tR6DYvOPBkP43ID32BoAtA\",\n                \"creatingBranchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 100\n            },\n            {\n                \"voucherId\": \"y4HCmE8E3AAVDGAdyewK9w\",\n                \"serialNumber\": \"60047\",\n                \"issueDate\": \"2019-05-02T15:29:13.000Z\",\n                \"expiryDate\": \"2021-02-02T16:29:13.000Z\",\n                \"creatingBranchId\": \"LofVVHYrbIPBAphHAjR8ew\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 100\n            },\n            {\n                \"voucherId\": \"XbxTGElaK81UCjtPxBjf-g\",\n                \"serialNumber\": \"60045\",\n                \"issueDate\": \"2019-05-02T11:00:35.000Z\",\n                \"expiryDate\": \"2021-02-02T12:00:35.000Z\",\n                \"creatingBranchId\": \"LofVVHYrbIPBAphHAjR8ew\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 100\n            },\n            {\n                \"voucherId\": \"CUepjZ2rEUUWvxKN4z8u7g\",\n                \"serialNumber\": \"60041\",\n                \"issueDate\": \"2019-05-02T09:49:00.000Z\",\n                \"expiryDate\": \"2021-02-02T10:49:00.000Z\",\n                \"creatingBranchId\": \"LofVVHYrbIPBAphHAjR8ew\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 100\n            },\n            {\n                \"voucherId\": \"3jj0eg6xR8nLrY-EVeHxCA\",\n                \"serialNumber\": \"60040\",\n                \"issueDate\": \"2019-05-02T09:45:46.000Z\",\n                \"expiryDate\": \"2021-02-02T10:45:46.000Z\",\n                \"creatingBranchId\": \"LofVVHYrbIPBAphHAjR8ew\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 100\n            },\n            {\n                \"voucherId\": \"fFfxIYOAeW8iIaYWBqnVAA\",\n                \"serialNumber\": \"60038\",\n                \"issueDate\": \"2019-05-02T09:24:31.000Z\",\n                \"expiryDate\": \"2021-02-02T10:24:31.000Z\",\n                \"creatingBranchId\": \"LofVVHYrbIPBAphHAjR8ew\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 100\n            },\n            {\n                \"voucherId\": \"k7vl1C_bUmAvLmsRDLKwWg\",\n                \"serialNumber\": \"60037\",\n                \"issueDate\": \"2019-05-02T09:22:54.000Z\",\n                \"expiryDate\": \"2021-02-02T10:22:54.000Z\",\n                \"creatingBranchId\": \"LofVVHYrbIPBAphHAjR8ew\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 100\n            },\n            {\n                \"voucherId\": \"s4gRuqOo2v7gUF96E6O_lQ\",\n                \"serialNumber\": \"60036\",\n                \"issueDate\": \"2018-05-23T21:28:35.000Z\",\n                \"expiryDate\": \"2019-05-23T21:28:35.000Z\",\n                \"creatingBranchId\": \"LofVVHYrbIPBAphHAjR8ew\",\n                \"originalBalance\": 55,\n                \"remainingBalance\": 31\n            }\n        ]\n    },\n    \"page\": {\n        \"size\": 20,\n        \"totalElements\": 158,\n        \"totalPages\": 8,\n        \"number\": 0\n    }\n}"},{"id":"bf17adff-ad4b-461f-a3a2-74b2b92dfc2d","name":"Get List of Vouchers for Business: Filter by client-id","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{third-party-api}}/api/business/{{business}}/voucher?clientId=T0fV-T9DTWb3HxfbWWUkxA","host":["{{third-party-api}}"],"path":["api","business","{{business}}","voucher"],"query":[{"key":"serialNumber","value":"40063","disabled":true},{"key":"clientId","value":"T0fV-T9DTWb3HxfbWWUkxA"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Wed, 04 Sep 2019 10:09:26 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Content-Length","value":"493"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"_embedded\": {\n        \"vouchers\": [\n            {\n                \"voucherId\": \"XX46ZvQSjS2wc2unJ2HtDg\",\n                \"serialNumber\": \"40059\",\n                \"issueDate\": \"2019-05-16T14:54:05.000Z\",\n                \"expiryDate\": \"2021-02-16T15:54:05.000Z\",\n                \"clientId\": \"T0fV-T9DTWb3HxfbWWUkxA\",\n                \"creatingBranchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 100\n            }\n        ]\n    },\n    \"page\": {\n        \"size\": 1,\n        \"totalElements\": 1,\n        \"totalPages\": 1,\n        \"number\": 0\n    }\n}"},{"id":"c21e3063-8a7d-497f-8d1f-51db02c20623","name":"Get List of Vouchers for Business: Filter by serial number","originalRequest":{"method":"GET","header":[],"url":{"raw":"{{third-party-api}}/api/business/{{business}}/voucher?serialNumber=40063","host":["{{third-party-api}}"],"path":["api","business","{{business}}","voucher"],"query":[{"key":"serialNumber","value":"40063"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Date","value":"Wed, 04 Sep 2019 10:08:20 GMT"},{"key":"Expires","value":"0"},{"key":"Pragma","value":"no-cache"},{"key":"X-Application-Context","value":"application:9780"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-Frame-Options","value":"DENY"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"Content-Length","value":"493"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"body":"{\n    \"_embedded\": {\n        \"vouchers\": [\n            {\n                \"voucherId\": \"OxQ1q0vl1aFdtCINxNx9OQ\",\n                \"serialNumber\": \"40063\",\n                \"issueDate\": \"2019-05-20T16:12:36.000Z\",\n                \"expiryDate\": \"2021-02-20T17:12:36.000Z\",\n                \"clientId\": \"D2kdRvFS0Ku2oTI9XC0v1A\",\n                \"creatingBranchId\": \"etPzfxGb0avGETcTqD9-2g\",\n                \"originalBalance\": 100,\n                \"remainingBalance\": 100\n            }\n        ]\n    },\n    \"page\": {\n        \"size\": 1,\n        \"totalElements\": 1,\n        \"totalPages\": 1,\n        \"number\": 0\n    }\n}"}]},{"name":"Update an appointment","_postman_id":"1837d321-4407-4824-9463-c6ea882442e3","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n        \"appointmentId\": \"{{appointment-id}}\",\n        \"version\": 1,\n        \"appointmentDate\": \"{{todays-date}}\",\n        \"startTime\": \"15:30:00.000\",\n        \"endTime\": \"16:00:00.000\",\n        \"staffId\": \"{{staff-id}}\",\n        \"clientId\": \"{{client-id}}\",\n        \"serviceId\": \"{{service-id}}\",\n        \"source\": \"THIRD_PARTY\"\n      }"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/appointment/{{appointment-id}}"},"response":[{"id":"e16cb4b7-af13-4df8-b1f1-2fb9d23d9dea","name":"Reschedule a reserved appointment.","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n        \"appointmentId\": \"{{appointment-id}}\",\n        \"version\": 1,\n        \"appointmentDate\": \"{{todays-date}}\",\n        \"startTime\": \"15:30:00.000\",\n        \"endTime\": \"16:00:00.000\",\n        \"staffId\": \"{{staff-id}}\",\n        \"clientId\": \"{{client-id}}\",\n        \"serviceId\": \"{{service-id}}\",\n        \"source\": \"THIRD_PARTY\"\n      }"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/appointment/{{appointment-id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Application-Context","value":"application:10180"},{"key":"Content-Type","value":"application/hal+json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Wed, 27 Nov 2019 14:42:55 GMT"}],"cookie":[],"body":"{\n    \"appointmentId\": \"thrCi3BV5Q98o364zDLkhQ\",\n    \"version\": 2,\n    \"appointmentDate\": \"2019-11-27\",\n    \"startTime\": \"15:30:00.000\",\n    \"endTime\": \"16:00:00.000\",\n    \"price\": 15,\n    \"staffRequest\": false,\n    \"staffId\": \"XwC_dE9fyD2YUYvJV0zmYQ\",\n    \"clientId\": \"iYDLKoLEeBvHan3RTrKjKA\",\n    \"serviceId\": \"LM5pKM5HD4quKM5MasI69A\",\n    \"state\": \"BOOKED\",\n    \"activationState\": \"RESERVED\",\n    \"depositDateTime\": \"2019-11-27T14:42:55.150Z\",\n    \"bookingId\": \"Q6YwFNeJO8EtsBcHcE5Pbg\",\n    \"source\": \"THIRD_PARTY\"\n}"}]},{"name":"Get appointment availability","_postman_id":"bb0dee1b-053c-461c-bc3e-d6f751a2f7c8","request":{"auth":{"type":"basic","basic":{"username":"{{basic-username}}","password":"{{basic-password}}","showPassword":false}},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n  \"clientServiceSelections\": [\n    {\n\t\t\"clientId\": \"\",\n      \"serviceSelections\": [\n        {\n          \"serviceId\": \"{{service-id}}\",\n          \"staffId\": \"{{staff-id}}\"\n        }\n      ]\n    }\n  ],\n  \"startTime\": \"{{todays-date}}T00:00:00.000Z\",\n  \"endTime\": \"{{next-months-date}}T00:00:00.000Z\"\n\n}"},"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/appointments/availability"},"response":[]},{"name":"Cancel Booking","_postman_id":"c10de4bb-65b4-4869-8dc7-90a5d9bb1919","request":{"method":"GET","header":[],"url":""},"response":[]},{"name":"Get a list of courses for a branch","_postman_id":"acc1f80d-d85e-4087-a50f-6277c055cc33","request":{"method":"GET","header":[],"url":""},"response":[]},{"name":"Get list of taxRates for a branch","_postman_id":"e25a62a7-a9ae-418c-8eb5-a058ee8c6d00","request":{"method":"GET","header":[],"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/taxrate"},"response":[]},{"name":"Get taxRate for branch with id","_postman_id":"bc63966a-e49e-4805-8207-d3a1d049dd3e","request":{"method":"GET","header":[],"url":"{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/taxrate/elMBlFthP__nRss3assoMg"},"response":[]}],"_postman_id":"469cb11f-9148-4f7f-80b0-cbe8b85c36fe","auth":{"type":"basic","basic":{"password":"","username":"global/"}},"event":[{"listen":"prerequest","script":{"id":"76014f3b-e652-4149-bce2-253e677715e3","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"8ff8a8e3-0c1b-4f4c-8696-4e8ca054085a","type":"text/javascript","exec":[""]}}]}],"auth":{"type":"basic","basic":{"password":"","username":"global/"}},"event":[{"listen":"prerequest","script":{"id":"63a12a00-2c8a-4cbf-b5f1-9b4d452851f3","type":"text/javascript","exec":["var today = new Date();","var dd = String(today.getDate()).padStart(2, '0');","var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!","var yyyy = today.getFullYear();","","today = yyyy + '-' + mm + '-' + dd;","","pm.globals.set(\"todays-date\", today);","","var tomorrow = new Date();","var dd = String(tomorrow.getDate() + 1).padStart(2, '0');","var mm = String((tomorrow.getMonth() + 1) ).padStart(2, '0'); //January is 0!","var yyyy = tomorrow.getFullYear();","","tomorrow = yyyy + '-' + mm + '-' + dd;","","pm.globals.set(\"tomorrows-date\", tomorrow);","","var tomorrow = new Date();","var dd = String(tomorrow.getDate()).padStart(2, '0');","var mm = String((tomorrow.getMonth() + 2) ).padStart(2, '0'); //January is 0!","var yyyy = tomorrow.getFullYear();","","tomorrow = yyyy + '-' + mm + '-' + dd;","","pm.globals.set(\"next-months-date\", tomorrow);"]}},{"listen":"test","script":{"id":"59828142-cb63-4307-9a8c-b54257e7040e","type":"text/javascript","exec":[""]}}],"variable":[{"id":"bb8fc8d1-93cf-4669-aae4-b67b9f090260","key":"client-id","value":"8CdZjpGPJz71sjLPT9ySLQ","type":"string"},{"id":"fa336f31-cf6a-44cc-91b1-700347857cc5","key":"service-id","value":"LM5pKM5HD4quKM5MasI69A","type":"string"},{"id":"e5e8edc1-c584-467b-8101-93631e458ef8","key":"staff-id","value":"vBzH1k0wppeP93_SxRr-7g","type":"string"},{"id":"69f59a39-8da4-4237-960d-28b419fc9d25","key":"third-party-api","value":"https://api-gateway-eu.phorest.com/third-party-api-server","type":"string"},{"id":"87d29265-c159-45c5-8156-389c98ca0006","key":"business","value":"ACAvGlJL4E-mJJWYtA0esw","type":"string"},{"id":"552c9dd6-2c7a-48ef-9cf7-f28f258a64e6","key":"branch","value":"etPzfxGb0avGETcTqD9-2g","type":"string"},{"id":"a65d680d-161d-48a6-aa73-04347ad2fe04","key":"voucher-id","value":"XX46ZvQSjS2wc2unJ2HtDg","type":"string"},{"id":"c6b7f04a-78a2-4d8a-97af-ab45f619e077","key":"course-id","value":"9ju3jb33zsEfi1InAp5dsA","type":"string"}]}