Skip to content
Navigation

Updates an attachment's role, delivery or preview flag.

PATCH
https://api.sherpo.io/merchant/v1/stores/{store}/attachments/{attachment}

Authorization

  • bearer
    HTTP
    required

Path parameters

  • store
    string
    required

    The store's id.

  • attachment
    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

  • asset
    optional
    object

    Swapped in place; on the store's home only its body or stylesheet takes another file. A poster, and an image a product binds as embed, takes one of at most 15 MB.

    • id
      string
      required
      maxLength: 512 · minLength: 1
  • from
    optional
    object

    The asset the caller saw bound; any other refuses.

    • id
      string
      required
      maxLength: 512 · minLength: 1
  • from_role
    optional
    body
    or
    staged
    or
    staged_file
    or
    prose
    or
    teaser
    or
    embed
    +5 more

    The role the caller saw it hold; another refuses.

  • from_delivery
    optional
    inline
    or
    download
    or
    stream

    The delivery the caller saw it served by; another refuses.

  • body
    optional

    The body the caller saw on the target, null for none; another refuses.

    One of the following:

    • object
    • null
  • kind
    optional
    video
    or
    audio
    or
    pdf

    The file it holds after the write must be of this kind, as a lesson's video swapped, or it refuses conflict on mime with the reason.

  • role
    optional
    body
    or
    staged
    or
    staged_file
    or
    prose
    or
    teaser
    or
    embed
    +5 more

    A move on the store's home lands only in body or stylesheet; a poster, or an image moved into a product's embed, is at most 15 MB.

  • delivery
    optional
    inline
    or
    download
    or
    stream

    The seller's pick, which a save of the text no longer flips with its use.

  • preview_only
    optional
    boolean

    True drops every gate row of the attachment's own, which takes the gate's scopes.

  • position
    optional
    integer
    maximum: 1000000 · minimum: 0
  • download_tier
    optional

    Who may download a lesson's slides bound as a download: a tier and above, or null for whoever opens them; takes the gate's scopes.

    One of the following:

    • object
    • null

Returns

200

Updates an attachment's role, delivery or preview flag.

JSON
  • id
    string
    required
  • target
    object
    required
    • kind
      string
      required
    • id
      string
      required
  • role
    string
    required
  • delivery
    string
    required
  • preview_only
    boolean
    required
  • from_body
    boolean
    required
  • release_file
    boolean
    required

    A file a software release ships, which its release edits and the product's own list leaves out.

  • position
    number
    required
  • asset
    object
    required
    • id
      string
      required
    • locator
      required

      One of the following:

      • string
      • null
    • origin
      string
      required
    • custodian
      string
      required
    • enforcement
      string
      required
    • mime
      required

      One of the following:

      • string
      • null
    • bytes
      required

      The file's size in bytes; null when it is charged nothing.

      One of the following:

      • number
      • null
    • quota_bytes
      number
      required

      The file's size in bytes; zero when it is charged nothing.

    • name
      string
      required
    • title
      required

      One of the following:

      • string
      • null
    • ext
      required

      One of the following:

      • string
      • null
    • status
      string
      required
    • optimized
      boolean
      required
    • parent_id
      required

      One of the following:

      • string
      • null
    • redacted
      boolean
      required
    • security
      required

      One of the following:

      • string
      • null
    • description
      required

      One of the following:

      • string
      • null
    • processed_at
      required

      One of the following:

      • string
      • null
    • metadata
      object
      required
      • width
        optional
        integer
        minimum: 0
      • height
        optional
        integer
        minimum: 0
      • duration
        optional
        number

        Seconds, measured, so rarely whole.

      • pages
        optional
        integer
        minimum: 0
      • waveform
        optional

        An audio file's waveform: 256 levels from 0 to 255, base64; null when it can't be drawn.

        One of the following:

        • string
        • null
      • transcript
        optional
        object
        • language
          optional
          string
        • confidence
          optional
          number
      • arguments
        optional
        array of
        object

        What an MCP prompt asks for; only an authored prompt carries it.

        • name
          string
          required
        • description
          required

          One of the following:

          • string
          • null
        • required
          boolean
          required
        • default
          required

          One of the following:

          • string
          • null
        • match
          required

          Pattern the whole value must match, diacritic-insensitive.

          One of the following:

          • string
          • null
        • flags
          required

          Flags among i, s and u the pattern runs with; null for i alone.

          One of the following:

          • string
          • null
        • message
          required

          What a refused value is told instead of the default reason.

          One of the following:

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