ENDPOINT
https://gusteau.io/{locale}/api/v1
QUERY
- {locale} = en|fr
GET
/settings
DESCRIPTION
returns the different parameters common to all restaurants
GET
/place/{place_id}
QUERY
- {place_id} = id restaurant
DESCRIPTION
returns restaurant details
GET
/place/{place_id}/actu
QUERY
- {place_id} = id restaurant
DESCRIPTION
returns the news
GET
/place/{place_id}/gallery
QUERY
- {place_id} = id restaurant
DESCRIPTION
returns all photo galleries
GET
/place/{place_id}/document
QUERY
- {place_id} = id restaurant
DESCRIPTION
returns all documents
GET
/place/{place_id}/document/labels/{label}
QUERY
- {place_id} = id restaurant
- {label} = label (optional)
DESCRIPTION
returns all documents tagged with {label}
if {label} is not filled returns all tagged documents
POST
/place/{place_id}/form/{form_id}/contact/create
QUERY
- {place_id} = id restaurant
- {form_id} = id form
FORM-DATA
- contact[name] = name (optional)
- contact[email] = email
- contact[phone] = telephone (optional)
- contact[message] = message (optional)
- contact[files][i][file] = files
DESCRIPTION
creates a contact
GET
/place/{place_id}/fermetures
QUERY
- {place_id} = id restaurant
DESCRIPTION
returns the list of restaurant closings
GET
/place/{place_id}/carte
QUERY
- {place_id} = id restaurant
DESCRIPTION
returns the 2 restaurant card menus "takeaway" and "delivery" if they exist
GET
/place/{place_id}/carte/{carte_id}/{address_id}
QUERY
- {place_id} = id restaurant
- {carte_id} = id restaurant card menu
- {address_id} = id restaurant address (optional)
DESCRIPTION
returns the restaurant card menu details
if {address_id} is provided, filters the products available only for this address
if {address_id} is provided, filters the products available only for this address
GET
/place/{place_id}/vente/{type}/time_slots/planning
QUERY
- {place_id} = id restaurant
- {type} = type (takeaway|delivery)
DESCRIPTION
returns all the time slots defined in the back office
GET
/place/{place_id}/vente/{type}/time_slots/available/{days}
QUERY
- {place_id} = id restaurant
- {type} = type (takeaway|delivery)
- {days} = number of days
DESCRIPTION
returns all the time slots defined in the back office for the {days} days to come taking into account the following constraints:
- - closed time slots
- - days closed
GET
/place/{place_id}/vente/{type}/time_slots/free
QUERY
- {place_id} = id restaurant
- {type} = type (takeaway|delivery)
DESCRIPTION
returns all the time slots available taking into account all of the following constraints:
- - closed time slots
- - days closed
- - limits to avaliability
- - maximum number of orders per time slot
- - number of existing orders
- - date limits for dishes
- - closing dates
GET
/place/{place_id}/vente/{type}/time_slots
QUERY
- {place_id} = id restaurant
- {type} = type (takeaway|delivery)
DESCRIPTION
returns all the time slots.
the field "free" indicates if it is available for orders.
the field "free" indicates if it is available for orders.
GET
/place/{place_id}/vente/{type}/vente/delivery/zones
QUERY
- {place_id} = id restaurant
- {type} = type (takeaway|delivery)
DESCRIPTION
returns all the delivery areas for the restaurant
POST
/place/{place_id}/vente/{type}/vente/delivery/zone/inside
QUERY
- {place_id} = id restaurant
- {type} = type (takeaway|delivery)
FORM-DATA
- form[lat] = latitude
- form[lng] = longitude
DESCRIPTION
returns all the delivery areas that include the point (lng,lat)
POST
/place/{place_id}/client/register
QUERY
- {place_id} = id restaurant
FORM-DATA
- client[societe] = company (optional)
- client[civilite] = civility (mr|mme)
- client[prenom] = first name
- client[nom] = last name
- client[email] = email
- client[password] = password
- client[telephone] = telephone
- client[majeur] = legal age (0|1)
- client[newsletter] = subscribe to the newsletter (0|1)
DESCRIPTION
customer registration
POST
/place/{place_id}/client/login
QUERY
- {place_id} = id restaurant
FORM-DATA
- email = email
- password = password
RESPONSE
- api_token
DESCRIPTION
customer login
returns the authentication token for connection to the secured api
GET
/place/{place_id}/client/view
QUERY
- {place_id} = id restaurant
HEADER
- X-AUTH-TOKEN
DESCRIPTION
returns customer’s details
POST
/place/{place_id}/client/edit
QUERY
- {place_id} = id restaurant
HEADER
- X-AUTH-TOKEN
FORM-DATA
- client[societe] = company (optional)
- client[civilite] = civility (mr|mme)
- client[prenom] = first name
- client[nom] = last name
- client[email] = email
- client[telephone] = telephone
- client[majeur] = legal age (0|1)
- client[newsletter] = subscribe to the newsletter (0|1)
- client[locale] = langue (fr|en)
DESCRIPTION
edits customer’s details
POST
/place/{place_id}/client/password
QUERY
- {place_id} = id restaurant
HEADER
- X-AUTH-TOKEN
FORM-DATA
- client[password] = password
DESCRIPTION
changes customer’s password
POST
/place/{place_id}/client/adresse/new
QUERY
- {place_id} = id restaurant
HEADER
- X-AUTH-TOKEN
FORM-DATA
- adresse[title] = address name (optional)
- adresse[adresse] = address
- adresse[code_postal] = post code
- adresse[ville] = town
- adresse[pays] = country
- adresse[telephone] = telephone
- adresse[complement] = additional address details (optional)
- adresse[lat] = latitude
- adresse[lng] = longitude
DESCRIPTION
adds a customer’s address
POST
/place/{place_id}/client/adresse/edit/{adresse_id}
QUERY
- {place_id} = id restaurant
- {adresse_id} = id address
HEADER
- X-AUTH-TOKEN
FORM-DATA
- adresse[title] = address name (optional)
- adresse[adresse] = address
- adresse[code_postal] = post code
- adresse[ville] = town
- adresse[pays] = country
- adresse[telephone] = telephone
- adresse[complement] = additional address details (optional)
- adresse[lat] = latitude
- adresse[lng] = longitude
DESCRIPTION
edits a customer’s address
POST
/place/{place_id}/client/adresse/delete/{adresse_id}
QUERY
- {place_id} = id restaurant
- {adresse_id} = id address
HEADER
- X-AUTH-TOKEN
DESCRIPTION
deletes a customer’s address
POST
/place/{place_id}/client/commande/new
QUERY
- {place_id} = id restaurant
HEADER
- X-AUTH-TOKEN
FORM-DATA
- form[vente_type] = type of order (takeaway|delivery)
- form[vente_date] = date of order (YYYY-MM-DD)
- form[vente_day_id] = id day
- form[vente_time_slot_id] = id time slot
- form[vente_delivery_zone_id] = id delivery area
- form[message] = message (optional)
- form[adresse_livraison_id] = id delivery address
- form[adresse_facturation] = billing address
- form[carte_id] = id restaurant card
- form[address_id] = id address restaurant (optional)
- form[produits] = order content (JSON)
DESCRIPTION
creates a customer order
- form[vente_delivery_zone_id] and form [adresse_livraison_id] are optional if vente_type = takeaway
- form[produits] should be a valid JSON in the following format:
{ "plats": [ { "id": 1, "title": "", "quantite": 1 }, ... ], "supplements": [ { "id": 2, "title": "", "quantite": 1 }, ... ], "menus": [ { "id": 1, "title": "", "quantite": 1, "plats": [ { "id": 1, "title": "" }, ... ]}, ... ] }
GET
/place/{place_id}/commande/list
QUERY
- {place_id} = id restaurant
HEADER
- X-AUTH-TOKEN
DESCRIPTION
returns the customer’s list of orders
GET
/place/{place_id}/commande/view{commande_id}
QUERY
- {place_id} = id restaurant
- {commande_id} = id order
HEADER
- X-AUTH-TOKEN
DESCRIPTION
returns details of the customer’s order
POST
/place/{place_id}/client/commande/paiement/{commande_id}
QUERY
- {place_id} = id restaurant
- {commande_id} = id order
HEADER
- X-AUTH-TOKEN
FORM-DATA
- form[url_commande] = order page URL
- form[url_paiement_success] = payment successful page URL
- form[url_paiement_error] = payment failure page URL
RESPONSE
- the payment page URL
DESCRIPTION
pays a customer’s order
once redirected to the payment page:
- if the payment is successful the customer will be redirected to the url form[url_paiement_success]
- if the payment fails the customer will be redirected to the url form[url_paiement_error]
- if the customer clicks on the link "Back to the website" they will be redirected to the url form [url_commande]