products
PATCH
https://linkyhub.net/api/v3 /products/{productId} Scope products:writeChange a product. Only the fields sent change; images replace the whole gallery.
Parameters
productIdstringpathrequiredRequest body
application/json
namestringdescriptionstringPlain text; line breaks are kept.
imagesobject[]The whole gallery, cover first.
Show child parameters
urlstringrequiredaltstringWhat the image shows, for screen readers.
priceCentsintegerIn 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.
isActivebooleanFalse hides it without deleting it.
externalIdstringYour own id for it; null clears it.
{
"name": "string",
"description": "string",
"images": [
{
"url": "string",
"alt": "string"
}
],
"priceCents": 0,
"compareAtCents": 0,
"currency": "string",
"soldOut": true,
"allowCustomAmount": true,
"minimumCents": 0,
"isPhysical": true,
"isActive": true,
"externalId": "string"
}Code samples
cURL
curl -X PATCH "https://linkyhub.net/api/v3/products/{productId}" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-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,"isActive":true,"externalId":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 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.
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/{productId}/files Scope products:writeAttach a file buyers receive after paying (multipart, part "file").
Parameters
productIdstringpathrequiredRequest body
multipart/form-data
filestringrequired{
"file": "string"
}Code samples
cURL
curl -X POST "https://linkyhub.net/api/v3/products/{productId}/files" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-H "Content-Type: multipart/form-data" \
-d '{"file":"string"}'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 · PATCH /products/{productId}
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}/files/{assetId} Scope products:writeRemove a delivered file. Buyers who already downloaded it keep their copy.
Parameters
productIdstringpathrequiredassetIdstringpathrequiredCode samples
cURL
curl -X DELETE "https://linkyhub.net/api/v3/products/{productId}/files/{assetId}" \
-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 · PATCH /products/{productId}
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/{productId}/course Scope products:writeTurn a product into a course, so buyers get its lessons.
Parameters
productIdstringpathrequiredCode samples
cURL
curl -X POST "https://linkyhub.net/api/v3/products/{productId}/course" \
-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 · PATCH /products/{productId}
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
Updated