/** * This file was auto-generated by openapi-typescript and ts-morph. * Do not make direct changes to the file. */ export interface paths { readonly "/rate": { readonly parameters: { readonly query?: never; readonly path?: never; readonly cookie?: never; }; /** * Request shipping rates * @description Request shipping rates. BigCommerce sends a request for shipping quotes to the shipping provider URL. The shipping provider responds with shipping quotes. * * > #### Note * > * Substitute the host and path specific to the shipping provider for `your_app.example.com` and `rate`. * > * The Send a Test Request feature is not currently supported for this endpoint. */ readonly post: operations["requestShippingRates"]; }; readonly "/check_connection_options": { readonly parameters: { readonly query?: never; readonly path?: never; readonly cookie?: never; }; /** * Validate connection options * @description Validate connection options. BigCommerce sends a request to the shipping provider URL to check a merchantʼs connection credentials. The shipping provider sends a response indicating whether a merchant has valid credentials. * * > #### Note * > * Substitute the host and path specific to the shipping provider for `your_app.example.com` and `check_connection_options`. * > * The Send a Test Request feature is not currently supported for this endpoint. */ readonly post: operations["validateConnectionOptions"]; }; } export type webhooks = Record; export interface components { schemas: { /** * Rate Request Payload * @description Payload sent to a Shipping Provider to get quotes. */ readonly RateRequestPayload: { readonly base_options: components["schemas"]["BaseOptions"]; readonly zone_options?: components["schemas"]["ZoneOptionsInstance"]; readonly connection_options?: components["schemas"]["ConnectionOptionsInstance"]; }; /** * Base Options * @description Payload sent to a Shipping Provider in to get quotes. */ readonly BaseOptionsSchema: { /** * Base Rate Request * @description The minimum required payload that is sent to retrieve rates. */ readonly base_options: { /** * Shipping Address * @description Object representing a destination or origin address for items. */ readonly origin: { readonly street_1?: string; readonly street_2?: string; /** @example 94105 */ readonly zip: string; /** @example San Francisco */ readonly city?: string; /** @description State in ISO_3166 2 format. */ readonly state_iso2?: string; /** * @description Country in ISO_3166 2 format. * @example US */ readonly country_iso2: string; /** * @description Optional. Defaults to `RESIDENTIAL`. * @enum {string} */ readonly address_type?: "RESIDENTIAL" | "COMMERCIAL"; }; /** * Shipping Address * @description Object representing a destination or origin address for items. */ readonly destination: { readonly street_1?: string; readonly street_2?: string; /** @example 94105 */ readonly zip: string; /** @example San Francisco */ readonly city?: string; /** @description State in ISO_3166 2 format. */ readonly state_iso2?: string; /** * @description Country in ISO_3166 2 format. * @example US */ readonly country_iso2: string; /** * @description Optional. Defaults to `RESIDENTIAL`. * @enum {string} */ readonly address_type?: "RESIDENTIAL" | "COMMERCIAL"; }; readonly items: readonly { /** @description The variant SKU. */ readonly sku?: string; readonly variant_id?: string; readonly product_id?: string; readonly name?: string; /** * Dimension Value * @description Value object for a length measurement. */ readonly length?: { /** @enum {string} */ readonly units: "cm" | "in"; readonly value: number; }; /** * Dimension Value * @description Value object for a width measurement. */ readonly width?: { /** @enum {string} */ readonly units: "cm" | "in"; readonly value: number; }; /** * Dimension Value * @description Value object for a height measurement. */ readonly height?: { /** @enum {string} */ readonly units: "cm" | "in"; readonly value: number; }; /** * Weight Value * @description Value object for a weight measurement. */ readonly weight?: { /** @enum {string} */ readonly units: "oz" | "g"; readonly value: number; }; /** * Money Value * @description Value object for a money amount. */ readonly discounted_price?: { readonly currency: string; readonly amount: number; }; /** * Money Value * @description Value object for a money amount. */ readonly declared_value?: { readonly currency: string; readonly amount: number; }; /** Format: int32 */ readonly quantity?: number; /** @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. */ readonly attributes?: readonly { /** @description The key associated with the meta field. */ readonly key?: string; /** @description The value associated with the meta field. */ readonly value?: 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. */ readonly namespace?: string; /** * @description The resource type associated with the metafield. Currently, the only values available are `product` and `variant`. * @enum {string} */ readonly resource_type?: "product" | "variant"; /** @description The resource ID of the meta field. */ readonly resource_id?: string; /** * @description The attribute type associated with the product or product variant metafield. Currently, the only value available is `metafield`. * @enum {string} */ readonly attribute_type?: "metafield"; }[]; }[]; /** * Customer Details * @description The details of the Customer that has made the purchase. */ readonly customer?: { readonly customer_groups?: readonly { readonly customer_group_id?: number; readonly customer_group_name?: string; }[]; readonly customer_id?: number; }; readonly store_id: string; /** * Request Context * @description A collection of Reference Value objects. */ readonly request_context?: { readonly reference_values?: readonly { readonly name?: string; readonly value?: string; }[]; }; }; readonly zone_options?: components["schemas"]["ZoneOptionsInstance"]; readonly connection_options?: components["schemas"]["ConnectionOptionsInstance"]; }; /** * Customer Details * @description The details of the Customer that has made the purchase. */ readonly CustomerDetails: { readonly customer_groups?: readonly { readonly customer_group_id?: number; readonly customer_group_name?: string; }[]; readonly customer_id?: number; }; /** * Zone Options Instance * @description Any zone-specific request options declared by the carrier and configured by the merchant to retrieve rates. Optional. */ readonly ZoneOptionsInstance: { readonly [key: string]: unknown; }; /** * Connection Options Instance * @description Any global request options declared by the carrier and configured by the merchant to retrieve rates. Optional. */ readonly ConnectionOptionsInstance: { readonly [key: string]: unknown; }; /** * Rate Options Instance * @description Optional, any checkout specific request options to retrieve rates */ readonly RateOptionsInstance: readonly { readonly key: string; readonly value: string; }[]; /** * Customer Group * @description The Group (if any) that this customer is in. The value will default to zero if the customer is not in a group or is a guest. */ readonly CustomerGroup: { readonly customer_group_id?: number; readonly customer_group_name?: string; }; /** Key Value Pair */ readonly KeyValuePair: { readonly key: string; readonly value: string; }; /** * Rate Response Payload * @description The response from the Shipping Service. Contains zero or more quotes. */ readonly RateResponsePayload: { readonly quote_id: string; /** @description Time-to-live (TTL) in seconds */ readonly ttl?: number; readonly messages: readonly { readonly text: string; /** @enum {string} */ readonly type: "INFO" | "WARNING" | "ERROR"; }[]; readonly carrier_quotes: readonly { readonly carrier_info?: { readonly code: string; readonly display_name: string; }; readonly quotes: readonly { /** * @description A code describing the service. * @example GND */ readonly code: string; /** @description A display name for the service. */ readonly display_name: string; /** * Money Value * @description Value object for a money amount. */ readonly cost: { readonly currency: string; readonly amount: number; }; readonly messages?: readonly { readonly text: string; /** @enum {string} */ readonly type: "INFO" | "WARNING" | "ERROR"; }[]; readonly description?: string; readonly rate_id?: string; /** * Money Value * @description Value object for a money amount. Optional field; merchants may request features. */ readonly discounted_cost?: { readonly currency: string; readonly amount: number; }; /** * Format: date * @description Date at which carrier dispatches to the shipping destination. Optional field; merchants may request features. */ readonly dispatch_date?: string; /** * Transit Time Object * @description Value object for the length of time in transit. */ readonly transit_time?: { /** @enum {string} */ readonly units?: "BUSINESS_DAYS" | "DAYS" | "HOURS"; readonly duration?: number; }; }[]; }[]; }; /** * Carrier Quote Object * @description A grouping of carrier rates and optionally, info about that carrier. */ readonly CarrierQuoteObject: { readonly carrier_info?: { readonly code: string; readonly display_name: string; }; readonly quotes: readonly { /** * @description A code describing the service. * @example GND */ readonly code: string; /** @description A display name for the service. */ readonly display_name: string; /** * Money Value * @description Value object for a money amount. */ readonly cost: { readonly currency: string; readonly amount: number; }; readonly messages?: readonly { readonly text: string; /** @enum {string} */ readonly type: "INFO" | "WARNING" | "ERROR"; }[]; readonly description?: string; readonly rate_id?: string; /** * Money Value * @description Value object for a money amount. Optional field; merchants may request features. */ readonly discounted_cost?: { readonly currency: string; readonly amount: number; }; /** * Format: date * @description Date at which carrier dispatches to the shipping destination. Optional field; merchants may request features. */ readonly dispatch_date?: string; /** * Transit Time Object * @description Value object for the length of time in transit. */ readonly transit_time?: { /** @enum {string} */ readonly units?: "BUSINESS_DAYS" | "DAYS" | "HOURS"; readonly duration?: number; }; }[]; }; /** * Rate Request Item * @description A cart item along with its shipping-specific attributes. */ readonly RateRequestItem: { /** @description The variant SKU. */ readonly sku?: string; readonly variant_id?: string; readonly product_id?: string; readonly name?: string; /** * Dimension Value * @description Value object for a length measurement. */ readonly length?: { /** @enum {string} */ readonly units: "cm" | "in"; readonly value: number; }; /** * Dimension Value * @description Value object for a width measurement. */ readonly width?: { /** @enum {string} */ readonly units: "cm" | "in"; readonly value: number; }; /** * Dimension Value * @description Value object for a height measurement. */ readonly height?: { /** @enum {string} */ readonly units: "cm" | "in"; readonly value: number; }; /** * Weight Value * @description Value object for a weight measurement. */ readonly weight?: { /** @enum {string} */ readonly units: "oz" | "g"; readonly value: number; }; /** * Money Value * @description Value object for a money amount. */ readonly discounted_price?: { readonly currency: string; readonly amount: number; }; /** * Money Value * @description Value object for a money amount. */ readonly declared_value?: { readonly currency: string; readonly amount: number; }; /** Format: int32 */ readonly quantity?: number; /** @description A list of arbitrary properties stored as part of the product or product variant meta fields. These consist of any public fields specific to the carrier integration. */ readonly attributes?: readonly { /** @description The key associated with the product or product variant meta field. */ readonly key?: string; /** @description The value associated with the product or product variant meta field. */ readonly value?: string; /** @description The namespace associated with metafields for [products](/docs/rest-catalog/products/metafields) 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. */ readonly namespace?: string; /** * @description Resource type associated with the product or product variant meta field. Currently, the only values available are 'product' or 'variant'. * @enum {string} */ readonly resource_type?: "product" | "variant"; /** @description The resource ID of the product or product variant meta field. */ readonly resource_id?: string; /** * @description Attribute type associated with the product or product variant meta field. Currently, the only value for this is 'metafield'. * @enum {string} */ readonly attribute_type?: "metafield"; }[]; }; /** * Request Context * @description A collection of Reference Value objects. */ readonly RequestContext: { readonly reference_values?: readonly { readonly name?: string; readonly value?: string; }[]; }; /** * Reference Value * @description Value objects contained within the request context. */ readonly ReferenceValue: { readonly name?: string; readonly value?: string; }; /** * Message * @description A simple string/type response for returning information. */ readonly Message: { readonly text: string; /** @enum {string} */ readonly type: "INFO" | "WARNING" | "ERROR"; }; /** * Rate Quote Object * @description A quote being returned as part of the rate request. */ readonly RateQuoteObject: { /** * @description A code describing the service. * @example GND */ readonly code: string; /** @description A display name for the service. */ readonly display_name: string; /** * Money Value * @description Value object for a money amount. */ readonly cost: { readonly currency: string; readonly amount: number; }; readonly messages?: readonly { readonly text: string; /** @enum {string} */ readonly type: "INFO" | "WARNING" | "ERROR"; }[]; readonly description?: string; readonly rate_id?: string; /** * Money Value * @description Value object for a money amount. Optional field; merchants may request features. */ readonly discounted_cost?: { readonly currency: string; readonly amount: number; }; /** * Format: date * @description Date at which carrier dispatches to the shipping destination. Optional field; merchants may request features. */ readonly dispatch_date?: string; /** * Transit Time Object * @description Value object for the length of time in transit. */ readonly transit_time?: { /** @enum {string} */ readonly units?: "BUSINESS_DAYS" | "DAYS" | "HOURS"; readonly duration?: number; }; }; /** * Transit Time Object * @description Value object for the length of time in transit. */ readonly TransitTimeObject: { /** @enum {string} */ readonly units?: "BUSINESS_DAYS" | "DAYS" | "HOURS"; readonly duration?: number; }; /** * Attribute Value * @description Value object for an attribute. This represents a product or product variant meta field. */ readonly AttributeValue: { /** @description The key associated with the product or product variant meta field. */ readonly key?: string; /** @description The value associated with the product or product variant meta field. */ readonly value?: string; /** @description The namespace associated with metafields for [products](/docs/rest-catalog/products/metafields) 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. */ readonly namespace?: string; /** * @description Resource type associated with the product or product variant meta field. Currently, the only values available are 'product' or 'variant'. * @enum {string} */ readonly resource_type?: "product" | "variant"; /** @description The resource ID of the product or product variant meta field. */ readonly resource_id?: string; /** * @description Attribute type associated with the product or product variant meta field. Currently, the only value for this is 'metafield'. * @enum {string} */ readonly attribute_type?: "metafield"; }; /** * Money Value * @description Value object for a money amount. */ readonly MoneyValue: { readonly currency: string; readonly amount: number; }; /** * Dimension Value * @description Value object for a length measurement. */ readonly DimensionValue: { /** @enum {string} */ readonly units: "cm" | "in"; readonly value: number; }; /** * Weight Value * @description Value object for a weight measurement. */ readonly WeightValue: { /** @enum {string} */ readonly units: "oz" | "g"; readonly value: number; }; /** * Rate Options Schema * @description A set of carrier-specific fields that will be displayed to shoppers at checkout. */ readonly RateOptionsSchema: readonly { /** @description The internal code that represents this input field. */ readonly code: string; /** @description Display name for this input field. */ readonly label: string; /** @description Longer description text to be displayed as a tooltip at checkout. */ readonly description?: string; /** @description Placeholder for any validation we choose to implement. */ readonly validation?: string; /** * @description How this input will be displayed. * @enum {string} */ readonly type: "date" | "string" | "select" | "code"; /** @description A valid default value for this field. */ readonly default_value: string; /** @description The list of options available for `select` type fields. */ readonly value_options?: readonly string[]; /** @description The set of valid date ranges for `date` type fields. */ readonly date_ranges?: readonly { /** * Date Value * @description Value Object representing a Date. */ readonly from?: { /** Format: date */ readonly date?: string; readonly timezone?: string; }; /** * Date Value * @description Value Object representing a Date. */ readonly to?: { /** Format: date */ readonly date?: string; readonly timezone?: string; }; }[]; }[]; /** * Key Value Pair Schema * @description Options, ranges, defaults, and validation for a carrier-defined field that displays at checkout. */ readonly KeyValuePairSchema: { /** @description The internal code that represents this input field. */ readonly code: string; /** @description Display name for this input field. */ readonly label: string; /** @description Longer description text to be displayed as a tooltip at checkout. */ readonly description?: string; /** @description Placeholder for any validation we choose to implement. */ readonly validation?: string; /** * @description How this input will be displayed. * @enum {string} */ readonly type: "date" | "string" | "select" | "code"; /** @description A valid default value for this field. */ readonly default_value: string; /** @description The list of options available for `select` type fields. */ readonly value_options?: readonly string[]; /** @description For date type fields, a set of valid date ranges available to choose from */ readonly date_ranges?: readonly { /** * Date Value * @description Value Object representing a Date. */ readonly from?: { /** Format: date */ readonly date?: string; readonly timezone?: string; }; /** * Date Value * @description Value Object representing a Date. */ readonly to?: { /** Format: date */ readonly date?: string; readonly timezone?: string; }; }[]; }; /** * Shipping Address * @description Object representing a destination or origin address for items. */ readonly ShippingAddress: { readonly street_1?: string; readonly street_2?: string; /** @example 94105 */ readonly zip: string; /** @example San Francisco */ readonly city?: string; /** @description State in ISO_3166 2 format. */ readonly state_iso2?: string; /** * @description Country in ISO_3166 2 format. * @example US */ readonly country_iso2: string; /** * @description Optional. Defaults to `RESIDENTIAL`. * @enum {string} */ readonly address_type?: "RESIDENTIAL" | "COMMERCIAL"; }; /** * Check Connection Options Request Payload * @description The payload sent to a Shipping Provider to check that the store is connected to this provider. * * Each Shipping Provider will have different configurations for the payload. */ readonly CheckConnectionOptionsRequestPayload: { readonly connection_options: components["schemas"]["ConnectionOptionsInstance"]; }; /** * Check Connection Options Response Payload * @description The response received back from the Shipping Provider connection check. This allows the store to understand whether the connection was successful. */ readonly CheckConnectionOptionsResponsePayload: { /** @description Indicates whether or not the connection options are valid. */ readonly valid?: boolean; readonly messages?: readonly { readonly text: string; /** @enum {string} */ readonly type: "INFO" | "WARNING" | "ERROR"; }[]; }; /** * Date Range * @description Representation of a range of date objects. */ readonly DateRange: { /** * Date Value * @description Value Object representing a Date. */ readonly from?: { /** Format: date */ readonly date?: string; readonly timezone?: string; }; /** * Date Value * @description Value Object representing a Date. */ readonly to?: { /** Format: date */ readonly date?: string; readonly timezone?: string; }; }; /** * Date Value * @description Value Object representing a Date. */ readonly DateValue: { /** Format: date */ readonly date?: string; readonly timezone?: string; }; /** * Base Rate Request * @description The minimum required payload that is sent to retrieve rates. */ readonly BaseOptions: { /** * Shipping Address * @description Object representing a destination or origin address for items. */ readonly origin: { readonly street_1?: string; readonly street_2?: string; /** @example 94105 */ readonly zip: string; /** @example San Francisco */ readonly city?: string; /** @description State in ISO_3166 2 format. */ readonly state_iso2?: string; /** * @description Country in ISO_3166 2 format. * @example US */ readonly country_iso2: string; /** * @description Optional. Defaults to `RESIDENTIAL`. * @enum {string} */ readonly address_type?: "RESIDENTIAL" | "COMMERCIAL"; }; /** * Shipping Address * @description Object representing a destination or origin address for items. */ readonly destination: { readonly street_1?: string; readonly street_2?: string; /** @example 94105 */ readonly zip: string; /** @example San Francisco */ readonly city?: string; /** @description State in ISO_3166 2 format */ readonly state_iso2?: string; /** * @description Country in ISO_3166 2 format * @example US */ readonly country_iso2: string; /** * @description Defaults to residential. Optional. * @enum {string} */ readonly address_type?: "RESIDENTIAL" | "COMMERCIAL"; /** * @description Describes one or more [custom form fields](/docs/rest-storefront/forms). Property key is the global ID of a shipping address form field. When no custom fields exist, the object is empty. * @example { * "1": "selected_value", * "3": "checkbox_selection_1" * } */ readonly form_fields?: { readonly "
"?: components["schemas"]["FormFieldValue"]; }; }; readonly items: readonly { /** @description The variant SKU. */ readonly sku?: string; readonly variant_id?: string; readonly product_id?: string; readonly name?: string; /** * Dimension Value * @description Value object for a length measurement. */ readonly length?: { /** @enum {string} */ readonly units: "cm" | "in"; readonly value: number; }; /** * Dimension Value * @description Value object for a length measurement. */ readonly width?: { /** @enum {string} */ readonly units: "cm" | "in"; readonly value: number; }; /** * Dimension Value * @description Value object for a length measurement. */ readonly height?: { /** @enum {string} */ readonly units: "cm" | "in"; readonly value: number; }; /** * Weight Value * @description Value object for a weight measurement. */ readonly weight?: { /** @enum {string} */ readonly units: "oz" | "g"; readonly value: number; }; /** * Money Value * @description Value object for a money amount. */ readonly discounted_price?: { readonly currency: string; readonly amount: number; }; /** * Money Value * @description Value object for a money amount. */ readonly declared_value?: { readonly currency: string; readonly amount: number; }; /** Format: int32 */ readonly quantity?: number; /** @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. */ readonly attributes?: readonly { /** @description The key associated with the meta field. */ readonly key?: string; /** @description The value associated with the meta field. */ readonly value?: string; /** @description The namespace associated with a [product](/docs/rest-catalog/products/metafields) or [product variant](/docs/rest-catalog/product-variants/metafields) metafields. You should save a metafield namespace under this format `shipping_carrier_{yourCarrierId}`; otherwise, you will not be able to recognize it as an attribute. */ readonly namespace?: string; /** * @description Resource type associated with the meta field. Currently, the only values available are 'product' or 'variant'. * @enum {string} */ readonly resource_type?: "product" | "variant"; /** @description The resource ID of the meta field. */ readonly resource_id?: string; /** * @description Attribute type associated with the product or product variant meta field. Currently, the only value for this is 'metafield'. * @enum {string} */ readonly attribute_type?: "metafield"; }[]; }[]; /** * Customer Details * @description The details of the Customer that has made the purchase. */ readonly customer?: { readonly customer_groups?: readonly { readonly customer_group_id?: number; readonly customer_group_name?: string; }[]; readonly customer_id?: number; }; readonly store_id: string; /** * Request Context * @description A collection of Reference Value objects. */ readonly request_context?: { readonly reference_values?: readonly { /** @description The property to which the reference value pertains. Examples include `channel_id` and `cart_id`. */ readonly name?: string; readonly value?: string; }[]; }; }; /** * Form Field Value * @description The value of a [shipping address](/docs/rest-management/orders/order-shipping-addresses#get-a-shipping-address) form field. Depending on the form field, this could be a user-defined value or the value of a hidden input. */ readonly FormFieldValue: string; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export interface operations { readonly requestShippingRates: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path?: never; readonly cookie?: never; }; /** @description Rate request object. */ readonly requestBody: { readonly content: { readonly "application/json": components["schemas"]["RateRequestPayload"]; }; }; readonly responses: { /** @description Quote response. */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["RateResponsePayload"]; }; }; }; }; readonly validateConnectionOptions: { readonly parameters: { readonly query?: never; readonly header?: never; readonly path?: never; readonly cookie?: never; }; /** @description Check connection options request. */ readonly requestBody: { readonly content: { readonly "application/json": components["schemas"]["CheckConnectionOptionsRequestPayload"]; }; }; readonly responses: { /** @description Check connection options response. */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["CheckConnectionOptionsResponsePayload"]; }; }; }; }; }