ERP waybills, returns and exchanges
On provisioned stores enabled for this contract, normal ERP apps can register an already-booked forward waybill with PUT /api/app-center/v1/orders/{id}/fulfillment (orders.write and a unique Idempotency-Key). Read it with GET on the same path (orders.read). Send awb_number and optional tracking_number, HTTPS tracking_link and public PDF label_url. Registration changes no order status, payment or stock and does not book a courier. Existing or differently owned waybills return 409; the owning installation may update tracking or repair a label with the same AWB and a fresh key.
ERP apps with returns.read receive return.created and supported return.updated events. Enabled return responses expose request_kind (return, exchange, mixed) and return_context: return_id, original_order_id, exchange_id, replacement_order_id, exchange_state, returned_items, replacement_items and related_shipments. Order reads/events expose return_contexts; use is_replacement to identify a replacement order. Store-configured action IDs are not universal enums.
A Return/Exchange dropdown choice does not automatically book shipments. The merchant selects replacement items, satisfies the credit/payment requirements and releases the replacement order, then explicitly requests the reverse and replacement forward shipments. A Shipping-only app receives shipment.creating with direction return or forward and the shared return_context when linked; it does not receive general return events without returns.read. Attach and track each leg separately. GET /shipments/{id} refreshes the related pair after the other leg exists.
App Center shipment_id is unique across stores within one environment, and access remains installation-scoped. Internal merchant shipment IDs, order_id, return_id and exchange_id are store-local; index them with store_id. Read the API reference for request examples, PDF limits, safe retries and availability.