eCOS® API Help

How to manage stores

Stores (points of sales) are managed through delivery locations and related resources. A store is a specific type of delivery location.

This article describes the resources that you should be aware of to manage stores.

To create or modify stores, you will need to follow this procedure:

  1. Retrieve all associated resources

  2. Retrieve all delivery locations

  3. Determine stores to be created or modified based on your task

  4. Create new related resources (if required)

  5. Create or modify stores (as needed)

Delivery location

An example of a delivery location is shown below. See DeliveryLocation for more details.

{ "id": 1265, "deliveryLocationTypeId": 2, "reference": "0000000312", "label": "CASINO 75012 PARIS PLACE DE LA NATION", "companyName": "CASINO 75012 PARIS", "firstname": null, "lastname": null, "email": null, "addressLine": "26 PLACE DE LA NATION", "addressLine2": null, "postcode": "75012", "city": "PARIS", "country": "France", "phoneNumber": "01 47 00 00 00", "phoneNumber2": null, "faxNumber": "01 47 00 00 99", "faxNumber2": null, "addressComment": null, "contactEmail": null, "modifiedDate": "2024-06-12T08:28:30.223Z", "groupId": 1, "channelId": 2, "potentialVal": 44551, "availability_Mon": "8,9", "availability_Tue": "9,10,11", "availability_Wed": "8,9", "availability_Thu": "8,9,10", "availability_Fri": "8,9,10", "availability_Sat": null, "availability_Sun": null, "open_Mon": null, "open_Tue": null, "open_Wed": null, "open_Thu": null, "open_Fri": null, "open_Sat": null, "open_Sun": null, "distributionChannel": 1, "accountId": 396, "clusteringId": 2, "nextAppointmentUid": "020bc204-7d69-4282-9c5c-e230e1e7ce8f", "nextAppointmentDate": "2024-06-13T06:30:00Z", "organisations": [ 80 ], "seasonalities": [], "addressModifiedDate": "2021-12-24T10:57:14.12Z", "posTypeId": 0, "geolocPermanentBypass": false, "identificationNumber": null, "newDeliveryLocationTypeId": 0, "deliveryDays": null }

The relevant relations between a delivery location and its related resources are shown in this table. Consult the schema of each resource to see all the available fields.

Delivery location field

Related resource field

DeliveryLocation .organisations[]

Organisation .id

DeliveryLocation .accountId

Account .id

DeliveryLocation .deliveryLocationTypeId

DeliveryLocationType .id

DeliveryLocation .channelId

Channel .id

DeliveryLocation .groupId

DeliveryLocationGroup .id

DeliveryLocation .channelId

Channel .id

DeliveryLocation .distributionChannel

DistributionChannel .id

Retrieve all associated resources

Retrieve all the data required to manage delivery locations by calling the following methods.

GET /Core/Organisations

GET /Distributor/Accounts

GET /Sales/DeliveryLocationTypes

GET /Sales/DeliveryLocationGroups

GET /Distributor/Channels

GET /Sales/DistributionChannels

Retrieve all delivery locations

GET /Sales/DeliveryLocations

Depending on your requirements, you may need to automatically create a related resource that does not already exist in the system.

For example, you might want to automatically create a POS Type.

POST /Sales/POSTypes

Create or modify stores

POST /Sales/DeliveryLocations

EDI fields correspondence

The following table illustrates the correspondence between the EDI specification and the corresponding fields in the API.

Id

Description

Resource field

1

Référence magasin

DeliveryLocation .reference

2

Libellé magasin

DeliveryLocation .label

3

Code enseigne

Account .codeAccount

4

Organisation

Organisation .reference

5

Raison Sociale

DeliveryLocation .companyName

6

Telephone1

DeliveryLocation .phoneNumber

7

Telephone2

DeliveryLocation .phoneNumber2

8

Fax1

DeliveryLocation .faxNumber

9

Fax2

DeliveryLocation .faxNumber2

10

Adresse1

DeliveryLocation .addressLine

11

Adresse2

DeliveryLocation .addressLine2

12

CP

DeliveryLocation .postcode

13

Ville

DeliveryLocation .city

14

Pays

DeliveryLocation .country

15

Potentiel (valeur)

DeliveryLocation .potentialVal

16

Circuit

Channel .name

17

Groupe

DeliveryLocationGroup .label

18

Circuit de distribution

DistributionChannel .label

Last modified: 29 octobre 2024