Shopify Admin API Products API

The Products API from Shopify Admin API — 2 operation(s) for products.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

shopify-admin-products-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Shopify Admin REST Collections Products API
  description: 'The Shopify Admin REST API lets you build apps and integrations that extend and enhance the Shopify admin. It provides access to products, customers, orders, inventory, fulfillment, shipping, and store configuration. All requests require a valid Shopify access token. Note: Shopify is deprecating the REST Admin API in favor of GraphQL. New development should use the GraphQL Admin API.'
  version: 2024-10
  termsOfService: https://www.shopify.com/legal/api-terms
  contact:
    name: Shopify Developer Support
    url: https://shopify.dev/docs/api/admin-rest
  license:
    name: API Terms of Service
    url: https://www.shopify.com/legal/api-terms
servers:
- url: https://{store_name}.myshopify.com/admin/api/2024-10
  description: Shopify Admin REST API
  variables:
    store_name:
      description: The name of the Shopify store
      default: mystore
security:
- AccessToken: []
tags:
- name: Products
paths:
  /products.json:
    get:
      operationId: listProducts
      summary: List Products
      description: Retrieves a list of products from the store.
      tags:
      - Products
      parameters:
      - name: limit
        in: query
        description: The maximum number of results to show (maximum 250, default 50)
        schema:
          type: integer
          minimum: 1
          maximum: 250
          default: 50
      - name: page_info
        in: query
        description: A unique ID used to access a specific page in results
        schema:
          type: string
      - name: ids
        in: query
        description: Show only products specified by a comma-separated list of IDs
        schema:
          type: string
      - name: status
        in: query
        description: Filter by product status
        schema:
          type: string
          enum:
          - active
          - archived
          - draft
      responses:
        '200':
          description: Successful response with list of products
          content:
            application/json:
              schema:
                type: object
                properties:
                  products:
                    type: array
                    items:
                      $ref: '#/components/schemas/Product'
    post:
      operationId: createProduct
      summary: Create Product
      description: Creates a new product in the store.
      tags:
      - Products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                product:
                  $ref: '#/components/schemas/ProductInput'
      responses:
        '201':
          description: Product created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: '#/components/schemas/Product'
  /products/{product_id}.json:
    get:
      operationId: getProduct
      summary: Get Product
      description: Retrieves a single product by ID.
      tags:
      - Products
      parameters:
      - name: product_id
        in: path
        required: true
        description: The ID of the product
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Product details
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: '#/components/schemas/Product'
    put:
      operationId: updateProduct
      summary: Update Product
      description: Updates an existing product.
      tags:
      - Products
      parameters:
      - name: product_id
        in: path
        required: true
        description: The ID of the product
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                product:
                  $ref: '#/components/schemas/ProductInput'
      responses:
        '200':
          description: Product updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  product:
                    $ref: '#/components/schemas/Product'
    delete:
      operationId: deleteProduct
      summary: Delete Product
      description: Deletes a product from the store.
      tags:
      - Products
      parameters:
      - name: product_id
        in: path
        required: true
        description: The ID of the product
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Product deleted successfully
components:
  schemas:
    Product:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Unique identifier for the product
        title:
          type: string
          description: The name of the product
        body_html:
          type: string
          description: A description of the product in HTML format
        vendor:
          type: string
          description: The name of the product vendor
        product_type:
          type: string
          description: A categorization for the product
        created_at:
          type: string
          format: date-time
          description: The date and time when the product was created
        updated_at:
          type: string
          format: date-time
          description: The date and time when the product was last modified
        published_at:
          type: string
          format: date-time
          nullable: true
          description: The date and time when the product was published
        status:
          type: string
          enum:
          - active
          - archived
          - draft
          description: The status of the product
        tags:
          type: string
          description: A string of comma-separated tags
        variants:
          type: array
          items:
            $ref: '#/components/schemas/ProductVariant'
        images:
          type: array
          items:
            $ref: '#/components/schemas/ProductImage'
        options:
          type: array
          items:
            $ref: '#/components/schemas/ProductOption'
    ProductVariant:
      type: object
      properties:
        id:
          type: integer
          format: int64
        product_id:
          type: integer
          format: int64
        title:
          type: string
        price:
          type: string
        sku:
          type: string
        inventory_quantity:
          type: integer
        inventory_management:
          type: string
        requires_shipping:
          type: boolean
        weight:
          type: number
        weight_unit:
          type: string
    ProductOption:
      type: object
      properties:
        id:
          type: integer
          format: int64
        product_id:
          type: integer
          format: int64
        name:
          type: string
        position:
          type: integer
        values:
          type: array
          items:
            type: string
    ProductImage:
      type: object
      properties:
        id:
          type: integer
          format: int64
        product_id:
          type: integer
          format: int64
        position:
          type: integer
        src:
          type: string
          format: uri
        alt:
          type: string
          nullable: true
        width:
          type: integer
        height:
          type: integer
    ProductInput:
      type: object
      required:
      - title
      properties:
        title:
          type: string
        body_html:
          type: string
        vendor:
          type: string
        product_type:
          type: string
        status:
          type: string
          enum:
          - active
          - archived
          - draft
        tags:
          type: string
        variants:
          type: array
          items:
            type: object
        images:
          type: array
          items:
            type: object
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: X-Shopify-Access-Token
      description: Shopify access token for authentication