Skip to main content

Attributes - REST API

How to work with price list and address book attributes in the REST API?

Written by Lenka Haringerová

Attributes allow you to store additional information about price list items for better product comparison. They can therefore logically be regarded as custom fields that extend the information available for individual records.

Regarding the price list, we have a guide with a detailed explanation of the agenda's functionality. The principle of attributes is the same in the address book. However, the difference between price list attributes and address book attributes is that address book attributes are currently only available via the REST API.

Price List

As mentioned above, attributes in the price list can be created, edited, and deleted both via the API and within the desktop application. Let's take a look at how to perform these operations in the API.

Exporting attributes from /cenik:

https://demo.flexibee.eu/c/demo/cenik/42/atributy.xml

The method above does not support standard filtering; only the record ID can be used.

Exporting an attribute from /atribut:

https://demo.flexibee.eu/c/demo/atribut/(cenik='code:CENIK').xml

Within the attributes agenda, you can filter by the price list code or its ID. Within the price list, filtering is only possible using the item ID (see the example above). Standard filtering cannot be used in this case.

Importing attributes:

<?xml version="1.0" encoding="UTF-8"?>
<winstrom version="1.0">
<atribut>
<hodnota>KUZE</hodnota>
<cenik>code:KUFR</cenik>
<typAtributu>code:MATERIAL</typAtributu>
</atribut>
</winstrom>

Editing an attribute (using the record identifier):

<?xml version="1.0" encoding="UTF-8"?>
<winstrom version="1.0">
<atribut>
<id>1</id>
<hodnota>TEXTIL</hodnota>
<cenik>code:KUFR</cenik>
<typAtributu>code:MATERIAL</typAtributu>
</atribut>
</winstrom>

Deleting an attribute (using action execution):

<?xml version="1.0" encoding="UTF-8"?>
<winstrom version="1.0">
<atribut action="delete">
<id>1</id>
<hodnota>TEXTIL</hodnota>
<cenik>code:KUFR</cenik>
<typAtributu>code:MATERIAL</typAtributu>
</atribut>
</winstrom>

The attribute appears as follows in the desktop application:

Address Book

Attributes in the address book can only be created, edited, or deleted via the REST API. However, they can already be viewed within the desktop application as well.

Exporting attributes from /adresar:

https://demo.flexibee.eu/c/demo/adresar/642/atributy.xml

The method above does not support standard filtering; only the record ID can be used.

Exporting attributes from /atribut:

https://demo.flexibee.eu/c/demo/atribut/(adresar='code:FIRMA').xml

Importing attributes:

<?xml version="1.0" encoding="UTF-8"?>
<winstrom version="1.0">
<atribut>
<hodnota>DULEZITY</hodnota>
<adresar>code:FIRMA</adresar>
<typAtributu>code:VZTAH</typAtributu>
</atribut>
</winstrom>

Editing an attribute (using the record identifier):

<?xml version="1.0" encoding="UTF-8"?>
<winstrom version="1.0">
<atribut>
<id>1</id>
<hodnota>NEDULEZITY</hodnota>
<adresar>code:FIRMA</adresar>
<typAtributu>code:VZTAH</typAtributu>
</atribut>
</winstrom>

Deleting an attribute (using action execution):

<?xml version="1.0" encoding="UTF-8"?>
<winstrom version="1.0">
<atribut action="delete">
<id>1</id>
<hodnota>NEDULEZITY</hodnota>
<adresar>code:FIRMA</adresar>
<typAtributu>code:VZTAH</typAtributu>
</atribut>
</winstrom>

The attribute appears as follows in the desktop application:

FAQ

How do you work with price list attributes in the application? Check out our guide for the web and desktop application.

Interested in importing attributes from Excel? This is only available for the price list, but we also have a guide available.

Looking for general documentation with a legend for the individual fields?

Did this answer your question?