> For the complete documentation index, see [llms.txt](https://docs.enlyze.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enlyze.com/en/enlyze-api/api-reference/production-runs.md).

# Production Runs

## Get Production Runs

> Returns a list of all production runs in your organization.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Production Runs"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"SortKey":{"type":"string","enum":["start","-start","end","-end","maximum_run_speed","-maximum_run_speed"],"title":"SortKey"},"PaginatedProductionRuns":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ProductionRun"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedProductionRuns"},"ProductionRun":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"The UUID of the production run."},"machine":{"type":"string","format":"uuid","title":"Machine","description":"The UUID of the machine the production run was executed on."},"production_order":{"type":"string","title":"Production Order","description":"The identifier of the production order."},"product":{"type":"string","format":"uuid","title":"Product","description":"The UUID of the product that was produced."},"start":{"type":"string","format":"date-time","title":"Start","description":"The start of the production run in ISO8601 format with timezone info."},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End","description":"The end of the production run in ISO8601 format with timezone info. If the value of this field is `null`, the production run is not yet finished."},"average_throughput":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Throughput","description":"The average throughput of the production run **excluding** downtimes."},"quantity_total":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Total Quantity","description":"The total quantity produced during the production run, as ENLYZE resolves it from the booked and measured quantities."},"quantity_scrap":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Scrap Quantity","description":"The amount of product produced that doesn't meet quality criteria, as ENLYZE resolves it from the booked and measured quantities."},"quantity_yield":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Yield Quantity","description":"The amount of product produced that can be sold, as ENLYZE resolves it from the booked and measured quantities."},"quantity_total_booked":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Booked Total Quantity","description":"The total quantity as booked for the production run — by your ERP export, by the ENLYZE App, or from the machine's piece counters where ENLYZE detects runs from machine data. `null` if none was booked."},"quantity_scrap_booked":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Booked Scrap Quantity","description":"The scrap quantity as booked for the production run — by your ERP export, by the ENLYZE App, or from the machine's piece counters where ENLYZE detects runs from machine data. `null` if none was booked."},"quantity_yield_booked":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Booked Yield Quantity","description":"The yield quantity as booked for the production run — by your ERP export, by the ENLYZE App, or from the machine's piece counters where ENLYZE detects runs from machine data. `null` if none was booked."},"availability":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Availability","description":"OEE component that reflects when the machine did not produce."},"performance":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Performance","description":"OEE component that reflects how fast the machine has run."},"quality":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Quality","description":"OEE component that reflects how many defects have been produced."},"productivity":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Productivity","description":"Aggregate OEE score that comprises availability, performance and quality."},"maximum_run_speed":{"anyOf":[{"$ref":"#/components/schemas/MaximumRunSpeed"},{"type":"null"}],"title":"Maximum Run Speed","description":"Maximum speed during the production run."},"data_quality":{"anyOf":[{"$ref":"#/components/schemas/platform_api__services__production_runs_data_service__models__DataQuality"},{"type":"null"}],"title":"Data Quality","description":"Data Quality metrics of the production run. A `null` value indicates that the metrics are not yet available, e.g. when a production run is still being executed."},"attributes":{"anyOf":[{"$ref":"#/components/schemas/Attributes"},{"type":"null"}],"title":"Attributes","description":"Arbitrary attributes of the production run."}},"type":"object","required":["uuid","machine","production_order","product","start","end","average_throughput","quantity_total","quantity_scrap","quantity_yield","quantity_total_booked","quantity_scrap_booked","quantity_yield_booked","availability","performance","quality","productivity","maximum_run_speed","data_quality","attributes"],"title":"ProductionRun"},"Quantity":{"properties":{"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Physical unit of quantity"},"value":{"type":"number","title":"The quantity expressed in `unit`"}},"type":"object","required":["unit","value"],"title":"Quantity"},"OEEComponent":{"properties":{"score":{"type":"number","title":"Score","description":"The score is expressed as a ratio between 0 and 1.0, with 1.0 meaning 100 %."},"time_loss":{"type":"integer","title":"Time Loss","description":"Time lost (in seconds) due to non-ideal production."}},"type":"object","required":["score","time_loss"],"title":"OEEComponent"},"MaximumRunSpeed":{"properties":{"value":{"type":"number","title":"Maximum Run Speed","description":"The highest speed observed during the observation period."},"observation_period_start":{"type":"string","format":"date-time","title":"Observation Period Start","description":"The start of the MRS observation period in ISO8601 format with timezone info."},"observation_period_end":{"type":"string","format":"date-time","title":"Observation Period End","description":"The end of the MRS observation period in ISO8601 format with timezone info."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of the maximum run speed."}},"type":"object","required":["value","observation_period_start","observation_period_end","unit"],"title":"MaximumRunSpeed"},"platform_api__services__production_runs_data_service__models__DataQuality":{"properties":{"data_coverage":{"type":"number","maximum":1,"minimum":0,"title":"Data Coverage","description":"The percentage of data coverage of the throughput variable for the production run."},"overlap_percentage":{"type":"number","maximum":1,"minimum":0,"title":"Overlap Percentage","description":"The percentage of overlap with other production runs."},"overlap_time":{"type":"integer","minimum":0,"title":"Overlap Time","description":"The time of overlap with other production runs in seconds."}},"type":"object","required":["data_coverage","overlap_percentage","overlap_time"],"title":"DataQuality"},"Attributes":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"string"},{"type":"null"}]},"type":"object","title":"Attributes"},"Metadata":{"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pagination continuation point. Specify its value as the `cursor` parameter in a request with otherwise the same parameters to fetch the next page. `None`, if there is no more data to be fetched from the server."}},"additionalProperties":false,"type":"object","required":["next_cursor"],"title":"Metadata"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/production-runs":{"get":{"tags":["Production Runs"],"summary":"Get Production Runs","description":"Returns a list of all production runs in your organization.","operationId":"get_production_runs_v2_production_runs_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","title":"Get page starting at cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"title":"Maximum number of results to return","description":"Caps the page size. Defaults to 1000, which is also the maximum; a value below 1 or above 1000 is rejected.","default":1000},"description":"Caps the page size. Defaults to 1000, which is also the maximum; a value below 1 or above 1000 is rejected."},{"name":"machine","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"type":"string","format":"uuid"},"maxItems":50},{"type":"null"}],"title":"Filter by one or more machine UUIDs.","description":"If not set, production runs for all machines will be considered."},"description":"If not set, production runs for all machines will be considered."},{"name":"product-external-id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter by the external id of a product.","description":"If not set, all products will be considered."},"description":"If not set, all products will be considered."},{"name":"product","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Filter by product UUID","description":"If not set, all products will be considered."},"description":"If not set, all products will be considered."},{"name":"production-order-external-id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filter by the external id of a production order.","description":"If not set, all production orders will be considered."},"description":"If not set, all production orders will be considered."},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Filter by time, starting from","description":"Only production runs being executed starting at `start` will be returned. If not set, no lower time bound will be assumed."},"description":"Only production runs being executed starting at `start` will be returned. If not set, no lower time bound will be assumed."},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Filter by time, up to","description":"Only production runs being executed up to `end` will be returned. If not set, no upper time bound will be assumed."},"description":"Only production runs being executed up to `end` will be returned. If not set, no upper time bound will be assumed."},{"name":"uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"type":"string","format":"uuid"},"maxItems":50},{"type":"null"}],"title":"Filter by one or more production run UUIDs.","description":"If not set, production runs for all UUIDs will be considered."},"description":"If not set, production runs for all UUIDs will be considered."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(?P<product_external_id>product-external-id:)(?P<product_external_id_value>.*)|^(?P<production_order_external_id>production-order-external-id:)(?P<production_order_external_id_value>.*)"},{"type":"null"}],"title":"Search query","description":"Filter production runs based on a partial match of the external id of the production order **or** product. Use `product-external-id:` and `production-order-external-id:` prefixes to specify the field to search in. "},"description":"Filter production runs based on a partial match of the external id of the production order **or** product. Use `product-external-id:` and `production-order-external-id:` prefixes to specify the field to search in. "},{"name":"order-by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortKey","title":"Sort key","description":"Field the production runs are ordered by, descending when prefixed with `-`. `start` and `end` order by the run's start/end; runs with no end sort first when descending, last when ascending. `maximum_run_speed` orders by the run's maximum run speed; runs without one sort the same way.","default":"-start"},"description":"Field the production runs are ordered by, descending when prefixed with `-`. `start` and `end` order by the run's start/end; runs with no end sort first when descending, last when ascending. `maximum_run_speed` orders by the run's maximum run speed; runs without one sort the same way."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProductionRuns"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Create Production Run

