Lists of stores (branches)


API documentation for working with stores (branches)

Table with field descriptions:

Field Type Required? Description
id int No Unique store identifier.
lat string Yes Geographic latitude of the store location.
lon string Yes Geographic longitude of the store location.
tooltippintext string No Text for the map tooltip.
email string No Store email.
order int No The serial number of the store display.
description_ro string No Description of the store in Romanian.
description_ru string No Description of the store in Russian.
description_en string No Description of the store in English.
description_uk string No Description of the store in Ukrainian.
iframe string No An HTML frame to display additional store-related data.
company_id int No ID of the company associated with the store. https://admin.ecom.md/ru/admin/users/company/
is_active boolean Yes Whether the store is active (true/false).
phones array No An array of store phones with their identifiers (id) and numbers (phone). https://admin.ecom.md/ru/admin/Base_files/phone/
addresses object Yes Store address. Contains the fields: region_id, locality_id, sector_id, address, house, entrance, apartment, zip_code.

1. Getting all stores

Method: GET
URL: {domain}/external/shop/

Description:
Returns a list of all stores (branches) of the site.

Query example:

GET {domain}/external/shop/

Example answer:

[
    {
        "id": 333,
        "lat": "47.04425769408643",
        "lon": "28.8317133350053",
        "tooltip_pin_text": "test test",
        "email": "[[email protected]](https://docs.ecom.md/cdn-cgi/l/email-protection)",
        "order": 55,
        "description_ro": null,
        "description_ru": null,
        "description_en": null,
        "description_uk": null,
        "iframe": "",
        "company_id": null,
        "is_active": true,
        "phones": [
            {
                "id": 4,
                "phone": "+373 60 11 11 14"
            },
            {
                "id": 3,
                "phone": "+373 60 11 11 13"
            }
        ],
        "addresses": {
            "region_id": 3,
            "locality_id": 70,
            "sector_id": 10,
            "address": "Vadul lui Voda 78/2",
            "house": null,
            "entrance": null,
            "apartment": null,
            "zip_code": null
        }
    }
]

2. Receive one store

Method: GET
URL: {domain}/external/shop/{id}/

Description:
Returns data for one store by its unique identifier.

Query example:

GET {domain}/external/shop/333/

Example answer:

{
    "id": 333,
    "lat": "47.04425769408643",
    "lon": "28.8317133350053",
    "tooltip_pin_text": "test test",
    "email": "[[email protected]](https://docs.ecom.md/cdn-cgi/l/email-protection)",
    "order": 55,
    "description_ro": null,
    "description_ru": null,
    "description_en": null,
    "description_uk": null,
    "iframe": "",
    "company_id": null,
    "is_active": true,
    "phones": [
        {
            "id": 4,
            "phone": "+373 60 11 11 14"
        },
        {
            "id": 3,
            "phone": "+373 60 11 11 13"
        }
    ],
    "addresses": {
        "region_id": 3,
        "locality_id": 70,
        "sector_id": 10,
        "address": "Vadul lui Voda 78/2",
        "house": null,
        "entrance": null,
        "apartment": null,
        "zip_code": null
    }
}

3. Creation of several stores

Method: POST
URL: {domain}/external/shop/bulk-create/

Description:
Creates several stores at the same time.

Query example:

POST {domain}/external/shop/bulk-create/
Content-Type: application/json

Request body:

[
    {
        "lat": "47.04425769408643",

"lon": "28.8317133350053", "tooltippintext": "new test shop", "email": "[email protected]", "order": 1, "descriptionro": "Description in Romanian", "descriptionru": "Description in Russian", "descriptionen": "Description in English", "descriptionuk": "Description of Ukrainian", "iframe": "", "companyid": 1, "isactive": true, "phones": [ { "id": 1, "phone": "+373 60 11 11 11" }, { "id": 2, "phone": "+373 60 11 11 12" } ], "addresses": { "regionid": 4, "localityid": 71, "sectorid": 11, "address": "Stefan cel Mare 12", "house": "1", "entrance": "", "apartment": "", "zipcode": "MD-2020" } } ]

Example answer:

[
    {
        "id": 334,
        "lat": "47.04425769408643",
        "lon": "28.8317133350053",
        "tooltip_pin_text": "new test shop",
        "email": "[[email protected]](https://docs.ecom.md/cdn-cgi/l/email-protection)",
        "order": 1,
        "description_ro": "Description in Romanian",
        "description_ru": "Description in Russian",
        "description_en": "Description in English",
        "description_uk": "Description of Ukrainian",
        "iframe": "",
        "company_id": 1,
        "is_active": true,
        "phones": [
            {
                "id": 1,
                "phone": "+373 60 11 11 11"
            },
            {
                "id": 2,
                "phone": "+373 60 11 11 12"
            }
        ],
        "addresses": {
            "region_id": 4,
            "locality_id": 71,
            "sector_id": 11,
            "address": "Stefan cel Mare 12",
            "house": "1",
            "entrance": "",
            "apartment": "",
            "zip_code": "MD-2020"
        }
    }
]

4. Multiple store updates

Method: PUT
URL: {domain}/external/shop/bulk-update/

Description:
Updates data from multiple stores simultaneously.

Query example:

PUT {domain}/external/shop/bulk-update/
Content-Type: application/json

Request body:

[
    {
        "id": 333,
        "tooltip_pin_text": "updated shop tooltip",
        "email": "[[email protected]](https://docs.ecom.md/cdn-cgi/l/email-protection)",
        "is_active": false,
        "addresses": {
            "region_id": 3,
            "locality_id": 70,
            "sector_id": 10,
            "address": "Updated Address 78/2"
        }
    },
    {
        "id": 334,
        "tooltip_pin_text": "another shop update",
        "email": "[[email protected]](https://docs.ecom.md/cdn-cgi/l/email-protection)",
        "is_active": true
    }
]

Example answer:

[
    {
        "id": 333,
        "tooltip_pin_text": "updated shop tooltip",
        "email": "[[email protected]](https://docs.ecom.md/cdn-cgi/l/email-protection)",
        "is_active": false,
        "addresses": {
            "region_id": 3,
            "locality_id": 70,
            "sector_id": 10,
            "address": "Updated Address 78/2"
        }
    },
    {
        "id": 334,
        "tooltip_pin_text": "another shop update",
        "email": "[[email protected]](https://docs.ecom.md/cdn-cgi/l/email-protection)",
        "is_active": true
    }
]

Was the article helpful?

Yes, thank you! Unfortunately no

article.helpfulQuestion