Author:
Lesley Dean
Changed on:
18 Apr 2024
The Fluent Platform provides a set of REST APIs. These differ from the primary GraphQL APIs which primarily cover domain entities. This section provides access to the REST based Platform APIs reference documentation.
Authors:
Lesley Dean, Girish Padmanabha, Boris Pocatko, Yulia Andreyanova, Randy Chan
Changed on:
9 May 2024
Events are a fundamental part of the Fluent Platform. Not only are they used to trigger workflow logic, but they also capture everything that happens within the system. Events are categorized by type.
Property | Value |
URL |
|
Methods |
|
Scheme |
|
Auth |
|
Content-Type |
|
`ORCHESTRATION`
`ORCHESTRATION_AUDIT`
`ORCHESTRATION`
`ORCHESTRATION_AUDIT`
`API`
`GENERAL`
`API`
`GENERAL`
`ORCHESTRATION_AUDIT`
The Event API allows users and external systems to view and create events within the Fluent Platform.
Returns the Event identified by the
`<eventId>`
`404`
Authentication
Required
Parameters
Name | Required | Default Value | Description |
eventId | yes | - | A Unique Event Id |
Responses
Response Content-Type:
`application/json`
Code | Description |
200 | Successful Operation |
401 | Authorization Error - Invalid Bearer Token / No permission |
400 | Client Error - Bad Request |
403 | Client Error - Forbidden |
404 | Client Error - Not Found (Invalid Event Id) |
500 | Server Error |
Example
Request:
`https://<AccountId>.sandbox.api.fluentretail.com/api/v4.1/event/05838ba2-7025-11eb-b493-0f90922e985a`
Response:
1//Event
2{
3 id (string),
4 retailerId (string),
5 accountId (string),
6 name (string),
7 type (string),
8 category (string),
9 context (object), // See 'Context' below
10 eventStatus(string, Required)
11 attributes (Attribute[]), // See 'Attribute' below
12 source (string),
13 generatedBy (string),
14 generatedOn (date)
15}
16
17//Context
18{
19 sourceEvents (String[]),
20 entityType (string),
21 entityId (string),
22 entityRef (string),
23 rootEntityType (string),
24 rootEntityId (string),
25 rootEntityRef (string)
26}
27
28//Attribute
29{
30 name (string),
31 value (string),
32 type (string)
33}
34
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "id": "05838ba2-7025-11eb-b493-0f90922e985a",
3 "name": "DeactivateProduct",
4 "type": "ORCHESTRATION_AUDIT",
5 "accountId": "FCTRAINAU25",
6 "retailerId": "1",
7 "category": "ruleSet",
8 "context": {
9 "sourceEvents": [
10 "055c54d3-7025-11eb-912a-e98bb0976432"
11 ],
12 "entityType": "PRODUCT",
13 "entityId": null,
14 "entityRef": "PRD-SPECIAL-1",
15 "rootEntityType": "PRODUCT_CATALOGUE",
16 "rootEntityId": null,
17 "rootEntityRef": "FCRG:PC:MASTER"
18 },
19 "eventStatus": "FAILED",
20 "attributes": [
21 {
22 "name": "startTimer",
23 "value": 1613458987222,
24 "type": "STRING"
25 },
26 {
27 "name": "stopTimer",
28 "value": 1613458987329,
29 "type": "STRING"
30 }
31 ],
32 "meta": null,
33 "source": null,
34 "generatedBy": "Rubix User",
35 "generatedOn": "2021-02-16T07:03:07.329+0000",
36 "recordedBy": "Rubix User ",
37 "recordedOn": "2021-02-16T07:03:07.354+0000"
38}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Example Error Response:
1//Errors
2{
3 errors (Error[])
4}
5
6//Error
7{
8 code (string),
9 message (string)
10}
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "errors": [
3 {
4 "code": "404",
5 "message": "Cannot find an event with id: 76b97221-8be4-11e9-beb2-c187ba8970a"
6 }
7 ]
8}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Returns a page of events filtered by the given combination of parameters. If no parameters are provided, the default page size, date range, and sort order will be applied, and the events for which your authenticated user is authorized for will be returned.
Authentication
Required
Parameters
Name | Default Value | Description | Type |
retailerId | - | A Unique Retailer Id |
|
eventType | - | It is possible to send multiple values at the same time. For example:
|
|
Category | - | It is possible to send multiple values at the same time. For example:
|
|
Name | - | The name of an event |
|
context.rootEntityId | - | The
|
|
context.rootEntityType | - | The
|
|
context.entityId | - | The
|
|
context.entityType | - | The
|
|
eventStatus | - | The Status of the events to be returned. |
|
from |
| A UTC formatted DateTime. For example: 2019-01-01T00:00:00.000Z |
|
to | Now | A UTC formatted DateTime. For example: 2019-01-31T23:59:59.999Z |
|
start | 0 | The index of the first record of a page to be returned. |
|
count | 100 | The number of results to be returned per page. Max 100. |
|
Responses
Response Content-Type:
`application/json`
Code | Description |
200 | Successful Operation |
401 | Authorization Error - Invalid Bearer Token / No permission |
400 | Client Error - Bad Request |
504 | Gateway Timeout |
Example
Request:
`https://<AccountId>.sandbox.api.fluentretail.com/api/v4.1/event?context.rootEntityId=1234&context.rootEntityType=Order`
Response:
1//Event
2{
3start (integer),
4count (integer),
5hasMore (boolean),
6results (Array):[{
7 id (string),
8 retailerId (string),
9 accountId (string),
10 name (string),
11 type (string),
12 category (string),
13 context (object), // See 'Context' below
14 eventStatus(string, Required)
15 attributes (Attribute[]), // See 'Attribute' below
16 source (string),
17 generatedBy (string),
18 generatedOn (date)
19 }]
20}
21
22//Context
23{
24 sourceEvents (String[]),
25 entityType (string),
26 entityId (string),
27 entityRef (string),
28 rootEntityType (string),
29 rootEntityId (string),
30 rootEntityRef (string)
31}
32
33//Attribute
34{
35 name (string),
36 value (string),
37 type (string)
38}
39
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "start": 1,
3 "count": 100,
4 "hasMore": false,
5 "results": [
6 {
7 "id": "2c8cf4f0-12fa-11e9-b498-6fc6e8a6a46e",
8 "name": "snapshot",
9 "type": "ORCHESTRATION_AUDIT",
10 "accountId": "ACME",
11 "retailerId": "1",
12 "category": "snapshot",
13 "context": {
14 "sourceEvents": [
15 "2c7bb6e0-12fa-11e9-b498-6fc6e8a6a46e"
16 ],
17 "entityType": "FULFILMENT_OPTIONS",
18 "entityId": "13cbedf0-59b0-481b-8b6f-b95531a72625",
19 "entityRef": "13cbedf0-59b0-481b-8b6f-b95531a72625",
20 "rootEntityType": "FULFILMENT_OPTIONS",
21 "rootEntityId": "13cbedf0-59b0-481b-8b6f-b95531a72625",
22 "rootEntityRef": "13cbedf0-59b0-481b-8b6f-b95531a72625"
23 },
24 "eventStatus": "SUCCESS",
25 "attributes": [],
26 "source": null,
27 "generatedBy": "Rubix User",
28 "generatedOn": "2019-01-08T04:02:11.007+0000"
29 },
30 {
31 "id": "2c87c4d1-12fa-11e9-94cb-1953d3d0bd4a",
32 "name": "Change State",
33 "type": "ORCHESTRATION_AUDIT",
34 "accountId": "ACME",
35 "retailerId": "1",
36 "category": "ACTION",
37 "context": {
38 "sourceEvents": [
39 "2c471250-12fa-11e9-94cb-1953d3d0bd4a"
40 ],
41 "entityType": "FULFILMENT_OPTIONS",
42 "entityId": "13cbedf0-59b0-481b-8b6f-b95531a72625",
43 "entityRef": null,
44 "rootEntityType": null,
45 "rootEntityId": null,
46 "rootEntityRef": null
47 },
48 "eventStatus": "SUCCESS",
49 "attributes": [
50 {
51 "name": "myAttribute",
52 "value": "MY_VALUE",
53 "type": "STRING"
54 },
55 {
56 "name": "myOtherAttribute",
57 "value": "MY_OTHER_VALUE",
58 "type": "STRING"
59 }
60 ],
61 "source": "Fluent-API",
62 "generatedBy": "Rubix User",
63 "generatedOn": "2019-01-08T04:02:10.957+0000"
64 }
65 ]
66}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Example Error Response:
1//Errors
2{
3 errors (Error[])
4}
5
6//Error
7{
8 code (string),
9 message (string)
10}
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "errors": [
3 {
4 "code": "401",
5 "message": "Invalid user, Authorization header value does not belong to a valid user"
6 }
7 ]
8}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Creates a new Event within the Fluent Platform to trigger a part or whole of a workflow.
Authentication
Required
Parameters
Name | Description |
body *Required | A valid Event Object |
Responses
Response Content Type:
`application/json`
Code | Description |
200 | Successful Operation |
401 | Authorization Error - Invalid Bearer Token / No permission |
400 | Client Error - Bad Request |
Example Request:
1//Event
2{
3 name (string, required),
4 retailerId (string, optional), // Required if authenticated as Account User
5 rootEntityType (string, required),
6 rootEntityId (string), // One of 'rootEntityId' / 'rootEntityRef' required
7 rootEntityRef (string), // One of 'rootEntityId' / 'rootEntityRef' required
8 entityType (string, required),
9 entityId (string), // One of 'entityId' / 'entityRef' required
10 entityRef (string), // One of 'entityId' / 'entityRef' required
11 attributes (Attribute[], optional)
12}
13
14//Attribute
15{
16 name (string, required),
17 value (string, required),
18 type (string)
19}
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "name":"CancelOrder",
3 "retailerId":"1",
4 "entityType":"ORDER",
5 "entityId":"1234",
6 "entityRef":"ON-1234",
7 "attributes":{
8 "items":[
9 {
10 "skuRef":"SKU_1",
11 "locationRef":"LOC_1",
12 "quantity":60
13 }
14 ]
15 }
16}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Example Success Response:
1{
2 id (string)
3}
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "id": "46a5e2d0-2424-11e9-bd19-45eb89bb628a"
3}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Example Error Response:
1//Errors
2{
3 errors (Error[])
4}
5
6//Error
7{
8 code (string),
9 message (string)
10}
11
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "errors": [
3 {
4 "code": "401",
5 "message": "InvalidInput, Logged in user has no retailer"
6 }
7 ]
8}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Creates a new Event within the Fluent Platform to trigger a part or whole of a workflow synchronously.
Authentication
Required
Parameters
Name | Description |
body *Required | A valid Event Object |
Responses
Response Content Type:
`application/json`
Code | Description |
200 | Successful Operation |
401 | Authorization Error - Invalid Bearer Token / No permission |
400 | Client Error - Bad Request |
Example Request:
1//Event
2{
3 name (string, required),
4 retailerId (string, optional), // Required if authenticated as Account User
5 rootEntityType (string, required),
6 rootEntityId (string), // One of 'rootEntityId' / 'rootEntityRef' required
7 rootEntityRef (string), // One of 'rootEntityId' / 'rootEntityRef' required
8 entityType (string, required),
9 entityId (string), // One of 'entityId' / 'entityRef' required
10 entityRef (string), // One of 'entityId' / 'entityRef' required
11 attributes (Attribute[], optional)
12}
13
14//Attribute
15{
16 name (string, required),
17 value (string, required),
18 type (string)
19}
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "name":"CancelOrder",
3 "retailerId":"1",
4 "entityType":"ORDER",
5 "entityId":"1234",
6 "entityRef":"ON-1234",
7 "attributes":{
8 "cancelReason": "Fraud"
9 }
10}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Example Success Response:
1{
2 eventId (string),
3 entityId (string),
4 eventStatus (string)
5}
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "eventId": "52929cf4-483b-4b72-b47f-e5d47ac36446",
3 "entityId": "994",
4 "eventStatus": "COMPLETE"
5}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Example 404 Error Response (NO_MATCH):
1{
2 eventId (string),
3 entityId (string),
4 eventStatus (string)
5}
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "eventId": "52929cf4-483b-4b72-b47f-e5d47ac36446",
3 "entityId": "994",
4 "eventStatus": "NO_MATCH"
5}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Example Error Response:
1//Errors
2{
3 errors (Error[])
4}
5
6//Error
7{
8 code (string),
9 message (string)
10}
11
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "errors": [
3 {
4 "code": "401",
5 "message": "InvalidInput, Logged in user has no retailer"
6 }
7 ]
8}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Author:
Fluent Commerce staff
Changed on:
2 Feb 2024
A Job represents a container that can hold multiple batches. A job stays open until midnight (UTC), where the status will change to CLOSED. All jobs are processed concurrently.
Property | Value |
URL |
|
Methods |
|
Scheme |
|
Auth |
|
Permissions |
|
Content-Type |
|
The Retailer Batch is used to create new Retailers within a Fluent Order Management 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 all the required Retailers.
The Inventory Batch is used to send large volumes of Inventory data, this will update the Last on Hand values against Inventory Positions. This is intended for use with large-scale Inventory updates, typically resetting after a few days of operations to ensure the OMS has the latest value of Inventory.
If you would like to read a guide to use the Inventory Batch then please read How to use Inventory Batches.
Returns the details of the Job filtered by the given Job ID provided on the API.
Authentication
Required
Permissions
JOB_VIEW and BATCH_VIEW permissions are required.
Parameters
Name | Default Value | Multiple? | Description |
JobId | ❌ | The unique Job identifier assigned to the Job |
Responses
Response Content-Type:
`application/json`
Code | Description |
200 | Successful Operation |
400 | Client Error - Bad Request |
401 | Authorization Error - Invalid Bearer Token / No permission |
403 | Authorization Error - Forbidden |
404 | Client Error - Not Found |
500 | Server Error |
Example:
Request:
`https://<AccountId>.sandbox.api.fluentretail.com/api/v4.1/job/223`
1{
2 "jobId": "230",
3 "status": "OPEN",
4 "createdOn": "2016-07-20T12:39:43.912+0000",
5 "batch": [
6 {
7 "batchId": "298",
8 "status": "COMPLETE",
9 "createdOn": "2016-07-20T12:39:43.912+0000"
10 }
11 ]
12}
Language: json
Name: Example Success Response
Description:
[Warning: empty required content area]1{
2 "errors": [
3 {
4 "code": "401",
5 "message": "InvalidInput, Logged in user has no retailer"
6 }
7 ]
8}
Language: json
Name: Example Error Response
Description:
[Warning: empty required content area]Creates a job record for storing a series of batches.
Authentication
Required
Permissions
JOB_VIEW and BATCH_VIEW permissions are required.
Parameters
Name | Type | Description |
name *required | String | The name is given for the Job |
retailerId *required | String | the retailerID the Job is created for |
Responses
Response Content-Type:
`application/json`
Code | Description |
200 | Successful Operation |
400 | Client Error - Bad Request |
401 | Authorization Error - Invalid Bearer Token / No permission |
403 | Authorization Error - Forbidden |
404 | Client Error - Not Found |
500 | Server Error |
Example:
Request:
`https://<AccountId>.sandbox.api.fluentretail.com/api/v4.1/job`
1{
2 "name": "NIGHTLYIMPORT",
3 "retailerId": "197"
4}
Language: json
Name: Example Request body
Description:
[Warning: empty required content area]1{
2 "id":"223"
3}
Language: json
Name: Example Success Response
Description:
[Warning: empty required content area]1{
2 "errors": [
3 {
4 "code": "401",
5 "message": "InvalidInput, Logged in user has no retailer"
6 }
7 ]
8}
Language: json
Name: Example Error Response
Description:
[Warning: empty required content area]Returns the details of the Batch by the given Batch ID provided on the API.
Authentication
Required
Permissions
JOB_VIEW and BATCH_VIEW permissions are required.
Parameters
Name | Default Value | Multiple? | Description |
BatchId | ❌ | The unique Batch identifier assigned to the Batch |
Responses
Response Content Type:
`application/json`
Code | Description |
200 | Successful Operation |
400 | Client Error - Bad Request |
401 | Authorization Error - Invalid Bearer Token / No permission |
403 | Authorization Error - Forbidden |
404 | Client Error - Not Found |
500 | Server Error |
Example
Request:
`https://<AccountId>.sandbox.api.fluentretail.com/api/v4.1/job/298/batch/433`
1{
2 "batchId": "433",
3 "entityType": "INVENTORY",
4 "status": "COMPLETE",
5 "start": 1,
6 "count": 10,
7 "total": 0,
8 "results": [],
9 "createdOn": "2022-10-14T04:01:06.939+0000"
10}
Language: json
Name: Example Success Response
Description:
[Warning: empty required content area]1{
2 "errors": [
3 {
4 "code": "401",
5 "message": "InvalidInput, Logged in user has no retailer"
6 }
7 ]
8}
Language: json
Name: Example Error Response
Description:
[Warning: empty required content area]Creates a new Batch on the given Job.
Authentication
Required
Permissions
JOB_VIEW and BATCH_VIEW permissions are required.
Parameters
Name | Type | Description |
action *required | String | The type of operation occuring - "CREATE" or "UPSERT" |
entityType *required | String | The Entity type in the batches - "INVENTORY" or "RETAILER" |
entities *required | JSON array | The entities to be batched - See below for type models |
Responses
Response Content Type:
`application/json`
Code | Description |
200 | Successful Operation |
400 | Client Error - Bad Request |
401 | Authorization Error - Invalid Bearer Token / No permission |
403 | Authorization Error - Forbidden |
404 | Client Error - Not Found |
500 | Server Error |
Example
Request:
`https://<AccountId>.sandbox.api.fluentretail.com/api/v4.1/job/298/batch`
1{
2 "action": "UPSERT",
3 "entityType": "INVENTORY",
4 "entities": [
5 {"retailerId":"test_retailer_1","locationRef":"LOC1","skuRef":"SKU1","qty":20}
6 ]
7}
Language: json
Name: Example Request Body
Description:
[Warning: empty required content area]1{
2 "id":"433"
3}
Language: json
Name: Example Success Response
Description:
[Warning: empty required content area]1{
2 "errors": [
3 {
4 "code": "401",
5 "message": "InvalidInput, Logged in user has no retailer"
6 }
7 ]
8}
Language: json
Name: Example Error Response
Description:
[Warning: empty required content area]Key | Type | Mandatory? | Possible Values | Constraints | Description |
name | String | ✅ | A User provided name by which to identify the job | ||
retailerId | String | ❌ | The retailer identifier assigned by Fluent Commerce | ||
jobId | String | ❌ | The unique identifier assigned to the Job | ||
status | String | ✅ | OPEN, CLOSED | The location status | |
createdOn | DateTime | ✅ | The Date/time when the Job was created | ||
batch | Array [batchId(integer), status(string), createdOn(DateTime)] | ✅ | Batch Staus - COMPLETE, RUNNING, PENDING | Provides list of batches assigned to the Job . Array includes Unique batch identifier(batchId), The batch status and Date/time when the Batch was created |
Key | Type | Mandatory? | Possible Values | Constraints | Description |
retailerId | String | ✅ | This is the reference Id for the retailer you are creating | ||
retailerName | String | ✅ | Character length must not exceed 45 | This is a name used to identify the retailer | |
region | String | ❌ | Character length must not exceed 255 | The region where the retailer operates | |
tradingName | String | ❌ | Character length must not exceed 255 | Trading name of the retailer (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 retailer |
Key | Type | Mandatory? | Possible Values | Constraints | Description |
retailerId | String | ✅ | This is the retailer id the inventory is uploading for | ||
locationRef | String | ✅ | The location reference used to match the inventory | ||
skuRef | String | ✅ | The SKU of the inventory | ||
qty | Int | ✅ | The quantity to match to onHand | ||
correctedQty | Int | ❌ | Current outstanding correction quantity to be saved | ||
reservedQty | Int | ❌ | Current outstanding reservations to be kept in calculation |
Key | Type | Possible Values | Description |
errors | Array | List of errors | |
code | String | 400, 401, 403, 404, 500 | error code |
message | String | description of the error |
Response Code | Message | Resolution |
401 | "Expired JWT" | The Authorization token has expired, generate a new token and send the request again |
403 | "Job is already completed" | The specific Job has expired, please generate a new Job ID and send the batch again |
Author:
Fluent Commerce staff
Changed on:
3 June 2024
The Plugin API provides methods for uploading, installing, and viewing Plugins.
A Plugin Bundle represents a collection of rules for a retailer that is uploaded and installed into Rubix for use in workflows. They can be developed and installed through the use of the Fluent SDK.
Property | Value |
URL |
|
Methods |
|
Scheme |
|
Auth |
|
Permissions |
|
Content-Type |
|
Returns the the list of all rules that are active in an ACCOUNT.
Authentication
Required
Permissions
PLUGIN_VIEW permission is required for the ACCOUNT context.
Responses
Response Content-Type:
`application/json`
Code | Description |
200 | Successful Operation |
400 | Client Error - Bad Request |
401 | Authorization Error - Invalid Bearer Token / No permission |
403 | Authorization Error - Forbidden |
404 | Client Error - Not Found |
500 | Server Error |
Example
Request:
`https://<AccountId>.sandbox.api.fluentretail.com/orchestration/rest/v1/plugin/`
1{
2 "FLUENTRETAIL.base.SendEventToVirtualCatalogue": {
3 "eventAttributes": [],
4 "ruleInfo": {
5 "name": "SendEventToVirtualCatalogue",
6 "description": "Send event {eventName} to all virtual catalogues {virtualCatalogueRefList}",
7 "accepts": [
8 {
9 "entityType": "INVENTORY_CATALOGUE",
10 "eventName": "",
11 "entitySubtype": "",
12 "status": ""
13 }
14 ],
15 "produces": [],
16 "ruleException": []
17 },
18 "description": "Send event {eventName} to all virtual catalogues {virtualCatalogueRefList}",
19 "name": "SendEventToVirtualCatalogue",
20 "parameters": [
21 {
22 "name": "eventName",
23 "description": "The name of event to be triggered",
24 "type": "STRING",
25 "multiple": false
26 },
27 {
28 "name": "virtualCatalogueRefList",
29 "description": "The name of event to be triggered",
30 "type": "STRING",
31 "multiple": false
32 }
33 ]
34 },
35 "FLUENTRETAIL.base.CreatePlanToFulfilFromLocationOrAddress": {
36 "eventAttributes": [],
37 "ruleInfo": {
38 "name": "CreatePlanToFulfilFromLocationOrAddress",
39 "description": "Provides a fulfilment plan for location or address with {fulfilmentCoverage} items to be fulfilled considerin virtual position statuses {statuses} from virtual catalogue {virtualCatalogueRef}.",
40 "accepts": [
41 {
42 "entityType": "FULFILMENT_OPTIONS",
43 "eventName": "",
44 "entitySubtype": "",
45 "status": ""
46 }
47 ],
48 "produces": [],
49 "ruleException": []
50 },
51 "description": "Provides a fulfilment plan for location or address with {fulfilmentCoverage} items to be fulfilled considering virtual position statuses {statuses} from virtual catalogue {virtualCatalogueRef}.",
52 "name": "CreatePlanToFulfilFromLocationOrAddress",
53 "parameters": [
54 {
55 "name": "fulfilmentCoverage",
56 "description": "Fulfilment coverage",
57 "type": "STRING",
58 "multiple": false
59 },
60 {
61 "name": "statuses",
62 "description": "Virtual Position Status",
63 "type": "STRING",
64 "multiple": false
65 },
66 {
67 "name": "virtualCatalogueRef",
68 "description": "Virtual Catalogue Ref",
69 "type": "STRING",
70 "multiple": false
71 }
72 ]
73 }
74}
75
Language: json
Name: Example Success Response
Description:
[Warning: empty required content area]1{
2 "errors": [
3 {
4 "code": "401",
5 "message": "Invalid user, Authorization header value does not belong to a valid user"
6 }
7 ]
8}
Language: json
Name: Example Error Response
Description:
[Warning: empty required content area]Returns the upload/installation status and other metadata of the bundle. Only bundles that belong to the logged-in account can be viewed.
Authentication
Required
Permissions
PLUGIN_VIEW permission is required for the ACCOUNT context.
Parameters
Name | Required | Description |
bundleName | yes | Name used to identify the plugin.
|
Responses
Response Content-Type:
`application/json`
Code | Description |
200 | Successful Operation |
400 | Client Error - Bad Request |
403 | Authorization Error - No permission |
404 | Not Found - Given bundle or version does not exist |
Plugins can be expected to be in one of the following statuses
Bundle Status | Description |
ACTIVE | Bundle was successfully installed and ready for use |
VERIFIED | Bundle was successfully uploaded and ready to be installed |
FAILED | Bundle was installed unsuccessfully. Field bundleErrorMessage may be populated with any error messages |
Example
Request:
`https://ACC1.sandbox.api.fluentretail.com/orchestration/rest/v1/plugin/ACC1.common::1.0.5/status`
1{
2 accountId (string),
3 bundleName (string),
4 bundleStatus (string),
5 createOn (date),
6 bundleVersion (string),
7 bundleErrorMessage (string)
8}
Language: json
Name: Response Data Model
Description:
[Warning: empty required content area]1{
2 "accountId": "ACC1",
3 "bundleName": "ACC1common::1.0.5",
4 "bundleStatus": "ACTIVE",
5 "createOn": "2018-03-05T12:15:43.975Z",
6 "bundleVersion": "1.0.5"
7}
Language: json
Name: Example Success Response
Description:
[Warning: empty required content area]1{
2 "accountId": "ACC1",
3 "bundleName": "ACC1.common::1.0.5",
4 "bundleStatus": "FAILED",
5 "createOn": "2018-03-05T12:15:43.975Z",
6 "bundleVersion": "1.0.5",
7 "bundleErrorMessage": "Unable to resolve ACC1.common [1121](R 1121.9): missing requirement [ACC1.common [1121](R 1121.9)] osgi.wiring.package; (&(osgi.wiring.package=com.fasterxml.jackson.module.jsonSchema)(version>=2.8.0)(!(version>=3.0.0))) Unresolved requirements: [[ACC1.common [1121](R 1121.9)] osgi.wiring.package; (&(osgi.wiring.package=com.fasterxml.jackson.module.jsonSchema)(version>=2.8.0)(!(version>=3.0.0)))]"
8}
Language: json
Name: Example Error Response
Description:
[Warning: empty required content area]1Bundle not found for the given bundle name
Language: text
Name: If no record for the specified Bundle exists, a text/plain response returned
Description:
[Warning: empty required content area]1{
2 "errors": [
3 {
4 "code": "InvalidInput",
5 "message": "Logged in user has no retailer"
6 }
7 ]
8}
Language: json
Name: If the incorrect Auth token is used, or the User does not have the right permissions, an errors JSON response will be returned
Description:
[Warning: empty required content area]Uploads and validates a Rules Plugin to the Workflow Engine.
Authentication
Required
Permissions
PLUGIN_VIEW permission is required for the ACCOUNT context. PLUGIN_UPLOAD permission is required for the ACCOUNT context.
Parameters
Name | Required | Description |
file | yes | The binary JAR file is to be uploaded. |
Responses
Response Content-Type:
`application/json`
Code | Description |
200 | Successful Operation |
400 | Client Error - Bad Request |
403 | Authorization Error - No permission |
404 | Not Found |
Example:
1{
2 "message": "51c364ef-1dbf-422d-a0b4-0e6e68b328a1",
3 "status": 200
4}
Language: json
Name: Example Success Response
Description:
[Warning: empty required content area]1{
2 "message": "This version is currently ACTIVE. Please bump up the plugin version.",
3 "status": 400
4}
Language: json
Name: Example Error Response
Description:
[Warning: empty required content area]Installs and Activates a Rules Plugin in the Workflow Engine.
Authentication
Required
Permissions
PLUGIN_VIEW permission is required for the ACCOUNT context. PLUGIN_UPLOAD permission is required for the ACCOUNT context. PLUGIN_INSTALL permission is required for the ACCOUNT context.
Parameters
Name | Required | Description |
accountId | yes | The Account ID |
bundleName | yes | Name used to identify the plugin.
|
Request
1{
2 "accountId": "ACC1",
3 "bundleName": "ACC1.common::1.0.5"
4}
Language: json
Name: Example Request Body
Description:
[Warning: empty required content area]Responses
Response Content-Type:
`application/json`
Code | Description |
200 | Successful Operation |
400 | Client Error - Bad Request |
403 | Authorization Error - No permission |
404 | Not Found |
406 | Not Acceptable |
Successful Response Example:
There is no response body returned when the request was successful. The HTTP Status Code 200 OK will signal the request was successful, however, it is important to execute a plugin status GET request to verify that the plugin activation was completed successfully.
Sample Error:
1Only Verified Bundles Can be Installed
Language: text
Name: If the Bundle to be installed is already ACTIVE or FAILED, the following text/plain message is returned
Description:
[Warning: empty required content area]Author:
Fluent Commerce staff
Changed on:
3 June 2024
The User Action API provides the framework to interact with orchestration via the ServicePoint and Admin Console platform portals, as well as the capability to interact with various other external applications. This interaction provides the capability to translate unique requirements into a user interface.
Property | Value |
URL |
|
Methods |
|
Scheme |
|
Auth |
|
Content-Type |
|
Authentication
Required
Parameters
Name | Description |
body *required | The Location object that needs to be created |
Responses
Response Content Type:
`application/json`
Code | Description |
200 | Successful Operation |
400 | Client Error - Bad Request |
401 | Authorization Error - Invalid Bearer Token / No permission |
403 | Authorization Error - Forbidden |
404 | Client Error - Not Found |
500 | Server Error |
Example
Request:
`https://<AccountId>.sandbox.api.fluentretail.com/api/v4.1/transition`
1{
2 "triggers":[
3 {
4 "type":"MANIFEST",
5 "subtype":"DEFAULT",
6 "status":"PENDING",
7 "retailerId":"2",
8 "module":"servicepoint",
9 "flexType":"CARRIER::DEFAULT",
10 "flexVersion":14
11 }
12 ]
13}
Language: json
Name: Example Request Body
Description:
[Warning: empty required content area]1{
2 "response": [
3 {
4 "trigger": {
5 "name": null,
6 "type": "MANIFEST",
7 "subtype": "DEFAULT",
8 "status": "PENDING",
9 "module": "servicepoint",
10 "flexType": "CARRIER::DEFAULT",
11 "flexVersion": null,
12 "retailerId": "2"
13 },
14 "userActions": [
15 {
16 "eventName": "UPDATE",
17 "context": [
18 {
19 "label": "SUBMIT",
20 "type": "PRIMARY",
21 "modules": [
22 "servicepoint"
23 ],
24 "confirm": false
25 }
26 ],
27 "attributes": []
28 }
29 ],
30 "transitions": [
31 {
32 "eventName": "UPDATE",
33 "context": [
34 {
35 "label": "SUBMIT",
36 "type": "PRIMARY",
37 "modules": [
38 "servicepoint"
39 ],
40 "confirm": false
41 }
42 ],
43 "attributes": []
44 }
45 ]
46 }
47 ]
48}
Language: json
Name: Example Success Response
Description:
[Warning: empty required content area]1{
2 "errors": [
3 {
4 "code": "401",
5 "message": "Invalid user, Authorization header value does not belong to a valid user"
6 }
7 ]
8}
Language: json
Name: Example Error Response
Description:
[Warning: empty required content area]Key | Type | Mandatory? | Possible Values | Constraints | Description |
triggers | TriggerRequest[] | ✅ | List of triggers that match the associated user-action |
Key | Type | Mandatory? | Possible Values | Constraints | Description |
name | String | ❌ | Event name | ||
type | String | ❌ | Entity type | ||
subtype | String | ❌ | Entity subtype | ||
status | String | ❌ | Entity status - if no status is used, all user actions belonging to any status will be returned. | ||
retailerId | String | ✅ | Retailer ID | ||
module | String | ✅ | Case-sensitive | Filter user-action by applicable module (e.g. "servicepoint" or more specifically "servicepoint.arrivals", "adminconsole", or "SFSC"). Value for the module is customizable. | |
flexType | String | ✅ | Specify the type of workflow to request the user action | ||
flexVersion | String | ❌ | Specify the version of the workflow to request the user actions from, if left out will retrieve the latest workflow version. |
Key | Type | Mandatory? | Possible Values | Default Value | Description |
response | UserAction[] | List of user-action responses | |||
UserActionResponse | |||||
trigger | TriggerRequest | Trigger Request. Refer to the Trigger Request model above | |||
userActions | UserAction[] | List of user actions associated with the corresponding trigger | |||
UserAction | |||||
eventName | String | Name of the event to send when action is invoked | |||
context | Context[] | Details about how and where to show the user action in the UI | |||
attributes | Attribute[] | List of any attributes that need to be attached to the event to invoke this user action | |||
Context | |||||
type | String | PRIMARY, SECONDARY | Type of the user-action. Defines how and where this user-action should appear in the UI | ||
label | String | Label to appear on the button to trigger this user-action | |||
modules | String[] | all | List of modules in which the user action is configured to appear | ||
style | String | Additional style flags for the user action (to change coloring, show/hide elements in the modal, etc). Generally used as CSS class names | |||
confirm | Boolean | false | Enforce a "confirm" modal before invoking a user-action event, even if the user-action requires no attributes | ||
Attribute | |||||
name | String | The name under which this attribute should be attached to the user-action event | |||
label | String | UI label for the form element | |||
type | String, Address, OrderItem, Product | Type of attribute (and therefore the form element that should be displayed) | |||
mandatory | Boolean | true | Whether this attribute is required on the event | ||
value | Object | If the value is present, use this value as the attribute value when submitting the event. Do not show a form element for this attribute. This is used to "lock in" some elements, for example, a "Cancel as Broken" button might lock "cancellationReason" to "BROKEN" | |||
defaultValue | Object | Default value to use in the form when applicable | |||
source | String | Defines a source to retrieve valid values for this attribute (e.g. "settings.cancellationReasons") where there is a limited subset | |||
options | Object | When source references an internal settings value, options will be populated by the API | |||
extensions | Object | Stores additional information needed for this an attribute |
Author:
Fluent Commerce staff
Changed on:
3 June 2024
A workflow defines the orchestrated business logic to be applied to an entity on a given event. A workflow consists of Workflow States and Workflow Rule Sets for an Entity. The Workflow States specify the states that the entity could be in at any given point in time. The Workflow Rule Sets specify the business rules behind the progression of these states.
Property | Value |
URL |
|
Methods |
|
Scheme |
|
Auth |
|
Permissions |
|
Content-Type |
|
This API method supports the creation or update of a Workflow within the Fluent Platform. This API method validates the body of the request to ensure that the structure of the Workflow is correct. Requests containing invalid Workflows will respond with an error (see response codes below).
Versioning is an important part of creating and updating Workflows on the Fluent Platform. To see how versions are used on the Fluent Platform, see the Workflow Versioning section of our documentation.
Authentication
WORKFLOW_VIEW, WORKFLOW_CREATE, and WORKFLOW_UPDATE permissions are required for the RETAILER context.
Parameters
Name | Description |
body *Required | A valid Workflow Object |
Responses
Response Content-Type:
`application/json`
Code | Description |
200 | Successful Operation |
400 | Client Error - Bad Request |
401 | Authorization Error - Invalid Bearer Token / No permission |
403 | Forbidden |
404 | Unable to find Workflow |
500 | Error occurred whilst saving Workflow |
Example Request:
1//Workflow
2{
3 description (string),
4 entityType (string),
5 entitySubtype (string),
6 retailerId (string),
7 rulesets (Ruleset[]),
8 statuses (Status[]),
9 version (string),
10 versionComment (string)
11}
12
13//Ruleset
14{
15 name (string),
16 type (string),
17 subtype (string),
18 triggers (Trigger[]),
19 rules (RuleInstance[])
20}
21
22//Trigger
23{
24 status (string)
25}
26
27//RuleInstance
28{
29 name (string),
30 props (object)
31}
32
33//Status
34{
35 name (string),
36 entityType (string),
37 category (string)
38}
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "description": "A custom Workflow for Order Customer Collection",
3 "entityType": "ORDER",
4 "entitySubtype": "CC",
5 "retailerId": "1",
6 "rulesets": [
7 {
8 "name": "CC",
9 "type": "ORDER",
10 "subtype": "CC",
11 "triggers": [
12 {
13 "status": "CREATED"
14 }
15 ],
16 "rules": [
17 {
18 "name": "FLUENTRETAIL.base.ChangeState",
19 "props": {
20 "status": "CCSTATUS"
21 }
22 }
23 ]
24 },
25 {
26 "name": "HD",
27 "type": "ORDER",
28 "subtype": "HD",
29 "triggers": [
30 {
31 "status": "CREATED"
32 }
33 ],
34 "rules": [
35 {
36 "name": "FLUENTRETAIL.base.ChangeState",
37 "props": {
38 "status": "HDSTATUS"
39 }
40 }
41 ]
42 }
43 ],
44 "statuses": [
45 {
46 "name": "HDSTATUS",
47 "entityType": "ORDER",
48 "category": "BOOKING"
49 },
50 {
51 "name": "CCSTATUS",
52 "entityType": "ORDER",
53 "category": "BOOKING"
54 },
55 {
56 "name": "CREATED",
57 "entityType": "ORDER",
58 "category": "BOOKING"
59 },
60 {
61 "name": "",
62 "entityType": "",
63 "category": "BOOKING"
64 }
65 ],
66 "version": "1.4",
67 "versionComment": "Making minor change to Workflow"
68}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Example Success Response:
1{
2 entityId (string),
3 eventStatus (string)
4}
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "entityId": "1-ORDER::CC::1.0",
3 "eventStatus": "COMPLETE"
4}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Example Error Response:
1//Error
2{
3 entityId (string),
4 eventStatus (string),
5 error (ErrorMessage),
6 warning (ErrorMessage)
7}
8
9//ErrorMessage
10{
11 message (string),
12 code (string),
13 workflowValidationError (WorkflowValidationError[]),
14}
15
16//WorkflowValidationError
17{
18 type (string),
19 code (string),
20 attributes (Attribute[]),
21}
22
23//Attribute
24{
25 name (string),
26 value (string),
27 type (string)
28}
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "entityId":"0.0",
3 "eventStatus":"FAILED",
4 "error":{
5 "code":400,
6 "workflowValidationError":[
7 {
8 "type":"ERROR",
9 "code":"RULE_NOT_FOUND",
10 "attributes":{
11 "name":"FLUENTRETAIL.base.ChangeState"
12 }
13 }
14 ]
15 },
16 "warning":{
17 "code":400,
18 "workflowValidationError":[
19 {
20 "type":"WARN",
21 "code":"UNUSED_CATEGORY_FOUND",
22 "attributes":{
23 "categories":[
24 {
25 "name":"HDSTATUS",
26 "entityType":"ORDER",
27 "category":"BOOKING"
28 }
29 ]
30 }
31 }
32 ]
33 }
34}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Returns a specific version of a workflow from the Fluent Platform.
Authentication
Required
Permissions
WORKFLOW_VIEW permission is required for the RETAILER context.
Parameters
Name | Default Value | Description |
retailerId | - | The ID of the Retailer who owns the Workflow |
workflowRef | - | The identifier of the Workflow which is in the format
|
workflowVersion | - | The version of the Workflow being requested which is in the format
|
Responses
Response Content-Type:
`application/json`
Code | Description |
200 | Successful Operation |
400 | Client Error - Bad Request |
401 | Authorization Error - Invalid Bearer Token / No permission |
403 | Forbidden |
404 | Unable to find Workflow |
500 | An error occurred whilst retrieving Workflow |
Example
Request:
`https://<AccountId>.sandbox.api.fluentretail.com/api/v4.1/workflow/1/ORDER::CC/1.4`
Response:
1//Workflow
2{
3 createdBy (string),
4 createdOn (string),
5 description (string),
6 entityType (string),
7 entitySubtype (string),
8 id (string),
9 name (string),
10 retailerId (string),
11 rulesets (Ruleset[]),
12 statuses (Status[]),
13 version (string),
14 versionComment (string)
15}
16
17//Ruleset
18{
19 name (string),
20 type (string),
21 subtype (string),
22 triggers (Trigger[]),
23 rules (RuleInstance[])
24}
25
26//Trigger
27{
28 status (string)
29}
30
31//RuleInstance
32{
33 name (string),
34 props (object)
35}
36
37//Status
38{
39 name (string),
40 entityType (string),
41 category (string)
42}
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "createdBy": "RET28cbef60",
3 "createdOn": "2019-07-10T05:21:25.712+0000",
4 "description": "A custom Workflow for Order Customer Collection",
5 "entityType": "ORDER",
6 "entitySubtype": "CC",
7 "id": null,
8 "name": "ORDER::CC",
9 "retailerId": "1",
10 "rulesets": [
11 {
12 "name": "CC",
13 "type": "ORDER",
14 "eventType": "NORMAL",
15 "rules": [
16 {
17 "name": "FLUENTRETAIL.base.ChangeState",
18 "props": {
19 "status": "CCSTATUS"
20 }
21 }
22 ],
23 "triggers": [
24 {
25 "status": "CREATED"
26 }
27 ],
28 "userActions": []
29 },
30 {
31 "name": "HD",
32 "type": "ORDER",
33 "eventType": "NORMAL",
34 "rules": [
35 {
36 "name": "FLUENTRETAIL.base.ChangeState",
37 "props": {
38 "status": "HDSTATUS"
39 }
40 }
41 ],
42 "triggers": [
43 {
44 "status": "CREATED"
45 }
46 ],
47 "userActions": []
48 }
49 ],
50 "statuses": [
51 {
52 "name": "HDSTATUS",
53 "entityType": "ORDER",
54 "category": "BOOKING"
55 },
56 {
57 "name": "CCSTATUS",
58 "entityType": "ORDER",
59 "category": "BOOKING"
60 },
61 {
62 "name": "CREATED",
63 "entityType": "ORDER",
64 "category": "BOOKING"
65 },
66 {
67 "name": "",
68 "entityType": "",
69 "category": "BOOKING"
70 }
71 ],
72 "version": "1.4",
73 "versionComment": "Making minor change to Workflow"
74}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Example Error Response:
1//Errors
2{
3 errors (Error[])
4}
5
6//Error
7{
8 code (string),
9 message (string)
10}
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "errors": [
3 {
4 "code": "401",
5 "message": "InvalidInput, Logged in user has no retailer"
6 }
7 ]
8}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Returns a list of Workflows filtered by the given combination of parameters.
Authentication
Required
Permissions
WORKFLOW_VIEW permission required for the RETAILER context.
Parameters
Name | Default Value | Description |
retailerId | - | The unique Retailer Id |
accountId | - | The unique Account Id |
start | 1 (i.e. index 0) | The offset of results |
count | 10 | Number of results shown |
sort |
| Sorting options requested |
name | - | Name of the workflow. e.g.
|
latest | false | True returns the latest workflow Versions for all Root Entities |
Responses
Response Content-Type:
`application/json`
Code | Description |
200 | Successful Operation |
400 | Client Error - Bad Request |
401 | Authorization Error - Invalid Bearer Token / No permission |
403 | Forbidden |
404 | Unable to find Workflow |
500 | An error occurred during the search |
Example
Request:
`https://<AccountId>.sandbox.api.fluentretail.com/api/v4.1/workflow?retailerId=1&name=ORDER::CC`
Example Success Response:
1//SearchResponse
2{
3 count (integer),
4 start (integer),
5 total (integer),
6 retailerId (string),
7 results (Workflow[]),
8 sort (string)
9}
10
11//Workflow
12{
13 version (string),
14 name (string),
15 entityType (string),
16 entitySubtype (string),
17 description (string),
18 versionComment (string),
19 createdBy (string),
20 createdOn (date)
21}
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "count": 10,
3 "start": 1,
4 "total": 2,
5 "retailerId": "1",
6 "results": [
7 {
8 "version": "1.9",
9 "name": "ORDER::CC",
10 "entityType": "ORDER",
11 "entitySubtype": "CC",
12 "description": "A custom Workflow for Order Customer Collection",
13 "versionComment": "Making minor change to Workflow",
14 "createdBy": "RET28cbef60",
15 "createdOn": "2019-07-10T05:17:50.055+0000"
16 },
17 {
18 "version": "1.6",
19 "name": "ORDER::CC",
20 "entityType": "ORDER",
21 "entitySubtype": "CC",
22 "description": "A custom Workflow for Order Customer Collection",
23 "versionComment": "Making minor change to Workflow",
24 "createdBy": "RET28cbef60",
25 "createdOn": "2019-07-10T05:17:10.426+0000"
26 }
27 ],
28 "sort": "createdOn DESC"
29}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Example Error Response:
1//Errors
2{
3 errors (Error[])
4}
5
6//Error
7{
8 code (string),
9 message (string)
10}
Language: json
Name: Model
Description:
[Warning: empty required content area]1{
2 "errors": [
3 {
4 "code": "401",
5 "message": "InvalidInput, Logged in user has no retailer"
6 }
7 ]
8}
Language: json
Name: Sample Value
Description:
[Warning: empty required content area]Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.