Order productions for device returns blocks of productions what have been produced during selected timeframe.

<aside> 📌 GET https://apis.globalreader.eu/api/v1/order_productions/by_device?device=WORKSTATION_UID&end=1650330061&start=1650157261&token=YOUR_TOKEN

</aside>

Parameters

token your API token provided by GlobalReader
device workstation UID for which device timeline is requested. Available in Passport
start UNIX timestamp for period start
end UNIX timestamp for period end. Max query period is 100 hours

Success response

HTTP status code 200


[
    {
        "end_at": "2022-04-18T04:05:00Z",
        "operator_code": null,
        "order_id": 4954455,
        "order_product_code": null,
        "order_product_name": "LM 15x125 STP",
        "order_production_code": "2222413",
        "order_remote_id": null,
        "production_status": 2,
        "productions": [
            {
                "duration": 9420,
                "duration_schi_exc": 9420,
                "end_at": "2022-04-14T19:38:00Z",
                "entered_amount": 0,
                "id": 122222,
                "materials": [],
                "operator_code": null,
                "operators": [
                    {
                        "code": null,
                        "name": "FirstName LastName"
                    }
                ],
                "production_status": 1,
                "run_time": 9420,
                "scraps": [],
                "sensor_unit": "m",
                "setup_end_at": null,
                "setup_time": 0,
                "start_at": "2022-04-14T17:01:00Z",
                "total_measured_amount": 0,
                "updated_at": "2022-04-14T19:38:31Z",
                "workstation_name": "H2001",
                "workstation_uid": "9379b00f-4cae-4c41-bfcd-5a8f8347efe7"
            }
            
        ],
        "sensor_unit": "m",
        "start_at": "2022-04-14T17:01:00Z",
        "total_duration": 13320,
        "total_duration_amount_split": 13320,
        "total_duration_schi_exc": 13320,
        "total_entered_amount": 0,
        "total_measured_amount": 2422.8512,
        "total_run_time": 13320,
        "total_scrap_amount": 0,
        "total_setup_time": 0
    }
    ]

Error response example

Any HTTP status code in 400 to 500

Missing API token key

Response fields

end_at period end UTC
operator_code operator code
order_id order id
order_product_code order product code
order_product_name order name
order_production_code order production code
order_remote_id unique order id
production_status 0 - waiting
1 - paused
2 - stopped or ready
productions list of items produced in the selected period
duration period duration end - start in seconds
duration_schi_exc duration, excluded Scheduled interruption duration
end_at period end UTC
entered_amount planned quantity
id production id
materials list of materials used
operator_code operator code
operators list of operators who were marked as working on the product
operator_name working operator name in that period
code operator uid
name operator name associated with the production
production_status 0 - waiting
1 - paused
2 - stopped or ready
run_time active time + loading time
scraps amount of scraps
sensor_unit sensor unit for the product
setup_end_at time in UTC when setup ended
setup_time setup time in minutes
start_at time in UTC when production started
total_measured_amount total quantity
updated_at last update in UTC
workstation_name requested Device or Workstation name
workstation_uid requested Device or Workstation uid
sensor_unit main sensor unit
total_duration total duration
total_duration_amount_split multiplier * total_duration
total_duration_schi_exc total excluded duration
total_entered_amount total planned quantity
total_measured_amount total measured quantity
total_run_time total active time + loading time
total_scrap_amount total scrap amount
total_setup_time total setup time

Back to API Documentation