REST API
PrintFlow TR API
The order endpoint and webhook events for connecting your store or ERP.
API keys → The key is shown only once at creation; store it securely.
Authentication
Send your key in the Authorization: Bearer pf_live_… header. Keys are created in the dashboard and shown only once.
Create order
POST /api/v1/orders
curl -X POST https://printflowtr.com/api/v1/orders \
-H "Authorization: Bearer pf_live_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: shopify-order-1042" \
-d '{
"customerName": "Ayşe Yılmaz",
"customerEmail": "[email protected]",
"title": "Telefon standı",
"quantity": 2,
"unitPrice": 150,
"shippingPrice": 60,
"externalId": "1042"
}'Fields: customerName, customerEmail (required); title, quantity, unitPrice, shippingPrice, note, customerPhone, customerCity, externalId (optional).
{
"id": "b0f2...-uuid",
"status": "accepted",
"totalPrice": 360,
"currency": "TRY",
"token": "a1b2c3...",
"trackUrl": "https://printflowtr.com/track/a1b2c3..."
}GET /api/v1/orders/:id returns the current status.
Idempotency (duplicate protection)
Send an "Idempotency-Key" header. A repeated request with the same key returns the first response (no duplicate order).
Webhook events
Register endpoints in the dashboard; we POST signed JSON on these events:
order.createdorder.status_changedorder.shippedorder.deliveredorder.cancelledmodel.soldtransfer.requestedtransfer.accepted
POST /sizin-webhook-adresiniz
X-PrintFlow-Event: order.created
X-PrintFlow-Signature: sha256=<HMAC-SHA256(secret, body)>
{ "event": "order.created", "sentAt": "...", "data": { ... } }