List what a shift sells
curl --request GET \
--url https://app.eat-now.io/api/partner/v1/shifts/{id}/products \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.eat-now.io/api/partner/v1/shifts/{id}/products"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.eat-now.io/api/partner/v1/shifts/{id}/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.eat-now.io/api/partner/v1/shifts/{id}/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.eat-now.io/api/partner/v1/shifts/{id}/products"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.eat-now.io/api/partner/v1/shifts/{id}/products")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.eat-now.io/api/partner/v1/shifts/{id}/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"shift_id": "<string>",
"date": "<string>",
"deposit": {
"amount_per_cover": 123,
"currency": "MAD",
"mode": "SOFT_PREAUTH",
"minimum_party_size": 123,
"delay_minutes": 123,
"refundable": true
},
"prepayment": {
"offered": true,
"mandatory": true,
"refundable": true
},
"products": [
{
"id": "<string>",
"type": "PREPAYMENT",
"name": "<string>",
"description": "<string>",
"currency": "MAD",
"per_cover": true,
"online_payment": true,
"deposit_percent": 50,
"price_visible": true,
"minimum_delay_hours": 123,
"stock": {
"remaining": 123
},
"variants": [
{
"id": "<string>",
"name": "<string>",
"price": 123,
"covers_per_unit": 2,
"min_covers": 123,
"max_covers": 123,
"stock": {
"remaining": 123
}
}
]
}
]
}
}{
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}Catalog
List what a shift sells
The payment conditions of a table shift (deposit, prepayment) and the formulas (PREPAYMENT) and add-ons (EXTRA) a reservation may buy in products on POST /reservations: the ones sold to prescriber_id (else to the public; internal products are never listed), with their active variants, prices in the smallest currency unit. With date, the shift must serve that day and stock gives what is left; it is indicative, checked again at creation. minimum_delay_hours is given, not applied: the create applies it to the booking’s start. An unknown prescriber_id returns 422. Requires CATALOG_READ.
GET
/
api
/
partner
/
v1
/
shifts
/
{id}
/
products
List what a shift sells
curl --request GET \
--url https://app.eat-now.io/api/partner/v1/shifts/{id}/products \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.eat-now.io/api/partner/v1/shifts/{id}/products"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.eat-now.io/api/partner/v1/shifts/{id}/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.eat-now.io/api/partner/v1/shifts/{id}/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.eat-now.io/api/partner/v1/shifts/{id}/products"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.eat-now.io/api/partner/v1/shifts/{id}/products")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.eat-now.io/api/partner/v1/shifts/{id}/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"shift_id": "<string>",
"date": "<string>",
"deposit": {
"amount_per_cover": 123,
"currency": "MAD",
"mode": "SOFT_PREAUTH",
"minimum_party_size": 123,
"delay_minutes": 123,
"refundable": true
},
"prepayment": {
"offered": true,
"mandatory": true,
"refundable": true
},
"products": [
{
"id": "<string>",
"type": "PREPAYMENT",
"name": "<string>",
"description": "<string>",
"currency": "MAD",
"per_cover": true,
"online_payment": true,
"deposit_percent": 50,
"price_visible": true,
"minimum_delay_hours": 123,
"stock": {
"remaining": 123
},
"variants": [
{
"id": "<string>",
"name": "<string>",
"price": 123,
"covers_per_unit": 2,
"min_covers": 123,
"max_covers": 123,
"stock": {
"remaining": 123
}
}
]
}
]
}
}{
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "<string>",
"request_id": "<string>",
"details": {}
}
}