This is the initial version of the UGAL API and is still subject to changes.

Email support@ugal.com with any question or comment.

UGAL API - Items

The items API application requires authentication and provides information about all items (product options) available on the website.

The application allows to update item inventory levels and prices.

Reading a collection of items

URL GET @ http://{siteName}.ugal.com/api/v1/items.xml
Filters ?catalogId={catalogId}
?productId={productId}
Pagination ?p={pageId}

Returns a collection of items (25 items per page):

// Status: 200 OK
<items>
    <item>
        <reference>911-red</reference>
        <status>online</status>
        <label>Red</label>
        <inventory>1</inventory>
        <link>http://sitename.ugal.com/api/v1/items/911-red.xml</link>
        <product>
            <id>2786</id>
            <title>Porsche 911</title>
            <status>online</status>
            <url>http://sitename.ugal.com/cars/porsche-911</url>
            <link>http://sitename.ugal.com/api/v1/products/2786.xml</link>
        </product>
    </item>
    {...}
</items>

Reading an item

URL GET @ http://{siteName}.ugal.com/api/v1/items/{reference}.xml

Returns a full representation of the item, including its prices:

// 200 OK
<item>
    <reference>911-red</reference>
    <status>online</status>
    <label>Red</label>
    <inventory>1</inventory>
    <vatrate>0.1960</vatrate>
    <product>
        <id>2786</id>
        <title>Porsche 911</title>
        <status>online</status>
        <url>http://sitename.ugal.com/cars/porsche-911</url>
        <link>http://sitename.ugal.com/api/v1/products/2786.xml</link>
    </product>
    <prices>
        <price>
            <pricelist>default</pricelist>
            <quantity>1</quantity>
            <currency>eur</currency>
            <amount>9400.00</amount>
            <vat>1540.47</vat>
        </price>
        {...}
    </prices>
</item>

Note:

  • The vat and vatrate elements are present only if the online shop uses VAT.

Updating an item

  • The inventory and prices elements can be updated.
  • When updating the prices element:
    • When not specified, the pricelist is set to "default".
    • When not specified, the quantity element set to "1".
    • A nominal price element (pricelist=default and quantity=1) must be specified.
    • All price elements for the item must be specified.
  • For VAT based shop, the amount specified must be the price including the VAT.
  • Send data in the request body only for the properties that need to be updated.
URL PUT @ http://{sitename}.ugal.com/api/v1/items/{reference}.xml
Body
<item>
    <inventory>2</inventory>
    <prices>
        <price>
            <pricelist>default</pricelist>
            <quantity>1</quantity>
            <amount>9200.00</amount>
        </price>
    </prices>
</item>

Returns the updated representation of the item:

// Status: 200 OK
<item>
    <reference>911-blue</reference>
    {...}
</item>

Table Of Content

Introduction

Website API

Partner API

Appendixes