curl --request POST \
--url https://api.useopenwrench.com/api/external/v1/buyer/asset/assets \
--header 'Content-Type: application/json' \
--header 'OW-KEY: <api-key>' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"name": "<string>",
"assetTypeId": 123,
"locationId": 123,
"isActive": true,
"isLeased": true,
"id": 123,
"assetUUID": "<string>",
"assetNumber": "<string>",
"description": "<string>",
"images": [
"<string>"
],
"attachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"qrCodeImages": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"serialNumberImages": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"manufacturer": "<string>",
"upcNumber": "<string>",
"modelNumber": "<string>",
"serialNumber": "<string>",
"assetModelId": 123,
"assetTypeDetails": [
{
"key": "<string>",
"valueAsString": "<string>",
"valueType": "<string>"
}
],
"areaId": 123,
"brand": "<string>",
"installDate": "2023-11-07T05:31:56Z",
"purchaseDate": "2023-11-07T05:31:56Z",
"leaseStartDate": "2023-11-07T05:31:56Z",
"leaseEndDate": "2023-11-07T05:31:56Z",
"warrantyIds": [
123
],
"partWarrantyId": 123,
"lifeExpectancyInMonths": 123,
"originalPrice": 123,
"capitalisedCost": 123,
"isReplacementEquipment": true,
"replacementEquipmentTypeId": 123,
"lastTaggedAt": "2023-11-07T05:31:56Z",
"assetTags": [
"<string>"
],
"parentId": 123,
"checkInNotes": {
"imageRequired": true,
"notes": [
"<string>"
]
},
"checkOutNotes": {
"imageRequired": true,
"notes": [
"<string>"
]
},
"availabilityStatus": "<string>",
"downtimeStatus": "<string>",
"additionalAssetDetails": {
"energyEfficiencyDetails": "<string>",
"capacityDetails": "<string>",
"hasLeakDetector": true,
"usesRefrigerant": true,
"refrigerantDetails": "<string>"
},
"partsVendorId": 123,
"vendorId": 123,
"externalSpend": 123,
"userOverrideReplacementRecommendation": "<string>",
"userOverrideReplacementRecommendationNotes": "<string>",
"isRefrigerantTracked": true,
"refrigerantTypeCode": "<string>",
"fullChargeLb": 123,
"applianceCategory": "<string>",
"refrigerantRequiresProcessShutdown": true
}
'import requests
url = "https://api.useopenwrench.com/api/external/v1/buyer/asset/assets"
payload = {
"name": "<string>",
"assetTypeId": 123,
"locationId": 123,
"isActive": True,
"isLeased": True,
"id": 123,
"assetUUID": "<string>",
"assetNumber": "<string>",
"description": "<string>",
"images": ["<string>"],
"attachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"qrCodeImages": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"serialNumberImages": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"manufacturer": "<string>",
"upcNumber": "<string>",
"modelNumber": "<string>",
"serialNumber": "<string>",
"assetModelId": 123,
"assetTypeDetails": [
{
"key": "<string>",
"valueAsString": "<string>",
"valueType": "<string>"
}
],
"areaId": 123,
"brand": "<string>",
"installDate": "2023-11-07T05:31:56Z",
"purchaseDate": "2023-11-07T05:31:56Z",
"leaseStartDate": "2023-11-07T05:31:56Z",
"leaseEndDate": "2023-11-07T05:31:56Z",
"warrantyIds": [123],
"partWarrantyId": 123,
"lifeExpectancyInMonths": 123,
"originalPrice": 123,
"capitalisedCost": 123,
"isReplacementEquipment": True,
"replacementEquipmentTypeId": 123,
"lastTaggedAt": "2023-11-07T05:31:56Z",
"assetTags": ["<string>"],
"parentId": 123,
"checkInNotes": {
"imageRequired": True,
"notes": ["<string>"]
},
"checkOutNotes": {
"imageRequired": True,
"notes": ["<string>"]
},
"availabilityStatus": "<string>",
"downtimeStatus": "<string>",
"additionalAssetDetails": {
"energyEfficiencyDetails": "<string>",
"capacityDetails": "<string>",
"hasLeakDetector": True,
"usesRefrigerant": True,
"refrigerantDetails": "<string>"
},
"partsVendorId": 123,
"vendorId": 123,
"externalSpend": 123,
"userOverrideReplacementRecommendation": "<string>",
"userOverrideReplacementRecommendationNotes": "<string>",
"isRefrigerantTracked": True,
"refrigerantTypeCode": "<string>",
"fullChargeLb": 123,
"applianceCategory": "<string>",
"refrigerantRequiresProcessShutdown": True
}
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({
name: '<string>',
assetTypeId: 123,
locationId: 123,
isActive: true,
isLeased: true,
id: 123,
assetUUID: '<string>',
assetNumber: '<string>',
description: '<string>',
images: ['<string>'],
attachments: [{fileName: '<string>', fileId: '<string>'}],
qrCodeImages: [{fileName: '<string>', fileId: '<string>'}],
serialNumberImages: [{fileName: '<string>', fileId: '<string>'}],
manufacturer: '<string>',
upcNumber: '<string>',
modelNumber: '<string>',
serialNumber: '<string>',
assetModelId: 123,
assetTypeDetails: [{key: '<string>', valueAsString: '<string>', valueType: '<string>'}],
areaId: 123,
brand: '<string>',
installDate: '2023-11-07T05:31:56Z',
purchaseDate: '2023-11-07T05:31:56Z',
leaseStartDate: '2023-11-07T05:31:56Z',
leaseEndDate: '2023-11-07T05:31:56Z',
warrantyIds: [123],
partWarrantyId: 123,
lifeExpectancyInMonths: 123,
originalPrice: 123,
capitalisedCost: 123,
isReplacementEquipment: true,
replacementEquipmentTypeId: 123,
lastTaggedAt: '2023-11-07T05:31:56Z',
assetTags: ['<string>'],
parentId: 123,
checkInNotes: {imageRequired: true, notes: ['<string>']},
checkOutNotes: {imageRequired: true, notes: ['<string>']},
availabilityStatus: '<string>',
downtimeStatus: '<string>',
additionalAssetDetails: {
energyEfficiencyDetails: '<string>',
capacityDetails: '<string>',
hasLeakDetector: true,
usesRefrigerant: true,
refrigerantDetails: '<string>'
},
partsVendorId: 123,
vendorId: 123,
externalSpend: 123,
userOverrideReplacementRecommendation: '<string>',
userOverrideReplacementRecommendationNotes: '<string>',
isRefrigerantTracked: true,
refrigerantTypeCode: '<string>',
fullChargeLb: 123,
applianceCategory: '<string>',
refrigerantRequiresProcessShutdown: true
})
};
fetch('https://api.useopenwrench.com/api/external/v1/buyer/asset/assets', 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/buyer/asset/assets",
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([
'name' => '<string>',
'assetTypeId' => 123,
'locationId' => 123,
'isActive' => true,
'isLeased' => true,
'id' => 123,
'assetUUID' => '<string>',
'assetNumber' => '<string>',
'description' => '<string>',
'images' => [
'<string>'
],
'attachments' => [
[
'fileName' => '<string>',
'fileId' => '<string>'
]
],
'qrCodeImages' => [
[
'fileName' => '<string>',
'fileId' => '<string>'
]
],
'serialNumberImages' => [
[
'fileName' => '<string>',
'fileId' => '<string>'
]
],
'manufacturer' => '<string>',
'upcNumber' => '<string>',
'modelNumber' => '<string>',
'serialNumber' => '<string>',
'assetModelId' => 123,
'assetTypeDetails' => [
[
'key' => '<string>',
'valueAsString' => '<string>',
'valueType' => '<string>'
]
],
'areaId' => 123,
'brand' => '<string>',
'installDate' => '2023-11-07T05:31:56Z',
'purchaseDate' => '2023-11-07T05:31:56Z',
'leaseStartDate' => '2023-11-07T05:31:56Z',
'leaseEndDate' => '2023-11-07T05:31:56Z',
'warrantyIds' => [
123
],
'partWarrantyId' => 123,
'lifeExpectancyInMonths' => 123,
'originalPrice' => 123,
'capitalisedCost' => 123,
'isReplacementEquipment' => true,
'replacementEquipmentTypeId' => 123,
'lastTaggedAt' => '2023-11-07T05:31:56Z',
'assetTags' => [
'<string>'
],
'parentId' => 123,
'checkInNotes' => [
'imageRequired' => true,
'notes' => [
'<string>'
]
],
'checkOutNotes' => [
'imageRequired' => true,
'notes' => [
'<string>'
]
],
'availabilityStatus' => '<string>',
'downtimeStatus' => '<string>',
'additionalAssetDetails' => [
'energyEfficiencyDetails' => '<string>',
'capacityDetails' => '<string>',
'hasLeakDetector' => true,
'usesRefrigerant' => true,
'refrigerantDetails' => '<string>'
],
'partsVendorId' => 123,
'vendorId' => 123,
'externalSpend' => 123,
'userOverrideReplacementRecommendation' => '<string>',
'userOverrideReplacementRecommendationNotes' => '<string>',
'isRefrigerantTracked' => true,
'refrigerantTypeCode' => '<string>',
'fullChargeLb' => 123,
'applianceCategory' => '<string>',
'refrigerantRequiresProcessShutdown' => true
]),
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/buyer/asset/assets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"assetTypeId\": 123,\n \"locationId\": 123,\n \"isActive\": true,\n \"isLeased\": true,\n \"id\": 123,\n \"assetUUID\": \"<string>\",\n \"assetNumber\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"attachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"qrCodeImages\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"serialNumberImages\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"manufacturer\": \"<string>\",\n \"upcNumber\": \"<string>\",\n \"modelNumber\": \"<string>\",\n \"serialNumber\": \"<string>\",\n \"assetModelId\": 123,\n \"assetTypeDetails\": [\n {\n \"key\": \"<string>\",\n \"valueAsString\": \"<string>\",\n \"valueType\": \"<string>\"\n }\n ],\n \"areaId\": 123,\n \"brand\": \"<string>\",\n \"installDate\": \"2023-11-07T05:31:56Z\",\n \"purchaseDate\": \"2023-11-07T05:31:56Z\",\n \"leaseStartDate\": \"2023-11-07T05:31:56Z\",\n \"leaseEndDate\": \"2023-11-07T05:31:56Z\",\n \"warrantyIds\": [\n 123\n ],\n \"partWarrantyId\": 123,\n \"lifeExpectancyInMonths\": 123,\n \"originalPrice\": 123,\n \"capitalisedCost\": 123,\n \"isReplacementEquipment\": true,\n \"replacementEquipmentTypeId\": 123,\n \"lastTaggedAt\": \"2023-11-07T05:31:56Z\",\n \"assetTags\": [\n \"<string>\"\n ],\n \"parentId\": 123,\n \"checkInNotes\": {\n \"imageRequired\": true,\n \"notes\": [\n \"<string>\"\n ]\n },\n \"checkOutNotes\": {\n \"imageRequired\": true,\n \"notes\": [\n \"<string>\"\n ]\n },\n \"availabilityStatus\": \"<string>\",\n \"downtimeStatus\": \"<string>\",\n \"additionalAssetDetails\": {\n \"energyEfficiencyDetails\": \"<string>\",\n \"capacityDetails\": \"<string>\",\n \"hasLeakDetector\": true,\n \"usesRefrigerant\": true,\n \"refrigerantDetails\": \"<string>\"\n },\n \"partsVendorId\": 123,\n \"vendorId\": 123,\n \"externalSpend\": 123,\n \"userOverrideReplacementRecommendation\": \"<string>\",\n \"userOverrideReplacementRecommendationNotes\": \"<string>\",\n \"isRefrigerantTracked\": true,\n \"refrigerantTypeCode\": \"<string>\",\n \"fullChargeLb\": 123,\n \"applianceCategory\": \"<string>\",\n \"refrigerantRequiresProcessShutdown\": true\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/buyer/asset/assets")
.header("X-API-KEY", "<api-key>")
.header("OW-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"assetTypeId\": 123,\n \"locationId\": 123,\n \"isActive\": true,\n \"isLeased\": true,\n \"id\": 123,\n \"assetUUID\": \"<string>\",\n \"assetNumber\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"attachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"qrCodeImages\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"serialNumberImages\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"manufacturer\": \"<string>\",\n \"upcNumber\": \"<string>\",\n \"modelNumber\": \"<string>\",\n \"serialNumber\": \"<string>\",\n \"assetModelId\": 123,\n \"assetTypeDetails\": [\n {\n \"key\": \"<string>\",\n \"valueAsString\": \"<string>\",\n \"valueType\": \"<string>\"\n }\n ],\n \"areaId\": 123,\n \"brand\": \"<string>\",\n \"installDate\": \"2023-11-07T05:31:56Z\",\n \"purchaseDate\": \"2023-11-07T05:31:56Z\",\n \"leaseStartDate\": \"2023-11-07T05:31:56Z\",\n \"leaseEndDate\": \"2023-11-07T05:31:56Z\",\n \"warrantyIds\": [\n 123\n ],\n \"partWarrantyId\": 123,\n \"lifeExpectancyInMonths\": 123,\n \"originalPrice\": 123,\n \"capitalisedCost\": 123,\n \"isReplacementEquipment\": true,\n \"replacementEquipmentTypeId\": 123,\n \"lastTaggedAt\": \"2023-11-07T05:31:56Z\",\n \"assetTags\": [\n \"<string>\"\n ],\n \"parentId\": 123,\n \"checkInNotes\": {\n \"imageRequired\": true,\n \"notes\": [\n \"<string>\"\n ]\n },\n \"checkOutNotes\": {\n \"imageRequired\": true,\n \"notes\": [\n \"<string>\"\n ]\n },\n \"availabilityStatus\": \"<string>\",\n \"downtimeStatus\": \"<string>\",\n \"additionalAssetDetails\": {\n \"energyEfficiencyDetails\": \"<string>\",\n \"capacityDetails\": \"<string>\",\n \"hasLeakDetector\": true,\n \"usesRefrigerant\": true,\n \"refrigerantDetails\": \"<string>\"\n },\n \"partsVendorId\": 123,\n \"vendorId\": 123,\n \"externalSpend\": 123,\n \"userOverrideReplacementRecommendation\": \"<string>\",\n \"userOverrideReplacementRecommendationNotes\": \"<string>\",\n \"isRefrigerantTracked\": true,\n \"refrigerantTypeCode\": \"<string>\",\n \"fullChargeLb\": 123,\n \"applianceCategory\": \"<string>\",\n \"refrigerantRequiresProcessShutdown\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useopenwrench.com/api/external/v1/buyer/asset/assets")
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 \"name\": \"<string>\",\n \"assetTypeId\": 123,\n \"locationId\": 123,\n \"isActive\": true,\n \"isLeased\": true,\n \"id\": 123,\n \"assetUUID\": \"<string>\",\n \"assetNumber\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"attachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"qrCodeImages\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"serialNumberImages\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"manufacturer\": \"<string>\",\n \"upcNumber\": \"<string>\",\n \"modelNumber\": \"<string>\",\n \"serialNumber\": \"<string>\",\n \"assetModelId\": 123,\n \"assetTypeDetails\": [\n {\n \"key\": \"<string>\",\n \"valueAsString\": \"<string>\",\n \"valueType\": \"<string>\"\n }\n ],\n \"areaId\": 123,\n \"brand\": \"<string>\",\n \"installDate\": \"2023-11-07T05:31:56Z\",\n \"purchaseDate\": \"2023-11-07T05:31:56Z\",\n \"leaseStartDate\": \"2023-11-07T05:31:56Z\",\n \"leaseEndDate\": \"2023-11-07T05:31:56Z\",\n \"warrantyIds\": [\n 123\n ],\n \"partWarrantyId\": 123,\n \"lifeExpectancyInMonths\": 123,\n \"originalPrice\": 123,\n \"capitalisedCost\": 123,\n \"isReplacementEquipment\": true,\n \"replacementEquipmentTypeId\": 123,\n \"lastTaggedAt\": \"2023-11-07T05:31:56Z\",\n \"assetTags\": [\n \"<string>\"\n ],\n \"parentId\": 123,\n \"checkInNotes\": {\n \"imageRequired\": true,\n \"notes\": [\n \"<string>\"\n ]\n },\n \"checkOutNotes\": {\n \"imageRequired\": true,\n \"notes\": [\n \"<string>\"\n ]\n },\n \"availabilityStatus\": \"<string>\",\n \"downtimeStatus\": \"<string>\",\n \"additionalAssetDetails\": {\n \"energyEfficiencyDetails\": \"<string>\",\n \"capacityDetails\": \"<string>\",\n \"hasLeakDetector\": true,\n \"usesRefrigerant\": true,\n \"refrigerantDetails\": \"<string>\"\n },\n \"partsVendorId\": 123,\n \"vendorId\": 123,\n \"externalSpend\": 123,\n \"userOverrideReplacementRecommendation\": \"<string>\",\n \"userOverrideReplacementRecommendationNotes\": \"<string>\",\n \"isRefrigerantTracked\": true,\n \"refrigerantTypeCode\": \"<string>\",\n \"fullChargeLb\": 123,\n \"applianceCategory\": \"<string>\",\n \"refrigerantRequiresProcessShutdown\": true\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"data": {
"isUserAssignedUUID": true,
"name": "<string>",
"assetTypeId": 123,
"locationId": 123,
"isActive": true,
"isLeased": true,
"isRefrigerantTracked": true,
"buyerFacilityId": 123,
"buyerCompanyId": 123,
"isDeleted": true,
"id": 123,
"buyerSpecificAssetId": "<string>",
"assetUUID": "<string>",
"assetNumber": "<string>",
"description": "<string>",
"images": [
"<string>"
],
"attachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"manufacturer": "<string>",
"upcNumber": "<string>",
"modelNumber": "<string>",
"serialNumber": "<string>",
"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>"
}
],
"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"
},
"assetModelId": 123,
"assetModel": {
"modelName": "<string>",
"assetTypeId": 123,
"buyerCompanyId": 123,
"isDeleted": true,
"id": 123,
"manuals": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"specs": [
{
"key": "<string>",
"value": "<string>"
}
],
"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>"
}
],
"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"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"assetTypeDetails": [
{
"key": "<string>",
"valueAsString": "<string>",
"valueType": "<string>"
}
],
"location": {
"name": "<string>",
"isActive": true,
"locationTypeId": 123,
"buyerFacilityId": 123,
"buyerCompanyId": 123,
"isDeleted": true,
"id": 123,
"storeId": "<string>",
"brandId": 123,
"brandAssetGroupId": 123,
"allAssetCount": 123,
"description": "<string>",
"openDate": "2023-11-07T05:31:56Z",
"closeDate": "2023-11-07T05:31:56Z",
"operatingHours": {
"timeZoneId": "<string>",
"timeZoneName": "<string>",
"Monday": {},
"Tuesday": {},
"Wednesday": {},
"Thursday": {},
"Friday": {},
"Saturday": {},
"Sunday": {}
},
"phoneNumber": "<string>",
"locationTypeDetails": [
{
"key": "<string>",
"valueAsString": "<string>",
"valueType": "<string>"
}
],
"notes": "<string>",
"notesNonFormatted": "<string>",
"internalNotes": "<string>",
"images": [
"<string>"
],
"internalAttachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"primaryContactsEmails": [
"<string>"
],
"facilityInChargeEmails": [
"<string>"
],
"sendApprovedInvoicesToEmails": [
"<string>"
],
"sendApprovedQuotesToEmails": [
"<string>"
],
"storeAssociateEmails": [
"<string>"
],
"fieldTechEmails": [
"<string>"
],
"timeZoneId": "<string>",
"hasPresetAssetUUID": true,
"regionId": 123,
"region": {
"name": "<string>",
"buyerCompanyId": 123,
"hasChildren": true,
"isDeleted": true,
"id": 123,
"hierarchyName": "<string>",
"parentId": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"purchaseOrderPrefix": "<string>",
"isLeased": true,
"leaseStartDate": "2023-11-07T05:31:56Z",
"leaseEndDate": "2023-11-07T05:31:56Z",
"taxRate": "<string>",
"customFieldDetails": [
{
"key": "<string>",
"valueAsString": "<string>",
"valueType": "<string>"
}
],
"buildingWarrantyStartDate": "2023-11-07T05:31:56Z",
"buildingWarrantyExpirationDate": "2023-11-07T05:31:56Z",
"buildingWarrantyProblemTypeIds": [
123
],
"buildingWarrantyServiceProviderId": 123,
"invoicesBillTo": {
"billTo": "<string>",
"serviceAddress": {}
},
"countryCode": "<string>",
"totalWOCount": 123,
"totalNotClosedWOCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"areaId": 123,
"brand": "<string>",
"installDate": "2023-11-07T05:31:56Z",
"purchaseDate": "2023-11-07T05:31:56Z",
"leaseStartDate": "2023-11-07T05:31:56Z",
"leaseEndDate": "2023-11-07T05:31:56Z",
"warrantyIds": [
123
],
"lifeExpectancyInMonths": 123,
"originalPrice": 123,
"capitalisedCost": 123,
"assetTags": [
"<string>"
],
"parentId": 123,
"availabilityStatus": "<string>",
"downtimeStatus": "online",
"additionalAssetDetails": {
"energyEfficiencyDetails": "<string>",
"capacityDetails": "<string>",
"hasLeakDetector": true,
"usesRefrigerant": true,
"refrigerantDetails": "<string>"
},
"daysInUse": 123,
"refrigerantTypeCode": "<string>",
"fullChargeLb": 123,
"applianceCategory": "<string>",
"subAssetCount": 123,
"totalWOCount": 123,
"totalNotClosedWOCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"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>"
}Create an asset
Creates an asset. buyerFacilityId/buyerCompanyId are derived from the location (never from the body). refrigerantTypeCode, fullChargeLb, applianceCategory and refrigerantRequiresProcessShutdown are CLEARABLE per-unit overrides of the asset type’s defaults: omitting the key keeps the stored value, an explicit null (or blank string) clears it back to inheriting from the type. fullChargeLb must be positive; applianceCategory and refrigerantTypeCode are validated. A parentId requires sub-assets enabled for the company and the same location as the parent.
curl --request POST \
--url https://api.useopenwrench.com/api/external/v1/buyer/asset/assets \
--header 'Content-Type: application/json' \
--header 'OW-KEY: <api-key>' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"name": "<string>",
"assetTypeId": 123,
"locationId": 123,
"isActive": true,
"isLeased": true,
"id": 123,
"assetUUID": "<string>",
"assetNumber": "<string>",
"description": "<string>",
"images": [
"<string>"
],
"attachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"qrCodeImages": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"serialNumberImages": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"manufacturer": "<string>",
"upcNumber": "<string>",
"modelNumber": "<string>",
"serialNumber": "<string>",
"assetModelId": 123,
"assetTypeDetails": [
{
"key": "<string>",
"valueAsString": "<string>",
"valueType": "<string>"
}
],
"areaId": 123,
"brand": "<string>",
"installDate": "2023-11-07T05:31:56Z",
"purchaseDate": "2023-11-07T05:31:56Z",
"leaseStartDate": "2023-11-07T05:31:56Z",
"leaseEndDate": "2023-11-07T05:31:56Z",
"warrantyIds": [
123
],
"partWarrantyId": 123,
"lifeExpectancyInMonths": 123,
"originalPrice": 123,
"capitalisedCost": 123,
"isReplacementEquipment": true,
"replacementEquipmentTypeId": 123,
"lastTaggedAt": "2023-11-07T05:31:56Z",
"assetTags": [
"<string>"
],
"parentId": 123,
"checkInNotes": {
"imageRequired": true,
"notes": [
"<string>"
]
},
"checkOutNotes": {
"imageRequired": true,
"notes": [
"<string>"
]
},
"availabilityStatus": "<string>",
"downtimeStatus": "<string>",
"additionalAssetDetails": {
"energyEfficiencyDetails": "<string>",
"capacityDetails": "<string>",
"hasLeakDetector": true,
"usesRefrigerant": true,
"refrigerantDetails": "<string>"
},
"partsVendorId": 123,
"vendorId": 123,
"externalSpend": 123,
"userOverrideReplacementRecommendation": "<string>",
"userOverrideReplacementRecommendationNotes": "<string>",
"isRefrigerantTracked": true,
"refrigerantTypeCode": "<string>",
"fullChargeLb": 123,
"applianceCategory": "<string>",
"refrigerantRequiresProcessShutdown": true
}
'import requests
url = "https://api.useopenwrench.com/api/external/v1/buyer/asset/assets"
payload = {
"name": "<string>",
"assetTypeId": 123,
"locationId": 123,
"isActive": True,
"isLeased": True,
"id": 123,
"assetUUID": "<string>",
"assetNumber": "<string>",
"description": "<string>",
"images": ["<string>"],
"attachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"qrCodeImages": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"serialNumberImages": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"manufacturer": "<string>",
"upcNumber": "<string>",
"modelNumber": "<string>",
"serialNumber": "<string>",
"assetModelId": 123,
"assetTypeDetails": [
{
"key": "<string>",
"valueAsString": "<string>",
"valueType": "<string>"
}
],
"areaId": 123,
"brand": "<string>",
"installDate": "2023-11-07T05:31:56Z",
"purchaseDate": "2023-11-07T05:31:56Z",
"leaseStartDate": "2023-11-07T05:31:56Z",
"leaseEndDate": "2023-11-07T05:31:56Z",
"warrantyIds": [123],
"partWarrantyId": 123,
"lifeExpectancyInMonths": 123,
"originalPrice": 123,
"capitalisedCost": 123,
"isReplacementEquipment": True,
"replacementEquipmentTypeId": 123,
"lastTaggedAt": "2023-11-07T05:31:56Z",
"assetTags": ["<string>"],
"parentId": 123,
"checkInNotes": {
"imageRequired": True,
"notes": ["<string>"]
},
"checkOutNotes": {
"imageRequired": True,
"notes": ["<string>"]
},
"availabilityStatus": "<string>",
"downtimeStatus": "<string>",
"additionalAssetDetails": {
"energyEfficiencyDetails": "<string>",
"capacityDetails": "<string>",
"hasLeakDetector": True,
"usesRefrigerant": True,
"refrigerantDetails": "<string>"
},
"partsVendorId": 123,
"vendorId": 123,
"externalSpend": 123,
"userOverrideReplacementRecommendation": "<string>",
"userOverrideReplacementRecommendationNotes": "<string>",
"isRefrigerantTracked": True,
"refrigerantTypeCode": "<string>",
"fullChargeLb": 123,
"applianceCategory": "<string>",
"refrigerantRequiresProcessShutdown": True
}
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({
name: '<string>',
assetTypeId: 123,
locationId: 123,
isActive: true,
isLeased: true,
id: 123,
assetUUID: '<string>',
assetNumber: '<string>',
description: '<string>',
images: ['<string>'],
attachments: [{fileName: '<string>', fileId: '<string>'}],
qrCodeImages: [{fileName: '<string>', fileId: '<string>'}],
serialNumberImages: [{fileName: '<string>', fileId: '<string>'}],
manufacturer: '<string>',
upcNumber: '<string>',
modelNumber: '<string>',
serialNumber: '<string>',
assetModelId: 123,
assetTypeDetails: [{key: '<string>', valueAsString: '<string>', valueType: '<string>'}],
areaId: 123,
brand: '<string>',
installDate: '2023-11-07T05:31:56Z',
purchaseDate: '2023-11-07T05:31:56Z',
leaseStartDate: '2023-11-07T05:31:56Z',
leaseEndDate: '2023-11-07T05:31:56Z',
warrantyIds: [123],
partWarrantyId: 123,
lifeExpectancyInMonths: 123,
originalPrice: 123,
capitalisedCost: 123,
isReplacementEquipment: true,
replacementEquipmentTypeId: 123,
lastTaggedAt: '2023-11-07T05:31:56Z',
assetTags: ['<string>'],
parentId: 123,
checkInNotes: {imageRequired: true, notes: ['<string>']},
checkOutNotes: {imageRequired: true, notes: ['<string>']},
availabilityStatus: '<string>',
downtimeStatus: '<string>',
additionalAssetDetails: {
energyEfficiencyDetails: '<string>',
capacityDetails: '<string>',
hasLeakDetector: true,
usesRefrigerant: true,
refrigerantDetails: '<string>'
},
partsVendorId: 123,
vendorId: 123,
externalSpend: 123,
userOverrideReplacementRecommendation: '<string>',
userOverrideReplacementRecommendationNotes: '<string>',
isRefrigerantTracked: true,
refrigerantTypeCode: '<string>',
fullChargeLb: 123,
applianceCategory: '<string>',
refrigerantRequiresProcessShutdown: true
})
};
fetch('https://api.useopenwrench.com/api/external/v1/buyer/asset/assets', 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/buyer/asset/assets",
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([
'name' => '<string>',
'assetTypeId' => 123,
'locationId' => 123,
'isActive' => true,
'isLeased' => true,
'id' => 123,
'assetUUID' => '<string>',
'assetNumber' => '<string>',
'description' => '<string>',
'images' => [
'<string>'
],
'attachments' => [
[
'fileName' => '<string>',
'fileId' => '<string>'
]
],
'qrCodeImages' => [
[
'fileName' => '<string>',
'fileId' => '<string>'
]
],
'serialNumberImages' => [
[
'fileName' => '<string>',
'fileId' => '<string>'
]
],
'manufacturer' => '<string>',
'upcNumber' => '<string>',
'modelNumber' => '<string>',
'serialNumber' => '<string>',
'assetModelId' => 123,
'assetTypeDetails' => [
[
'key' => '<string>',
'valueAsString' => '<string>',
'valueType' => '<string>'
]
],
'areaId' => 123,
'brand' => '<string>',
'installDate' => '2023-11-07T05:31:56Z',
'purchaseDate' => '2023-11-07T05:31:56Z',
'leaseStartDate' => '2023-11-07T05:31:56Z',
'leaseEndDate' => '2023-11-07T05:31:56Z',
'warrantyIds' => [
123
],
'partWarrantyId' => 123,
'lifeExpectancyInMonths' => 123,
'originalPrice' => 123,
'capitalisedCost' => 123,
'isReplacementEquipment' => true,
'replacementEquipmentTypeId' => 123,
'lastTaggedAt' => '2023-11-07T05:31:56Z',
'assetTags' => [
'<string>'
],
'parentId' => 123,
'checkInNotes' => [
'imageRequired' => true,
'notes' => [
'<string>'
]
],
'checkOutNotes' => [
'imageRequired' => true,
'notes' => [
'<string>'
]
],
'availabilityStatus' => '<string>',
'downtimeStatus' => '<string>',
'additionalAssetDetails' => [
'energyEfficiencyDetails' => '<string>',
'capacityDetails' => '<string>',
'hasLeakDetector' => true,
'usesRefrigerant' => true,
'refrigerantDetails' => '<string>'
],
'partsVendorId' => 123,
'vendorId' => 123,
'externalSpend' => 123,
'userOverrideReplacementRecommendation' => '<string>',
'userOverrideReplacementRecommendationNotes' => '<string>',
'isRefrigerantTracked' => true,
'refrigerantTypeCode' => '<string>',
'fullChargeLb' => 123,
'applianceCategory' => '<string>',
'refrigerantRequiresProcessShutdown' => true
]),
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/buyer/asset/assets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"assetTypeId\": 123,\n \"locationId\": 123,\n \"isActive\": true,\n \"isLeased\": true,\n \"id\": 123,\n \"assetUUID\": \"<string>\",\n \"assetNumber\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"attachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"qrCodeImages\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"serialNumberImages\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"manufacturer\": \"<string>\",\n \"upcNumber\": \"<string>\",\n \"modelNumber\": \"<string>\",\n \"serialNumber\": \"<string>\",\n \"assetModelId\": 123,\n \"assetTypeDetails\": [\n {\n \"key\": \"<string>\",\n \"valueAsString\": \"<string>\",\n \"valueType\": \"<string>\"\n }\n ],\n \"areaId\": 123,\n \"brand\": \"<string>\",\n \"installDate\": \"2023-11-07T05:31:56Z\",\n \"purchaseDate\": \"2023-11-07T05:31:56Z\",\n \"leaseStartDate\": \"2023-11-07T05:31:56Z\",\n \"leaseEndDate\": \"2023-11-07T05:31:56Z\",\n \"warrantyIds\": [\n 123\n ],\n \"partWarrantyId\": 123,\n \"lifeExpectancyInMonths\": 123,\n \"originalPrice\": 123,\n \"capitalisedCost\": 123,\n \"isReplacementEquipment\": true,\n \"replacementEquipmentTypeId\": 123,\n \"lastTaggedAt\": \"2023-11-07T05:31:56Z\",\n \"assetTags\": [\n \"<string>\"\n ],\n \"parentId\": 123,\n \"checkInNotes\": {\n \"imageRequired\": true,\n \"notes\": [\n \"<string>\"\n ]\n },\n \"checkOutNotes\": {\n \"imageRequired\": true,\n \"notes\": [\n \"<string>\"\n ]\n },\n \"availabilityStatus\": \"<string>\",\n \"downtimeStatus\": \"<string>\",\n \"additionalAssetDetails\": {\n \"energyEfficiencyDetails\": \"<string>\",\n \"capacityDetails\": \"<string>\",\n \"hasLeakDetector\": true,\n \"usesRefrigerant\": true,\n \"refrigerantDetails\": \"<string>\"\n },\n \"partsVendorId\": 123,\n \"vendorId\": 123,\n \"externalSpend\": 123,\n \"userOverrideReplacementRecommendation\": \"<string>\",\n \"userOverrideReplacementRecommendationNotes\": \"<string>\",\n \"isRefrigerantTracked\": true,\n \"refrigerantTypeCode\": \"<string>\",\n \"fullChargeLb\": 123,\n \"applianceCategory\": \"<string>\",\n \"refrigerantRequiresProcessShutdown\": true\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/buyer/asset/assets")
.header("X-API-KEY", "<api-key>")
.header("OW-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"assetTypeId\": 123,\n \"locationId\": 123,\n \"isActive\": true,\n \"isLeased\": true,\n \"id\": 123,\n \"assetUUID\": \"<string>\",\n \"assetNumber\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"attachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"qrCodeImages\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"serialNumberImages\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"manufacturer\": \"<string>\",\n \"upcNumber\": \"<string>\",\n \"modelNumber\": \"<string>\",\n \"serialNumber\": \"<string>\",\n \"assetModelId\": 123,\n \"assetTypeDetails\": [\n {\n \"key\": \"<string>\",\n \"valueAsString\": \"<string>\",\n \"valueType\": \"<string>\"\n }\n ],\n \"areaId\": 123,\n \"brand\": \"<string>\",\n \"installDate\": \"2023-11-07T05:31:56Z\",\n \"purchaseDate\": \"2023-11-07T05:31:56Z\",\n \"leaseStartDate\": \"2023-11-07T05:31:56Z\",\n \"leaseEndDate\": \"2023-11-07T05:31:56Z\",\n \"warrantyIds\": [\n 123\n ],\n \"partWarrantyId\": 123,\n \"lifeExpectancyInMonths\": 123,\n \"originalPrice\": 123,\n \"capitalisedCost\": 123,\n \"isReplacementEquipment\": true,\n \"replacementEquipmentTypeId\": 123,\n \"lastTaggedAt\": \"2023-11-07T05:31:56Z\",\n \"assetTags\": [\n \"<string>\"\n ],\n \"parentId\": 123,\n \"checkInNotes\": {\n \"imageRequired\": true,\n \"notes\": [\n \"<string>\"\n ]\n },\n \"checkOutNotes\": {\n \"imageRequired\": true,\n \"notes\": [\n \"<string>\"\n ]\n },\n \"availabilityStatus\": \"<string>\",\n \"downtimeStatus\": \"<string>\",\n \"additionalAssetDetails\": {\n \"energyEfficiencyDetails\": \"<string>\",\n \"capacityDetails\": \"<string>\",\n \"hasLeakDetector\": true,\n \"usesRefrigerant\": true,\n \"refrigerantDetails\": \"<string>\"\n },\n \"partsVendorId\": 123,\n \"vendorId\": 123,\n \"externalSpend\": 123,\n \"userOverrideReplacementRecommendation\": \"<string>\",\n \"userOverrideReplacementRecommendationNotes\": \"<string>\",\n \"isRefrigerantTracked\": true,\n \"refrigerantTypeCode\": \"<string>\",\n \"fullChargeLb\": 123,\n \"applianceCategory\": \"<string>\",\n \"refrigerantRequiresProcessShutdown\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useopenwrench.com/api/external/v1/buyer/asset/assets")
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 \"name\": \"<string>\",\n \"assetTypeId\": 123,\n \"locationId\": 123,\n \"isActive\": true,\n \"isLeased\": true,\n \"id\": 123,\n \"assetUUID\": \"<string>\",\n \"assetNumber\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"attachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"qrCodeImages\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"serialNumberImages\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"manufacturer\": \"<string>\",\n \"upcNumber\": \"<string>\",\n \"modelNumber\": \"<string>\",\n \"serialNumber\": \"<string>\",\n \"assetModelId\": 123,\n \"assetTypeDetails\": [\n {\n \"key\": \"<string>\",\n \"valueAsString\": \"<string>\",\n \"valueType\": \"<string>\"\n }\n ],\n \"areaId\": 123,\n \"brand\": \"<string>\",\n \"installDate\": \"2023-11-07T05:31:56Z\",\n \"purchaseDate\": \"2023-11-07T05:31:56Z\",\n \"leaseStartDate\": \"2023-11-07T05:31:56Z\",\n \"leaseEndDate\": \"2023-11-07T05:31:56Z\",\n \"warrantyIds\": [\n 123\n ],\n \"partWarrantyId\": 123,\n \"lifeExpectancyInMonths\": 123,\n \"originalPrice\": 123,\n \"capitalisedCost\": 123,\n \"isReplacementEquipment\": true,\n \"replacementEquipmentTypeId\": 123,\n \"lastTaggedAt\": \"2023-11-07T05:31:56Z\",\n \"assetTags\": [\n \"<string>\"\n ],\n \"parentId\": 123,\n \"checkInNotes\": {\n \"imageRequired\": true,\n \"notes\": [\n \"<string>\"\n ]\n },\n \"checkOutNotes\": {\n \"imageRequired\": true,\n \"notes\": [\n \"<string>\"\n ]\n },\n \"availabilityStatus\": \"<string>\",\n \"downtimeStatus\": \"<string>\",\n \"additionalAssetDetails\": {\n \"energyEfficiencyDetails\": \"<string>\",\n \"capacityDetails\": \"<string>\",\n \"hasLeakDetector\": true,\n \"usesRefrigerant\": true,\n \"refrigerantDetails\": \"<string>\"\n },\n \"partsVendorId\": 123,\n \"vendorId\": 123,\n \"externalSpend\": 123,\n \"userOverrideReplacementRecommendation\": \"<string>\",\n \"userOverrideReplacementRecommendationNotes\": \"<string>\",\n \"isRefrigerantTracked\": true,\n \"refrigerantTypeCode\": \"<string>\",\n \"fullChargeLb\": 123,\n \"applianceCategory\": \"<string>\",\n \"refrigerantRequiresProcessShutdown\": true\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"data": {
"isUserAssignedUUID": true,
"name": "<string>",
"assetTypeId": 123,
"locationId": 123,
"isActive": true,
"isLeased": true,
"isRefrigerantTracked": true,
"buyerFacilityId": 123,
"buyerCompanyId": 123,
"isDeleted": true,
"id": 123,
"buyerSpecificAssetId": "<string>",
"assetUUID": "<string>",
"assetNumber": "<string>",
"description": "<string>",
"images": [
"<string>"
],
"attachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"manufacturer": "<string>",
"upcNumber": "<string>",
"modelNumber": "<string>",
"serialNumber": "<string>",
"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>"
}
],
"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"
},
"assetModelId": 123,
"assetModel": {
"modelName": "<string>",
"assetTypeId": 123,
"buyerCompanyId": 123,
"isDeleted": true,
"id": 123,
"manuals": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"specs": [
{
"key": "<string>",
"value": "<string>"
}
],
"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>"
}
],
"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"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"assetTypeDetails": [
{
"key": "<string>",
"valueAsString": "<string>",
"valueType": "<string>"
}
],
"location": {
"name": "<string>",
"isActive": true,
"locationTypeId": 123,
"buyerFacilityId": 123,
"buyerCompanyId": 123,
"isDeleted": true,
"id": 123,
"storeId": "<string>",
"brandId": 123,
"brandAssetGroupId": 123,
"allAssetCount": 123,
"description": "<string>",
"openDate": "2023-11-07T05:31:56Z",
"closeDate": "2023-11-07T05:31:56Z",
"operatingHours": {
"timeZoneId": "<string>",
"timeZoneName": "<string>",
"Monday": {},
"Tuesday": {},
"Wednesday": {},
"Thursday": {},
"Friday": {},
"Saturday": {},
"Sunday": {}
},
"phoneNumber": "<string>",
"locationTypeDetails": [
{
"key": "<string>",
"valueAsString": "<string>",
"valueType": "<string>"
}
],
"notes": "<string>",
"notesNonFormatted": "<string>",
"internalNotes": "<string>",
"images": [
"<string>"
],
"internalAttachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"primaryContactsEmails": [
"<string>"
],
"facilityInChargeEmails": [
"<string>"
],
"sendApprovedInvoicesToEmails": [
"<string>"
],
"sendApprovedQuotesToEmails": [
"<string>"
],
"storeAssociateEmails": [
"<string>"
],
"fieldTechEmails": [
"<string>"
],
"timeZoneId": "<string>",
"hasPresetAssetUUID": true,
"regionId": 123,
"region": {
"name": "<string>",
"buyerCompanyId": 123,
"hasChildren": true,
"isDeleted": true,
"id": 123,
"hierarchyName": "<string>",
"parentId": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"purchaseOrderPrefix": "<string>",
"isLeased": true,
"leaseStartDate": "2023-11-07T05:31:56Z",
"leaseEndDate": "2023-11-07T05:31:56Z",
"taxRate": "<string>",
"customFieldDetails": [
{
"key": "<string>",
"valueAsString": "<string>",
"valueType": "<string>"
}
],
"buildingWarrantyStartDate": "2023-11-07T05:31:56Z",
"buildingWarrantyExpirationDate": "2023-11-07T05:31:56Z",
"buildingWarrantyProblemTypeIds": [
123
],
"buildingWarrantyServiceProviderId": 123,
"invoicesBillTo": {
"billTo": "<string>",
"serviceAddress": {}
},
"countryCode": "<string>",
"totalWOCount": 123,
"totalNotClosedWOCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"areaId": 123,
"brand": "<string>",
"installDate": "2023-11-07T05:31:56Z",
"purchaseDate": "2023-11-07T05:31:56Z",
"leaseStartDate": "2023-11-07T05:31:56Z",
"leaseEndDate": "2023-11-07T05:31:56Z",
"warrantyIds": [
123
],
"lifeExpectancyInMonths": 123,
"originalPrice": 123,
"capitalisedCost": 123,
"assetTags": [
"<string>"
],
"parentId": 123,
"availabilityStatus": "<string>",
"downtimeStatus": "online",
"additionalAssetDetails": {
"energyEfficiencyDetails": "<string>",
"capacityDetails": "<string>",
"hasLeakDetector": true,
"usesRefrigerant": true,
"refrigerantDetails": "<string>"
},
"daysInUse": 123,
"refrigerantTypeCode": "<string>",
"fullChargeLb": 123,
"applianceCategory": "<string>",
"subAssetCount": 123,
"totalWOCount": 123,
"totalNotClosedWOCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"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>"
}Autorisations
OpenWrench shared secret. Required on every request alongside X-API-KEY; issued together with your API key.
Corps
Present only when upserting an existing asset.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Parent asset id (sub-asset). Must not equal the asset's own id.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Defaults to "available".
Defaults to "online".
Show child attributes
Show child attributes
Omitted or null keeps the stored value; enrolment is turned off only by an explicit false.
Réponse
Success.
Entity type marker, e.g. "Asset".
Asset. ABRIDGED: the full case class carries further fields (warranties, depreciation, spend rollups, meters, refrigerant retrofit plan, equipment/purchase-order links, etc.) that may appear in responses.
Show child attributes
Show child attributes
ok