> Book a production run. Runs sharing a \`production\_order\` have to name the same machine and the same product; one that disagrees is rejected. Machines whose production data an external system maintains are refused: that system's next synchronization would remove the run again.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Production Runs"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"NewProductionRun":{"properties":{"machine":{"type":"string","format":"uuid","title":"Machine","description":"The UUID of the machine the production run was executed on."},"product":{"type":"string","format":"uuid","title":"Product","description":"The UUID of the product that was produced. The product has to exist; create it through `/products` first."},"production_order":{"type":"string","minLength":1,"title":"Production Order","description":"The identifier of the production order this run belongs to, as your ERP knows it. Runs sharing an identifier have to name the same machine and the same product."},"start":{"type":"string","format":"date-time","title":"Start","description":"The start of the production run in ISO8601 format with timezone info."},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End","description":"The end of the production run in ISO8601 format with timezone info. `null` books a run that is still being executed."},"quantity_total_booked":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Booked Total Quantity","description":"The total quantity produced, in the machine's quantity unit — a plain number, as the unit is the machine's to state."},"quantity_scrap_booked":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Booked Scrap Quantity","description":"The quantity produced that doesn't meet quality criteria, in the machine's quantity unit."},"quantity_yield_booked":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Booked Yield Quantity","description":"The quantity produced that can be sold, in the machine's quantity unit."}},"type":"object","required":["machine","product","production_order","start"],"title":"NewProductionRun"},"ProductionRun":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"The UUID of the production run."},"machine":{"type":"string","format":"uuid","title":"Machine","description":"The UUID of the machine the production run was executed on."},"production_order":{"type":"string","title":"Production Order","description":"The identifier of the production order."},"product":{"type":"string","format":"uuid","title":"Product","description":"The UUID of the product that was produced."},"start":{"type":"string","format":"date-time","title":"Start","description":"The start of the production run in ISO8601 format with timezone info."},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End","description":"The end of the production run in ISO8601 format with timezone info. If the value of this field is `null`, the production run is not yet finished."},"average_throughput":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Throughput","description":"The average throughput of the production run **excluding** downtimes."},"quantity_total":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Total Quantity","description":"The total quantity produced during the production run, as ENLYZE resolves it from the booked and measured quantities."},"quantity_scrap":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Scrap Quantity","description":"The amount of product produced that doesn't meet quality criteria, as ENLYZE resolves it from the booked and measured quantities."},"quantity_yield":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Yield Quantity","description":"The amount of product produced that can be sold, as ENLYZE resolves it from the booked and measured quantities."},"quantity_total_booked":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Booked Total Quantity","description":"The total quantity as booked for the production run — by your ERP export, by the ENLYZE App, or from the machine's piece counters where ENLYZE detects runs from machine data. `null` if none was booked."},"quantity_scrap_booked":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Booked Scrap Quantity","description":"The scrap quantity as booked for the production run — by your ERP export, by the ENLYZE App, or from the machine's piece counters where ENLYZE detects runs from machine data. `null` if none was booked."},"quantity_yield_booked":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Booked Yield Quantity","description":"The yield quantity as booked for the production run — by your ERP export, by the ENLYZE App, or from the machine's piece counters where ENLYZE detects runs from machine data. `null` if none was booked."},"availability":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Availability","description":"OEE component that reflects when the machine did not produce."},"performance":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Performance","description":"OEE component that reflects how fast the machine has run."},"quality":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Quality","description":"OEE component that reflects how many defects have been produced."},"productivity":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Productivity","description":"Aggregate OEE score that comprises availability, performance and quality."},"maximum_run_speed":{"anyOf":[{"$ref":"#/components/schemas/MaximumRunSpeed"},{"type":"null"}],"title":"Maximum Run Speed","description":"Maximum speed during the production run."},"data_quality":{"anyOf":[{"$ref":"#/components/schemas/platform_api__services__production_runs_data_service__models__DataQuality"},{"type":"null"}],"title":"Data Quality","description":"Data Quality metrics of the production run. A `null` value indicates that the metrics are not yet available, e.g. when a production run is still being executed."},"attributes":{"anyOf":[{"$ref":"#/components/schemas/Attributes"},{"type":"null"}],"title":"Attributes","description":"Arbitrary attributes of the production run."}},"type":"object","required":["uuid","machine","production_order","product","start","end","average_throughput","quantity_total","quantity_scrap","quantity_yield","quantity_total_booked","quantity_scrap_booked","quantity_yield_booked","availability","performance","quality","productivity","maximum_run_speed","data_quality","attributes"],"title":"ProductionRun"},"Quantity":{"properties":{"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Physical unit of quantity"},"value":{"type":"number","title":"The quantity expressed in `unit`"}},"type":"object","required":["unit","value"],"title":"Quantity"},"OEEComponent":{"properties":{"score":{"type":"number","title":"Score","description":"The score is expressed as a ratio between 0 and 1.0, with 1.0 meaning 100 %."},"time_loss":{"type":"integer","title":"Time Loss","description":"Time lost (in seconds) due to non-ideal production."}},"type":"object","required":["score","time_loss"],"title":"OEEComponent"},"MaximumRunSpeed":{"properties":{"value":{"type":"number","title":"Maximum Run Speed","description":"The highest speed observed during the observation period."},"observation_period_start":{"type":"string","format":"date-time","title":"Observation Period Start","description":"The start of the MRS observation period in ISO8601 format with timezone info."},"observation_period_end":{"type":"string","format":"date-time","title":"Observation Period End","description":"The end of the MRS observation period in ISO8601 format with timezone info."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of the maximum run speed."}},"type":"object","required":["value","observation_period_start","observation_period_end","unit"],"title":"MaximumRunSpeed"},"platform_api__services__production_runs_data_service__models__DataQuality":{"properties":{"data_coverage":{"type":"number","maximum":1,"minimum":0,"title":"Data Coverage","description":"The percentage of data coverage of the throughput variable for the production run."},"overlap_percentage":{"type":"number","maximum":1,"minimum":0,"title":"Overlap Percentage","description":"The percentage of overlap with other production runs."},"overlap_time":{"type":"integer","minimum":0,"title":"Overlap Time","description":"The time of overlap with other production runs in seconds."}},"type":"object","required":["data_coverage","overlap_percentage","overlap_time"],"title":"DataQuality"},"Attributes":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"string"},{"type":"null"}]},"type":"object","title":"Attributes"},"MachineNotFoundError":{"properties":{"type":{"type":"string","const":"machine_not_found","title":"Type","default":"machine_not_found"}},"type":"object","title":"MachineNotFoundError"},"ProductNotFoundError":{"properties":{"type":{"type":"string","const":"product_not_found","title":"Type","default":"product_not_found"}},"type":"object","title":"ProductNotFoundError"},"ProductionOrderMachineConflictError":{"properties":{"type":{"type":"string","const":"production_order_machine_conflict","title":"Type","default":"production_order_machine_conflict"},"conflict":{"$ref":"#/components/schemas/ConflictingMachine","title":"Conflicting Machine","description":"The machine the other runs with this identifier name."}},"type":"object","required":["conflict"],"title":"ProductionOrderMachineConflictError"},"ConflictingMachine":{"properties":{"machine":{"type":"string","format":"uuid","title":"Conflicting Machine UUID"}},"type":"object","required":["machine"],"title":"ConflictingMachine"},"ProductionOrderProductConflictError":{"properties":{"type":{"type":"string","const":"production_order_product_conflict","title":"Type","default":"production_order_product_conflict"},"conflict":{"$ref":"#/components/schemas/ConflictingProduct","title":"Conflicting Product","description":"The product the other runs with this identifier name."}},"type":"object","required":["conflict"],"title":"ProductionOrderProductConflictError"},"ConflictingProduct":{"properties":{"product":{"type":"string","format":"uuid","title":"Conflicting Product UUID"}},"type":"object","required":["product"],"title":"ConflictingProduct"},"SynchronizedFromExternalSystemError":{"properties":{"type":{"type":"string","const":"synchronized_from_external_system","title":"Type","default":"synchronized_from_external_system"}},"type":"object","title":"SynchronizedFromExternalSystemError"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"LockTimeoutError":{"properties":{"type":{"type":"string","const":"lock_timeout","title":"Type","default":"lock_timeout"}},"type":"object","title":"LockTimeoutError"}}},"paths":{"/v2/production-runs":{"post":{"tags":["Production Runs"],"summary":"Create Production Run","description":"Book a production run. Runs sharing a `production_order` have to name the same machine and the same product; one that disagrees is rejected. Machines whose production data an external system maintains are refused: that system's next synchronization would remove the run again.","operationId":"create_production_run_v2_production_runs_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewProductionRun"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionRun"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/MachineNotFoundError"},{"$ref":"#/components/schemas/ProductNotFoundError"}],"discriminator":{"propertyName":"type","mapping":{"machine_not_found":"#/components/schemas/MachineNotFoundError","product_not_found":"#/components/schemas/ProductNotFoundError"}},"title":"Response 404 Create Production Run V2 Production Runs Post"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProductionOrderMachineConflictError"},{"$ref":"#/components/schemas/ProductionOrderProductConflictError"},{"$ref":"#/components/schemas/SynchronizedFromExternalSystemError"}],"discriminator":{"propertyName":"type","mapping":{"production_order_machine_conflict":"#/components/schemas/ProductionOrderMachineConflictError","production_order_product_conflict":"#/components/schemas/ProductionOrderProductConflictError","synchronized_from_external_system":"#/components/schemas/SynchronizedFromExternalSystemError"}},"title":"Response 409 Create Production Run V2 Production Runs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/LockTimeoutError"}],"discriminator":{"propertyName":"type","mapping":{"lock_timeout":"#/components/schemas/LockTimeoutError"}},"title":"Response 503 Create Production Run V2 Production Runs Post"}}}}}}}}}
```

