Attribute scenarios

Attribute scenarios

Contents

Information

How to link product to attributes

Sample data

Option

Example attribute

Input valdiation

Input validation in Cloudsuite client

Visible at PLP

Visible at PDP

Option

Example attribute

Input valdiation

Input validation in Cloudsuite client

Visible at PLP

Visible at PDP

1

Colour

list

Lijst met waardes / List with values

Yes with tickboxes

YES

2

Vezellengte

dec

Decimaal getal / Decimal number

YES as a slider

YES

3

Name product in ERP

none

Geen validatie, vrije tekst / No validation, free text

NO

YES

Scenario 1: attributes in product request (type = list)

key: import key of the attribute property

value: import key of the attributelist value

URL

PUT /api/origin/{origin_code}/product/{key}/ PATCH /api/origin/{origin_code}/product/{key}/

Request sample

{ ... "attributes": [ { "key": "Kleur", "value": "Kleur_bordeaux" } ... ]

Visibility at PLP

Only when the attribute property has the setting layered navigation checked

 

image-20241205-110811.png

 

Scenario 2: attributes in product request (type = dec/ int)

key: import key of the attribute property

value: numeric value. Numbers behind the comma is possible separated by a .

URL

PUT /api/origin/{origin_code}/product/{key}/ PATCH /api/origin/{origin_code}/product/{key}/

Request sample

"attributes": [ { "key": "vezellengte", "value": "44.5" } ]

Visibility at PLP

 

image-20241205-111804.png

Scenario 3: attributes in product request (type = text)

key: import key of the attribute property

value: free text

This text CANNOT be translated!

URL

PUT /api/origin/{origin_code}/product/{key}/ PATCH /api/origin/{origin_code}/product/{key}/

Request sample

"attributes": [ { "key": "name_erp", "value": "Ronde Patentkwast Blue Point 46-14" } ]

 

Scenario 4: Adding separate attributes to a product

As mentioned when the field “attributes” is sent in the product call, always all connected attributes should be added in this field for that product. When you only want to add a new attribute to a product this can be done via the following call.

This method can be used with all the described scenario above

The existing attributes will NOT be deleted, so you need to have a different method (like sending in every attribute for the product) to handle deletes

URL

POST /api/origin/{origin_code}/product/{key}/attribute/{attribute_key}/

attribute_key is the import key of the attribute property

Request sample

[ { "value":"kleur-rood", "sequence":"1" } ]

Fields

Field

Mandatory

Descriptions

Remarks

Field

Mandatory

Descriptions

Remarks

value

yes

Import key of the list value

 

sequence

no

determines the order in which the attributes for this product will be displayed

 

Looking for labels? They can now be found in the details panel on the floating action bar.

Related content

© 2024 CloudSuite BV, All rights reserved