Update product
curl --request POST \
--url https://dashboard.scango.ch/api/v1/products/{productId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"price": 123,
"supplier": "<string>",
"category": "<string>",
"declarations": "<string>",
"barcode": "<string>",
"depositProduct": 123,
"description": "<string>",
"salePrice": 123,
"salePercentage": 123,
"salePriceDateFrom": "2023-12-25",
"salePriceDateTo": "2023-12-25",
"costPrice": 123,
"margin": 123,
"showOnHomescreen": true,
"showOnScreen": true,
"ageRestriction": true,
"showOnScale": true,
"saleStop": true,
"index": 123
}
'import requests
url = "https://dashboard.scango.ch/api/v1/products/{productId}"
payload = {
"id": "<string>",
"name": "<string>",
"price": 123,
"supplier": "<string>",
"category": "<string>",
"declarations": "<string>",
"barcode": "<string>",
"depositProduct": 123,
"description": "<string>",
"salePrice": 123,
"salePercentage": 123,
"salePriceDateFrom": "2023-12-25",
"salePriceDateTo": "2023-12-25",
"costPrice": 123,
"margin": 123,
"showOnHomescreen": True,
"showOnScreen": True,
"ageRestriction": True,
"showOnScale": True,
"saleStop": True,
"index": 123
}
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({
id: '<string>',
name: '<string>',
price: 123,
supplier: '<string>',
category: '<string>',
declarations: '<string>',
barcode: '<string>',
depositProduct: 123,
description: '<string>',
salePrice: 123,
salePercentage: 123,
salePriceDateFrom: '2023-12-25',
salePriceDateTo: '2023-12-25',
costPrice: 123,
margin: 123,
showOnHomescreen: true,
showOnScreen: true,
ageRestriction: true,
showOnScale: true,
saleStop: true,
index: 123
})
};
fetch('https://dashboard.scango.ch/api/v1/products/{productId}', 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://dashboard.scango.ch/api/v1/products/{productId}",
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([
'id' => '<string>',
'name' => '<string>',
'price' => 123,
'supplier' => '<string>',
'category' => '<string>',
'declarations' => '<string>',
'barcode' => '<string>',
'depositProduct' => 123,
'description' => '<string>',
'salePrice' => 123,
'salePercentage' => 123,
'salePriceDateFrom' => '2023-12-25',
'salePriceDateTo' => '2023-12-25',
'costPrice' => 123,
'margin' => 123,
'showOnHomescreen' => true,
'showOnScreen' => true,
'ageRestriction' => true,
'showOnScale' => true,
'saleStop' => true,
'index' => 123
]),
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://dashboard.scango.ch/api/v1/products/{productId}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"price\": 123,\n \"supplier\": \"<string>\",\n \"category\": \"<string>\",\n \"declarations\": \"<string>\",\n \"barcode\": \"<string>\",\n \"depositProduct\": 123,\n \"description\": \"<string>\",\n \"salePrice\": 123,\n \"salePercentage\": 123,\n \"salePriceDateFrom\": \"2023-12-25\",\n \"salePriceDateTo\": \"2023-12-25\",\n \"costPrice\": 123,\n \"margin\": 123,\n \"showOnHomescreen\": true,\n \"showOnScreen\": true,\n \"ageRestriction\": true,\n \"showOnScale\": true,\n \"saleStop\": true,\n \"index\": 123\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://dashboard.scango.ch/api/v1/products/{productId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"price\": 123,\n \"supplier\": \"<string>\",\n \"category\": \"<string>\",\n \"declarations\": \"<string>\",\n \"barcode\": \"<string>\",\n \"depositProduct\": 123,\n \"description\": \"<string>\",\n \"salePrice\": 123,\n \"salePercentage\": 123,\n \"salePriceDateFrom\": \"2023-12-25\",\n \"salePriceDateTo\": \"2023-12-25\",\n \"costPrice\": 123,\n \"margin\": 123,\n \"showOnHomescreen\": true,\n \"showOnScreen\": true,\n \"ageRestriction\": true,\n \"showOnScale\": true,\n \"saleStop\": true,\n \"index\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dashboard.scango.ch/api/v1/products/{productId}")
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 \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"price\": 123,\n \"supplier\": \"<string>\",\n \"category\": \"<string>\",\n \"declarations\": \"<string>\",\n \"barcode\": \"<string>\",\n \"depositProduct\": 123,\n \"description\": \"<string>\",\n \"salePrice\": 123,\n \"salePercentage\": 123,\n \"salePriceDateFrom\": \"2023-12-25\",\n \"salePriceDateTo\": \"2023-12-25\",\n \"costPrice\": 123,\n \"margin\": 123,\n \"showOnHomescreen\": true,\n \"showOnScreen\": true,\n \"ageRestriction\": true,\n \"showOnScale\": true,\n \"saleStop\": true,\n \"index\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true
}Products
Update Product
Update a specific product
POST
/
products
/
{productId}
Update product
curl --request POST \
--url https://dashboard.scango.ch/api/v1/products/{productId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"price": 123,
"supplier": "<string>",
"category": "<string>",
"declarations": "<string>",
"barcode": "<string>",
"depositProduct": 123,
"description": "<string>",
"salePrice": 123,
"salePercentage": 123,
"salePriceDateFrom": "2023-12-25",
"salePriceDateTo": "2023-12-25",
"costPrice": 123,
"margin": 123,
"showOnHomescreen": true,
"showOnScreen": true,
"ageRestriction": true,
"showOnScale": true,
"saleStop": true,
"index": 123
}
'import requests
url = "https://dashboard.scango.ch/api/v1/products/{productId}"
payload = {
"id": "<string>",
"name": "<string>",
"price": 123,
"supplier": "<string>",
"category": "<string>",
"declarations": "<string>",
"barcode": "<string>",
"depositProduct": 123,
"description": "<string>",
"salePrice": 123,
"salePercentage": 123,
"salePriceDateFrom": "2023-12-25",
"salePriceDateTo": "2023-12-25",
"costPrice": 123,
"margin": 123,
"showOnHomescreen": True,
"showOnScreen": True,
"ageRestriction": True,
"showOnScale": True,
"saleStop": True,
"index": 123
}
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({
id: '<string>',
name: '<string>',
price: 123,
supplier: '<string>',
category: '<string>',
declarations: '<string>',
barcode: '<string>',
depositProduct: 123,
description: '<string>',
salePrice: 123,
salePercentage: 123,
salePriceDateFrom: '2023-12-25',
salePriceDateTo: '2023-12-25',
costPrice: 123,
margin: 123,
showOnHomescreen: true,
showOnScreen: true,
ageRestriction: true,
showOnScale: true,
saleStop: true,
index: 123
})
};
fetch('https://dashboard.scango.ch/api/v1/products/{productId}', 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://dashboard.scango.ch/api/v1/products/{productId}",
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([
'id' => '<string>',
'name' => '<string>',
'price' => 123,
'supplier' => '<string>',
'category' => '<string>',
'declarations' => '<string>',
'barcode' => '<string>',
'depositProduct' => 123,
'description' => '<string>',
'salePrice' => 123,
'salePercentage' => 123,
'salePriceDateFrom' => '2023-12-25',
'salePriceDateTo' => '2023-12-25',
'costPrice' => 123,
'margin' => 123,
'showOnHomescreen' => true,
'showOnScreen' => true,
'ageRestriction' => true,
'showOnScale' => true,
'saleStop' => true,
'index' => 123
]),
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://dashboard.scango.ch/api/v1/products/{productId}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"price\": 123,\n \"supplier\": \"<string>\",\n \"category\": \"<string>\",\n \"declarations\": \"<string>\",\n \"barcode\": \"<string>\",\n \"depositProduct\": 123,\n \"description\": \"<string>\",\n \"salePrice\": 123,\n \"salePercentage\": 123,\n \"salePriceDateFrom\": \"2023-12-25\",\n \"salePriceDateTo\": \"2023-12-25\",\n \"costPrice\": 123,\n \"margin\": 123,\n \"showOnHomescreen\": true,\n \"showOnScreen\": true,\n \"ageRestriction\": true,\n \"showOnScale\": true,\n \"saleStop\": true,\n \"index\": 123\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://dashboard.scango.ch/api/v1/products/{productId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"price\": 123,\n \"supplier\": \"<string>\",\n \"category\": \"<string>\",\n \"declarations\": \"<string>\",\n \"barcode\": \"<string>\",\n \"depositProduct\": 123,\n \"description\": \"<string>\",\n \"salePrice\": 123,\n \"salePercentage\": 123,\n \"salePriceDateFrom\": \"2023-12-25\",\n \"salePriceDateTo\": \"2023-12-25\",\n \"costPrice\": 123,\n \"margin\": 123,\n \"showOnHomescreen\": true,\n \"showOnScreen\": true,\n \"ageRestriction\": true,\n \"showOnScale\": true,\n \"saleStop\": true,\n \"index\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dashboard.scango.ch/api/v1/products/{productId}")
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 \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"price\": 123,\n \"supplier\": \"<string>\",\n \"category\": \"<string>\",\n \"declarations\": \"<string>\",\n \"barcode\": \"<string>\",\n \"depositProduct\": 123,\n \"description\": \"<string>\",\n \"salePrice\": 123,\n \"salePercentage\": 123,\n \"salePriceDateFrom\": \"2023-12-25\",\n \"salePriceDateTo\": \"2023-12-25\",\n \"costPrice\": 123,\n \"margin\": 123,\n \"showOnHomescreen\": true,\n \"showOnScreen\": true,\n \"ageRestriction\": true,\n \"showOnScale\": true,\n \"saleStop\": true,\n \"index\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the product to update
Body
application/json
Updated product data
Firestore document id (present in list and get responses)
Name of the product
Price in cents
Supplier of the product
Tax category
Available options:
8.1, 2.6, 3.8, 0 Category ID of the product
Product declarations
Product barcode
Deposit amount in cents
Product description
Sale price in cents
Sale percentage
Sale start date
Sale end date
Cost price in cents
Product margin
Show on homescreen
Show on screen
Age restriction
Show on scale
Sale stop
Product index
Response
200 - application/json
Product updated successfully
Was this page helpful?
⌘I