Update metadata
curl --request PUT \
--url https://api.quickbutik.com/v1/metadata/{scope}/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "topeseller",
"value": "yes"
}
'import requests
url = "https://api.quickbutik.com/v1/metadata/{scope}/{id}"
payload = {
"key": "topeseller",
"value": "yes"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({key: 'topeseller', value: 'yes'})
};
fetch('https://api.quickbutik.com/v1/metadata/{scope}/{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://api.quickbutik.com/v1/metadata/{scope}/{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([
'key' => 'topeseller',
'value' => 'yes'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.quickbutik.com/v1/metadata/{scope}/{id}"
payload := strings.NewReader("{\n \"key\": \"topeseller\",\n \"value\": \"yes\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://api.quickbutik.com/v1/metadata/{scope}/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"topeseller\",\n \"value\": \"yes\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quickbutik.com/v1/metadata/{scope}/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"topeseller\",\n \"value\": \"yes\"\n}"
response = http.request(request)
puts response.read_body{
"code": 404,
"error": "Resource not found"
}{
"code": 404,
"error": "Resource not found"
}{
"code": 404,
"error": "Resource not found"
}Metadata
Update metadata
Update metadata to selected scope. Delete when empty value
PUT
/
v1
/
metadata
/
{scope}
/
{id}
Update metadata
curl --request PUT \
--url https://api.quickbutik.com/v1/metadata/{scope}/{id} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "topeseller",
"value": "yes"
}
'import requests
url = "https://api.quickbutik.com/v1/metadata/{scope}/{id}"
payload = {
"key": "topeseller",
"value": "yes"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({key: 'topeseller', value: 'yes'})
};
fetch('https://api.quickbutik.com/v1/metadata/{scope}/{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://api.quickbutik.com/v1/metadata/{scope}/{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([
'key' => 'topeseller',
'value' => 'yes'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.quickbutik.com/v1/metadata/{scope}/{id}"
payload := strings.NewReader("{\n \"key\": \"topeseller\",\n \"value\": \"yes\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://api.quickbutik.com/v1/metadata/{scope}/{id}")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"topeseller\",\n \"value\": \"yes\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.quickbutik.com/v1/metadata/{scope}/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"topeseller\",\n \"value\": \"yes\"\n}"
response = http.request(request)
puts response.read_body{
"code": 404,
"error": "Resource not found"
}{
"code": 404,
"error": "Resource not found"
}{
"code": 404,
"error": "Resource not found"
}Authorizations
Basic Authentication with API Keys
The Quickbutik API uses Basic Authentication where you use your API key as both the username and password.
How it works:
- Format your credentials as
api_key:api_key(using the SAME API key for both username and password) - Base64 encode the formatted string
- Include in the Authorization header as:
Authorization: Basic ENCODED_STRING
Example:
- API Key:
sk_live_abc123 - Formatted:
sk_live_abc123:sk_live_abc123 - Base64 Encoded:
c2tfbGl2ZV9hYmMxMjM6c2tfbGl2ZV9hYmMxMjM= - Header:
Authorization: Basic c2tfbGl2ZV9hYmMxMjM6c2tfbGl2ZV9hYmMxMjM=
cURL Example:
curl https://api.quickbutik.com/v1/orders -u your_api_key:your_api_key
All API requests must be made over HTTPS. Requests made over HTTP will be rejected.
API keys can be generated in the Quickbutik Control Panel under Settings → API.
Path Parameters
order|product|customer
Available options:
order, product, customer Id of the selected scope. E.g when scope is product and id is 1, metadata for product with id 1 will be returned
Response
Metadata updated successfully