Update an existing catalogue item
curl --request PUT \
--url http://localhost/api/catalogue-items \
--header 'Content-Type: application/json' \
--data '
{
"identification": {
"seller": {
"pink_id": "<string>",
"gln": "<string>"
},
"pink_id": "<string>",
"seller_catalogue_item_id": "<string>",
"gtin": 123
},
"product_name": "<string>",
"available": true,
"units": [
{
"factor": 1,
"factor_is_estimated": false,
"prices": [
{
"price": {
"amount": 123
},
"discounted": false
}
]
}
],
"food_information": {
"product_name": "<string>",
"ingredients": [
"<string>"
],
"allergens": [
"<string>"
],
"nutrition_values": {},
"net_quantity": "<string>",
"durability_date": "<string>",
"storage_conditions": "<string>",
"origin": "<string>",
"usage_instructions": "<string>",
"alcohol_content": 123
}
}
'import requests
url = "http://localhost/api/catalogue-items"
payload = {
"identification": {
"seller": {
"pink_id": "<string>",
"gln": "<string>"
},
"pink_id": "<string>",
"seller_catalogue_item_id": "<string>",
"gtin": 123
},
"product_name": "<string>",
"available": True,
"units": [
{
"factor": 1,
"factor_is_estimated": False,
"prices": [
{
"price": { "amount": 123 },
"discounted": False
}
]
}
],
"food_information": {
"product_name": "<string>",
"ingredients": ["<string>"],
"allergens": ["<string>"],
"nutrition_values": {},
"net_quantity": "<string>",
"durability_date": "<string>",
"storage_conditions": "<string>",
"origin": "<string>",
"usage_instructions": "<string>",
"alcohol_content": 123
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
identification: {
seller: {pink_id: '<string>', gln: '<string>'},
pink_id: '<string>',
seller_catalogue_item_id: '<string>',
gtin: 123
},
product_name: '<string>',
available: true,
units: [
{
factor: 1,
factor_is_estimated: false,
prices: [{price: {amount: 123}, discounted: false}]
}
],
food_information: {
product_name: '<string>',
ingredients: ['<string>'],
allergens: ['<string>'],
nutrition_values: {},
net_quantity: '<string>',
durability_date: '<string>',
storage_conditions: '<string>',
origin: '<string>',
usage_instructions: '<string>',
alcohol_content: 123
}
})
};
fetch('http://localhost/api/catalogue-items', 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 => "http://localhost/api/catalogue-items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'identification' => [
'seller' => [
'pink_id' => '<string>',
'gln' => '<string>'
],
'pink_id' => '<string>',
'seller_catalogue_item_id' => '<string>',
'gtin' => 123
],
'product_name' => '<string>',
'available' => true,
'units' => [
[
'factor' => 1,
'factor_is_estimated' => false,
'prices' => [
[
'price' => [
'amount' => 123
],
'discounted' => false
]
]
]
],
'food_information' => [
'product_name' => '<string>',
'ingredients' => [
'<string>'
],
'allergens' => [
'<string>'
],
'nutrition_values' => [
],
'net_quantity' => '<string>',
'durability_date' => '<string>',
'storage_conditions' => '<string>',
'origin' => '<string>',
'usage_instructions' => '<string>',
'alcohol_content' => 123
]
]),
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/api/catalogue-items"
payload := strings.NewReader("{\n \"identification\": {\n \"seller\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"pink_id\": \"<string>\",\n \"seller_catalogue_item_id\": \"<string>\",\n \"gtin\": 123\n },\n \"product_name\": \"<string>\",\n \"available\": true,\n \"units\": [\n {\n \"factor\": 1,\n \"factor_is_estimated\": false,\n \"prices\": [\n {\n \"price\": {\n \"amount\": 123\n },\n \"discounted\": false\n }\n ]\n }\n ],\n \"food_information\": {\n \"product_name\": \"<string>\",\n \"ingredients\": [\n \"<string>\"\n ],\n \"allergens\": [\n \"<string>\"\n ],\n \"nutrition_values\": {},\n \"net_quantity\": \"<string>\",\n \"durability_date\": \"<string>\",\n \"storage_conditions\": \"<string>\",\n \"origin\": \"<string>\",\n \"usage_instructions\": \"<string>\",\n \"alcohol_content\": 123\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("http://localhost/api/catalogue-items")
.header("Content-Type", "application/json")
.body("{\n \"identification\": {\n \"seller\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"pink_id\": \"<string>\",\n \"seller_catalogue_item_id\": \"<string>\",\n \"gtin\": 123\n },\n \"product_name\": \"<string>\",\n \"available\": true,\n \"units\": [\n {\n \"factor\": 1,\n \"factor_is_estimated\": false,\n \"prices\": [\n {\n \"price\": {\n \"amount\": 123\n },\n \"discounted\": false\n }\n ]\n }\n ],\n \"food_information\": {\n \"product_name\": \"<string>\",\n \"ingredients\": [\n \"<string>\"\n ],\n \"allergens\": [\n \"<string>\"\n ],\n \"nutrition_values\": {},\n \"net_quantity\": \"<string>\",\n \"durability_date\": \"<string>\",\n \"storage_conditions\": \"<string>\",\n \"origin\": \"<string>\",\n \"usage_instructions\": \"<string>\",\n \"alcohol_content\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/api/catalogue-items")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"identification\": {\n \"seller\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"pink_id\": \"<string>\",\n \"seller_catalogue_item_id\": \"<string>\",\n \"gtin\": 123\n },\n \"product_name\": \"<string>\",\n \"available\": true,\n \"units\": [\n {\n \"factor\": 1,\n \"factor_is_estimated\": false,\n \"prices\": [\n {\n \"price\": {\n \"amount\": 123\n },\n \"discounted\": false\n }\n ]\n }\n ],\n \"food_information\": {\n \"product_name\": \"<string>\",\n \"ingredients\": [\n \"<string>\"\n ],\n \"allergens\": [\n \"<string>\"\n ],\n \"nutrition_values\": {},\n \"net_quantity\": \"<string>\",\n \"durability_date\": \"<string>\",\n \"storage_conditions\": \"<string>\",\n \"origin\": \"<string>\",\n \"usage_instructions\": \"<string>\",\n \"alcohol_content\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Catalogue item updated successfully",
"transmission_id": "<string>",
"": "<string>"
}{
"message": "<string>"
}{
"error": "Invalid request data",
"errors": "<string>"
}CatalogueItem
Update an existing catalogue item
PUT
/
catalogue-items
Update an existing catalogue item
curl --request PUT \
--url http://localhost/api/catalogue-items \
--header 'Content-Type: application/json' \
--data '
{
"identification": {
"seller": {
"pink_id": "<string>",
"gln": "<string>"
},
"pink_id": "<string>",
"seller_catalogue_item_id": "<string>",
"gtin": 123
},
"product_name": "<string>",
"available": true,
"units": [
{
"factor": 1,
"factor_is_estimated": false,
"prices": [
{
"price": {
"amount": 123
},
"discounted": false
}
]
}
],
"food_information": {
"product_name": "<string>",
"ingredients": [
"<string>"
],
"allergens": [
"<string>"
],
"nutrition_values": {},
"net_quantity": "<string>",
"durability_date": "<string>",
"storage_conditions": "<string>",
"origin": "<string>",
"usage_instructions": "<string>",
"alcohol_content": 123
}
}
'import requests
url = "http://localhost/api/catalogue-items"
payload = {
"identification": {
"seller": {
"pink_id": "<string>",
"gln": "<string>"
},
"pink_id": "<string>",
"seller_catalogue_item_id": "<string>",
"gtin": 123
},
"product_name": "<string>",
"available": True,
"units": [
{
"factor": 1,
"factor_is_estimated": False,
"prices": [
{
"price": { "amount": 123 },
"discounted": False
}
]
}
],
"food_information": {
"product_name": "<string>",
"ingredients": ["<string>"],
"allergens": ["<string>"],
"nutrition_values": {},
"net_quantity": "<string>",
"durability_date": "<string>",
"storage_conditions": "<string>",
"origin": "<string>",
"usage_instructions": "<string>",
"alcohol_content": 123
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
identification: {
seller: {pink_id: '<string>', gln: '<string>'},
pink_id: '<string>',
seller_catalogue_item_id: '<string>',
gtin: 123
},
product_name: '<string>',
available: true,
units: [
{
factor: 1,
factor_is_estimated: false,
prices: [{price: {amount: 123}, discounted: false}]
}
],
food_information: {
product_name: '<string>',
ingredients: ['<string>'],
allergens: ['<string>'],
nutrition_values: {},
net_quantity: '<string>',
durability_date: '<string>',
storage_conditions: '<string>',
origin: '<string>',
usage_instructions: '<string>',
alcohol_content: 123
}
})
};
fetch('http://localhost/api/catalogue-items', 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 => "http://localhost/api/catalogue-items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'identification' => [
'seller' => [
'pink_id' => '<string>',
'gln' => '<string>'
],
'pink_id' => '<string>',
'seller_catalogue_item_id' => '<string>',
'gtin' => 123
],
'product_name' => '<string>',
'available' => true,
'units' => [
[
'factor' => 1,
'factor_is_estimated' => false,
'prices' => [
[
'price' => [
'amount' => 123
],
'discounted' => false
]
]
]
],
'food_information' => [
'product_name' => '<string>',
'ingredients' => [
'<string>'
],
'allergens' => [
'<string>'
],
'nutrition_values' => [
],
'net_quantity' => '<string>',
'durability_date' => '<string>',
'storage_conditions' => '<string>',
'origin' => '<string>',
'usage_instructions' => '<string>',
'alcohol_content' => 123
]
]),
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/api/catalogue-items"
payload := strings.NewReader("{\n \"identification\": {\n \"seller\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"pink_id\": \"<string>\",\n \"seller_catalogue_item_id\": \"<string>\",\n \"gtin\": 123\n },\n \"product_name\": \"<string>\",\n \"available\": true,\n \"units\": [\n {\n \"factor\": 1,\n \"factor_is_estimated\": false,\n \"prices\": [\n {\n \"price\": {\n \"amount\": 123\n },\n \"discounted\": false\n }\n ]\n }\n ],\n \"food_information\": {\n \"product_name\": \"<string>\",\n \"ingredients\": [\n \"<string>\"\n ],\n \"allergens\": [\n \"<string>\"\n ],\n \"nutrition_values\": {},\n \"net_quantity\": \"<string>\",\n \"durability_date\": \"<string>\",\n \"storage_conditions\": \"<string>\",\n \"origin\": \"<string>\",\n \"usage_instructions\": \"<string>\",\n \"alcohol_content\": 123\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("http://localhost/api/catalogue-items")
.header("Content-Type", "application/json")
.body("{\n \"identification\": {\n \"seller\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"pink_id\": \"<string>\",\n \"seller_catalogue_item_id\": \"<string>\",\n \"gtin\": 123\n },\n \"product_name\": \"<string>\",\n \"available\": true,\n \"units\": [\n {\n \"factor\": 1,\n \"factor_is_estimated\": false,\n \"prices\": [\n {\n \"price\": {\n \"amount\": 123\n },\n \"discounted\": false\n }\n ]\n }\n ],\n \"food_information\": {\n \"product_name\": \"<string>\",\n \"ingredients\": [\n \"<string>\"\n ],\n \"allergens\": [\n \"<string>\"\n ],\n \"nutrition_values\": {},\n \"net_quantity\": \"<string>\",\n \"durability_date\": \"<string>\",\n \"storage_conditions\": \"<string>\",\n \"origin\": \"<string>\",\n \"usage_instructions\": \"<string>\",\n \"alcohol_content\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/api/catalogue-items")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"identification\": {\n \"seller\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"pink_id\": \"<string>\",\n \"seller_catalogue_item_id\": \"<string>\",\n \"gtin\": 123\n },\n \"product_name\": \"<string>\",\n \"available\": true,\n \"units\": [\n {\n \"factor\": 1,\n \"factor_is_estimated\": false,\n \"prices\": [\n {\n \"price\": {\n \"amount\": 123\n },\n \"discounted\": false\n }\n ]\n }\n ],\n \"food_information\": {\n \"product_name\": \"<string>\",\n \"ingredients\": [\n \"<string>\"\n ],\n \"allergens\": [\n \"<string>\"\n ],\n \"nutrition_values\": {},\n \"net_quantity\": \"<string>\",\n \"durability_date\": \"<string>\",\n \"storage_conditions\": \"<string>\",\n \"origin\": \"<string>\",\n \"usage_instructions\": \"<string>\",\n \"alcohol_content\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Catalogue item updated successfully",
"transmission_id": "<string>",
"": "<string>"
}{
"message": "<string>"
}{
"error": "Invalid request data",
"errors": "<string>"
}Body
application/json
CatalogueItemChangeset
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Food information data according to EU regulation 1169/2011
Show child attributes
Show child attributes
⌘I