ProductListing

Sales Channel SDK

The ProductListing resource is available to Sales Channel SDK applications only.

The product_listings object represents the list of products that merchants have published to your channel. Each product listing is represented by its product_id. You can use this resource to retrieve products for addition to your channel platform app. This enables customers to purchase a merchant’s products directly from your platform or marketplace. You can also retrieve a list of product_ids published to your app, the count of products published to your app, or a specific product_listing using its product_id.

What you can do with ProductListing

The Shopify API lets you do the following with the ProductListing resource. More detailed versions of these general actions may be available:

ProductListing properties

product_id
"product_id": 1053727709

Identifies which product this listing is for.

body_html
"body_html": "It's the small iPod with a big idea: Video."

The description of the product, complete with HTML formatting.

created_at
"created_at": "2012-02-15T15:12:21-05:00"

The date and time when the product was created. The API returns this in ISO_8601.

handle
"handle": "ipod-nano"

A human-friendly unique string for the Product automatically generated from its title.

images
"images": ["src": "http://example.com/burton.jpg"]

A list of image objects, each one representing an image associated with the product.

options
"options": ["name": "Title"]

Custom product property names like "Size", "Color", and "Material".

product_type
"product_type": "Cult Products"

A categorization that a product can be tagged with, commonly used for filtering.

published_at
"published_at": "2007-12-31T19:00:00-05:00"

The date and time when the product was published. The API returns this in ISO_8601.

tags
"tags": "Emotive, Flash Memory, MP3, Music"

A categorization that a product can be tagged with, commonly used for filtering.

title
"title": "IPod Nano - 8GB"

The name of the product.

updated_at
"updated_at": "2012-08-24T14:01:47-04:00"

The date and time when the product was last modified. The API returns this in ISO_8601.

variants
"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_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"
  }
]

A list of variant objects, each one representing a slightly different version of the product. For example, if a product comes in different sizes and colors, each size and color permutation (such as "small black", "medium black", "large blue"), would be a variant.

To reorder variants, update the product with the variants in the desired order. The position attribute on the variant will be ignored.

  • barcode: The barcode, UPC or ISBN number for the product.
  • compare_at_price: The competitor's price for the same item.
  • created_at: The date and time when the product variant was created. The API returns this in ISO_8601.
  • fulfillment_service: Service which is handling fulfillment. Valid values are: manual, gift_card, or the handle of a FulfillmentService.
  • grams: The weight of the product variant in grams.
  • weight: The weight of the product variant in the unit system specified with weight_unit.
  • weight_unit: The unit system that the product variant's weight is measure in. The weight_unit can be either "g", "kg, "oz", or "lb".
  • id: The unique numeric identifier for the product variant.
  • inventory_management: Specifies whether or not Shopify tracks the number of items in stock for this product variant.
  • inventory_policy: Specifies whether or not customers are allowed to place an order for a product variant when it's out of stock.
  • inventory_quantity: The number of items in stock for this product variant.
  • metafield: Attaches additional information to a shop's resources.
  • option: Custom properties that a shop owner can use to define product variants. Multiple options can exist. Options are represented as: option1, option2, option3, etc.
  • position: The order of the product variant in the list of product variants. 1 is the first position. To reorder variants, update the product with the variants in the desired order. The position attribute on the variant will be ignored.
  • price: The price of the product variant.
  • product_id: The unique numeric identifier for the product.
  • requires_shipping: Specifies whether or not a customer needs to provide a shipping address when placing an order for this product variant.
  • sku: A unique identifier for the product in the shop.
  • taxable: Specifies whether or not a tax is charged when the product variant is sold.
  • title: The title of the product variant.
  • updated_at: The date and time when the product variant was last modified. The API returns this in ISO_8601.

vendor
"vendor": "Apple"

The name of the vendor of the product.

Endpoints

GET /admin/product_listings.json
Retrieve product listings that are published to your app
product_ids

A comma-separated list of product ids

limit

Amount of results

