Alladdin

Work in progress

Site en construction

الموقع قيد الإنشاء

Alladdin
GET

Get a product by ID

Scope: inventory:products.read https://api.alladdin.com/api/v2/products/{productId}

Retrieves the full details of a single product by its unique identifier.
The response includes variants, stock levels across warehouses, custom fields, tax configuration, and pricing information.

Parameters

Path parameters

productId string required

Product ID (24-char hex ObjectId)

Request

python
import requests

url = "https://api.alladdin.com/api/v2/products/{productId}"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())

Responses

Response

json
{
  "id": "507f1f77bcf86cd799439011",
  "kind": "simple",
  "name": "string",
  "description": "string",
  "type_id": "string",
  "price": "99.95",
  "taxes": [
    "string"
  ],
  "total": "string",
  "has_stock": false,
  "stock": "15.3",
  "barcode": "string",
  "sku": "string",
  "cost": "50.00",
  "purchase_price": "string",
  "weight": "3.2",
  "tags": [
    "string"
  ],
  "category_id": "string",
  "factory_code": "string",
  "for_sale": false,
  "for_purchase": false,
  "sales_channel_id": "string",
  "exp_account_id": "string",
  "warehouse_id": "string",
  "archived": false,
  "purchase_taxes": [
    "string"
  ],
  "min_stock": "5",
  "min_stock_alarm": false,
  "in_pos": false,
  "supplier_id": "string",
  "translations": [
    {}
  ],
  "rates": [
    {
      "id": "string",
      "subtotal": "string",
      "taxes": [
        "string"
      ]
    }
  ],
  "attributes": [
    {
      "id": "string",
      "name": "string",
      "value": "string"
    }
  ],
  "variants": [
    {
      "id": "string",
      "sku": "string",
      "barcode": "string",
      "price": "19.99",
      "cost": "string",
      "purchase_price": "string",
      "stock": "10.00",
      "description": "string",
      "weight": "string",
      "factory_code": "string",
      "archived": false,
      "options": [
        {
          "name": "...",
          "value": "...",
          "originId": "..."
        }
      ],
      "category_fields": [
        {
          "id": "...",
          "name": "...",
          "value": "..."
        }
      ],
      "sales_rates": [
        {
          "id": "...",
          "subtotal": "...",
          "taxes": "..."
        }
      ]
    }
  ],
  "pack_items": [
    {
      "product_selection": "507f1f77bcf86cd799439011",
      "units": 2
    }
  ],
  "stocks": [
    {
      "warehouse_id": "string",
      "stock": "10",
      "variant_id": "string"
    }
  ],
  "image": {}
}

Success responses

200 Product found application/json object id string

Unique identifier of the product

kind string

Type of item

Enum: simple variants lots serialnumbers pack name string

Name of the product

description string | null

Description of the product

type_id string | null

Identifier of the product type

price string | null

Sale price as a decimal string

taxes[] string[]

List of tax identifiers applied to the product

total string | null

Total price including taxes as a decimal string

has_stock boolean

Whether the product has stock tracking enabled

stock string

Current total stock across all warehouses as a decimal string

barcode string | null

Barcode value (EAN, UPC, etc.)

sku string | null

Stock Keeping Unit code

cost string | null

Cost price as a decimal string

purchase_price string | null

Purchase price as a decimal string

weight string | null

Weight in the account default unit as a decimal string

tags[] string[]

List of tags attached to the product

category_id string | null

Identifier of the product category

factory_code string | null

Manufacturer or factory reference code

for_sale boolean

Whether the product is available for sale

for_purchase boolean

Whether the product is available for purchase

sales_channel_id string | null

Identifier of the sales channel assigned to this product

exp_account_id string | null

Identifier of the expenses account

warehouse_id string | null

Identifier of the default warehouse

archived boolean

Whether the product is archived

purchase_taxes[] string[]

List of tax identifiers applied to purchases

min_stock string | null

Minimum stock threshold as a decimal string

min_stock_alarm boolean

Whether the minimum stock alarm is enabled

in_pos boolean

Whether the product is available in point of sale

supplier_id string | null

Identifier of the default supplier

translations[] object[]

Product name translations by locale

rates[] object[]

Price rates with different subtotals and taxes

id string subtotal string taxes[] string[] attributes[] object[]

Product attributes

id string name string value string variants[] object[]

Variants of the product. Present for kinds: variants, lots, serialnumbers. Each item contains fields relevant to the kind.

id string sku string | null barcode string | null price string | null cost string | null purchase_price string | null stock string | null description string | null weight string | null factory_code string | null archived boolean options[] object[]

Attribute options for this variant (e.g. Color=Red, Size=M). Only present for variants products.

category_fields[] object[]

Values of your own variant-group fields for this variant (e.g. Size=M, Color=Red) — the fields you configure under your product categories. Unrelated to options, which is ecommerce-synced data. Only present for variants products.

sales_rates[] object[]

Price rates with tax breakdown for this variant.

pack_items[] object[] | null

Component items included in this pack product. Only present for pack products.

product_selection string

Product ID or "productId#variantId"

units number stocks[] object[]

Stock per warehouse. Each entry has warehouse_id and stock. Variant products also include variant_id.

warehouse_id string stock string variant_id string | null

Only present for variant/lots/serialnumbers products.

image object

Main product image with its resolved URLs. Null when the product has no images.

Error responses

401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Product not found application/json 429 Rate limit exceeded application/json

← PreviousList product images →

Next →Get a product image by ID →