{"info":{"_postman_id":"d2e5c160-268a-481b-9d36-756e87f95d3e","name":"Energylinx Supplier API Documentation","description":"<html><head></head><body><p>See below for our supplier-facing Energylinx API endpoints.</p>\n<h1 id=\"endpoints\">Endpoints</h1>\n<p>For all URLs referenced in this documentation, please substitute {{host}} and {{auth_host}} with the relevant hostnames below, depending on the environment you are accessing (sandbox or production).</p>\n<h2 id=\"production\">Production</h2>\n<p><code>{{ auth_host }}</code> = <a href=\"https://auth.prod.energylinx.com\">https://auth.prod.energylinx.com</a></p>\n<p><code>{{ host }}</code> = <a href=\"https://api.prod.energylinx.com\">https://api.prod.energylinx.com</a></p>\n<h2 id=\"sandbox\">Sandbox</h2>\n<p><code>{{ auth_host }}</code> = <a href=\"https://auth.sandbox.energylinx.com\">https://auth.sandbox.energylinx.com</a></p>\n<p><code>{{ host }}</code> = <a href=\"https://api.sandbox.energylinx.com\">https://api.sandbox.energylinx.com</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Endpoints","slug":"endpoints"}],"owner":"13858860","collectionId":"d2e5c160-268a-481b-9d36-756e87f95d3e","publishedId":"TzmCfsDR","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-07-21T14:42:48.000Z"},"item":[{"name":"Switch Status API v1","item":[{"name":"Auth","event":[{"listen":"test","script":{"id":"f2f352d1-1f29-4d66-a7b6-5c89e346c5cc","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","pm.test(\"access_token is present\", function () {","    pm.expect(pm.response.text()).to.include(\"access_token\");","});","var response =  pm.response.json();","pm.environment.set(\"acl_token\", response.access_token);","console.log(pm.environment);"],"type":"text/javascript"}}],"id":"5d615cb1-ba90-492e-94bd-32adfaa01fed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"},{"key":"Authorization","value":"Basic {{base64-encoded-app-client-id:app-client-secret}}","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{auth_host}}/oauth2/token?grant_type=client_credentials","description":"<p>Supply your App Client ID and App Client Secret in the request header, in \"Basic Auth\" format. You will then receive a temporary token for use in calling our API's. The token will expire after 60 minutes.</p>\n<h2 id=\"request-and-response\">Request and Response:</h2>\n<p>See sample request and response at right.</p>\n","urlObject":{"path":["oauth2","token"],"host":["{{auth_host}}"],"query":[{"key":"grant_type","value":"client_credentials"}],"variable":[]}},"response":[{"id":"cb3bc1f0-e170-4d04-a607-d56503ea724e","name":"Auth","originalRequest":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"},{"key":"Authorization","value":"Basic {{base64-encoded-app-client-id:app-client-secret}}","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":{"raw":"{{auth_host}}/oauth2/token?grant_type=client_credentials","host":["{{auth_host}}"],"path":["oauth2","token"],"query":[{"key":"grant_type","value":"client_credentials"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"{{acl_token}}\",\n    \"expires_in\": 3600,\n    \"token_type\": \"Bearer\"\n}"}],"_postman_id":"5d615cb1-ba90-492e-94bd-32adfaa01fed"},{"name":"/switch-status/status/{signupId}","event":[{"listen":"prerequest","script":{"id":"8d723536-c781-4116-9995-09c402730ff8","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"ffd6dfed-052e-4d70-a7f0-7f81d3e6da23","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});",""],"type":"text/javascript"}}],"id":"ef73a46f-03f9-4f99-beea-81e7e8d11a7b","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"content-type":true}},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"{{acl_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{host}}/switch-status/v1/status/4370796","description":"<p>Supply an energy switch <code>{signupId}</code>, to obtain status information about the electric and/or gas components of that switch.</p>\n<h2 id=\"request\">Request:</h2>\n<p>Provide a <code>signupId</code> at the end of the URL via GET request. Also supply an <code>Authorization</code> header containing your temporary token.</p>\n<h2 id=\"response\">Response:</h2>\n<p>On success, returns HTTP code 200 with a payload comprising of the following fields:</p>\n<ul>\n<li><strong>data:</strong> <ul>\n<li><strong>type:</strong> will always be \"switch-status\"</li>\n<li><strong>id:</strong> signupId</li>\n<li><strong>attributes:</strong> details of the switch's status<ul>\n<li><strong>id:</strong> signupId</li>\n<li><strong>supply:</strong> holds the status of up to two fuels (elec and/or gas)<ul>\n<li><strong>elec:</strong> electricity portion of an elec-only or dual-fuel switch<ul>\n<li><strong>supplierCode:</strong> 10-character identifier for supplier customer switched to</li>\n<li><strong>status:</strong> status of the switch</li>\n<li><strong>statusReason:</strong> optional reason for the status change, from a list of predetermined reason strings</li>\n<li><strong>statusReasonJson:</strong> schemaless JSON structure optionally containing some details of recent status changes</li>\n<li><strong>statusTimestamp:</strong> date of last status change</li>\n</ul>\n</li>\n<li><strong>gas:</strong> gas portion of a gas-only or dual-fuel switch<ul>\n<li><strong>supplierCode:</strong> 10-character identifier for supplier customer switched to</li>\n<li><strong>status:</strong> status of the switch</li>\n<li><strong>statusReason:</strong> optional reason for the status change, from a list of predetermined reason strings</li>\n<li><strong>statusReasonJson:</strong> schemaless JSON structure optionally containing some details of recent status changes</li>\n<li><strong>statusTimestamp:</strong> date of last status change</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<p>On error, returns HTTP status code and potentially an error payload:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"errors\": [\n        {\n            \"status\": {statusCode},\n            \"detail\": \"Freeform error description text\"\n        }\n    ]\n}\n</code></pre>","urlObject":{"path":["switch-status","v1","status","4370796"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[{"id":"20aec63a-52b5-4cac-b147-70e03cce0abc","name":"/switch-status/status/{signupId} - success","originalRequest":{"method":"GET","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"{{acl_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{host}}/switch-status/v1/status/4226704"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n  \"data\": {\n    \"type\": \"switch-status\",\n    \"id\": 4226704,\n    \"attributes\": {\n      \"id\": 4226704,\n      \"supply\": {\n        \"elec\": {\n          \"supplierCode\": \"SCOTTISH\",\n          \"status\": \"cancelled-by-supplier\",\n          \"statusReason\": \"business-meter\",                 \n          \"statusReasonJson\": {\n            \"notes\": \"some string\"\n          },\n          \"statusTimestamp\": \"2021-07-09T23:16:38.000Z\"\n        },\n        \"gas\": {\n          \"supplierCode\": \"SCOTTISH\",\n          \"status\": \"cancelled-by-supplier\",\n          \"statusReason\": \"rejection-other\",\n          \"statusReasonJson\": {\n            \"2021-07-07 12:43:13\": {\n              \"id\": 4226704,\n              \"supplierTransactionId\": \"some-id\",\n              \"supply\": {\n                \"elec\": {\n                  \"status\": \"registration-rejected\",\n                  \"statusReason\": \"rejection-other\"\n                  \"response\": {\n                    \"transactionId\": \"ELX-4226704\",\n                    \"response\": {\n                      \"status\": 400\n                      \"message\": \"Request failed with status code 400\",\n                      \"errorDetails\": {\n                        \"detail\": {\n                          \"electricity_meter_points\": [\n                            {\n                              \"tariff_code\": [\n                                \"No tariff found matching E-3R-Tariff_3_Year_v3-E.\"\n                              ]\n                            }\n                          ]\n                        }\n                      },\n                    }\n                  },\n                }\n              }\n            }\n          },\n          \"statusTimestamp\": \"2021-07-09T23:16:38.000Z\"\n        }\n      }\n    }\n  }\n}"},{"id":"58792642-0346-46e4-bec7-041645890f03","name":"/switch-status/status/{signupId} - error","originalRequest":{"method":"GET","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"{{acl_token}}"}],"body":{"mode":"raw","raw":""},"url":"{{host}}/switch-status/v1/status/123"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"errors\": [\n        {\n            \"status\": 404,\n            \"detail\": \"The switch ID specified in your request is not found in our records.\"\n        }\n    ]\n}"}],"_postman_id":"ef73a46f-03f9-4f99-beea-81e7e8d11a7b"},{"name":"/switch-status/status","event":[{"listen":"prerequest","script":{"id":"fbdef60a-b77b-4081-8a3e-9268c05b1a45","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"39229f03-b0ff-4fe9-aef6-2ff6bfe4488f","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});",""],"type":"text/javascript"}}],"id":"807689ac-5d49-4af2-85db-3778cc5c63cc","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"content-type":true}},"request":{"auth":{"type":"noauth","isInherited":false},"method":"PATCH","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"{{acl_token}}"}],"body":{"mode":"raw","raw":"{\n    \"id\": 4226018,\n    \"supply\": {\n        \"elec\": {\n            \"status\": \"cancelled-by-supplier\",\n            \"statusReason\": \"business-meter\",\n            \"statusReasonNotes\": \"freeform text\"\n        },\n        \"gas\": {\n            \"status\": \"cancelled-by-supplier\",\n            \"statusReason\": \"meter-issue-other\"\n        }\n    }\n}"},"url":"{{host}}/switch-status/v1/status","description":"<p>Provide a new status to update a switch to. Status information is supplied for up to two fuels (electricity and gas) per switch signupId.</p>\n<p>The PATCH request is validated and then queued for later processing, so you will receive a 202 HTTP code on success.</p>\n<h2 id=\"status-validation-rules\">\"Status\" Validation Rules</h2>\n<p>This PATCH update endpoint supports changing a switch to any of these statuses:</p>\n<p><code>registration-accepted</code></p>\n<p><code>cancelled-by-supplier</code></p>\n<p><code>erroneous-transfer</code></p>\n<p>The following are the only allowable statuses that can precede the three statuses aboove:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Preceding Status</th>\n<th>Allowable New Status via PATCH Update Endpoint</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>application-exported</code></td>\n<td><code>registration-accepted</code></td>\n</tr>\n<tr>\n<td><code>registration-rejected</code></td>\n<td><code>registration-accepted</code></td>\n</tr>\n<tr>\n<td><code>cancelled-by-supplier</code></td>\n<td><code>registration-accepted</code></td>\n</tr>\n<tr>\n<td><code>erroneous-transfer</code></td>\n<td><code>registration-accepted</code></td>\n</tr>\n<tr>\n<td><code>application-exported</code></td>\n<td><code>cancelled-by-supplier</code></td>\n</tr>\n<tr>\n<td><code>registration-accepted</code></td>\n<td><code>cancelled-by-supplier</code></td>\n</tr>\n<tr>\n<td><code>registration-rejected</code></td>\n<td><code>cancelled-by-supplier</code></td>\n</tr>\n<tr>\n<td><code>erroneous-transfer</code></td>\n<td><code>cancelled-by-supplier</code></td>\n</tr>\n<tr>\n<td><code>supplier-invoiced</code></td>\n<td><code>cancelled-by-supplier</code></td>\n</tr>\n<tr>\n<td><code>commission-paid-by-supplier</code></td>\n<td><code>cancelled-by-supplier</code></td>\n</tr>\n<tr>\n<td><code>cancelled-direct-by-customer</code></td>\n<td><code>cancelled-by-supplier</code></td>\n</tr>\n<tr>\n<td><code>application-exported</code></td>\n<td><code>erroneous-transfer</code></td>\n</tr>\n<tr>\n<td><code>registration-accepted</code></td>\n<td><code>erroneous-transfer</code></td>\n</tr>\n<tr>\n<td><code>registration-rejected</code></td>\n<td><code>erroneous-transfer</code></td>\n</tr>\n<tr>\n<td><code>cancelled-by-supplier</code></td>\n<td><code>erroneous-transfer</code></td>\n</tr>\n<tr>\n<td><code>supplier-invoiced</code></td>\n<td><code>erroneous-transfer</code></td>\n</tr>\n<tr>\n<td><code>commission-paid-by-supplier</code></td>\n<td><code>erroneous-transfer</code></td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"status-reason-validation-rules\">\"Status Reason\" Validation Rules</h2>\n<p>The PATCH endpoint encourages you to provide a statusReason to accompany each status. The statusReason must be chosen from the list below or can be left blank.</p>\n<h3 id=\"objections-raised-by-previous-supplier\">Objections raised by previous supplier</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>status</th>\n<th>statusReason value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>debt</td>\n<td>Customer is in debt with previous supplier which has caused previous supplier to raise objection</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>switch-already-in-place</td>\n<td>Customer already had a switch in progress causing an automatic objection to be raised</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>empty-occupier-account</td>\n<td>Customer moved into property but hasn't signed up with supplier at property causing objection</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>ongoing-meter-reading-dispute</td>\n<td>Customer has ongoing meter reading dispute with current supplier causing an objection to be raised</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>objection-other</td>\n<td>Other reason for objection being raised or if reason is unknown</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"meter-related-cancellations\">Meter-related cancellations</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>status</th>\n<th>statusReason value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>incorrect-mpan</td>\n<td>The MPAN provided does not exist</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>incorrect-mprn</td>\n<td>The MPRN provided does not exist</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>incorrect-mpas</td>\n<td>The MPAN/MPRN provided does not exist</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>mpan-address-mismatch</td>\n<td>The MPAN provided does not match the address</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>mprn-address-mismatch</td>\n<td>The MPRN provided does not match the address</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>mpas-address-mismatch</td>\n<td>The MPAN/MPRN provided does not match the address</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>business-meter</td>\n<td>The MPAS provided is for a business meter</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>meter-technical-details-wrong</td>\n<td>The Meter Technical Details are unprovided/do not match the tariff in question</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>de-energised-meter</td>\n<td>The MPAS provided is for a de-energised meter</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>new-connection</td>\n<td>The MPAS provided is for a new connection</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>economy-7-mismatch</td>\n<td>Economy 7 MPAS is switching to a non-economy 7 tariff and viceversa</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>related-meter</td>\n<td>The customer has a related meter but we have only sent over one MPAN</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>payment-method-mismatch</td>\n<td>The customer is PPM but is applying for a credit tariff or vice versa</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>smets1-prepayment-issue</td>\n<td>The customer has a smart PPM meter which will switch to MDD upon switch</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>incompatible-meter-type</td>\n<td>The customers meter type does not match the tariff selected</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>meter-issue-other</td>\n<td>Other reason for meter being rejected</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"any-other-reasons-for-cancellation\">Any other reasons for cancellation</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>status</th>\n<th>statusReason value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>switch-not-in-renewal-period</td>\n<td>Customer is outside their renewal period</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>failed-credit-check</td>\n<td>Customer has failed credit check</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>tariff-no-longer-available</td>\n<td>Tariff requested is no longer available</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>application-not-received</td>\n<td>Application file not received</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>already-on-supply-with-us</td>\n<td>Property is already on supply with supplier</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>other</td>\n<td>Other reason not including objection or meter issue</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>duplicate</td>\n<td>Multiple switches for the same property</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>disengaged-switcher</td>\n<td>Customer has forgotten setting up the switch</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>customer-no-longer-with-us</td>\n<td>Customer switched on Retention Deal is not with same supplier</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>fraud</td>\n<td>Customer switch was fraudulent</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"any-customer-cancellation-related-reasons\">Any customer cancellation related reasons</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>status</th>\n<th>statusReason value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>direct-debit-too-high</td>\n<td>Customer cancelled switch as the direct debit was too high</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>meter-issues</td>\n<td>Customer cancelled switch due to meter issues they reported</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>already-switched</td>\n<td>Customer cancelled switch due to having recently switched themselves</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>exit-fees</td>\n<td>Customer cancelled switch due to being liable for exit fees</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>staying-with-current-supplier</td>\n<td>Customer cancelled switch as they would like to stay with current supplier</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>unsure-of-new-supplier</td>\n<td>Customer cancelled switch due to reservations about the new supplier</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>cancellation-confirmed-by-supplier</td>\n<td>Supplier acknowledged customer cancellation</td>\n</tr>\n<tr>\n<td>cancelled-by-supplier</td>\n<td>customer-cancellation-other</td>\n<td>Customer cancelled due to other reason or if reason is unknown</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"erroneous-transfer-related-reasons\">Erroneous Transfer related reasons</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>status</th>\n<th>statusReason value</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>erroneous-transfer</td>\n<td>fraud</td>\n<td>Customer switch was fraudulent. Suspected or confirmed</td>\n</tr>\n<tr>\n<td>erroneous-transfer</td>\n<td>incorrect-mpan</td>\n<td>The MPAN provided does not exist</td>\n</tr>\n<tr>\n<td>erroneous-transfer</td>\n<td>incorrect-mprn</td>\n<td>The MPRN provided does not exist</td>\n</tr>\n<tr>\n<td>erroneous-transfer</td>\n<td>incorrect-mpas</td>\n<td>The MPAN/MPRN provided does not exist</td>\n</tr>\n<tr>\n<td>erroneous-transfer</td>\n<td>mpan-address-mismatch</td>\n<td>The MPAN provided does not match the address</td>\n</tr>\n<tr>\n<td>erroneous-transfer</td>\n<td>mprn-address-mismatch</td>\n<td>The MPRN provided does not match the address</td>\n</tr>\n<tr>\n<td>erroneous-transfer</td>\n<td>mpas-address-mismatch</td>\n<td>The MPAN/MPRN provided does not match the address</td>\n</tr>\n<tr>\n<td>erroneous-transfer</td>\n<td>customer-did-not-sign-up</td>\n<td>Customer did not sign up to switching service</td>\n</tr>\n<tr>\n<td>erroneous-transfer</td>\n<td>other</td>\n<td>System error</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"request\">Request:</h2>\n<p>Send a PATCH request payload as shown in example below. Also supply an <code>Authorization</code> header containing your temporary token.</p>\n<p>Payload description:</p>\n<ul>\n<li><strong>id:</strong> signupId</li>\n<li><strong>supply</strong><ul>\n<li><strong>elec:</strong> electricity portion of an elec-only or dual-fuel switch<ul>\n<li><strong>status:</strong> new status to update the switch to</li>\n<li><strong>statusReason:</strong> optional reason for the status change; chosen from a list of predetermined reason strings</li>\n<li><strong>statusReasonNotes:</strong> optional free-form details you would like to provide about this status change</li>\n<li><strong>supplyStartDate:</strong> optional. The date in format YYYY-MM-DD. Can be set only with registration-accepted status</li>\n<li><strong>supplyEndDate:</strong> optional. The date in format YYYY-MM-DD. Can be set only with registration-accepted status</li>\n</ul>\n</li>\n<li><strong>gas:</strong> gas portion of a gas-only or dual-fuel switch<ul>\n<li><strong>status:</strong> new status to update the switch to</li>\n<li><strong>statusReason:</strong> optional reason for the status change; chosen from a list of predetermined reason strings</li>\n<li><strong>statusReasonNotes:</strong> optional free-form details you would like to provide about this status change</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<h2 id=\"response\">Response:</h2>\n<p>On success, returns empty payload with HTTP code 202.</p>\n<p>On error, returns HTTP status code and potentially an error payload:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"errors\": [\n    {\n      \"status\": {statusCode},\n      \"detail\": \"Freeform error description text\"\n    }\n  ]\n}\n</code></pre>","urlObject":{"path":["switch-status","v1","status"],"host":["{{host}}"],"query":[],"variable":[]}},"response":[{"id":"b318427a-db21-4261-9660-621442e4102b","name":"/switch-status/status - validation error","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","type":"text","value":"{{acl_token}}"}],"body":{"mode":"raw","raw":"{\n    \"id\": 4226018,\n    \"supply\": {\n        \"elec\": {\n            \"status\": \"cancelled-by-supplier\",\n            \"statusReason\": \"business-meter\",\n            \"statusReasonNotes\": \"freeform text\"\n        },\n        \"gas\": {\n            \"status\": \"cancelled-by-supplier\",\n            \"statusReason\": \"meter-issue-other\"\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/switch-status/v1/status - invalid status change"},"status":"Unprocessable Entity (WebDAV) (RFC 4918)","code":422,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n  \"errors\": [\n    {\n      \"status\": 422,\n      \"detail\": \"This status code change is invalid (elec: cancelled-by-supplier => cancelled-by-supplier)\"\n    }\n  ]\n}"},{"id":"d925f345-8ce1-45ad-983d-70d278ee056b","name":"/switch-status/status - success","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","type":"text","value":"{{acl_token}}"}],"body":{"mode":"raw","raw":"{\n    \"id\": 4226018,\n    \"supply\": {\n        \"elec\": {\n            \"status\": \"cancelled-by-supplier\",\n            \"statusReason\": \"business-meter\",\n            \"statusReasonNotes\": \"freeform text\"\n        },\n        \"gas\": {\n            \"status\": \"cancelled-by-supplier\",\n            \"statusReason\": \"meter-issue-other\"\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{host}}/switch-status/v1/status"},"status":"Accepted","code":202,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{}"}],"_postman_id":"807689ac-5d49-4af2-85db-3778cc5c63cc"}],"id":"48a73a9f-89fd-4ae9-a68d-14930f5fedb2","description":"<h1 id=\"overview\">Overview</h1>\n<p>This concise API provides an energy supplier the ability to get or update the status information of any energy switch submitted to that supplier from Energylinx, using the switch's signupId.</p>\n<h1 id=\"authentication\">Authentication</h1>\n<p>We will provide you with an App Client ID and confidential App Client Secret for each of your product brand(s). Authentication is performed by calling an AWS Cognito OAuth endpoint with these credentials. This then provides a temporary token which can be used for subsequent calls to the API.</p>\n<h1 id=\"rate-limit\">Rate limit</h1>\n<p>Currently we have no defined rate limit for number of requests.</p>\n<h1 id=\"http-response-codes\">HTTP Response Codes</h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Response Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n</tr>\n<tr>\n<td>202</td>\n<td>Accepted (PATCH endpoint only: switch status update received, validated, and queued, but not yet acted upon)</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Not Authorized/Authenticated: authentication process has not succeeded</td>\n</tr>\n<tr>\n<td>404</td>\n<td>Not Found: switch signupId could not be found in Energylinx database or does not match your supplier brand</td>\n</tr>\n<tr>\n<td>422</td>\n<td>Unprocessable Entity: validation error</td>\n</tr>\n<tr>\n<td>500</td>\n<td>Internal Server Error</td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"list-of-switch-status-conditions\">List of Switch Status Conditions</h1>\n<p>Below are the potential statuses which can be present per fuel for any Energylinx switch (after the point it has been sent to the supplier).</p>\n<h2 id=\"switch-in-progress\">Switch in Progress</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>application-exported</code></td>\n<td>Application was exported to supplier via API or through nightly batch file and switch progress is now in the hands of the supplier. Most suppliers will send a welcome e-mail (or letter) within 5 days of receiving the switch, followed shortly with confirmation of the switch date.</td>\n</tr>\n<tr>\n<td><code>registration-accepted</code></td>\n<td>Application is in a pending state between application export and application success or failure; information was provided from the supplier that the switch has progressed, but is not necessarily complete and can still be cancelled; we may not get any further updates from the supplier until <code>commission-paid-by-supplier</code>.</td>\n</tr>\n<tr>\n<td><code>supplier-invoiced</code></td>\n<td>The supplier has been invoiced. The application is very likely to succeed but can still be cancelled by the supplier. This status can take several months to reach.</td>\n</tr>\n<tr>\n<td><code>commission-unpayable</code></td>\n<td>This status covers switches relating to insolvent suppliers, certain other bad debt categories and old switches that did not progress to completion.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"switch-successful\">Switch Successful</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>commission-paid-by-supplier</code></td>\n<td>The supplier has paid Energylinx and indicated the application has completely succeeded. However, this status can take several months to reach.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"switch-failed\">Switch Failed</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>cancelled-direct-by-customer</code></td>\n<td>The customer has contacted us and cancelled the application, and supplier has been informed within 24 hours via nightly batch file. This can only be done during the cooling off period.</td>\n</tr>\n<tr>\n<td><code>cancelled-by-supplier</code></td>\n<td>The supplier has cancelled the application.</td>\n</tr>\n<tr>\n<td><code>registration-rejected</code></td>\n<td>The supplier has rejected the application; if we can resolve the issue on our side, we will, otherwise the signup will generally later be moved to cancelled-by-supplier.</td>\n</tr>\n<tr>\n<td><code>erroneous-transfer</code></td>\n<td>The application was arranged without the customer’s permission (rare).</td>\n</tr>\n<tr>\n<td><code>duplicate-application</code></td>\n<td>If the customer makes multiple signups within the same day, their previous un-exported signup(s) are marked as duplicates and cancelled.</td>\n</tr>\n</tbody>\n</table>\n</div><p> .</p>\n<h1 id=\"api-endpoints\">API Endpoints</h1>\n","_postman_id":"48a73a9f-89fd-4ae9-a68d-14930f5fedb2"}]}