products

Embed
Preview of the card
<a href="https://linkyhub.net/docs/ref-products"><img src="https://linkyhub.net/docs/_api/public/orgs/2fd2a4b7-b627-4925-af1e-1c51bf890403/spaces/c4b920fb-a433-40b5-b354-ff84bf0c3eb1/pages/ecc8d52b-590a-48e5-8440-c41fcd879e7b/social-card.svg?v=3e7ae33eec8b" alt="products" width="600" height="315"></a>
GEThttps://linkyhub.net/api/v3/productsScope products:read

Products, newest first, with prices, images, variants, stock and sales. Paginated.

Parameters

limitintegerquery
cursorstringquery
updatedSincestringquery
externalIdstringquery

Code 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[]required
Show child parameters
idstringrequired
blockIdstringrequired
kindstringrequired
namestringrequired
descriptionstringrequired
imagesobject[]required
Show child parameters
idstringrequired
urlstringrequired
altstringrequired
positionintegerrequired
priceCentsintegerrequired
compareAtCentsintegerrequired
currencystringrequired
isActivebooleanrequired
isPhysicalbooleanrequired
soldOutbooleanrequired
inventoryintegerrequired
variantsobject[]required
Show child parameters
idstringrequired
namestringrequired
skustringrequired
priceCentsintegerrequired
compareAtCentsintegerrequired
inventoryintegerrequired
positionintegerrequired
isActivebooleanrequired
salesCountintegerrequired
sourcestringrequired
block | shopify | print-on-demand | external
editableInPlacebooleanrequired
externalIdstringrequired
Your own id for the product, as you set it. Other apps never see it.
urlstringrequired
The product on the creator’s public page; null when no block sells it.
updatedAtstringrequired
The latest change to the product or any of its variants.
productsobject[]
Deprecated: the same array as data.
Show child parameters
idstringrequired
blockIdstringrequired
kindstringrequired
namestringrequired
descriptionstringrequired
imagesobject[]required
Show child parameters
idstringrequired
urlstringrequired
altstringrequired
positionintegerrequired
priceCentsintegerrequired
compareAtCentsintegerrequired
currencystringrequired
isActivebooleanrequired
isPhysicalbooleanrequired
soldOutbooleanrequired
inventoryintegerrequired
variantsobject[]required
Show child parameters
idstringrequired
namestringrequired
skustringrequired
priceCentsintegerrequired
compareAtCentsintegerrequired
inventoryintegerrequired
positionintegerrequired
isActivebooleanrequired
salesCountintegerrequired
sourcestringrequired
block | shopify | print-on-demand | external
editableInPlacebooleanrequired
externalIdstringrequired
Your own id for the product, as you set it. Other apps never see it.
urlstringrequired
The product on the creator’s public page; null when no block sells it.
updatedAtstringrequired
The latest change to the product or any of its variants.
nextCursorstringrequired
Pass as ?cursor= for the next page; null on the last.
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.
POSThttps://linkyhub.net/api/v3/productsScope products:write

Create 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-Keystringheader
Repeating it within 24 hours returns the first product; with a different body, a 409.

Request body

application/json
namestringrequired
descriptionstring
Plain text; line breaks are kept.
imagesobject[]
The whole gallery, cover first.
Show child parameters
urlstringrequired
altstring
What the image shows, for screen readers.
priceCentsintegerrequired
In the smallest currency unit: 12.50 is 1250.
compareAtCentsinteger
Shown struck through. Null clears it.
currencystring
ISO 4217. Defaults to USD.
soldOutboolean
allowCustomAmountboolean
Pay what you want: the buyer picks the amount.
minimumCentsinteger
With allowCustomAmount: the lowest amount accepted.
isPhysicalboolean
Shipped goods: checkout collects a shipping address and the order waits for fulfilment.
inventoryinteger
Units in stock; null for unlimited.
pageIdstring
Defaults to the main page.
variantsobject[]
Show child parameters
namestringrequired
Shown to buyers, e.g. "Large / Blue".
skustring
priceCentsinteger
Null or omitted: the product price.
compareAtCentsinteger
inventoryinteger
Null or omitted: untracked.
isActiveboolean
externalIdstring
Your 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
idstringrequired
blockIdstringrequired
kindstringrequired
namestringrequired
descriptionstringrequired
imagesobject[]required
Show child parameters
idstringrequired
urlstringrequired
altstringrequired
positionintegerrequired
priceCentsintegerrequired
compareAtCentsintegerrequired
currencystringrequired
isActivebooleanrequired
isPhysicalbooleanrequired
soldOutbooleanrequired
inventoryintegerrequired
variantsobject[]required
Show child parameters
idstringrequired
namestringrequired
skustringrequired
priceCentsintegerrequired
compareAtCentsintegerrequired
inventoryintegerrequired
positionintegerrequired
isActivebooleanrequired
salesCountintegerrequired
sourcestringrequired
block | shopify | print-on-demand | external
editableInPlacebooleanrequired
externalIdstringrequired
Your own id for the product, as you set it. Other apps never see it.
urlstringrequired
The product on the creator’s public page; null when no block sells it.
updatedAtstringrequired
The latest change to the product or any of its variants.
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 /products

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/products/{productId}Scope products:read

One product in full, with its images and variants.

Parameters

productIdstringpathrequired

Code 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-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 /products

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
DELETEhttps://linkyhub.net/api/v3/products/{productId}Scope products:write

Delete a product that has never sold, and its block. Sold products can only be deactivated.

Parameters

productIdstringpathrequired

Code 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-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 /products

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