Quotes
Create Quote
Create a new quote with its first sample stage and line items.
POST
/
api
/
v1
/
quotes
Create Quote
curl --request POST \
--url https://vinmake-erp.onrender.com/api/v1/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"totalAmount": 123,
"rfqId": "<string>",
"costSheetId": "<string>",
"costSheetVersion": 123,
"supplierId": "<string>",
"clientId": "<string>",
"orderQuantity": 123,
"currency": "USD",
"status": "draft",
"validityDate": "2023-12-25",
"notes": "<string>",
"stageKey": "precost",
"lineItems": [
{
"description": "<string>",
"category": "<string>",
"quantity": 123,
"unitPrice": 123,
"amount": 123,
"notes": "<string>",
"unit": "<string>",
"originalQuantity": 123,
"originalUnitPrice": 123,
"groupedItems": [
{
"key": "<string>",
"name": "<string>",
"category": "<string>",
"amount": 123,
"quantity": 123,
"unit": "<string>",
"unitPrice": 123
}
]
}
]
}
'import requests
url = "https://vinmake-erp.onrender.com/api/v1/quotes"
payload = {
"totalAmount": 123,
"rfqId": "<string>",
"costSheetId": "<string>",
"costSheetVersion": 123,
"supplierId": "<string>",
"clientId": "<string>",
"orderQuantity": 123,
"currency": "USD",
"status": "draft",
"validityDate": "2023-12-25",
"notes": "<string>",
"stageKey": "precost",
"lineItems": [
{
"description": "<string>",
"category": "<string>",
"quantity": 123,
"unitPrice": 123,
"amount": 123,
"notes": "<string>",
"unit": "<string>",
"originalQuantity": 123,
"originalUnitPrice": 123,
"groupedItems": [
{
"key": "<string>",
"name": "<string>",
"category": "<string>",
"amount": 123,
"quantity": 123,
"unit": "<string>",
"unitPrice": 123
}
]
}
]
}
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({
totalAmount: 123,
rfqId: '<string>',
costSheetId: '<string>',
costSheetVersion: 123,
supplierId: '<string>',
clientId: '<string>',
orderQuantity: 123,
currency: 'USD',
status: 'draft',
validityDate: '2023-12-25',
notes: '<string>',
stageKey: 'precost',
lineItems: [
{
description: '<string>',
category: '<string>',
quantity: 123,
unitPrice: 123,
amount: 123,
notes: '<string>',
unit: '<string>',
originalQuantity: 123,
originalUnitPrice: 123,
groupedItems: [
{
key: '<string>',
name: '<string>',
category: '<string>',
amount: 123,
quantity: 123,
unit: '<string>',
unitPrice: 123
}
]
}
]
})
};
fetch('https://vinmake-erp.onrender.com/api/v1/quotes', 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/api/v1/quotes",
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([
'totalAmount' => 123,
'rfqId' => '<string>',
'costSheetId' => '<string>',
'costSheetVersion' => 123,
'supplierId' => '<string>',
'clientId' => '<string>',
'orderQuantity' => 123,
'currency' => 'USD',
'status' => 'draft',
'validityDate' => '2023-12-25',
'notes' => '<string>',
'stageKey' => 'precost',
'lineItems' => [
[
'description' => '<string>',
'category' => '<string>',
'quantity' => 123,
'unitPrice' => 123,
'amount' => 123,
'notes' => '<string>',
'unit' => '<string>',
'originalQuantity' => 123,
'originalUnitPrice' => 123,
'groupedItems' => [
[
'key' => '<string>',
'name' => '<string>',
'category' => '<string>',
'amount' => 123,
'quantity' => 123,
'unit' => '<string>',
'unitPrice' => 123
]
]
]
]
]),
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/api/v1/quotes"
payload := strings.NewReader("{\n \"totalAmount\": 123,\n \"rfqId\": \"<string>\",\n \"costSheetId\": \"<string>\",\n \"costSheetVersion\": 123,\n \"supplierId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"orderQuantity\": 123,\n \"currency\": \"USD\",\n \"status\": \"draft\",\n \"validityDate\": \"2023-12-25\",\n \"notes\": \"<string>\",\n \"stageKey\": \"precost\",\n \"lineItems\": [\n {\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": 123,\n \"amount\": 123,\n \"notes\": \"<string>\",\n \"unit\": \"<string>\",\n \"originalQuantity\": 123,\n \"originalUnitPrice\": 123,\n \"groupedItems\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"amount\": 123,\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"unitPrice\": 123\n }\n ]\n }\n ]\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/api/v1/quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"totalAmount\": 123,\n \"rfqId\": \"<string>\",\n \"costSheetId\": \"<string>\",\n \"costSheetVersion\": 123,\n \"supplierId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"orderQuantity\": 123,\n \"currency\": \"USD\",\n \"status\": \"draft\",\n \"validityDate\": \"2023-12-25\",\n \"notes\": \"<string>\",\n \"stageKey\": \"precost\",\n \"lineItems\": [\n {\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": 123,\n \"amount\": 123,\n \"notes\": \"<string>\",\n \"unit\": \"<string>\",\n \"originalQuantity\": 123,\n \"originalUnitPrice\": 123,\n \"groupedItems\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"amount\": 123,\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"unitPrice\": 123\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vinmake-erp.onrender.com/api/v1/quotes")
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 \"totalAmount\": 123,\n \"rfqId\": \"<string>\",\n \"costSheetId\": \"<string>\",\n \"costSheetVersion\": 123,\n \"supplierId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"orderQuantity\": 123,\n \"currency\": \"USD\",\n \"status\": \"draft\",\n \"validityDate\": \"2023-12-25\",\n \"notes\": \"<string>\",\n \"stageKey\": \"precost\",\n \"lineItems\": [\n {\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": 123,\n \"amount\": 123,\n \"notes\": \"<string>\",\n \"unit\": \"<string>\",\n \"originalQuantity\": 123,\n \"originalUnitPrice\": 123,\n \"groupedItems\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"amount\": 123,\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"unitPrice\": 123\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"orgId": "<string>",
"totalAmount": 123,
"currency": "<string>",
"status": "<string>",
"rfqId": "<string>",
"costSheetId": "<string>",
"costSheetVersion": 123,
"supplierId": "<string>",
"supplierName": "<string>",
"clientId": "<string>",
"clientName": "<string>",
"createdById": "<string>",
"createdByName": "<string>",
"createdByEmail": "<string>",
"orderQuantity": 123,
"validityDate": "<string>",
"notes": "<string>",
"lineItems": [
{
"id": "<string>",
"quoteId": "<string>",
"description": "<string>",
"category": "<string>",
"quantity": 123,
"unitPrice": 123,
"amount": 123,
"quoteVersionId": "<string>",
"notes": "<string>",
"unit": "<string>",
"originalQuantity": 123,
"originalUnitPrice": 123,
"groupedItems": [
{
"key": "<string>",
"name": "<string>",
"category": "<string>",
"amount": 123,
"quantity": 123,
"unit": "<string>",
"unitPrice": 123
}
],
"createdAt": "<string>"
}
],
"stageId": "<string>",
"stageKey": "<string>",
"stageLabel": "<string>",
"activeStageId": "<string>",
"stages": [
{
"id": "<string>",
"quoteId": "<string>",
"stageKey": "<string>",
"stageLabel": "<string>",
"sortOrder": 0,
"currentVersion": 1,
"finalVersion": 123,
"status": "draft",
"totalAmount": 0,
"currency": "USD",
"costSheetVersion": 123,
"lineItems": [
{
"id": "<string>",
"quoteId": "<string>",
"description": "<string>",
"category": "<string>",
"quantity": 123,
"unitPrice": 123,
"amount": 123,
"quoteVersionId": "<string>",
"notes": "<string>",
"unit": "<string>",
"originalQuantity": 123,
"originalUnitPrice": 123,
"groupedItems": [
{
"key": "<string>",
"name": "<string>",
"category": "<string>",
"amount": 123,
"quantity": 123,
"unit": "<string>",
"unitPrice": 123
}
],
"createdAt": "<string>"
}
]
}
],
"versionId": "<string>",
"versionNumber": 1,
"currentVersion": 1,
"finalVersion": 123,
"changeDescription": "<string>",
"isFinal": false,
"finalizedAt": "<string>",
"finalizedById": "<string>",
"versionHistory": [
{
"id": "<string>",
"quoteId": "<string>",
"versionNumber": 123,
"status": "<string>",
"totalAmount": 123,
"currency": "<string>",
"changeDescription": "<string>",
"isFinal": false,
"finalizedAt": "<string>",
"finalizedById": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"createdAt": "<string>",
"updatedAt": "<string>",
"picture": "<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
Show child attributes
Show child attributes
Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
Create Quote
curl --request POST \
--url https://vinmake-erp.onrender.com/api/v1/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"totalAmount": 123,
"rfqId": "<string>",
"costSheetId": "<string>",
"costSheetVersion": 123,
"supplierId": "<string>",
"clientId": "<string>",
"orderQuantity": 123,
"currency": "USD",
"status": "draft",
"validityDate": "2023-12-25",
"notes": "<string>",
"stageKey": "precost",
"lineItems": [
{
"description": "<string>",
"category": "<string>",
"quantity": 123,
"unitPrice": 123,
"amount": 123,
"notes": "<string>",
"unit": "<string>",
"originalQuantity": 123,
"originalUnitPrice": 123,
"groupedItems": [
{
"key": "<string>",
"name": "<string>",
"category": "<string>",
"amount": 123,
"quantity": 123,
"unit": "<string>",
"unitPrice": 123
}
]
}
]
}
'import requests
url = "https://vinmake-erp.onrender.com/api/v1/quotes"
payload = {
"totalAmount": 123,
"rfqId": "<string>",
"costSheetId": "<string>",
"costSheetVersion": 123,
"supplierId": "<string>",
"clientId": "<string>",
"orderQuantity": 123,
"currency": "USD",
"status": "draft",
"validityDate": "2023-12-25",
"notes": "<string>",
"stageKey": "precost",
"lineItems": [
{
"description": "<string>",
"category": "<string>",
"quantity": 123,
"unitPrice": 123,
"amount": 123,
"notes": "<string>",
"unit": "<string>",
"originalQuantity": 123,
"originalUnitPrice": 123,
"groupedItems": [
{
"key": "<string>",
"name": "<string>",
"category": "<string>",
"amount": 123,
"quantity": 123,
"unit": "<string>",
"unitPrice": 123
}
]
}
]
}
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({
totalAmount: 123,
rfqId: '<string>',
costSheetId: '<string>',
costSheetVersion: 123,
supplierId: '<string>',
clientId: '<string>',
orderQuantity: 123,
currency: 'USD',
status: 'draft',
validityDate: '2023-12-25',
notes: '<string>',
stageKey: 'precost',
lineItems: [
{
description: '<string>',
category: '<string>',
quantity: 123,
unitPrice: 123,
amount: 123,
notes: '<string>',
unit: '<string>',
originalQuantity: 123,
originalUnitPrice: 123,
groupedItems: [
{
key: '<string>',
name: '<string>',
category: '<string>',
amount: 123,
quantity: 123,
unit: '<string>',
unitPrice: 123
}
]
}
]
})
};
fetch('https://vinmake-erp.onrender.com/api/v1/quotes', 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/api/v1/quotes",
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([
'totalAmount' => 123,
'rfqId' => '<string>',
'costSheetId' => '<string>',
'costSheetVersion' => 123,
'supplierId' => '<string>',
'clientId' => '<string>',
'orderQuantity' => 123,
'currency' => 'USD',
'status' => 'draft',
'validityDate' => '2023-12-25',
'notes' => '<string>',
'stageKey' => 'precost',
'lineItems' => [
[
'description' => '<string>',
'category' => '<string>',
'quantity' => 123,
'unitPrice' => 123,
'amount' => 123,
'notes' => '<string>',
'unit' => '<string>',
'originalQuantity' => 123,
'originalUnitPrice' => 123,
'groupedItems' => [
[
'key' => '<string>',
'name' => '<string>',
'category' => '<string>',
'amount' => 123,
'quantity' => 123,
'unit' => '<string>',
'unitPrice' => 123
]
]
]
]
]),
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/api/v1/quotes"
payload := strings.NewReader("{\n \"totalAmount\": 123,\n \"rfqId\": \"<string>\",\n \"costSheetId\": \"<string>\",\n \"costSheetVersion\": 123,\n \"supplierId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"orderQuantity\": 123,\n \"currency\": \"USD\",\n \"status\": \"draft\",\n \"validityDate\": \"2023-12-25\",\n \"notes\": \"<string>\",\n \"stageKey\": \"precost\",\n \"lineItems\": [\n {\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": 123,\n \"amount\": 123,\n \"notes\": \"<string>\",\n \"unit\": \"<string>\",\n \"originalQuantity\": 123,\n \"originalUnitPrice\": 123,\n \"groupedItems\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"amount\": 123,\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"unitPrice\": 123\n }\n ]\n }\n ]\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/api/v1/quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"totalAmount\": 123,\n \"rfqId\": \"<string>\",\n \"costSheetId\": \"<string>\",\n \"costSheetVersion\": 123,\n \"supplierId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"orderQuantity\": 123,\n \"currency\": \"USD\",\n \"status\": \"draft\",\n \"validityDate\": \"2023-12-25\",\n \"notes\": \"<string>\",\n \"stageKey\": \"precost\",\n \"lineItems\": [\n {\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": 123,\n \"amount\": 123,\n \"notes\": \"<string>\",\n \"unit\": \"<string>\",\n \"originalQuantity\": 123,\n \"originalUnitPrice\": 123,\n \"groupedItems\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"amount\": 123,\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"unitPrice\": 123\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vinmake-erp.onrender.com/api/v1/quotes")
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 \"totalAmount\": 123,\n \"rfqId\": \"<string>\",\n \"costSheetId\": \"<string>\",\n \"costSheetVersion\": 123,\n \"supplierId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"orderQuantity\": 123,\n \"currency\": \"USD\",\n \"status\": \"draft\",\n \"validityDate\": \"2023-12-25\",\n \"notes\": \"<string>\",\n \"stageKey\": \"precost\",\n \"lineItems\": [\n {\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"quantity\": 123,\n \"unitPrice\": 123,\n \"amount\": 123,\n \"notes\": \"<string>\",\n \"unit\": \"<string>\",\n \"originalQuantity\": 123,\n \"originalUnitPrice\": 123,\n \"groupedItems\": [\n {\n \"key\": \"<string>\",\n \"name\": \"<string>\",\n \"category\": \"<string>\",\n \"amount\": 123,\n \"quantity\": 123,\n \"unit\": \"<string>\",\n \"unitPrice\": 123\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"orgId": "<string>",
"totalAmount": 123,
"currency": "<string>",
"status": "<string>",
"rfqId": "<string>",
"costSheetId": "<string>",
"costSheetVersion": 123,
"supplierId": "<string>",
"supplierName": "<string>",
"clientId": "<string>",
"clientName": "<string>",
"createdById": "<string>",
"createdByName": "<string>",
"createdByEmail": "<string>",
"orderQuantity": 123,
"validityDate": "<string>",
"notes": "<string>",
"lineItems": [
{
"id": "<string>",
"quoteId": "<string>",
"description": "<string>",
"category": "<string>",
"quantity": 123,
"unitPrice": 123,
"amount": 123,
"quoteVersionId": "<string>",
"notes": "<string>",
"unit": "<string>",
"originalQuantity": 123,
"originalUnitPrice": 123,
"groupedItems": [
{
"key": "<string>",
"name": "<string>",
"category": "<string>",
"amount": 123,
"quantity": 123,
"unit": "<string>",
"unitPrice": 123
}
],
"createdAt": "<string>"
}
],
"stageId": "<string>",
"stageKey": "<string>",
"stageLabel": "<string>",
"activeStageId": "<string>",
"stages": [
{
"id": "<string>",
"quoteId": "<string>",
"stageKey": "<string>",
"stageLabel": "<string>",
"sortOrder": 0,
"currentVersion": 1,
"finalVersion": 123,
"status": "draft",
"totalAmount": 0,
"currency": "USD",
"costSheetVersion": 123,
"lineItems": [
{
"id": "<string>",
"quoteId": "<string>",
"description": "<string>",
"category": "<string>",
"quantity": 123,
"unitPrice": 123,
"amount": 123,
"quoteVersionId": "<string>",
"notes": "<string>",
"unit": "<string>",
"originalQuantity": 123,
"originalUnitPrice": 123,
"groupedItems": [
{
"key": "<string>",
"name": "<string>",
"category": "<string>",
"amount": 123,
"quantity": 123,
"unit": "<string>",
"unitPrice": 123
}
],
"createdAt": "<string>"
}
]
}
],
"versionId": "<string>",
"versionNumber": 1,
"currentVersion": 1,
"finalVersion": 123,
"changeDescription": "<string>",
"isFinal": false,
"finalizedAt": "<string>",
"finalizedById": "<string>",
"versionHistory": [
{
"id": "<string>",
"quoteId": "<string>",
"versionNumber": 123,
"status": "<string>",
"totalAmount": 123,
"currency": "<string>",
"changeDescription": "<string>",
"isFinal": false,
"finalizedAt": "<string>",
"finalizedById": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"createdAt": "<string>",
"updatedAt": "<string>",
"picture": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}