Fluent Commerce Logo
Docs
Sign In
Essential knowledge

Author:

Fluent Commerce

Changed on:

3 July 2024

Overview

SKU is the specific item that can be purchased by the customer. SKU has a unique set of attributes such as colour and size. Product is the parent of SKU and must be created before the SKU API can be used.

Key points

  • SKU Properties
  • What you can do with SKU
  • Response on Failures



SKU Properties

Below are the properties available in the \<entity> object which can be updated and retrieved through the APIs in this document.

1. retailerId

Type: String

Description:

1{ "retailerId" : "197" }

Language: json

Name: retailerId

Description:

[Warning: empty required content area]

The retailer identifier assigned by Fluent Commerce.

2. skuId

Type: String

Description:

1{ "skuId" : "499972" }

Language: json

Name: skuId

Description:

[Warning: empty required content area]

The unique SKU identifier assigned by Fluent Commerce.

3. skuRef

Type: String

Description:

1{ "skuRef" : "TestSku_8679" }

Language: java

Name: skuRef

Description:

[Warning: empty required content area]

The unique SKU reference is provided by the retailer.

4. productId

Type: String

Description:

1{ "productId" : "45672" }

Language: java

Name: productId

Description:

[Warning: empty required content area]

The unique product identifier assigned by Fluent Commerce.

5. productRef

Type: String

Description:

1{ "productRef" : "ProductRef_0502" }

Language: json

Name: productRef

Description:

[Warning: empty required content area]

The unique product reference provided by the retailer.

6. status

Type: String

Description:

1{ "status" : "ACTIVE" }

Language: json

Name: status

Description:

[Warning: empty required content area]

SKU status. Possible values are : - ACTIVE - NACTIVE - UNKNOWN

7. imageUrlRef

Type: String

Description:

1{ "imageUrlRef" : "http://demandware.edgesuite.net/aazi_dev/on/demandware.static/Sites-seed-au-Site/-/default/dwa7384063/images/noimagemedium.png" }

Language: java

Name: imageUrlRef

Description:

[Warning: empty required content area]

Can be used to provide the Image URL so that SKUs have an image displayed.

8. name

Type: String

Description:

1{ "name" : "MAV HUNTER DARK USED" }

Language: java

Name: name

Description:

[Warning: empty required content area]

The SKU name.

9. prices

Type: Array

Description:

1"prices": [
2{
3"type" : "UNIT_PRICE",
4"value" : "24.95",
5"currency" : "AUD"
6},
7{ "type" : "ORIGINAL_PRICE",
8"value" : "24.95", 
9"currency" : "AUD"
10}
11]

Language: java

Name: prices

Description:

[Warning: empty required content area]

The price of the SKU

  • currency (string) - Possible values are 'AUD', 'NZD'
  • type (string) - Price type. Possible values are:
    • CURRENT
    • ORIGINAL'
    • ORIGINAL_PRICE'
    • UNIT_PRICE'
  • value (double) - Associated price.
10. references

Type: Array

Description:

1"references": [
2{
3"type" : "EAN",
4
5"value" : "12313123123"
6}
7]

Language: java

Name: references

Description:

[Warning: empty required content area]

Array of SKU references.

  • type (string) - specific SKU reference type. e.g BARCODE.
  • value (string) - Reference value.
11. categories

Type: Array

Description:

1"categories": [
2"234",
3
4"328"
5
6]

Language: java

Name: categories

Description:

[Warning: empty required content area]

An array of category ids associated with the SKU.

12. attributes

Type: Array

Description:

1"attributes": [
2{
3"name" : "Accessories",
4
5"type" : "string",
6
7"value" : "earphones"
8}
9]

Language: java

Name: attributes

Description:

[Warning: empty required content area]

Array of attributes. Attributes are used to provide additional information about the SKU.

  • name (String) : Indicates specific SKU attribute e.g. brand.
  • type (String/Integer) : Data type of specific SKU attribute. Possible values are:
    • STRING
    • INTEGER
  • value (String) : Value of SKU attribute.
13. createdOn

Type: DateTime

Description:

1{ "createdOn" : "2016-05-06T23:41:12.242Z" }

Language: java

Name: createdOn

Description:

[Warning: empty required content area]

Date/time when the SKU was created.

14. updateOn

Type: DateTime

Description:

1{ "updatedOn" : "2016-06-23T07:58:58.000+0000" }

Language: java

Name: updateOn

Description:

[Warning: empty required content area]

Date/time when the SKU was last update.


What you can do with SKU

Create a SKU

Create a SKU in the Fluent Retail system.

POST: 

`/api/v4.1/product/{productId}/sku`

Request Object

