Skip to content
Navigation

Lists the products discounted when bought together with what a cart holds, or with a product, at what they would cost; a visitor's cart is priced too.

POST
https://api.sherpo.io/customer/v1/stores/{store}/cross_sells/query

Authorization

  • bearer
    optional
    HTTP
  • publishableKey
    optional
    API key in header

Path parameters

  • store
    string
    required

    A hostname of the store.

Request body JSON optional

  • checkout
    optional
    object

    The customer's own cart.

    • id
      string
      required
      maxLength: 512 · minLength: 1
  • lines
    optional
    array of
    object

    A visitor's cart kept in their browser, by its prices; in place of checkout.

    • price
      object
      required
      • id
        string
        required
        maxLength: 512 · minLength: 1
    • quantity
      optional
      number

      Units the line holds, 1 when absent.

      maximum: 99 · minimum: 1
  • product
    optional

    A product shown on its own, whose cross-sells count it as in the cart.

    One of the following:

    • object
    • object
  • price
    optional
    object

    The product's price picked to buy, the one its cross-sells count; each of its live prices when absent.

    • id
      string
      required
      maxLength: 512 · minLength: 1
  • coupon
    optional
    string

    A visitor's coupon code, priced as their cart would take it; a named cart prices with its own.

    maxLength: 64

Returns

200

Lists the products discounted when bought together with what a cart holds, or with a product, at what they would cost; a visitor's cart is priced too.

JSON
  • items
    array of
    object
    required
    • discount_id
      string
      required
    • with
      array of
      string
      required
    • with_price_id
      required

      One of the following:

      • string
      • null
    • product
      object
      required
      • id
        string
        required
      • slug
        string
        required
      • title
        string
        required
      • category
        string
        required
    • price_id
      string
      required
    • currency
      string
      required
    • exponent
      required

      One of the following:

      • number
      • null
    • amount
      number
      required
    • charge
      number
      required
  • lines
    array of
    object
    required
    • with
      array of
      string
      required
    • price_id
      string
      required
    • product_id
      string
      required
    • amount
      required

      One of the following:

      • number
      • null
    • charge
      required

      One of the following:

      • number
      • null
    • discount_id
      required

      One of the following:

      • string
      • null
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • detail
    string
    required
  • code
    optional
    string
  • context
    optional
    object
  • reached_core
    optional
    boolean
  • core_answer
    optional
    string

Type to search…

↑↓ navigate↵ selectEsc close