curl --request POST \
--url https://api.useopenwrench.com/api/external/v1/supplier/work_order/work_orders \
--header 'Content-Type: application/json' \
--header 'OW-KEY: <api-key>' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"title": "<string>",
"locationId": 123,
"problemTypeId": 123,
"woPriorityId": 123,
"woNumber": "<string>",
"poNumber": "<string>",
"buyerProjectIds": [
123
],
"isPM": true,
"isCapex": true,
"isStale": true,
"isSupplierInitiated": true,
"isCustomerInitiated": true,
"isWarranty": true,
"status": "<string>",
"description": "<string>",
"assetId": 123,
"subAssetIds": [
123
],
"isAssetDown": true,
"areaId": 123,
"workCategoryId": 123,
"needApproval": true,
"requiresSignature": true,
"approvalRequiredFrom": [
{}
],
"images": [
"<string>"
],
"parts": [
123
],
"skipSupplier": true,
"contractorDetails": {},
"assignmentChanges": [
{}
],
"scheduledAt": "2023-11-07T05:31:56Z",
"estimatedCompletionDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"price": 123,
"currencyId": "<string>",
"terms": "<string>",
"nte": 123,
"nteInLocationCurrency": 123,
"locationCurrencyId": "<string>",
"currencyExchangeRateLocationToSupplier": 123,
"currencyExchangeRateBuyerToLocation": 123,
"statusChanges": [
{}
],
"submittedByName": "<string>",
"hasBuyerArchived": true,
"hasSupplierArchived": true,
"buyerAttachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"supplierAttachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"fromRequestPortal": true,
"fromClientPortal": true,
"forcePendingStatusOnCreateFromPortal": true,
"resolutionTypeId": 123,
"plannedMaintenanceScheduleId": 123,
"taskCompletionMandatory": true,
"isPrivate": true,
"walkThroughId": 123,
"siteSurveyTaskTitleId": "<string>",
"includeWalkthroughTaskList": true,
"supplierPrimaryContactEmail": "<string>"
}
'import requests
url = "https://api.useopenwrench.com/api/external/v1/supplier/work_order/work_orders"
payload = {
"title": "<string>",
"locationId": 123,
"problemTypeId": 123,
"woPriorityId": 123,
"woNumber": "<string>",
"poNumber": "<string>",
"buyerProjectIds": [123],
"isPM": True,
"isCapex": True,
"isStale": True,
"isSupplierInitiated": True,
"isCustomerInitiated": True,
"isWarranty": True,
"status": "<string>",
"description": "<string>",
"assetId": 123,
"subAssetIds": [123],
"isAssetDown": True,
"areaId": 123,
"workCategoryId": 123,
"needApproval": True,
"requiresSignature": True,
"approvalRequiredFrom": [{}],
"images": ["<string>"],
"parts": [123],
"skipSupplier": True,
"contractorDetails": {},
"assignmentChanges": [{}],
"scheduledAt": "2023-11-07T05:31:56Z",
"estimatedCompletionDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"price": 123,
"currencyId": "<string>",
"terms": "<string>",
"nte": 123,
"nteInLocationCurrency": 123,
"locationCurrencyId": "<string>",
"currencyExchangeRateLocationToSupplier": 123,
"currencyExchangeRateBuyerToLocation": 123,
"statusChanges": [{}],
"submittedByName": "<string>",
"hasBuyerArchived": True,
"hasSupplierArchived": True,
"buyerAttachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"supplierAttachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"fromRequestPortal": True,
"fromClientPortal": True,
"forcePendingStatusOnCreateFromPortal": True,
"resolutionTypeId": 123,
"plannedMaintenanceScheduleId": 123,
"taskCompletionMandatory": True,
"isPrivate": True,
"walkThroughId": 123,
"siteSurveyTaskTitleId": "<string>",
"includeWalkthroughTaskList": True,
"supplierPrimaryContactEmail": "<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({
title: '<string>',
locationId: 123,
problemTypeId: 123,
woPriorityId: 123,
woNumber: '<string>',
poNumber: '<string>',
buyerProjectIds: [123],
isPM: true,
isCapex: true,
isStale: true,
isSupplierInitiated: true,
isCustomerInitiated: true,
isWarranty: true,
status: '<string>',
description: '<string>',
assetId: 123,
subAssetIds: [123],
isAssetDown: true,
areaId: 123,
workCategoryId: 123,
needApproval: true,
requiresSignature: true,
approvalRequiredFrom: [{}],
images: ['<string>'],
parts: [123],
skipSupplier: true,
contractorDetails: {},
assignmentChanges: [{}],
scheduledAt: '2023-11-07T05:31:56Z',
estimatedCompletionDate: '2023-11-07T05:31:56Z',
dueDate: '2023-11-07T05:31:56Z',
price: 123,
currencyId: '<string>',
terms: '<string>',
nte: 123,
nteInLocationCurrency: 123,
locationCurrencyId: '<string>',
currencyExchangeRateLocationToSupplier: 123,
currencyExchangeRateBuyerToLocation: 123,
statusChanges: [{}],
submittedByName: '<string>',
hasBuyerArchived: true,
hasSupplierArchived: true,
buyerAttachments: [{fileName: '<string>', fileId: '<string>'}],
supplierAttachments: [{fileName: '<string>', fileId: '<string>'}],
fromRequestPortal: true,
fromClientPortal: true,
forcePendingStatusOnCreateFromPortal: true,
resolutionTypeId: 123,
plannedMaintenanceScheduleId: 123,
taskCompletionMandatory: true,
isPrivate: true,
walkThroughId: 123,
siteSurveyTaskTitleId: '<string>',
includeWalkthroughTaskList: true,
supplierPrimaryContactEmail: '<string>'
})
};
fetch('https://api.useopenwrench.com/api/external/v1/supplier/work_order/work_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://api.useopenwrench.com/api/external/v1/supplier/work_order/work_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([
'title' => '<string>',
'locationId' => 123,
'problemTypeId' => 123,
'woPriorityId' => 123,
'woNumber' => '<string>',
'poNumber' => '<string>',
'buyerProjectIds' => [
123
],
'isPM' => true,
'isCapex' => true,
'isStale' => true,
'isSupplierInitiated' => true,
'isCustomerInitiated' => true,
'isWarranty' => true,
'status' => '<string>',
'description' => '<string>',
'assetId' => 123,
'subAssetIds' => [
123
],
'isAssetDown' => true,
'areaId' => 123,
'workCategoryId' => 123,
'needApproval' => true,
'requiresSignature' => true,
'approvalRequiredFrom' => [
[
]
],
'images' => [
'<string>'
],
'parts' => [
123
],
'skipSupplier' => true,
'contractorDetails' => [
],
'assignmentChanges' => [
[
]
],
'scheduledAt' => '2023-11-07T05:31:56Z',
'estimatedCompletionDate' => '2023-11-07T05:31:56Z',
'dueDate' => '2023-11-07T05:31:56Z',
'price' => 123,
'currencyId' => '<string>',
'terms' => '<string>',
'nte' => 123,
'nteInLocationCurrency' => 123,
'locationCurrencyId' => '<string>',
'currencyExchangeRateLocationToSupplier' => 123,
'currencyExchangeRateBuyerToLocation' => 123,
'statusChanges' => [
[
]
],
'submittedByName' => '<string>',
'hasBuyerArchived' => true,
'hasSupplierArchived' => true,
'buyerAttachments' => [
[
'fileName' => '<string>',
'fileId' => '<string>'
]
],
'supplierAttachments' => [
[
'fileName' => '<string>',
'fileId' => '<string>'
]
],
'fromRequestPortal' => true,
'fromClientPortal' => true,
'forcePendingStatusOnCreateFromPortal' => true,
'resolutionTypeId' => 123,
'plannedMaintenanceScheduleId' => 123,
'taskCompletionMandatory' => true,
'isPrivate' => true,
'walkThroughId' => 123,
'siteSurveyTaskTitleId' => '<string>',
'includeWalkthroughTaskList' => true,
'supplierPrimaryContactEmail' => '<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/work_order/work_orders"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"locationId\": 123,\n \"problemTypeId\": 123,\n \"woPriorityId\": 123,\n \"woNumber\": \"<string>\",\n \"poNumber\": \"<string>\",\n \"buyerProjectIds\": [\n 123\n ],\n \"isPM\": true,\n \"isCapex\": true,\n \"isStale\": true,\n \"isSupplierInitiated\": true,\n \"isCustomerInitiated\": true,\n \"isWarranty\": true,\n \"status\": \"<string>\",\n \"description\": \"<string>\",\n \"assetId\": 123,\n \"subAssetIds\": [\n 123\n ],\n \"isAssetDown\": true,\n \"areaId\": 123,\n \"workCategoryId\": 123,\n \"needApproval\": true,\n \"requiresSignature\": true,\n \"approvalRequiredFrom\": [\n {}\n ],\n \"images\": [\n \"<string>\"\n ],\n \"parts\": [\n 123\n ],\n \"skipSupplier\": true,\n \"contractorDetails\": {},\n \"assignmentChanges\": [\n {}\n ],\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"estimatedCompletionDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"price\": 123,\n \"currencyId\": \"<string>\",\n \"terms\": \"<string>\",\n \"nte\": 123,\n \"nteInLocationCurrency\": 123,\n \"locationCurrencyId\": \"<string>\",\n \"currencyExchangeRateLocationToSupplier\": 123,\n \"currencyExchangeRateBuyerToLocation\": 123,\n \"statusChanges\": [\n {}\n ],\n \"submittedByName\": \"<string>\",\n \"hasBuyerArchived\": true,\n \"hasSupplierArchived\": true,\n \"buyerAttachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"supplierAttachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"fromRequestPortal\": true,\n \"fromClientPortal\": true,\n \"forcePendingStatusOnCreateFromPortal\": true,\n \"resolutionTypeId\": 123,\n \"plannedMaintenanceScheduleId\": 123,\n \"taskCompletionMandatory\": true,\n \"isPrivate\": true,\n \"walkThroughId\": 123,\n \"siteSurveyTaskTitleId\": \"<string>\",\n \"includeWalkthroughTaskList\": true,\n \"supplierPrimaryContactEmail\": \"<string>\"\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/work_order/work_orders")
.header("X-API-KEY", "<api-key>")
.header("OW-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"locationId\": 123,\n \"problemTypeId\": 123,\n \"woPriorityId\": 123,\n \"woNumber\": \"<string>\",\n \"poNumber\": \"<string>\",\n \"buyerProjectIds\": [\n 123\n ],\n \"isPM\": true,\n \"isCapex\": true,\n \"isStale\": true,\n \"isSupplierInitiated\": true,\n \"isCustomerInitiated\": true,\n \"isWarranty\": true,\n \"status\": \"<string>\",\n \"description\": \"<string>\",\n \"assetId\": 123,\n \"subAssetIds\": [\n 123\n ],\n \"isAssetDown\": true,\n \"areaId\": 123,\n \"workCategoryId\": 123,\n \"needApproval\": true,\n \"requiresSignature\": true,\n \"approvalRequiredFrom\": [\n {}\n ],\n \"images\": [\n \"<string>\"\n ],\n \"parts\": [\n 123\n ],\n \"skipSupplier\": true,\n \"contractorDetails\": {},\n \"assignmentChanges\": [\n {}\n ],\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"estimatedCompletionDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"price\": 123,\n \"currencyId\": \"<string>\",\n \"terms\": \"<string>\",\n \"nte\": 123,\n \"nteInLocationCurrency\": 123,\n \"locationCurrencyId\": \"<string>\",\n \"currencyExchangeRateLocationToSupplier\": 123,\n \"currencyExchangeRateBuyerToLocation\": 123,\n \"statusChanges\": [\n {}\n ],\n \"submittedByName\": \"<string>\",\n \"hasBuyerArchived\": true,\n \"hasSupplierArchived\": true,\n \"buyerAttachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"supplierAttachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"fromRequestPortal\": true,\n \"fromClientPortal\": true,\n \"forcePendingStatusOnCreateFromPortal\": true,\n \"resolutionTypeId\": 123,\n \"plannedMaintenanceScheduleId\": 123,\n \"taskCompletionMandatory\": true,\n \"isPrivate\": true,\n \"walkThroughId\": 123,\n \"siteSurveyTaskTitleId\": \"<string>\",\n \"includeWalkthroughTaskList\": true,\n \"supplierPrimaryContactEmail\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useopenwrench.com/api/external/v1/supplier/work_order/work_orders")
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 \"title\": \"<string>\",\n \"locationId\": 123,\n \"problemTypeId\": 123,\n \"woPriorityId\": 123,\n \"woNumber\": \"<string>\",\n \"poNumber\": \"<string>\",\n \"buyerProjectIds\": [\n 123\n ],\n \"isPM\": true,\n \"isCapex\": true,\n \"isStale\": true,\n \"isSupplierInitiated\": true,\n \"isCustomerInitiated\": true,\n \"isWarranty\": true,\n \"status\": \"<string>\",\n \"description\": \"<string>\",\n \"assetId\": 123,\n \"subAssetIds\": [\n 123\n ],\n \"isAssetDown\": true,\n \"areaId\": 123,\n \"workCategoryId\": 123,\n \"needApproval\": true,\n \"requiresSignature\": true,\n \"approvalRequiredFrom\": [\n {}\n ],\n \"images\": [\n \"<string>\"\n ],\n \"parts\": [\n 123\n ],\n \"skipSupplier\": true,\n \"contractorDetails\": {},\n \"assignmentChanges\": [\n {}\n ],\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"estimatedCompletionDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"price\": 123,\n \"currencyId\": \"<string>\",\n \"terms\": \"<string>\",\n \"nte\": 123,\n \"nteInLocationCurrency\": 123,\n \"locationCurrencyId\": \"<string>\",\n \"currencyExchangeRateLocationToSupplier\": 123,\n \"currencyExchangeRateBuyerToLocation\": 123,\n \"statusChanges\": [\n {}\n ],\n \"submittedByName\": \"<string>\",\n \"hasBuyerArchived\": true,\n \"hasSupplierArchived\": true,\n \"buyerAttachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"supplierAttachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"fromRequestPortal\": true,\n \"fromClientPortal\": true,\n \"forcePendingStatusOnCreateFromPortal\": true,\n \"resolutionTypeId\": 123,\n \"plannedMaintenanceScheduleId\": 123,\n \"taskCompletionMandatory\": true,\n \"isPrivate\": true,\n \"walkThroughId\": 123,\n \"siteSurveyTaskTitleId\": \"<string>\",\n \"includeWalkthroughTaskList\": true,\n \"supplierPrimaryContactEmail\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"data": {
"id": 123,
"buyerSpecificId": "<string>",
"woNumber": "<string>",
"poNumber": "<string>",
"isPM": true,
"isCapex": true,
"isStale": true,
"isSupplierInitiated": true,
"isCustomerInitiated": true,
"isWarranty": true,
"title": "<string>",
"displayStatus": "<string>",
"status": "<string>",
"statusChangedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"assetId": 123,
"subAssetIds": [
123
],
"isAssetDown": true,
"locationId": 123,
"areaId": 123,
"workCategoryId": 123,
"spendCategoryId": 123,
"problemTypeId": 123,
"problemType": {
"id": 123,
"name": "<string>",
"buyerCompanyId": 123,
"hasChildren": true
},
"woPriorityId": 123,
"needsApproval": true,
"images": [
"<string>"
],
"dueDate": "2023-11-07T05:31:56Z",
"scheduledAt": "2023-11-07T05:31:56Z",
"estimatedCompletionDate": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"assignedAt": "2023-11-07T05:31:56Z",
"supplierRespondedAt": "2023-11-07T05:31:56Z",
"supplierFacilityId": 123,
"supplierPrimaryContactEmail": "<string>",
"price": 123,
"currencyId": "<string>",
"nte": 123,
"notes": [
{
"text": "<string>",
"noteAddedBy": "<string>",
"noteAddedAt": "2023-11-07T05:31:56Z",
"id": 123,
"photo": "<string>",
"video": "<string>",
"audio": "<string>",
"otherFile": "<string>",
"elements": [
{
"type": "<string>",
"value": "<string>",
"userObject": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
],
"noteReadDetails": [
{
"readAt": "2023-11-07T05:31:56Z",
"readBy": "<string>",
"readByContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
],
"noteAddedByContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"noteType": "<string>",
"noteAddedByType": "<string>",
"caption": "<string>",
"isNoteAwaitingResponse": true
}
],
"lastNote": "<string>",
"lastNoteAddedBy": "<string>",
"lastNoteAddedAt": 123,
"buyerFacilityId": 123,
"buyerCompanyId": 123,
"createdBy": "<string>",
"buyerSubscriberEmails": [
"<string>"
],
"supplierSubscriberEmails": [
"<string>"
],
"associatedServiceCalls": [
{
"supplierFacilityId": 123,
"numberOfTechs": 123,
"workOrderId": 123,
"locationId": 123,
"buyerFacilityId": 123,
"buyerCompanyId": 123,
"isDeleted": true,
"id": 123,
"leadTechnicianEmail": "<string>",
"leadTechnicianEmailContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"additionalTechnicianEmails": [
"<string>"
],
"additionalTechnicians": [
{
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"stockLocationIds": [
123
],
"stockLocations": [
{
"name": "<string>",
"isMobile": true,
"supplierFacilityId": 123,
"supplierCompanyId": 123,
"isActive": true,
"allowEquipmentForwarding": true,
"isDeleted": true,
"id": 123,
"warehouseId": "<string>",
"images": [
"<string>"
],
"description": "<string>",
"address": {},
"latitude": 123,
"longitude": 123,
"timeZoneId": "<string>",
"locationId": 123,
"burdenRates": [
{
"year": 123,
"rate": "<string>"
}
],
"taxRates": [
{
"year": 123,
"rate": "<string>"
}
],
"purchaseOrderPrefix": "<string>",
"glCode": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
],
"serviceScheduledAt": "2023-11-07T05:31:56Z",
"checkInByEmail": "<string>",
"checkInByContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"checkInStatus": "<string>",
"checkInTime": "2023-11-07T05:31:56Z",
"checkInNotes": "<string>",
"checkInImages": [
"<string>"
],
"checkInGeoLocation": {
"lat": "<string>",
"long": "<string>"
},
"checkInAudio": "<string>",
"checkInAudioTranscription": "<string>",
"checkOutByEmail": "<string>",
"checkOutByContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"checkOutStatus": "<string>",
"checkOutTime": "2023-11-07T05:31:56Z",
"checkOutNotes": "<string>",
"checkOutImages": [
"<string>"
],
"checkOutGeoLocation": {
"lat": "<string>",
"long": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
],
"lastServiceCall": {
"supplierFacilityId": 123,
"numberOfTechs": 123,
"workOrderId": 123,
"locationId": 123,
"buyerFacilityId": 123,
"buyerCompanyId": 123,
"isDeleted": true,
"id": 123,
"leadTechnicianEmail": "<string>",
"leadTechnicianEmailContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"additionalTechnicianEmails": [
"<string>"
],
"additionalTechnicians": [
{
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"stockLocationIds": [
123
],
"stockLocations": [
{
"name": "<string>",
"isMobile": true,
"supplierFacilityId": 123,
"supplierCompanyId": 123,
"isActive": true,
"allowEquipmentForwarding": true,
"isDeleted": true,
"id": 123,
"warehouseId": "<string>",
"images": [
"<string>"
],
"description": "<string>",
"address": {},
"latitude": 123,
"longitude": 123,
"timeZoneId": "<string>",
"locationId": 123,
"burdenRates": [
{
"year": 123,
"rate": "<string>"
}
],
"taxRates": [
{
"year": 123,
"rate": "<string>"
}
],
"purchaseOrderPrefix": "<string>",
"glCode": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
],
"serviceScheduledAt": "2023-11-07T05:31:56Z",
"checkInByEmail": "<string>",
"checkInByContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"checkInStatus": "<string>",
"checkInTime": "2023-11-07T05:31:56Z",
"checkInNotes": "<string>",
"checkInImages": [
"<string>"
],
"checkInGeoLocation": {
"lat": "<string>",
"long": "<string>"
},
"checkInAudio": "<string>",
"checkInAudioTranscription": "<string>",
"checkOutByEmail": "<string>",
"checkOutByContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"checkOutStatus": "<string>",
"checkOutTime": "2023-11-07T05:31:56Z",
"checkOutNotes": "<string>",
"checkOutImages": [
"<string>"
],
"checkOutGeoLocation": {
"lat": "<string>",
"long": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"buyerAttachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"supplierAttachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"resolutionTypeId": 123,
"plannedMaintenanceScheduleId": 123,
"cancelledAt": "2023-11-07T05:31:56Z",
"cancelledBy": "<string>",
"glCode": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isDeleted": true,
"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 a work order
Creates a supplier-initiated work order. Requires the API key’s contact to belong to a supplier facility. locationId is required; problemTypeId and woPriorityId are defaulted from the location’s buyer company when omitted. This endpoint always creates: an id in the body is ignored. The initial status is set by the server. For a third-party supplier key, any status or isSupplierInitiated in the body is ignored: the work order is created as SupplierInitiatedPendingApproval with isSupplierInitiated true, and the buyer’s approval configuration then either holds it there until a buyer approves it or, when the buyer auto-approves supplier-initiated work orders, confirms it to the calling facility as ConfirmedByServiceProvider. Keys that belong to a buyer’s internal service team, and paying suppliers creating a work order at a location of a client they manage, keep the status they send. Returns the created work order.
curl --request POST \
--url https://api.useopenwrench.com/api/external/v1/supplier/work_order/work_orders \
--header 'Content-Type: application/json' \
--header 'OW-KEY: <api-key>' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"title": "<string>",
"locationId": 123,
"problemTypeId": 123,
"woPriorityId": 123,
"woNumber": "<string>",
"poNumber": "<string>",
"buyerProjectIds": [
123
],
"isPM": true,
"isCapex": true,
"isStale": true,
"isSupplierInitiated": true,
"isCustomerInitiated": true,
"isWarranty": true,
"status": "<string>",
"description": "<string>",
"assetId": 123,
"subAssetIds": [
123
],
"isAssetDown": true,
"areaId": 123,
"workCategoryId": 123,
"needApproval": true,
"requiresSignature": true,
"approvalRequiredFrom": [
{}
],
"images": [
"<string>"
],
"parts": [
123
],
"skipSupplier": true,
"contractorDetails": {},
"assignmentChanges": [
{}
],
"scheduledAt": "2023-11-07T05:31:56Z",
"estimatedCompletionDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"price": 123,
"currencyId": "<string>",
"terms": "<string>",
"nte": 123,
"nteInLocationCurrency": 123,
"locationCurrencyId": "<string>",
"currencyExchangeRateLocationToSupplier": 123,
"currencyExchangeRateBuyerToLocation": 123,
"statusChanges": [
{}
],
"submittedByName": "<string>",
"hasBuyerArchived": true,
"hasSupplierArchived": true,
"buyerAttachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"supplierAttachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"fromRequestPortal": true,
"fromClientPortal": true,
"forcePendingStatusOnCreateFromPortal": true,
"resolutionTypeId": 123,
"plannedMaintenanceScheduleId": 123,
"taskCompletionMandatory": true,
"isPrivate": true,
"walkThroughId": 123,
"siteSurveyTaskTitleId": "<string>",
"includeWalkthroughTaskList": true,
"supplierPrimaryContactEmail": "<string>"
}
'import requests
url = "https://api.useopenwrench.com/api/external/v1/supplier/work_order/work_orders"
payload = {
"title": "<string>",
"locationId": 123,
"problemTypeId": 123,
"woPriorityId": 123,
"woNumber": "<string>",
"poNumber": "<string>",
"buyerProjectIds": [123],
"isPM": True,
"isCapex": True,
"isStale": True,
"isSupplierInitiated": True,
"isCustomerInitiated": True,
"isWarranty": True,
"status": "<string>",
"description": "<string>",
"assetId": 123,
"subAssetIds": [123],
"isAssetDown": True,
"areaId": 123,
"workCategoryId": 123,
"needApproval": True,
"requiresSignature": True,
"approvalRequiredFrom": [{}],
"images": ["<string>"],
"parts": [123],
"skipSupplier": True,
"contractorDetails": {},
"assignmentChanges": [{}],
"scheduledAt": "2023-11-07T05:31:56Z",
"estimatedCompletionDate": "2023-11-07T05:31:56Z",
"dueDate": "2023-11-07T05:31:56Z",
"price": 123,
"currencyId": "<string>",
"terms": "<string>",
"nte": 123,
"nteInLocationCurrency": 123,
"locationCurrencyId": "<string>",
"currencyExchangeRateLocationToSupplier": 123,
"currencyExchangeRateBuyerToLocation": 123,
"statusChanges": [{}],
"submittedByName": "<string>",
"hasBuyerArchived": True,
"hasSupplierArchived": True,
"buyerAttachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"supplierAttachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"fromRequestPortal": True,
"fromClientPortal": True,
"forcePendingStatusOnCreateFromPortal": True,
"resolutionTypeId": 123,
"plannedMaintenanceScheduleId": 123,
"taskCompletionMandatory": True,
"isPrivate": True,
"walkThroughId": 123,
"siteSurveyTaskTitleId": "<string>",
"includeWalkthroughTaskList": True,
"supplierPrimaryContactEmail": "<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({
title: '<string>',
locationId: 123,
problemTypeId: 123,
woPriorityId: 123,
woNumber: '<string>',
poNumber: '<string>',
buyerProjectIds: [123],
isPM: true,
isCapex: true,
isStale: true,
isSupplierInitiated: true,
isCustomerInitiated: true,
isWarranty: true,
status: '<string>',
description: '<string>',
assetId: 123,
subAssetIds: [123],
isAssetDown: true,
areaId: 123,
workCategoryId: 123,
needApproval: true,
requiresSignature: true,
approvalRequiredFrom: [{}],
images: ['<string>'],
parts: [123],
skipSupplier: true,
contractorDetails: {},
assignmentChanges: [{}],
scheduledAt: '2023-11-07T05:31:56Z',
estimatedCompletionDate: '2023-11-07T05:31:56Z',
dueDate: '2023-11-07T05:31:56Z',
price: 123,
currencyId: '<string>',
terms: '<string>',
nte: 123,
nteInLocationCurrency: 123,
locationCurrencyId: '<string>',
currencyExchangeRateLocationToSupplier: 123,
currencyExchangeRateBuyerToLocation: 123,
statusChanges: [{}],
submittedByName: '<string>',
hasBuyerArchived: true,
hasSupplierArchived: true,
buyerAttachments: [{fileName: '<string>', fileId: '<string>'}],
supplierAttachments: [{fileName: '<string>', fileId: '<string>'}],
fromRequestPortal: true,
fromClientPortal: true,
forcePendingStatusOnCreateFromPortal: true,
resolutionTypeId: 123,
plannedMaintenanceScheduleId: 123,
taskCompletionMandatory: true,
isPrivate: true,
walkThroughId: 123,
siteSurveyTaskTitleId: '<string>',
includeWalkthroughTaskList: true,
supplierPrimaryContactEmail: '<string>'
})
};
fetch('https://api.useopenwrench.com/api/external/v1/supplier/work_order/work_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://api.useopenwrench.com/api/external/v1/supplier/work_order/work_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([
'title' => '<string>',
'locationId' => 123,
'problemTypeId' => 123,
'woPriorityId' => 123,
'woNumber' => '<string>',
'poNumber' => '<string>',
'buyerProjectIds' => [
123
],
'isPM' => true,
'isCapex' => true,
'isStale' => true,
'isSupplierInitiated' => true,
'isCustomerInitiated' => true,
'isWarranty' => true,
'status' => '<string>',
'description' => '<string>',
'assetId' => 123,
'subAssetIds' => [
123
],
'isAssetDown' => true,
'areaId' => 123,
'workCategoryId' => 123,
'needApproval' => true,
'requiresSignature' => true,
'approvalRequiredFrom' => [
[
]
],
'images' => [
'<string>'
],
'parts' => [
123
],
'skipSupplier' => true,
'contractorDetails' => [
],
'assignmentChanges' => [
[
]
],
'scheduledAt' => '2023-11-07T05:31:56Z',
'estimatedCompletionDate' => '2023-11-07T05:31:56Z',
'dueDate' => '2023-11-07T05:31:56Z',
'price' => 123,
'currencyId' => '<string>',
'terms' => '<string>',
'nte' => 123,
'nteInLocationCurrency' => 123,
'locationCurrencyId' => '<string>',
'currencyExchangeRateLocationToSupplier' => 123,
'currencyExchangeRateBuyerToLocation' => 123,
'statusChanges' => [
[
]
],
'submittedByName' => '<string>',
'hasBuyerArchived' => true,
'hasSupplierArchived' => true,
'buyerAttachments' => [
[
'fileName' => '<string>',
'fileId' => '<string>'
]
],
'supplierAttachments' => [
[
'fileName' => '<string>',
'fileId' => '<string>'
]
],
'fromRequestPortal' => true,
'fromClientPortal' => true,
'forcePendingStatusOnCreateFromPortal' => true,
'resolutionTypeId' => 123,
'plannedMaintenanceScheduleId' => 123,
'taskCompletionMandatory' => true,
'isPrivate' => true,
'walkThroughId' => 123,
'siteSurveyTaskTitleId' => '<string>',
'includeWalkthroughTaskList' => true,
'supplierPrimaryContactEmail' => '<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/work_order/work_orders"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"locationId\": 123,\n \"problemTypeId\": 123,\n \"woPriorityId\": 123,\n \"woNumber\": \"<string>\",\n \"poNumber\": \"<string>\",\n \"buyerProjectIds\": [\n 123\n ],\n \"isPM\": true,\n \"isCapex\": true,\n \"isStale\": true,\n \"isSupplierInitiated\": true,\n \"isCustomerInitiated\": true,\n \"isWarranty\": true,\n \"status\": \"<string>\",\n \"description\": \"<string>\",\n \"assetId\": 123,\n \"subAssetIds\": [\n 123\n ],\n \"isAssetDown\": true,\n \"areaId\": 123,\n \"workCategoryId\": 123,\n \"needApproval\": true,\n \"requiresSignature\": true,\n \"approvalRequiredFrom\": [\n {}\n ],\n \"images\": [\n \"<string>\"\n ],\n \"parts\": [\n 123\n ],\n \"skipSupplier\": true,\n \"contractorDetails\": {},\n \"assignmentChanges\": [\n {}\n ],\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"estimatedCompletionDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"price\": 123,\n \"currencyId\": \"<string>\",\n \"terms\": \"<string>\",\n \"nte\": 123,\n \"nteInLocationCurrency\": 123,\n \"locationCurrencyId\": \"<string>\",\n \"currencyExchangeRateLocationToSupplier\": 123,\n \"currencyExchangeRateBuyerToLocation\": 123,\n \"statusChanges\": [\n {}\n ],\n \"submittedByName\": \"<string>\",\n \"hasBuyerArchived\": true,\n \"hasSupplierArchived\": true,\n \"buyerAttachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"supplierAttachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"fromRequestPortal\": true,\n \"fromClientPortal\": true,\n \"forcePendingStatusOnCreateFromPortal\": true,\n \"resolutionTypeId\": 123,\n \"plannedMaintenanceScheduleId\": 123,\n \"taskCompletionMandatory\": true,\n \"isPrivate\": true,\n \"walkThroughId\": 123,\n \"siteSurveyTaskTitleId\": \"<string>\",\n \"includeWalkthroughTaskList\": true,\n \"supplierPrimaryContactEmail\": \"<string>\"\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/work_order/work_orders")
.header("X-API-KEY", "<api-key>")
.header("OW-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"locationId\": 123,\n \"problemTypeId\": 123,\n \"woPriorityId\": 123,\n \"woNumber\": \"<string>\",\n \"poNumber\": \"<string>\",\n \"buyerProjectIds\": [\n 123\n ],\n \"isPM\": true,\n \"isCapex\": true,\n \"isStale\": true,\n \"isSupplierInitiated\": true,\n \"isCustomerInitiated\": true,\n \"isWarranty\": true,\n \"status\": \"<string>\",\n \"description\": \"<string>\",\n \"assetId\": 123,\n \"subAssetIds\": [\n 123\n ],\n \"isAssetDown\": true,\n \"areaId\": 123,\n \"workCategoryId\": 123,\n \"needApproval\": true,\n \"requiresSignature\": true,\n \"approvalRequiredFrom\": [\n {}\n ],\n \"images\": [\n \"<string>\"\n ],\n \"parts\": [\n 123\n ],\n \"skipSupplier\": true,\n \"contractorDetails\": {},\n \"assignmentChanges\": [\n {}\n ],\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"estimatedCompletionDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"price\": 123,\n \"currencyId\": \"<string>\",\n \"terms\": \"<string>\",\n \"nte\": 123,\n \"nteInLocationCurrency\": 123,\n \"locationCurrencyId\": \"<string>\",\n \"currencyExchangeRateLocationToSupplier\": 123,\n \"currencyExchangeRateBuyerToLocation\": 123,\n \"statusChanges\": [\n {}\n ],\n \"submittedByName\": \"<string>\",\n \"hasBuyerArchived\": true,\n \"hasSupplierArchived\": true,\n \"buyerAttachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"supplierAttachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"fromRequestPortal\": true,\n \"fromClientPortal\": true,\n \"forcePendingStatusOnCreateFromPortal\": true,\n \"resolutionTypeId\": 123,\n \"plannedMaintenanceScheduleId\": 123,\n \"taskCompletionMandatory\": true,\n \"isPrivate\": true,\n \"walkThroughId\": 123,\n \"siteSurveyTaskTitleId\": \"<string>\",\n \"includeWalkthroughTaskList\": true,\n \"supplierPrimaryContactEmail\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useopenwrench.com/api/external/v1/supplier/work_order/work_orders")
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 \"title\": \"<string>\",\n \"locationId\": 123,\n \"problemTypeId\": 123,\n \"woPriorityId\": 123,\n \"woNumber\": \"<string>\",\n \"poNumber\": \"<string>\",\n \"buyerProjectIds\": [\n 123\n ],\n \"isPM\": true,\n \"isCapex\": true,\n \"isStale\": true,\n \"isSupplierInitiated\": true,\n \"isCustomerInitiated\": true,\n \"isWarranty\": true,\n \"status\": \"<string>\",\n \"description\": \"<string>\",\n \"assetId\": 123,\n \"subAssetIds\": [\n 123\n ],\n \"isAssetDown\": true,\n \"areaId\": 123,\n \"workCategoryId\": 123,\n \"needApproval\": true,\n \"requiresSignature\": true,\n \"approvalRequiredFrom\": [\n {}\n ],\n \"images\": [\n \"<string>\"\n ],\n \"parts\": [\n 123\n ],\n \"skipSupplier\": true,\n \"contractorDetails\": {},\n \"assignmentChanges\": [\n {}\n ],\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"estimatedCompletionDate\": \"2023-11-07T05:31:56Z\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"price\": 123,\n \"currencyId\": \"<string>\",\n \"terms\": \"<string>\",\n \"nte\": 123,\n \"nteInLocationCurrency\": 123,\n \"locationCurrencyId\": \"<string>\",\n \"currencyExchangeRateLocationToSupplier\": 123,\n \"currencyExchangeRateBuyerToLocation\": 123,\n \"statusChanges\": [\n {}\n ],\n \"submittedByName\": \"<string>\",\n \"hasBuyerArchived\": true,\n \"hasSupplierArchived\": true,\n \"buyerAttachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"supplierAttachments\": [\n {\n \"fileName\": \"<string>\",\n \"fileId\": \"<string>\"\n }\n ],\n \"fromRequestPortal\": true,\n \"fromClientPortal\": true,\n \"forcePendingStatusOnCreateFromPortal\": true,\n \"resolutionTypeId\": 123,\n \"plannedMaintenanceScheduleId\": 123,\n \"taskCompletionMandatory\": true,\n \"isPrivate\": true,\n \"walkThroughId\": 123,\n \"siteSurveyTaskTitleId\": \"<string>\",\n \"includeWalkthroughTaskList\": true,\n \"supplierPrimaryContactEmail\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"data": {
"id": 123,
"buyerSpecificId": "<string>",
"woNumber": "<string>",
"poNumber": "<string>",
"isPM": true,
"isCapex": true,
"isStale": true,
"isSupplierInitiated": true,
"isCustomerInitiated": true,
"isWarranty": true,
"title": "<string>",
"displayStatus": "<string>",
"status": "<string>",
"statusChangedAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"assetId": 123,
"subAssetIds": [
123
],
"isAssetDown": true,
"locationId": 123,
"areaId": 123,
"workCategoryId": 123,
"spendCategoryId": 123,
"problemTypeId": 123,
"problemType": {
"id": 123,
"name": "<string>",
"buyerCompanyId": 123,
"hasChildren": true
},
"woPriorityId": 123,
"needsApproval": true,
"images": [
"<string>"
],
"dueDate": "2023-11-07T05:31:56Z",
"scheduledAt": "2023-11-07T05:31:56Z",
"estimatedCompletionDate": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"assignedAt": "2023-11-07T05:31:56Z",
"supplierRespondedAt": "2023-11-07T05:31:56Z",
"supplierFacilityId": 123,
"supplierPrimaryContactEmail": "<string>",
"price": 123,
"currencyId": "<string>",
"nte": 123,
"notes": [
{
"text": "<string>",
"noteAddedBy": "<string>",
"noteAddedAt": "2023-11-07T05:31:56Z",
"id": 123,
"photo": "<string>",
"video": "<string>",
"audio": "<string>",
"otherFile": "<string>",
"elements": [
{
"type": "<string>",
"value": "<string>",
"userObject": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
],
"noteReadDetails": [
{
"readAt": "2023-11-07T05:31:56Z",
"readBy": "<string>",
"readByContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}
],
"noteAddedByContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"noteType": "<string>",
"noteAddedByType": "<string>",
"caption": "<string>",
"isNoteAwaitingResponse": true
}
],
"lastNote": "<string>",
"lastNoteAddedBy": "<string>",
"lastNoteAddedAt": 123,
"buyerFacilityId": 123,
"buyerCompanyId": 123,
"createdBy": "<string>",
"buyerSubscriberEmails": [
"<string>"
],
"supplierSubscriberEmails": [
"<string>"
],
"associatedServiceCalls": [
{
"supplierFacilityId": 123,
"numberOfTechs": 123,
"workOrderId": 123,
"locationId": 123,
"buyerFacilityId": 123,
"buyerCompanyId": 123,
"isDeleted": true,
"id": 123,
"leadTechnicianEmail": "<string>",
"leadTechnicianEmailContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"additionalTechnicianEmails": [
"<string>"
],
"additionalTechnicians": [
{
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"stockLocationIds": [
123
],
"stockLocations": [
{
"name": "<string>",
"isMobile": true,
"supplierFacilityId": 123,
"supplierCompanyId": 123,
"isActive": true,
"allowEquipmentForwarding": true,
"isDeleted": true,
"id": 123,
"warehouseId": "<string>",
"images": [
"<string>"
],
"description": "<string>",
"address": {},
"latitude": 123,
"longitude": 123,
"timeZoneId": "<string>",
"locationId": 123,
"burdenRates": [
{
"year": 123,
"rate": "<string>"
}
],
"taxRates": [
{
"year": 123,
"rate": "<string>"
}
],
"purchaseOrderPrefix": "<string>",
"glCode": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
],
"serviceScheduledAt": "2023-11-07T05:31:56Z",
"checkInByEmail": "<string>",
"checkInByContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"checkInStatus": "<string>",
"checkInTime": "2023-11-07T05:31:56Z",
"checkInNotes": "<string>",
"checkInImages": [
"<string>"
],
"checkInGeoLocation": {
"lat": "<string>",
"long": "<string>"
},
"checkInAudio": "<string>",
"checkInAudioTranscription": "<string>",
"checkOutByEmail": "<string>",
"checkOutByContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"checkOutStatus": "<string>",
"checkOutTime": "2023-11-07T05:31:56Z",
"checkOutNotes": "<string>",
"checkOutImages": [
"<string>"
],
"checkOutGeoLocation": {
"lat": "<string>",
"long": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
],
"lastServiceCall": {
"supplierFacilityId": 123,
"numberOfTechs": 123,
"workOrderId": 123,
"locationId": 123,
"buyerFacilityId": 123,
"buyerCompanyId": 123,
"isDeleted": true,
"id": 123,
"leadTechnicianEmail": "<string>",
"leadTechnicianEmailContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"additionalTechnicianEmails": [
"<string>"
],
"additionalTechnicians": [
{
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"stockLocationIds": [
123
],
"stockLocations": [
{
"name": "<string>",
"isMobile": true,
"supplierFacilityId": 123,
"supplierCompanyId": 123,
"isActive": true,
"allowEquipmentForwarding": true,
"isDeleted": true,
"id": 123,
"warehouseId": "<string>",
"images": [
"<string>"
],
"description": "<string>",
"address": {},
"latitude": 123,
"longitude": 123,
"timeZoneId": "<string>",
"locationId": 123,
"burdenRates": [
{
"year": 123,
"rate": "<string>"
}
],
"taxRates": [
{
"year": 123,
"rate": "<string>"
}
],
"purchaseOrderPrefix": "<string>",
"glCode": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
}
],
"serviceScheduledAt": "2023-11-07T05:31:56Z",
"checkInByEmail": "<string>",
"checkInByContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"checkInStatus": "<string>",
"checkInTime": "2023-11-07T05:31:56Z",
"checkInNotes": "<string>",
"checkInImages": [
"<string>"
],
"checkInGeoLocation": {
"lat": "<string>",
"long": "<string>"
},
"checkInAudio": "<string>",
"checkInAudioTranscription": "<string>",
"checkOutByEmail": "<string>",
"checkOutByContact": {
"email": "<string>",
"nameGiven": "<string>",
"nameFamily": "<string>",
"contactType": "<string>",
"title": "<string>",
"department": "<string>",
"facilityId": 123,
"isSharedContact": true,
"readOnlyAccess": true,
"invitedByEmail": "<string>",
"invitedAt": "2023-11-07T05:31:56Z",
"epaCertificationType": "<string>",
"epaCertificationNumber": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"checkOutStatus": "<string>",
"checkOutTime": "2023-11-07T05:31:56Z",
"checkOutNotes": "<string>",
"checkOutImages": [
"<string>"
],
"checkOutGeoLocation": {
"lat": "<string>",
"long": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z"
},
"buyerAttachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"supplierAttachments": [
{
"fileName": "<string>",
"fileId": "<string>"
}
],
"resolutionTypeId": 123,
"plannedMaintenanceScheduleId": 123,
"cancelledAt": "2023-11-07T05:31:56Z",
"cancelledBy": "<string>",
"glCode": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isDeleted": true,
"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>"
}Autorizaciones
OpenWrench shared secret. Required on every request alongside X-API-KEY; issued together with your API key.
Cuerpo
Work-order create payload (verified against the shared work-order constructor). createdBy, supplierFacilityId, buyerFacilityId and buyerCompanyId are always overwritten server-side from the API key and the location - caller-supplied values for them are ignored. Unknown fields are ignored.
REQUIRED
REQUIRED. The buyer location the work order is for; also determines the server-set buyerFacilityId and buyerCompanyId.
Optional; when omitted the first leaf problem type of the location's buyer company is used. Must reference an existing problem type.
Optional; when omitted a default priority for the buyer company is chosen (preference order 3,4,5,2,1, following linkedTo mappings).
Set to true by the server for third-party supplier keys; a value in the body is ignored there. Keys of a buyer's internal service team and paying suppliers creating for a client they manage keep the value they send.
Ignored for third-party supplier keys: the server seeds SupplierInitiatedPendingApproval and the buyer's approval configuration resolves the initial status. Honoured only for keys of a buyer's internal service team and for paying suppliers creating at a location of a client they manage; must be a valid work-order status name (invalid names are rejected), and when omitted the initial status is derived from the buyer company's configuration.
Must reference an existing asset; its areaId is inherited when areaId is not given
Default false
NOTE: the key is needApproval (no 's')
ApprovalRequirement objects
Part ids (mapped to the work order's partIds)
ContractorDetails object
AssignmentChange objects
ISO 8601 date-time
ISO 8601 date-time
ISO 8601 date-time
StatusChange objects
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Must be set together with siteSurveyTaskTitleId
Must be set together with walkThroughId
Respuesta
Successful response
Entity type label, e.g. "WorkOrder". 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.
Work order (abridged - the full model has 150+ fields including hydrated location/asset/facility/approval-hierarchy objects). For third-party suppliers (keys not belonging to an internal service team) responses are masked: buyer-private fields are removed/blanked by the API masking layer.
Show child attributes
Show child attributes
"ok" on success
ok