(default: 50) (maximum: 250)
page

Page to show

(default: 1)
collection_id

Filter by collection_id

updated_at_min

Show products last updated after date (format: 2014-04-25T16:15:47-04:00)

handle

Filter by product handle

Retrieve product listings that are published to your app

GET /admin/product_listings.json
View Response
HTTP/1.1 200 OK
{
  "product_listings": [
    {
      "product_id": 632910392,
      "created_at": "2017-10-03T16:36:00-04:00",
      "updated_at": "2017-10-03T16:36:00-04:00",
      "body_html": "<p>It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.<\/p>",
      "handle": "ipod-nano",
      "product_type": "Cult Products",
      "title": "IPod Nano - 8GB",
      "vendor": "Apple",
      "available": true,
      "tags": "Emotive, Flash Memory, MP3, Music",
      "published_at": "2017-08-31T20:00:00-04:00",
      "variants": [
        {
          "id": 808950810,
          "title": "Pink",
          "option_values": [
            {
              "option_id": 594680422,
              "name": "Color",
              "value": "Pink"
            }
          ],
          "price": "199.00",
          "formatted_price": "$199.00",
          "compare_at_price": null,
          "grams": 567,
          "requires_shipping": true,
          "sku": "IPOD2008PINK",
          "barcode": "1234_pink",
          "taxable": true,
          "position": 1,
          "available": true,
          "inventory_policy": "continue",
          "inventory_quantity": 10,
          "inventory_management": "shopify",
          "fulfillment_service": "manual",
          "weight": 1.25,
          "weight_unit": "lb",
          "image_id": 562641783,
          "created_at": "2017-10-03T16:36:00-04:00",
          "updated_at": "2017-10-03T16:36:00-04:00"
        },
        {
          "id": 49148385,
          "title": "Red",
          "option_values": [
            {
              "option_id": 594680422,
              "name": "Color",
              "value": "Red"
            }
          ],
          "price": "199.00",
          "formatted_price": "$199.00",
          "compare_at_price": null,
          "grams": 567,
          "requires_shipping": true,
          "sku": "IPOD2008RED",
          "barcode": "1234_red",
          "taxable": true,
          "position": 2,
          "available": true,
          "inventory_policy": "continue",
          "inventory_quantity": 20,
          "inventory_management": "shopify",
          "fulfillment_service": "manual",
          "weight": 1.25,
          "weight_unit": "lb",
          "image_id": null,
          "created_at": "2017-10-03T16:36:00-04:00",
          "updated_at": "2017-10-03T16:36:00-04:00"
        },
        {
          "id": 39072856,
          "title": "Green",
          "option_values": [
            {
              "option_id": 594680422,
              "name": "Color",
              "value": "Green"
            }
          ],
          "price": "199.00",
          "formatted_price": "$199.00",
          "compare_at_price": null,
          "grams": 567,
          "requires_shipping": true,
          "sku": "IPOD2008GREEN",
          "barcode": "1234_green",
          "taxable": true,
          "position": 3,
          "available": true,
          "inventory_policy": "continue",
          "inventory_quantity": 30,
          "inventory_management": "shopify",
          "fulfillment_service": "manual",
          "weight": 1.25,
          "weight_unit": "lb",
          "image_id": null,
          "created_at": "2017-10-03T16:36:00-04:00",
          "updated_at": "2017-10-03T16:36:00-04:00"
        },
        {
          "id": 457924702,
          "title": "Black",
          "option_values": [
            {
              "option_id": 594680422,
              "name": "Color",
              "value": "Black"
            }
          ],
          "price": "199.00",
          "formatted_price": "$199.00",
          "compare_at_price": null,
          "grams": 567,
          "requires_shipping": true,
          "sku": "IPOD2008BLACK",
          "barcode": "1234_black",
          "taxable": true,
          "position": 4,
          "available": true,
          "inventory_policy": "continue",
          "inventory_quantity": 40,
          "inventory_management": "shopify",
          "fulfillment_service": "manual",
          "weight": 1.25,
          "weight_unit": "lb",
          "image_id": null,
          "created_at": "2017-10-03T16:36:00-04:00",
          "updated_at": "2017-10-03T16:36:00-04:00"
        }
      ],
      "images": [
        {
          "id": 850703190,
          "created_at": "2017-10-03T16:36:00-04:00",
          "position": 1,
          "updated_at": "2017-10-03T16:36:00-04:00",
          "product_id": 632910392,
          "src": "https:\/\/cdn.shopify.com\/s\/files\/1\/0006\/9093\/3842\/products\/ipod-nano.png?v=1507062960",
          "variant_ids": [
          ],
          "width": 123,
          "height": 456
        },
        {
          "id": 562641783,
          "created_at": "2017-10-03T16:36:00-04:00",
          "position": 2,
          "updated_at": "2017-10-03T16:36:00-04:00",
          "product_id": 632910392,
          "src": "https:\/\/cdn.shopify.com\/s\/files\/1\/0006\/9093\/3842\/products\/ipod-nano-2.png?v=1507062960",
          "variant_ids": [
            808950810
          ],
          "width": 123,
          "height": 456
        }
      ],
      "options": [
        {
          "id": 594680422,
          "name": "Color",
          "product_id": 632910392,
          "position": 1,
          "values": [
            "Pink",
            "Red",
            "Green",
            "Black"
          ]
        }
      ]
    },
    {
      "product_id": 921728736,
      "created_at": "2017-10-03T16:36:00-04:00",
      "updated_at": "2017-10-03T16:36:00-04:00",
      "body_html": "<p>The iPod Touch has the iPhone's multi-touch interface, with a physical home button off the touch screen. The home screen has a list of buttons for the available applications.<\/p>",
      "handle": "ipod-touch",
      "product_type": "Cult Products",
      "title": "IPod Touch 8GB",
      "vendor": "Apple",
      "available": true,
      "tags": "",
      "published_at": "2017-08-31T20:00:00-04:00",
      "variants": [
        {
          "id": 447654529,
          "title": "Black",
          "option_values": [
            {
              "option_id": 891236591,
              "name": "Title",
              "value": "Black"
            }
          ],
          "price": "199.00",
          "formatted_price": "$199.00",
          "compare_at_price": null,
          "grams": 567,
          "requires_shipping": true,
          "sku": "IPOD2009BLACK",
          "barcode": "1234_black",
          "taxable": true,
          "position": 1,
          "available": true,
          "inventory_policy": "continue",
          "inventory_quantity": 13,
          "inventory_management": "shopify",
          "fulfillment_service": "manual",
          "weight": 1.25,
          "weight_unit": "lb",
          "image_id": null,
          "created_at": "2017-10-03T16:36:00-04:00",
          "updated_at": "2017-10-03T16:36:00-04:00"
        }
      ],
      "images": [
      ],
      "options": [
        {
          "id": 891236591,
          "name": "Title",
          "product_id": 921728736,
          "position": 1,
          "values": [
            "Black"
          ]
        }
      ]
    }
  ]
}
GET /admin/product_listings/product_ids.json
Retrieve product_ids that are published to your app. Maximum 10,000 results per page.
page