1skuRequest {
2
3    attributes (Array[Attribute], optional),
4
5
6        Attribute {
7
8            name (string, optional),
9            type (string, optional) = ['STRING', 'INTEGER'],
10            value (string, optional)
11        }
12
13 categories (array, optional),
14
15        categories {
16
17            id (long, optional)
18        }
19
20    createdOn (DateTime, optional),
21
22    imageUrlRef (string, optional),
23    name (string, compulsory),
24    prices (array, optional),
25
26        price {
27
28            currency (string, optional),
29            type (string, compulsory) = ['CURRENT', 'ORIGINAL', 'ORIGINAL_PRICE', 'UNIT_PRICE'],
30            value (double, optional)
31        }
32
33    productRef (string, optional),
34
35    references (array, optional),
36
37
38        reference {
39
40            type (string, optional),
41            value (string, optional)
42        }
43
44    retailerId (string, optional),
45
46    skuRef (string, compulsory),
47    status (string, compulsory), = 'ACTIVE', 'INACTIVE', 'UNKNOWN',
48    updateOn (DateTime, optional)
49    }

Language: java

Name: Request Object

Description:

[Warning: empty required content area]

Example request

1{
2  "attributes": [
3    {
4      "name": "string",
5      "type": "STRING",
6      "value": "string"
7    }
8  ],
9  "createdOn": "2016-12-13T23:50:55.656Z",
10  "imageUrlRef": "string",
11  "name": "string",
12  "prices": [
13    {
14      "currency": "string",
15      "type": "CURRENT",
16      "value": 0
17    }
18  ],
19  "productRef": "string",
20  "references": [
21    {
22      "type": "string",
23      "value": "string"
24    }
25  ],
26  "retailerId": "string",
27  "skuRef": "string",
28  "status": "ACTIVE",
29  "updateOn": "2016-12-13T23:50:55.657Z"
30} 

Language: json

Name: Example Request

Description:

[Warning: empty required content area]

Response Object

1SuccessMessageResponse {
2
3    id (string, optional)
4    }

Language: java

Name: Response object

Description:

[Warning: empty required content area]

Example response

1{
2 "id":"2043042"
3}

Language: java

Name: Example response

Description:

[Warning: empty required content area]
View SKU Details

Retrieve details of the SKU.

GET: 

`/api/v4.1/product/{productId}/sku/{skuId}`

Response Object

1skuResponse {
2
3    attributes (Array[Attribute]),
4
5
6        Attribute {
7
8            name (string),
9            type (string) = ['STRING', 'INTEGER'],
10            value (string)
11        }
12
13    categories (array),
14
15
16
17        categories {
18
19            categoryId (long),
20            categoryRef (string),
21            name (string)
22        }
23
24
25    createdOn (string),
26    imageUrlRef(string),
27    name (string),
28    prices (array),
29
30        prices {
31
32            currency (string) = 'AUD', 'NZD',
33            type (string) = 'CURRENT', 'ORIGINAL', 'ORIGINAL_PRICE', 'UNIT_PRICE',
34            value (double)
35        }
36
37    productRef (string),
38
39    references (array),
40
41
42        references {
43
44            type (string),
45            value (string)
46        }
47
48    retailerId (string),
49
50    skuRef (string),
51    status (string), = 'ACTIVE', 'INACTIVE', 'UNKNOWN',
52    updatedOn (DateTime)
53    }

Language: java

Name: Response Object

Description:

[Warning: empty required content area]
Example response
1{
2  "skuRef": "DM12345",
3  "productRef": "DM01",
4  "name": "name of sku (description)",
5  "status": "ACTIVE",
6  "prices": [],
7  "attributes": [],
8  "references": [
9    {
10      "type": "BARCODE",
11      "value": "999"
12    }
13  ],
14  "updateOn": "2016-11-15T15:39:50.661+0000",
15  "createdOn": "2016-10-31T01:18:33.253+0000",
16  "imageUrlRef": "url of image",
17  "categories": [
18    {
19      "categoryId": "1",
20      "categoryRef": "50",
21      "name": "Jumper dress"
22    }
23  ]
24}

Language: text

Name: Example response

Description:

[Warning: empty required content area]
Search SKUs

Retrieve a list of SKUs matching the search criteria.

GET: 

`/api/v4.1/sku`

Request Object
1skuRequest {
2
3    productId (string, compulsory),
4
5    start (integer, optional)
6    count (integer, optional)
7    }

Language: java

Name: Request object

Description:

[Warning: empty required content area]
Example request
1{
2 "productId":"2006048",
3 "start":"1",
4 "count":"10"
5 }

Language: text

Name: Example request

Description:

[Warning: empty required content area]

Response Object

