orders

Embed
Preview of the card
<a href="https://linkyhub.net/docs/ref-orders"><img src="https://linkyhub.net/docs/_api/public/orgs/2fd2a4b7-b627-4925-af1e-1c51bf890403/spaces/c4b920fb-a433-40b5-b354-ff84bf0c3eb1/pages/f3714481-a60b-4666-a03c-1f919469972a/social-card.svg?v=3e7ae33eec8b" alt="orders" width="600" height="315"></a>
GEThttps://linkyhub.net/api/v3/ordersScope orders:read

Sales, newest first. Buyer details only with orders:read_customer. Paginated.

Parameters

statusstringquery
PENDING | PAID | FULFILLED | REFUNDED | PARTIALLY_REFUNDED | FAILED | CANCELED
productIdstringquery
sincestringquery
updatedSincestringquery
limitintegerquery
cursorstringquery

Code samples

cURL
curl -X GET "https://linkyhub.net/api/v3/orders" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
Example
{
  "data": [
    {}
  ]
}
Schema
dataobject[]required
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.
Example
{
  "error": "string",
  "message": "string"
}
Schema
errorstringrequired
A stable code to branch on, e.g. insufficient_scope.
messagestringrequired
A sentence to show a person.
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
GEThttps://linkyhub.net/api/v3/orders/{orderId}Scope orders:read

One order. Buyer details only with orders:read_customer.

Parameters

orderIdstringpathrequired

Code samples

cURL
curl -X GET "https://linkyhub.net/api/v3/orders/{orderId}" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /orders

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
POSThttps://linkyhub.net/api/v3/orders/{orderId}/fulfilScope orders:write

Mark a paid order fulfilled (shipped), with optional tracking. Calling it again replaces the tracking.

Parameters

orderIdstringpathrequired

Request body

application/json
trackingNumberstring
carrierstring
e.g. "USPS", "Royal Mail".
trackingUrlstring
notifyBuyerboolean
Email the buyer that it shipped, with the tracking. Never sent for a test order.
{
  "trackingNumber": "string",
  "carrier": "string",
  "trackingUrl": "string",
  "notifyBuyer": true
}

Code samples

cURL
curl -X POST "https://linkyhub.net/api/v3/orders/{orderId}/fulfil" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"trackingNumber":"string","carrier":"string","trackingUrl":"string","notifyBuyer":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /orders

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
POSThttps://linkyhub.net/api/v3/orders/{orderId}/resend-receiptScope orders:write

Email the buyer their receipt again.

Parameters

orderIdstringpathrequired

Code samples

cURL
curl -X POST "https://linkyhub.net/api/v3/orders/{orderId}/resend-receipt" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /orders

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
POSThttps://linkyhub.net/api/v3/orders/{orderId}/grant-downloadsScope orders:write

Give a buyer more downloads and a fresh 30-day window.

Parameters

orderIdstringpathrequired

Request body

application/json
extrainteger
{
  "extra": 0
}

Code samples

cURL
curl -X POST "https://linkyhub.net/api/v3/orders/{orderId}/grant-downloads" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"extra":0}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /orders

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
GEThttps://linkyhub.net/api/v3/orders/{orderId}/refundsScope orders:read

Refunds issued against an order.

Parameters

orderIdstringpathrequired

Code samples

cURL
curl -X GET "https://linkyhub.net/api/v3/orders/{orderId}/refunds" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /orders

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
POSThttps://linkyhub.net/api/v3/orders/{orderId}/refundsScope orders:refund

Refund an order in full or in part, on the creator’s own payment account. Requires an Idempotency-Key header; repeating it returns the first refund instead of refunding again.

Parameters

orderIdstringpathrequired
Idempotency-Keystringheaderrequired

Request body

application/json
amountCentsinteger
Omitted: everything not yet refunded.
reasonstring
{
  "amountCents": 0,
  "reason": "string"
}

Code samples

cURL
curl -X POST "https://linkyhub.net/api/v3/orders/{orderId}/refunds" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY" \
  -H "Idempotency-Key: <value>" \
  -H "Content-Type: application/json" \
  -d '{"amountCents":0,"reason":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /orders

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
Updated