OriginatedCPS API

get originated CPS chart for account during time period

POST /api/rest/customer/v1/chart-originated-cps

Parameters

Name Description
data[type] Resource type (chart-originated-cps)
data[attributes][from-time] From time
data[attributes][to-time] To time
data[relationships][account] Account

Request

Headers

Version: HTTP/1.0
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjE5LCJhdWQiOlsiY3VzdG9tZXItdjEiXSwiZXhwIjoxNzEwMjU0MjAxfQ.-QNNP8OyRoI5LSOpv8X8ZgykUxxEMknVUh_NPYParJ8
Host: example.org
Cookie: 

Route

POST /api/rest/customer/v1/chart-originated-cps

Body

{"data":{"type":"chart-originated-cps","attributes":{"from-time":"2019-01-01 00:00:00","to-time":"2019-01-02 00:00:00"},"relationships":{"account":{"data":{"type":"accounts","id":"cd1b80c0-e07d-11ee-bf85-0242ac120003"}}}}}

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: application/vnd.api+json
Vary: Accept
ETag: W/"44a352541896291a3cc63d3941b5c4f6"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: b880fb8a-afa8-4da7-b3cb-e9a16204f4b5
X-Runtime: 0.013803
Content-Length: 630

Status

201 Created

Body

{
  "data": {
    "id": "ef3cea20-a725-45e7-b61b-3a5f59c8524f",
    "type": "chart-originated-cps",
    "links": {
      "self": "http://example.org/api/rest/customer/v1/chart-originated-cps/ef3cea20-a725-45e7-b61b-3a5f59c8524f"
    },
    "attributes": {
      "from-time": "2019-01-01T00:00:00.000Z",
      "to-time": "2019-01-02T00:00:00.000Z",
      "cps": [
        {
          "y": "0.2",
          "x": "2019-01-01T23:59:00.000Z"
        }
      ]
    },
    "relationships": {
      "account": {
        "links": {
          "self": "http://example.org/api/rest/customer/v1/chart-originated-cps/ef3cea20-a725-45e7-b61b-3a5f59c8524f/relationships/account",
          "related": "http://example.org/api/rest/customer/v1/chart-originated-cps/ef3cea20-a725-45e7-b61b-3a5f59c8524f/account"
        }
      }
    }
  }
}