Skip to main content
Connect has one endpoint, https://connect.flatpeak.com. The route field in the body names the step, and each response names the route to render next, so handle every route Connect returns.

Start

POST route session_start with the ID from create a Connect session. The session ID authenticates every request. ui sets the color mode of the hosted WebView: LIGHT (default) or DARK. See Color mode. Omit it when you build your own UI.
Subscribe to connect_session.complete to know when the user finishes. See Events.

Respond

Every response carries route and data, and most carry actions. Answer on the same route, in one of two ways:
  • Send data: the fields the route collects. Each route page shows them.
  • Send action: one value from the response’s actions array. Never send an action that is not listed. Some actions take an action_context; the route page says which.
Send an action

Device type

Every response carries data.device_type and data.location (timezone, currency_code). device_type selects the noun your UI uses for the device: Select whole translated strings per type and do not substitute the noun into a template, as Asset vocabulary explains. Hosted Connect does this for you.