Fluent Commerce Logo
Docs
Sign In
Essential knowledge

Author:

Fluent Commerce

Changed on:

27 Feb 2025

Overview

A Batch is used to create new Retailers within a Fluent . This can be used when a new retail operation is being onboarded to an existing Fluent or during the initial setup of the Fluent to create the required Retailers.

Key points

  • Create new Retailers using the Job API
  • Sample Retailer batch payload
  • Retailer batch details

Retailer Creation

In to create new Retailers in an , you can submit a batch using the `/job/{jobId}/batch` endpoint (see link). Multiple Retailers can be created in a single batch by providing multiple `entities`.

Retailer Batch Model

The following describes the fields which can be submitted as part of a batch record. 

Key

Type

Mandatory?

Possible Values

Constraints

Description

retailerId

String



This is the reference Id for the you are creating.
This field value will be used to generate the user (post-fixed with `_admin`)

retailerName

String


Character length must not exceed 45

This is a name used to identify the

region

String


Character length must not exceed 255

The region where the operates

tradingName

String


Character length must not exceed 255

Trading name of the (can be the same as retailerName)

customerSupportPhone

String


Character length must not exceed 255

A phone number for customer support

customerSupportEmail

String


Character length must not exceed 255

An email for customer support

website

String


Character length must not exceed 255

The website of the


Example Request Payload

1{
2  "action": "CREATE",
3  "entityType": "RETAILER",
4  "entities": [
5    {
6      "retailerId": "b2c",
7      "retailerName": "b2c",
8      "region": "AUS",
9      "tradingName": "Fluent Commerce",
10      "customerSupportPhone": "1234",
11      "customerSupportEmail": "hello@fluentcommerce.com",
12      "website": "http://www.fluentcommerce.com"
13    }
14  ]
15}

Retailer Batch Details

Once a batch has been processed the details can be retrieved via the `/job/{jobId}/batch/{batchId}` (see link). The response will contain information such as the id, username and password for the (s) that have been created.

Example Response Payload

1{
2    "batchId": "1",
3    "entityType": "RETAILER",
4    "status": "COMPLETE",
5    "start": 1,
6    "count": 10,
7    "total": 1,
8    "results": [
9        {
10            "entityId": "1",
11            "entityRef": "b2c",
12            "entityName": "b2c",
13            "apiKey": "ABCDEF",
14            "username": "b2c_admin",
15            "password": "ABCDEF",
16            "responseCode": 200,
17            "message": "Retailer created successfully"
18        }
19    ],
20    "createdOn": "2022-10-13T23:29:40.746+00:00"
21}
Fluent Commerce

Fluent Commerce