curl --request POST \
--url https://api.salesive.com/api/v1/foods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Margherita Pizza",
"description": "Tomato, mozzarella, basil",
"price": 12.5,
"category": "66a2a0aae1b3a40012cd0001",
"images": [
"https://cdn.salesive.com/f/margherita.jpg"
],
"available": true,
"listed": true,
"addons": [
{
"name": "Extra cheese",
"price": 2,
"maxQuantity": 3
}
]
}
'import requests
url = "https://api.salesive.com/api/v1/foods"
payload = {
"name": "Margherita Pizza",
"description": "Tomato, mozzarella, basil",
"price": 12.5,
"category": "66a2a0aae1b3a40012cd0001",
"images": ["https://cdn.salesive.com/f/margherita.jpg"],
"available": True,
"listed": True,
"addons": [
{
"name": "Extra cheese",
"price": 2,
"maxQuantity": 3
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Margherita Pizza',
description: 'Tomato, mozzarella, basil',
price: 12.5,
category: '66a2a0aae1b3a40012cd0001',
images: ['https://cdn.salesive.com/f/margherita.jpg'],
available: true,
listed: true,
addons: [{name: 'Extra cheese', price: 2, maxQuantity: 3}]
})
};
fetch('https://api.salesive.com/api/v1/foods', 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://api.salesive.com/api/v1/foods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Margherita Pizza',
'description' => 'Tomato, mozzarella, basil',
'price' => 12.5,
'category' => '66a2a0aae1b3a40012cd0001',
'images' => [
'https://cdn.salesive.com/f/margherita.jpg'
],
'available' => true,
'listed' => true,
'addons' => [
[
'name' => 'Extra cheese',
'price' => 2,
'maxQuantity' => 3
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.salesive.com/api/v1/foods"
payload := strings.NewReader("{\n \"name\": \"Margherita Pizza\",\n \"description\": \"Tomato, mozzarella, basil\",\n \"price\": 12.5,\n \"category\": \"66a2a0aae1b3a40012cd0001\",\n \"images\": [\n \"https://cdn.salesive.com/f/margherita.jpg\"\n ],\n \"available\": true,\n \"listed\": true,\n \"addons\": [\n {\n \"name\": \"Extra cheese\",\n \"price\": 2,\n \"maxQuantity\": 3\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.salesive.com/api/v1/foods")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Margherita Pizza\",\n \"description\": \"Tomato, mozzarella, basil\",\n \"price\": 12.5,\n \"category\": \"66a2a0aae1b3a40012cd0001\",\n \"images\": [\n \"https://cdn.salesive.com/f/margherita.jpg\"\n ],\n \"available\": true,\n \"listed\": true,\n \"addons\": [\n {\n \"name\": \"Extra cheese\",\n \"price\": 2,\n \"maxQuantity\": 3\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/foods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Margherita Pizza\",\n \"description\": \"Tomato, mozzarella, basil\",\n \"price\": 12.5,\n \"category\": \"66a2a0aae1b3a40012cd0001\",\n \"images\": [\n \"https://cdn.salesive.com/f/margherita.jpg\"\n ],\n \"available\": true,\n \"listed\": true,\n \"addons\": [\n {\n \"name\": \"Extra cheese\",\n \"price\": 2,\n \"maxQuantity\": 3\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"success": true,
"message": "Create a food",
"data": {
"_id": "66a2a1c4e1b3a40012cd1001",
"name": "Margherita Pizza",
"description": "Tomato, mozzarella, basil",
"price": 12.5,
"promoPrice": null,
"images": [
"https://cdn.salesive.com/f/margherita.jpg"
],
"video": null,
"category": "66a2a0aae1b3a40012cd0001",
"available": true,
"listed": true,
"addons": [
{
"name": "Extra cheese",
"price": 2,
"maxQuantity": 3,
"available": true,
"description": ""
}
],
"shop": "66a1eee0e1b3a40012ab0001",
"createdAt": "2026-06-28T09:20:00.000Z",
"updatedAt": "2026-06-28T09:20:00.000Z"
}
}{
"status": 401,
"success": false,
"message": "Unauthorized",
"data": {}
}{
"status": 403,
"success": false,
"message": "Forbidden: missing required scope",
"data": {}
}Create a food
Creates a food item (menu item) in the store.
curl --request POST \
--url https://api.salesive.com/api/v1/foods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Margherita Pizza",
"description": "Tomato, mozzarella, basil",
"price": 12.5,
"category": "66a2a0aae1b3a40012cd0001",
"images": [
"https://cdn.salesive.com/f/margherita.jpg"
],
"available": true,
"listed": true,
"addons": [
{
"name": "Extra cheese",
"price": 2,
"maxQuantity": 3
}
]
}
'import requests
url = "https://api.salesive.com/api/v1/foods"
payload = {
"name": "Margherita Pizza",
"description": "Tomato, mozzarella, basil",
"price": 12.5,
"category": "66a2a0aae1b3a40012cd0001",
"images": ["https://cdn.salesive.com/f/margherita.jpg"],
"available": True,
"listed": True,
"addons": [
{
"name": "Extra cheese",
"price": 2,
"maxQuantity": 3
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Margherita Pizza',
description: 'Tomato, mozzarella, basil',
price: 12.5,
category: '66a2a0aae1b3a40012cd0001',
images: ['https://cdn.salesive.com/f/margherita.jpg'],
available: true,
listed: true,
addons: [{name: 'Extra cheese', price: 2, maxQuantity: 3}]
})
};
fetch('https://api.salesive.com/api/v1/foods', 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://api.salesive.com/api/v1/foods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Margherita Pizza',
'description' => 'Tomato, mozzarella, basil',
'price' => 12.5,
'category' => '66a2a0aae1b3a40012cd0001',
'images' => [
'https://cdn.salesive.com/f/margherita.jpg'
],
'available' => true,
'listed' => true,
'addons' => [
[
'name' => 'Extra cheese',
'price' => 2,
'maxQuantity' => 3
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.salesive.com/api/v1/foods"
payload := strings.NewReader("{\n \"name\": \"Margherita Pizza\",\n \"description\": \"Tomato, mozzarella, basil\",\n \"price\": 12.5,\n \"category\": \"66a2a0aae1b3a40012cd0001\",\n \"images\": [\n \"https://cdn.salesive.com/f/margherita.jpg\"\n ],\n \"available\": true,\n \"listed\": true,\n \"addons\": [\n {\n \"name\": \"Extra cheese\",\n \"price\": 2,\n \"maxQuantity\": 3\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.salesive.com/api/v1/foods")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Margherita Pizza\",\n \"description\": \"Tomato, mozzarella, basil\",\n \"price\": 12.5,\n \"category\": \"66a2a0aae1b3a40012cd0001\",\n \"images\": [\n \"https://cdn.salesive.com/f/margherita.jpg\"\n ],\n \"available\": true,\n \"listed\": true,\n \"addons\": [\n {\n \"name\": \"Extra cheese\",\n \"price\": 2,\n \"maxQuantity\": 3\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/foods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Margherita Pizza\",\n \"description\": \"Tomato, mozzarella, basil\",\n \"price\": 12.5,\n \"category\": \"66a2a0aae1b3a40012cd0001\",\n \"images\": [\n \"https://cdn.salesive.com/f/margherita.jpg\"\n ],\n \"available\": true,\n \"listed\": true,\n \"addons\": [\n {\n \"name\": \"Extra cheese\",\n \"price\": 2,\n \"maxQuantity\": 3\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"success": true,
"message": "Create a food",
"data": {
"_id": "66a2a1c4e1b3a40012cd1001",
"name": "Margherita Pizza",
"description": "Tomato, mozzarella, basil",
"price": 12.5,
"promoPrice": null,
"images": [
"https://cdn.salesive.com/f/margherita.jpg"
],
"video": null,
"category": "66a2a0aae1b3a40012cd0001",
"available": true,
"listed": true,
"addons": [
{
"name": "Extra cheese",
"price": 2,
"maxQuantity": 3,
"available": true,
"description": ""
}
],
"shop": "66a1eee0e1b3a40012ab0001",
"createdAt": "2026-06-28T09:20:00.000Z",
"updatedAt": "2026-06-28T09:20:00.000Z"
}
}{
"status": 401,
"success": false,
"message": "Unauthorized",
"data": {}
}{
"status": 403,
"success": false,
"message": "Forbidden: missing required scope",
"data": {}
}shop is set server-side from the installation and must not be supplied. Requires the WRITE_INVENTORY scope.Authorizations
Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side — never send a shop id.
Body
Food name (max 100 chars).
Price (>= 0).
Food description.
Promotional price (>= 0); nullable.
Array of image URLs.
Video URL; nullable.
Category ObjectId; nullable.
Whether the item is available to order. Default true.
Whether the item is listed on the menu. Default true.
Optional add-ons. Each: name (string, required), price (number, required), maxQuantity (integer, default 10), image (string), available (boolean, default true), description (string).
Show child attributes
Show child attributes
Response
Create a food — success.
201
true
"Create a food"
A restaurant menu item.
Show child attributes
Show child attributes
{
"_id": "66a2a1c4e1b3a40012cd1001",
"name": "Margherita Pizza",
"description": "Tomato, mozzarella, basil",
"price": 12.5,
"promoPrice": null,
"images": ["https://cdn.salesive.com/f/margherita.jpg"],
"video": null,
"category": "66a2a0aae1b3a40012cd0001",
"available": true,
"listed": true,
"addons": [
{
"name": "Extra cheese",
"price": 2,
"maxQuantity": 3,
"available": true,
"description": ""
}
],
"shop": "66a1eee0e1b3a40012ab0001",
"createdAt": "2026-06-28T09:20:00.000Z",
"updatedAt": "2026-06-28T09:20:00.000Z"
}
Was this page helpful?

