Work Order
Overview
Set Machine working order request
Set Machine working order response
Error Message
Sample code
Overview
This method allows the user to update the work order list for one or more machines.
Set machine working order request
Pre steps
API Method
Method Name | setWorkOrderList |
URL | https://developers.3dsignals.io/api/v1/workOrderList |
HTTP Method | PUT |
Accepted content types | application/json |
JSON sample | { "machines": [ { "machineId": "id_1", "workingOrders": [ "WO_1", "WO_2" ] } ] } |
Data Structure
Field name | Data Type | Field description |
machinens | Object Array | List of machine IDs and work orders |
machineId | string | The machine ID to be set |
workingOrders | String Array | The orders array to be set |
Machine object:
Field name | Data Type | Field description |
machineId | string | The machine ID to be set |
workingOrders | String | The works orders array to be set |
Set machine working order response
Response code 200 for success.
Error Message
Error code | Reason |
403- Forbidden | Unauthorized scope request |
422- Unprocessable Entity | Missing 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)