Flow Builder Embed
Category: Public
Base URL: /flow-builder/accept
Authentication: Mixed
Routes: 8 routes documented
Overview#
This section documents 8 API routes for flow builder embed.
Quick Reference#
| Method | Endpoint | Description |
|---|---|---|
| POST | /flow-builder/accept |
// POST /flow-builder/accept - Accept offer (headless) |
| GET | /flow-builder/button/:buttonId |
// GET /flow-builder/button/:buttonId - Get button details (... |
| POST | /flow-builder/decline |
// POST /flow-builder/decline - Decline offer (headless) |
| GET | /flow-builder/embed-demo |
// GET /flow-builder/embed-demo - Serve the embed demo page |
| GET | /flow-builder/embed.js |
// GET /flow-builder/embed.js - Serve the embed script |
| POST | /flow-builder/init |
// POST /flow-builder/init - Initialize or recover session (... |
| GET | /flow-builder/receipt |
// GET /flow-builder/receipt - Get receipt details (public e... |
| GET | /flow-builder/upsell |
No description |
POST Flow-builder Accept#
Endpoint: POST /flow-builder/accept
Authentication: Public (Optional)
Description#
// POST /flow-builder/accept - Accept offer (headless)
Request Body#
This route does not declare a validation schema, so the accepted fields are not derivable from the source. Check the handler before relying on a particular body.
Response#
Success:
{
success,
next_button_id,
nextButtonId,
redirectUrl,
isTerminal,
nextButton,
}Error (401):
{
error,
}Error (500):
{
error,
}Example Request#
curl -X POST 'https://your-store.omnicart.cc/flow-builder/accept' \
-H 'Content-Type: application/json'GET Flow-builder Button :buttonId#
Endpoint: GET /flow-builder/button/:buttonId
Authentication: Public (Optional)
Description#
// GET /flow-builder/button/:buttonId - Get button details (public endpoint)
URL Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
buttonId |
string | Yes | ButtonId identifier |
Response#
Success:
{
button,
session,
}Error (500):
{
error,
}Example Request#
curl -X GET 'https://your-store.omnicart.cc/flow-builder/button/:buttonId' \
-H 'Content-Type: application/json'POST Flow-builder Decline#
Endpoint: POST /flow-builder/decline
Authentication: Public (Optional)
Description#
// POST /flow-builder/decline - Decline offer (headless)
Request Body#
This route does not declare a validation schema, so the accepted fields are not derivable from the source. Check the handler before relying on a particular body.
Response#
Success:
{
success,
next_button_id,
nextButtonId,
redirectUrl,
isTerminal,
nextButton,
}Error (401):
{
error,
}Error (500):
{
error,
}Example Request#
curl -X POST 'https://your-store.omnicart.cc/flow-builder/decline' \
-H 'Content-Type: application/json'GET Flow-builder Embed-demo#
Endpoint: GET /flow-builder/embed-demo
Authentication: Public (Optional)
Description#
// GET /flow-builder/embed-demo - Serve the embed demo page
Response#
The handler does not return an object literal, so the response shape is not derivable from the source.
Example Request#
curl -X GET 'https://your-store.omnicart.cc/flow-builder/embed-demo' \
-H 'Content-Type: application/json'GET Flow-builder Embed.js#
Endpoint: GET /flow-builder/embed.js
Authentication: Public (Optional)
Description#
// GET /flow-builder/embed.js - Serve the embed script
Response#
The handler does not return an object literal, so the response shape is not derivable from the source.
Example Request#
curl -X GET 'https://your-store.omnicart.cc/flow-builder/embed.js' \
-H 'Content-Type: application/json'POST Flow-builder Init#
Endpoint: POST /flow-builder/init
Authentication: Public (Optional)
Description#
// POST /flow-builder/init - Initialize or recover session (headless)
Request Body#
This route does not declare a validation schema, so the accepted fields are not derivable from the source. Check the handler before relying on a particular body.
Response#
Success:
{
session,
entry_button,
}Also returns:
{
session,
entry_button,
}Error (400):
{
error,
}Error (500):
{
error,
}Example Request#
curl -X POST 'https://your-store.omnicart.cc/flow-builder/init' \
-H 'Content-Type: application/json'GET Flow-builder Receipt#
Endpoint: GET /flow-builder/receipt
Authentication: Public (Optional)
Description#
// GET /flow-builder/receipt - Get receipt details (public endpoint)
Response#
Success:
{
session,
journey,
total_revenue,
}Error (401):
{
error,
}Error (500):
{
error,
}Example Request#
curl -X GET 'https://your-store.omnicart.cc/flow-builder/receipt' \
-H 'Content-Type: application/json'GET Flow-builder Upsell#
Endpoint: GET /flow-builder/upsell
Authentication: Public (Optional)
Response#
Error (400):
{
error,
}Example Request#
curl -X GET 'https://your-store.omnicart.cc/flow-builder/upsell' \
-H 'Content-Type: application/json'