Page to show

(default: 1)

Retrieve product_ids that are published to your app

GET /admin/product_listings/product_ids.json
View Response
HTTP/1.1 200 OK
{
  "product_ids": [
    921728736,
    632910392
  ]
}
GET /admin/product_listings/count.json
Retrieve a count of products that are published to your app

Retrieve a count of products that are published to your app

GET /admin/product_listings/count.json
View Response
HTTP/1.1 200 OK
{
  "count": 2
}
GET /admin/product_listings/921728736.json
Retrieve a specific product listing that is published to your app

Retrieve a specific product listing that is published to your app

GET /admin/product_listings/#{id}.json
View Response
HTTP/1.1 200 OK
{
  "product_listing": {
    "product_id": 921728736,
    "created_at": "2017-10-03T16:36:00-04:00",
    "updated_at": "2017-10-03T16:36:00-04:00",
    "body_html": "<p>The iPod Touch has the iPhone's multi-touch interface, with a physical home button off the touch screen. The home screen has a list of buttons for the available applications.<\/p>",
    "handle": "ipod-touch",
    "product_type": "Cult Products",
    "title": "IPod Touch 8GB",
    "vendor": "Apple",
    "available": true,
    "tags": "",
    "published_at": "2017-08-31T20:00:00-04:00",
    "variants": [
      {
        "id": 447654529,
        "title": "Black",
        "option_values": [
          {
            "option_id": 891236591,
            "name": "Title",
            "value": "Black"
          }
        ],
        "price": "199.00",
        "formatted_price": "$199.00",
        "compare_at_price": null,
        "grams": 567,
        "requires_shipping": true,
        "sku": "IPOD2009BLACK",
        "barcode": "1234_black",
        "taxable": true,
        "position": 1,
        "available": true,
        "inventory_policy": "continue",
        "inventory_quantity": 13,
        "inventory_management": "shopify",
        "fulfillment_service": "manual",
        "weight": 1.25,
        "weight_unit": "lb",
        "image_id": null,
        "created_at": "2017-10-03T16:36:00-04:00",
        "updated_at": "2017-10-03T16:36:00-04:00"
      }
    ],
    "images": [
    ],
    "options": [
      {
        "id": 891236591,
        "name": "Title",
        "product_id": 921728736,
        "position": 1,
        "values": [
          "Black"
        ]
      }
    ]
  }
}
PUT /admin/product_listings/921728736.json
Create a product listing to publish a product to your app

