🗺️Issuance Flow (End-to-End)
End-to-end recommended flow for issuing SRRs — single and bulk, with new files or reusing previously uploaded files. Flowcharts + step tables.
This page shows the recommended order of API calls to issue SRRs, from file upload to mining confirmation. For payload bodies see Request Payloads & Recipes; for failures see Errors & Troubleshooting.
The big picture
The same six steps apply to single and bulk — bulk just carries more entries in the same two arrays (signedUrls.payload[] for files, srrs.payload[] for SRRs).
Flow A — single SRR with a new file
1
Request signed URL
POST /commerce/signedUrls
filename (unique per issuer, no spaces, with extension) + category (see the category table) + action: "write"
url (upload target), finalUrl (store it!), contentType
2
Upload
HTTP PUT to url
the file bytes, Content-Type from step 1
200
3
Wait for readiness
POST /commerce/fileMetadata
same filename + category
poll until hash and cid are present (usually a few minutes)
4
Issue
POST /commerce/srrs
requestId (fresh UUID) + payload[0] with metadata.thumbnailURL / image (= finalUrl), optional attachmentFiles
201 with tokenId, metadataCID, status: waiting_for_mining
Flow B — bulk issuance (many SRRs, many files)
Bulk is the same flow with batched arrays — do not loop the single flow per SRR.
Key differences from single:
Files per signedUrls / fileMetadata call
Any number (payload[] array) — batch them, upload in parallel
SRRs per srrs call
1..n in payload[]; ≤ 250 recommended (no hard cap)
Atomicity
All-or-nothing: one failed entry cancels the whole batch — fix the entry named in results[] and resubmit everything
Readiness
Wait until every referenced file has hash + cid before issuing — one not-ready file fails the whole batch
NFC tags
The chip sum across all entries must fit the LUW's NFC allowance — see NFC errors
Idempotency
One requestId for the whole batch; reuse is rejected (Duplicate Request Error)
Flow C — reusing previously uploaded files
Files stay in storage and keep their finalUrl, hash and cid forever — upload once, reference many times.
Store
finalUrls alongside your own records at upload time — that makes reuse a zero-step operation.A reused file needs no re-upload and no polling: its
hash/cidwere computed after the original upload.Reuse is natural when: many editions share one artwork image, a shared contract-terms PDF, or re-issuing after a failed batch.
Filenames are unique per
issuer-address— you cannot re-upload a new file under a used name; pick a new name for new content. Identical content under a different name resolves to the same CID on IPFS, so duplicates are harmless.
Checklist (for humans and LLMs)
Common pitfalls
Issuing before cid is ready
400 … not ready for IPFS publication … / Attachment hash not ready …
Step 3 — poll /fileMetadata first
External file URL (your own CDN, Shopify, …)
400 File URLs must be Startbahn storage URLs …
Always use the finalUrl
Private category for a thumbnail/image
400 … must be publicly accessible …
Upload with non_attachment_file
Reusing a requestId
400 Duplicate Request Error
Fresh UUID per request; reuse only intended as a retry-guard
Retrying a failed bulk with the same body
400 Request Content Error: … already logged
Fix the failing entry, keep a new requestId
Last updated
Was this helpful?