- Preview
- Code

{
"connect_session": "cos_6587fa4362341be5b524de3b",
"route": "personal_details",
"live_mode": true,
"actions": [
"CHANGE_ADDRESS",
"BACK",
"CLOSE"
],
"data": {
"device_type": "BATTERY_STORAGE",
"location": {
"timezone": "Europe/London",
"currency_code": "GBP"
},
"postal_address": {
"address_line1": "1-3 Strand",
"address_line2": "",
"city": "London",
"state": "Greater London",
"post_code": "WC2N 5EH",
"country_code": "GB"
},
"personal_details": {
"first_name": "",
"last_name": "",
"email_address": "",
"phone": ""
}
}
}
curl --request POST \
--url https://connect.flatpeak.com \
--header 'Content-Type: application/json' \
--data '{
"connect_session": "cos_6587fa4362341be5b524de3b",
"route": "personal_details",
"data": {
"personal_details": {
"first_name": "Emily",
"last_name": "Smith",
"email_address": "emily@smith.com",
"phone": "+1-202-555-0147"
}
}
}'
Actions
| Action | Result |
|---|---|
CHANGE_ADDRESS | Returns Address. |
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 |
|---|---|
email_invalid | Email is invalid. |
phone_invalid | Phone number is invalid. |
data_json_invalid | Data does not conform to the JSON schema. |

