Create Production Logs
Create one or many Production Logs. The body is a JSON array, even for a single record.
This is the endpoint an MES, ERP or shop-floor terminal uses to push production into
Pulsar. machine and sku are references that accept either an id or a name, so a
system that only knows line names and product codes does not have to resolve Pulsar ids
first.
A Production Log describes a closed interval: start and end are both required. To
record what is happening in the shift a machine is running right now, use the realtime
endpoints instead.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/production-logs" \ -H "Content-Type: application/json" \ -d '[ { "count": 1000, "nominalSpeed": 60, "start": "2024-01-01T08:00:00", "end": "2024-01-01T16:00:00", "machine": {}, "sku": {} } ]'[ { "id": "36f7b519-d93e-4ec8-8245-7f4b8c123456", "type": "correct", "sensorCount": 500, "count": 1000, "nominalSpeed": 60, "countingFactor": 1, "start": "2024-01-01T00:00:00", "end": "2024-01-01T08:00:00", "isReviewed": true, "isAutomated": true, "machineId": 12, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "live": true, "machine": { "id": 0, "name": "string", "isCountEnabled": true, "externalName": "string" }, "company": { "id": 0, "name": "string", "timezone": "string" }, "shift": { "id": 0, "name": "string", "start": "2019-08-24T14:15:22Z", "end": "2019-08-24T14:15:22Z", "isConsidered": true }, "operator": { "id": 0, "firstName": "string", "lastName": "string", "email": "string" }, "sku": { "id": "string", "name": "string", "description": "string", "unit": "string" }, "workOrder": { "id": "string", "name": "string", "description": "string", "status": "InProgress" }, "simpleWorkOrder": { "id": "string", "name": "string" } }]Delete an operator DELETE
Delete an operator from the roster. Production logs and shifts that reference the operator are left pointing at a record that no longer resolves, so for someone who has simply left, leaving the record in place preserves the history their shifts are attached to.
Search Production Logs POST
Search Production Logs by machine, SKU, date, quantity or review state. A `POST` because the filter body nests, but it only reads: the `production_logs.read` scope is sufficient. Send `{}` to get the first page with the defaults (`page` 1, `limit` 10). Filters are optional and combine with AND.