Update product
curl --request PUT \
--url https://app.dilli.studio/api/v1/products/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"id": "<string>",
"name": "<string>",
"sku": "<string>",
"description": "<string>",
"price": 123,
"cost": 123,
"currency": "<string>",
"unit": "<string>",
"tax_rate": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://app.dilli.studio/api/v1/products/{id}"
payload = {
"id": "<string>",
"name": "<string>",
"sku": "<string>",
"description": "<string>",
"price": 123,
"cost": 123,
"currency": "<string>",
"unit": "<string>",
"tax_rate": 123,
"is_active": True,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
name: '<string>',
sku: '<string>',
description: '<string>',
price: 123,
cost: 123,
currency: '<string>',
unit: '<string>',
tax_rate: 123,
is_active: true,
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.dilli.studio/api/v1/products/{id}', 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.dilli.studio/api/v1/products/{id}",
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([
'id' => '<string>',
'name' => '<string>',
'sku' => '<string>',
'description' => '<string>',
'price' => 123,
'cost' => 123,
'currency' => '<string>',
'unit' => '<string>',
'tax_rate' => 123,
'is_active' => true,
'created_at' => '2023-11-07T05:31:56Z',
'updated_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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://app.dilli.studio/api/v1/products/{id}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"sku\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"cost\": 123,\n \"currency\": \"<string>\",\n \"unit\": \"<string>\",\n \"tax_rate\": 123,\n \"is_active\": true,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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("https://app.dilli.studio/api/v1/products/{id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"sku\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"cost\": 123,\n \"currency\": \"<string>\",\n \"unit\": \"<string>\",\n \"tax_rate\": 123,\n \"is_active\": true,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dilli.studio/api/v1/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"sku\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"cost\": 123,\n \"currency\": \"<string>\",\n \"unit\": \"<string>\",\n \"tax_rate\": 123,\n \"is_active\": true,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"sku": "<string>",
"type": "product",
"description": "<string>",
"price": 123,
"cost": 123,
"currency": "<string>",
"unit": "<string>",
"tax_rate": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Products
Update Product
PUT
/
products
/
{id}
Update product
curl --request PUT \
--url https://app.dilli.studio/api/v1/products/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"id": "<string>",
"name": "<string>",
"sku": "<string>",
"description": "<string>",
"price": 123,
"cost": 123,
"currency": "<string>",
"unit": "<string>",
"tax_rate": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://app.dilli.studio/api/v1/products/{id}"
payload = {
"id": "<string>",
"name": "<string>",
"sku": "<string>",
"description": "<string>",
"price": 123,
"cost": 123,
"currency": "<string>",
"unit": "<string>",
"tax_rate": 123,
"is_active": True,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
name: '<string>',
sku: '<string>',
description: '<string>',
price: 123,
cost: 123,
currency: '<string>',
unit: '<string>',
tax_rate: 123,
is_active: true,
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.dilli.studio/api/v1/products/{id}', 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.dilli.studio/api/v1/products/{id}",
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([
'id' => '<string>',
'name' => '<string>',
'sku' => '<string>',
'description' => '<string>',
'price' => 123,
'cost' => 123,
'currency' => '<string>',
'unit' => '<string>',
'tax_rate' => 123,
'is_active' => true,
'created_at' => '2023-11-07T05:31:56Z',
'updated_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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://app.dilli.studio/api/v1/products/{id}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"sku\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"cost\": 123,\n \"currency\": \"<string>\",\n \"unit\": \"<string>\",\n \"tax_rate\": 123,\n \"is_active\": true,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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("https://app.dilli.studio/api/v1/products/{id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"sku\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"cost\": 123,\n \"currency\": \"<string>\",\n \"unit\": \"<string>\",\n \"tax_rate\": 123,\n \"is_active\": true,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dilli.studio/api/v1/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"sku\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"cost\": 123,\n \"currency\": \"<string>\",\n \"unit\": \"<string>\",\n \"tax_rate\": 123,\n \"is_active\": true,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"sku": "<string>",
"type": "product",
"description": "<string>",
"price": 123,
"cost": 123,
"currency": "<string>",
"unit": "<string>",
"tax_rate": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Use the API Playground below to send this request with your
X-Api-Key. The base URL and headers are prefilled; update any path, query, or body fields and click Send.Authorizations
Path Parameters
Body
application/json
Response
200 - application/json
OK

