BigCommerce · Schema

Base Item

E-CommerceRetailCatalogOrdersCheckoutPaymentsSaaS

Properties

Name Type Description
id string The line-item ID.
variant_id number The ID of the variant. Required in the /PUT or /POST request if the product has variants.
product_id number The ID of the product. Required in a /POST request.
sku string SKU of the variant.
name string The itemʼs product name.
url string The product URL.
quantity number Quantity of this item in the cart.
is_taxable boolean Boolean value that specifies whether the item is taxable.
image_url string Image of the product or variant.
discounts array
coupons array
discount_amount number The total value of all discounts applied to this item. This includes coupons and cart level discounts.
coupon_amount number The total value of all coupons applied to this item.
original_price number An item’s original price is the same as the product default price in the admin panel.
list_price number The net item price before discounts and coupons are applied. BigCommerce derives an item’s list price from the product default price or, if applicable, the sale price configured in the admin panel.
sale_price number Item’s price after all discounts are applied. (The final price before tax calculation.)
extended_list_price number List price of the item multiplied by the quantity.
extended_sale_price number Sale price of the item multiplied by the quantity.
options array The list of selected options for this product.
View JSON Schema on GitHub

JSON Schema

bigcommerce-baseitem-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/BaseItem",
  "title": "Base Item",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The line-item ID.",
      "example": "6e193ce6-f327-4dcc-b75e-72cf6738525e"
    },
    "variant_id": {
      "type": "number",
      "description": "The ID of the variant. Required in the /PUT or /POST request if the product has variants.",
      "example": 358
    },
    "product_id": {
      "type": "number",
      "description": "The ID of the product. Required in a /POST request.",
      "example": 12
    },
    "sku": {
      "type": "string",
      "example": "SMGREEN",
      "description": "SKU of the variant."
    },
    "name": {
      "type": "string",
      "description": "The item\u02bcs product name.",
      "example": "T-Shirt"
    },
    "url": {
      "description": "The product URL.",
      "type": "string",
      "format": "uri",
      "example": "http://your-store-url.mybigcommerce.com/your-product/"
    },
    "quantity": {
      "type": "number",
      "example": 5,
      "description": "Quantity of this item in the cart."
    },
    "is_taxable": {
      "type": "boolean",
      "example": false,
      "description": "Boolean value that specifies whether the item is taxable."
    },
    "image_url": {
      "type": "string",
      "format": "uri",
      "example": "https://pathtoproductimage/ProductDefault.png",
      "description": "Image of the product or variant."
    },
    "discounts": {
      "type": "array",
      "items": {
        "type": "object",
        "title": "Applied Discount",
        "description": "Example as part of a cart response:\n\n```\n  \"discounts\": [\n    {\n      \"id\": 2,\n      \"discounted_amount\": 2\n    },\n    {\n      \"id\": \"coupon\",\n      \"discounted_amount\": 0.42\n    }\n  ]\n```",
        "properties": {
          "id": {
            "description": "ID of the applied discount.",
            "example": "coupon",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "discounted_amount": {
            "type": "number",
            "description": "The discounted amount."
          }
        }
      }
    },
    "coupons": {
      "type": "array",
      "items": {
        "type": "object",
        "title": "Applied Coupon",
        "properties": {
          "coupons": {
            "type": "object",
            "description": "Required in a /POST request.",
            "properties": {
              "coupon_code": {
                "type": "object",
                "description": "The coupon code.",
                "properties": {
                  "id": {
                    "type": "integer",
                    "example": 6,
                    "description": "The ID of the coupon."
                  },
                  "code": {
                    "type": "string",
                    "example": "KV56053388J",
                    "description": "The coupon code. Required in a /POST request."
                  },
                  "name": {
                    "type": "string",
                    "example": "Percentage off",
                    "description": "Name given to the coupon in the control panel."
                  },
                  "discountType": {
                    "type": "integer",
                    "description": "The discount type.\n\n- type 0: per_item_discount\n- type 1: percentage_discount\n- type 2: per_total_discount\n- type 3: shipping_discount\n- type 4: free_shipping\nenum:\n- 0\n- 1\n- 2\n- 3\n- 4"
                  },
                  "discountAmount": {
                    "type": "integer",
                    "description": "The amount of the discount based on the coupon. For example, 3 percent off will show a 3.",
                    "example": 3
                  },
                  "expiresDate": {
                    "type": "integer",
                    "example": 0,
                    "description": "Returns 0 if no expiration date has been set."
                  },
                  "totalDiscount": {
                    "type": "number",
                    "example": 4.19,
                    "description": "The total amount of all discounts applied to the cart."
                  }
                }
              }
            },
            "required": [
              "coupon_code"
            ]
          }
        }
      }
    },
    "discount_amount": {
      "type": "number",
      "description": "The total value of all discounts applied to this item. This includes coupons and cart level discounts.",
      "example": 4
    },
    "coupon_amount": {
      "type": "number",
      "description": "The total value of all coupons applied to this item."
    },
    "original_price": {
      "type": "number",
      "description": "An item\u2019s original price is the same as the product default price in the admin panel."
    },
    "list_price": {
      "type": "number",
      "description": "The net item price before discounts and coupons are applied. BigCommerce derives an item\u2019s list price from the product default price or, if applicable, the sale price configured in the admin panel."
    },
    "sale_price": {
      "type": "number",
      "description": "Item\u2019s price after all discounts are applied. (The final price before tax calculation.)"
    },
    "extended_list_price": {
      "type": "number",
      "description": "List price of the item multiplied by the quantity."
    },
    "extended_sale_price": {
      "type": "number",
      "description": "Sale price of the item multiplied by the quantity."
    },
    "options": {
      "description": "The list of selected options for this product.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The product option name; for example, Color or Size."
          },
          "nameId": {
            "type": "number",
            "description": "The product option identifier."
          },
          "value": {
            "type": "string",
            "description": "The product option value; for example, Red or Medium."
          },
          "valueId": {
            "type": "number",
            "description": "The product option value identifier in number format.",
            "example": 128
          }
        },
        "title": "Product Option"
      }
    }
  },
  "required": [
    "variant_id",
    "product_id",
    "quantity"
  ],
  "x-internal": false
}