Export Price

Export Price

The sales prices of items can be accessed via the url GET http://<server name>:<odata port>/<service tier name>/api/BEterna/Export/v2.0/companies(<company system id>)/itemPrices?$filter=webshopChannelCode eq '<webshop-channel-code>'&$expand=itemVariantPrices($expand=prices). The filter on the webshop channel code is mandatory. The response is a JSON with all prices connected to the given webshop channel.

{
    "@odata.context": "http://<server name>:<odata port>/<service tier name>/api/BEterna/Export/v2.0/$metadata#companies(<company system id>)/itemPrices",
    "value": [
        {
            "@odata.etag": "W/\"JzE5OzQ2MTgyMDQ5NzkxMDk1OTY3MzcxOzAwOyc=\"",
            "systemId": "f56de051-86f7-ec11-be4b-ede4b77edebd",
            "webshopChannelCode": "B2B",
            "itemNo": "1896-S",
            "salesPricesSentToWebshop": true,
            "lastSalesPriceChangeAt": "0001-01-01T00:00:00Z",
            "itemVariantPrices": [
                {
                    "@odata.etag": "W/\"JzE5OzYwMjY4NzkxNDY4NzI1ODAzNTYxOzAwOyc=\"",
                    "systemId": "5e06e94b-b109-ed11-be58-91ded4264012",
                    "code": "V1",
                    "prices": [
                        {
                            "@odata.etag": "W/\"JzE5OzQ2NzIxNTU2Nzc4MzYwNDA4NDMxOzAwOyc=\"",
                            "systemId": "df8a3b1e-250c-ed11-be59-a302c15d2eeb",
                            "currency": "EUR",
                            "unitPrice": 189.45,
                            "customerPriceGroup": "50000",
                            "priceIncludesVAT": true
                        },
                        {
                            "@odata.etag": "W/\"JzE5OzQ2NjEwNjI0OTQ1MTI5OTMxNzQxOzAwOyc=\"",
                            "systemId": "2df461eb-ae0c-ed11-be5a-b2548926cdc5",
                            "currency": "RSD",
                            "unitPrice": 20153,
                            "customerPriceGroup": "20000",
                            "priceIncludesVAT": true
                        }
                    ]
                }
            ]
        },
        {
            "@odata.etag": "W/\"JzE5OzQ2NDY4MTA4NTcyMTQxMDg4NzMxOzAwOyc=\"",
            "systemId": "695ed05a-86f7-ec11-be4b-ede4b77edebd",
            "webshopChannelCode": "B2B",
            "itemNo": "1900-S",
            "salesPricesSentToWebshop": true,
            "lastSalesPriceChangeAt": "0001-01-01T00:00:00Z",
            "itemVariantPrices": []
        }
    ]
}

The fields of the item are documented in the following table.

field data type content
systemId GUID the system id of the item selection record
webshopChannelCode Code[20] the webshop channel code
itemNo Code[20] the item no.
salesPricesSentToWebshop Boolean info. if price is already sent to webshop
lastSalesPriceChangeAt DateTime the last time sales price is changed

The fields of the item variant are documented in the following table.

field data type content
systemId GUID the system id of the item selection record
code Code[10] the variant code

The fields of the price are documented in the following table.

field data type content
systemId GUID the system id of the daily sales price record
currency Code[10] the currency
unitPrice Decimal the current unit price
customerPriceGroup Code[20] the sales code
priceIncludesVAT Boolean info. if price includes VAT

Get Prices for Item

The sales prices of one item can be accessed via the url GET http://<server name>:<odata port>/<service tier name>/api/BEterna/Export/v2.0/companies(<company system id>)/itemPrices?$filter=webshopChannelCode eq '<webshop-channel-code>' and itemNo eq '<item-no>'&$expand=itemVariantPrices($expand=prices). The filter on the webshop channel code is mandatory. The response is a JSON with all prices connected to the given webshop channel and item no.

{
    "@odata.context": "http://<server name>:<odata port>/<service tier name>/api/BEterna/Export/v2.0/$metadata#companies(<company system id>)/itemPrices",
    "value": [
        {
            "@odata.etag": "W/\"JzE5OzQ2MTgyMDQ5NzkxMDk1OTY3MzcxOzAwOyc=\"",
            "systemId": "f56de051-86f7-ec11-be4b-ede4b77edebd",
            "webshopChannelCode": "B2B",
            "itemNo": "1896-S",
            "salesPricesSentToWebshop": true,
            "lastSalesPriceChangeAt": "0001-01-01T00:00:00Z",
            "itemVariantPrices": [
                {
                    "@odata.etag": "W/\"JzE5OzYwMjY4NzkxNDY4NzI1ODAzNTYxOzAwOyc=\"",
                    "systemId": "5e06e94b-b109-ed11-be58-91ded4264012",
                    "code": "V1",
                    "prices": [
                        {
                            "@odata.etag": "W/\"JzE5OzQ2NzIxNTU2Nzc4MzYwNDA4NDMxOzAwOyc=\"",
                            "systemId": "df8a3b1e-250c-ed11-be59-a302c15d2eeb",
                            "currency": "EUR",
                            "unitPrice": 189.45,
                            "customerPriceGroup": "50000",
                            "priceIncludesVAT": true
                        },
                        {
                            "@odata.etag": "W/\"JzE5OzQ2NjEwNjI0OTQ1MTI5OTMxNzQxOzAwOyc=\"",
                            "systemId": "2df461eb-ae0c-ed11-be5a-b2548926cdc5",
                            "currency": "RSD",
                            "unitPrice": 20153,
                            "customerPriceGroup": "20000",
                            "priceIncludesVAT": true
                        }
                    ]
                }
            ]
        }
    ]
}

The fields are same as described above.

In this article