How to retrieve posts using Flowbox's API - v2
Prerequisites
Before you start, ensure you have the following:
- API key: Your unique API authentication key. If you don't have it yet, please contact your CSM and they'll provide it to you.
- Flow key: The unique key identifying the Flow from which you want to retrieve posts. The easiest way to find this is copying it from the "Copy Flow Key" option in the three dot menu, in the Flows section in Flowbox:
API Endpoint
To retrieve posts from a specific Flow, you need to send a GET request to the following endpoint:
https://external-api.getflowbox.com/v2/flow/{flowKey}/postsYou can find more information and make test calls in our Swaggerhub page.
Required Parameters
Parameter | Type | Location | Description |
|---|---|---|---|
| string | header | Your API authentication key. Must be included in every request. |
| string | path | Key of the Flow to retrieve posts from. |
| string | query | Type of the Flow. Must be one of: |
Optional Parameters
Parameter | Type | Location | Description |
|---|---|---|---|
| string | query | Locale of the products to be returned. Must match the locale of one of your catalogs. Use lowercase format, e.g. |
| integer | query | Number of posts to retrieve per request. Defaults to |
| string | query | Comma-separated list of product IDs to filter posts by. When provided, returns matching posts from all Flows in the account. Required when |
| string | query | Comma-separated list of product categories to filter posts by. Required when |
| string | query | Comma-separated list of tags to filter posts by. Required when
|
| string | query | Logical operator for tag filtering. |
| boolean | query | Filters by product tagging type. |
| boolean | query | Whether to include hotspot data in the response. Defaults to |
| string | query | Comma-separated list of feed keys to include. |
| string | query | Comma-separated list of feed keys to exclude. |
| string | query | Comma-separated list of additional post fields to include beyond the default set. Accepted values: |
| string | query | Cursor string from the previous response, used for pagination. Pass the full |
*Required depending on type provided.
Example API Request
Here is an example request with both required and optional parameters:
curl -X 'GET' \
'https://external-api.getflowbox.com/v2/flow/INSERT_FLOW_KEY_HERE/posts?type=static&locale=en-eu&postsPerPage=5' \
-H 'accept: application/json' \
-H 'api-key: INSERT_API_KEY_HERE'Response:
The response will be a JSON containing the posts retrieved based on the parameters you provided. Each post will contain data such as product information, associated tags, and other relevant metadata.
JSON returned:
Root
Field | Type | Description |
|---|---|---|
| string | Request status. One of: |
| array | List of post objects. See Post table below. |
| object | Cursor for fetching the next page. Pass to the |
Post (object):
Field | Type | Description |
| string | Unique identifier for the post. |
| string | Key of the Flow the post belongs to. |
| string | URL to the post in the Flowbox app. |
| string | Source platform of the post, e.g. |
| array | List of media objects attached to the post. See Media object table below. |
| string | ISO 8601 timestamp of when the post was published, e.g. |
| string | URL to the author's profile on the source platform. |
| string | URL of the primary thumbnail ( |
| string | Direct S3 URL used if the primary |
| string | Caption or body text of the post. |
| string | Handle or username of the post author. |
| string | JSON-encoded array of exact-matched product keys tagged on the post. Parse before use: |
| array | List of similar-matched product keys tagged on the post. |
| integer | Number of comments on the post. |
| integer | Number of likes on the post. |
| integer | Total number of interactions tracked by Flowbox. |
| string | Author's full name. Only present when |
| string | CTA URL for social commerce. Only present when |
| string | CTA button label. Only present when |
| string | Tagline displayed alongside the CTA. Only present when |
| boolean | Whether social commerce is enabled for this post. Only present when |
| object | Alt text for the post's media items, keyed by media index (string). Each value is a locale map, e.g. |
Media (object):
Field | Type | Description |
|---|---|---|
| string | Media type. One of: |
| string | URL of the media asset ( |
| string | Direct S3 URL used if the primary |
| boolean | Whether this media item is the designated thumbnail for the post. |
Cursor (object):
Field | Type | Description |
|---|---|---|
| string | Key of the feed the cursor is scoped to. Matches the |
| string |
|
| string | ISO 8601 timestamp of the last retrieved post. Used for pagination. |
| string | Internal identifier for the data source, e.g. |