Submit a new product
curl --request POST \
--url http://localhost:3000/v1/partner/products \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"retail_price": 1,
"brand": "<string>",
"description": "<string>",
"barcode": "<string>",
"size": "<string>",
"size_value": 123,
"size_uom": "<string>",
"wholesale_price": 1,
"temperature_zone": "ambient",
"image_url": "<string>",
"image_urls": [
"<string>"
],
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subcategory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_for_human_consumption": true,
"nutrition_info": {
"servings_per_container": 123,
"serving_size_quantity": 123,
"serving_size_unit": "<string>",
"serving_size_weight": 123,
"serving_size_weight_unit": "<string>",
"calories": 123,
"total_fat": 123,
"saturated_fat": 123,
"trans_fat": 123,
"polyunsaturated_fat": 123,
"monounsaturated_fat": 123,
"cholesterol": 123,
"sodium": 123,
"total_carbohydrates": 123,
"dietary_fiber": 123,
"total_sugars": 123,
"added_sugars": 123,
"sugar_alcohol": 123,
"protein": 123,
"vitamins": [
{
"name": "<string>",
"value": 123,
"unit": "<string>"
}
]
},
"weight_pounds": 1,
"height_inches": 1,
"length_inches": 1,
"width_inches": 1,
"is_vegan": true,
"is_organic": true,
"is_gluten_free": true
}
'import requests
url = "http://localhost:3000/v1/partner/products"
payload = {
"name": "<string>",
"retail_price": 1,
"brand": "<string>",
"description": "<string>",
"barcode": "<string>",
"size": "<string>",
"size_value": 123,
"size_uom": "<string>",
"wholesale_price": 1,
"temperature_zone": "ambient",
"image_url": "<string>",
"image_urls": ["<string>"],
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subcategory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_for_human_consumption": True,
"nutrition_info": {
"servings_per_container": 123,
"serving_size_quantity": 123,
"serving_size_unit": "<string>",
"serving_size_weight": 123,
"serving_size_weight_unit": "<string>",
"calories": 123,
"total_fat": 123,
"saturated_fat": 123,
"trans_fat": 123,
"polyunsaturated_fat": 123,
"monounsaturated_fat": 123,
"cholesterol": 123,
"sodium": 123,
"total_carbohydrates": 123,
"dietary_fiber": 123,
"total_sugars": 123,
"added_sugars": 123,
"sugar_alcohol": 123,
"protein": 123,
"vitamins": [
{
"name": "<string>",
"value": 123,
"unit": "<string>"
}
]
},
"weight_pounds": 1,
"height_inches": 1,
"length_inches": 1,
"width_inches": 1,
"is_vegan": True,
"is_organic": True,
"is_gluten_free": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
retail_price: 1,
brand: '<string>',
description: '<string>',
barcode: '<string>',
size: '<string>',
size_value: 123,
size_uom: '<string>',
wholesale_price: 1,
temperature_zone: 'ambient',
image_url: '<string>',
image_urls: ['<string>'],
category_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
subcategory_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
is_for_human_consumption: true,
nutrition_info: {
servings_per_container: 123,
serving_size_quantity: 123,
serving_size_unit: '<string>',
serving_size_weight: 123,
serving_size_weight_unit: '<string>',
calories: 123,
total_fat: 123,
saturated_fat: 123,
trans_fat: 123,
polyunsaturated_fat: 123,
monounsaturated_fat: 123,
cholesterol: 123,
sodium: 123,
total_carbohydrates: 123,
dietary_fiber: 123,
total_sugars: 123,
added_sugars: 123,
sugar_alcohol: 123,
protein: 123,
vitamins: [{name: '<string>', value: 123, unit: '<string>'}]
},
weight_pounds: 1,
height_inches: 1,
length_inches: 1,
width_inches: 1,
is_vegan: true,
is_organic: true,
is_gluten_free: true
})
};
fetch('http://localhost:3000/v1/partner/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_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v1/partner/products",
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' => '<string>',
'retail_price' => 1,
'brand' => '<string>',
'description' => '<string>',
'barcode' => '<string>',
'size' => '<string>',
'size_value' => 123,
'size_uom' => '<string>',
'wholesale_price' => 1,
'temperature_zone' => 'ambient',
'image_url' => '<string>',
'image_urls' => [
'<string>'
],
'category_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'subcategory_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'is_for_human_consumption' => true,
'nutrition_info' => [
'servings_per_container' => 123,
'serving_size_quantity' => 123,
'serving_size_unit' => '<string>',
'serving_size_weight' => 123,
'serving_size_weight_unit' => '<string>',
'calories' => 123,
'total_fat' => 123,
'saturated_fat' => 123,
'trans_fat' => 123,
'polyunsaturated_fat' => 123,
'monounsaturated_fat' => 123,
'cholesterol' => 123,
'sodium' => 123,
'total_carbohydrates' => 123,
'dietary_fiber' => 123,
'total_sugars' => 123,
'added_sugars' => 123,
'sugar_alcohol' => 123,
'protein' => 123,
'vitamins' => [
[
'name' => '<string>',
'value' => 123,
'unit' => '<string>'
]
]
],
'weight_pounds' => 1,
'height_inches' => 1,
'length_inches' => 1,
'width_inches' => 1,
'is_vegan' => true,
'is_organic' => true,
'is_gluten_free' => true
]),
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:3000/v1/partner/products"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"retail_price\": 1,\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"barcode\": \"<string>\",\n \"size\": \"<string>\",\n \"size_value\": 123,\n \"size_uom\": \"<string>\",\n \"wholesale_price\": 1,\n \"temperature_zone\": \"ambient\",\n \"image_url\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subcategory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_for_human_consumption\": true,\n \"nutrition_info\": {\n \"servings_per_container\": 123,\n \"serving_size_quantity\": 123,\n \"serving_size_unit\": \"<string>\",\n \"serving_size_weight\": 123,\n \"serving_size_weight_unit\": \"<string>\",\n \"calories\": 123,\n \"total_fat\": 123,\n \"saturated_fat\": 123,\n \"trans_fat\": 123,\n \"polyunsaturated_fat\": 123,\n \"monounsaturated_fat\": 123,\n \"cholesterol\": 123,\n \"sodium\": 123,\n \"total_carbohydrates\": 123,\n \"dietary_fiber\": 123,\n \"total_sugars\": 123,\n \"added_sugars\": 123,\n \"sugar_alcohol\": 123,\n \"protein\": 123,\n \"vitamins\": [\n {\n \"name\": \"<string>\",\n \"value\": 123,\n \"unit\": \"<string>\"\n }\n ]\n },\n \"weight_pounds\": 1,\n \"height_inches\": 1,\n \"length_inches\": 1,\n \"width_inches\": 1,\n \"is_vegan\": true,\n \"is_organic\": true,\n \"is_gluten_free\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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("http://localhost:3000/v1/partner/products")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"retail_price\": 1,\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"barcode\": \"<string>\",\n \"size\": \"<string>\",\n \"size_value\": 123,\n \"size_uom\": \"<string>\",\n \"wholesale_price\": 1,\n \"temperature_zone\": \"ambient\",\n \"image_url\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subcategory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_for_human_consumption\": true,\n \"nutrition_info\": {\n \"servings_per_container\": 123,\n \"serving_size_quantity\": 123,\n \"serving_size_unit\": \"<string>\",\n \"serving_size_weight\": 123,\n \"serving_size_weight_unit\": \"<string>\",\n \"calories\": 123,\n \"total_fat\": 123,\n \"saturated_fat\": 123,\n \"trans_fat\": 123,\n \"polyunsaturated_fat\": 123,\n \"monounsaturated_fat\": 123,\n \"cholesterol\": 123,\n \"sodium\": 123,\n \"total_carbohydrates\": 123,\n \"dietary_fiber\": 123,\n \"total_sugars\": 123,\n \"added_sugars\": 123,\n \"sugar_alcohol\": 123,\n \"protein\": 123,\n \"vitamins\": [\n {\n \"name\": \"<string>\",\n \"value\": 123,\n \"unit\": \"<string>\"\n }\n ]\n },\n \"weight_pounds\": 1,\n \"height_inches\": 1,\n \"length_inches\": 1,\n \"width_inches\": 1,\n \"is_vegan\": true,\n \"is_organic\": true,\n \"is_gluten_free\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v1/partner/products")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"retail_price\": 1,\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"barcode\": \"<string>\",\n \"size\": \"<string>\",\n \"size_value\": 123,\n \"size_uom\": \"<string>\",\n \"wholesale_price\": 1,\n \"temperature_zone\": \"ambient\",\n \"image_url\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subcategory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_for_human_consumption\": true,\n \"nutrition_info\": {\n \"servings_per_container\": 123,\n \"serving_size_quantity\": 123,\n \"serving_size_unit\": \"<string>\",\n \"serving_size_weight\": 123,\n \"serving_size_weight_unit\": \"<string>\",\n \"calories\": 123,\n \"total_fat\": 123,\n \"saturated_fat\": 123,\n \"trans_fat\": 123,\n \"polyunsaturated_fat\": 123,\n \"monounsaturated_fat\": 123,\n \"cholesterol\": 123,\n \"sodium\": 123,\n \"total_carbohydrates\": 123,\n \"dietary_fiber\": 123,\n \"total_sugars\": 123,\n \"added_sugars\": 123,\n \"sugar_alcohol\": 123,\n \"protein\": 123,\n \"vitamins\": [\n {\n \"name\": \"<string>\",\n \"value\": 123,\n \"unit\": \"<string>\"\n }\n ]\n },\n \"weight_pounds\": 1,\n \"height_inches\": 1,\n \"length_inches\": 1,\n \"width_inches\": 1,\n \"is_vegan\": true,\n \"is_organic\": true,\n \"is_gluten_free\": true\n}"
response = http.request(request)
puts response.read_body{
"scraped_product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"brand": "<string>",
"barcode": "<string>"
},
"sellable_product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxonomy_id": "<string>",
"selling_price": 123,
"is_active": true
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Partner Products
Submit a new product
Submits a new product for approval. Creates a scraped_product and a disabled sellable_product.
POST
/
v1
/
partner
/
products
Submit a new product
curl --request POST \
--url http://localhost:3000/v1/partner/products \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"retail_price": 1,
"brand": "<string>",
"description": "<string>",
"barcode": "<string>",
"size": "<string>",
"size_value": 123,
"size_uom": "<string>",
"wholesale_price": 1,
"temperature_zone": "ambient",
"image_url": "<string>",
"image_urls": [
"<string>"
],
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subcategory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_for_human_consumption": true,
"nutrition_info": {
"servings_per_container": 123,
"serving_size_quantity": 123,
"serving_size_unit": "<string>",
"serving_size_weight": 123,
"serving_size_weight_unit": "<string>",
"calories": 123,
"total_fat": 123,
"saturated_fat": 123,
"trans_fat": 123,
"polyunsaturated_fat": 123,
"monounsaturated_fat": 123,
"cholesterol": 123,
"sodium": 123,
"total_carbohydrates": 123,
"dietary_fiber": 123,
"total_sugars": 123,
"added_sugars": 123,
"sugar_alcohol": 123,
"protein": 123,
"vitamins": [
{
"name": "<string>",
"value": 123,
"unit": "<string>"
}
]
},
"weight_pounds": 1,
"height_inches": 1,
"length_inches": 1,
"width_inches": 1,
"is_vegan": true,
"is_organic": true,
"is_gluten_free": true
}
'import requests
url = "http://localhost:3000/v1/partner/products"
payload = {
"name": "<string>",
"retail_price": 1,
"brand": "<string>",
"description": "<string>",
"barcode": "<string>",
"size": "<string>",
"size_value": 123,
"size_uom": "<string>",
"wholesale_price": 1,
"temperature_zone": "ambient",
"image_url": "<string>",
"image_urls": ["<string>"],
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subcategory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_for_human_consumption": True,
"nutrition_info": {
"servings_per_container": 123,
"serving_size_quantity": 123,
"serving_size_unit": "<string>",
"serving_size_weight": 123,
"serving_size_weight_unit": "<string>",
"calories": 123,
"total_fat": 123,
"saturated_fat": 123,
"trans_fat": 123,
"polyunsaturated_fat": 123,
"monounsaturated_fat": 123,
"cholesterol": 123,
"sodium": 123,
"total_carbohydrates": 123,
"dietary_fiber": 123,
"total_sugars": 123,
"added_sugars": 123,
"sugar_alcohol": 123,
"protein": 123,
"vitamins": [
{
"name": "<string>",
"value": 123,
"unit": "<string>"
}
]
},
"weight_pounds": 1,
"height_inches": 1,
"length_inches": 1,
"width_inches": 1,
"is_vegan": True,
"is_organic": True,
"is_gluten_free": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
retail_price: 1,
brand: '<string>',
description: '<string>',
barcode: '<string>',
size: '<string>',
size_value: 123,
size_uom: '<string>',
wholesale_price: 1,
temperature_zone: 'ambient',
image_url: '<string>',
image_urls: ['<string>'],
category_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
subcategory_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
is_for_human_consumption: true,
nutrition_info: {
servings_per_container: 123,
serving_size_quantity: 123,
serving_size_unit: '<string>',
serving_size_weight: 123,
serving_size_weight_unit: '<string>',
calories: 123,
total_fat: 123,
saturated_fat: 123,
trans_fat: 123,
polyunsaturated_fat: 123,
monounsaturated_fat: 123,
cholesterol: 123,
sodium: 123,
total_carbohydrates: 123,
dietary_fiber: 123,
total_sugars: 123,
added_sugars: 123,
sugar_alcohol: 123,
protein: 123,
vitamins: [{name: '<string>', value: 123, unit: '<string>'}]
},
weight_pounds: 1,
height_inches: 1,
length_inches: 1,
width_inches: 1,
is_vegan: true,
is_organic: true,
is_gluten_free: true
})
};
fetch('http://localhost:3000/v1/partner/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_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v1/partner/products",
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' => '<string>',
'retail_price' => 1,
'brand' => '<string>',
'description' => '<string>',
'barcode' => '<string>',
'size' => '<string>',
'size_value' => 123,
'size_uom' => '<string>',
'wholesale_price' => 1,
'temperature_zone' => 'ambient',
'image_url' => '<string>',
'image_urls' => [
'<string>'
],
'category_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'subcategory_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'is_for_human_consumption' => true,
'nutrition_info' => [
'servings_per_container' => 123,
'serving_size_quantity' => 123,
'serving_size_unit' => '<string>',
'serving_size_weight' => 123,
'serving_size_weight_unit' => '<string>',
'calories' => 123,
'total_fat' => 123,
'saturated_fat' => 123,
'trans_fat' => 123,
'polyunsaturated_fat' => 123,
'monounsaturated_fat' => 123,
'cholesterol' => 123,
'sodium' => 123,
'total_carbohydrates' => 123,
'dietary_fiber' => 123,
'total_sugars' => 123,
'added_sugars' => 123,
'sugar_alcohol' => 123,
'protein' => 123,
'vitamins' => [
[
'name' => '<string>',
'value' => 123,
'unit' => '<string>'
]
]
],
'weight_pounds' => 1,
'height_inches' => 1,
'length_inches' => 1,
'width_inches' => 1,
'is_vegan' => true,
'is_organic' => true,
'is_gluten_free' => true
]),
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:3000/v1/partner/products"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"retail_price\": 1,\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"barcode\": \"<string>\",\n \"size\": \"<string>\",\n \"size_value\": 123,\n \"size_uom\": \"<string>\",\n \"wholesale_price\": 1,\n \"temperature_zone\": \"ambient\",\n \"image_url\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subcategory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_for_human_consumption\": true,\n \"nutrition_info\": {\n \"servings_per_container\": 123,\n \"serving_size_quantity\": 123,\n \"serving_size_unit\": \"<string>\",\n \"serving_size_weight\": 123,\n \"serving_size_weight_unit\": \"<string>\",\n \"calories\": 123,\n \"total_fat\": 123,\n \"saturated_fat\": 123,\n \"trans_fat\": 123,\n \"polyunsaturated_fat\": 123,\n \"monounsaturated_fat\": 123,\n \"cholesterol\": 123,\n \"sodium\": 123,\n \"total_carbohydrates\": 123,\n \"dietary_fiber\": 123,\n \"total_sugars\": 123,\n \"added_sugars\": 123,\n \"sugar_alcohol\": 123,\n \"protein\": 123,\n \"vitamins\": [\n {\n \"name\": \"<string>\",\n \"value\": 123,\n \"unit\": \"<string>\"\n }\n ]\n },\n \"weight_pounds\": 1,\n \"height_inches\": 1,\n \"length_inches\": 1,\n \"width_inches\": 1,\n \"is_vegan\": true,\n \"is_organic\": true,\n \"is_gluten_free\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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("http://localhost:3000/v1/partner/products")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"retail_price\": 1,\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"barcode\": \"<string>\",\n \"size\": \"<string>\",\n \"size_value\": 123,\n \"size_uom\": \"<string>\",\n \"wholesale_price\": 1,\n \"temperature_zone\": \"ambient\",\n \"image_url\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subcategory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_for_human_consumption\": true,\n \"nutrition_info\": {\n \"servings_per_container\": 123,\n \"serving_size_quantity\": 123,\n \"serving_size_unit\": \"<string>\",\n \"serving_size_weight\": 123,\n \"serving_size_weight_unit\": \"<string>\",\n \"calories\": 123,\n \"total_fat\": 123,\n \"saturated_fat\": 123,\n \"trans_fat\": 123,\n \"polyunsaturated_fat\": 123,\n \"monounsaturated_fat\": 123,\n \"cholesterol\": 123,\n \"sodium\": 123,\n \"total_carbohydrates\": 123,\n \"dietary_fiber\": 123,\n \"total_sugars\": 123,\n \"added_sugars\": 123,\n \"sugar_alcohol\": 123,\n \"protein\": 123,\n \"vitamins\": [\n {\n \"name\": \"<string>\",\n \"value\": 123,\n \"unit\": \"<string>\"\n }\n ]\n },\n \"weight_pounds\": 1,\n \"height_inches\": 1,\n \"length_inches\": 1,\n \"width_inches\": 1,\n \"is_vegan\": true,\n \"is_organic\": true,\n \"is_gluten_free\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v1/partner/products")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"retail_price\": 1,\n \"brand\": \"<string>\",\n \"description\": \"<string>\",\n \"barcode\": \"<string>\",\n \"size\": \"<string>\",\n \"size_value\": 123,\n \"size_uom\": \"<string>\",\n \"wholesale_price\": 1,\n \"temperature_zone\": \"ambient\",\n \"image_url\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subcategory_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"is_for_human_consumption\": true,\n \"nutrition_info\": {\n \"servings_per_container\": 123,\n \"serving_size_quantity\": 123,\n \"serving_size_unit\": \"<string>\",\n \"serving_size_weight\": 123,\n \"serving_size_weight_unit\": \"<string>\",\n \"calories\": 123,\n \"total_fat\": 123,\n \"saturated_fat\": 123,\n \"trans_fat\": 123,\n \"polyunsaturated_fat\": 123,\n \"monounsaturated_fat\": 123,\n \"cholesterol\": 123,\n \"sodium\": 123,\n \"total_carbohydrates\": 123,\n \"dietary_fiber\": 123,\n \"total_sugars\": 123,\n \"added_sugars\": 123,\n \"sugar_alcohol\": 123,\n \"protein\": 123,\n \"vitamins\": [\n {\n \"name\": \"<string>\",\n \"value\": 123,\n \"unit\": \"<string>\"\n }\n ]\n },\n \"weight_pounds\": 1,\n \"height_inches\": 1,\n \"length_inches\": 1,\n \"width_inches\": 1,\n \"is_vegan\": true,\n \"is_organic\": true,\n \"is_gluten_free\": true\n}"
response = http.request(request)
puts response.read_body{
"scraped_product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"brand": "<string>",
"barcode": "<string>"
},
"sellable_product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxonomy_id": "<string>",
"selling_price": 123,
"is_active": true
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Body
application/json
Minimum string length:
1Required range:
x > 0Required range:
x > 0Available options:
ambient, refrigerated, frozen Maximum array length:
7Show child attributes
Show child attributes
Required range:
x > 0Required range:
x > 0Required range:
x > 0Required range:
x > 0⌘I