curl --request POST \
--url https://api.useopenwrench.com/api/external/v1/supplier/inventory/purchase_order_line_items/bulk \
--header 'Content-Type: application/json' \
--header 'OW-KEY: <api-key>' \
--header 'X-API-KEY: <api-key>' \
--data '
[
{
"supplierPurchaseOrderId": 123,
"isEquipmentLine": true,
"partUomId": 123,
"partCurrencyId": "<string>",
"equipmentUomId": 123,
"equipmentCurrencyId": "<string>",
"id": 123,
"viaStockLocationId": 123,
"partId": 123,
"partCatalogId": 123,
"partQuantity": 123,
"partCost": 123,
"equipmentTypeId": 123,
"equipmentCatalogId": 123,
"equipmentQuantity": 123,
"equipmentCost": 123,
"prLineItemIds": [
123
],
"warrantyAssetId": 123,
"glCode": "<string>"
}
]
'import requests
url = "https://api.useopenwrench.com/api/external/v1/supplier/inventory/purchase_order_line_items/bulk"
payload = [
{
"supplierPurchaseOrderId": 123,
"isEquipmentLine": True,
"partUomId": 123,
"partCurrencyId": "<string>",
"equipmentUomId": 123,
"equipmentCurrencyId": "<string>",
"id": 123,
"viaStockLocationId": 123,
"partId": 123,
"partCatalogId": 123,
"partQuantity": 123,
"partCost": 123,
"equipmentTypeId": 123,
"equipmentCatalogId": 123,
"equipmentQuantity": 123,
"equipmentCost": 123,
"prLineItemIds": [123],
"warrantyAssetId": 123,
"glCode": "<string>"
}
]
headers = {
"X-API-KEY": "<api-key>",
"OW-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-KEY': '<api-key>',
'OW-KEY': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify([
{
supplierPurchaseOrderId: 123,
isEquipmentLine: true,
partUomId: 123,
partCurrencyId: '<string>',
equipmentUomId: 123,
equipmentCurrencyId: '<string>',
id: 123,
viaStockLocationId: 123,
partId: 123,
partCatalogId: 123,
partQuantity: 123,
partCost: 123,
equipmentTypeId: 123,
equipmentCatalogId: 123,
equipmentQuantity: 123,
equipmentCost: 123,
prLineItemIds: [123],
warrantyAssetId: 123,
glCode: '<string>'
}
])
};
fetch('https://api.useopenwrench.com/api/external/v1/supplier/inventory/purchase_order_line_items/bulk', 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://api.useopenwrench.com/api/external/v1/supplier/inventory/purchase_order_line_items/bulk",
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([
[
'supplierPurchaseOrderId' => 123,
'isEquipmentLine' => true,
'partUomId' => 123,
'partCurrencyId' => '<string>',
'equipmentUomId' => 123,
'equipmentCurrencyId' => '<string>',
'id' => 123,
'viaStockLocationId' => 123,
'partId' => 123,
'partCatalogId' => 123,
'partQuantity' => 123,
'partCost' => 123,
'equipmentTypeId' => 123,
'equipmentCatalogId' => 123,
'equipmentQuantity' => 123,
'equipmentCost' => 123,
'prLineItemIds' => [
123
],
'warrantyAssetId' => 123,
'glCode' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"OW-KEY: <api-key>",
"X-API-KEY: <api-key>"
],
]);
$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://api.useopenwrench.com/api/external/v1/supplier/inventory/purchase_order_line_items/bulk"
payload := strings.NewReader("[\n {\n \"supplierPurchaseOrderId\": 123,\n \"isEquipmentLine\": true,\n \"partUomId\": 123,\n \"partCurrencyId\": \"<string>\",\n \"equipmentUomId\": 123,\n \"equipmentCurrencyId\": \"<string>\",\n \"id\": 123,\n \"viaStockLocationId\": 123,\n \"partId\": 123,\n \"partCatalogId\": 123,\n \"partQuantity\": 123,\n \"partCost\": 123,\n \"equipmentTypeId\": 123,\n \"equipmentCatalogId\": 123,\n \"equipmentQuantity\": 123,\n \"equipmentCost\": 123,\n \"prLineItemIds\": [\n 123\n ],\n \"warrantyAssetId\": 123,\n \"glCode\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("OW-KEY", "<api-key>")
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://api.useopenwrench.com/api/external/v1/supplier/inventory/purchase_order_line_items/bulk")
.header("X-API-KEY", "<api-key>")
.header("OW-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"supplierPurchaseOrderId\": 123,\n \"isEquipmentLine\": true,\n \"partUomId\": 123,\n \"partCurrencyId\": \"<string>\",\n \"equipmentUomId\": 123,\n \"equipmentCurrencyId\": \"<string>\",\n \"id\": 123,\n \"viaStockLocationId\": 123,\n \"partId\": 123,\n \"partCatalogId\": 123,\n \"partQuantity\": 123,\n \"partCost\": 123,\n \"equipmentTypeId\": 123,\n \"equipmentCatalogId\": 123,\n \"equipmentQuantity\": 123,\n \"equipmentCost\": 123,\n \"prLineItemIds\": [\n 123\n ],\n \"warrantyAssetId\": 123,\n \"glCode\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useopenwrench.com/api/external/v1/supplier/inventory/purchase_order_line_items/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["OW-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"supplierPurchaseOrderId\": 123,\n \"isEquipmentLine\": true,\n \"partUomId\": 123,\n \"partCurrencyId\": \"<string>\",\n \"equipmentUomId\": 123,\n \"equipmentCurrencyId\": \"<string>\",\n \"id\": 123,\n \"viaStockLocationId\": 123,\n \"partId\": 123,\n \"partCatalogId\": 123,\n \"partQuantity\": 123,\n \"partCost\": 123,\n \"equipmentTypeId\": 123,\n \"equipmentCatalogId\": 123,\n \"equipmentQuantity\": 123,\n \"equipmentCost\": 123,\n \"prLineItemIds\": [\n 123\n ],\n \"warrantyAssetId\": 123,\n \"glCode\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"data": [
{
"supplierPurchaseOrderId": 123,
"isEquipmentLine": true,
"partUomId": 123,
"partCurrencyId": "<string>",
"equipmentUomId": 123,
"equipmentCurrencyId": "<string>",
"supplierFacilityId": 123,
"supplierCompanyId": 123,
"isDeleted": true,
"id": 123,
"status": "new",
"stockLocationId": 123,
"locationId": 123,
"viaStockLocationId": 123,
"partId": 123,
"part": {
"name": "<string>",
"uomId": 123,
"isActive": true,
"isStocked": true,
"supplierCompanyId": 123,
"isDeleted": true,
"id": 123,
"partUUID": "<string>",
"manufacturerId": "<string>",
"manufacturerName": "<string>",
"partNumber": "<string>",
"aliasPartId": "<string>",
"images": [
"<string>"
],
"description": "<string>",
"cost": 123,
"defaultVendorId": 123,
"defaultVendor": {
"name": "<string>",
"currencyId": "<string>",
"isActive": true,
"supplierFacilityId": 123,
"isDeleted": true,
"id": 123,
"vendorId": "<string>",
"address": {},
"email": "<string>",
"logoUrl": "<string>",
"phoneNumber": "<string>",
"paymentTerms": "<string>",
"shippingTerms": "<string>",
"orderingEmails": [
"<string>"
],
"accountManagerEmails": [
"<string>"
],
"accountManagerContacts": [
{
"email": "<string>",
"name": "<string>",
"vendorId": 123,
"supplierFacilityId": 123,
"phoneNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"salesRepEmails": [
"<string>"
],
"salesRepContacts": [
{
"email": "<string>",
"name": "<string>",
"vendorId": 123,
"supplierFacilityId": 123,
"phoneNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"accountsPayableEmails": [
"<string>"
],
"accountsPayableContacts": [
{
"email": "<string>",
"name": "<string>",
"vendorId": 123,
"supplierFacilityId": 123,
"phoneNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"defaultWarrantyMonths": 123,
"notes": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"defaultPartCatalogId": 123,
"assetTypeId": 123,
"assetModelId": 123,
"glCode": "<string>",
"partEquipmentVendorCount": 123,
"labelIds": [
123
],
"labels": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"partCatalogId": 123,
"partQuantity": 123,
"partCost": 123,
"partReceivedQuantity": 123,
"partReceivedAverageCost": 123,
"equipmentTypeId": 123,
"equipmentType": {
"modelName": "<string>",
"isActive": true,
"supplierFacilityId": 123,
"supplierCompanyId": 123,
"isDeleted": true,
"id": 123,
"equipmentTypeNumber": "<string>",
"aliasEquipmentTypeNumber": "<string>",
"manufacturerId": "<string>",
"manufacturerName": "<string>",
"images": [
"<string>"
],
"description": "<string>",
"cost": 123,
"defaultVendorId": 123,
"defaultVendor": {
"name": "<string>",
"currencyId": "<string>",
"isActive": true,
"supplierFacilityId": 123,
"isDeleted": true,
"id": 123,
"vendorId": "<string>",
"address": {},
"email": "<string>",
"logoUrl": "<string>",
"phoneNumber": "<string>",
"paymentTerms": "<string>",
"shippingTerms": "<string>",
"orderingEmails": [
"<string>"
],
"accountManagerEmails": [
"<string>"
],
"accountManagerContacts": [
{
"email": "<string>",
"name": "<string>",
"vendorId": 123,
"supplierFacilityId": 123,
"phoneNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"salesRepEmails": [
"<string>"
],
"salesRepContacts": [
{
"email": "<string>",
"name": "<string>",
"vendorId": 123,
"supplierFacilityId": 123,
"phoneNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"accountsPayableEmails": [
"<string>"
],
"accountsPayableContacts": [
{
"email": "<string>",
"name": "<string>",
"vendorId": 123,
"supplierFacilityId": 123,
"phoneNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"defaultWarrantyMonths": 123,
"notes": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"defaultEquipmentCatalogId": 123,
"assetTypeId": 123,
"assetType": {
"name": "<string>",
"usesRefrigerant": true,
"buyerCompanyId": 123,
"isDeleted": true,
"id": 123,
"primarySpendCategory": 123,
"attachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"allProblemTypeIds": [
123
],
"allProblemTypeIdsAsString": "<string>",
"allProblemTypes": [
{
"id": 123,
"name": "<string>",
"buyerCompanyId": 123,
"hasChildren": true
}
],
"allProblemTypesName": "<string>",
"allSpendCategories": [
123
],
"depreciationClassId": 123,
"depreciationClassName": "<string>",
"requiredFields": [
{}
],
"optionalFields": [
{}
],
"replaceMarkupOnOriginalCost": 123,
"replacementThreshold": 123,
"applianceCategory": "<string>",
"refrigerantTypeCode": "<string>",
"fullChargeLb": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"glCode": "<string>",
"partEquipmentVendorCount": 123,
"isAssociatedWithOtherEntities": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"equipmentCatalogId": 123,
"equipmentQuantity": 123,
"equipmentCost": 123,
"equipmentReceivedQuantity": 123,
"equipmentReceivedAverageCost": 123,
"prLineItemIds": [
123
],
"warrantyAssetId": 123,
"glCode": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
],
"count": 123,
"status": "ok"
}{
"message": "<string>",
"type": "<string>",
"status": "error",
"traceId": "<string>"
}{
"message": "<string>",
"type": "<string>",
"status": "error",
"traceId": "<string>"
}{
"message": "<string>",
"type": "<string>",
"status": "error",
"traceId": "<string>"
}Bulk create (replace) purchase order line items
Replaces a purchase order’s line items: all NON-RECEIVED line items on the target purchase order are deleted first, then the submitted line items are created. The request body is a JSON ARRAY of line-item payloads; supplierFacilityId and supplierCompanyId are overwritten from the API key. Line items the key has no write permission for are silently skipped. Sends the purchase-order notification after creation. Not rate-limited.
curl --request POST \
--url https://api.useopenwrench.com/api/external/v1/supplier/inventory/purchase_order_line_items/bulk \
--header 'Content-Type: application/json' \
--header 'OW-KEY: <api-key>' \
--header 'X-API-KEY: <api-key>' \
--data '
[
{
"supplierPurchaseOrderId": 123,
"isEquipmentLine": true,
"partUomId": 123,
"partCurrencyId": "<string>",
"equipmentUomId": 123,
"equipmentCurrencyId": "<string>",
"id": 123,
"viaStockLocationId": 123,
"partId": 123,
"partCatalogId": 123,
"partQuantity": 123,
"partCost": 123,
"equipmentTypeId": 123,
"equipmentCatalogId": 123,
"equipmentQuantity": 123,
"equipmentCost": 123,
"prLineItemIds": [
123
],
"warrantyAssetId": 123,
"glCode": "<string>"
}
]
'import requests
url = "https://api.useopenwrench.com/api/external/v1/supplier/inventory/purchase_order_line_items/bulk"
payload = [
{
"supplierPurchaseOrderId": 123,
"isEquipmentLine": True,
"partUomId": 123,
"partCurrencyId": "<string>",
"equipmentUomId": 123,
"equipmentCurrencyId": "<string>",
"id": 123,
"viaStockLocationId": 123,
"partId": 123,
"partCatalogId": 123,
"partQuantity": 123,
"partCost": 123,
"equipmentTypeId": 123,
"equipmentCatalogId": 123,
"equipmentQuantity": 123,
"equipmentCost": 123,
"prLineItemIds": [123],
"warrantyAssetId": 123,
"glCode": "<string>"
}
]
headers = {
"X-API-KEY": "<api-key>",
"OW-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-KEY': '<api-key>',
'OW-KEY': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify([
{
supplierPurchaseOrderId: 123,
isEquipmentLine: true,
partUomId: 123,
partCurrencyId: '<string>',
equipmentUomId: 123,
equipmentCurrencyId: '<string>',
id: 123,
viaStockLocationId: 123,
partId: 123,
partCatalogId: 123,
partQuantity: 123,
partCost: 123,
equipmentTypeId: 123,
equipmentCatalogId: 123,
equipmentQuantity: 123,
equipmentCost: 123,
prLineItemIds: [123],
warrantyAssetId: 123,
glCode: '<string>'
}
])
};
fetch('https://api.useopenwrench.com/api/external/v1/supplier/inventory/purchase_order_line_items/bulk', 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://api.useopenwrench.com/api/external/v1/supplier/inventory/purchase_order_line_items/bulk",
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([
[
'supplierPurchaseOrderId' => 123,
'isEquipmentLine' => true,
'partUomId' => 123,
'partCurrencyId' => '<string>',
'equipmentUomId' => 123,
'equipmentCurrencyId' => '<string>',
'id' => 123,
'viaStockLocationId' => 123,
'partId' => 123,
'partCatalogId' => 123,
'partQuantity' => 123,
'partCost' => 123,
'equipmentTypeId' => 123,
'equipmentCatalogId' => 123,
'equipmentQuantity' => 123,
'equipmentCost' => 123,
'prLineItemIds' => [
123
],
'warrantyAssetId' => 123,
'glCode' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"OW-KEY: <api-key>",
"X-API-KEY: <api-key>"
],
]);
$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://api.useopenwrench.com/api/external/v1/supplier/inventory/purchase_order_line_items/bulk"
payload := strings.NewReader("[\n {\n \"supplierPurchaseOrderId\": 123,\n \"isEquipmentLine\": true,\n \"partUomId\": 123,\n \"partCurrencyId\": \"<string>\",\n \"equipmentUomId\": 123,\n \"equipmentCurrencyId\": \"<string>\",\n \"id\": 123,\n \"viaStockLocationId\": 123,\n \"partId\": 123,\n \"partCatalogId\": 123,\n \"partQuantity\": 123,\n \"partCost\": 123,\n \"equipmentTypeId\": 123,\n \"equipmentCatalogId\": 123,\n \"equipmentQuantity\": 123,\n \"equipmentCost\": 123,\n \"prLineItemIds\": [\n 123\n ],\n \"warrantyAssetId\": 123,\n \"glCode\": \"<string>\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("OW-KEY", "<api-key>")
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://api.useopenwrench.com/api/external/v1/supplier/inventory/purchase_order_line_items/bulk")
.header("X-API-KEY", "<api-key>")
.header("OW-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"supplierPurchaseOrderId\": 123,\n \"isEquipmentLine\": true,\n \"partUomId\": 123,\n \"partCurrencyId\": \"<string>\",\n \"equipmentUomId\": 123,\n \"equipmentCurrencyId\": \"<string>\",\n \"id\": 123,\n \"viaStockLocationId\": 123,\n \"partId\": 123,\n \"partCatalogId\": 123,\n \"partQuantity\": 123,\n \"partCost\": 123,\n \"equipmentTypeId\": 123,\n \"equipmentCatalogId\": 123,\n \"equipmentQuantity\": 123,\n \"equipmentCost\": 123,\n \"prLineItemIds\": [\n 123\n ],\n \"warrantyAssetId\": 123,\n \"glCode\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useopenwrench.com/api/external/v1/supplier/inventory/purchase_order_line_items/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["OW-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"supplierPurchaseOrderId\": 123,\n \"isEquipmentLine\": true,\n \"partUomId\": 123,\n \"partCurrencyId\": \"<string>\",\n \"equipmentUomId\": 123,\n \"equipmentCurrencyId\": \"<string>\",\n \"id\": 123,\n \"viaStockLocationId\": 123,\n \"partId\": 123,\n \"partCatalogId\": 123,\n \"partQuantity\": 123,\n \"partCost\": 123,\n \"equipmentTypeId\": 123,\n \"equipmentCatalogId\": 123,\n \"equipmentQuantity\": 123,\n \"equipmentCost\": 123,\n \"prLineItemIds\": [\n 123\n ],\n \"warrantyAssetId\": 123,\n \"glCode\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"data": [
{
"supplierPurchaseOrderId": 123,
"isEquipmentLine": true,
"partUomId": 123,
"partCurrencyId": "<string>",
"equipmentUomId": 123,
"equipmentCurrencyId": "<string>",
"supplierFacilityId": 123,
"supplierCompanyId": 123,
"isDeleted": true,
"id": 123,
"status": "new",
"stockLocationId": 123,
"locationId": 123,
"viaStockLocationId": 123,
"partId": 123,
"part": {
"name": "<string>",
"uomId": 123,
"isActive": true,
"isStocked": true,
"supplierCompanyId": 123,
"isDeleted": true,
"id": 123,
"partUUID": "<string>",
"manufacturerId": "<string>",
"manufacturerName": "<string>",
"partNumber": "<string>",
"aliasPartId": "<string>",
"images": [
"<string>"
],
"description": "<string>",
"cost": 123,
"defaultVendorId": 123,
"defaultVendor": {
"name": "<string>",
"currencyId": "<string>",
"isActive": true,
"supplierFacilityId": 123,
"isDeleted": true,
"id": 123,
"vendorId": "<string>",
"address": {},
"email": "<string>",
"logoUrl": "<string>",
"phoneNumber": "<string>",
"paymentTerms": "<string>",
"shippingTerms": "<string>",
"orderingEmails": [
"<string>"
],
"accountManagerEmails": [
"<string>"
],
"accountManagerContacts": [
{
"email": "<string>",
"name": "<string>",
"vendorId": 123,
"supplierFacilityId": 123,
"phoneNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"salesRepEmails": [
"<string>"
],
"salesRepContacts": [
{
"email": "<string>",
"name": "<string>",
"vendorId": 123,
"supplierFacilityId": 123,
"phoneNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"accountsPayableEmails": [
"<string>"
],
"accountsPayableContacts": [
{
"email": "<string>",
"name": "<string>",
"vendorId": 123,
"supplierFacilityId": 123,
"phoneNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"defaultWarrantyMonths": 123,
"notes": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"defaultPartCatalogId": 123,
"assetTypeId": 123,
"assetModelId": 123,
"glCode": "<string>",
"partEquipmentVendorCount": 123,
"labelIds": [
123
],
"labels": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"partCatalogId": 123,
"partQuantity": 123,
"partCost": 123,
"partReceivedQuantity": 123,
"partReceivedAverageCost": 123,
"equipmentTypeId": 123,
"equipmentType": {
"modelName": "<string>",
"isActive": true,
"supplierFacilityId": 123,
"supplierCompanyId": 123,
"isDeleted": true,
"id": 123,
"equipmentTypeNumber": "<string>",
"aliasEquipmentTypeNumber": "<string>",
"manufacturerId": "<string>",
"manufacturerName": "<string>",
"images": [
"<string>"
],
"description": "<string>",
"cost": 123,
"defaultVendorId": 123,
"defaultVendor": {
"name": "<string>",
"currencyId": "<string>",
"isActive": true,
"supplierFacilityId": 123,
"isDeleted": true,
"id": 123,
"vendorId": "<string>",
"address": {},
"email": "<string>",
"logoUrl": "<string>",
"phoneNumber": "<string>",
"paymentTerms": "<string>",
"shippingTerms": "<string>",
"orderingEmails": [
"<string>"
],
"accountManagerEmails": [
"<string>"
],
"accountManagerContacts": [
{
"email": "<string>",
"name": "<string>",
"vendorId": 123,
"supplierFacilityId": 123,
"phoneNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"salesRepEmails": [
"<string>"
],
"salesRepContacts": [
{
"email": "<string>",
"name": "<string>",
"vendorId": 123,
"supplierFacilityId": 123,
"phoneNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"accountsPayableEmails": [
"<string>"
],
"accountsPayableContacts": [
{
"email": "<string>",
"name": "<string>",
"vendorId": 123,
"supplierFacilityId": 123,
"phoneNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"defaultWarrantyMonths": 123,
"notes": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"defaultEquipmentCatalogId": 123,
"assetTypeId": 123,
"assetType": {
"name": "<string>",
"usesRefrigerant": true,
"buyerCompanyId": 123,
"isDeleted": true,
"id": 123,
"primarySpendCategory": 123,
"attachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"allProblemTypeIds": [
123
],
"allProblemTypeIdsAsString": "<string>",
"allProblemTypes": [
{
"id": 123,
"name": "<string>",
"buyerCompanyId": 123,
"hasChildren": true
}
],
"allProblemTypesName": "<string>",
"allSpendCategories": [
123
],
"depreciationClassId": 123,
"depreciationClassName": "<string>",
"requiredFields": [
{}
],
"optionalFields": [
{}
],
"replaceMarkupOnOriginalCost": 123,
"replacementThreshold": 123,
"applianceCategory": "<string>",
"refrigerantTypeCode": "<string>",
"fullChargeLb": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"glCode": "<string>",
"partEquipmentVendorCount": 123,
"isAssociatedWithOtherEntities": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"equipmentCatalogId": 123,
"equipmentQuantity": 123,
"equipmentCost": 123,
"equipmentReceivedQuantity": 123,
"equipmentReceivedAverageCost": 123,
"prLineItemIds": [
123
],
"warrantyAssetId": 123,
"glCode": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
],
"count": 123,
"status": "ok"
}{
"message": "<string>",
"type": "<string>",
"status": "error",
"traceId": "<string>"
}{
"message": "<string>",
"type": "<string>",
"status": "error",
"traceId": "<string>"
}{
"message": "<string>",
"type": "<string>",
"status": "error",
"traceId": "<string>"
}Autorizaciones
OpenWrench shared secret. Required on every request alongside X-API-KEY; issued together with your API key.
Cuerpo
REQUIRED. Purchase order the line item belongs to; its stockLocationId/locationId are inherited
REQUIRED
REQUIRED (unit-of-measure id for the part half; pass even for equipment lines)
REQUIRED
REQUIRED
REQUIRED
Existing line item id; its current status is preserved (new items start as 'new')
partCost or equipmentCost is required unless the supplier company's inventory settings mark PO cost as not mandatory
Respuesta
Successful response
Entity type label, e.g. "SupplierPurchaseOrderLineItem". Endpoints that derive it via Scala reflection (most generic list/get endpoints) may return the fully qualified server class name instead (e.g. "models.workorder.WorkOrder"); treat this field as informational.
Show child attributes
Show child attributes
Total number of matching records (across all pages)
"ok" on success
ok