Skip to content

SL01 - Create a location

Request

Call Frequency
Maximum usage: 30 per minute
Query
shop_idinteger, (int64)

Use this parameter when your user has access to several shops. If not specified, the shop_id from your default shop will be used.

Bodyapplication/json
contact_infoobject

Location contact information

descriptionstring, [ 0 .. 2000 ] characters

Location description

geographyobjectrequired
labelstring, [ 3 .. 150 ] charactersrequired

Location label

opening_hoursobject

Location opening hours

curl -i -X POST \
  'https://your-instance.mirakl.net/api/mms/locations?shop_id=0' \
  -H 'Content-Type: application/json' \
  -d '{
    "contact_info": {
      "email": "urna@elit.edu",
      "phone": "1-919-506-3035"
    },
    "description": "Open every day except on monday",
    "geography": {
      "address": {
        "formatted_address": "2466 White Ave, Chico, CA 95973, États-Unis"
      },
      "radius": 2000,
      "type": "CIRCLE"
    },
    "label": "2466 White Avenue",
    "opening_hours": {
      "friday": [
        {
          "closing_time": "12:00",
          "opening_time": "09:00"
        },
        {
          "closing_time": "18:00",
          "opening_time": "14:00"
        }
      ],
      "monday": [],
      "saturday": [
        {
          "closing_time": "12:00",
          "opening_time": "08:00"
        },
        {
          "closing_time": "19:00",
          "opening_time": "14:00"
        }
      ],
      "sunday": [
        {
          "closing_time": "12:00",
          "opening_time": "08:00"
        },
        {
          "closing_time": "18:00",
          "opening_time": "14:00"
        }
      ],
      "thursday": [
        {
          "closing_time": "12:00",
          "opening_time": "08:00"
        },
        {
          "closing_time": "18:00",
          "opening_time": "14:00"
        }
      ],
      "tuesday": [
        {
          "closing_time": "12:00",
          "opening_time": "09:00"
        },
        {
          "closing_time": "18:00",
          "opening_time": "14:00"
        }
      ],
      "wednesday": [
        {
          "closing_time": "12:00",
          "opening_time": "08:00"
        },
        {
          "closing_time": "19:00",
          "opening_time": "14:00"
        }
      ]
    }
  }'

Responses

Created

Bodyapplication/json
contact_infoobject

Location contact information

descriptionstring

Location description

geographyobjectrequired
idstringrequired

Location ID

labelstringrequired

Location label

mediasArray of objects

Medias associated to the location

opening_hoursobject

Location opening hours

overridden_opening_hoursobject

Overridden opening hours. Only available for an operator location

Response
{ "contact_info": { "email": "urna@elit.edu", "phone": "1-919-506-3035" }, "description": "Open every day except on monday", "geography": { "address": { … }, "center": { … }, "radius": 2000, "type": "CIRCLE" }, "id": "30ef2a4c-0ee1-4afe-ac0a-3ef30df43c70", "label": "2466 White Avenue", "opening_hours": { "friday": [ … ], "monday": [], "saturday": [ … ], "sunday": [ … ], "thursday": [ … ], "tuesday": [ … ], "wednesday": [ … ] } }