Skip to content

Shops

A shop represents a single sales location, either a brick-and-mortar store or a e-commerce site.

Mandatory fields

FieldTypeDescription
external_idstringYour unique identifier for the shop.

Optional fields

FieldTypeDescription
namestringName of the store.
emailstringEmail address.
shop_typestring"offline" for brick-and-mortar stores and "online" for webstores and other online properties.
phone_numberphone_numberPhone number to the store, e.g. +358101234567.
street_addressstringStreet address of the store, e.g. Main Street 123.
citystringCity that the store is in, e.g. London.
countrycountry_codeTwo-letter country code, e.g. GB.
is_hiddenbooleanDetermines whether the shop is hidden from the user interface; defaults to false.

Example

To upload new or changed shop information, you may pass them to Custobar using a HTTP POST command, e.g.

bash
curl -X POST -u USER -H "Content-Type: application/json" \
    --data-binary @shops.json https://COMPANY.custobar.com/api/shops/upload/

The shop objects must be provided as a list, wrapped into a JSON object, with a key shops, as shown in the example below.

json
{
    "shops": [
        {
            "external_id": "BAKER-STREET",
            "name": "Baker Street Boutique",
            "shop_type": "offline",
            "city": "London",
            "country": "GB",
            "COMPANY__opening_hours": "24/7"
        }
    ]
}