For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create physical product

Create a published physical product with a single variant priced in the store currency.

Create physical product

post

Create a published physical product with a single variant priced in the store currency.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
store_idstringRequired

The ID of the store to create the product in.

Example: store_01J8Z5F8W9K8M4A7B3C2D1E0FG
Body
namestring · max: 255Required

The product name.

Example: My Product
priceinteger · min: 1Required

Price in the smallest currency unit (e.g. cents). Must be positive.

Example: 1000
descriptionstring · max: 5000 · nullableOptional

The product description.

Example: A great product.
currencystring · min: 3 · max: 3 · nullableOptional

ISO 4217 currency code. Defaults to the store's default currency when omitted.

Example: usd
Responses
201

Created response

application/json
admin_urlstringOptional

Admin UI deep-link to manage the product.

Example: https://admin.example.com/store_01.../products/edit?product=prod_01...
post/api/ecommerce/v1/stores/{store_id}/products/physical
POST /api/ecommerce/v1/stores/{store_id}/products/physical HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 84

{
  "name": "My Product",
  "price": 1000,
  "description": "A great product.",
  "currency": "usd"
}
{
  "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?