BigCommerce · Schema

Cart Create Post Data

E-CommerceRetailCatalogOrdersCheckoutPaymentsSaaS

Properties

Name Type Description
customer_id integer
line_items array
custom_items object
gift_certificates array
channel_id integer The Channel ID. If no channel is specified, defaults to 1.
currency object
locale string The locale of the cart. Accepts strings of format `xx` or `xx-YY`. Uses the [ISO-639 standard](https://www.iso.org/iso-639-language-codes.html) format.
View JSON Schema on GitHub

JSON Schema

bigcommerce-cartcreatepostdata-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CartCreatePostData",
  "title": "Cart Create Post Data",
  "type": "object",
  "x-internal": false,
  "properties": {
    "customer_id": {
      "type": "integer"
    },
    "line_items": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/cart_PostVariant"
          },
          {
            "$ref": "#/components/schemas/cart_PostModifier"
          }
        ]
      }
    },
    "custom_items": {
      "$ref": "#/components/schemas/cart_PostCustomItem"
    },
    "gift_certificates": {
      "type": "array",
      "items": {
        "type": "object",
        "title": "Line Item Gift Certificate Request Data",
        "properties": {
          "name": {
            "type": "string",
            "description": "Given name for the gift certificate line item."
          },
          "theme": {
            "type": "string",
            "description": "The theme of the gift certificate.",
            "enum": [
              "birthday.html",
              "boy.html",
              "celebration.html",
              "christmas.html",
              "general.html",
              "girl.html"
            ]
          },
          "amount": {
            "type": "number",
            "minimum": 1,
            "maximum": 1000
          },
          "quantity": {
            "type": "integer",
            "minimum": 1
          },
          "sender": {
            "title": "Contact Entity",
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            }
          },
          "recipient": {
            "title": "Contact Entity",
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            }
          },
          "message": {
            "type": "string",
            "maximum": 200,
            "description": "Message shown to recipient, as provided by sender."
          }
        },
        "required": [
          "name",
          "theme",
          "amount",
          "quantity",
          "sender",
          "recipient"
        ]
      }
    },
    "channel_id": {
      "type": "integer",
      "description": "The Channel ID. If no channel is specified, defaults to 1."
    },
    "currency": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "format": "ISO-4217",
          "description": "The [transactional currency](/docs/rest-management/currencies#definitions) code for the cart, formatted as an [ISO-4217](https://www.iso.org/iso-4217-currency-codes.html) string. This code is required when multi-currency is enabled. Passing a non-transactional display currency will result in a `400` error.",
          "example": "usd"
        }
      }
    },
    "locale": {
      "type": "string",
      "description": "The locale of the cart. Accepts strings of format `xx` or `xx-YY`. Uses the [ISO-639 standard](https://www.iso.org/iso-639-language-codes.html) format.",
      "format": "ISO-639",
      "example": "en-US"
    }
  },
  "description": ""
}