- Preview
- Code

{
"connect_session": "cos_6587fa4362341be5b524de3b",
"route": "rewards",
"live_mode": true,
"actions": [
"REDIRECT",
"BACK",
"CLOSE"
],
"data": {
"device_type": "BATTERY_STORAGE",
"location": {
"timezone": "America/Denver",
"currency_code": "USD"
},
"accrued": 8.43,
"approved": 62.11,
"paid": 331.73,
"lifetime": 402.27,
"operator": {
"display_name": "Pick",
"url": "https://pick.com/rewards"
},
"support_reference": "AZ01346701301",
"support_email": "help@pick.com"
}
}
curl --request POST \
--url https://connect.flatpeak.com \
--header 'Content-Type: application/json' \
--data '{
"connect_session": "cos_6587fa4362341be5b524de3b",
"route": "rewards",
"action": "REDIRECT"
}'
Response fields
| Field | Description |
|---|---|
accrued | Earned from delivery. The VPP operator has not confirmed it. |
approved | Confirmed by the VPP operator and owed to the user. |
paid | Paid by the VPP operator. |
lifetime | Total earned since enrollment: the sum of the three above. |
operator | Display name and rewards page of the VPP operator. |
support_reference | Reference the user quotes when contacting support. |
support_email | Support contact for rewards. |
currency_code, in large currency units. Your backend reads the same entries with list device rewards.Actions
| Action | Result |
|---|---|
REDIRECT | Sends the user to operator.url, where the VPP operator shows payments and payment details. |
BACK | Returns the previous page. If there is none, returns callback_url. |
CLOSE | Returns the callback_url set on the Connect session. |
Errors
| Error code | Description |
|---|---|
data_json_invalid | Data does not conform to the JSON schema. |
action_invalid | Action is not available on this route, or is not permitted in the current state. |

