Create physical product
Create a published physical product with a single variant priced in the store currency.
Create a published physical product with a single variant priced in the store currency.
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 Productpriceinteger · min: 1RequiredExample:
Price in the smallest currency unit (e.g. cents). Must be positive.
1000descriptionstring · max: 5000 · nullableOptionalExample:
The product description.
A great product.currencystring · min: 3 · max: 3 · nullableOptionalExample:
ISO 4217 currency code. Defaults to the store's default currency when omitted.
usdResponses
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/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?