Skip to content
Navigation

Rewords a product question, makes it required or not, changes its options or pattern, or moves it.

PATCH
https://api.sherpo.io/merchant/v1/stores/{store}/products/{product}/questions/{question}

Authorization

  • bearer
    HTTP
    required

Path parameters

  • store
    string
    required

    The store's id.

  • product
    string
    required

    An id, or slug:<slug>.

    minLength: 1
  • question
    string
    required
    minLength: 1

Header parameters

  • Idempotency-Key
    optional
    string

    Repeats within 24 hours answer the first result; the same key with other arguments is a conflict.

    maxLength: 255 · minLength: 1 · pattern: ^[\x21-\x7E]+$

Request body JSON optional

  • position
    optional
    integer

    Where it goes among the product's questions, from zero; last when unset.

    maximum: 19 · minimum: 0
  • label
    optional
    string

    What the buyer is asked, trimmed, with no line break or control character; required unless a preset names it.

    maxLength: 200 · minLength: 1
  • required
    optional
    boolean

    Whether checkout asks for an answer before payment; a required checkbox must be ticked. False when unset.

  • options
    optional
    array of
    string

    A select's or a multi select's options, in order and distinct, each trimmed with no line break or control character; refused for any other kind.

  • pattern
    optional

    A text answer's pattern, trimmed and matched against the whole answer: literals, ., classes, \d \w \s, groups, | and repeats up to 100; refused for any other kind and for what can't be matched safely.

    One of the following:

    • string
    • null
  • example
    optional

    An answer that fits the pattern, trimmed with no line break or control character, which checkout shows buyers as the format to follow; refused without a pattern or when the pattern doesn't match it, and cleared with the pattern.

    One of the following:

    • string
    • null
  • from_position
    optional
    integer

    Where the caller last read it; one moved since is refused, so two moves never compound.

    maximum: 19 · minimum: 0

Returns

200

Rewords a product question, makes it required or not, changes its options or pattern, or moves it.

JSON
  • id
    string
    required
  • product_id
    string
    required
  • position
    number
    required

    Where it shows among the product's questions, from zero.

  • kind
    string
    required

    text, long_text, select, multi_select or checkbox.

  • preset
    required

    The standard detail it asks for (name, phone, company or address), or null for one of the seller's own.

    One of the following:

    • string
    • null
  • label
    string
    required
  • required
    boolean
    required

    Whether checkout asks for an answer before payment; a required checkbox must be ticked.

  • options
    required

    A select's options, in order; null for any other kind.

    One of the following:

    • array<string>
    • null
  • pattern
    required

    The pattern a text answer must match whole, or null for none.

    One of the following:

    • string
    • null
  • example
    required

    An answer that fits the pattern, which checkout shows as the format to follow; null for none.

    One of the following:

    • string
    • null
  • created_at
    string
    required
  • updated_at
    string
    required
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