## Get Production Run

> Returns details for a specific production run.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Production Runs"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"ProductionRun":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid","description":"The UUID of the production run."},"machine":{"type":"string","format":"uuid","title":"Machine","description":"The UUID of the machine the production run was executed on."},"production_order":{"type":"string","title":"Production Order","description":"The identifier of the production order."},"product":{"type":"string","format":"uuid","title":"Product","description":"The UUID of the product that was produced."},"start":{"type":"string","format":"date-time","title":"Start","description":"The start of the production run in ISO8601 format with timezone info."},"end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End","description":"The end of the production run in ISO8601 format with timezone info. If the value of this field is `null`, the production run is not yet finished."},"average_throughput":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Throughput","description":"The average throughput of the production run **excluding** downtimes."},"quantity_total":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Total Quantity","description":"The total quantity produced during the production run, as ENLYZE resolves it from the booked and measured quantities."},"quantity_scrap":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Scrap Quantity","description":"The amount of product produced that doesn't meet quality criteria, as ENLYZE resolves it from the booked and measured quantities."},"quantity_yield":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Yield Quantity","description":"The amount of product produced that can be sold, as ENLYZE resolves it from the booked and measured quantities."},"quantity_total_booked":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Booked Total Quantity","description":"The total quantity as booked for the production run — by your ERP export, by the ENLYZE App, or from the machine's piece counters where ENLYZE detects runs from machine data. `null` if none was booked."},"quantity_scrap_booked":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Booked Scrap Quantity","description":"The scrap quantity as booked for the production run — by your ERP export, by the ENLYZE App, or from the machine's piece counters where ENLYZE detects runs from machine data. `null` if none was booked."},"quantity_yield_booked":{"anyOf":[{"$ref":"#/components/schemas/Quantity"},{"type":"null"}],"title":"Booked Yield Quantity","description":"The yield quantity as booked for the production run — by your ERP export, by the ENLYZE App, or from the machine's piece counters where ENLYZE detects runs from machine data. `null` if none was booked."},"availability":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Availability","description":"OEE component that reflects when the machine did not produce."},"performance":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Performance","description":"OEE component that reflects how fast the machine has run."},"quality":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Quality","description":"OEE component that reflects how many defects have been produced."},"productivity":{"anyOf":[{"$ref":"#/components/schemas/OEEComponent"},{"type":"null"}],"title":"OEE Productivity","description":"Aggregate OEE score that comprises availability, performance and quality."},"maximum_run_speed":{"anyOf":[{"$ref":"#/components/schemas/MaximumRunSpeed"},{"type":"null"}],"title":"Maximum Run Speed","description":"Maximum speed during the production run."},"data_quality":{"anyOf":[{"$ref":"#/components/schemas/platform_api__services__production_runs_data_service__models__DataQuality"},{"type":"null"}],"title":"Data Quality","description":"Data Quality metrics of the production run. A `null` value indicates that the metrics are not yet available, e.g. when a production run is still being executed."},"attributes":{"anyOf":[{"$ref":"#/components/schemas/Attributes"},{"type":"null"}],"title":"Attributes","description":"Arbitrary attributes of the production run."}},"type":"object","required":["uuid","machine","production_order","product","start","end","average_throughput","quantity_total","quantity_scrap","quantity_yield","quantity_total_booked","quantity_scrap_booked","quantity_yield_booked","availability","performance","quality","productivity","maximum_run_speed","data_quality","attributes"],"title":"ProductionRun"},"Quantity":{"properties":{"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Physical unit of quantity"},"value":{"type":"number","title":"The quantity expressed in `unit`"}},"type":"object","required":["unit","value"],"title":"Quantity"},"OEEComponent":{"properties":{"score":{"type":"number","title":"Score","description":"The score is expressed as a ratio between 0 and 1.0, with 1.0 meaning 100 %."},"time_loss":{"type":"integer","title":"Time Loss","description":"Time lost (in seconds) due to non-ideal production."}},"type":"object","required":["score","time_loss"],"title":"OEEComponent"},"MaximumRunSpeed":{"properties":{"value":{"type":"number","title":"Maximum Run Speed","description":"The highest speed observed during the observation period."},"observation_period_start":{"type":"string","format":"date-time","title":"Observation Period Start","description":"The start of the MRS observation period in ISO8601 format with timezone info."},"observation_period_end":{"type":"string","format":"date-time","title":"Observation Period End","description":"The end of the MRS observation period in ISO8601 format with timezone info."},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit","description":"Unit of the maximum run speed."}},"type":"object","required":["value","observation_period_start","observation_period_end","unit"],"title":"MaximumRunSpeed"},"platform_api__services__production_runs_data_service__models__DataQuality":{"properties":{"data_coverage":{"type":"number","maximum":1,"minimum":0,"title":"Data Coverage","description":"The percentage of data coverage of the throughput variable for the production run."},"overlap_percentage":{"type":"number","maximum":1,"minimum":0,"title":"Overlap Percentage","description":"The percentage of overlap with other production runs."},"overlap_time":{"type":"integer","minimum":0,"title":"Overlap Time","description":"The time of overlap with other production runs in seconds."}},"type":"object","required":["data_coverage","overlap_percentage","overlap_time"],"title":"DataQuality"},"Attributes":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"number"},{"type":"string"},{"type":"null"}]},"type":"object","title":"Attributes"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/production-runs/{uuid}":{"get":{"tags":["Production Runs"],"summary":"Get Production Run","description":"Returns details for a specific production run.","operationId":"get_production_run_v2_production_runs__uuid__get","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the production run."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductionRun"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```
