Stores

You can manage the network of stores (company branches) via this resource. Many properties as address, GPS coordinates, opening hours or contact details can be synchronized with any other system.

Available methods

All available methods for resource stores.

HTTP method Endpoint Description
[badge-green POST] /stores Create a store
[badge-blue GET] /stores List of all store resources
[badge-blue GET] /stores/{store_id} Get a specific store data
[badge-grey PUT] /stores/{store_id} Update a specific store data

Available methods with sub-resources

All available methods for sub-resources of resource store.

HTTP method Endpoint Description
[badge-green POST] /store/{store_id}/property-records Add a new specific store property record to a store
[badge-blue GET] /stores/{store_id}/property-records Get information about all property records on a store account
[badge-blue GET] /stores/{store_id}/store-group-records Get information about all store group records on a store account
[badge-grey PUT] /stores/{store_id}/property-records/{property_record_id} Update a specific store property record of the store
[badge-red DELETE] /stores/{store_id}/property-records/{property_record_id} Delete a specific store property record of a store


Create a store

Add a new store
[badge-green POST] /stores

Request

Parameter name Type Description Mandatory (Yes/No)
store Store Store structure Yes

Response

Status code: 201 Created
Output structure : object

Parameter name Type Description
store_id string The unique id for the store

Example Request

POST https://<projectURL>/rest-api/enterprise-interface/v1.0/stores
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6ZjFjZDJhZTMyMjllODA2NDzA2ODkxZTZlY2U3OTlkYjQzZDQyNzEwZDUwYTNhMjVmYTJjYzcyYzEwOTU4Mg==

{
  "store" : {
    "store_code" : "",
    "name" : "storeTest",
    "partner_id" : "86e05affc7a7abefcd513ab400",
    "system_id" : "381825804555"
  }
}

Example response

HTTP/1.1 201 Created
Date: Wed, 09 Dec 2020 13:36:02 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "store_id": "82c06812c0756528660784fefb"
  }
}


Get all stores

Get information as a list of all stores.
[badge-blue GET] /stores

Query string

Parameter name Type Description Mandatory (Yes/No)
count integer The number of records to return.
Default value is 100.
No
offset integer The number of records from a collection to skip.
Default value is 0.
No
sort_field string One of the query string parameters for sorting.
Response is sorted by the specified field.
No
sort_direction string Direction of sorting the response list.
Possible values are: ASC / DESC
No
visible_for_customer integer State of the visibility for the customer
Possible values are: 0 - invisible / 1- visible. If query string is not used, return both.
No
property_id string Store property id from resource store-properties. The parameter determines property, which is used to filter stores by their properties. The parameter must be used in combination with property_value otherwise is ignored in the request. No
property_value string Store property record value from resource /stores/{store_id}/property-records or store-properties in case of datatype with multiple values . Parameter filters stores depends of store property record value. The parameter must be used in combination with property_id otherwise is ignored in the request. No

Response

Status code: 200 OK
Output structure : object

Parameter name Type Description
stores Store[] List of all stores
total_items integer Count of all found stores

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/stores?count=1
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6ZjFjZDJlODA2NDg0MzA2ODkxZTZlY2U3OTlkYjQzZDQyNzEwZDUwYTNhMjVmYTJjYzcyYzEwOTU4Mg==

Example response

HTTP/1.1 200 OK
Date: Wed, 09 Dec 2020 13:37:37 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "stores": [
      {
        "store_id": "86e05affc7a7abefcd513ab400",
        "store_code": "",
        "name": "Great Pub",
        "store_address": {
          "address1": "Hlavní",
          "address2": "18",
          "address3": null,
          "address4": null,
          "address5": null,
          "address6": null,
          "address7": null,
          "zip": "19875",
          "city": "Borohrádek",
          "country_code": "cz"
        },
        "contact_email": "",
        "manager_name": "",
        "phone_number": "",
        "partner_id": "86e05affc7a7abefcd513ab400",
        "system_id": "2375303497",
        "gps_coordinates": {
          "gps_longitude": 0,
          "gps_latitude": 0
        },
        "url_address": "",
        "opening": [
          {
            "day_id": "MON",
            "time_intervals": [
              {
                "from": null,
                "to": null
              },
              {
                "from": null,
                "to": null
              }
            ]
          },
          {
            "day_id": "TUE",
            "time_intervals": [
              {
                "from": null,
                "to": null
              },
              {
                "from": null,
                "to": null
              }
            ]
          },
          {
            "day_id": "WED",
            "time_intervals": [
              {
                "from": null,
                "to": null
              },
              {
                "from": null,
                "to": null
              }
            ]
          },
          {
            "day_id": "THU",
            "time_intervals": [
              {
                "from": null,
                "to": null
              },
              {
                "from": null,
                "to": null
              }
            ]
          },
          {
            "day_id": "FRI",
            "time_intervals": [
              {
                "from": null,
                "to": null
              },
              {
                "from": null,
                "to": null
              }
            ]
          },
          {
            "day_id": "SAT",
            "time_intervals": [
              {
                "from": null,
                "to": null
              },
              {
                "from": null,
                "to": null
              }
            ]
          },
          {
            "day_id": "SUN",
            "time_intervals": [
              {
                "from": null,
                "to": null
              },
              {
                "from": null,
                "to": null
              }
            ]
          }
        ],
        "image_urls": [],
        "visibility_for_customer": 1,
        "description": "",
        "short_description": "fdsfdsfds",
        "registration_id": "123",
        "last_change": "2018-12-19 16:12:56",
        "state": 1
      }
    ],
    "total_items": 10
  }
}


