Overview
Set Machine working order request
Set Machine working order response
Error Message
Code sample


Overview 

This method allows the user to update the work order list for one or more machines.


Machine working order request

Pre steps

  1. Get Token
  2. Get Machines Info

API Method

Method NamesetWorkOrderList
URLhttps://developers.3dsignals.io/api/v1/workOrderList
HTTP MethodPUT
Accepted content typesapplication/json
JSON sample

Data Structure

Field nameData TypeField description
machinensObject ArrayList of machine IDs and work orders
machineIdstringThe machine ID to be set 
workingOrdersString ArrayThe orders array to be set

Machine working order response

Response code 200 for success. 


Error Message

Error codeReason
403- ForbiddenUnauthorized scope request
422- Unprocessable EntityMissing Machine ID

Sample Code

Postman

CURL

curl --location --request PUT 'https://developers.3dsignals.io/api/v1/workOrderList' \
--header 'Authorization: Bearer YOUR_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
  "machines": [
    {
      "machineId": "id1",
      "workingOrders": [
        "WO_1",
        "WO_3"
      ]
    },
    {
      "machineId": "id2",
      "workingOrders": [
        "WO_2"
      ]
    }
  ]
}'

Python

import requests
import json
url = "https://developers.3dsignals.io/api/v1/workOrderList"
payload = json.dumps({
  "machines": [
    {
      "machineId": "id1",
      "workingOrders": [
        "WO_1",
        "WO_3"
      ]
    },
    {
      "machineId": "id2",
      "workingOrders": [
        "WO_2"
      ]
    }
  ]
})
headers = {
  'Authorization': 'Bearer YOUR_TOKEN',
  'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)