Fluent Commerce Logo
Docs
Essential knowledge

Intended Audience:

Technical User

Author:

Fluent Commerce

Changed on:

27 Feb 2025

Overview

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

Key points

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

Retailer Creation

In order to create new Retailers in an account, you can submit a Retailer 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 retailer batch record. 
KeyTypeMandatory?Possible ValuesConstraintsDescription
retailerIdString✅

This is the reference Id for the retailer you are creating.
This field value will be used to generate the retailer user (post-fixed with `_admin`)
retailerNameString✅
Character length must not exceed 45This is a name used to identify the retailer
regionString❌
Character length must not exceed 255The region where the retailer operates
tradingNameString❌
Character length must not exceed 255Trading name of the retailer (can be the same as retailerName)
customerSupportPhoneString❌
Character length must not exceed 255A phone number for customer support
customerSupportEmailString❌
Character length must not exceed 255An email for customer support
websiteString❌
Character length must not exceed 255The website of the retailer


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 Retailer 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 retailer id, username and password for the Retailer(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}