Create digital product
Create a published digital product with a single variant and an optional external download link.
Create a published digital product with a single variant and an optional external download link.
Authorizations
AuthorizationstringRequired
API Token authentication
Path parameters
store_idstringRequiredExample:
The ID of the store to create the product in.
store_01J8Z5F8W9K8M4A7B3C2D1E0FGBody
namestring · max: 255RequiredExample:
The product name.
My eBookpriceinteger · min: 1RequiredExample:
Price in the smallest currency unit (e.g. cents). Must be positive.
999descriptionstring · max: 5000 · nullableOptionalExample:
The product description.
A digital download.currencystring · min: 3 · max: 3 · nullableOptionalExample:
ISO 4217 currency code. Defaults to the store's default currency when omitted.
usddownload_urlstring · max: 2048 · nullableOptionalExample:
Optional external download link delivered to the customer after purchase.
https://example.com/downloads/ebook.pdfResponses
201
Created response
application/json
admin_urlstringOptionalExample:
Admin UI deep-link to manage the product.
https://admin.example.com/store_01.../products/edit?product=prod_01...401
Unauthenticated response
application/json
422
Validation error response
application/json
500
Error response
application/json
post/api/ecommerce/v1/stores/{store_id}/products/digital
POST /api/ecommerce/v1/stores/{store_id}/products/digital HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 141
{
"name": "My eBook",
"price": 999,
"description": "A digital download.",
"currency": "usd",
"download_url": "https://example.com/downloads/ebook.pdf"
}{
"product": {
"id": "prod_01J8Z5F8W9K8M4A7B3C2D1E0FG",
"title": "My Product",
"type": "physical",
"status": "published",
"price": 1000,
"currency_code": "usd"
},
"admin_url": "https://admin.example.com/store_01.../products/edit?product=prod_01..."
}Last updated
Was this helpful?