Get a store

Get information about a specific store resource.
[badge-blue GET] /stores/{store_id}

Path parameters

Parameter name Type Description
store_id string The unique id for the store

Response

Status code: 200 OK
Output structure : Store

Example Request

GET https://<projectURL>/rest-api/enterprise-interface/v1.0/stores/86e05affc7a7abefcd513ab400
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZhY2U6ZjFjZDJhZTMyMjllODA2NDg0MzA2ODkxZTZlY2U3OTlkYjQzZDQyNzEwZDUwYTNhMjVmYTJjYzcyYzEwOTU4Mg==

Example response

HTTP/1.1 200 OK
Date: Wed, 09 Dec 2020 13:40:35 GMT
Content-Type: application/json; charset=utf-8

{
  "data": {
    "store_id": "86e05affc7a7abefcd513ab400",
    "store_code": "",
    "name": "Great Pub",
    "store_address": {
      "address1": "Hlavní",
      "address2": "18",
      "address3": null,
      "address4": null,
      "address5": null,
      "address6": null,
      "address7": null,
      "zip": "19875",
      "city": "Borohrádek",
      "country_code": "cz"
    },
    "contact_email": "",
    "manager_name": "",
    "phone_number": "",
    "partner_id": "86e05affc7a7abefcd513ab400",
    "system_id": "2375303497",
    "gps_coordinates": {
      "gps_longitude": 0,
      "gps_latitude": 0
    },
    "url_address": "",
    "opening": [
      {
        "day_id": "MON",
        "time_intervals": [
          {
            "from": null,
            "to": null
          },
          {
            "from": null,
            "to": null
          }
        ]
      },
      {
        "day_id": "TUE",
        "time_intervals": [
          {
            "from": null,
            "to": null
          },
          {
            "from": null,
            "to": null
          }
        ]
      },
      {
        "day_id": "WED",
        "time_intervals": [
          {
            "from": null,
            "to": null
          },
          {
            "from": null,
            "to": null
          }
        ]
      },
      {
        "day_id": "THU",
        "time_intervals": [
          {
            "from": null,
            "to": null
          },
          {
            "from": null,
            "to": null
          }
        ]
      },
      {
        "day_id": "FRI",
        "time_intervals": [
          {
            "from": null,
            "to": null
          },
          {
            "from": null,
            "to": null
          }
        ]
      },
      {
        "day_id": "SAT",
        "time_intervals": [
          {
            "from": null,
            "to": null
          },
          {
            "from": null,
            "to": null
          }
        ]
      },
      {
        "day_id": "SUN",
        "time_intervals": [
          {
            "from": null,
            "to": null
          },
          {
            "from": null,
            "to": null
          }
        ]
      }
    ],
    "image_urls": [],
    "visibility_for_customer": 1,
    "description": "",
    "short_description": "fdsfdsfds",
    "registration_id": "123",
    "last_change": "2018-12-19 16:12:56",
    "state": 1
  }
}


Update a store

This method updates a specific store resource.
[badge-grey PUT] /stores/{store_id}

Path parameters

Parameter name Type Description
store_id string The unique id for the store

Request

Parameter name Type Description Mandatory (Yes/No)
store Store Store structure Yes

Response

Status code: 204 No Content

Example Request

PUT https://<projectURL>/rest-api/enterprise-interface/v1.0/stores/86e05affc7a7abefcd513ab400
Content-Type: application/json
Accept-Language: cs, en-gb;q=0.8
Authorization: Basic ZW50ZXJwcmlzZV9pbnRlcmZU6ZjFjZDJhZTMyMjllODA2NDg0MzA2ODkxZTZlY2U3OTlkYjQzZDQyNzEwZDUwYTNhMjVmYTJjYzcyYzEwOTU4Mg==

{
  "store" : {
    "store_code" : "",
    "name" : "name changed",
    "partner_id" : "86e05affc7a7abefcd513ab400",
    "system_id" : "2375303497"
  }
}

Example response

HTTP/1.1 204 No Content
Date: Wed, 09 Dec 2020 13:43:30 GMT
Content-Type: application/json; charset=utf-8