{"info":{"_postman_id":"02a102fb-1d38-45ca-8304-84ed9d697840","name":"API 1.17","description":"<html><head></head><body><p>This is the documentation for the SparkMeter API. The SparkMeter API enables retrieving customer and transaction information, remote payment and reversal, ands SMS communication.</p>\n<h2>Authentication</h2>\n\n<p>All API requests are authenticated using the <code>Authentication-Token</code> header. In the code samples, replace <code>authentication_token</code> with the token you obtain via the instructions below.</p>\n<h3>Obtaining a Token</h3>\n\n<p>In your ThunderCloud or GroundBolt, navigate to an API user's information page. In the \"Information\" box, click \"View Credentials\" under API Credentials. In the popup window appearing, you will find an authentication token under \"API token\". Copy it and give it to the trusted person/service who will be consuming the API. This token gives access to every API Call, including creating transactions using this API user's account. Tokens are reset by clicking \"Reset Credentials\" under \"View Credentials\" inside the API user's information page.</p>\n<p>You need to be signed in with Operator privileges to obtain a token on an API user's account.</p>\n<h3>Missing or Invalid Token</h3>\n\n<ul>\n<li>Response 401 (application/json)</li>\n<li>Returned if the authentication token is missing or invalid, the following response will be provided:</li>\n<li>Body:\n  ```json\n{\n  \"error\": \"unauthorized\",\n  \"status\": \"failure\"\n}</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>\n\n&lt;h2&gt;Encoding&lt;/h2&gt;\n\nAll API requests and responses are encoded with UTF-8, which is required by the JSON standard. Consumers of the API need to convert between UTF-8 and their desired encoding.\n\n&lt;h2&gt;Endpoint&lt;/h2&gt; \n\nFrom the same popup window used to obtain an authentication token, retrieve the \"API endpoint.\" This API endpoint will be the same URL you use to access the ThunderCloud system at the URI \"/api/v0/\"\n\n&lt;h3&gt;Invalid Endpoint&lt;/h3&gt;\n\n* Response 404 (application/json)\n* Returned if an invalid endpoint was provided.\n* Body:\n    ```json\n{\n    \"error\": \"no such api\",\n    \"status\": \"failure\"\n}\n</code></pre><h2>POST Parameters</h2>\n\n<p>SparkMeter uses the <code>POST</code> method for requests that need to either submit new data or modify existing data. There are two different ways of providing the POST APIs with data.</p>\n<p>You can pass in parameters either by using <code>application/x-www-form-urlencoded</code> or <code>application/json</code>.</p>\n<h3>Form</h3>\n\n<p><code>application/x-www-form-urlencoded</code> is the standard way a web browser submits forms. Most HTTP libraries will default to this method. </p>\n<p>Parameters are passed in like this:</p>\n<p><code>param1=value1&amp;param2=value2</code></p>\n<h3>JSON</h3>\n\n<p><code>application/json</code> is similar, but uses JSON encoding instead. </p>\n<p>Same example as above:</p>\n<p><code>{\"param1\":\"value1\",\"param2\":\"value2\"}</code></p>\n<p>If you are unsure how to pass parameters, use <code>application/x-www-form-urlencoded</code>.</p>\n<h3>Unsupported Mimetype</h3>\n\n<ul>\n<li>Response 415 (application/json)</li>\n<li>Returned if the request uses an unsupported mime type.</li>\n<li>Body:\n  ```json\n{\n  \"error\": \"bad mimetype, must be application/x-www-form-urlencoded or application/json\",\n  \"status\": \"failure\"\n}</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>    \n&lt;h3&gt;Method Not Allowed&lt;/h3&gt;\n\n* Response `405 Method Not Allowed`\n* Returned if the wrong HTTP method is used (e.g., `GET` or `POST`)\n* Body:\n    ```html\n&lt;!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\"&gt; \n&lt;title&gt;405 Method Not Allowed&lt;/title&gt; \n&lt;h1&gt;Method Not Allowed&lt;/h1&gt; \n&lt;p&gt;The method is not allowed for the requested URL.&lt;/p&gt;\n</code></pre><p>If you encounter this error, try following these steps to troubleshoot:</p>\n<ol>\n<li>Ensure the documentation indicates that the endpoint supports the method being used.</li>\n<li>Verify that the path matches what's documented - that is, if there is a trailing slash in the documentation, try adding it to the query.</li>\n<li>If querying the ThunderCloud API, please verify that the URL is using <code>https</code> and not <code>http</code>.</li>\n</ol>\n<h2>Description of a typical use case for mobile money</h2>\n\n<h3>Requirements</h3>\n\n<p>In order to enter a mobile transaction in the SparkMeter system, you need:</p>\n<ul>\n<li>a valid API token (see above for instructions on how to obtain a token)</li>\n<li>the code of the customer concerned by the transaction. This code is defined by the system owner and should be unique. It can be found and defined on the customer page.</li>\n<li>optionally, an external id for the transaction to be placed in the system. This id is defined and provided by the API consumer, and must be unique.</li>\n</ul>\n<p>The transaction will be placed from the account of the vendor matching the token used, to the customer matching the code provided.</p>\n<h3>Step-by-Step</h3>\n\n<ol>\n<li><strong>Get Customer Info</strong> using the customer code.</li>\n</ol>\n<p> Upon success of the call, obtain value of field <code>id</code> to get the customer's internal id.</p>\n<ol>\n<li><strong>Create Transaction</strong>, using the customer's internal id just obtained.\n Optionally, an <code>external_id</code> can be provided for the transaction. The system will reject the transaction if a transaction already exists with this <code>external_id</code>.</li>\n</ol>\n<p>Upon success, the call returns an internal id for the transaction just created. </p>\n<p>That's it! With SparkMeter's SMS Alert, an SMS can be automatically sent to the customer once the transaction has been validated. If you wish to follow the status of a transaction, you can follow these optional steps:</p>\n<ol>\n<li>[optional] <strong>Wait for the transaction to be processed.</strong></li>\n</ol>\n<p> Typically, it takes a few minutes for the transaction to be sent to the Meter Application Server and processed there, then synced back.</p>\n<ol>\n<li>[optional] <strong>Get Transaction</strong> using the internal id obtained from <strong>Create Transaction</strong> or the external id provided to it.</li>\n</ol>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"5527202","collectionId":"02a102fb-1d38-45ca-8304-84ed9d697840","publishedId":"T1LPBks5","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-09-04T10:56:41.000Z"},"item":[{"name":"System","item":[{"name":"Get System Info","event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":["","",""],"id":"57819054-f9e5-4ae8-bf75-10c25282e65d"}}],"id":"e01e6eba-d775-4bec-9994-95349fb5d896","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/system-info","description":"<p>This call returns information on the connection between the ThunderCloud server and Meter Application Servers (MAS) connected to it as well as general system information.</p>\n<p>This information is formatted in a list. Since each ThunderCloud instance is currently only connected to one MAS, the list contains only one element.</p>\n<p><em>Typical use case:</em> </p>\n<ul>\n<li>Check that the MAS is online by retrieving the last sync date between the servers. </li>\n<li><code>last_sync_date</code> should never be more than a few minutes old.</li>\n</ul>\n<p><em>Introduced in version 1.1</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","system-info"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[]}},"response":[{"id":"25a18fc0-654c-40e4-9235-61ba6c8f1f19","name":"401 Unauthorized","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"wrong_authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/system-info"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"52","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFneUw.qpthaDCYNkk8FH3Ug5MrednH2T4; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFneUw.qpthaDCYNkk8FH3Ug5MrednH2T4","key":"session"}],"responseTime":null,"body":"{\n  \"error\": \"unauthorized\",\n  \"status\": \"failure\"\n}"},{"id":"fea21b41-9e07-4950-8cbe-388a80c57e3c","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/system-info"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"322","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnd6w.TpRqib2YfAAKQv-Kpq07oyZRs1A; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnd6w.TpRqib2YfAAKQv-Kpq07oyZRs1A","key":"session"}],"responseTime":null,"body":"{\n    \"error\": null,\n    \"grids\": [\n        {\n            \"id\": \"grid_id\",\n            \"last_sync_date\": \"last_sync_date\",\n            \"name\": \"grid_name\",\n            \"serial\": \"grid_serial\"\n        }\n    ],\n    \"status\": \"success\"\n}"}],"_postman_id":"e01e6eba-d775-4bec-9994-95349fb5d896"}],"id":"2d8cff1e-1042-4bac-9212-c2b89575de6d","_postman_id":"2d8cff1e-1042-4bac-9212-c2b89575de6d","description":""},{"name":"Ground","item":[{"name":"Meter State Override","id":"f80e6920-1a78-4e2d-80b2-ebc1a1f0f7ce","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"state","type":"text","value":"on"}]},"url":"https://SITE.sparkmeter.cloud/api/v0/ground/:ground_serial/set-override-meter-state","description":"<p>Enable or disable all meters connected to the ground.</p>\n<p>The override state API, when set to <code>true</code>, disables all meters connected to a given ground. If the meter mode prior to setting the override was set to ON or Auto, those meters will be returned to those states when the override is set to <code>false</code>.</p>\n<p>Setting the override state of a grid to <code>true</code> allows for large-scale energy control. </p>\n<p><em>Typical use case:</em> </p>\n<ul>\n<li>Automatically shed all metered connections based on a change in power generation conditions.</li>\n</ul>\n<p>In order to place this call, you will need the <code>ground_serial</code>. This can be obtained from a <em>System Info</em> call, which is described earlier in this documentation.</p>\n<p><em>Introduced in version 1.5.2</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","ground",":ground_serial","set-override-meter-state"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[{"id":"7a65e711-7bf3-4e88-87bc-b13597f3e336","description":{"content":"<p>The serial number of the ground</p>\n","type":"text/plain"},"type":"string","value":"","key":"ground_serial"}]}},"response":[{"id":"0630766a-426d-41ee-9fdf-2f84eaffb544","name":"400 Bad Request - Ground is Missing","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"state","value":"on","type":"text"}]},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/ground/:ground_serial/set-override-meter-state","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","ground",":ground_serial","set-override-meter-state"],"variable":[{"key":"ground_serial","value":"HAlhzaunOVnMuJUwt9qM"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"ground is missing\",\n    \"status\": \"failure\"\n}"},{"id":"27621983-a726-40aa-ac50-8e5af1954e1a","name":"400 Bad Request - Can't Parse Boolean","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"state","value":"on","type":"text"}]},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/ground/:ground_serial/set-override-meter-state","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","ground",":ground_serial","set-override-meter-state"],"variable":[{"key":"ground_serial","value":"HAlhzaunOVnMuJUwt9qM"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"failed to parse boolean parameter: 123\",\n    \"status\": \"failure\"\n}"},{"id":"2b3c47f1-92ef-4cea-b548-4e1d19101674","name":"400 Bad Request - Missing State","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"state","value":"on","type":"text"}]},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/ground/:ground_serial/set-override-meter-state","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","ground",":ground_serial","set-override-meter-state"],"variable":[{"key":"ground_serial","value":"HAlhzaunOVnMuJUwt9qM"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"missing parameter: state\",\n    \"status\": \"failure\"\n}"},{"id":"513ed64f-7b54-412b-9a6b-a68a2cebc0c1","name":"404 Not Found - Ground Does Not Exist","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"state","value":"on","type":"text"}]},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/ground/:ground_serial/set-override-meter-state","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","ground",":ground_serial","set-override-meter-state"],"variable":[{"key":"ground_serial","value":"HAlhzaunOVnMuJUwt9qM"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"a ground with that serial does not exist\",\n    \"status\": \"failure\"\n}"},{"id":"a6c45db6-b564-4137-bcc1-3be372cf95d7","name":"200 OK","originalRequest":{"method":"POST","header":[{"key":"Content-Type","type":"text","name":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"state","value":"on","type":"text"}]},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/ground/:ground_serial/set-override-meter-state","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","ground",":ground_serial","set-override-meter-state"],"variable":[{"key":"ground_serial","value":"HAlhzaunOVnMuJUwt9qM","description":"The serial of the ground"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": null,\n    \"status\": \"success\"\n}"}],"_postman_id":"f80e6920-1a78-4e2d-80b2-ebc1a1f0f7ce"}],"id":"4b0d1ce0-7326-4ac5-b660-b2535ee9ce67","_postman_id":"4b0d1ce0-7326-4ac5-b660-b2535ee9ce67","description":""},{"name":"Meter","item":[{"name":"Change Meter Mode","id":"b73b8d0d-381f-4a21-8381-7390f79d4c9f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"state","type":"text","value":"on"}]},"url":"https://SITE.sparkmeter.cloud/api/v0/meter/:meter_serial/set-operating-mode","description":"<p>This call changes the operating mode of a meter (on, off, auto). This call requires a valid meter serial number.</p>\n<p><em>Typical use case:</em> </p>\n<ul>\n<li>Turn a meter off based on information external to the SparkMeter system.</li>\n</ul>\n<p>Make sure to replace the <code>meter_serial</code> parameter in the <code>POST</code> URL with the serial of the meter you wish to modify.\nIf the serial wrong, or if the meter does not yet exist, you will receive 404 Not Found error.</p>\n<p><em>Example:</em> </p>\n<ul>\n<li><a href=\"http://SITE.sparkmeter.cloud/api/v0/meter/SM15R-01-00000001/set-operating-mode\">http://SITE.sparkmeter.cloud/api/v0/meter/SM15R-01-00000001/set-operating-mode</a></li>\n</ul>\n<p>See the SparkMeter documentation for more information about each meter operating mode.</p>\n<p><em>Introduced in version 1.1</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","meter",":meter_serial","set-operating-mode"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[{"id":"a534c7cd-b604-4047-aa59-8742523227ba","description":{"content":"<p>The serial number of the meter</p>\n","type":"text/plain"},"type":"string","value":"","key":"meter_serial"}]}},"response":[{"id":"08e52f8e-160a-46f7-8e67-94a56b906e56","name":"200 OK","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"state","value":"on","type":"text"}]},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/meter/:meter_serial/set-operating-mode","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","meter",":meter_serial","set-operating-mode"],"variable":[{"key":"meter_serial","value":"SM15R-01-00000001"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"42","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnfPQ.fdo4J4eSz4cT-AsLPixFtnEJU1Y; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnfPQ.fdo4J4eSz4cT-AsLPixFtnEJU1Y","key":"session"}],"responseTime":null,"body":"{\n  \"error\": null,\n  \"status\": \"success\"\n}"},{"id":"76134444-fc89-499f-b42b-e8162751276d","name":"404 Serial Does Not Exist","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"state","value":"on","type":"text"}]},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/meter/:meter_serial/set-operating-mode","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","meter",":meter_serial","set-operating-mode"],"variable":[{"key":"meter_serial","value":"SM15R-01-00000001"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"            {\n                \"error\": \"no such meter\",\n                \"status\": \"failure\"\n            }        "},{"id":"e869fcaa-6e92-46b1-9ac4-c034588783f7","name":"404 Not Found","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"state","value":"on","type":"text"}]},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/meter/:meter_serial/set-operating-mode","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","meter",":meter_serial","set-operating-mode"],"variable":[{"key":"meter_serial","value":"SM15R-01-00000002"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"53","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnfeg.dWCd1sdyW4bavlGl7Z-4kUowl5Y; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnfeg.dWCd1sdyW4bavlGl7Z-4kUowl5Y","key":"session"}],"responseTime":null,"body":"{\n  \"error\": \"no such meter\",\n  \"status\": \"failure\"\n}"}],"_postman_id":"b73b8d0d-381f-4a21-8381-7390f79d4c9f"},{"name":"List Meter Models","id":"f41531a1-eaac-4eca-8241-341edebcc3d4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authentication-Token","value":"authentication_token","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"https://SITE.sparkmeter.cloud/api/v0/meters/models","description":"<p>This call lists all the avaliable meter models, their continuous current limits, inrush current limits, ,corresponding meter counts, and phase counts (<em>added in v1.13</em>).</p>\n<p><em>Introduced in version 1.11, updated in version 1.13</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","meters","models"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[]}},"response":[{"id":"71177d33-914a-4005-bd56-c00764d254f9","name":"401 Unauthorized","originalRequest":{"method":"GET","header":[{"key":"Authentication-Token","value":"authentication_token","type":"text","disabled":true},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"https://SITE.sparkmeter.cloud/api/v0/meters/models"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"unauthorized\",\n    \"status\": \"failure\"\n}"},{"id":"f55909f6-2a81-40e5-b775-ed9380a3ccdc","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"Authentication-Token","value":"authentication_token","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"https://SITE.sparkmeter.cloud/api/v0/meters/models"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": null,\n    \"models\": [\n        {\n            \"continuous_limit\": 100,\n            \"count\": 0,\n            \"inrush_limit\": 100,\n            \"name\": \"SM100E\",\n            \"phase_count\": 1\n        },\n        {\n            \"continuous_limit\": 20,\n            \"count\": 0,\n            \"inrush_limit\": 20,\n            \"name\": \"SM15R\",\n            \"phase_count\": 1\n        },\n        {\n            \"continuous_limit\": 16,\n            \"count\": 0,\n            \"inrush_limit\": 19,\n            \"name\": \"SM16R\",\n            \"phase_count\": 1\n        },\n        {\n            \"continuous_limit\": 61,\n            \"count\": 0,\n            \"inrush_limit\": 61,\n            \"name\": \"SM60R\",\n            \"phase_count\": 1\n        },\n        {\n            \"continuous_limit\": 20,\n            \"count\": 0,\n            \"inrush_limit\": 20,\n            \"name\": \"SM20R\",\n            \"phase_count\": 1\n        },\n        {\n            \"continuous_limit\": 6,\n            \"count\": 0,\n            \"inrush_limit\": 12,\n            \"name\": \"SM5R\",\n            \"phase_count\": 1\n        },\n        {\n            \"continuous_limit\": 200,\n            \"count\": 0,\n            \"inrush_limit\": 200,\n            \"name\": \"SM200E\",\n            \"phase_count\": 1\n        },\n        {\n            \"continuous_limit\": 20,\n            \"count\": 1,\n            \"inrush_limit\": 20,\n            \"name\": \"SM25R\",\n            \"phase_count\": 1\n        },\n        {\n            \"continuous_limit\": 61,\n            \"count\": 0,\n            \"inrush_limit\": 61,\n            \"name\": \"SM60RP\",\n            \"phase_count\": 3\n        }\n    ],\n    \"status\": \"success\"\n}"}],"_postman_id":"f41531a1-eaac-4eca-8241-341edebcc3d4"}],"id":"d40c4541-a982-474b-9209-c0cec4639742","_postman_id":"d40c4541-a982-474b-9209-c0cec4639742","description":""},{"name":"Customer","item":[{"name":"Get Customer Info","id":"694cfdf5-3f2e-4479-b8c3-38ad241eb028","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/customer/:customer_code","description":"<p>This call provides information on the customer referred to in the query.</p>\n<p>The <code>customer_code</code> input must match exactly a \"Customer code\" field of an existing meter.</p>\n<p>The url query parameter <code>reading_details</code> can be passed with the value <code>true</code>, if the latest reading on the meter should be returned. The default value for this parameter is <code>false</code> (<em>Added in version 1.14</em>).</p>\n<p><em>Typical use cases:</em></p>\n<ul>\n<li>Retrieve last account balance - <code>credit_balance</code> - for a given customer.</li>\n<li>Get the internal id - <code>id</code> - of a customer, to be used in a subsequent <strong>Create Transaction</strong> call.</li>\n</ul>\n<p>Make sure to replace <code>customer code</code> in the <code>GET</code> URL as shown in the example below.</p>\n<p><em>Example:</em></p>\n<ul>\n<li>If the customer code is <code>123</code> then the URL should be <a href=\"http://cloud.sparkmeter.io/api/v0/customer/123\">http://cloud.sparkmeter.io/api/v0/customer/123</a></li>\n</ul>\n<p>The response includes a <code>last_meter_state_code</code> field, which indicates the last known state of the meter. Possible values are:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><code>last_meter_state_code</code></th>\n<th>Meter state</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>-1</td>\n<td>Unknown</td>\n</tr>\n<tr>\n<td>0</td>\n<td>Off</td>\n</tr>\n<tr>\n<td>1</td>\n<td>On</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Start</td>\n</tr>\n<tr>\n<td>3</td>\n<td>Error</td>\n</tr>\n<tr>\n<td>4</td>\n<td>Powering On</td>\n</tr>\n<tr>\n<td>5</td>\n<td>Starting Up</td>\n</tr>\n<tr>\n<td>6</td>\n<td>Throttle</td>\n</tr>\n<tr>\n<td>7</td>\n<td>Throttle Check</td>\n</tr>\n<tr>\n<td>8</td>\n<td>Throttle Error</td>\n</tr>\n<tr>\n<td>9</td>\n<td>Protect</td>\n</tr>\n<tr>\n<td>10</td>\n<td>Meter Check</td>\n</tr>\n<tr>\n<td>11</td>\n<td>Meter Disabled</td>\n</tr>\n<tr>\n<td>12</td>\n<td>Calibration</td>\n</tr>\n<tr>\n<td>13</td>\n<td>Tamper</td>\n</tr>\n</tbody>\n</table>\n</div><p>The <code>last_config_datetime</code> field indicates the last time the meter state was read.</p>\n<p><em>Introduced in version 1.1, updated in version 1.13 to include the <code>last_meter_state_code</code> and <code>last_config_datetime</code> in the response, updated in version 1.14 to support the <code>reading_details</code> query parameter, updated in version 1.15 to include the <code>frequency</code> in the <code>latest_reading</code> response.</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","customer",":customer_code"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[{"id":"a5745954-a4f5-4208-a87c-713e2eac2c02","description":{"content":"<p>The existing meter's <code>customer_code</code></p>\n","type":"text/plain"},"type":"string","value":"","key":"customer_code"}]}},"response":[{"id":"0a9bceeb-bf5e-4d0e-914a-8c834e7a935b","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customer/:customer_code","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customer",":customer_code"],"variable":[{"key":"customer_code","value":"123"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Encoding","value":"gzip","name":"Content-Encoding","description":""},{"key":"Content-Length","value":"478","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFngjw.D4chFEsttxujWLxT-mItkfx0n9c; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFngjw.D4chFEsttxujWLxT-mItkfx0n9c","key":"session"}],"responseTime":null,"body":"{\n    \"customers\": [\n        {\n            \"code\": \"customer code 1\",\n            \"credit_balance\": 0,\n            \"debt_balance\": 0,\n            \"ground\": {\n                \"id\": \"00000002-0000-0000-0000-000000000001\",\n                \"name\": \"test micrøgrid 1\"\n            },\n            \"id\": \"0000000c-0000-0000-0000-000000000001\",\n            \"meters\": [\n                {\n                    \"active\": true,\n                    \"address\": \"strëet, street2, city, 12345, state, usa\",\n                    \"city\": \"city\",\n                    \"coords\": \"42.5646975,-71.2708356\",\n                    \"country\": \"usa\",\n                    \"current_tariff_name\": \"tarïff01\",\n                    \"is_running_plan\": false,\n                    \"last_config_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_energy\": 0,\n                    \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_meter_state_code\": 1,\n                    \"operating_mode\": 2,\n                    \"plan_balance\": 0,\n                    \"postalcode\": \"12345\",\n                    \"serial\": \"SM15R-01-00000001\",\n                    \"state\": \"state\",\n                    \"street1\": \"strëet\",\n                    \"street2\": \"street2\",\n                    \"tags\": [\n                        \"tag1\",\n                        \"tag2\"\n                    ],\n                    \"total_cycle_energy\": 0\n                }\n            ],\n            \"name\": \"strëet\",\n            \"phone_number\": \"+18008000001\",\n            \"phone_number_verified\": true\n        }\n    ],\n    \"error\": null,\n    \"status\": \"success\"\n}"},{"id":"454c33af-bfb9-40af-a7bb-83626b2ea32b","name":"200 OK with reading details","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customer/:customer_code?reading_details=true","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customer",":customer_code"],"query":[{"key":"reading_details","value":"true"}],"variable":[{"key":"customer_code","value":"123","type":"string","description":"The existing meter's `customer_code`"}]}},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customers\": [\n    {\n      \"code\": \"customer code 1\",\n      \"credit_balance\": 0.0,\n      \"debt_balance\": 0.0,\n      \"ground\": {\n        \"id\": \"00000002-0000-0000-0000-000000000001\",\n        \"name\": \"test micr\\u00f8grid 1\"\n      },\n      \"id\": \"0000000c-0000-0000-0000-000000000001\",\n      \"meters\": [\n        {\n          \"active\": true,\n          \"address\": \"str\\u00ebet, street2, city, 12345, state, usa\",\n          \"bootloader\": \"def456\",\n          \"city\": \"city\",\n          \"coords\": \"42.5646975,-71.2708356\",\n          \"country\": \"usa\",\n          \"current_tariff_name\": \"tar\\u00efff01\",\n          \"firmware\": \"abc1234\",\n          \"is_running_plan\": false,\n          \"last_config_datetime\": \"2013-01-01T01:01:01\",\n          \"last_cycle_start\": null,\n          \"last_energy\": 0.0,\n          \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n          \"last_meter_state_code\": 1,\n          \"last_plan_expiration_date\": null,\n          \"last_plan_payment_date\": null,\n          \"latest_reading\": {\n            \"avg_apparent_power\": 1.0,\n            \"avg_current\": 1.0,\n            \"avg_power_factor\": 1.0,\n            \"avg_true_power\": 1.0,\n            \"avg_voltage\": 120.0,\n            \"cost\": 1.0,\n            \"frequency\": 50.0,\n            \"instantaneous_true_power\": 1.0,\n            \"kilowatt_hours\": 1.1,\n            \"max_current\": 1.0,\n            \"max_voltage\": 120.0,\n            \"min_current\": 1.0,\n            \"min_voltage\": 120.0,\n            \"rate\": 0.0,\n            \"timestamp\": \"2013-01-01T00:30:00\",\n            \"tou_modifier\": 0.0,\n            \"uptime\": 100\n          },\n          \"model\": \"SM25R\",\n          \"operating_mode\": 2,\n          \"plan_balance\": 0.0,\n          \"postalcode\": \"12345\",\n          \"serial\": \"SM15R-01-00000001\",\n          \"state\": \"state\",\n          \"street1\": \"str\\u00ebet\",\n          \"street2\": \"street2\",\n          \"tags\": [],\n          \"total_cycle_energy\": 0.0\n        }\n      ],\n      \"name\": \"str\\u00ebet\",\n      \"phone_number\": \"+18008000001\",\n      \"phone_number_verified\": true\n    }\n  ],\n  \"error\": null,\n  \"status\": \"success\"\n}\n"},{"id":"67edd210-cec9-4933-9ff2-e08dc63734b5","name":"404 Not Found","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customer/:customer_code","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customer",":customer_code"],"variable":[{"key":"customer_code","value":"badcode"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"56","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFngxQ.6dr9IN5AkJav4Wqxo8m0E8N9sWw; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFngxQ.6dr9IN5AkJav4Wqxo8m0E8N9sWw","key":"session"}],"responseTime":null,"body":"{\n  \"error\": \"no such customer\",\n  \"status\": \"failure\"\n}"}],"_postman_id":"694cfdf5-3f2e-4479-b8c3-38ad241eb028"},{"name":"Get Customer List","id":"05c3256b-2474-4755-a281-3e5ac922f66a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/customers","description":"<p>This call will return a list of all customer and totalizer meters in your system.</p>\n<p>This returned list can be filtered by some parameters. Examples of these filters are shown as examples in <strong>Get Customer by Phone Number</strong> and <strong>Get Customer by Meter Serial</strong>. As shown in these examples, when using multiple parameters in your request, please use <code>AND</code>-ing fashion as shown in these examples. The following parameters can be passed in to narrow down the search:</p>\n<ul>\n<li><code>customer_code</code> (case insensitive)</li>\n<li><code>customer_phone_number</code></li>\n<li><code>meter_serial</code> (case insensitive)</li>\n<li><code>meter_tariff_name</code>  (case insensitive)</li>\n<li><code>ground_id</code> </li>\n<li><code>ground_name</code> (case insensitive)</li>\n<li><code>customers_only</code> (case insensitive) - <code>true</code> if the returned meters should be restricted to customers only. <code>false</code> by default. (<em>Added in version 1.13</em>).</li>\n<li><code>reading_details</code> (case insensitive) - <code>true</code> if the latest reading should be returned with each meter. <code>false</code> by default (<em>Added in version 1.14</em>).</li>\n</ul>\n<p>If no parameters are given, a list of all customers will be returned.</p>\n<p><em>Introduced in version 1.4, updated in version 1.13 to add the <code>customers_only</code> parameter and to include the <code>last_meter_state_code</code> and <code>last_config_datetime</code> in the response, updated in version 1.14 to accept the <code>reading_details</code> parameter, updated in version 1.15 to include the <code>frequency</code> in the <code>latest_reading</code> response.</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","customers"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[]}},"response":[{"id":"119425fa-9ee0-48f4-8291-3a1a2cd2454c","name":"401 Unauthorized","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"wrong_authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/customers"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"52","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFniOA.F938-xfKchnOIo7Pg-M_hO0jJbE; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFniOA.F938-xfKchnOIo7Pg-M_hO0jJbE","key":"session"}],"responseTime":null,"body":"{\n  \"error\": \"unauthorized\",\n  \"status\": \"failure\"\n}"},{"id":"17f18f94-8168-435e-8a15-96431e94b438","name":"200 OK  with reading details","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers?reading_details=true","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers"],"query":[{"key":"reading_details","value":"true"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n  \"customers\": [\n    {\n      \"code\": null,\n      \"credit_balance\": null,\n      \"debt_balance\": null,\n      \"ground\": {\n        \"id\": \"00000002-0000-0000-0000-000000000001\",\n        \"name\": \"test micr\\u00f8grid 1\"\n      },\n      \"id\": null,\n      \"meters\": [\n        {\n          \"active\": true,\n          \"address\": \"str\\u00ebet, street2, city, 12345, state, usa\",\n          \"bootloader\": \"def456\",\n          \"city\": \"city\",\n          \"coords\": \"42.5646975,-71.2708356\",\n          \"country\": \"usa\",\n          \"current_tariff_name\": null,\n          \"firmware\": \"abc1234\",\n          \"is_running_plan\": null,\n          \"last_config_datetime\": \"2013-01-01T01:01:01\",\n          \"last_energy\": 0.0,\n          \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n          \"last_meter_state_code\": 1,\n          \"latest_reading\": {\n            \"avg_apparent_power\": 1.0,\n            \"avg_current\": 1.0,\n            \"avg_power_factor\": 1.0,\n            \"avg_true_power\": 1.0,\n            \"avg_voltage\": 120.0,\n            \"cost\": 1.0,\n            \"frequency\": 50.0,\n            \"instantaneous_true_power\": 1.0,\n            \"kilowatt_hours\": 1.1,\n            \"max_current\": 1.0,\n            \"max_voltage\": 120.0,\n            \"min_current\": 1.0,\n            \"min_voltage\": 120.0,\n            \"rate\": 0.0,\n            \"timestamp\": \"2013-01-01T01:00:00\",\n            \"tou_modifier\": 0.0,\n            \"uptime\": 100\n          },\n          \"model\": \"SM25R\",\n          \"operating_mode\": 2,\n          \"plan_balance\": null,\n          \"postalcode\": \"12345\",\n          \"serial\": \"SM200E-01-00000011\",\n          \"state\": \"state\",\n          \"street1\": \"str\\u00ebet\",\n          \"street2\": \"street2\",\n          \"tags\": [],\n          \"total_cycle_energy\": null\n        }\n      ],\n      \"name\": null,\n      \"phone_number\": null,\n      \"phone_number_verified\": null\n    },\n    {\n      \"code\": \"customer code 1\",\n      \"credit_balance\": 0.0,\n      \"debt_balance\": 0.0,\n      \"ground\": {\n        \"id\": \"00000002-0000-0000-0000-000000000001\",\n        \"name\": \"test micr\\u00f8grid 1\"\n      },\n      \"id\": \"0000000c-0000-0000-0000-000000000001\",\n      \"meters\": [\n        {\n          \"active\": true,\n          \"address\": \"str\\u00ebet, street2, city, 12345, state, usa\",\n          \"bootloader\": \"def456\",\n          \"city\": \"city\",\n          \"coords\": \"42.5646975,-71.2708356\",\n          \"country\": \"usa\",\n          \"current_tariff_name\": \"tar\\u00efff01\",\n          \"firmware\": \"abc1234\",\n          \"is_running_plan\": false,\n          \"last_config_datetime\": \"2013-01-01T01:01:01\",\n          \"last_cycle_start\": null,\n          \"last_energy\": 0.0,\n          \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n          \"last_meter_state_code\": 1,\n          \"last_plan_expiration_date\": null,\n          \"last_plan_payment_date\": null,\n          \"latest_reading\": {\n            \"avg_apparent_power\": 1.0,\n            \"avg_current\": 1.0,\n            \"avg_power_factor\": 1.0,\n            \"avg_true_power\": 1.0,\n            \"avg_voltage\": 120.0,\n            \"cost\": 1.0,\n            \"frequency\": 50.0,\n            \"instantaneous_true_power\": 1.0,\n            \"kilowatt_hours\": 1.1,\n            \"max_current\": 1.0,\n            \"max_voltage\": 120.0,\n            \"min_current\": 1.0,\n            \"min_voltage\": 120.0,\n            \"rate\": 0.0,\n            \"timestamp\": \"2013-01-01T00:30:00\",\n            \"tou_modifier\": 0.0,\n            \"uptime\": 100\n          },\n          \"model\": \"SM25R\",\n          \"operating_mode\": 2,\n          \"plan_balance\": 0.0,\n          \"postalcode\": \"12345\",\n          \"serial\": \"SM15R-01-00000001\",\n          \"state\": \"state\",\n          \"street1\": \"str\\u00ebet\",\n          \"street2\": \"street2\",\n          \"tags\": [],\n          \"total_cycle_energy\": 0.0\n        }\n      ],\n      \"name\": \"str\\u00ebet\",\n      \"phone_number\": \"+18008000001\",\n      \"phone_number_verified\": true\n    },\n    {\n      \"code\": \"customer code 2\",\n      \"credit_balance\": 0.0,\n      \"debt_balance\": 0.0,\n      \"ground\": {\n        \"id\": \"00000002-0000-0000-0000-000000000001\",\n        \"name\": \"test micr\\u00f8grid 1\"\n      },\n      \"id\": \"0000000c-0000-0000-0000-000000000002\",\n      \"meters\": [\n        {\n          \"active\": true,\n          \"address\": \"str\\u00ebet, street2, city, 12345, state, usa\",\n          \"bootloader\": \"def456\",\n          \"city\": \"city\",\n          \"coords\": \"42.5646975,-71.2708356\",\n          \"country\": \"usa\",\n          \"current_tariff_name\": \"tar\\u00efff01\",\n          \"firmware\": \"abc1234\",\n          \"is_running_plan\": false,\n          \"last_config_datetime\": \"2013-01-01T01:01:01\",\n          \"last_cycle_start\": null,\n          \"last_energy\": 0.0,\n          \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n          \"last_meter_state_code\": 1,\n          \"last_plan_expiration_date\": null,\n          \"last_plan_payment_date\": null,\n          \"latest_reading\": {\n            \"avg_apparent_power\": 1.0,\n            \"avg_current\": 1.0,\n            \"avg_power_factor\": 1.0,\n            \"avg_true_power\": 1.0,\n            \"avg_voltage\": 120.0,\n            \"cost\": 1.0,\n            \"frequency\": 50.0,\n            \"instantaneous_true_power\": 1.0,\n            \"kilowatt_hours\": 1.1,\n            \"max_current\": 1.0,\n            \"max_voltage\": 120.0,\n            \"min_current\": 1.0,\n            \"min_voltage\": 120.0,\n            \"rate\": 0.0,\n            \"timestamp\": \"2013-01-01T00:45:00\",\n            \"tou_modifier\": 0.0,\n            \"uptime\": 100\n          },\n          \"model\": \"SM25R\",\n          \"operating_mode\": 2,\n          \"plan_balance\": 0.0,\n          \"postalcode\": \"12345\",\n          \"serial\": \"SM15R-01-00000002\",\n          \"state\": \"state\",\n          \"street1\": \"str\\u00ebet\",\n          \"street2\": \"street2\",\n          \"tags\": [],\n          \"total_cycle_energy\": 0.0\n        }\n      ],\n      \"name\": \"str\\u00ebet\",\n      \"phone_number\": \"+18008000002\",\n      \"phone_number_verified\": true\n    }\n  ],\n  \"error\": null,\n  \"status\": \"success\"\n}\n"},{"id":"33be9b93-f4eb-4e4d-b7a3-784534a3ddd2","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/customers"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Encoding","value":"gzip","name":"Content-Encoding","description":""},{"key":"Content-Length","value":"694","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnhJg.oELAPnOSmpCPrYSy5yZVPdK5Rfg; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnhJg.oELAPnOSmpCPrYSy5yZVPdK5Rfg","key":"session"}],"responseTime":null,"body":"{\n    \"customers\": [\n        {\n            \"code\": \"customer code 1\",\n            \"credit_balance\": 0,\n            \"debt_balance\": 0,\n            \"ground\": {\n                \"id\": \"00000002-0000-0000-0000-000000000001\",\n                \"name\": \"test micrøgrid 1\"\n            },\n            \"id\": \"0000000c-0000-0000-0000-000000000001\",\n            \"meters\": [\n                {\n                    \"active\": true,\n                    \"address\": \"strëet, street2, city, 12345, state, usa\",\n                    \"city\": \"city\",\n                    \"coords\": \"42.5646975,-71.2708356\",\n                    \"country\": \"usa\",\n                    \"current_tariff_name\": \"tarïff01\",\n                    \"is_running_plan\": false,\n                    \"last_config_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_energy\": 0,\n                    \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_meter_state_code\": 1,\n                    \"operating_mode\": 2,\n                    \"plan_balance\": 0,\n                    \"postalcode\": \"12345\",\n                    \"serial\": \"SM15R-01-00000001\",\n                    \"state\": \"state\",\n                    \"street1\": \"strëet\",\n                    \"street2\": \"street2\",\n                    \"tags\": [],\n                    \"total_cycle_energy\": 0\n                }\n            ],\n            \"name\": \"Customer #1\",\n            \"phone_number\": \"+18008000001\",\n            \"phone_number_verified\": true\n        },\n        {\n            \"code\": \"customer code 2\",\n            \"credit_balance\": 0,\n            \"debt_balance\": 0,\n            \"ground\": {\n                \"id\": \"00000002-0000-0000-0000-000000000001\",\n                \"name\": \"test micrøgrid 1\"\n            },\n            \"id\": \"0000000c-0000-0000-0000-000000000002\",\n            \"meters\": [\n                {\n                    \"active\": true,\n                    \"address\": \"strëet, street2, city, 12345, state, usa\",\n                    \"city\": \"city\",\n                    \"coords\": \"42.5646975,-71.2708356\",\n                    \"country\": \"usa\",\n                    \"current_tariff_name\": \"tarïff01\",\n                    \"is_running_plan\": false,\n                    \"last_config_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_energy\": 0,\n                    \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_meter_state_code\": 1,\n                    \"operating_mode\": 2,\n                    \"plan_balance\": 0,\n                    \"postalcode\": \"12345\",\n                    \"serial\": \"SM15R-01-00000002\",\n                    \"state\": \"state\",\n                    \"street1\": \"strëet\",\n                    \"street2\": \"street2\",\n                    \"tags\": [],\n                    \"total_cycle_energy\": 0\n                }\n            ],\n            \"name\": \"Customer #2\",\n            \"phone_number\": \"+18008000002\",\n            \"phone_number_verified\": true\n        }\n    ],\n    \"error\": null,\n    \"status\": \"success\"\n}"}],"_postman_id":"05c3256b-2474-4755-a281-3e5ac922f66a"},{"name":"Get Customer by Phone Number","id":"d595e961-9eec-48c7-a4f0-894d8c7bbc1e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/customers?customer_phone_number=%2BPHONE_NUMBER","description":"<p>This call returns a filtered list of customers by a customer phone number.</p>\n<p>Make sure that the <code>GET</code> URL is correct and following the correct syntax. </p>\n<ul>\n<li>URL syntax is <code>/api/v0/customers?customer_phone_number=%2B'customer_phone_number'</code></li>\n<li><code>%2B</code> needs to be in front of <code>customer_phone_number</code></li>\n<li><code>customer_phone_number</code> is including country code without any dashes (-)</li>\n</ul>\n<p>The url query parameter <code>reading_details</code> can be passed with the value <code>true</code>, if the latest reading on the meter should be returned. The default value for this parameter is <code>false</code> (<em>Added in version 1.14</em>).</p>\n<p><em>Example:</em></p>\n<ul>\n<li>If phone number is +1-123-456-7890, then <code>customer_phone_number</code> is <code>11234567890</code></li>\n<li>URL should be <code>/api/v0/customers?customer_phone_number=%2B11234567890</code></li>\n</ul>\n<p><em>Introduced in version 1.4, updated in version 1.13 to include the <code>last_meter_state_code</code> and <code>last_config_datetime</code> in the response, updated in version 1.14 to accept the <code>reading_details</code> parameter, updated in version 1.15 to include the <code>frequency</code> in the <code>latest_reading</code> response.</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","customers"],"host":["SITE","sparkmeter","cloud"],"query":[{"description":{"content":"<p>The HTML escaped phone number.</p>\n","type":"text/plain"},"key":"customer_phone_number","value":"%2BPHONE_NUMBER"}],"variable":[]}},"response":[{"id":"307738b4-6b6b-443c-954f-7ab97cb4aabf","name":"200 OK with reading details","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers?customer_phone_number=%2B15551234&reading_details=true","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers"],"query":[{"key":"customer_phone_number","value":"%2B15551234"},{"key":"reading_details","value":"true"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"customers\": [\n        {\n            \"code\": \"customer code 1\",\n            \"credit_balance\": 0,\n            \"debt_balance\": 0,\n            \"ground\": {\n                \"id\": \"00000002-0000-0000-0000-000000000001\",\n                \"name\": \"test micrøgrid 1\"\n            },\n            \"id\": \"0000000c-0000-0000-0000-000000000001\",\n            \"meters\": [\n                {\n                    \"active\": true,\n                    \"address\": \"strëet, street2, city, 12345, state, usa\",\n                    \"bootloader\": \"def456\",\n                    \"city\": \"city\",\n                    \"coords\": \"42.5646975,-71.2708356\",\n                    \"country\": \"usa\",\n                    \"current_tariff_name\": \"tarïff01\",\n                    \"firmware\": \"abc1234\",\n                    \"is_running_plan\": false,\n                    \"last_config_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_cycle_start\": null,\n                    \"last_energy\": 0,\n                    \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_meter_state_code\": 1,\n                    \"last_plan_expiration_date\": null,\n                    \"last_plan_payment_date\": null,\n                    \"latest_reading\": {\n                        \"avg_apparent_power\": 1,\n                        \"avg_current\": 1,\n                        \"avg_power_factor\": 1,\n                        \"avg_true_power\": 1,\n                        \"avg_voltage\": 120,\n                        \"cost\": 1,\n                        \"frequency\": 50.0,\n                        \"instantaneous_true_power\": 1,\n                        \"kilowatt_hours\": 1.1,\n                        \"max_current\": 1,\n                        \"max_voltage\": 120,\n                        \"min_current\": 1,\n                        \"min_voltage\": 120,\n                        \"rate\": 0,\n                        \"timestamp\": \"2013-01-01T00:30:00\",\n                        \"tou_modifier\": 0,\n                        \"uptime\": 100\n                    },\n                    \"model\": \"SM25R\",\n                    \"operating_mode\": 2,\n                    \"plan_balance\": 0,\n                    \"postalcode\": \"12345\",\n                    \"serial\": \"SM15R-01-00000001\",\n                    \"state\": \"state\",\n                    \"street1\": \"strëet\",\n                    \"street2\": \"street2\",\n                    \"tags\": [],\n                    \"total_cycle_energy\": 0\n                }\n            ],\n            \"name\": \"strëet\",\n            \"phone_number\": \"+18008000001\",\n            \"phone_number_verified\": true\n        }\n    ],\n    \"error\": null,\n    \"status\": \"success\"\n}"},{"id":"54d130f0-5627-4ee2-a340-26b2145fd2f9","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers?customer_phone_number=%2B15551234","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers"],"query":[{"key":"customer_phone_number","value":"%2B15551234"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Encoding","value":"gzip","name":"Content-Encoding","description":""},{"key":"Content-Length","value":"481","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFni4g.EXRACDmRfxKrLo2wWLE6NnzQyCw; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFni4g.EXRACDmRfxKrLo2wWLE6NnzQyCw","key":"session"}],"responseTime":null,"body":"{\n    \"customers\": [\n        {\n            \"code\": \"customer code 1\",\n            \"credit_balance\": 0,\n            \"debt_balance\": 0,\n            \"ground\": {\n                \"id\": \"00000002-0000-0000-0000-000000000001\",\n                \"name\": \"test micrøgrid 1\"\n            },\n            \"id\": \"0000000c-0000-0000-0000-000000000001\",\n            \"meters\": [\n                {\n                    \"active\": true,\n                    \"address\": \"strëet, street2, city, 12345, state, usa\",\n                    \"city\": \"city\",\n                    \"coords\": \"42.5646975,-71.2708356\",\n                    \"country\": \"usa\",\n                    \"current_tariff_name\": \"tarïff01\",\n                    \"is_running_plan\": false,\n                    \"last_config_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_energy\": 0,\n                    \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_meter_state_code\": 1,\n                    \"operating_mode\": 2,\n                    \"plan_balance\": 0,\n                    \"postalcode\": \"12345\",\n                    \"serial\": \"SM15R-01-00000001\",\n                    \"state\": \"state\",\n                    \"street1\": \"strëet\",\n                    \"street2\": \"street2\",\n                    \"tags\": [],\n                    \"total_cycle_energy\": 0\n                }\n            ],\n            \"name\": \"strëet\",\n            \"phone_number\": \"+18008000001\",\n            \"phone_number_verified\": true\n        }\n    ],\n    \"error\": null,\n    \"status\": \"success\"\n}"},{"id":"90758a23-91a1-445a-8af3-daf555b753ce","name":"404 Not Found","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers?customer_phone_number=%2B15551235","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers"],"query":[{"key":"customer_phone_number","value":"%2B15551235"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"56","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnjRA.U6WHgDg79F5U4HzrU1EMZkDeJdU; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnjRA.U6WHgDg79F5U4HzrU1EMZkDeJdU","key":"session"}],"responseTime":null,"body":"{\n  \"error\": \"no such customer\",\n  \"status\": \"failure\"\n}"}],"_postman_id":"d595e961-9eec-48c7-a4f0-894d8c7bbc1e"},{"name":"Get Customer by Meter Serial","id":"99996dda-3698-4879-9fdd-880e07fc7d70","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/customers?meter_serial=METER_SERIAL","description":"<p>This call returns a filtered list of customers by a customer meter serial.</p>\n<p>Make sure that the <code>GET</code> URL is correct and following the correct syntax. </p>\n<ul>\n<li>URL syntax is <code>/api/v0/customers?meter_serial='meter_serial'</code></li>\n<li><code>meter_serial</code> is as it is displayed with the dashes included</li>\n</ul>\n<p>The url query parameter <code>reading_details</code> can be passed with the value <code>true</code>, if the latest reading on the meter should be returned. The default value for this parameter is <code>false</code> (<em>Added in version 1.14</em>).</p>\n<p><em>Example:</em></p>\n<ul>\n<li>If serial of the meter is SM15R-01-00000001, then <code>meter_serial</code> is <code>SM15R-01-00000001</code></li>\n<li>URL should be <code>/api/v0/customers?meter_serial=SM15R-01-00000001</code></li>\n</ul>\n<p><em>Introduced in version 1.4, updated in version 1.13 to include the <code>last_meter_state_code</code> and <code>last_config_datetime</code> in the response, updated in version 1.14 to accept the <code>reading_details</code> parameter, updated in version 1.15 to include the <code>frequency</code> in the <code>latest_reading</code> response.</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","customers"],"host":["SITE","sparkmeter","cloud"],"query":[{"key":"meter_serial","value":"METER_SERIAL"}],"variable":[]}},"response":[{"id":"0cb77589-6521-48cc-bf0d-662a9526b0e7","name":"404 Not Found","originalRequest":{"header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers?meter_serial=SM16R-01-00001235","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers"],"query":[{"key":"meter_serial","value":"SM16R-01-00001235"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"53","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnkKg.FtozFLrvnOrbNn9efiiVZGJ9SuA; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnkKg.FtozFLrvnOrbNn9efiiVZGJ9SuA","key":"session"}],"responseTime":null,"body":"{\n  \"error\": \"no such meter\",\n  \"status\": \"failure\"\n}"},{"id":"33831fd6-3221-43c7-a7df-78d106027199","name":"200 OK with reading details","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers?meter_serial=SM16R-01-00001234&reading_details=true","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers"],"query":[{"key":"meter_serial","value":"SM16R-01-00001234"},{"key":"reading_details","value":"true"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"customers\": [\n        {\n            \"code\": \"customer code 1\",\n            \"credit_balance\": 0,\n            \"debt_balance\": 0,\n            \"ground\": {\n                \"id\": \"00000002-0000-0000-0000-000000000001\",\n                \"name\": \"test micrøgrid 1\"\n            },\n            \"id\": \"0000000c-0000-0000-0000-000000000001\",\n            \"meters\": [\n                {\n                    \"active\": true,\n                    \"address\": \"strëet, street2, city, 12345, state, usa\",\n                    \"bootloader\": \"def456\",\n                    \"city\": \"city\",\n                    \"coords\": \"42.5646975,-71.2708356\",\n                    \"country\": \"usa\",\n                    \"current_tariff_name\": \"tarïff01\",\n                    \"firmware\": \"abc1234\",\n                    \"is_running_plan\": false,\n                    \"last_config_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_cycle_start\": null,\n                    \"last_energy\": 0,\n                    \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_meter_state_code\": 1,\n                    \"last_plan_expiration_date\": null,\n                    \"last_plan_payment_date\": null,\n                    \"latest_reading\": {\n                        \"avg_apparent_power\": 1,\n                        \"avg_current\": 1,\n                        \"avg_power_factor\": 1,\n                        \"avg_true_power\": 1,\n                        \"avg_voltage\": 120,\n                        \"cost\": 1,\n                        \"frequency\": 50.0,\n                        \"instantaneous_true_power\": 1,\n                        \"kilowatt_hours\": 1.1,\n                        \"max_current\": 1,\n                        \"max_voltage\": 120,\n                        \"min_current\": 1,\n                        \"min_voltage\": 120,\n                        \"rate\": 0,\n                        \"timestamp\": \"2013-01-01T00:30:00\",\n                        \"tou_modifier\": 0,\n                        \"uptime\": 100\n                    },\n                    \"model\": \"SM25R\",\n                    \"operating_mode\": 2,\n                    \"plan_balance\": 0,\n                    \"postalcode\": \"12345\",\n                    \"serial\": \"SM15R-01-00000001\",\n                    \"state\": \"state\",\n                    \"street1\": \"strëet\",\n                    \"street2\": \"street2\",\n                    \"tags\": [],\n                    \"total_cycle_energy\": 0\n                }\n            ],\n            \"name\": \"strëet\",\n            \"phone_number\": \"+18008000001\",\n            \"phone_number_verified\": true\n        }\n    ],\n    \"error\": null,\n    \"status\": \"success\"\n}"},{"id":"e1aea762-0bc8-428c-99e0-c674136a8eab","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers?meter_serial=SM16R-01-00001234","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers"],"query":[{"key":"meter_serial","value":"SM16R-01-00001234"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Encoding","value":"gzip","name":"Content-Encoding","description":""},{"key":"Content-Length","value":"481","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnj_Q.3K5yv86EWLJr2PuvkxxcHMgdMZM; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnj_Q.3K5yv86EWLJr2PuvkxxcHMgdMZM","key":"session"}],"responseTime":null,"body":"{\n    \"customers\": [\n        {\n            \"code\": \"customer code 1\",\n            \"credit_balance\": 0,\n            \"debt_balance\": 0,\n            \"ground\": {\n                \"id\": \"00000002-0000-0000-0000-000000000001\",\n                \"name\": \"test micrøgrid 1\"\n            },\n            \"id\": \"0000000c-0000-0000-0000-000000000001\",\n            \"meters\": [\n                {\n                    \"active\": true,\n                    \"address\": \"strëet, street2, city, 12345, state, usa\",\n                    \"city\": \"city\",\n                    \"coords\": \"42.5646975,-71.2708356\",\n                    \"country\": \"usa\",\n                    \"current_tariff_name\": \"tarïff01\",\n                    \"is_running_plan\": false,\n                    \"last_config_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_energy\": 0,\n                    \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_meter_state_code\": 1,\n                    \"operating_mode\": 2,\n                    \"plan_balance\": 0,\n                    \"postalcode\": \"12345\",\n                    \"serial\": \"SM15R-01-00000001\",\n                    \"state\": \"state\",\n                    \"street1\": \"strëet\",\n                    \"street2\": \"street2\",\n                    \"tags\": [],\n                    \"total_cycle_energy\": 0\n                }\n            ],\n            \"name\": \"strëet\",\n            \"phone_number\": \"+18008000001\",\n            \"phone_number_verified\": true\n        }\n    ],\n    \"error\": null,\n    \"status\": \"success\"\n}"}],"_postman_id":"99996dda-3698-4879-9fdd-880e07fc7d70"},{"name":"Get Customer List Filtered by Two Parameters","event":[{"listen":"test","script":{"id":"6fde6e9d-d648-4e90-985d-8e81a9a9a345","exec":["var rCode = responseCode.code;","var jsonResponse = JSON.parse(responseBody);","var userID = '';","","if (rCode === 200) {","    tests[\"Status code is 200\"] = responseCode.code === 200;","    tests[\"Verifying customers list object exists\"] = 'customers' in jsonResponse;","    tests[\"Verifying credit balance of first customer in list\"] = 'credit_balance' in jsonResponse.customers[0] && jsonResponse.customers[0].credit_balance === 1000;","    tests[\"Verifying meter object exists\"] = 'meters' in jsonResponse.customers[0];","    tests[\"Verifying Tariff of first customer in list\"] = jsonResponse.customers[0].meters[0].current_tariff_name === \"ET4\";","    tests[\"Verifying operating mode of first customer in list\"] = jsonResponse.customers[0].meters[0].operating_mode === 2;","    tests[\"Verifying meter serial of first custoemr/meter in list\"] = jsonResponse.customers[0].meters[0].serial === \"SM15R-01-000002D0\";","} else {","    // Code to handle error response","}","","userID = jsonResponse.customers[0].id;","","postman.setEnvironmentVariable('userId',userID);"],"type":"text/javascript"}}],"id":"315feb4d-5f1c-4880-97a0-1687b0b4458c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/customers?meter_tariff_name=TARIFF_NAME&meter_serial=METER_SERIAL","description":"<p>This call returns a filtered list of customers by multiple parameters.</p>\n<p>As introduced in <strong>Get Customer List</strong>, following parameters can be used to filter the customer list:</p>\n<ul>\n<li><code>customer_code</code> </li>\n<li><code>customer_phone_number</code></li>\n<li><code>meter_serial</code></li>\n<li><code>meter_tariff_name</code> </li>\n<li><code>ground_id</code> </li>\n<li><code>ground_name</code></li>\n<li><code>customers_only</code></li>\n<li><code>reading_details</code></li>\n</ul>\n<p>Make sure that the <code>GET</code> URL is correct and following the correct syntax. </p>\n<ul>\n<li>URL syntax is <code>/api/v0/customers?parameter1='value1'&amp;parameter2='value2'</code></li>\n<li><code>customer_code</code> is the value under \"Customer code:\" in the meter information page</li>\n<li><code>customer_phone_number</code> is a value of country code and phone number without dashes</li>\n<li><code>meter_serial</code> is the value as displayed with dashes included</li>\n<li><code>meter_tariff_name</code> is the name of the tariff </li>\n<li><code>ground_id</code> is the value as displayed from <strong>Get System Info</strong> with dashes included</li>\n<li><code>ground_name</code> is the value as displayed from <strong>Get System Info</strong></li>\n<li><code>customers_only</code> is <code>true</code> if the returned meters should be restricted to customers only. <code>false</code> by default. (<em>Added in version 1.13</em>).</li>\n<li><code>reading_details</code> (case insensitive) - <code>true</code> if the latest reading should be returned with each meter. <code>false</code> by default (<em>Added in version 1.14</em>).</li>\n</ul>\n<p><em>Example:</em></p>\n<ul>\n<li>If serial of the meter is SM15R-01-00000001 and it is connected to tariff called ET1, URL should be <code>http://cloud.sparkmeter.io/api/v0/customers?meter_serial=SM15R-01-00000001&amp;meter_tariff_name=ET1</code></li>\n</ul>\n<p><em>Introduced in version 1.4, updated in version 1.13 to include the <code>customers_only</code> parameter and to include the <code>last_meter_state_code</code> and <code>last_config_datetime</code> in the response, updated in version 1.14 to accept the <code>reading_details</code> parameter, updated in version 1.15 to include the <code>frequency</code> in the <code>latest_reading</code> response.</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","customers"],"host":["SITE","sparkmeter","cloud"],"query":[{"key":"meter_tariff_name","value":"TARIFF_NAME"},{"key":"meter_serial","value":"METER_SERIAL"}],"variable":[]}},"response":[{"id":"43c63d48-0ca7-41bc-b525-19bae4d8ed19","name":"200 OK with reading details","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers?meter_tariff_name=tarïff01&meter_serial=SM16R-01-00001234&reading_details=true","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers"],"query":[{"key":"meter_tariff_name","value":"tarïff01"},{"key":"meter_serial","value":"SM16R-01-00001234"},{"key":"reading_details","value":"true"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"customers\": [\n        {\n            \"code\": null,\n            \"credit_balance\": null,\n            \"debt_balance\": null,\n            \"ground\": {\n                \"id\": \"00000002-0000-0000-0000-000000000001\",\n                \"name\": \"test micrøgrid 1\"\n            },\n            \"id\": null,\n            \"meters\": [\n                {\n                    \"active\": true,\n                    \"address\": \"strëet, street2, city, 12345, state, usa\",\n                    \"bootloader\": \"def456\",\n                    \"city\": \"city\",\n                    \"coords\": \"42.5646975,-71.2708356\",\n                    \"country\": \"usa\",\n                    \"current_tariff_name\": null,\n                    \"firmware\": \"abc1234\",\n                    \"is_running_plan\": null,\n                    \"last_config_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_energy\": 0,\n                    \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_meter_state_code\": 1,\n                    \"latest_reading\": {\n                        \"avg_apparent_power\": 1,\n                        \"avg_current\": 1,\n                        \"avg_power_factor\": 1,\n                        \"avg_true_power\": 1,\n                        \"avg_voltage\": 120,\n                        \"cost\": 1,\n                        \"frequency\": 50.0,\n                        \"instantaneous_true_power\": 1,\n                        \"kilowatt_hours\": 1.1,\n                        \"max_current\": 1,\n                        \"max_voltage\": 120,\n                        \"min_current\": 1,\n                        \"min_voltage\": 120,\n                        \"rate\": 0,\n                        \"timestamp\": \"2013-01-01T01:00:00\",\n                        \"tou_modifier\": 0,\n                        \"uptime\": 100\n                    },\n                    \"model\": \"SM25R\",\n                    \"operating_mode\": 2,\n                    \"plan_balance\": null,\n                    \"postalcode\": \"12345\",\n                    \"serial\": \"SM200E-01-00000011\",\n                    \"state\": \"state\",\n                    \"street1\": \"strëet\",\n                    \"street2\": \"street2\",\n                    \"tags\": [],\n                    \"total_cycle_energy\": null\n                }\n            ],\n            \"name\": null,\n            \"phone_number\": null,\n            \"phone_number_verified\": null\n        },\n        {\n            \"code\": \"customer code 1\",\n            \"credit_balance\": 0,\n            \"debt_balance\": 0,\n            \"ground\": {\n                \"id\": \"00000002-0000-0000-0000-000000000001\",\n                \"name\": \"test micrøgrid 1\"\n            },\n            \"id\": \"0000000c-0000-0000-0000-000000000001\",\n            \"meters\": [\n                {\n                    \"active\": true,\n                    \"address\": \"strëet, street2, city, 12345, state, usa\",\n                    \"bootloader\": \"def456\",\n                    \"city\": \"city\",\n                    \"coords\": \"42.5646975,-71.2708356\",\n                    \"country\": \"usa\",\n                    \"current_tariff_name\": \"tarïff01\",\n                    \"firmware\": \"abc1234\",\n                    \"is_running_plan\": false,\n                    \"last_config_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_cycle_start\": null,\n                    \"last_energy\": 0,\n                    \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_meter_state_code\": 1,\n                    \"last_plan_expiration_date\": null,\n                    \"last_plan_payment_date\": null,\n                    \"latest_reading\": {\n                        \"avg_apparent_power\": 1,\n                        \"avg_current\": 1,\n                        \"avg_power_factor\": 1,\n                        \"avg_true_power\": 1,\n                        \"avg_voltage\": 120,\n                        \"cost\": 1,\n                        \"instantaneous_true_power\": 1,\n                        \"kilowatt_hours\": 1.1,\n                        \"max_current\": 1,\n                        \"max_voltage\": 120,\n                        \"min_current\": 1,\n                        \"min_voltage\": 120,\n                        \"rate\": 0,\n                        \"timestamp\": \"2013-01-01T00:30:00\",\n                        \"tou_modifier\": 0,\n                        \"uptime\": 100\n                    },\n                    \"model\": \"SM25R\",\n                    \"operating_mode\": 2,\n                    \"plan_balance\": 0,\n                    \"postalcode\": \"12345\",\n                    \"serial\": \"SM15R-01-00000001\",\n                    \"state\": \"state\",\n                    \"street1\": \"strëet\",\n                    \"street2\": \"street2\",\n                    \"tags\": [],\n                    \"total_cycle_energy\": 0\n                }\n            ],\n            \"name\": \"strëet\",\n            \"phone_number\": \"+18008000001\",\n            \"phone_number_verified\": true\n        },\n        {\n            \"code\": \"customer code 2\",\n            \"credit_balance\": 0,\n            \"debt_balance\": 0,\n            \"ground\": {\n                \"id\": \"00000002-0000-0000-0000-000000000001\",\n                \"name\": \"test micrøgrid 1\"\n            },\n            \"id\": \"0000000c-0000-0000-0000-000000000002\",\n            \"meters\": [\n                {\n                    \"active\": true,\n                    \"address\": \"strëet, street2, city, 12345, state, usa\",\n                    \"bootloader\": \"def456\",\n                    \"city\": \"city\",\n                    \"coords\": \"42.5646975,-71.2708356\",\n                    \"country\": \"usa\",\n                    \"current_tariff_name\": \"tarïff01\",\n                    \"firmware\": \"abc1234\",\n                    \"is_running_plan\": false,\n                    \"last_config_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_cycle_start\": null,\n                    \"last_energy\": 0,\n                    \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_meter_state_code\": 1,\n                    \"last_plan_expiration_date\": null,\n                    \"last_plan_payment_date\": null,\n                    \"latest_reading\": {\n                        \"avg_apparent_power\": 1,\n                        \"avg_current\": 1,\n                        \"avg_power_factor\": 1,\n                        \"avg_true_power\": 1,\n                        \"avg_voltage\": 120,\n                        \"cost\": 1,\n                        \"instantaneous_true_power\": 1,\n                        \"kilowatt_hours\": 1.1,\n                        \"max_current\": 1,\n                        \"max_voltage\": 120,\n                        \"min_current\": 1,\n                        \"min_voltage\": 120,\n                        \"rate\": 0,\n                        \"timestamp\": \"2013-01-01T00:45:00\",\n                        \"tou_modifier\": 0,\n                        \"uptime\": 100\n                    },\n                    \"model\": \"SM25R\",\n                    \"operating_mode\": 2,\n                    \"plan_balance\": 0,\n                    \"postalcode\": \"12345\",\n                    \"serial\": \"SM15R-01-00000002\",\n                    \"state\": \"state\",\n                    \"street1\": \"strëet\",\n                    \"street2\": \"street2\",\n                    \"tags\": [],\n                    \"total_cycle_energy\": 0\n                }\n            ],\n            \"name\": \"strëet\",\n            \"phone_number\": \"+18008000002\",\n            \"phone_number_verified\": true\n        }\n    ],\n    \"error\": null,\n    \"status\": \"success\"\n}"},{"id":"8938bfe1-99aa-425c-9086-88885da0002d","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers?meter_tariff_name=tarïff01&meter_serial=SM16R-01-00001234","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers"],"query":[{"key":"meter_tariff_name","value":"tarïff01"},{"key":"meter_serial","value":"SM16R-01-00001234"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Encoding","value":"gzip","name":"Content-Encoding","description":""},{"key":"Content-Length","value":"481","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnkmw.7kfL5M6-iJ-Bff8gUFYUZDiT3sY; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnkmw.7kfL5M6-iJ-Bff8gUFYUZDiT3sY","key":"session"}],"responseTime":null,"body":"{\n    \"customers\": [\n        {\n            \"code\": \"customer code 1\",\n            \"credit_balance\": 0,\n            \"debt_balance\": 0,\n            \"ground\": {\n                \"id\": \"00000002-0000-0000-0000-000000000001\",\n                \"name\": \"test micrøgrid 1\"\n            },\n            \"id\": \"0000000c-0000-0000-0000-000000000001\",\n            \"meters\": [\n                {\n                    \"active\": true,\n                    \"address\": \"strëet, street2, city, 12345, state, usa\",\n                    \"city\": \"city\",\n                    \"coords\": \"42.5646975,-71.2708356\",\n                    \"country\": \"usa\",\n                    \"current_tariff_name\": \"tarïff01\",\n                    \"is_running_plan\": false,\n                    \"last_config_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_energy\": 0,\n                    \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_meter_state_code\": 1,\n                    \"operating_mode\": 2,\n                    \"plan_balance\": 0,\n                    \"postalcode\": \"12345\",\n                    \"serial\": \"SM15R-01-00000001\",\n                    \"state\": \"state\",\n                    \"street1\": \"strëet\",\n                    \"street2\": \"street2\",\n                    \"tags\": [],\n                    \"total_cycle_energy\": 0\n                }\n            ],\n            \"name\": \"Customer #1\",\n            \"phone_number\": \"+18008000001\",\n            \"phone_number_verified\": true\n        },\n        {\n            \"code\": \"customer code 2\",\n            \"credit_balance\": 0,\n            \"debt_balance\": 0,\n            \"ground\": {\n                \"id\": \"00000002-0000-0000-0000-000000000001\",\n                \"name\": \"test micrøgrid 1\"\n            },\n            \"id\": \"0000000c-0000-0000-0000-000000000002\",\n            \"meters\": [\n                {\n                    \"active\": true,\n                    \"address\": \"strëet, street2, city, 12345, state, usa\",\n                    \"city\": \"city\",\n                    \"coords\": \"42.5646975,-71.2708356\",\n                    \"country\": \"usa\",\n                    \"current_tariff_name\": \"tarïff01\",\n                    \"is_running_plan\": false,\n                    \"last_config_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_energy\": 0,\n                    \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n                    \"last_meter_state_code\": 1,\n                    \"operating_mode\": 2,\n                    \"plan_balance\": 0,\n                    \"postalcode\": \"12345\",\n                    \"serial\": \"SM15R-01-00000002\",\n                    \"state\": \"state\",\n                    \"street1\": \"strëet\",\n                    \"street2\": \"street2\",\n                    \"tags\": [],\n                    \"total_cycle_energy\": 0\n                }\n            ],\n            \"name\": \"Customer #2\",\n            \"phone_number\": \"+18008000002\",\n            \"phone_number_verified\": true\n        }\n    ],\n    \"error\": null,\n    \"status\": \"success\"\n}"},{"id":"8be2cb0c-2d93-41cb-ac1e-342535af5507","name":"404 Not Found","originalRequest":{"header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers?meter_tariff_name=tarïff01&meter_serial=SM16R-01-00001235","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers"],"query":[{"key":"meter_tariff_name","value":"tarïff01"},{"key":"meter_serial","value":"SM16R-01-00001235"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"56","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnlig.tKRr_wJ1nxGJwOEheJ--09AW4f4; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnlig.tKRr_wJ1nxGJwOEheJ--09AW4f4","key":"session"}],"responseTime":null,"body":"{\n  \"error\": \"no such customer\",\n  \"status\": \"failure\"\n}"}],"_postman_id":"315feb4d-5f1c-4880-97a0-1687b0b4458c"},{"name":"Add Customer","event":[{"listen":"prerequest","script":{"id":"e9706b5d-5745-4cb5-8a0a-a7be885121e9","exec":["    "],"type":"text/javascript"}}],"id":"a01a626b-eb1d-4efa-a213-946e0807282a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"serial\": \"SM60R-12-12345678\",\n\t\"meter_tariff_name\": \"Pre-paid Tariff\",\n\t\"ground_serial\": \"f5t5oBvBV0IFGjwh3Hkc\",\n\t\"name\": \"Mr Johnson\",\n\t\"code\": \"CUSTOMER001\",\n\t\"phone_number\": \"+2348063021771\",\n\t\"operating_mode\": \"on\",\n\t\"address\": \"101 Main St, Springfield, VA, US\",\n\t\"starting_credit_balance\": \"200\"\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/customer/","description":"<p>This call creates a <strong>customer meter</strong> in the <strong>ThunderCloud</strong> system. Totalizers cannot be created with this call.</p>\n<p>Any customer meters created through this call will have their phone number verified automatically, if a number is provided.</p>\n<p><em>Typical use cases:</em></p>\n<p>Creating a customer meter based on information external to the SparkMeter system.</p>\n<p><em>Parameters</em></p>\n<ul>\n<li><code>serial</code>, string, required, unique. A meter serial that represents the customer. Example <strong>SM60R-12-12345678</strong>.</li>\n<li><code>meter_tariff_name</code>, string, required. Name of the tariff for this meter. The tariff must be added to the SparkMeter prior to this call. Example <strong>Pre-paid Tariff</strong>.</li>\n<li><code>name</code>, string, optional. Name of the customer to create. Example <strong>Mr Johnson</strong>.</li>\n<li><code>code</code>, string, optional, unique. Code of the customer, this can be used to reference a customer in an external system. Example <strong>CUSTOMER001</strong>.</li>\n<li><code>phone_number</code>, string, optional. Phone number, formatted in E.164 format. Example <strong>+23410000000</strong>.</li>\n<li><code>operating_mode</code>, string, optional. Operating mode for the meter. Defaults to \"on\" if not specified. Example <strong>auto</strong>.<ul>\n<li><code>off</code> = Meter is turned Off.</li>\n<li><code>on</code> = Meter is turned On, this customer does not require credits are not needed to operate his meter.</li>\n<li><code>auto</code> = Meter is set to Auto mode, this customer requires credits to operate his meter.</li>\n</ul>\n</li>\n<li><code>starting_credit_balance</code>, number, optional. Initial credit balance of the customer meter. Example: <strong>200</strong>.</li>\n<li><code>coords</code>, string, optional. Comma-delimited coordinates of the meter. Example <strong>23.0, -12.455</strong> ( <em>Added in version 1.13</em> )</li>\n<li><code>address</code> (DEPRECATED - USE THE ADDRESS COMPONENT FIELDS INSTEAD), string, optional. Address of the meter. Example <strong>101 Main St, Springfield, VA, US</strong>.</li>\n</ul>\n<p>If any of the address component fields below are specified, they must all be present in the request.</p>\n<ul>\n<li><code>street1</code>, string, optional. First street component of the meter's address. Example <strong>101 Main St</strong>. ( <em>Added in version 1.13</em> )</li>\n<li><code>street2</code>, string, optional. Second street component of the meter's address. Example <strong>Suite 900</strong>. ( <em>Added in version 1.13</em> )</li>\n<li><code>city</code>, string, optional. City component of the meter's address. Example <strong>Springfield</strong>. ( <em>Added in version 1.13</em> )</li>\n<li><code>state</code>, string, optional. State (or province) component of the meter's address. Example <strong>VA</strong>. ( <em>Added in version 1.13</em> )</li>\n<li><code>postalcode</code>, string, optional. Postal code component of the meter's address. Example <strong>20006</strong>. ( <em>Added in version 1.13</em> )</li>\n<li><code>country</code>, string, optional. Country component of the meter's address. Example <strong>USA</strong>. ( <em>Added in version 1.13</em> )</li>\n<li><code>tags</code>, array of strings, optional, Tags to be associated with the meter. A tag cannot contain a comma (<code>,</code>) or a space (<code> </code>). Example <strong>['tag1', 'tag2', 'tag3']</strong>. ( <em>Added in version 1.14</em> )</li>\n</ul>\n<p><em>Introduced in version 1.5, updated in version 1.13 to deprecate the <code>address</code> field in favor of the address component fields, as well as the coords, updated in version 1.14 to accept tags.</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","customer",""],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[]}},"response":[{"id":"0affd119-8082-4fba-b1cb-7e8535ce2530","name":"400 Bad Request - Incorrect Serial Format","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"serial\": \"CUSTOMER\",\n\t\"meter_tariff_name\": \"Pre-paid Tariff\"\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/customer/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Invalid meter serial, must look like 'SMXXX-XX-XXXXXXXX'.\",\n    \"status\": \"failure\"\n}"},{"id":"34d41a2f-2a31-41cb-acb2-0c34042454e7","name":"400 Bad Request - Credit Balance Must Be a Number","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"serial\": \"SM60R-01-00001234\",\n\t\"meter_tariff_name\": \"Pre-paid Tariff\",\n\t\"starting_credit_balance\": \"AUTO\"\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/customer/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"bad parameter: starting_credit_balance, must be a number\",\n    \"status\": \"failure\"\n}"},{"id":"8be3da46-0009-4184-975c-62770a4dfd0f","name":"423 Customer Exists with Same Serial","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"serial\": \"SM60R-01-00001234\",\n\t\"meter_tariff_name\": \"Pre-paid Tariff\"\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/customer/"},"status":"Locked (WebDAV) (RFC 4918)","code":423,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"customer already exists with same meter serial\",\n    \"status\": \"failure\"\n}"},{"id":"a1810caf-34c2-45b8-8bba-fe93ebde660c","name":"201 Created","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"serial\": \"SM60R-12-12345678\",\n\t\"meter_tariff_name\": \"Pre-paid Tariff\",\n\t\"ground_serial\": \"f5t5oBvBV0IFGjwh3Hkc\",\n\t\"name\": \"Mr Johnson\",\n\t\"code\": \"12345678\",\n\t\"phone_number\": \"+2348063021771\",\n\t\"operating_mode\": \"on\",\n\t\"address\": \"101 Main St, Springfield, VA, US\",\n\t\"starting_credit_balance\": \"200\"\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/customer/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": null,\n    \"status\": \"success\",\n    \"customer_id\": \"1af7aafb-7940-4e14-b842-9e8356546bc2\"\n}"},{"id":"a6d84373-a46f-4d26-a8ec-4a353db7f13f","name":"423 Customer Exists with Same Code","originalRequest":{"method":"POST","header":[{"key":"Content-Type","type":"text","name":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"serial\": \"SM60R-01-00001234\",\n\t\"meter_tariff_name\": \"Pre-paid Tariff\",\n\t\"code\": \"CUSTOMER001\"\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/customer/"},"status":"Locked (WebDAV) (RFC 4918)","code":423,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"customer already exists with same code\",\n    \"status\": \"failure\"\n}"},{"id":"c1f623a0-791c-4005-9da1-de2244940057","name":"400 Bad Request - Empty Field (Ex: Code)","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"serial\": \"SM60R-01-00001234\",\n\t\"meter_tariff_name\": \"Pre-paid Tariff\",\n\t\"code\": \"\"\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/customer/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"bad parameter: code, cannot be empty\",\n    \"status\": \"failure\"\n}"},{"id":"d367a67d-cb0e-4ed7-88cb-b9755fbbb588","name":"404 Not Found - Tariff Does Not Exist","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"serial\": \"SM60R-01-00001234\",\n\t\"meter_tariff_name\": \"This is a non-existant Tariff\"\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/customer/"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"no such tariff\",\n    \"status\": \"failure\"\n}"},{"id":"f1f61693-7a2c-4ab2-b7a1-f9dcbdc5500b","name":"400 Bad Request - Invalid Operating Mode","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"serial\": \"SM60R-01-00001234\",\n\t\"meter_tariff_name\": \"Pre-paid Tariff\",\n\t\"operating_mode\": \"1\"\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/customer/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"invalid operating_mode, must be on/off or auto\",\n    \"status\": \"failure\"\n}"},{"id":"fa2815f8-d3b4-43b0-8977-4e32cab57edd","name":"400 Bad Request - Invalid Phone Number Format","originalRequest":{"method":"POST","header":[{"key":"Content-Type","type":"text","name":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"serial\": \"SM60R-01-00001234\",\n\t\"meter_tariff_name\": \"Pre-paid Tariff\",\n\t\"phone_number\": 16035551234\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/customer/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"bad parameter: phone_number, must be a phone number\",\n    \"status\": \"failure\"\n}"}],"_postman_id":"a01a626b-eb1d-4efa-a213-946e0807282a"},{"name":"Update Customer","event":[{"listen":"prerequest","script":{"id":"408aa192-9786-4f11-9ac1-aadd87d68f6b","exec":["    "],"type":"text/javascript"}}],"id":"e95ca544-c0a0-43ee-9e3f-6e7c38b42368","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n  \"active\": true,\n  \"name\": \"Mr Johnson\",\n  \"code\": \"12345678\",\n  \"phone_number\": \"+2348063021771\",\n  \"meter_tariff_name\": \"Pre-paid Tariff\",\n  \"operating_mode\": \"on\",\n  \"address\": \"101 Main St, Springfield, VA, US\"\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/customers/:customer_id","description":"<p>This call updates a <strong>customer meter</strong> in the <strong>ThunderCloud</strong> system. Totalizers cannot be updated with this call.</p>\n<p><em>Typical use cases:</em></p>\n<p>Updating the phone number of an already created customer.</p>\n<p><em>Parameters</em></p>\n<ul>\n<li><code>active</code>, bool, optional. True if the meter should be active, False if it should be archived. Example <em>True</em>.</li>\n<li><code>meter_tariff_name</code>, string, required. Name of the tariff for this meter. The tariff must be added to the SparkMeter prior to this call. Example <strong>Pre-paid Tariff</strong>.</li>\n<li><code>name</code>, string, optional. Name of the customer to create. Example <strong>Mr Johnson</strong>.</li>\n<li><code>code</code>, string, optional, unique. Code of the customer, this can be used to reference a customer in an external system. Example <strong>CUSTOMER001</strong>.</li>\n<li><code>phone_number</code>, string, optional. Phone number, formatted in E.164 format. Example <strong>+23410000000</strong>.</li>\n<li><code>operating_mode</code>, string, optional. Operating mode for the meter. Defaults to \"on\" if not specified. Example <strong>auto</strong>.<ul>\n<li><code>off</code> = Meter is turned Off.</li>\n<li><code>on</code> = Meter is turned On, this customer does not require credits are not needed to operate his meter.</li>\n<li><code>auto</code> = Meter is set to Auto mode, this customer requires credits to operate his meter.</li>\n</ul>\n</li>\n<li><code>coords</code>, string, optional. Comma-delimited coordinates of the meter. Example <strong>23.0, -12.455</strong> (<em>Added in version 1.13</em>).</li>\n<li><code>address</code> (DEPRECATED - USE THE ADDRESS COMPONENT FIELDS INSTEAD), string, optional. Address of the meter. Example <strong>101 Main St, Springfield, VA, US</strong>.</li>\n</ul>\n<p>If any of the address component fields below are specified, they must all be present in the request.</p>\n<ul>\n<li><code>street1</code>, string, optional. First street component of the meter's address. Example <strong>101 Main St</strong> (<em>Added in version 1.13</em>).</li>\n<li><code>street2</code>, string, optional. Second street component of the meter's address. Example <strong>Suite 900</strong> (<em>Added in version 1.13</em>).</li>\n<li><code>city</code>, string, optional. City component of the meter's address. Example <strong>Springfield</strong> (<em>Added in version 1.13</em>).</li>\n<li><code>state</code>, string, optional. State (or province) component of the meter's address. Example <strong>VA</strong> (<em>Added in version 1.13</em>).</li>\n<li><code>postalcode</code>, string, optional. Postal code component of the meter's address. Example <strong>20006</strong> (<em>Added in version 1.13</em>).</li>\n<li><code>country</code>, string, optional. Country component of the meter's address. Example <strong>USA</strong> (<em>Added in version 1.13</em>).</li>\n<li><code>tags</code>, array of strings, optional, Tags to be associated with the meter. New tags will be added, existing tags that aren't included will be removed from the meter, present tags will remain unchanged. A tag cannot contain a comma (<code>,</code>) or a space (<code> </code>). Example <strong>['tag1', 'tag2', 'tag3']</strong> (<em>Added in version 1.14</em>).</li>\n</ul>\n<p><em>Introduced in version 1.7, updated in version 1.13 to deprecate the <code>address</code> field in favor of the address component fields, as well as the coords, updated in version 1.14 to support updating the meter tags.</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","customers",":customer_id"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[{"id":"59447c40-817a-4e98-887b-fd0c56a66502","description":{"content":"<p>The internal ID of the customer</p>\n","type":"text/plain"},"type":"string","value":"","key":"customer_id"}]}},"response":[{"id":"217fc5ce-9c6d-4773-beec-d0d8aec443e7","name":"404 Not Found - Tariff Does Not Exist","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"meter_tariff_name\": \"This is a non-existant Tariff\"\n}"},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers/:customer_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers",":customer_id"],"variable":[{"key":"customer_id","value":"1364668-0e9954f7-ca48-9562-e5ca-d6ce1fdafcdf"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"no such tariff\",\n    \"status\": \"failure\"\n}"},{"id":"59227fdc-9b63-4500-95e4-9ff507823421","name":"400 Bad Request - Invalid Phone Number Format","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","type":"text","name":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"phone_number\": 16035551234\n}"},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers/:customer_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers",":customer_id"],"variable":[{"key":"customer_id","value":"1364668-0e9954f7-ca48-9562-e5ca-d6ce1fdafcdf"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"bad parameter: phone_number, must be a phone number\",\n    \"status\": \"failure\"\n}"},{"id":"73093f73-1fb6-47ad-875d-4db0fa310dde","name":"400 Bad Request - Invalid Operating Mode","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"meter_tariff_name\": \"Pre-paid Tariff\",\n\t\"operating_mode\": \"1\"\n}"},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers/:customer_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers",":customer_id"],"variable":[{"key":"customer_id","value":"1364668-0e9954f7-ca48-9562-e5ca-d6ce1fdafcdf"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"invalid operating_mode, must be on/off or auto\",\n    \"status\": \"failure\"\n}"},{"id":"8e6dd062-d235-406c-8680-8ae7378ddaf7","name":"423 Customer Exists with Same Code","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","type":"text","name":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"meter_tariff_name\": \"Pre-paid Tariff\",\n\t\"code\": \"CUSTOMER001\"\n}"},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers/:customer_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers",":customer_id"],"variable":[{"key":"customer_id","value":"1364668-0e9954f7-ca48-9562-e5ca-d6ce1fdafcdf"}]}},"status":"Locked (WebDAV) (RFC 4918)","code":423,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"customer already exists with same code\",\n    \"status\": \"failure\"\n}"},{"id":"f578c670-9534-4152-a5fd-ee636386f639","name":"400 Bad Request - Empty Field (Ex: Code)","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"meter_tariff_name\": \"Pre-paid Tariff\",\n\t\"code\": \"\"\n}"},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers/:customer_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers",":customer_id"],"variable":[{"key":"customer_id","value":"1364668-0e9954f7-ca48-9562-e5ca-d6ce1fdafcdf"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"bad parameter: code, cannot be empty\",\n    \"status\": \"failure\"\n}"},{"id":"fee54f3b-c34c-4399-96a8-d3b48490659d","name":"200 Updated","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"active\": true,\n\t\"name\": \"Mr Johnson\",\n\t\"code\": \"12345678\",\n\t\"phone_number\": \"+2348063021771\",\n\t\"meter_tariff_name\": \"Pre-paid Tariff\",\n\t\"operating_mode\": \"on\",\n\t\"address\": \"101 Main St, Springfield, VA, US\"\n}"},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers/:customer_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers",":customer_id"],"variable":[{"key":"customer_id","value":"1364668-0e9954f7-ca48-9562-e5ca-d6ce1fdafcdf"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"error\": null,\n    \"status\": \"success\",\n    \"customer_id\": \"1af7aafb-7940-4e14-b842-9e8356546bc2\"\n}"}],"_postman_id":"e95ca544-c0a0-43ee-9e3f-6e7c38b42368"},{"name":"Zero Customer Wallet Balance","id":"354211f4-8b03-4bf7-8c57-8868b7cd2812","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"url":"https://SITE.sparkmeter.cloud/api/v0/customers/:customer_id/wallet/:wallet_type/zero-balance","description":"<p>Set the balance of a customer's wallet to zero.</p>\n<p>This request will return an <code>event_id</code>, the status of which can be checked by querying the <code>event/</code> endpoint.</p>\n<p><code>status</code> can be one of \"pending\" or \"processed\"</p>\n<p><em>New in version 1.12</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","customers",":customer_id","wallet",":wallet_type","zero-balance"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[{"id":"abb8b9e2-da0b-4510-9d4c-37e097e5fd6b","description":{"content":"<p>The customer ID</p>\n","type":"text/plain"},"type":"string","value":"","key":"customer_id"},{"id":"05d704c7-d0c8-4be7-b127-8bd544f50a85","description":{"content":"<p>The wallet name (<code>credit</code>, <code>debt</code>, or <code>plan</code>)</p>\n","type":"text/plain"},"type":"string","value":"","key":"wallet_type"}]}},"response":[{"id":"5f659123-40cc-4f18-a161-18ea63d938ee","name":"400 Bad Request","originalRequest":{"method":"POST","header":[{"key":"Authentication-Token","type":"text","value":"authentication_token"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers/:customer_id/wallet/:wallet_type/zero-balance","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers",":customer_id","wallet",":wallet_type","zero-balance"],"variable":[{"description":"The customer ID","key":"customer_id","value":"c332ba9d-579d-4493-ac42-871ff226becf"},{"description":"The wallet name (`credit`, `debt`, or `plan`)","key":"wallet_type","value":"cash"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"invalid wallet type cash, must be one of: credit, debt, plan\",\n    \"status\": \"failure\"\n}"},{"id":"8a934ed8-4260-46cd-b6d7-7795ba42df53","name":"200 OK","originalRequest":{"method":"POST","header":[{"key":"Authentication-Token","type":"text","value":"authentication_token"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers/:customer_id/wallet/:wallet_type/zero-balance","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers",":customer_id","wallet",":wallet_type","zero-balance"],"variable":[{"description":"The customer ID","key":"customer_id","value":"c332ba9d-579d-4493-ac42-871ff226becf"},{"description":"The wallet name (`credit`, `debt`, or `plan`)","key":"wallet_type","value":"debt"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n\t\"error\": null,\n\t\"status\": \"success\",\n    \"event_id\": \"4230-d3881239-df820aab-099993\"\n}"},{"id":"b1aad819-f253-4282-bc0c-b8d7c018e89b","name":"404 Not Found","originalRequest":{"method":"POST","header":[{"key":"Authentication-Token","type":"text","value":"authentication_token"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers/:customer_id/wallet/:wallet_type/zero-balance","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers",":customer_id","wallet",":wallet_type","zero-balance"],"variable":[{"description":"The customer ID","key":"customer_id","value":"12"},{"description":"The wallet name (`credit`, `debt`, or `plan`)","key":"wallet_type","value":"debt"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n  \"error\": \"no such customer\",\n  \"status\": \"failure\"\n}"}],"_postman_id":"354211f4-8b03-4bf7-8c57-8868b7cd2812"},{"name":"Reset Meter","id":"b8a1baef-1f25-4d1d-8a3f-c69b03fc13d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"url":"https://SITE.sparkmeter.cloud/api/v0/customers/:customer_id/reset-meter","description":"<p>Reset meter state.</p>\n<p>This will clear the meter's error state (throttle error or protect) if one exists.</p>\n<p><em>New in version 1.14</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","customers",":customer_id","reset-meter"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[{"id":"abb8b9e2-da0b-4510-9d4c-37e097e5fd6b","description":{"content":"<p>The customer ID</p>\n","type":"text/plain"},"type":"string","value":"","key":"customer_id"}]}},"response":[{"id":"3a929844-d619-49e3-ad05-b80992f01013","name":"404 Not Found","originalRequest":{"method":"POST","header":[{"key":"Authentication-Token","type":"text","value":"authentication_token"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers/:customer_id/reset-meter","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers",":customer_id","reset-meter"],"variable":[{"description":"The customer ID","key":"customer_id","value":"12"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n  \"error\": \"no such customer\",\n  \"status\": \"failure\"\n}"},{"id":"a6b9d07e-36eb-421e-a67d-c22a8b056bf2","name":"200 OK","originalRequest":{"method":"POST","header":[{"key":"Authentication-Token","type":"text","value":"authentication_token"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/customers/:customer_id/reset-meter","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","customers",":customer_id","reset-meter"],"variable":[{"key":"customer_id","value":"c332ba9d-579d-4493-ac42-871ff226becf"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n\t\"error\": null,\n\t\"status\": \"success\"\n}"}],"_postman_id":"b8a1baef-1f25-4d1d-8a3f-c69b03fc13d2"}],"id":"07548a18-f018-44e2-b2b7-de26725c98a9","_postman_id":"07548a18-f018-44e2-b2b7-de26725c98a9","description":""},{"name":"Totalizer","item":[{"name":"Get Totalizer List","id":"d5387a3e-7f6f-4ea9-b847-1568682384e3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/totalizers","description":"<p>This call will return a list of all totalizers in your system.</p>\n<p>This returned list can be filtered by some parameters. The following parameters can be passed in to narrow down the search:</p>\n<ul>\n<li><code>meter_serial</code> (case insensitive)</li>\n</ul>\n<p>If no parameters are given, a list of all totalizers will be returned.</p>\n<p><em>Introduced in version 1.13</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","totalizers"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[]}},"response":[{"id":"6724bf0a-bb9d-43ba-beb1-571d7a355555","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/totalizers"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Encoding","value":"gzip","name":"Content-Encoding","description":""},{"key":"Content-Length","value":"694","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnhJg.oELAPnOSmpCPrYSy5yZVPdK5Rfg; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnhJg.oELAPnOSmpCPrYSy5yZVPdK5Rfg","key":"session"}],"responseTime":null,"body":"{\n    \"error\": null,\n    \"status\": \"success\",\n    \"totalizers\": [\n        {\n            \"active\": true,\n            \"address\": {\n                \"city\": \"city\",\n                \"coords\": \"42.5646975,-71.2708356\",\n                \"country\": \"usa\",\n                \"postalcode\": \"12345\",\n                \"state\": \"state\",\n                \"street1\": \"strëet\",\n                \"street2\": \"street2\"\n            },\n            \"ground\": {\n                \"id\": \"00000002-0000-0000-0000-000000000001\",\n                \"name\": \"test micrøgrid 1\"\n            },\n            \"is_running_plan\": null,\n            \"last_config_datetime\": \"2013-01-01T01:01:01\",\n            \"last_energy\": 0,\n            \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n            \"last_meter_state_code\": 1,\n            \"operating_mode\": 2,\n            \"serial\": \"SM15R-01-10000002\",\n            \"tags\": [],\n            \"total_cycle_energy\": null\n        },\n        {\n            \"active\": true,\n            \"address\": {\n                \"city\": \"city\",\n                \"coords\": \"42.5646975,-71.2708356\",\n                \"country\": \"usa\",\n                \"postalcode\": \"12345\",\n                \"state\": \"state\",\n                \"street1\": \"strëet\",\n                \"street2\": \"street2\"\n            },\n            \"ground\": {\n                \"id\": \"00000002-0000-0000-0000-000000000001\",\n                \"name\": \"test micrøgrid 1\"\n            },\n            \"is_running_plan\": null,\n            \"last_config_datetime\": \"2013-01-01T01:01:01\",\n            \"last_energy\": 0,\n            \"last_energy_datetime\": \"2013-01-01T01:01:01\",\n            \"last_meter_state_code\": 1,\n            \"operating_mode\": 2,\n            \"serial\": \"SM15R-01-10000003\",\n            \"tags\": [],\n            \"total_cycle_energy\": null\n        }\n    ]\n}"},{"id":"d4a2eea2-9e3d-4e91-8c53-781a90a0bc76","name":"401 Unauthorized","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"wrong_authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/totalizers"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"52","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFniOA.F938-xfKchnOIo7Pg-M_hO0jJbE; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFniOA.F938-xfKchnOIo7Pg-M_hO0jJbE","key":"session"}],"responseTime":null,"body":"{\n  \"error\": \"unauthorized\",\n  \"status\": \"failure\"\n}"}],"_postman_id":"d5387a3e-7f6f-4ea9-b847-1568682384e3"}],"id":"cdf2d235-a314-428e-a893-72d94f99a73d","_postman_id":"cdf2d235-a314-428e-a893-72d94f99a73d","description":""},{"name":"Tariff","item":[{"name":"Get Tariff List","id":"911430af-70da-4ec9-8b5f-470408dff0a9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"url":"https://SITE.sparkmeter.cloud/api/v0/tariffs","description":"<p>Get a list of all available tariffs.</p>\n<p><em>Introduced in version 1.12, updated in version 1.16 to include the <code>plan_duration</code> field</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","tariffs"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[]}},"response":[{"id":"5400652d-8539-4596-87f6-c5fc06a2273c","name":"401 Unauthorized","originalRequest":{"method":"GET","header":[],"url":"https://SITE.sparkmeter.cloud/api/v0/tariff"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n  \"error\": \"unauthorized\",\n  \"status\": \"failure\"\n}"},{"id":"a56d0344-39fa-4908-a56e-be8ac4b6182f","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":"https://SITE.sparkmeter.cloud/api/v0/tariff"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": null,\n    \"status\": \"success\",\n    \"tariffs\": [\n        {\n            \"blockrates\": [],\n            \"cycle_start_day_of_month\": 1,\n            \"flat_load_limit\": 12,\n            \"flat_rate\": 80.0,\n            \"id\": \"0bb57ddb-c426-4f8f-8092-36c115063329\",\n            \"load_limit_type\": \"flat\",\n            \"load_limits\": [],\n            \"low_balance_threshold\": 0.0,\n            \"monthly_plan_rate\": 0.0,\n            \"name\": \"Flat Tariff 1\",\n            \"plan_duration\": \"1m\",\n            \"plan_enabled\": false,\n            \"plan_fixed_fee\": 0.0,\n            \"tariff_type\": \"flat\",\n            \"tou_enabled\": false,\n            \"tous\": []\n        },\n        {\n            \"blockrates\": [],\n            \"cycle_start_day_of_month\": 1,\n            \"flat_load_limit\": 30,\n            \"flat_rate\": 60.0,\n            \"id\": \"bab67d42-3fdd-47a9-9d14-141e4b743fa9\",\n            \"load_limit_type\": \"flat\",\n            \"load_limits\": [],\n            \"low_balance_threshold\": 0.0,\n            \"monthly_plan_rate\": 0.0,\n            \"name\": \"Flat Tariff 2\",\n            \"plan_duration\": \"1m\",\n            \"plan_enabled\": false,\n            \"plan_fixed_fee\": 0.0,\n            \"tariff_type\": \"flat\",\n            \"tou_enabled\": false,\n            \"tous\": []\n        }\n\t]\n}"}],"_postman_id":"911430af-70da-4ec9-8b5f-470408dff0a9"},{"name":"Get Tariff Info","id":"29602578-ff95-457d-bfc1-8a358f6e86db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"url":"https://SITE.sparkmeter.cloud/api/v0/tariff/:tariff_id","description":"<p>Get an individual tariff by ID.</p>\n<p><em>Introduced in version 1.12, updated in version 1.16 to include the <code>plan_duration</code> field</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","tariff",":tariff_id"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[{"id":"739ac47a-33f1-4ce7-8866-bfc32150768b","description":{"content":"<p>The system ID  of the tariff</p>\n","type":"text/plain"},"type":"string","value":"","key":"tariff_id"}]}},"response":[{"id":"09ea06f6-9cfd-42b8-8297-88a5aeb024ed","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/tariff/:tariff_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","tariff",":tariff_id"],"variable":[{"key":"tariff_id","value":"0bb57ddb-c426-4f8f-8092-36c115063329","description":"The system ID  of the tariff"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": null,\n    \"status\": \"success\",\n    \"tariff\": {\n        \"blockrates\": [],\n        \"cycle_start_day_of_month\": 1,\n        \"flat_load_limit\": 12,\n        \"flat_rate\": 80,\n        \"id\": \"0bb57ddb-c426-4f8f-8092-36c115063329\",\n        \"load_limit_type\": \"flat\",\n        \"load_limits\": [],\n        \"low_balance_threshold\": 0,\n        \"monthly_plan_rate\": 0,\n        \"name\": \"Flat Tariff 1\",\n        \"plan_duration\": \"1m\",\n        \"plan_enabled\": false,\n        \"plan_fixed_fee\": 0,\n        \"tariff_type\": \"flat\",\n        \"tou_enabled\": false,\n        \"tous\": []\n    }\n}"},{"id":"7c8e8448-f274-467f-acaa-a76641fe7f39","name":"404 Not Found","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/tariff/:tariff_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","tariff",":tariff_id"],"variable":[{"key":"tariff_id","value":"0bb57ddb-c426-4f8f-8092-36c115063328","description":"The system ID  of the tariff"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"no such tariff\",\n    \"status\": \"failure\"\n}"},{"id":"8204fd1e-eef6-41ab-a756-dbbf62b70395","name":"401 Unauthorized","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/tariff/:tariff_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","tariff",":tariff_id"],"variable":[{"key":"tariff_id","value":"0bb57ddb-c426-4f8f-8092-36c115063329","description":"The system ID  of the tariff"}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"unauthorized\",\n    \"status\": \"failure\"\n}"}],"_postman_id":"29602578-ff95-457d-bfc1-8a358f6e86db"},{"name":"Add Tariff","id":"94af155d-7e99-4597-983e-2a5b0219654f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authentication-Token","type":"text","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"New Tariff\",\n    \"flat_load_limit\": 150,\n    \"plan_price\": 0,\n    \"cycle_start_day_of_month\": 1,\n    \"tariff_type\": \"flat\",\n    \"flat_price\": 4,\n    \"tous\": []\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/tariffs","description":"<p>Create a new tariff.</p>\n<p><em>Parameters</em></p>\n<ul>\n<li><code>name</code>, string, required, unique, the name of the tariff.</li>\n<li><code>cycle_start_day_of_month</code>, number, required, the day of the month on which the tariff cycle starts. If <code>plan_duration</code> is <code>1d</code>, this must be <code>1</code>.</li>\n<li><code>load_limit_type</code>, string, required, the load limit schedule for the tariff. One of <code>flat</code> or <code>scheduled</code>.<ul>\n<li><code>flat_load_limit</code>, number, required if <code>load_limit_type</code> is <code>flat</code>, the constant load limit for this tariff (in Watts).</li>\n<li><code>load_limits</code>, array of load limit objects (defined below), required if <code>load_limit_type</code> is <code>scheduled</code>, the load limit periods.</li>\n</ul>\n</li>\n<li><code>tariff_type</code>, string, required, either <code>flat</code> or <code>blockrate</code>.<ul>\n<li><code>flat_price</code>, number, required if <code>tariff_type</code> is <code>flat</code>, the unit price (per kWh).</li>\n<li><code>blockrates</code>, array of blockrate objects (defined below), required if <code>tariff_type</code> is <code>blockrate</code>, billing rate tiers.</li>\n</ul>\n</li>\n<li><code>low_balance_threshold</code>, number, the balance at which customers should be notified that their funds are running low.</li>\n<li><code>plan_enabled</code>, boolean, whether or not a monthly plan should be in effect.<ul>\n<li><code>plan_duration</code>, string, the duration of the plan - either <code>1d</code> (daily) or <code>1m</code> (monthly) (defaults to <code>1m</code>). (<em>Added in version 1.16</em>).</li>\n<li><code>plan_fixed_fee</code>, number, required if <code>plan_enabled</code> is <code>true</code>, the amount deducted from the customer's credit wallet when the plan is purchased. This not converted to electricity.</li>\n<li><code>plan_price</code>, number, required if <code>plan_enabled</code> is <code>true</code>, the minimum spend transferred from the customer's credit wallet to the plan when the plan is purchased until the plan balance reaches zero or its expiration date is reached.</li>\n</ul>\n</li>\n<li><code>tou_enabled</code>, boolean, whether time of use pricing should be enabled.<ul>\n<li><code>tous</code>, array of TOU objects (defined below), required if <code>tou_enabled</code> is <code>true</code>, time of use period definitions.</li>\n</ul>\n</li>\n<li><code>daily_energy_limit_enabled</code>, boolean, whether daily energy limits should be enable. (<em>Added in version 1.14</em>).<ul>\n<li><code>daily_energy_limit_value</code>, number, the amount of energy a customer can consume within a day (in kWh).</li>\n<li><code>daily_energy_limit_reset_hour</code>, integer from 0 to 23, the hour of the day (local time) on which the energy limit quota should reset.</li>\n</ul>\n</li>\n</ul>\n<p><em>TOU object properties</em></p>\n<ul>\n<li><code>start</code>, string, the start time, in HH:mm<ul>\n<li>The period must start on the hour (i.e., <code>mm = 00</code>)</li>\n</ul>\n</li>\n<li><code>end</code>, string, the end time, in HH:mm<ul>\n<li>The period must end on the hour (i.e., <code>mm = 00</code>)</li>\n</ul>\n</li>\n<li><code>value</code>, number, the pricing modifier (% of normal tariff)</li>\n</ul>\n<p><em>Blockrate object properties</em></p>\n<ul>\n<li><code>lower</code>, number, the lower bound of power consumption (in kWh)</li>\n<li><code>upper</code>, number, the upper bound of power consumption (in kWh)</li>\n<li><code>value</code>, number, the unit price (per kWh)</li>\n</ul>\n<p><em>Load limit object properties</em></p>\n<ul>\n<li><code>start</code>, string, the start time, in HH:mm<ul>\n<li>The period must start on the hour (i.e., <code>mm = 00</code>)</li>\n</ul>\n</li>\n<li><code>end</code>, string, the end time, in HH:mm<ul>\n<li>The period must end on the hour (i.e., <code>mm = 00</code>)</li>\n</ul>\n</li>\n<li><code>value</code>, number, the load limit (in Watts)</li>\n</ul>\n<p><em>Introduced in version 1.12, updated in version 1.14 to include daily energy limiting, updated in version 1.16 to support plan durations.</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","tariffs"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[]}},"response":[{"id":"788bdd42-0c70-4d88-afff-8aacd0405177","name":"400 Bad Request","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"\",\n    \"flat_load_limit\": 150,\n    \"plan_price\": 0,\n    \"cycle_start_day_of_month\": 1,\n    \"tariff_type\": \"flat\",\n    \"flat_price\": 4,\n    \"tous\": []\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/tariffs"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"There was an error creating the tariff.\",\n    \"name\": [\n        \"Please set a name for this tariff\"\n    ],\n    \"status\": \"failure\"\n}"},{"id":"7f7f841c-e73d-4bac-8d90-c4fdecd54b01","name":"201 Created","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"New Tariff\",\n    \"flat_load_limit\": 150,\n    \"plan_price\": 0,\n    \"cycle_start_day_of_month\": 1,\n    \"tariff_type\": \"flat\",\n    \"flat_price\": 4,\n    \"tous\": []\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/tariffs"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n  \"error\": null,\n  \"status\": \"success\",\n  \"tariff\": {\n    \"blockrates\": [],\n    \"cycle_start_day_of_month\": 1,\n    \"flat_load_limit\": 150,\n    \"flat_rate\": 4.0,\n    \"id\": \"0bb57ddb-c426-4f8f-8092-36c115063329\",\n    \"load_limit_type\": \"flat\",\n    \"load_limits\": [],\n    \"low_balance_threshold\": 0.0,\n    \"plan_duration\": false,\n    \"plan_enabled\": false,\n    \"monthly_plan_rate\": 0.0,\n    \"name\": \"New Tariff\",\n    \"plan_fixed_fee\": 0.0,\n    \"tariff_type\": \"flat\",\n    \"tou_enabled\": false,\n    \"tous\": []\n  }\n}"},{"id":"a50aa643-76c2-4f9d-a729-9ac5ba8d6698","name":"401 Unauthorized","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"New Tariff\",\n    \"flat_load_limit\": 150,\n    \"plan_price\": 0,\n    \"cycle_start_day_of_month\": 1,\n    \"tariff_type\": \"flat\",\n    \"flat_price\": 4,\n    \"tous\": []\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/tariffs"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"unauthorized\",\n    \"status\": \"failure\"\n}"}],"_postman_id":"94af155d-7e99-4597-983e-2a5b0219654f"},{"name":"Update Tariff","id":"b2447d9e-2a01-4a18-a189-ae057993b636","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authentication-Token","type":"text","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"Edited tariff\",\n    \"flat_load_limit\": 150,\n    \"flat_price\": 4,\n    \"load_limit_type\": \"flat\",\n    \"tariff_type\": \"flat\"\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/tariff/:tariff_id","description":"<p>Update an existing tariff. This will overwrite the tariff in its entirety, erasing fields that aren't specified.</p>\n<p><em>Parameters</em></p>\n<ul>\n<li><code>name</code>, string, required, unique, the name of the tariff.</li>\n<li><code>cycle_start_day_of_month</code>, number, required, the day of the month on which the tariff cycle starts. If <code>plan_duration</code> is <code>1d</code>, this must be <code>1</code>.</li>\n<li><code>load_limit_type</code>, string, required, the load limit schedule for the tariff. One of <code>flat</code> or <code>scheduled</code>.<ul>\n<li><code>flat_load_limit</code>, number, required if <code>load_limit_type</code> is <code>flat</code>, the constant load limit for this tariff (in Watts).</li>\n<li><code>load_limits</code>, array of load limit objects (defined below), required if <code>load_limit_type</code> is <code>scheduled</code>, the load limit periods.</li>\n</ul>\n</li>\n<li><code>tariff_type</code>, string, required, either <code>flat</code> or <code>blockrate</code>.<ul>\n<li><code>flat_price</code>, number, required if <code>tariff_type</code> is <code>flat</code>, the unit price (per kWh).</li>\n<li><code>blockrates</code>, array of blockrate objects (defined below), required if <code>tariff_type</code> is <code>blockrate</code>, billing rate tiers.</li>\n</ul>\n</li>\n<li><code>low_balance_threshold</code>, number, the balance at which customers should be notified that their funds are running low.</li>\n<li><code>plan_enabled</code>, boolean, whether or not a monthly plan should be in effect.<ul>\n<li><code>plan_duration</code>, string, the duration of the plan - either <code>1d</code> (daily) or <code>1m</code> (monthly) (defaults to <code>1m</code>). (<em>Added in version 1.16</em>).</li>\n<li><code>plan_fixed_fee</code>, number, required if <code>plan_enabled</code> is <code>true</code>, the amount deducted from the customer's credit wallet when the plan is purchased. This not converted to electricity.</li>\n<li><code>plan_price</code>, number, required if <code>plan_enabled</code> is <code>true</code>, the minimum spend transferred from the customer's credit wallet to the plan when the plan is purchased until the plan balance reaches zero or its expiration date is reached.</li>\n</ul>\n</li>\n<li><code>tou_enabled</code>, boolean, whether time of use pricing should be enabled.<ul>\n<li><code>tous</code>, array of TOU objects (defined below), required if <code>tou_enabled</code> is <code>true</code>, time of use period definitions.</li>\n</ul>\n</li>\n<li><code>daily_energy_limit_enabled</code>, boolean, whether daily energy limits should be enabled (<em>Added in version 1.14</em>).<ul>\n<li><code>daily_energy_limit_value</code>, number, the amount of energy a customer can consume within a day (in kWh).</li>\n<li><code>daily_energy_limit_reset_hour</code>, integer from 0 to 23, the hour of the day (local time) on which the energy limit quota should reset.</li>\n</ul>\n</li>\n</ul>\n<p><em>TOU object properties</em></p>\n<ul>\n<li><code>start</code>, string, the start time, in HH:mm<ul>\n<li>The period must start on the hour (i.e., <code>mm = 00</code>)</li>\n</ul>\n</li>\n<li><code>end</code>, string, the end time, in HH:mm<ul>\n<li>The period must end on the hour (i.e., <code>mm = 00</code>)</li>\n</ul>\n</li>\n<li><code>value</code>, number, the pricing modifier (% of normal tariff)</li>\n</ul>\n<p><em>Blockrate object properties</em></p>\n<ul>\n<li><code>lower</code>, number, the lower bound of power consumption (in kWh)</li>\n<li><code>upper</code>, number, the upper bound of power consumption (in kWh)</li>\n<li><code>value</code>, number, the unit price (per kWh)</li>\n</ul>\n<p><em>Load limit object properties</em></p>\n<ul>\n<li><code>start</code>, string, the start time, in HH:mm<ul>\n<li>The period must start on the hour (i.e., <code>mm = 00</code>)</li>\n</ul>\n</li>\n<li><code>end</code>, string, the end time, in HH:mm<ul>\n<li>The period must end on the hour (i.e., <code>mm = 00</code>)</li>\n</ul>\n</li>\n<li><code>value</code>, number, the load limit (in Watts)</li>\n</ul>\n<p><em>Introduced in version 1.12, updated in version 1.14 to include daily energy limiting, updated in version 1.16 to support plan duration.</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","tariff",":tariff_id"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[{"id":"ac1ba831-f95c-45d4-8d73-ea7e3fad5cb0","description":{"content":"<p>The system ID of the tariff</p>\n","type":"text/plain"},"type":"string","value":"","key":"tariff_id"}]}},"response":[{"id":"227b4e8b-8189-422b-a75d-e988ecb7dfd2","name":"400 Bad Request","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"Edited tariff\",\n    \"flat_load_limit\": 150,\n    \"flat_price\": 0,\n    \"load_limit_type\": \"flat\",\n    \"tariff_type\": \"flat\"\n}"},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/tariff/:tariff_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","tariff",":tariff_id"],"variable":[{"key":"tariff_id","value":"0bb57ddb-c426-4f8f-8092-36c115063329","description":"The system ID of the tariff"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n  \"error\": \"There was an error updating the tariff.\",\n  \"flat_price\": [\n    \"Please set a Flat Rate\"\n  ],\n  \"status\": \"failure\"\n}"},{"id":"7b5d32bd-65e0-4e57-ae3b-2872a651db86","name":"200 OK","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"Edited tariff\",\n    \"flat_load_limit\": 150,\n    \"flat_price\": 4,\n    \"load_limit_type\": \"flat\",\n    \"tariff_type\": \"flat\"\n}"},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/tariff/:tariff_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","tariff",":tariff_id"],"variable":[{"key":"tariff_id","value":"0bb57ddb-c426-4f8f-8092-36c115063329","description":"The system ID of the tariff"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n  \"error\": null,\n  \"status\": \"success\",\n  \"tariff\": {\n    \"blockrates\": [],\n    \"cycle_start_day_of_month\": 1,\n    \"flat_load_limit\": 150,\n    \"flat_rate\": 4.0,\n    \"id\": \"0bb57ddb-c426-4f8f-8092-36c115063329\",\n    \"load_limit_type\": \"flat\",\n    \"load_limits\": [],\n    \"low_balance_threshold\": 0.0,\n    \"plan_duration\": \"1m\",\n    \"plan_enabled\": false,\n    \"monthly_plan_rate\": 0.0,\n    \"name\": \"new tariff\",\n    \"plan_fixed_fee\": 0.0,\n    \"tariff_type\": \"flat\",\n    \"tou_enabled\": false,\n    \"tous\": []\n  }\n}"},{"id":"aeaf8492-9fa1-4f25-96ef-551f47132122","name":"401 Unauthorized","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"Edited tariff\",\n    \"flat_load_limit\": 150,\n    \"flat_price\": 4,\n    \"load_limit_type\": \"flat\",\n    \"tariff_type\": \"flat\"\n}"},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/tariff/:tariff_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","tariff",":tariff_id"],"variable":[{"key":"tariff_id","value":"0bb57ddb-c426-4f8f-8092-36c115063329","description":"The system ID of the tariff"}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"unauthorized\",\n    \"status\": \"failure\"\n}"}],"_postman_id":"b2447d9e-2a01-4a18-a189-ae057993b636"},{"name":"Partially Update Tariff","id":"c9fc4df8-f5df-4769-ab57-459057541402","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authentication-Token","type":"text","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n    \"tou_enabled\": true,\n    \"tous\": [\n        {\n            \"end\": \"24:00\",\n            \"id\": \"612aaccf-a86f-486e-82b4-3abd136f34ef\",\n            \"start\": \"00:00\",\n            \"value\": 100\n        }\n    ]\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/tariff/:tariff_id","description":"<p>Partially update an existing tariff.</p>\n<p>Complex objects, such as <code>tous</code>, must have the complete object provided.</p>\n<p><em>Parameters</em></p>\n<ul>\n<li><code>name</code>, string, unique, the name of the tariff.</li>\n<li><code>cycle_start_day_of_month</code>, number, the day of the month on which the tariff cycle starts. If <code>plan_duration</code> is <code>1d</code>, this must be <code>1</code>.</li>\n<li><code>load_limit_type</code>, string, the load limit schedule for the tariff. One of <code>flat</code> or <code>scheduled</code>.<ul>\n<li><code>flat_load_limit</code>, number, required if <code>load_limit_type</code> is <code>flat</code>, the constant load limit for this tariff (in Watts).</li>\n<li><code>load_limits</code>, array of load limit objects (defined below), required if <code>load_limit_type</code> is <code>scheduled</code>, the load limit periods.</li>\n</ul>\n</li>\n<li><code>tariff_type</code>, string, either <code>flat</code> or <code>blockrate</code>.<ul>\n<li><code>flat_price</code>, number, required if <code>tariff_type</code> is <code>flat</code>, the unit price (per kWh).</li>\n<li><code>blockrates</code>, array of blockrate objects (defined below), required if <code>tariff_type</code> is <code>blockrate</code>, billing rate tiers.</li>\n</ul>\n</li>\n<li><code>low_balance_threshold</code>, number, the balance at which customers should be notified that their funds are running low.</li>\n<li><code>plan_enabled</code>, boolean, whether or not a monthly plan should be in effect.<ul>\n<li><code>plan_duration</code>, string, the duration of the plan - either <code>1d</code> (daily) or <code>1m</code> (monthly) (defaults to <code>1m</code>). (<em>Added in version 1.16</em>).</li>\n<li><code>plan_fixed_fee</code>, number, required if <code>plan_enabled</code> is <code>true</code>, the amount deducted from the customer's credit wallet when the plan is purchased. This not converted to electricity.</li>\n<li><code>plan_price</code>, number, required if <code>plan_enabled</code> is <code>true</code>, the minimum spend transferred from the customer's credit wallet to the plan when the plan is purchased until the plan balance reaches zero or its expiration date is reached.</li>\n</ul>\n</li>\n<li><code>tou_enabled</code>, boolean, whether time of use pricing should be enabled.<ul>\n<li><code>tous</code>, array of TOU objects (defined below), required if <code>tou_enabled</code> is <code>true</code>, time of use period definitions.</li>\n</ul>\n</li>\n<li><code>daily_energy_limit_enabled</code>, boolean, whether daily energy limits should be enabled (<em>Added in version 1.14</em>).<ul>\n<li><code>daily_energy_limit_value</code>, number, the amount of energy a customer can consume within a day (in kWh).</li>\n<li><code>daily_energy_limit_reset_hour</code>, integer from 0 to 23, the hour of the day (local time) on which the energy limit quota should reset.</li>\n</ul>\n</li>\n</ul>\n<p><em>TOU object properties</em></p>\n<ul>\n<li><code>start</code>, string, the start time, in HH:mm<ul>\n<li>The period must start on the hour (i.e., <code>mm = 00</code>)</li>\n</ul>\n</li>\n<li><code>end</code>, string, the end time, in HH:mm<ul>\n<li>The period must end on the hour (i.e., <code>mm = 00</code>)</li>\n</ul>\n</li>\n<li><code>value</code>, number, the pricing modifier (% of normal tariff)</li>\n</ul>\n<p><em>Blockrate object properties</em></p>\n<ul>\n<li><code>lower</code>, number, the lower bound of power consumption (in kWh)</li>\n<li><code>upper</code>, number, the upper bound of power consumption (in kWh)</li>\n<li><code>value</code>, number, the unit price (per kWh)</li>\n</ul>\n<p><em>Load limit object properties</em></p>\n<ul>\n<li><code>start</code>, string, the start time, in HH:mm<ul>\n<li>The period must start on the hour (i.e., <code>mm = 00</code>)</li>\n</ul>\n</li>\n<li><code>end</code>, string, the end time, in HH:mm<ul>\n<li>The period must end on the hour (i.e., <code>mm = 00</code>)</li>\n</ul>\n</li>\n<li><code>value</code>, number, the load limit (in Watts)</li>\n</ul>\n<p><em>Introduced in version 1.12, updated in version 1.14 to include energy limiting, updated in version 1.16 to support plan durations.</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","tariff",":tariff_id"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[{"id":"5fa69bcf-6db5-4509-88f1-3e55b1fd3e81","description":{"content":"<p>The system ID of the tariff</p>\n","type":"text/plain"},"type":"string","value":"","key":"tariff_id"}]}},"response":[{"id":"0772344a-7157-47c5-8ceb-ee7b28788b2d","name":"200 OK","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"tou_enabled\": true,\n    \"tous\": [\n        {\n            \"end\": \"24:00\",\n            \"id\": \"612aaccf-a86f-486e-82b4-3abd136f34ef\",\n            \"start\": \"00:00\",\n            \"value\": 100\n        }\n    ]\n}"},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/tariff/:tariff_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","tariff",":tariff_id"],"variable":[{"key":"tariff_id","value":"0bb57ddb-c426-4f8f-8092-36c115063329","description":"The system ID of the tariff"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n  \"error\": null,\n  \"status\": \"success\",\n  \"tariff\": {\n    \"blockrates\": [],\n    \"cycle_start_day_of_month\": 1,\n    \"flat_load_limit\": 100,\n    \"flat_price\": 10.0,\n    \"id\": \"00000004-0000-0000-0000-000000000001\",\n    \"load_limit_type\": \"flat\",\n    \"load_limits\": [],\n    \"low_balance_threshold\": 0.0,\n    \"name\": \"Tariff\",\n    \"plan_duration\": \"1m\",\n    \"plan_enabled\": false,\n    \"plan_fixed_fee\": 0.0,\n    \"plan_price\": 0.0,\n    \"tariff_type\": \"flat\",\n    \"tou_enabled\": true,\n    \"tous\": [\n      {\n        \"end\": \"00:00\",\n        \"id\": \"612aaccf-a86f-486e-82b4-3abd136f34ef\",\n        \"start\": \"00:00\",\n        \"value\": 100\n      }\n    ]\n  }\n}"},{"id":"69137c02-23ed-457e-a83a-10adf35e7ebc","name":"401 Unauthorized","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\": \"Edited tariff\",\n    \"flat_load_limit\": 150,\n    \"flat_price\": 4,\n    \"load_limit_type\": \"flat\",\n    \"tariff_type\": \"flat\"\n}"},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/tariff/:tariff_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","tariff",":tariff_id"],"variable":[{"key":"tariff_id","value":"0bb57ddb-c426-4f8f-8092-36c115063329","description":"The system ID of the tariff"}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"unauthorized\",\n    \"status\": \"failure\"\n}"},{"id":"8355b139-1b0b-4d8c-bd27-73fb0e873ff1","name":"400 Bad Request","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"tariff_type\": \"semi-flat\"\n}"},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/tariff/:tariff_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","tariff",":tariff_id"],"variable":[{"key":"tariff_id","value":"0bb57ddb-c426-4f8f-8092-36c115063329","description":"The system ID of the tariff"}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"There was an error updating the tariff.\",\n    \"status\": \"failure\",\n    \"tariff_type\": [\n        \"Must be one of: flat, blockrate\"\n    ]\n}"}],"_postman_id":"c9fc4df8-f5df-4769-ab57-459057541402"}],"id":"9be1ecd9-5b16-4017-9000-4dd14c669667","description":"<p>Interact with system tariffs.</p>\n","_postman_id":"9be1ecd9-5b16-4017-9000-4dd14c669667"},{"name":"Transaction","item":[{"name":"Get Transaction Info","id":"8ce14639-da63-4c50-a6ea-a6e9caf85dd1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/transaction/:transaction_id","description":"<p>This call returns the status of a given transaction.</p>\n<p>The specified <code>transaction_id</code> can be either an internal id (returned as a response to a <strong>Create transaction</strong> call) or an external id (provided as an argument to a valid <strong>Create transaction</strong> call).</p>\n<p>The <code>status</code> field can take the following values:</p>\n<ul>\n<li><code>not-processed</code></li>\n<li><code>processed</code></li>\n<li><code>error</code></li>\n</ul>\n<p>If a connection can be established between ThunderCloud and the Base Station, it takes a few minutes for a transaction to change from <code>pending</code> to <code>processed</code>.</p>\n<p><em>Typical use case:</em> </p>\n<ul>\n<li>A few minutes after a <strong>Create transaction</strong> call, check that the transaction has been processed.</li>\n</ul>\n<p><em>Example:</em></p>\n<ul>\n<li>If a <code>transaction_id</code> is <code>f0e5344d-3bed-40f5-85d9-c08c3ba8b39c</code>, then URL should be <code>http://cloud.sparkmeter.io/api/v0/transaction/f0e5344d-3bed-40f5-85d9-c08c3ba8b39c</code></li>\n</ul>\n<p><em>Introduced in version 1.1, updated in version 1.12 to include the <code>memo</code> field</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","transaction",":transaction_id"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[{"id":"3f87e8e0-5327-4553-b650-d48e4b97ea22","type":"string","value":"","key":"transaction_id"}]}},"response":[{"id":"c7381b2a-2bb1-4172-9d9c-cf87b99edfc1","name":"200 OK","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/transaction/:transaction_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","transaction",":transaction_id"],"variable":[{"key":"transaction_id","value":"279d0bda-69c8-453c-9cce-1b5e5c00dcbb"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"681","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFn3vg.ACJm9WkzQ-LQY_HUoilPBInJ82k; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFn3vg.ACJm9WkzQ-LQY_HUoilPBInJ82k","key":"session"}],"responseTime":null,"body":"{\n    \"error\": null,\n    \"status\": \"success\",\n    \"transaction\": {\n        \"amount\": transaction_amount,\n        \"created\": \"creation_time\",\n        \"error\": null,\n        \"external_id\": null,\n        \"memo\": \"Optional note attached to a transaction\"\n        \"from\": {\n            \"id\": \"sales_account_id\",\n            \"sales_account\": {\n                \"name\": \"sales_account_name\",\n                \"type\": \"system\"\n            },\n            \"type\": \"sales-account\"\n        },\n        \"id\": \"279d0bda-69c8-453c-9cce-1b5e5c00dcbb\",\n        \"origin\": \"user\",\n        \"source\": \"transaction_source\",\n        \"status\": \"processed\",\n        \"to\": {\n            \"customer\": {\n                \"code\": \"123\",\n                \"name\": \"John Doe\"\n            },\n            \"id\": \"customer_id\",\n            \"type\": \"customer\"\n        },\n        \"type\": \"transaction_type\"\n    }\n}"},{"id":"d612e061-06b5-49cb-b700-8704ca470fc1","name":"404 Not Found","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/transaction/:transaction_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","transaction",":transaction_id"],"variable":[{"key":"transaction_id","value":"279d0bda-69c8-453c-9cce-1b5e5c00dcbb"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"59","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFn4aw.PG6_x0fpI7S-TW7OLu6knR0Os68; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFn4aw.PG6_x0fpI7S-TW7OLu6knR0Os68","key":"session"}],"responseTime":null,"body":"{\n  \"error\": \"no such transaction\",\n  \"status\": \"failure\"\n}"}],"_postman_id":"8ce14639-da63-4c50-a6ea-a6e9caf85dd1"},{"name":"Create Transaction","id":"380de863-858b-4b88-af5c-52c7f1b6ab36","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"customer_id","value":"","type":"text","description":"<p>required</p>\n"},{"key":"amount","value":"","type":"text","description":"<p>required</p>\n"},{"key":"source","value":"","type":"text","description":"<p>optional</p>\n","disabled":true},{"key":"external_id","value":"","description":"<p>optional</p>\n","type":"text","disabled":true},{"key":"memo","value":"","description":"<p>optional</p>\n","type":"text","disabled":true}]},"url":"https://SITE.sparkmeter.cloud/api/v0/transaction/","description":"<p>This call creates a transaction in the SparkMeter system, from the sales account matching the token used in the call, to a specified customer.</p>\n<p>The customer must be referenced by its internal <code>customer_id</code>, which can be obtained from a <strong>Customer Info</strong> call.</p>\n<p>Optionally, an <code>external_id</code> may be added as an argument. This id can be any string value, and SparkMeter strongly recommends that our customers use it when calling this API, so that they can reconcile transactions placed in their external systems with their counterpart in the SparkMeter portal. Using an <code>external_id</code> eliminates the possibility that a duplicate transaction might be made, and helps maintain traceability between systems.</p>\n<p>Negative value transactions may only be created by an API user with access to the system sales account, and may not have markup or spawn bonus transactions. The customer wallet may go into debt from this.</p>\n<p>All transactions can have a memo specified (limited to 300 characters) for additional notes and context.</p>\n<p><em>Typical use case:</em> </p>\n<ul>\n<li>Automatically insert mobile money transactions in the SparkMeter system.</li>\n</ul>\n<p><em>Example:</em></p>\n<ul>\n<li><code>customer_id</code>: 57b8a2e3-c3a1-4ea6-8cf5-209b645f8241</li>\n<li><code>amount</code>: 10 ( <em>Updated in version 1.12: negative values are permitted</em> )</li>\n<li><code>source</code>: cash (<code>source</code> can  be either 'cash' or 'bonus')</li>\n<li><code>external_id</code>: 123A</li>\n<li><code>memo</code>: Customer credit carried over from previous meter. (optional, <em>New in version 1.12</em> )</li>\n</ul>\n<p><em>Introduced in version 1.1, updated in version 1.12 to include the <code>memo</code> field and support negative value amounts</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","transaction",""],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[]}},"response":[{"id":"0827b17b-f07c-4e46-b2b3-6e046a0e6fa4","name":"404 Customer or Transaction Source Does Not Exist","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"customer_id","value":"","type":"text","description":"required"},{"key":"amount","value":"","type":"text","description":"required"},{"key":"source","value":"","type":"text","description":"optional","disabled":true},{"key":"external_id","value":"","description":"optional","type":"text","disabled":true}]},"url":"https://SITE.sparkmeter.cloud/api/v0/transaction/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":" {\n                \"error\": \"no such customer\",\n                \"status\": \"failed\"\n            }"},{"id":"220b8066-f857-49ed-bc2f-182b59ed51de","name":"400 Bad Request - Parameter cannot be empty","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"customer_id","value":"57b8a2e3-c3a1-4ea6-8cf5-209b645f8241","type":"text"},{"key":"amount","value":"100","type":"text"},{"key":"source","value":"","type":"text"},{"key":"external_id","value":"","type":"text"}]},"url":"https://SITE.sparkmeter.cloud/api/v0/transaction/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"78","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnoVg.KMm8BBybte6aHRrAwasNqpXA2HU; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnoVg.KMm8BBybte6aHRrAwasNqpXA2HU","key":"session"}],"responseTime":null,"body":"{\n  \"error\": \"bad parameter: source, cannot be empty\",\n  \"status\": \"failure\"\n}"},{"id":"4a8adff4-13d4-4ea7-9a3d-9798aad25a42","name":"422 Insufficient Funds","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"customer_id","value":"","type":"text","description":"required"},{"key":"amount","value":"","type":"text","description":"required"},{"key":"source","value":"","type":"text","description":"optional","disabled":true},{"key":"external_id","value":"","description":"optional","type":"text","disabled":true}]},"url":"https://SITE.sparkmeter.cloud/api/v0/transaction/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":" {\n                \"error\": \"insufficient funds\",\n                \"status\": \"failed\"\n            }"},{"id":"884eceb9-fc84-43e9-b88a-0b8a80804ff2","name":"201 Created","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"customer_id","value":"c332ba9d-579d-4493-ac42-871ff226becf","type":"text"},{"key":"amount","value":"100","type":"text"},{"key":"source","value":"cash","type":"text"},{"key":"external_id","value":"[optional]","type":"text"},{"key":"memo","value":"[optional]","type":"text"}]},"url":"https://SITE.sparkmeter.cloud/api/v0/transaction/"},"status":"CREATED","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"102","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Location","value":"http://0.0.0.0:5010/api/v0/transaction/70af4daa-4765-4b7d-b9ce-30eb4fbdf65e","name":"Location","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnnew.o9HyaA3IIsrN5RwoFiCc1q0TwY8; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnnew.o9HyaA3IIsrN5RwoFiCc1q0TwY8","key":"session"}],"responseTime":null,"body":"{\n  \"error\": null,\n  \"status\": \"success\",\n  \"transaction_id\": \"70af4daa-4765-4b7d-b9ce-30eb4fbdf65e\"\n}"},{"id":"f0db6304-ddf7-44f1-80b4-5d6ea3aeb2ef","name":"423 Transaction Already Exists","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"customer_id","value":"","type":"text","description":"required"},{"key":"amount","value":"","type":"text","description":"required"},{"key":"source","value":"","type":"text","description":"optional","disabled":true},{"key":"external_id","value":"","description":"optional","type":"text","disabled":true}]},"url":"https://SITE.sparkmeter.cloud/api/v0/transaction/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n                \"error\": \"transaction already exists\",\n                \"status\": \"failed\"\n            }         "}],"_postman_id":"380de863-858b-4b88-af5c-52c7f1b6ab36"},{"name":"Reverse Transaction","id":"617845ea-83fa-4f6c-b47a-f8a02eccd632","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"formdata","formdata":[]},"url":"https://SITE.sparkmeter.cloud/api/v0/transaction/:transaction_id/reverse","description":"<p>This call reverses a transaction, given a unique <code>transaction_id</code>. This is useful if, for some reason, the original transaction was mistakenly placed.</p>\n<p>You cannot call this endpoint under the following circumstances:</p>\n<ul>\n<li>Reversing a transaction when the transaction is in pending state.</li>\n<li>Reversing a transaction when the transaction has already been reversed.</li>\n</ul>\n<p>API users may cancel any transaction that can be reversed, not just those transactions the API user had placed.</p>\n<p>Make sure the <code>POST</code> URL is correctly modified with the correct <code>transaction_id</code>.</p>\n<p><em>Example:</em></p>\n<ul>\n<li>If the id of the transaction you wish to reverse is <code>7612a5f4-e451-4a71-b959-3ff3b6365dc2</code>, then the URL should be <a href=\"http://cloud.sparkmeter.io/api/v0/transaction/7612a5f4-e451-4a71-b959-3ff3b6365dc2/reverse\">http://cloud.sparkmeter.io/api/v0/transaction/7612a5f4-e451-4a71-b959-3ff3b6365dc2/reverse</a></li>\n</ul>\n<p><em>Introduced in version 1.4</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","transaction",":transaction_id","reverse"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[{"id":"c4eb6dde-68e5-4450-98bc-c9173a278f6b","type":"string","value":"279d0bda-69c8-453c-9cce-1b5e5c00dcbb","key":"transaction_id"}]}},"response":[{"id":"67b875ec-09a4-4b25-9c9e-6832e0a009f7","name":"404 Not Found","originalRequest":{"method":"POST","header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/transaction/:transaction_id/reverse","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","transaction",":transaction_id","reverse"],"variable":[{"key":"transaction_id","value":"279d0bda-69c8-453c-9cce-1b5e5c00dcbb"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"59","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnq0w.xhnGUDIkj19cSgwXftzS4mM26z4; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnq0w.xhnGUDIkj19cSgwXftzS4mM26z4","key":"session"}],"responseTime":null,"body":"{\n  \"error\": \"no such transaction\",\n  \"status\": \"failure\"\n}"},{"id":"df16dbf8-9a98-4d54-a31d-a10039b051e5","name":"201 Created","originalRequest":{"method":"POST","header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/transaction/:transaction_id/reverse","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","transaction",":transaction_id","reverse"],"variable":[{"key":"transaction_id","value":"279d0bda-69c8-453c-9cce-1b5e5c00dcbb"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"102","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Location","value":"http://0.0.0.0:5010/api/v0/transaction/8065f99e-e46d-46a4-9ddd-d9f38f24f30e","name":"Location","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnqNQ.rLD4wG4Eof7zVcR9RImgQn3nyyc; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Mon Jan 18 2038 18:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFnqNQ.rLD4wG4Eof7zVcR9RImgQn3nyyc","key":"session"}],"responseTime":null,"body":"{\n    \"error\": null,\n    \"status\": \"success\",\n    \"transaction_id\": \"transaction_id\"\n}"}],"_postman_id":"617845ea-83fa-4f6c-b47a-f8a02eccd632"}],"id":"393e4ea4-f796-4cf3-9910-8584c6d5946a","_postman_id":"393e4ea4-f796-4cf3-9910-8584c6d5946a","description":""},{"name":"Event","item":[{"name":"Get Event Info","id":"56f13cd7-c5b9-4c45-b9c7-bcebe0303fb2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"url":"https://SITE.sparkmeter.cloud/api/v0/event/:event_id","description":"<p>Check the status of a system event give an <code>event_id</code>. Currently, only the \"Zero Customer Wallet Balance\" event is supported.</p>\n<p>The response body will <em>always</em> contain the <code>id</code>, <code>created</code>, and <code>status</code> fields.  Additional fields will be returned based on the event type.</p>\n<p><em>Introduced in version 1.12</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","event",":event_id"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[{"id":"bfd6320e-96a5-4535-a0c7-9e015fbb1f4b","description":{"content":"<p>The ID of the event</p>\n","type":"text/plain"},"type":"string","value":"","key":"event_id"}]}},"response":[{"id":"0bfc5706-605d-4bd6-a0a3-d8a563777b55","name":"200 OK (Wallet Zeroing)","originalRequest":{"method":"GET","header":[{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/event/:event_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","event",":event_id"],"variable":[{"description":"The ID of the event","key":"event_id","value":"e2b94357-4b34-4871-86ef-51745a6247d4"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": null,\n    \"status\": \"success\",\n    \"type\": \"Customer wallet zero request received\",\n    \"event\": {\n        \"id\": \"e2b94357-4b34-4871-86ef-51745a6247d4\",\n        \"created\": \"2013-01-01T01:01:01\",\n        \"status\": \"pending\",\n        \"customer\": \"063d4c95-c3af-4bef-9941-16305da1c96e\",\n        \"wallet\": \"credit\"\n    }\n}"},{"id":"43c3616e-b989-4837-ab2f-701d36ec3e98","name":"200 OK (Base Event)","originalRequest":{"method":"GET","header":[{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/event/:event_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","event",":event_id"],"variable":[{"description":"The ID of the event","key":"event_id","value":"e2b94357-4b34-4871-86ef-51745a6247d4"}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": null,\n    \"status\": \"success\",\n    \"type\": \"Meter created\",\n    \"event\": {\n        \"id\": \"e2b94357-4b34-4871-86ef-51745a6247d4\",\n        \"created\": \"2013-01-01T01:01:01\",\n        \"status\": \"pending\"\n    }\n}"},{"id":"9865c820-4eeb-48cf-b095-e9bf7e73c58a","name":"404 Not Found","originalRequest":{"method":"GET","header":[{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/event/:event_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","event",":event_id"],"variable":[{"description":"The ID of the event","key":"event_id","value":"4230-d3881239-df820aab-099993"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"no such event\",\n    \"status\": \"failure\"\n}"}],"_postman_id":"56f13cd7-c5b9-4c45-b9c7-bcebe0303fb2"}],"id":"2f04056e-cf05-4b0b-834f-b460d170c5ba","description":"<p>Events are deferred actions the system takes.</p>\n","_postman_id":"2f04056e-cf05-4b0b-834f-b460d170c5ba"},{"name":"SMS","item":[{"name":"SMS Incoming","id":"694326fd-2c23-4d55-8f96-a082c363f69b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"phone_number","value":"+12221235678","type":"text"},{"key":"text","value":"CHECK","type":"text"}]},"url":"https://SITE.sparkmeter.cloud/api/v0/sms/incoming","description":"<p>This call is used to send an SMS including a command to the SparkMeter system, and receive a formatted message in return. The phone number used in the API call must belong to a customer in the SparkMeter system.</p>\n<p>Details of available SMS commands are listed in SMS Config page in SparkMeter application.</p>\n<p><em>Typical Use Cases:</em></p>\n<ul>\n<li>Send \"CHECK\" to verify a phone number</li>\n<li>Send \"BAL\" to receive information about customer's credit balance</li>\n</ul>\n<p>Make sure to follow the correct syntax for the phone number.</p>\n<p><em>Example:</em></p>\n<ul>\n<li>If phone number is +1-222-123-5678, then the phone number should be <code>+12221235678</code></li>\n</ul>\n<p><em>Introduced in version 1.2</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","sms","incoming"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[]}},"response":[{"id":"906b80f7-046e-43cd-9610-87104b0b3ecf","name":"423 ID In Use","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"phone_number","value":"%2B12221235678","type":"text"},{"key":"text","value":"CHECK","type":"text"}]},"url":"https://SITE.sparkmeter.cloud/api/v0/sms/incoming"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":" {\n                \"error\": \"message already exists\",\n                \"status\": \"error\"\n            }    "},{"id":"a3b78415-8b35-411d-8e38-86161a27914d","name":"201 OK","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"phone_number","value":"%2B12221235678","type":"text"},{"key":"text","value":"CHECK","type":"text"}]},"url":"https://SITE.sparkmeter.cloud/api/v0/sms/incoming"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"284","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFsutQ.8uxv8G2OfpWEOF-ZL6qf4RGmZUY; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFsutQ.8uxv8G2OfpWEOF-ZL6qf4RGmZUY","key":"session"}],"responseTime":null,"body":"{\n  \"error\": null,\n  \"message\": {\n    \"id\": \"fd69c057-1435-405f-a6a6-2d98f7798d76\",\n    \"phone_number\": \"+12221235678\",\n    \"text\": \"Thank you! This phone number has been added to new customer in SparkMeter.\",\n    \"timestamp\": \"2017-07-27T07:58:45.390056\"\n  },\n  \"status\": \"success\"\n}"},{"id":"c54ef0ec-125e-43d1-83d0-ce478294b02e","name":"400 Missing/Unintelligible Parameter","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"phone_number","value":"+","type":"text"},{"key":"text","value":"CHECK","type":"text"}]},"url":"http://cloud.sparkmeter.io/api/v0/sms/incoming"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[],"cookie":[],"responseTime":null,"body":"{\n                \"error\": \"missing parameter: phone_number\",\n                \"status\": \"error\"\n            }    "},{"id":"d8b3d098-e3c1-4dc3-a2f9-a44dba8da598","name":"202 Phone Number Not Recognized","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"phone_number","value":"+12221235678","type":"text"},{"key":"text","value":"CHECK","type":"text"}]},"url":"https://SITE.sparkmeter.cloud/api/v0/sms/incoming","description":"This call is used to send an SMS including a command to the SparkMeter system, and receive a formatted message in return. The phone number used in the API call must belong to a customer in the SparkMeter system.\n\n\nDetails of available SMS commands are listed in SMS Config page in SparkMeter application.\n\n*Typical Use Cases:*\n* Send \"CHECK\" to verify a phone number\n* Send \"BAL\" to receive information about customer's credit balance\n\n\nMake sure to follow the correct syntax for the phone number.\n\n*Example:*\n* If phone number is +1-222-123-5678, then the phone number should be `+12221235678`\n\n_Introduced in version 1.2_"},"status":"Accepted","code":202,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate","name":"Cache-Control","description":""},{"key":"Content-Length","value":"260","name":"Content-Length","description":""},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":""},{"key":"Expires","value":"0","name":"Expires","description":""},{"key":"Pragma","value":"no-cache","name":"Pragma","description":""},{"key":"Set-Cookie","value":"session=eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFsu9A.9YRrHXCHV4N3kQUedJc9EU64Nu8; HttpOnly; Path=/","name":"Set-Cookie","description":""}],"cookie":[{"expires":"Tue Jan 19 2038 03:14:07 GMT+0000 (Coordinated Universal Time)","httpOnly":true,"domain":"0.0.0.0","path":"/","secure":false,"value":"eyJfZnJlc2giOmZhbHNlLCJfaWQiOnsiIGIiOiJaVEJsT1dVeE9EaGlZV1UwT1RsaE5HUTFNRGd4TVRCbU56UTJNelF3WlRrPSJ9fQ.DFsu9A.9YRrHXCHV4N3kQUedJc9EU64Nu8","key":"session"}],"responseTime":null,"body":"{\n    \"error\": null,\n    \"message\": {\n        \"id\": \"f7b80158-ca10-410e-95d9-c21992de1a0e\",\n        \"phone_number\": \"wrong_phone_number\",\n        \"text\": \"This phone number is not recognized by SparkMeter.\",\n        \"timestamp\": \"2017-07-27T07:59:48.587086\"\n    },\n    \"status\": \"success\"\n}"}],"_postman_id":"694326fd-2c23-4d55-8f96-a082c363f69b"},{"name":"SMS Outgoing","id":"75d4df0a-9f68-4ac4-beed-3464b5003c99","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n\t\"mark_delivered\": true\n}"},"url":"https://SITE.sparkmeter.cloud/api/v0/sms/outgoing","description":"<p>This call returns the SMS Messages that are waiting to be delivered. By default, it marks them as delivered and removes them from the queue.</p>\n<p>You have the option to send the <code>mark_delivered</code> parameter in the request body. By default, this parameter is set to <code>true</code>, thus marking messages as delivered. </p>\n<p>Specify <code>false</code> to keep the messages in the queue.</p>\n<p><em>Example:</em></p>\n<ul>\n<li>If you want to mark the messages delivered, <code>GET</code> URL should be <code>http://cloud.sparkmeter.io/api/v0/sms/outgoing</code> with the body <code>{\"mark_delivered\": true}</code></li>\n<li>If you want to keep the messages in the queue, <code>GET</code> URL should be <code>http://cloud.sparkmeter.io/api/v0/sms/outgoing</code> with the body <code>{\"mark_delivered\": false}</code>*</li>\n</ul>\n<p><em>Introduced in version 1.2</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","sms","outgoing"],"host":["SITE","sparkmeter","cloud"],"query":[],"variable":[]}},"response":[{"id":"74d88ae2-bfdf-44c2-993f-1f13757141cd","name":"404 - No Outgoing Messages","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n    \"mark_delivered\": false\n}","options":{"raw":{"language":"json"}}},"url":"https://SITE.sparkmeter.cloud/api/v0/sms/outgoing"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"No outgoing messages in the queue\",\n    \"status\": \"failure\"\n}"},{"id":"82f568e1-d0d8-4d25-8b76-84e38b902251","name":"200 OK - Outgoing Messages","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token"}],"body":{"mode":"raw","raw":"{\n    \"mark_delivered\": false\n}","options":{"raw":{"language":"json"}}},"url":"https://SITE.sparkmeter.cloud/api/v0/sms/outgoing"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": null,\n    \"messages\": [\n        {\n            \"id\": \"96e6b202-a2af-4311-b19f-03d5f6a28309\",\n            \"phone_number\": \"+18005551234\",\n            \"text\": \"Your tariff changed to ET1!\",\n            \"timestamp\": \"2017-02-27T00:37:22.348981\"\n        },\n        {\n            \"id\": \"9bd36cfb-6b18-41f6-91dd-ec81303cad19\",\n            \"phone_number\": \"+18005551234\",\n            \"text\": \"Your tariff changed to ET2!\",\n            \"timestamp\": \"2017-02-27T00:37:32.841427\"\n        },\n        {\n            \"id\": \"31ba64d3-bd53-4a30-879f-b1edb849987d\",\n            \"phone_number\": \"+18005551234\",\n            \"text\": \"Your tariff changed to ET1!\",\n            \"timestamp\": \"2017-02-27T00:37:43.034679\"\n        },\n        {\n            \"id\": \"617bc7ea-5889-40e9-aed6-093e58ecfe68\",\n            \"phone_number\": \"+18005551234\",\n            \"text\": \"Your tariff changed to ET3!\",\n            \"timestamp\": \"2017-02-27T00:37:48.332987\"\n        }\n    ],\n    \"status\": \"success\"\n}"}],"_postman_id":"75d4df0a-9f68-4ac4-beed-3464b5003c99"}],"id":"6466d718-e0ce-4c61-bcc2-4898cf733cf0","_postman_id":"6466d718-e0ce-4c61-bcc2-4898cf733cf0","description":""},{"name":"Sales Account (NEW in v1.17)","item":[{"name":"Get Sales Account List (NEW in v1.17)","id":"50a90334-81c6-4092-a011-b9ab46be6ea1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"url":"https://SITE.sparkmeter.cloud/api/v0/sales-accounts","description":"<p>List some (or all) sales accounts.  The results can be filtered to only return either restricted or global sales accounts through use of the <code>type</code> query parameter.</p>\n<p><em>New in version 1.17</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","sales-accounts"],"host":["SITE","sparkmeter","cloud"],"query":[{"disabled":true,"key":"","value":null}],"variable":[]}},"response":[{"id":"4705b898-bb00-484f-b52c-132fbc012320","name":"200 OK - All sales accounts","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/sales-accounts","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","sales-accounts"],"query":[{"key":"","value":null,"type":"text","disabled":true}]}},"code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"accounts\": [\n        {\n            \"account_type\": \"restricted\",\n            \"active\": true,\n            \"credit\": 121,\n            \"id\": \"bdc0bd24-213d-4bf2-a0fd-b87225744e15\",\n            \"markup\": 0.05,\n            \"name\": \"Corner Store\"\n        },\n        {\n            \"account_type\": \"global\",\n            \"active\": true,\n            \"credit\": null,\n            \"id\": \"a45da96d-0bf6-5759-70f2-d27af22be28a\",\n            \"markup\": null,\n            \"name\": \"System\"\n        },\n        {\n            \"account_type\": \"global\",\n            \"active\": true,\n            \"credit\": null,\n            \"id\": \"5a0b4608-1200-4b7b-b387-a7222dec34af\",\n            \"markup\": null,\n            \"name\": \"Mobile Money\"\n        }\n    ],\n    \"error\": null,\n    \"status\": \"success\"\n}"},{"id":"5d7c2dc7-6102-4937-85e6-bc1db8782ed7","name":"401 Unauthorized","originalRequest":{"method":"GET","header":[],"url":"https://SITE.sparkmeter.cloud/api/v0/sales-accounts"},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"unauthorized\",\n    \"status\": \"failure\"\n}"},{"id":"d4aa2072-ae1c-4904-94d5-930d0e0839f6","name":"200 OK - Only restricted sales accounts","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/sales-accounts?type=restricted","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","sales-accounts"],"query":[{"key":"type","value":"restricted"}]}},"code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"accounts\": [\n        {\n            \"account_type\": \"restricted\",\n            \"active\": true,\n            \"credit\": 121,\n            \"id\": \"bdc0bd24-213d-4bf2-a0fd-b87225744e15\",\n            \"markup\": 0.05,\n            \"name\": \"Corner Store\"\n        }\n    ],\n    \"error\": null,\n    \"status\": \"success\"\n}"}],"_postman_id":"50a90334-81c6-4092-a011-b9ab46be6ea1"},{"name":"Get Sales Account Info (NEW in v1.17)","id":"061aa8b9-f7cb-4e37-823e-e2731d8ac48a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authentication-Token","type":"text","value":"authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/sales-accounts/:sales_account_id","description":"<p>Get the details of a sales account by its ID.</p>\n<p><em>New in version 1.17</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","sales-accounts",":sales_account_id"],"host":["SITE","sparkmeter","cloud"],"query":[{"disabled":true,"key":"","value":null}],"variable":[{"description":{"content":"<p>The unique system ID of the sales account</p>\n","type":"text/plain"},"type":"string","value":"","key":"sales_account_id"}]}},"response":[{"id":"19d10e71-9dd0-4bb1-9a45-6027ebf23e88","name":"404 Not Found","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/sales-accounts/:sales_account_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","sales-accounts",":sales_account_id"],"variable":[{"key":"sales_account_id","value":"bdc0bd24-213d-4bf2-a0fd-b87225744e16"}]}},"code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"no such sales account\",\n    \"status\": \"failure\"\n}"},{"id":"64f5a7a0-8037-4392-8b70-16f47f8a1d10","name":"401 Unauthorized","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/sales-accounts/:sales_account_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","sales-accounts",":sales_account_id"],"variable":[{"key":"sales_account_id","value":"bdc0bd24-213d-4bf2-a0fd-b87225744e15"}]}},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"unauthorized\",\n    \"status\": \"failure\"\n}"},{"id":"87198ee6-7129-4e64-8884-eabbf7ddd506","name":"200 OK","originalRequest":{"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/sales-accounts/:sales_account_id","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","sales-accounts",":sales_account_id"],"query":[{"key":"","value":null,"type":"text","disabled":true}],"variable":[{"key":"sales_account_id","value":"bdc0bd24-213d-4bf2-a0fd-b87225744e15"}]}},"code":200,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"account\": {\n        \"account_type\": \"restricted\",\n        \"active\": true,\n        \"credit\": 121,\n        \"id\": \"bdc0bd24-213d-4bf2-a0fd-b87225744e15\",\n        \"markup\": 0.05,\n        \"name\": \"Corner Store\"\n    },\n    \"error\": null,\n    \"status\": \"success\"\n}"}],"_postman_id":"061aa8b9-f7cb-4e37-823e-e2731d8ac48a"},{"name":"Issue Payment to Sales Account (NEW in v1.17)","id":"f6e80313-c94e-40fe-81f6-8d67fec8860c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","type":"text","value":"application/json"},{"key":"Authentication-Token","type":"text","value":"authentication_token"}],"url":"https://SITE.sparkmeter.cloud/api/v0/sales-accounts/:sales_account_id/payment","description":"<p>Issue a payment to the specified restricted sales account.</p>\n<p>The API user issuing the request must be associated with a global sales account, and the recipient of the funds must be a restricted sales account. As with the ThunderCloud web UI, if the recipient has a non-zero <code>markup</code> value set, a bonus transaction will also be issued.</p>\n<p>A successful response includes a <code>transaction_id</code>, and, if one was created, a <code>bonus_transaction_id</code>. These identifiers can be used to check the state of the transaction(s) via the \"Get Transaction Info\" endpoint.</p>\n<p><em>Parameters</em>:</p>\n<ul>\n<li><code>amount</code>, number, required, the amount to pay the account. This can be negative if the API user is associated with the System sales account.</li>\n<li><code>source</code>, string, required, the source of the funds. Must be one of either <code>cash</code>, or <code>bonus</code></li>\n<li><code>markup</code>, number, optional, the markup to apply to the transaction. If not specified, this defaults to the default for the recipient sales account.</li>\n<li><code>external_id</code>, string, optional, an external identifier for the transaction</li>\n<li><code>memo</code>, string, optional, additional notes or context to apply to the underlying transaction</li>\n</ul>\n<p><em>New in version 1.17</em></p>\n","urlObject":{"protocol":"https","path":["api","v0","sales-accounts",":sales_account_id","payment"],"host":["SITE","sparkmeter","cloud"],"query":[{"disabled":true,"key":"","value":null}],"variable":[{"description":{"content":"<p>The unique system ID of the sales account</p>\n","type":"text/plain"},"type":"string","value":"","key":"sales_account_id"}]}},"response":[{"id":"6f3c4322-dcba-4fd4-80af-b4f1ae4e11f1","name":"201 Created","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"amount\": 10,\n    \"source\": \"cash\",\n    \"external_id\": \"123A\",\n    \"memo\": \"Monthly top-up\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/sales-accounts/:sales_account_id/payment","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","sales-accounts",":sales_account_id","payment"],"query":[{"key":"","value":null,"type":"text","disabled":true}],"variable":[{"key":"sales_account_id","value":"bdc0bd24-213d-4bf2-a0fd-b87225744e15"}]}},"code":201,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n  \"bonus_transaction_id\": \"b5c70323-aa92-4552-82b2-2e20b9e15115\",\n  \"error\": null,\n  \"status\": \"success\",\n  \"transaction_id\": \"df2244f4-eaf3-499e-9cca-20d639587e39\"\n}"},{"id":"b14f0a94-4907-4bfd-aac1-fa8eef9d0968","name":"401 Unauthorized","originalRequest":{"method":"POST","header":[],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/sales-accounts/:sales_account_id/payment","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","sales-accounts",":sales_account_id","payment"],"variable":[{"key":"sales_account_id","value":"bdc0bd24-213d-4bf2-a0fd-b87225744e15"}]}},"code":401,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"unauthorized\",\n    \"status\": \"failure\"\n}"},{"id":"dc3138e6-cabd-4dd8-a0fa-36b8c651b55c","name":"404 Not Found","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authentication-Token","value":"authentication_token","type":"text"}],"url":{"raw":"https://SITE.sparkmeter.cloud/api/v0/sales-accounts/:sales_account_id/payment","protocol":"https","host":["SITE","sparkmeter","cloud"],"path":["api","v0","sales-accounts",":sales_account_id","payment"],"variable":[{"key":"sales_account_id","value":"bdc0bd24-213d-4bf2-a0fd-b87225744e16"}]}},"code":404,"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"no such sales account\",\n    \"status\": \"failure\"\n}"}],"_postman_id":"f6e80313-c94e-40fe-81f6-8d67fec8860c"}],"id":"d13d3e88-31a8-494c-b2c8-ecad58bd3b32","description":"<p>View and make payments to sales accounts.</p>\n","event":[{"listen":"prerequest","script":{"id":"8f6414f9-a2bf-40bb-bf86-516390516180","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"a6955b0f-28c1-4642-93a5-9ef11286c41d","type":"text/javascript","exec":[""]}}],"_postman_id":"d13d3e88-31a8-494c-b2c8-ecad58bd3b32"}],"event":[{"listen":"prerequest","script":{"id":"646988ba-a69b-4665-b751-c562c6aff9d9","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"913c4b35-42f2-4260-bd62-df046c77c34e","type":"text/javascript","exec":[""]}}]}