Skip to content
Navigation

Creates a quiz on an entry.

POST
https://api.sherpo.io/merchant/v1/stores/{store}/products/{product}/entries/{entry}/quizzes

Authorization

  • bearer
    HTTP
    required

Path parameters

  • store
    string
    required

    The store's id.

  • product
    string
    required

    An id, or slug:<slug>.

    minLength: 1
  • entry
    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 required

  • blocks
    array of
    required

    The blocks as the editor writes them; a key the schema does not know is refused.

    One of the following:

    • object
    • object
    • object
    • object
    • object
    • object
    • object
    • object
  • text_format
    optional
    html
    or
    markdown

    The format the rich text fields are written in: the rich text format’s HTML, or Markdown converted into it before it is validated. A text already stored in the format (starting with <rich-text) is kept as it is either way.

    default: "html"
  • full
    optional
    boolean

    Answers the texts, attachments and file lists the short answer leaves out.

  • after
    optional

    The newest version the caller started from, null for none; a newer one refuses the write.

    One of the following:

    • object
    • null
  • follows
    optional
    object

    The questions that version held as the caller read them; others there refuse the write.

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

    One of the following:

    • string
    • null
  • settings
    optional
    object
    • attempts_allowed
      optional

      Null is unlimited.

      One of the following:

      • integer
      • null
    • pass_mark
      optional

      Percent needed to pass; null passes any finished sitting.

      One of the following:

      • integer
      • null
    • show_answers
      optional
      boolean

Returns

201

Creates a quiz on an entry.

JSON
  • id
    string
    required
  • created_at
    required

    One of the following:

    • string
    • null
  • updated_at
    required

    One of the following:

    • string
    • null
  • settings
    object
    required
    • attempts_allowed
      required

      One of the following:

      • number
      • null
    • pass_mark
      required

      One of the following:

      • number
      • null
    • show_answers
      boolean
      required
  • product_id
    string
    required
  • entry_id
    string
    required
  • version
    number
    required
  • certificates
    array of
    object
    required
    • id
      string
      required
    • product_id
      string
      required
    • quiz_id
      required

      One of the following:

      • string
      • null
    • headline_copy
      string
      required
    • title_copy
      required

      One of the following:

      • string
      • null
    • awarded_copy
      required

      One of the following:

      • string
      • null
    • reason_copy
      required

      One of the following:

      • string
      • null
    • score_copy
      required

      One of the following:

      • string
      • null
    • out_of_score_copy
      required

      One of the following:

      • string
      • null
    • settings
      object
      required
      • template
        string
        required
      • accent
        required

        One of the following:

        • string
        • null
      • requires_passing
        optional
        boolean

        Earned by passing the quiz, not by merely finishing it.

      • earned_on
        optional
        string

        Set on a certificate no quiz awards: finishing every entry of a course, or a check-in at an event, earns it; losing its quiz never makes one.

      • shows
        optional
        array of
        string
    • created_at
      required

      One of the following:

      • string
      • null
  • question_count
    number
    required

    How many of its blocks are questions a sitter answers.

  • sittings
    number
    required
  • body
    object
    required
    • attachment_id
      string
      required
    • asset_id
      string
      required

      The body asset a later update's replaces names.

    • title
      required

      One of the following:

      • string
      • null
    • blocks
      optional
      array of
      object

      The questions as written; answered only with full.

      • type
        string
        required
      • id
        string
        required
  • created
    array of
    object
    required

    The attachments the write bound: the files its new static text names.

    • id
      string
      required
    • role
      string
      required
    • asset
      object
      required
      • id
        string
        required
  • files
    optional
    map of
    object

    The files its static text names, as its save bound them; answered only with full.

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