products
GET
https://linkyhub.net/api/v3 /products Scope products:readProducts, newest first, with prices, images, variants, stock and sales. Paginated.
Parameters
limitintegerquerycursorstringqueryupdatedSincestringqueryexternalIdstringqueryCode samples
cURL
curl -X GET "https://linkyhub.net/api/v3/products" \
-H "Authorization: Bearer $LINKYHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Done.
Example
{
"data": [
{
"id": "string",
"blockId": "string",
"kind": "string",
"name": "string",
"description": "string",
"images": [
{
"id": "string",
"url": "string",
"alt": "string",
"position": 0
}
],
"priceCents": 0,
"compareAtCents": 0,
"currency": "string",
"isActive": true,
"isPhysical": true,
"soldOut": true,
"inventory": 0,
"variants": [
{
"id": "string",
"name": "string",
"sku": "string",
"priceCents": 0,
"compareAtCents": 0,
"inventory": 0,
"position": 0,
"isActive": true
}
],
"salesCount": 0,
"source": "block",
"editableInPlace": true,
"externalId": "string",
"url": "string",
"updatedAt": "2024-01-01T00:00:00Z"
}
],
"products": [
{
"id": "string",
"blockId": "string",
"kind": "string",
"name": "string",
"description": "string",
"images": [
{
"id": "string",
"url": "string",
"alt": "string",
"position": 0
}
],
"priceCents": 0,
"compareAtCents": 0,
"currency": "string",
"isActive": true,
"isPhysical": true,
"soldOut": true,
"inventory": 0,
"variants": [
{
"id": "string",
"name": "string",
"sku": "string",
"priceCents": 0,
"compareAtCents": 0,
"inventory": 0,
"position": 0,
"isActive": true
}
],
"salesCount": 0,
"source": "block",
"editableInPlace": true,
"externalId": "string",
"url": "string",
"updatedAt": "2024-01-01T00:00:00Z"
}
],
"nextCursor": "string"
}Schema
dataobject[]requiredShow child parameters
idstringrequiredblockIdstringrequiredkindstringrequirednamestringrequireddescriptionstringrequiredimagesobject[]requiredShow child parameters
idstringrequiredurlstringrequiredaltstringrequiredpositionintegerrequiredpriceCentsintegerrequiredcompareAtCentsintegerrequiredcurrencystringrequiredisActivebooleanrequiredisPhysicalbooleanrequiredsoldOutbooleanrequiredinventoryintegerrequiredvariantsobject[]requiredShow child parameters
idstringrequirednamestringrequiredskustringrequiredpriceCentsintegerrequiredcompareAtCentsintegerrequiredinventoryintegerrequiredpositionintegerrequiredisActivebooleanrequiredsalesCountintegerrequiredsourcestringrequirededitableInPlacebooleanrequiredexternalIdstringrequiredYour own id for the product, as you set it. Other apps never see it.
urlstringrequiredThe product on the creator’s public page; null when no block sells it.
updatedAtstringrequiredThe latest change to the product or any of its variants.
productsobject[]Deprecated: the same array as data.
Show child parameters
idstringrequiredblockIdstringrequiredkindstringrequirednamestringrequireddescriptionstringrequiredimagesobject[]requiredShow child parameters
idstringrequiredurlstringrequiredaltstringrequiredpositionintegerrequiredpriceCentsintegerrequiredcompareAtCentsintegerrequiredcurrencystringrequiredisActivebooleanrequiredisPhysicalbooleanrequiredsoldOutbooleanrequiredinventoryintegerrequiredvariantsobject[]requiredShow child parameters
idstringrequirednamestringrequiredskustringrequiredpriceCentsintegerrequiredcompareAtCentsintegerrequiredinventoryintegerrequiredpositionintegerrequiredisActivebooleanrequiredsalesCountintegerrequiredsourcestringrequirededitableInPlacebooleanrequiredexternalIdstringrequiredYour own id for the product, as you set it. Other apps never see it.
urlstringrequiredThe product on the creator’s public page; null when no block sells it.
updatedAtstringrequiredThe latest change to the product or any of its variants.
nextCursorstringrequiredPass as ?cursor= for the next page; null on the last.
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Example
{
"error": "string",
"message": "string"
}Schema
errorstringrequiredA stable code to branch on, e.g. insufficient_scope.
messagestringrequiredA sentence to show a person.
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
POST
https://linkyhub.net/api/v3 /products Scope products:writeCreate a product, and the block that sells it, with optional images and variants. Live immediately. An optional Idempotency-Key header makes a retry return the first product (kept 24 hours).
Parameters
Idempotency-KeystringheaderRepeating it within 24 hours returns the first product; with a different body, a 409.
Request body
application/json
namestringrequireddescriptionstringPlain text; line breaks are kept.
imagesobject[]The whole gallery, cover first.
Show child parameters
urlstringrequiredaltstringWhat the image shows, for screen readers.
priceCentsintegerrequiredIn the smallest currency unit: 12.50 is 1250.
compareAtCentsintegerShown struck through. Null clears it.
currencystringISO 4217. Defaults to USD.
soldOutbooleanallowCustomAmountbooleanPay what you want: the buyer picks the amount.
minimumCentsintegerWith allowCustomAmount: the lowest amount accepted.
isPhysicalbooleanShipped goods: checkout collects a shipping address and the order waits for fulfilment.
inventoryintegerUnits in stock; null for unlimited.
pageIdstringDefaults to the main page.
variantsobject[]Show child parameters
namestringrequiredShown to buyers, e.g. "Large / Blue".
skustringpriceCentsintegerNull or omitted: the product price.
compareAtCentsintegerinventoryintegerNull or omitted: untracked.
isActivebooleanexternalIdstringYour own id for it, unique per creator for your app.
{
"name": "string",
"description": "string",
"images": [
{
"url": "string",
"alt": "string"
}
],
"priceCents": 0,
"compareAtCents": 0,
"currency": "string",
"soldOut": true,
"allowCustomAmount": true,
"minimumCents": 0,
"isPhysical": true,
"inventory": 0,
"pageId": "string",
"variants": [
{
"name": "string",
"sku": "string",
"priceCents": 0,
"compareAtCents": 0,
"inventory": 0,
"isActive": true
}
],
"externalId": "string"
}Code samples
cURL
curl -X POST "https://linkyhub.net/api/v3/products" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-H "Idempotency-Key: <value>" \
-H "Content-Type: application/json" \
-d '{"name":"string","description":"string","images":[{"url":"string","alt":"string"}],"priceCents":0,"compareAtCents":0,"currency":"string","soldOut":true,"allowCustomAmount":true,"minimumCents":0,"isPhysical":true,"inventory":0,"pageId":"string","variants":[{"name":"string","sku":"string","priceCents":0,"compareAtCents":0,"inventory":0,"isActive":true}],"externalId":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201 Done.
Example
{
"id": "string",
"blockId": "string",
"kind": "string",
"name": "string",
"description": "string",
"images": [
{
"id": "string",
"url": "string",
"alt": "string",
"position": 0
}
],
"priceCents": 0,
"compareAtCents": 0,
"currency": "string",
"isActive": true,
"isPhysical": true,
"soldOut": true,
"inventory": 0,
"variants": [
{
"id": "string",
"name": "string",
"sku": "string",
"priceCents": 0,
"compareAtCents": 0,
"inventory": 0,
"position": 0,
"isActive": true
}
],
"salesCount": 0,
"source": "block",
"editableInPlace": true,
"externalId": "string",
"url": "string",
"updatedAt": "2024-01-01T00:00:00Z"
}Schema
idstringrequiredblockIdstringrequiredkindstringrequirednamestringrequireddescriptionstringrequiredimagesobject[]requiredShow child parameters
idstringrequiredurlstringrequiredaltstringrequiredpositionintegerrequiredpriceCentsintegerrequiredcompareAtCentsintegerrequiredcurrencystringrequiredisActivebooleanrequiredisPhysicalbooleanrequiredsoldOutbooleanrequiredinventoryintegerrequiredvariantsobject[]requiredShow child parameters
idstringrequirednamestringrequiredskustringrequiredpriceCentsintegerrequiredcompareAtCentsintegerrequiredinventoryintegerrequiredpositionintegerrequiredisActivebooleanrequiredsalesCountintegerrequiredsourcestringrequirededitableInPlacebooleanrequiredexternalIdstringrequiredYour own id for the product, as you set it. Other apps never see it.
urlstringrequiredThe product on the creator’s public page; null when no block sells it.
updatedAtstringrequiredThe latest change to the product or any of its variants.
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /products
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
GET
https://linkyhub.net/api/v3 /products/{productId} Scope products:readOne product in full, with its images and variants.
Parameters
productIdstringpathrequiredCode samples
cURL
curl -X GET "https://linkyhub.net/api/v3/products/{productId}" \
-H "Authorization: Bearer $LINKYHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Done.
Same as 201 · POST /products
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /products
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
DELETE
https://linkyhub.net/api/v3 /products/{productId} Scope products:writeDelete a product that has never sold, and its block. Sold products can only be deactivated.
Parameters
productIdstringpathrequiredCode samples
cURL
curl -X DELETE "https://linkyhub.net/api/v3/products/{productId}" \
-H "Authorization: Bearer $LINKYHUB_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Done.
{}Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /products
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
Updated