v1

latestOpenAPI 3.0.22026-08-0426137631.3 KB
Product / Content APIs

Product / Content Read API

This API endpoint retrieves the details of a specific product / content using its product_id. To fetch the product / content information, make a GET request to the following URL:

Notice: Make sure the product_id is an urlencode string.

GET /v1/products/{product_id}

Replace {product_id} with the unique identifier of the product / content you wish to fetch.

Response Format

The API will return the product / content details in a JSON object if the given product_id is valid and exists in the system. The JSON object will include fields like title, description, price, images, and any internationalization fields (i18n_$LN).

Example Response

Here's an example of a successful API response for a product / content with the product_id "arizona-ginseng-honey":

{
  "product_id": "arizona-ginseng-honey",
  "title": "Arizona, Green Tea with Ginseng & Honey",
  "description": "A refreshing and delicious blend of green tea with ginseng and honey.",
  "price": 1.99,
  "i18n_es": {
    "title": "AriZona, Té verde con ginseng y miel"
    // ... other product details in Spanish
  },
  "i18n_fr": {
    "title": "AriZona - Thé Vert Aromatisé au Miel"
    // ... other product details in French
  },
  "i18n_zh": {
    "title": "美國ARIZONA亞歷桑納 - 蜂蜜人蔘綠茶"
    // ... other product details in Chinese
  }
}

If the provided product_id is invalid or does not exist in the system, the API will return an error response with a status_code=404.

Example Error Response

{
  "message": "not found"
}
get/v1/products/{product_id}

Path parameters

product_idstring required

Response

Successful Response

messagestring required

Example response

{
  "data": {
    "product_id": "123ABC-S-Black",
    "product_group_id": "123ABC",
    "parent_id": "Nike_Shop_123",
    "type": "clothes",
    "title": "Japanese Shiba Inu Dog Eating Miso Soup T-Shirt",
    "description": "This cute Shiba inu dog eating Miso soup is perfect for those who love Japanese culture.",
    "short_description": "Cute Shiba Inu Dog Eating Miso Soup T-Shirt",
    "language": "en",
    "categories": [
      [
        "Clothing, Shoes & Jewelry",
        "Women",
        "T-Shirts"
      ],
      [
        "Novelty",
        "Tops & Tees",
        "T-Shirts"
      ]
    ],
    "tags": [
      "cute",
      "anime",
      "dogs",
      "t-shirt"
    ],
    "url": "https://example.com/miso-tshirt-123ABC",
    "cover_image": "https://example.com/miso-tshirt-123ABC.jpg",
    "original_price": 20,
    "sale_price": 15,
    "margin": 15,
    "size": "S",
    "color": "Black",
    "material": "Cotton",
    "brand": "Miso Corp.",
    "authors": [
      "Andy Hsieh"
    ],
    "publishers": [
      "O'Reilly Media"
    ],
    "collections": [
      "Anime T-Shirt Collection",
      "Superhero T-Shirt Collection"
    ],
    "location": [
      {
        "lat": 40.74844,
        "lon": -73.985664
      }
    ],
    "rating": 5,
    "custom_attributes": {
      "cast": [
        "Robin Williams",
        "Jonathan Hyde"
      ],
      "director": "Joe Johnston",
      "genres": [
        "Adventure",
        "Fantasy",
        "Family"
      ],
      "popularity": 7.439,
      "adult": false
    }
  }
}