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/v1/flow/{flowKey}/posts
Required Parameters
- api-key (header - string): This is your API authentication key, it must be included in the request header.
- flowKey (path - string): The key of the Flow you want to retrieve posts from.
- locale (query - string): Specifies the desired locale of the products to be returned with the posts. It must match the locale of one of your catalogs. It must be entered in lowercase, e.g.: 'en-gb'.
Optional Parameters
- postsPerPage (query - integer): The number of posts you want to retrieve in a single request. If omitted it'll return the default of 29. The maximum is 58.
- productId (query - string): The product ID of the product assigned to the posts you want to retrieve. When provided, Flowbox will return matching posts from all Flows in your account. If not provided, the request will return the posts from the Approved folder of the Flow that matches the flowKey.
- similarProduct (query - string): This is premium feature, please contact your CSM for more information. A flag indicating whether to include similar products. If set to 'true'
, the API will return posts where the provided productId is tagged as similar. If set to 'false'
, only posts where the productId is tagged as exact will be returned. If not provided, the request will return posts tagged as either exact or similar.
- tags (query - string): A comma-separated list of tags assigned to the posts. You can filter posts based on specific tags.
- operator (query - string): When filtering posts by tags, you can specify the operator, that determines how the tags are combined in the search. 'AND' will return posts with all of the tags, while 'OR' will return posts with either of the tags.
- cursor (query - string): A cursor to fetch subsequent results. This is used for pagination and can be retrieved from the response data of the previous request. To use it, add the whole cursor
object as a parameter.
Example API Request
Here is an example request with both required and optional parameters:
curl -X 'GET' \
'https://external-api.getflowbox.com/v1/flow/vLl3B4S5ZQrSSuB6bzmoH/posts?locale=es-es&postsPerPage=5' \
-H 'accept: application/json' \
-H 'api-key: 12345678abcdf'
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.
You can find more information and make test calls in our Swaggerhub page.