Items
Create Item
Create a material or style item (unified). Writes item directly.
POST
/
items
Create Item
curl --request POST \
--url https://vinmake-erp.onrender.com/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"itemType": "<string>",
"refId": "<string>",
"name": "<string>",
"picture": "<string>",
"notes": "<string>",
"materialType": "<string>",
"supplierId": "<string>",
"unit": "<string>",
"costPerUnit": 123,
"currency": "<string>",
"verificationStatus": "<string>",
"weight": 123,
"weightUom": "<string>",
"color": "<string>",
"width": 123,
"widthUom": "<string>",
"composition": null,
"shrinkage": 123,
"keyword": "<string>",
"dependencyType": "<string>",
"description": "<string>",
"clientId": "<string>",
"merchandiser": "<string>",
"estQuantity": 123,
"estCost": 123,
"designType": "<string>",
"dealStatus": "<string>",
"country": "<string>",
"estCompletionTime": "<string>",
"priceCategory": "<string>"
}
'import requests
url = "https://vinmake-erp.onrender.com/items"
payload = {
"itemType": "<string>",
"refId": "<string>",
"name": "<string>",
"picture": "<string>",
"notes": "<string>",
"materialType": "<string>",
"supplierId": "<string>",
"unit": "<string>",
"costPerUnit": 123,
"currency": "<string>",
"verificationStatus": "<string>",
"weight": 123,
"weightUom": "<string>",
"color": "<string>",
"width": 123,
"widthUom": "<string>",
"composition": None,
"shrinkage": 123,
"keyword": "<string>",
"dependencyType": "<string>",
"description": "<string>",
"clientId": "<string>",
"merchandiser": "<string>",
"estQuantity": 123,
"estCost": 123,
"designType": "<string>",
"dealStatus": "<string>",
"country": "<string>",
"estCompletionTime": "<string>",
"priceCategory": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
itemType: '<string>',
refId: '<string>',
name: '<string>',
picture: '<string>',
notes: '<string>',
materialType: '<string>',
supplierId: '<string>',
unit: '<string>',
costPerUnit: 123,
currency: '<string>',
verificationStatus: '<string>',
weight: 123,
weightUom: '<string>',
color: '<string>',
width: 123,
widthUom: '<string>',
composition: null,
shrinkage: 123,
keyword: '<string>',
dependencyType: '<string>',
description: '<string>',
clientId: '<string>',
merchandiser: '<string>',
estQuantity: 123,
estCost: 123,
designType: '<string>',
dealStatus: '<string>',
country: '<string>',
estCompletionTime: '<string>',
priceCategory: '<string>'
})
};
fetch('https://vinmake-erp.onrender.com/items', 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://vinmake-erp.onrender.com/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'itemType' => '<string>',
'refId' => '<string>',
'name' => '<string>',
'picture' => '<string>',
'notes' => '<string>',
'materialType' => '<string>',
'supplierId' => '<string>',
'unit' => '<string>',
'costPerUnit' => 123,
'currency' => '<string>',
'verificationStatus' => '<string>',
'weight' => 123,
'weightUom' => '<string>',
'color' => '<string>',
'width' => 123,
'widthUom' => '<string>',
'composition' => null,
'shrinkage' => 123,
'keyword' => '<string>',
'dependencyType' => '<string>',
'description' => '<string>',
'clientId' => '<string>',
'merchandiser' => '<string>',
'estQuantity' => 123,
'estCost' => 123,
'designType' => '<string>',
'dealStatus' => '<string>',
'country' => '<string>',
'estCompletionTime' => '<string>',
'priceCategory' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://vinmake-erp.onrender.com/items"
payload := strings.NewReader("{\n \"itemType\": \"<string>\",\n \"refId\": \"<string>\",\n \"name\": \"<string>\",\n \"picture\": \"<string>\",\n \"notes\": \"<string>\",\n \"materialType\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"unit\": \"<string>\",\n \"costPerUnit\": 123,\n \"currency\": \"<string>\",\n \"verificationStatus\": \"<string>\",\n \"weight\": 123,\n \"weightUom\": \"<string>\",\n \"color\": \"<string>\",\n \"width\": 123,\n \"widthUom\": \"<string>\",\n \"composition\": null,\n \"shrinkage\": 123,\n \"keyword\": \"<string>\",\n \"dependencyType\": \"<string>\",\n \"description\": \"<string>\",\n \"clientId\": \"<string>\",\n \"merchandiser\": \"<string>\",\n \"estQuantity\": 123,\n \"estCost\": 123,\n \"designType\": \"<string>\",\n \"dealStatus\": \"<string>\",\n \"country\": \"<string>\",\n \"estCompletionTime\": \"<string>\",\n \"priceCategory\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://vinmake-erp.onrender.com/items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"itemType\": \"<string>\",\n \"refId\": \"<string>\",\n \"name\": \"<string>\",\n \"picture\": \"<string>\",\n \"notes\": \"<string>\",\n \"materialType\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"unit\": \"<string>\",\n \"costPerUnit\": 123,\n \"currency\": \"<string>\",\n \"verificationStatus\": \"<string>\",\n \"weight\": 123,\n \"weightUom\": \"<string>\",\n \"color\": \"<string>\",\n \"width\": 123,\n \"widthUom\": \"<string>\",\n \"composition\": null,\n \"shrinkage\": 123,\n \"keyword\": \"<string>\",\n \"dependencyType\": \"<string>\",\n \"description\": \"<string>\",\n \"clientId\": \"<string>\",\n \"merchandiser\": \"<string>\",\n \"estQuantity\": 123,\n \"estCost\": 123,\n \"designType\": \"<string>\",\n \"dealStatus\": \"<string>\",\n \"country\": \"<string>\",\n \"estCompletionTime\": \"<string>\",\n \"priceCategory\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vinmake-erp.onrender.com/items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"itemType\": \"<string>\",\n \"refId\": \"<string>\",\n \"name\": \"<string>\",\n \"picture\": \"<string>\",\n \"notes\": \"<string>\",\n \"materialType\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"unit\": \"<string>\",\n \"costPerUnit\": 123,\n \"currency\": \"<string>\",\n \"verificationStatus\": \"<string>\",\n \"weight\": 123,\n \"weightUom\": \"<string>\",\n \"color\": \"<string>\",\n \"width\": 123,\n \"widthUom\": \"<string>\",\n \"composition\": null,\n \"shrinkage\": 123,\n \"keyword\": \"<string>\",\n \"dependencyType\": \"<string>\",\n \"description\": \"<string>\",\n \"clientId\": \"<string>\",\n \"merchandiser\": \"<string>\",\n \"estQuantity\": 123,\n \"estCost\": 123,\n \"designType\": \"<string>\",\n \"dealStatus\": \"<string>\",\n \"country\": \"<string>\",\n \"estCompletionTime\": \"<string>\",\n \"priceCategory\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"itemType": "<string>",
"documentId": "<string>",
"refId": "<string>",
"name": "<string>",
"picture": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"materialType": "<string>",
"supplierId": "<string>",
"unitOfMeasurement": "<string>",
"costPerUnit": 123,
"currency": "<string>",
"verificationStatus": "<string>",
"unit": "<string>",
"weight": 123,
"weightUom": "<string>",
"color": "<string>",
"notes": "<string>",
"width": 123,
"widthUom": "<string>",
"composition": null,
"shrinkage": 123,
"keyword": "<string>",
"dependencyType": "<string>",
"description": "<string>",
"clientId": "<string>",
"merchandiser": "<string>",
"estQuantity": 123,
"estCost": 123,
"country": "<string>",
"estCompletionTime": "<string>",
"priceCategory": "<string>",
"dealStatus": "<string>",
"designType": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Body
application/json
Response
Successful Response
⌘I
Create Item
curl --request POST \
--url https://vinmake-erp.onrender.com/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"itemType": "<string>",
"refId": "<string>",
"name": "<string>",
"picture": "<string>",
"notes": "<string>",
"materialType": "<string>",
"supplierId": "<string>",
"unit": "<string>",
"costPerUnit": 123,
"currency": "<string>",
"verificationStatus": "<string>",
"weight": 123,
"weightUom": "<string>",
"color": "<string>",
"width": 123,
"widthUom": "<string>",
"composition": null,
"shrinkage": 123,
"keyword": "<string>",
"dependencyType": "<string>",
"description": "<string>",
"clientId": "<string>",
"merchandiser": "<string>",
"estQuantity": 123,
"estCost": 123,
"designType": "<string>",
"dealStatus": "<string>",
"country": "<string>",
"estCompletionTime": "<string>",
"priceCategory": "<string>"
}
'import requests
url = "https://vinmake-erp.onrender.com/items"
payload = {
"itemType": "<string>",
"refId": "<string>",
"name": "<string>",
"picture": "<string>",
"notes": "<string>",
"materialType": "<string>",
"supplierId": "<string>",
"unit": "<string>",
"costPerUnit": 123,
"currency": "<string>",
"verificationStatus": "<string>",
"weight": 123,
"weightUom": "<string>",
"color": "<string>",
"width": 123,
"widthUom": "<string>",
"composition": None,
"shrinkage": 123,
"keyword": "<string>",
"dependencyType": "<string>",
"description": "<string>",
"clientId": "<string>",
"merchandiser": "<string>",
"estQuantity": 123,
"estCost": 123,
"designType": "<string>",
"dealStatus": "<string>",
"country": "<string>",
"estCompletionTime": "<string>",
"priceCategory": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
itemType: '<string>',
refId: '<string>',
name: '<string>',
picture: '<string>',
notes: '<string>',
materialType: '<string>',
supplierId: '<string>',
unit: '<string>',
costPerUnit: 123,
currency: '<string>',
verificationStatus: '<string>',
weight: 123,
weightUom: '<string>',
color: '<string>',
width: 123,
widthUom: '<string>',
composition: null,
shrinkage: 123,
keyword: '<string>',
dependencyType: '<string>',
description: '<string>',
clientId: '<string>',
merchandiser: '<string>',
estQuantity: 123,
estCost: 123,
designType: '<string>',
dealStatus: '<string>',
country: '<string>',
estCompletionTime: '<string>',
priceCategory: '<string>'
})
};
fetch('https://vinmake-erp.onrender.com/items', 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://vinmake-erp.onrender.com/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'itemType' => '<string>',
'refId' => '<string>',
'name' => '<string>',
'picture' => '<string>',
'notes' => '<string>',
'materialType' => '<string>',
'supplierId' => '<string>',
'unit' => '<string>',
'costPerUnit' => 123,
'currency' => '<string>',
'verificationStatus' => '<string>',
'weight' => 123,
'weightUom' => '<string>',
'color' => '<string>',
'width' => 123,
'widthUom' => '<string>',
'composition' => null,
'shrinkage' => 123,
'keyword' => '<string>',
'dependencyType' => '<string>',
'description' => '<string>',
'clientId' => '<string>',
'merchandiser' => '<string>',
'estQuantity' => 123,
'estCost' => 123,
'designType' => '<string>',
'dealStatus' => '<string>',
'country' => '<string>',
'estCompletionTime' => '<string>',
'priceCategory' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://vinmake-erp.onrender.com/items"
payload := strings.NewReader("{\n \"itemType\": \"<string>\",\n \"refId\": \"<string>\",\n \"name\": \"<string>\",\n \"picture\": \"<string>\",\n \"notes\": \"<string>\",\n \"materialType\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"unit\": \"<string>\",\n \"costPerUnit\": 123,\n \"currency\": \"<string>\",\n \"verificationStatus\": \"<string>\",\n \"weight\": 123,\n \"weightUom\": \"<string>\",\n \"color\": \"<string>\",\n \"width\": 123,\n \"widthUom\": \"<string>\",\n \"composition\": null,\n \"shrinkage\": 123,\n \"keyword\": \"<string>\",\n \"dependencyType\": \"<string>\",\n \"description\": \"<string>\",\n \"clientId\": \"<string>\",\n \"merchandiser\": \"<string>\",\n \"estQuantity\": 123,\n \"estCost\": 123,\n \"designType\": \"<string>\",\n \"dealStatus\": \"<string>\",\n \"country\": \"<string>\",\n \"estCompletionTime\": \"<string>\",\n \"priceCategory\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://vinmake-erp.onrender.com/items")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"itemType\": \"<string>\",\n \"refId\": \"<string>\",\n \"name\": \"<string>\",\n \"picture\": \"<string>\",\n \"notes\": \"<string>\",\n \"materialType\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"unit\": \"<string>\",\n \"costPerUnit\": 123,\n \"currency\": \"<string>\",\n \"verificationStatus\": \"<string>\",\n \"weight\": 123,\n \"weightUom\": \"<string>\",\n \"color\": \"<string>\",\n \"width\": 123,\n \"widthUom\": \"<string>\",\n \"composition\": null,\n \"shrinkage\": 123,\n \"keyword\": \"<string>\",\n \"dependencyType\": \"<string>\",\n \"description\": \"<string>\",\n \"clientId\": \"<string>\",\n \"merchandiser\": \"<string>\",\n \"estQuantity\": 123,\n \"estCost\": 123,\n \"designType\": \"<string>\",\n \"dealStatus\": \"<string>\",\n \"country\": \"<string>\",\n \"estCompletionTime\": \"<string>\",\n \"priceCategory\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vinmake-erp.onrender.com/items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"itemType\": \"<string>\",\n \"refId\": \"<string>\",\n \"name\": \"<string>\",\n \"picture\": \"<string>\",\n \"notes\": \"<string>\",\n \"materialType\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"unit\": \"<string>\",\n \"costPerUnit\": 123,\n \"currency\": \"<string>\",\n \"verificationStatus\": \"<string>\",\n \"weight\": 123,\n \"weightUom\": \"<string>\",\n \"color\": \"<string>\",\n \"width\": 123,\n \"widthUom\": \"<string>\",\n \"composition\": null,\n \"shrinkage\": 123,\n \"keyword\": \"<string>\",\n \"dependencyType\": \"<string>\",\n \"description\": \"<string>\",\n \"clientId\": \"<string>\",\n \"merchandiser\": \"<string>\",\n \"estQuantity\": 123,\n \"estCost\": 123,\n \"designType\": \"<string>\",\n \"dealStatus\": \"<string>\",\n \"country\": \"<string>\",\n \"estCompletionTime\": \"<string>\",\n \"priceCategory\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"itemType": "<string>",
"documentId": "<string>",
"refId": "<string>",
"name": "<string>",
"picture": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"materialType": "<string>",
"supplierId": "<string>",
"unitOfMeasurement": "<string>",
"costPerUnit": 123,
"currency": "<string>",
"verificationStatus": "<string>",
"unit": "<string>",
"weight": 123,
"weightUom": "<string>",
"color": "<string>",
"notes": "<string>",
"width": 123,
"widthUom": "<string>",
"composition": null,
"shrinkage": 123,
"keyword": "<string>",
"dependencyType": "<string>",
"description": "<string>",
"clientId": "<string>",
"merchandiser": "<string>",
"estQuantity": 123,
"estCost": 123,
"country": "<string>",
"estCompletionTime": "<string>",
"priceCategory": "<string>",
"dealStatus": "<string>",
"designType": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}