1{
2
3start (integer),
4count (integer),
5total (integer),
6retailerId (string),
7results (array[skuSummary]):[
8    {
9    skuId (string),
10    skuRef (string),
11    productRef (string),
12    name (string),
13    status (string), = 'ACTIVE', 'INACTIVE', 'UNKNOWN',
14    imageUrlRef (string),
15    prices (array),
16
17
18
19        price {
20
21            currency (string) = 'AUD', 'NZD',
22            type (string) = 'CURRENT', 'ORIGINAL', 'ORIGINAL_PRICE', 'UNIT_PRICE',
23            value (double)
24        }
25
26        attributes (Array[Attribute]),
27
28
29            Attribute {
30
31                name (string),
32                type (string) = ['STRING', 'INTEGER'],
33                value (string)
34        }
35
36        references (array),
37
38            View references
39                references {
40                type (string),
41                value (string)
42        }
43
44
45        categories (array),
46
47            categories {
48
49                id (long),
50                categoryRef (string),
51                name (string),
52                updatedOn (DateTime),
53                createdOn (DateTime)
54
55        }
56
57        createdOn (string),
58
59        updateOn (DateTime)
60        }
61    ]
62    }

Language: java

Name: Response object

Description:

[Warning: empty required content area]

Example response

1{
2  "start": 1,
3  "count": 1,
4  "total": 10,
5  "retailerId": null,
6  "results": [
7    {
8      "skuId": 1,
9      "skuRef": "DM12345",
10      "productRef": "DM01",
11      "name": "name of sku (description)",
12      "status": "ACTIVE",
13      "imageUrlRef": "url of image",
14      "prices": [],
15      "attributes": [],
16      "references": [
17        {
18          "type": "BARCODE",
19          "value": "999"
20        }
21      ],
22      "categories": [
23        {
24          "id": 1,
25          "categoryRef": "50",
26          "name": "Jumper dress",
27          "updatedOn": "2016-10-31T01:18:32.916+0000",
28          "createdOn": "2016-10-31T01:18:32.916+0000"
29        }
30      ],
31      "updateOn": "2016-11-15T15:39:50.661+0000",
32      "createdOn": "2016-10-31T01:18:33.253+0000"
33    }
34  ]
35}

Language: java

Name: Example response

Description:

[Warning: empty required content area]
Update SKU Details

Edit the SKU information.

PUT: 

`/api/v4.1/product/{productId}/sku/{skuId}`

Request Object

1skuRequest {
2
3    attributes (Array[Attribute], optional),
4
5
6        Attribute {
7
8            name (string, compulsory),
9            type (string, compulsory) = ['STRING', 'INTEGER'],
10            value (string, compulsory)
11        }
12
13
14
15    categories (array, optional),
16
17        categories {
18
19            categoryId (long, optional),
20            categoryRef (string, compulsory),
21            name (string, optional),
22            createdOn (DateTime, optional),
23            updatedOn (DateTime, optional),
24        }
25
26    createdOn (DateTime, optional),
27
28    imageUrlRef (string, optional),
29
30    name (string, optional),
31
32    prices (array, optional),
33
34        prices {
35
36            currency (string, compulsory) = 'AUD', 'NZD',
37            type (string, compulsory) = 'CURRENT', 'ORIGINAL', 'ORIGINAL_PRICE', 'UNIT_PRICE',
38            value (double, compulsory)
39        }
40
41    productRef (string, compulsory),
42
43
44    references (array, optional),
45
46
47        references {
48
49            type (string, compulsory),
50            value (string, compulsory)
51        }
52
53    retailerId (string, optional),
54
55    skuRef (string, compulsory),
56    status (string, optional), = 'ACTIVE', 'INACTIVE', 'UNKNOWN',
57    updatedOn (DateTime, optional)
58
59
60    }

Language: java

Name: Request Object

Description:

[Warning: empty required content area]
Example request
1{
2"attributes": [
3{
4"name": "Brand",
5"value": "soles",
6"type": "STRING"
7}
8],
9"imageUrlRef": "https://www.gluestore.com.au/media/catalog/product/s/o/sol_6300004799929_black01.jpg (656KB)",
10"name": "TestProd_1234",
11"prices": [],
12"productRef": "ProductRef_0502",
13"references": [],
14"skuRef": "TestSku_8679",
15"status": "ACTIVE",
16"retailerId": "211",
17"categories": []
18}

Language: text

Name: Example request

Description:

[Warning: empty required content area]

Response object

1SuccessMessageResponse {
2
3    id (string, optional),
4}

Language: java

Name: Response object

Description:

[Warning: empty required content area]

Example response

1{
2 "id":"427323"
3}

Language: java

Name: Example response

Description:

[Warning: empty required content area]


Response on Failures

NAME

TYPE

DESCRIPTION

error

Array

Array of errors

message

String

Additional information on the code Unauthorized | Bad Request | Forbidden | Not Found | Status 500 Error

code

String

Status Code for the above messages 401 | 400 | 403 | 404 | 500

Fluent Commerce

Fluent Commerce