Skip to content
Navigation

Revokes a customer's access to a purchase's products, or a grant's, for cause: their access ends at once, their subscriptions to them stop, the customer is mailed with an optional message, and an optional refund is sent through Stripe or recorded.

POST
https://api.sherpo.io/merchant/v1/stores/{store}/revocations

Authorization

  • bearer
    HTTP
    required

Path parameters

  • store
    string
    required

    The store's id.

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

  • cause
    other
    or
    terms_violation
    or
    fraud
    or
    chargeback
    or
    abuse
    required
  • 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"
  • order
    optional
    object

    The purchase whose products the customer loses; give this or grant.

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

    The grant whose product the customer loses; give this or order.

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

    Staff's own words, never shown to the customer.

    One of the following:

    • string
    • null
  • message
    optional

    The seller's words to the customer, added to the mail that always tells them: a rich text with no blocks, stored in its canonical form in 16 KiB of UTF-8; empty sends none.

    One of the following:

    • string
    • null
  • refund
    optional

    Money given back with it; without one, none moves.

    One of the following:

    • object
    • null

Returns

201

Revokes a customer's access to a purchase's products, or a grant's, for cause: their access ends at once, their subscriptions to them stop, the customer is mailed with an optional message, and an optional refund is sent through Stripe or recorded.

JSON
  • id
    string
    required
  • customer_id
    string
    required
  • order_id
    required

    One of the following:

    • string
    • null
  • grant_id
    required

    One of the following:

    • string
    • null
  • product_ids
    array of
    string
    required
  • cause
    string
    required
  • note
    required

    One of the following:

    • string
    • null
  • message
    required

    One of the following:

    • string
    • null
  • refund
    required

    One of the following:

    • object
    • null
  • revoked_by
    required

    One of the following:

    • string
    • null
  • token_id
    required

    One of the following:

    • string
    • null
  • 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