BigCommerce · Schema

Base Options

Payload sent to a Shipping Provider in to get quotes.

E-CommerceRetailCatalogOrdersCheckoutPaymentsSaaS

Properties

Name Type Description
base_options object The minimum required payload that is sent to retrieve rates.
zone_options object
connection_options object
View JSON Schema on GitHub

JSON Schema

bigcommerce-baseoptionsschema-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/BaseOptionsSchema",
  "title": "Base Options",
  "type": "object",
  "description": "Payload sent to a Shipping Provider in to get quotes.",
  "properties": {
    "base_options": {
      "description": "The minimum required payload that is sent to retrieve rates.",
      "type": "object",
      "title": "Base Rate Request",
      "required": [
        "origin",
        "destination",
        "items",
        "store_id"
      ],
      "properties": {
        "origin": {
          "type": "object",
          "title": "Shipping Address",
          "description": "Object representing a destination or origin address for items.",
          "required": [
            "zip",
            "country_iso2"
          ],
          "properties": {
            "street_1": {
              "type": "string",
              "maxLength": 255
            },
            "street_2": {
              "type": "string",
              "maxLength": 255
            },
            "zip": {
              "type": "string",
              "maxLength": 20,
              "example": "94105"
            },
            "city": {
              "type": "string",
              "maxLength": 50,
              "example": "San Francisco"
            },
            "state_iso2": {
              "type": "string",
              "description": "State in ISO_3166 2 format.",
              "maxLength": 2
            },
            "country_iso2": {
              "type": "string",
              "description": "Country in ISO_3166 2 format.",
              "maxLength": 2,
              "example": "US"
            },
            "address_type": {
              "description": "Optional. Defaults to `RESIDENTIAL`.",
              "type": "string",
              "enum": [
                "RESIDENTIAL",
                "COMMERCIAL"
              ]
            }
          }
        },
        "destination": {
          "type": "object",
          "title": "Shipping Address",
          "description": "Object representing a destination or origin address for items.",
          "required": [
            "zip",
            "country_iso2"
          ],
          "properties": {
            "street_1": {
              "type": "string",
              "maxLength": 255
            },
            "street_2": {
              "type": "string",
              "maxLength": 255
            },
            "zip": {
              "type": "string",
              "maxLength": 20,
              "example": "94105"
            },
            "city": {
              "type": "string",
              "maxLength": 50,
              "example": "San Francisco"
            },
            "state_iso2": {
              "type": "string",
              "description": "State in ISO_3166 2 format.",
              "maxLength": 2
            },
            "country_iso2": {
              "type": "string",
              "description": "Country in ISO_3166 2 format.",
              "maxLength": 2,
              "example": "US"
            },
            "address_type": {
              "description": "Optional. Defaults to `RESIDENTIAL`.",
              "type": "string",
              "enum": [
                "RESIDENTIAL",
                "COMMERCIAL"
              ]
            }
          }
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "description": "A cart item along with its shipping-specific attributes.",
            "title": "Rate Request Item",
            "properties": {
              "sku": {
                "type": "string",
                "description": "The variant SKU."
              },
              "variant_id": {
                "type": "string"
              },
              "product_id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "length": {
                "description": "Value object for a length measurement.",
                "type": "object",
                "title": "Dimension Value",
                "properties": {
                  "units": {
                    "type": "string",
                    "enum": [
                      "cm",
                      "in"
                    ]
                  },
                  "value": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "units",
                  "value"
                ]
              },
              "width": {
                "description": "Value object for a width measurement.",
                "type": "object",
                "title": "Dimension Value",
                "properties": {
                  "units": {
                    "type": "string",
                    "enum": [
                      "cm",
                      "in"
                    ]
                  },
                  "value": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "units",
                  "value"
                ]
              },
              "height": {
                "description": "Value object for a height measurement.",
                "type": "object",
                "title": "Dimension Value",
                "properties": {
                  "units": {
                    "type": "string",
                    "enum": [
                      "cm",
                      "in"
                    ]
                  },
                  "value": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "units",
                  "value"
                ]
              },
              "weight": {
                "description": "Value object for a weight measurement.",
                "type": "object",
                "title": "Weight Value",
                "properties": {
                  "units": {
                    "type": "string",
                    "enum": [
                      "oz",
                      "g"
                    ]
                  },
                  "value": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "units",
                  "value"
                ]
              },
              "discounted_price": {
                "description": "Value object for a money amount.",
                "type": "object",
                "title": "Money Value",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3,3}$"
                  },
                  "amount": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "currency",
                  "amount"
                ]
              },
              "declared_value": {
                "description": "Value object for a money amount.",
                "type": "object",
                "title": "Money Value",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3,3}$"
                  },
                  "amount": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "currency",
                  "amount"
                ]
              },
              "quantity": {
                "type": "number",
                "format": "int32"
              },
              "attributes": {
                "description": "A list of arbitrary properties stored as part of the product or product variant meta fields. These consist of public fields specific to the carrier integration.",
                "type": "array",
                "items": {
                  "type": "object",
                  "title": "Attribute Value",
                  "properties": {
                    "key": {
                      "type": "string",
                      "description": "The key associated with the meta field."
                    },
                    "value": {
                      "type": "string",
                      "description": "The value associated with the meta field."
                    },
                    "namespace": {
                      "type": "string",
                      "description": "The namespace associated with metafields for [products](/docs/rest-catalog/products/metafields#create-a-product-metafield) and [product variants](/docs/rest-catalog/product-variants/metafields). Save the metafield namespace using the format `shipping_carrier_{yourCarrierId}`; otherwise, it will not be recognized as a valid attribute."
                    },
                    "resource_type": {
                      "type": "string",
                      "enum": [
                        "product",
                        "variant"
                      ],
                      "description": "The resource type associated with the metafield. Currently, the only values available are `product` and `variant`."
                    },
                    "resource_id": {
                      "type": "string",
                      "description": "The resource ID of the meta field."
                    },
                    "attribute_type": {
                      "type": "string",
                      "enum": [
                        "metafield"
                      ],
                      "description": "The attribute type associated with the product or product variant metafield. Currently, the only value available is `metafield`."
                    }
                  }
                }
              }
            }
          }
        },
        "customer": {
          "type": "object",
          "title": "Customer Details",
          "description": "The details of the Customer that has made the purchase.",
          "properties": {
            "customer_groups": {
              "type": "array",
              "items": {
                "type": "object",
                "title": "Customer Group",
                "description": "The Group (if any) that this customer is in. The value defaults to zero if the customer is not in a group or is a guest.",
                "properties": {
                  "customer_group_id": {
                    "type": "integer"
                  },
                  "customer_group_name": {
                    "type": "string"
                  }
                }
              }
            },
            "customer_id": {
              "type": "integer"
            }
          }
        },
        "store_id": {
          "type": "string"
        },
        "request_context": {
          "type": "object",
          "title": "Request Context",
          "description": "A collection of Reference Value objects.",
          "properties": {
            "reference_values": {
              "type": "array",
              "items": {
                "type": "object",
                "title": "Reference Value",
                "description": "Value objects contained within the request context.",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "zone_options": {
      "$ref": "#/components/schemas/ZoneOptionsInstance"
    },
    "connection_options": {
      "$ref": "#/components/schemas/ConnectionOptionsInstance"
    }
  },
  "required": [
    "base_options"
  ],
  "x-internal": false
}