Call the API
Base URL, authentication, pagination, idempotency, errors and limits.
The API lives at https://linkyhub.net/api/v3. Every endpoint is listed in the API reference, which you can try in the browser, and the OpenAPI document is at /api/v3/openapi.json.
curl "$LINKHUB_URL/api/v3/products" -H "Authorization: Bearer $ACCESS_TOKEN"Pagination
Every list returns { "data": [...], "nextCursor": "..." }. Pass ?cursor= with the last nextCursor to get the next page; a null cursor means you have everything.
Lists also repeat data under a key named after what they hold, such as products or orders. Those keys are deprecated and kept only so older integrations keep working, so read data.
GET /products also takes updatedSince (ISO 8601) to return only what changed since your last sync, and every product carries updatedAt.
Idempotency
Two writes take an Idempotency-Key header (up to 200 characters):
Refunds require one. Sending the same key again returns the first refund instead of making a second one, so a retry after a timeout is safe.
POST /productstakes one optionally. Within 24 hours the same key returns the first product instead of creating another, and the same key with a different body is409 conflict. After 24 hours the key is free again.
Keys are per app and creator, so two apps cannot collide.
Errors
{ "error": "insufficient_scope", "message": "This token was not granted products:write." }Branch on error; show message.
Code | Status | Meaning |
|---|---|---|
| 401 | No bearer token |
| 401 | Expired or revoked: refresh |
| 403 | Names the scope you need |
| 400 | Malformed |
| 404 | No such thing, or not this creator's |
| 409 | The state does not allow it, or an Idempotency-Key or externalId was already used |
| 429 | Honour |
| 500 | Ours |
Limits
600 requests a minute per app and creator. Every authenticated response says where you stand:
Header | Meaning |
|---|---|
| Requests allowed in the window (600) |
| Requests left in the window |
| Seconds until the window resets |
Over the limit you get 429 rate_limited with Retry-After in seconds.
Orders
Every order carries updatedAt. GET /orders?updatedSince=<ISO 8601> returns only orders changed at or after that instant, for incremental sync.
Fees. Linky Hub takes no cut of any sale, on any plan: platformFeeCents is always 0. processingFeeCents (what Stripe or PayPal kept) is not recorded on the order, so it is null, and so is netCents (amountCents minus both fees). Both are known (0 and amountCents) on a test order. shippingCents and taxCents are 0, because checkout adds no separate shipping or tax line.
Shipping address. A product with isPhysical: true collects one at checkout, and its orders stay PAID until fulfilled. With orders:read_customer, buyer.shippingAddress is null for a digital order. For a physical one it is:
Field | |
|---|---|
| string or null |
| string or null |
| string or null |
| string or null |
| string or null: state, province or region |
| string or null |
| ISO 3166-1 alpha-2, such as |
| string or null; usually null |
The shape is the same whether Stripe or PayPal took the payment.
Fulfilment. POST /orders/{orderId}/fulfil takes optional trackingNumber (up to 100 characters), carrier (up to 50), trackingUrl and notifyBuyer (email the buyer). A second call replaces the tracking. Orders return trackingNumber, carrier, trackingUrl and fulfilledAt.
Test mode. POST /test/orders (orders:write) takes { productId, variantId?, buyer? }. It makes a PAID order with test: true and fires order.paid. It works only for an app that is not yet approved, acting for its owner, or for a personal API key. Refund a test order with POST /test/orders/{orderId}/refunds (orders:write): no Stripe call and no orders:refund needed. Test orders are left out of earnings, analytics, payouts and salesCount, and their buyers are never emailed. Event payloads for them carry test: true.
Things worth knowing
A product can have variants (size, colour and so on). Each variant can carry its own price and stock; a variant with no price uses the product's.
A product's first image is its cover.
Refunds can be partial. An order becomes
PARTIALLY_REFUNDEDorREFUNDED, and you cannot refund more than was paid.Money is in the smallest currency unit (cents).
To put an image on a page or product, upload it first:
POST /mediaasmultipart/form-datawith afilepart (media:write). Use theurlit returns in block settings or product images. Uploading is REST only; MCP has no file parts.Adding a custom domain and checking its DNS share a stricter limit than the rest of the API, as does submitting templates to the gallery.