Product Variants

A Product Variant represents a specific item for purchase, and is contained within a parent Product. At least one Product Variant is required for each Product.

Available methods

    • Add a new variant to the product.

      POST /ecommerce/stores/{store_id}/products/{product_id}/variants

      Add a new variant to the product.

      Path parameters

      store_id The store id.
      product_id The id for the product of a store.

      Request body parameters

      id Type: String Title: Product Variant Foreign ID Read only: false A unique identifier for the product variant.
      title Type: String Title: Title Read only: false The title of a product variant.
      url Type: String Title: URL Read only: false The URL for a product variant.
      sku Type: String Title: SKU Read only: false The stock keeping unit (SKU) of a product variant.
      price Type: Number Title: Price Read only: false The price of a product variant.
      inventory_quantity Type: Integer Title: Inventory Quantity Read only: false The inventory quantity of a product variant.
      image_url Type: String Title: Image URL Read only: false The image URL for a product variant.
      backorders Type: String Title: Backorders Read only: false The backorders of a product variant.
      visibility Type: String Title: Visibility Read only: false The visibility of a product variant.

      Response body parameters

      id Type: String Title: Product Variant Foreign ID Read only: true A unique identifier for the product variant.
      title Type: String Title: Title Read only: false The title of a product variant.
      url Type: String Title: URL Read only: false The URL for a product variant.
      sku Type: String Title: SKU Read only: false The stock keeping unit (SKU) of a product variant.
      price Type: Number Title: Price Read only: false The price of a product variant.
      inventory_quantity Type: Integer Title: Inventory Quantity Read only: false The inventory quantity of a product variant.
      image_url Type: String Title: Image URL Read only: false The image URL for a product variant.
      backorders Type: String Title: Backorders Read only: false The backorders of a product variant.
      visibility Type: String Title: Visibility Read only: false The visibility of a product variant.
      created_at Type: String Title: Creation Time Read only: true The date and time the product was created.
      updated_at Type: String Title: Update Time Read only: true The date and time the product was last updated.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request POST \
      --url 'https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants' \
      --user 'anystring:apikey' \
      --header 'content-type: application/json' \
      --data '{"id" : "PROD001C", "title" : "Freddie'\''s Jokes Volume 3", "sku" : "Jokes001C", "price" : "5", "inventory_quantity" : 50, "image_url" : "https://static.mailchimp.com/web/brand-assets/Freddie_wink.png", "backorders" : "1", "visibility" : "visible"}' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Date: Wed, 10 Feb 2016 15:54:14 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 1382
      Connection: keep-alive
      Vary: Accept-Encoding
      X-Request-Id: 4cc48d5b-e060-4db5-b206-8705106586e7
      Link: <https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json>; rel="describedBy"
      
      {
        "id": "PROD001C",
        "title": "Freddie's Jokes Volume 3",
        "url": "",
        "sku": "Jokes001C",
        "price": 5,
        "inventory_quantity": 50,
        "image_url": "https://static.mailchimp.com/web/brand-assets/Freddie_wink.png",
        "backorders": "1",
        "visibility": "visible",
        "created_at": "2016-02-10T15:54:14+00:00",
        "updated_at": "2016-02-10T15:54:14+00:00",
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001C",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Collection.json"
          },
          {
            "rel": "update",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001C",
            "method": "PATCH",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
          },
          {
            "rel": "upsert",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001C",
            "method": "PUT",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
          },
          {
            "rel": "delete",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001C",
            "method": "DELETE"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
    • Get information about a product's variants.

      GET /ecommerce/stores/{store_id}/products/{product_id}/variants

      Get information about a product’s variants.

      Path parameters

      store_id The store id.
      product_id The id for the product of a store.

      Query string parameters

      fields Type: Array Title: Fields Read only: false A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
      exclude_fields Type: Array Title: Exclude Fields Read only: false A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
      count Type: Integer Title: Count Read only: true The number of records to return. Default value is 10.
      offset Type: Integer Title: Offset Read only: false The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. Default value is 0.

      Response body parameters

      store_id Type: String Title: Store ID Read only: false The store id.
      product_id Type: String Title: Product ID Read only: false The product id.
      variants Type: Array Title: Ecommerce Product Variants Read only: false An array of objects, each representing a product’s variants.
      Show properties
      id Type: String Title: Product Variant Foreign ID Read only: true A unique identifier for the product variant.
      title Type: String Title: Title Read only: false The title of a product variant.
      url Type: String Title: URL Read only: false The URL for a product variant.
      sku Type: String Title: SKU Read only: false The stock keeping unit (SKU) of a product variant.
      price Type: Number Title: Price Read only: false The price of a product variant.
      inventory_quantity Type: Integer Title: Inventory Quantity Read only: false The inventory quantity of a product variant.
      image_url Type: String Title: Image URL Read only: false The image URL for a product variant.
      backorders Type: String Title: Backorders Read only: false The backorders of a product variant.
      visibility Type: String Title: Visibility Read only: false The visibility of a product variant.
      created_at Type: String Title: Creation Time Read only: true The date and time the product was created.
      updated_at Type: String Title: Update Time Read only: true The date and time the product was last updated.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.
      total_items Type: Integer Title: Item Count Read only: false The total number of items matching the query regardless of pagination.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request GET \
      --url 'https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Date: Wed, 10 Feb 2016 15:50:32 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 3515
      Connection: keep-alive
      Vary: Accept-Encoding
      X-Request-Id: 7722f73d-707d-410c-89b4-754ca3da8746
      Link: <https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Collection.json>; rel="describedBy"
      
      {
        "store_id": "MC001",
        "product_id": "PROD001",
        "variants": [
          {
            "id": "PROD001A",
            "title": "Freddie's Jokes Volume 1",
            "url": "",
            "sku": "Jokes001A",
            "price": 5,
            "inventory_quantity": 100,
            "image_url": "https://static.mailchimp.com/web/brand-assets/Freddie_wink.png",
            "backorders": "0",
            "visibility": "visible",
            "created_at": "2016-02-10T15:33:49+00:00",
            "updated_at": "2016-02-10T15:33:49+00:00",
            "_links": [
              {
                "rel": "self",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001A",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
              },
              {
                "rel": "parent",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Collection.json"
              },
              {
                "rel": "update",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001A",
                "method": "PATCH",
                "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
              },
              {
                "rel": "upsert",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001A",
                "method": "PUT",
                "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
              },
              {
                "rel": "delete",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001A",
                "method": "DELETE"
              }
            ]
          },
          {
            "id": "PROD001B",
            "title": "Freddie's Jokes Volume 2",
            "url": "",
            "sku": "Jokes002",
            "price": 5,
            "inventory_quantity": 99,
            "image_url": "https://static.mailchimp.com/web/brand-assets/bro_freddie.png",
            "backorders": "0",
            "visibility": "true",
            "created_at": "2016-02-10T15:33:50+00:00",
            "updated_at": "2016-02-10T15:33:50+00:00",
            "_links": [
              {
                "rel": "self",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001B",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
              },
              {
                "rel": "parent",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001",
                "method": "GET",
                "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Collection.json"
              },
              {
                "rel": "update",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001B",
                "method": "PATCH",
                "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
              },
              {
                "rel": "upsert",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001B",
                "method": "PUT",
                "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
              },
              {
                "rel": "delete",
                "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001B",
                "method": "DELETE"
              }
            ]
          }
        ],
        "total_items": 2,
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Collection.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Instance.json"
          },
          {
            "rel": "create",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants",
            "method": "POST",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

      Get information about a specific product variant

      GET /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}

      Get information about a specific product variant.

      Path parameters

      store_id The store id.
      product_id The id for the product of a store.
      variant_id The id for the product variant.

      Query string parameters

      fields Type: Array Title: Fields Read only: false A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
      exclude_fields Type: Array Title: Exclude Fields Read only: false A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.

      Response body parameters

      id Type: String Title: Product Variant Foreign ID Read only: true A unique identifier for the product variant.
      title Type: String Title: Title Read only: false The title of a product variant.
      url Type: String Title: URL Read only: false The URL for a product variant.
      sku Type: String Title: SKU Read only: false The stock keeping unit (SKU) of a product variant.
      price Type: Number Title: Price Read only: false The price of a product variant.
      inventory_quantity Type: Integer Title: Inventory Quantity Read only: false The inventory quantity of a product variant.
      image_url Type: String Title: Image URL Read only: false The image URL for a product variant.
      backorders Type: String Title: Backorders Read only: false The backorders of a product variant.
      visibility Type: String Title: Visibility Read only: false The visibility of a product variant.
      created_at Type: String Title: Creation Time Read only: true The date and time the product was created.
      updated_at Type: String Title: Update Time Read only: true The date and time the product was last updated.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request GET \
      --url 'https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001A' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Date: Wed, 10 Feb 2016 15:59:50 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 1383
      Connection: keep-alive
      Vary: Accept-Encoding
      X-Request-Id: 83c28c0e-8125-47d6-8d14-7bb0d8c5b89a
      Link: <https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json>; rel="describedBy"
      
      {
        "id": "PROD001A",
        "title": "Freddie's Jokes Volume 1",
        "url": "",
        "sku": "Jokes001A",
        "price": 5,
        "inventory_quantity": 100,
        "image_url": "https://static.mailchimp.com/web/brand-assets/Freddie_wink.png",
        "backorders": "0",
        "visibility": "visible",
        "created_at": "2016-02-10T15:33:49+00:00",
        "updated_at": "2016-02-10T15:33:49+00:00",
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001A",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Collection.json"
          },
          {
            "rel": "update",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001A",
            "method": "PATCH",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
          },
          {
            "rel": "upsert",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001A",
            "method": "PUT",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
          },
          {
            "rel": "delete",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001A",
            "method": "DELETE"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
    • Update a product variant

      PATCH /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}

      Update a product variant.

      Path parameters

      store_id The store id.
      product_id The id for the product of a store.
      variant_id The id for the product variant.

      Request body parameters

      title Type: String Title: Title Read only: false The title of a product variant.
      url Type: String Title: URL Read only: false The URL for a product variant.
      sku Type: String Title: SKU Read only: false The stock keeping unit (SKU) of a product variant.
      price Type: Number Title: Price Read only: false The price of a product variant.
      inventory_quantity Type: Integer Title: Inventory Quantity Read only: false The inventory quantity of a product variant.
      image_url Type: String Title: Image URL Read only: false The image URL for a product variant.
      backorders Type: String Title: Backorders Read only: false The backorders of a product variant.
      visibility Type: String Title: Visibility Read only: false The visibility of a product variant.

      Response body parameters

      id Type: String Title: Product Variant Foreign ID Read only: true A unique identifier for the product variant.
      title Type: String Title: Title Read only: false The title of a product variant.
      url Type: String Title: URL Read only: false The URL for a product variant.
      sku Type: String Title: SKU Read only: false The stock keeping unit (SKU) of a product variant.
      price Type: Number Title: Price Read only: false The price of a product variant.
      inventory_quantity Type: Integer Title: Inventory Quantity Read only: false The inventory quantity of a product variant.
      image_url Type: String Title: Image URL Read only: false The image URL for a product variant.
      backorders Type: String Title: Backorders Read only: false The backorders of a product variant.
      visibility Type: String Title: Visibility Read only: false The visibility of a product variant.
      created_at Type: String Title: Creation Time Read only: true The date and time the product was created.
      updated_at Type: String Title: Update Time Read only: true The date and time the product was last updated.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request PATCH \
      --url 'https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001D' \
      --user 'anystring:apikey' \
      --header 'content-type: application/json' \
      --data '{"id" : "PROD001D", "title" : "Freddie'\''s Jokes Volume 4", "sku" : "Jokes001D", "price" : "5", "inventory_quantity" : 50, "image_url" : "https://static.mailchimp.com/web/brand-assets/Freddie_wink.png", "backorders" : "1", "visibility" : "visible"}' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Date: Wed, 10 Feb 2016 16:15:27 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 1382
      Connection: keep-alive
      Vary: Accept-Encoding
      X-Request-Id: 5c36dccf-ab67-48a8-9694-02f22ebb528d
      Link: <https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json>; rel="describedBy"
      
      {
        "id": "PROD001D",
        "title": "Freddie's Jokes Volume 4",
        "url": "",
        "sku": "Jokes001D",
        "price": 5,
        "inventory_quantity": 50,
        "image_url": "https://static.mailchimp.com/web/brand-assets/Freddie_wink.png",
        "backorders": "1",
        "visibility": "visible",
        "created_at": "2016-02-10T16:12:59+00:00",
        "updated_at": "2016-02-10T16:15:27+00:00",
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001D",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Collection.json"
          },
          {
            "rel": "update",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001D",
            "method": "PATCH",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
          },
          {
            "rel": "upsert",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001D",
            "method": "PUT",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
          },
          {
            "rel": "delete",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001D",
            "method": "DELETE"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.

      Add or update a product variant

      PUT /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}

      Add or update a product variant.

      Path parameters

      store_id The store id.
      product_id The id for the product of a store.
      variant_id The id for the product variant.

      Request body parameters

      id Type: String Title: Product Variant Foreign ID Read only: false A unique identifier for the product variant.
      title Type: String Title: Title Read only: false The title of a product variant.
      url Type: String Title: URL Read only: false The URL for a product variant.
      sku Type: String Title: SKU Read only: false The stock keeping unit (SKU) of a product variant.
      price Type: Number Title: Price Read only: false The price of a product variant.
      inventory_quantity Type: Integer Title: Inventory Quantity Read only: false The inventory quantity of a product variant.
      image_url Type: String Title: Image URL Read only: false The image URL for a product variant.
      backorders Type: String Title: Backorders Read only: false The backorders of a product variant.
      visibility Type: String Title: Visibility Read only: false The visibility of a product variant.

      Response body parameters

      id Type: String Title: Product Variant Foreign ID Read only: true A unique identifier for the product variant.
      title Type: String Title: Title Read only: false The title of a product variant.
      url Type: String Title: URL Read only: false The URL for a product variant.
      sku Type: String Title: SKU Read only: false The stock keeping unit (SKU) of a product variant.
      price Type: Number Title: Price Read only: false The price of a product variant.
      inventory_quantity Type: Integer Title: Inventory Quantity Read only: false The inventory quantity of a product variant.
      image_url Type: String Title: Image URL Read only: false The image URL for a product variant.
      backorders Type: String Title: Backorders Read only: false The backorders of a product variant.
      visibility Type: String Title: Visibility Read only: false The visibility of a product variant.
      created_at Type: String Title: Creation Time Read only: true The date and time the product was created.
      updated_at Type: String Title: Update Time Read only: true The date and time the product was last updated.
      _links Type: Array Title: Links Read only: true A list of link types and descriptions for the API schema documents.
      Show properties
      rel Type: String Title: Rel Read only: true As with an HTML ‘rel’ attribute, this describes the type of link.
      href Type: String Title: Href Read only: true This property contains a fully-qualified URL that can be called to retrieve the linked resource or perform the linked action.
      method Type: String Title: Method Read only: true The HTTP method that should be used when accessing the URL defined in ‘href’.
      Possible Values:
      • GET
      • POST
      • PUT
      • PATCH
      • DELETE
      • OPTIONS
      • HEAD
      targetSchema Type: String Title: Target Schema Read only: true For GETs, this is a URL representing the schema that the response should conform to.
      schema Type: String Title: Schema Read only: true For HTTP methods that can receive bodies (POST and PUT), this is a URL representing the schema that the body should conform to.

      Example request

      
      curl --request PUT \
      --url 'https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001D' \
      --user 'anystring:apikey' \
      --header 'content-type: application/json' \
      --data '{"id" : "PROD001D", "title" : "Freddie'\''s Jokes Volume 4", "sku" : "Jokes001D", "price" : "5", "inventory_quantity" : 10, "image_url" : "https://static.mailchimp.com/web/brand-assets/Freddie_wink.png", "backorders" : "1", "visibility" : "visible"}' \
      --include
                                      

      Example response

      
      HTTP/1.1 200 OK
      Server: nginx
      Date: Wed, 10 Feb 2016 16:12:59 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 1382
      Connection: keep-alive
      Vary: Accept-Encoding
      X-Request-Id: 5af4cd5d-b2b6-402c-9012-5ce74ef5ffc1
      Link: <https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json>; rel="describedBy"
      
      {
        "id": "PROD001D",
        "title": "Freddie's Jokes Volume 4",
        "url": "",
        "sku": "Jokes001D",
        "price": 5,
        "inventory_quantity": 10,
        "image_url": "https://static.mailchimp.com/web/brand-assets/Freddie_wink.png",
        "backorders": "1",
        "visibility": "visible",
        "created_at": "2016-02-10T16:12:59+00:00",
        "updated_at": "2016-02-10T16:12:59+00:00",
        "_links": [
          {
            "rel": "self",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001D",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
          },
          {
            "rel": "parent",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001",
            "method": "GET",
            "targetSchema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Collection.json"
          },
          {
            "rel": "update",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001D",
            "method": "PATCH",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
          },
          {
            "rel": "upsert",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001D",
            "method": "PUT",
            "schema": "https://api.mailchimp.com/schema/3.0/Ecommerce/Stores/Products/Variants/Instance.json"
          },
          {
            "rel": "delete",
            "href": "https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001D",
            "method": "DELETE"
          }
        ]
      }
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.
    • Delete a product variant

      DELETE /ecommerce/stores/{store_id}/products/{product_id}/variants/{variant_id}

      Delete a product variant.

      Path parameters

      store_id The store id.
      product_id The id for the product of a store.
      variant_id The id for the product variant.

      Example request

      
      curl --request DELETE \
      --url 'https://usX.api.mailchimp.com/3.0/ecommerce/stores/MC001/products/PROD001/variants/PROD001D' \
      --user 'anystring:apikey' \
      --include
                                      

      Example response

      
      HTTP/1.1 204 No Content
      Server: nginx
      Date: Wed, 10 Feb 2016 16:16:55 GMT
      Content-Type: application/json; charset=utf-8
      Content-Length: 0
      Connection: keep-alive
      X-Request-Id: a2501c7c-e677-44e0-813c-02db90cbee18
                                      

      Error response

      type Type: String Title: Problem Type Read only: false An absolute URI that identifies the problem type. When dereferenced, it should provide human-readable documentation for the problem type.
      title Type: String Title: Error Title Read only: false A short, human-readable summary of the problem type. It shouldn’t change based on the occurrence of the problem, except for purposes of localization.
      status Type: Integer Title: HTTP Status Code Read only: false The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurrence of the problem.
      detail Type: String Title: Error Message Read only: false A human-readable explanation specific to this occurrence of the problem. Learn more about errors.
      instance Type: String Title: Instance ID Read only: false A string that identifies this specific occurrence of the problem. Please provide this ID when contacting support.