Creates multiple serial numbers in a single batch for a given job and path. Serial numbers are assigned sequential identifiers from a persistent counter (e.g. SN-00001, SN-00002), ensuring uniqueness across the entire system. Each created serial starts at step index 0 with status in_progress. The system initializes per-step status records for every step in the path. Optionally, provide a certId to auto-attach a certificate to every serial at the first step.
The response shape is identical — certificate attachments are created as a side effect but are not reflected in the SerialNumber response. Use Get Cert Attachments to verify the attachment.
Serial identifiers are globally sequential across the entire system. If the last created serial was SN-00050, the next batch starts at SN-00051 regardless of job or path. The counter is persisted in the database and survives server restarts.
The certId parameter triggers automatic certificate attachment to all serials in the batch at the first step (step index 0). For step-specific cert attachments, use the Attach Certificate endpoint after advancing the serial.
An audit trail entry of type serial_created is recorded for the batch, capturing the userId, jobId, pathId, and batchQuantity. Individual serial IDs are not recorded in the batch audit entry.
Step status initialization happens atomically with serial creation. If the path has 5 steps, each serial will have 5 SnStepStatus records: step 0 as in_progress, steps 1-4 as pending.
There is no upper limit on quantity enforced by the API. The path's goalQuantity is not enforced — you can create more serials than the goal.
The userId field in the request body (if provided) is used for audit tracking. If omitted, it defaults to "anonymous".