Create a product listing to publish a product to your app

PUT /admin/product_listings/#{id}.json
{
  "product_listing": {
    "product_id": 921728736
  }
}
View Response
HTTP/1.1 200 OK
{
  "product_listing": {
    "id": 2616506,
    "shop_id": 690933842,
    "product_id": 921728736,
    "channel_id": 1003355581,
    "created_at": "2017-10-03T16:36:00-04:00",
    "updated_at": "2017-10-03T16:36:00-04:00",
    "body_html": "<p>The iPod Touch has the iPhone's multi-touch interface, with a physical home button off the touch screen. The home screen has a list of buttons for the available applications.<\/p>",
    "handle": "ipod-touch",
    "product_type": "Cult Products",
    "published": true,
    "published_at": "2017-08-31T20:00:00-04:00",
    "tags": "",
    "title": "IPod Touch 8GB",
    "vendor": "Apple",
    "public_url": "http:\/\/apple.myshopify.com\/products\/ipod-touch",
    "variants": [
      {
        "id": 447654529,
        "product_id": 921728736,
        "title": "Black",
        "price": "199.00",
        "sku": "IPOD2009BLACK",
        "position": 1,
        "grams": 567,
        "inventory_policy": "continue",
        "compare_at_price": null,
        "fulfillment_service": "manual",
        "inventory_management": "shopify",
        "option1": "Black",
        "option2": null,
        "option3": null,
        "created_at": "2017-10-03T16:36:00-04:00",
        "updated_at": "2017-10-03T16:36:00-04:00",
        "taxable": true,
        "barcode": "1234_black",
        "image_id": null,
        "inventory_quantity": 13,
        "weight": 1.25,
        "weight_unit": "lb",
        "old_inventory_quantity": 13,
        "requires_shipping": true
      }
    ],
    "options": [
      {
        "id": 891236591,
        "product_id": 921728736,
        "name": "Title",
        "position": 1,
        "values": [
          "Black"
        ]
      }
    ],
    "images": [
    ]
  }
}
DELETE /admin/product_listings/921728736.json
Delete a product listing to unpublish a product from your app

Delete a product listing to unpublish a product from your app

DELETE /admin/product_listings/#{id}.json
View Response
HTTP/1.1 200 OK