Create Product
POST {{ BASE_URL }}/v1/corporate/productBody Parameters
Property
Data Type
Description
Example
Required
import Axios from 'axios';
// set the api url
const API_URL = `${BASE_URL}/v1/corporate/product`;
// define request body
const base64_image = "base64...";
const data = {
"name": "Plastic Modern Chair",
"avatar": `${base64_image}`,
"code": "MYPROPLASTXD",
"description": "This is the new plastic product",
"price": 3500.99,
"isLink": true
}
// make request using axios
Axios({
method: "GET",
url: `${API_URL}`,
headers: {
lg: 'en',
ch: 'web'
Authorization: `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
},
data: data
}).then((resp) => {
console.log(resp)
}).catch((err) => {
console.log(err)
})Last updated