Create a component within a product
POST
/v1/products/{productId}/components
curl --request POST \ --url https://api.quaze.io/v1/products/%7BproductId%7D/components \ --header 'Authorization: REPLACE_KEY_VALUE' \ --header 'content-type: application/json' \ --data '{"name":"string","description":"string"}'import requests
url = "https://api.quaze.io/v1/products/%7BproductId%7D/components"
payload = { "name": "string", "description": "string"}headers = { "Authorization": "REPLACE_KEY_VALUE", "content-type": "application/json"}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)package main
import ( "fmt" "strings" "net/http" "io/ioutil")
func main() {
url := "https://api.quaze.io/v1/products/%7BproductId%7D/components"
payload := strings.NewReader("{\"name\":\"string\",\"description\":\"string\"}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "REPLACE_KEY_VALUE") req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const fetch = require('node-fetch');
let url = 'https://api.quaze.io/v1/products/%7BproductId%7D/components';
let options = { method: 'POST', headers: {Authorization: 'REPLACE_KEY_VALUE', 'content-type': 'application/json'}, body: '{"name":"string","description":"string"}'};
fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error('error:' + err));Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” productId
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
name
required
string
description
string
Example generated
{ "name": "example", "description": "example"}Responses
Section titled “ Responses ”Component created
Invalid request
Media type application/json
object
error
required
string
Example generated
{ "error": "example"}Missing or invalid authentication
Media type application/json
object
error
required
string
Example generated
{ "error": "example"}Resource not found
Media type application/json
object
error
required
string
Example generated
{ "error": "example"}