Update a product
POST /products/{product_id}
curl -X POST "https://app.bualpro.com/api/products/3.14" \
-H "Content-Type: application/json" \
-H "X-ACCESS-TOKEN: YOUR_API_KEY" \
-d '{
"active": false,
"stock": 500,
"price": 40
}'
import requests
import json
url = "https://app.bualpro.com/api/products/3.14"
headers = {
"Content-Type": "application/json",
"X-ACCESS-TOKEN": "YOUR_API_KEY"
}
data = {
"active": false,
"stock": 500,
"price": 40
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app.bualpro.com/api/products/3.14", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-ACCESS-TOKEN": "YOUR_API_KEY"
},
body: JSON.stringify({
"active": false,
"stock": 500,
"price": 40
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"active": false,
"stock": 500,
"price": 40
}`)
req, err := http.NewRequest("POST", "https://app.bualpro.com/api/products/3.14", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-ACCESS-TOKEN", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app.bualpro.com/api/products/3.14')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-ACCESS-TOKEN'] = 'YOUR_API_KEY'
request.body = '{
"active": false,
"stock": 500,
"price": 40
}'
response = http.request(request)
puts response.body
{
"success": true,
"updated": true
}
POST
/products/{product_id}POST
Base URLstring
Target server for requests. Edit to use your own host.
API Key (header: X-ACCESS-TOKEN)
X-ACCESS-TOKENstring
RequiredAPI key (sent in header)
Content-Typestring
RequiredThe media type of the request body
Options: application/json
Request Preview
Response
Response will appear here after sending the request
Authentication
header
X-ACCESS-TOKENstring
RequiredAPI Key for authentication. Provide your API key in the header.
Path Parameters
Responses
successboolean
updatedboolean
Update product.
Was this page helpful?