Skip to content

Product

Jyotirmoy Barman edited this page Jan 10, 2024 · 20 revisions

The Product resource lets you update and create products in a merchant's store. You can use product variants with the Product resource to create or update different versions of the same product.

API Endpoints

JSON - The Product resource

{ } The Product resource

{
  "body_html": "It's the small iPod with a big idea: Video.",
  "created_at": "2012-02-15T15:12:21-05:00",
  "handle": "ipod-nano",
  "id": 632910392,
  "images": [
    {
      "id": 850703190,
      "product_id": 632910392,
      "position": 1,
      "created_at": "2018-01-08T12:34:47-05:00",
      "updated_at": "2018-01-08T12:34:47-05:00",
      "width": 110,
      "height": 140,
      "src": "http://example.com/burton.jpg",
      "variant_ids": [
        {}
      ]
    }
  ],
  "options": {
    "id": 594680422,
    "product_id": 632910392,
    "name": "Color",
    "position": 1,
    "values": [
      "Pink",
      "Red",
      "Green",
      "Black"
    ]
  },
  "product_type": "Cult Products",
  "published_at": "2007-12-31T19:00:00-05:00",
  "published_scope": "global",
  "status": "active",
  "tags": "Emotive, Flash Memory, MP3, Music",
  "template_suffix": "special",
  "title": "IPod Nano - 8GB",
  "updated_at": "2012-08-24T14:01:47-04:00",
  "variants": [
    {
      "barcode": "1234_pink",
      "compare_at_price": null,
      "created_at": "2012-08-24T14:01:47-04:00",
      "fulfillment_service": "manual",
      "grams": 567,
      "weight": 0.2,
      "weight_unit": "kg",
      "id": 808950810,
      "inventory_item_id": 341629,
      "inventory_management": "shopify",
      "inventory_policy": "continue",
      "inventory_quantity": 10,
      "option1": "Pink",
      "position": 1,
      "price": 199.99,
      "product_id": 632910392,
      "requires_shipping": true,
      "sku": "IPOD2008PINK",
      "taxable": true,
      "title": "Pink",
      "updated_at": "2012-08-24T14:01:47-04:00"
    }
  ],
  "vendor": "Apple"
}
  • id - integer | read-only An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Openfy system. No two products will have the same id, even if they're from different.

  • handle - string A unique human-friendly string for the product. Automatically generated from the product's title. Used by the Liquid templating language to refer to objects.

  • created_at - string | ISO 8601 | read-only The date and time (ISO 8601 format) when the product was created.


POST - Create a new product

1. Create a new draft product

2. Create a new product with multiple product variants

3. Create a new product with multiple product variants and multiple options

4. Create a new product with the default product variant


GET - Retrieve a single product

Retrieve a single product.