Purchase Orders
Create Purchase Order
Create a new purchase order.
POST
/
purchase-orders
Create Purchase Order
curl --request POST \
--url https://vinmake-erp.onrender.com/purchase-orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"poType": "<string>",
"orderType": "bulk",
"workOrderId": "<string>",
"workOrderDocumentId": "<string>",
"supplierId": "<string>",
"supplierRefPo": "<string>",
"materialRequestId": "<string>",
"productionOrderId": "<string>",
"salesOrderId": "<string>",
"orderDate": "<string>",
"expectedDeliveryDate": "<string>",
"currency": "<string>",
"subtotal": 123,
"taxRate": 123,
"taxAmount": 123,
"total": 123,
"purpose": "<string>",
"expenseCategory": "<string>",
"frequency": "<string>",
"managementAccountId": "<string>",
"status": "<string>",
"notes": "<string>",
"lineItems": [
{}
]
}
'import requests
url = "https://vinmake-erp.onrender.com/purchase-orders"
payload = {
"poType": "<string>",
"orderType": "bulk",
"workOrderId": "<string>",
"workOrderDocumentId": "<string>",
"supplierId": "<string>",
"supplierRefPo": "<string>",
"materialRequestId": "<string>",
"productionOrderId": "<string>",
"salesOrderId": "<string>",
"orderDate": "<string>",
"expectedDeliveryDate": "<string>",
"currency": "<string>",
"subtotal": 123,
"taxRate": 123,
"taxAmount": 123,
"total": 123,
"purpose": "<string>",
"expenseCategory": "<string>",
"frequency": "<string>",
"managementAccountId": "<string>",
"status": "<string>",
"notes": "<string>",
"lineItems": [{}]
}
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({
poType: '<string>',
orderType: 'bulk',
workOrderId: '<string>',
workOrderDocumentId: '<string>',
supplierId: '<string>',
supplierRefPo: '<string>',
materialRequestId: '<string>',
productionOrderId: '<string>',
salesOrderId: '<string>',
orderDate: '<string>',
expectedDeliveryDate: '<string>',
currency: '<string>',
subtotal: 123,
taxRate: 123,
taxAmount: 123,
total: 123,
purpose: '<string>',
expenseCategory: '<string>',
frequency: '<string>',
managementAccountId: '<string>',
status: '<string>',
notes: '<string>',
lineItems: [{}]
})
};
fetch('https://vinmake-erp.onrender.com/purchase-orders', 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/purchase-orders",
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([
'poType' => '<string>',
'orderType' => 'bulk',
'workOrderId' => '<string>',
'workOrderDocumentId' => '<string>',
'supplierId' => '<string>',
'supplierRefPo' => '<string>',
'materialRequestId' => '<string>',
'productionOrderId' => '<string>',
'salesOrderId' => '<string>',
'orderDate' => '<string>',
'expectedDeliveryDate' => '<string>',
'currency' => '<string>',
'subtotal' => 123,
'taxRate' => 123,
'taxAmount' => 123,
'total' => 123,
'purpose' => '<string>',
'expenseCategory' => '<string>',
'frequency' => '<string>',
'managementAccountId' => '<string>',
'status' => '<string>',
'notes' => '<string>',
'lineItems' => [
[
]
]
]),
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/purchase-orders"
payload := strings.NewReader("{\n \"poType\": \"<string>\",\n \"orderType\": \"bulk\",\n \"workOrderId\": \"<string>\",\n \"workOrderDocumentId\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"supplierRefPo\": \"<string>\",\n \"materialRequestId\": \"<string>\",\n \"productionOrderId\": \"<string>\",\n \"salesOrderId\": \"<string>\",\n \"orderDate\": \"<string>\",\n \"expectedDeliveryDate\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtotal\": 123,\n \"taxRate\": 123,\n \"taxAmount\": 123,\n \"total\": 123,\n \"purpose\": \"<string>\",\n \"expenseCategory\": \"<string>\",\n \"frequency\": \"<string>\",\n \"managementAccountId\": \"<string>\",\n \"status\": \"<string>\",\n \"notes\": \"<string>\",\n \"lineItems\": [\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/purchase-orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"poType\": \"<string>\",\n \"orderType\": \"bulk\",\n \"workOrderId\": \"<string>\",\n \"workOrderDocumentId\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"supplierRefPo\": \"<string>\",\n \"materialRequestId\": \"<string>\",\n \"productionOrderId\": \"<string>\",\n \"salesOrderId\": \"<string>\",\n \"orderDate\": \"<string>\",\n \"expectedDeliveryDate\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtotal\": 123,\n \"taxRate\": 123,\n \"taxAmount\": 123,\n \"total\": 123,\n \"purpose\": \"<string>\",\n \"expenseCategory\": \"<string>\",\n \"frequency\": \"<string>\",\n \"managementAccountId\": \"<string>\",\n \"status\": \"<string>\",\n \"notes\": \"<string>\",\n \"lineItems\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vinmake-erp.onrender.com/purchase-orders")
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 \"poType\": \"<string>\",\n \"orderType\": \"bulk\",\n \"workOrderId\": \"<string>\",\n \"workOrderDocumentId\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"supplierRefPo\": \"<string>\",\n \"materialRequestId\": \"<string>\",\n \"productionOrderId\": \"<string>\",\n \"salesOrderId\": \"<string>\",\n \"orderDate\": \"<string>\",\n \"expectedDeliveryDate\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtotal\": 123,\n \"taxRate\": 123,\n \"taxAmount\": 123,\n \"total\": 123,\n \"purpose\": \"<string>\",\n \"expenseCategory\": \"<string>\",\n \"frequency\": \"<string>\",\n \"managementAccountId\": \"<string>\",\n \"status\": \"<string>\",\n \"notes\": \"<string>\",\n \"lineItems\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"poType": "<string>",
"documentId": "<string>",
"orderType": "<string>",
"workOrderId": "<string>",
"workOrderDocumentId": "<string>",
"supplierId": "<string>",
"supplierVendor": "<string>",
"supplierRefPo": "<string>",
"materialRequestId": "<string>",
"mrIds": "<string>",
"mrDocumentId": "<string>",
"productionOrderId": "<string>",
"salesOrderId": "<string>",
"orderDate": "<string>",
"expectedDeliveryDate": "<string>",
"currency": "<string>",
"subtotal": 123,
"taxRate": 123,
"taxAmount": 123,
"total": 123,
"purpose": "<string>",
"expenseCategory": "<string>",
"category": "<string>",
"frequency": "<string>",
"managementAccountId": "<string>",
"status": "<string>",
"notes": "<string>",
"createdAt": "<string>",
"itemsCount": 123,
"dueDate": "<string>",
"lineItems": [
{
"id": "<string>",
"purchaseOrderId": "<string>",
"itemNumber": 123,
"materialId": "<string>",
"materialSkuId": "<string>",
"supplierId": "<string>",
"supplierName": "<string>",
"description": "<string>",
"category": "<string>",
"color": "<string>",
"size": "<string>",
"uom": "<string>",
"qty": 123,
"unitPrice": 123,
"amount": 123,
"linkedMrLineId": "<string>",
"status": "<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
Show child attributes
Show child attributes
⌘I
Create Purchase Order
curl --request POST \
--url https://vinmake-erp.onrender.com/purchase-orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"poType": "<string>",
"orderType": "bulk",
"workOrderId": "<string>",
"workOrderDocumentId": "<string>",
"supplierId": "<string>",
"supplierRefPo": "<string>",
"materialRequestId": "<string>",
"productionOrderId": "<string>",
"salesOrderId": "<string>",
"orderDate": "<string>",
"expectedDeliveryDate": "<string>",
"currency": "<string>",
"subtotal": 123,
"taxRate": 123,
"taxAmount": 123,
"total": 123,
"purpose": "<string>",
"expenseCategory": "<string>",
"frequency": "<string>",
"managementAccountId": "<string>",
"status": "<string>",
"notes": "<string>",
"lineItems": [
{}
]
}
'import requests
url = "https://vinmake-erp.onrender.com/purchase-orders"
payload = {
"poType": "<string>",
"orderType": "bulk",
"workOrderId": "<string>",
"workOrderDocumentId": "<string>",
"supplierId": "<string>",
"supplierRefPo": "<string>",
"materialRequestId": "<string>",
"productionOrderId": "<string>",
"salesOrderId": "<string>",
"orderDate": "<string>",
"expectedDeliveryDate": "<string>",
"currency": "<string>",
"subtotal": 123,
"taxRate": 123,
"taxAmount": 123,
"total": 123,
"purpose": "<string>",
"expenseCategory": "<string>",
"frequency": "<string>",
"managementAccountId": "<string>",
"status": "<string>",
"notes": "<string>",
"lineItems": [{}]
}
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({
poType: '<string>',
orderType: 'bulk',
workOrderId: '<string>',
workOrderDocumentId: '<string>',
supplierId: '<string>',
supplierRefPo: '<string>',
materialRequestId: '<string>',
productionOrderId: '<string>',
salesOrderId: '<string>',
orderDate: '<string>',
expectedDeliveryDate: '<string>',
currency: '<string>',
subtotal: 123,
taxRate: 123,
taxAmount: 123,
total: 123,
purpose: '<string>',
expenseCategory: '<string>',
frequency: '<string>',
managementAccountId: '<string>',
status: '<string>',
notes: '<string>',
lineItems: [{}]
})
};
fetch('https://vinmake-erp.onrender.com/purchase-orders', 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/purchase-orders",
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([
'poType' => '<string>',
'orderType' => 'bulk',
'workOrderId' => '<string>',
'workOrderDocumentId' => '<string>',
'supplierId' => '<string>',
'supplierRefPo' => '<string>',
'materialRequestId' => '<string>',
'productionOrderId' => '<string>',
'salesOrderId' => '<string>',
'orderDate' => '<string>',
'expectedDeliveryDate' => '<string>',
'currency' => '<string>',
'subtotal' => 123,
'taxRate' => 123,
'taxAmount' => 123,
'total' => 123,
'purpose' => '<string>',
'expenseCategory' => '<string>',
'frequency' => '<string>',
'managementAccountId' => '<string>',
'status' => '<string>',
'notes' => '<string>',
'lineItems' => [
[
]
]
]),
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/purchase-orders"
payload := strings.NewReader("{\n \"poType\": \"<string>\",\n \"orderType\": \"bulk\",\n \"workOrderId\": \"<string>\",\n \"workOrderDocumentId\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"supplierRefPo\": \"<string>\",\n \"materialRequestId\": \"<string>\",\n \"productionOrderId\": \"<string>\",\n \"salesOrderId\": \"<string>\",\n \"orderDate\": \"<string>\",\n \"expectedDeliveryDate\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtotal\": 123,\n \"taxRate\": 123,\n \"taxAmount\": 123,\n \"total\": 123,\n \"purpose\": \"<string>\",\n \"expenseCategory\": \"<string>\",\n \"frequency\": \"<string>\",\n \"managementAccountId\": \"<string>\",\n \"status\": \"<string>\",\n \"notes\": \"<string>\",\n \"lineItems\": [\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/purchase-orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"poType\": \"<string>\",\n \"orderType\": \"bulk\",\n \"workOrderId\": \"<string>\",\n \"workOrderDocumentId\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"supplierRefPo\": \"<string>\",\n \"materialRequestId\": \"<string>\",\n \"productionOrderId\": \"<string>\",\n \"salesOrderId\": \"<string>\",\n \"orderDate\": \"<string>\",\n \"expectedDeliveryDate\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtotal\": 123,\n \"taxRate\": 123,\n \"taxAmount\": 123,\n \"total\": 123,\n \"purpose\": \"<string>\",\n \"expenseCategory\": \"<string>\",\n \"frequency\": \"<string>\",\n \"managementAccountId\": \"<string>\",\n \"status\": \"<string>\",\n \"notes\": \"<string>\",\n \"lineItems\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vinmake-erp.onrender.com/purchase-orders")
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 \"poType\": \"<string>\",\n \"orderType\": \"bulk\",\n \"workOrderId\": \"<string>\",\n \"workOrderDocumentId\": \"<string>\",\n \"supplierId\": \"<string>\",\n \"supplierRefPo\": \"<string>\",\n \"materialRequestId\": \"<string>\",\n \"productionOrderId\": \"<string>\",\n \"salesOrderId\": \"<string>\",\n \"orderDate\": \"<string>\",\n \"expectedDeliveryDate\": \"<string>\",\n \"currency\": \"<string>\",\n \"subtotal\": 123,\n \"taxRate\": 123,\n \"taxAmount\": 123,\n \"total\": 123,\n \"purpose\": \"<string>\",\n \"expenseCategory\": \"<string>\",\n \"frequency\": \"<string>\",\n \"managementAccountId\": \"<string>\",\n \"status\": \"<string>\",\n \"notes\": \"<string>\",\n \"lineItems\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"poType": "<string>",
"documentId": "<string>",
"orderType": "<string>",
"workOrderId": "<string>",
"workOrderDocumentId": "<string>",
"supplierId": "<string>",
"supplierVendor": "<string>",
"supplierRefPo": "<string>",
"materialRequestId": "<string>",
"mrIds": "<string>",
"mrDocumentId": "<string>",
"productionOrderId": "<string>",
"salesOrderId": "<string>",
"orderDate": "<string>",
"expectedDeliveryDate": "<string>",
"currency": "<string>",
"subtotal": 123,
"taxRate": 123,
"taxAmount": 123,
"total": 123,
"purpose": "<string>",
"expenseCategory": "<string>",
"category": "<string>",
"frequency": "<string>",
"managementAccountId": "<string>",
"status": "<string>",
"notes": "<string>",
"createdAt": "<string>",
"itemsCount": 123,
"dueDate": "<string>",
"lineItems": [
{
"id": "<string>",
"purchaseOrderId": "<string>",
"itemNumber": 123,
"materialId": "<string>",
"materialSkuId": "<string>",
"supplierId": "<string>",
"supplierName": "<string>",
"description": "<string>",
"category": "<string>",
"color": "<string>",
"size": "<string>",
"uom": "<string>",
"qty": 123,
"unitPrice": 123,
"amount": 123,
"linkedMrLineId": "<string>",
"status": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}