Skip to content
Navigation

Records a key a customer holds from another platform as their license to a software product, so software in the field keeps checking; it may land disabled, or take the place of the customer's license.

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

Authorization

  • bearer
    HTTP
    required

Path parameters

  • store
    string
    required

    The store's id.

  • product
    string
    required

    An id, or slug:<slug>.

    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

  • customer
    required

    By id, or by email: whoever the address reaches, else a new invited customer.

    One of the following:

    • object
    • object
  • key
    string
    required

    The key as the old platform issued it, kept verbatim; a hex key matches in any case and spacing, any other exactly.

    maxLength: 128 · minLength: 6 · pattern: ^[A-Za-z0-9._-]*[A-Za-z0-9][A-Za-z0-9._-]*$
  • uses
    optional
    integer

    How many times software checked it so far; a replace keeps the replaced license's by default.

    maximum: 1000000000 · minimum: 0
  • metadata
    optional
    map of
    any of
  • disabled
    optional
    boolean

    Record it disabled, as for a key refunded or turned off at the old platform; defaults to false, or to the replaced license's state.

  • disabled_reason
    optional

    Why it is disabled; only with disabled.

    One of the following:

    • string
    • null
  • replace
    optional
    boolean

    Take the place of the customer's live license for the product, keeping its limit, which then reads as replaced. Defaults to false.

Returns

201

Records a key a customer holds from another platform as their license to a software product, so software in the field keeps checking; it may land disabled, or take the place of the customer's license.

JSON
  • subscription
    required

    The subscription behind its access; null for a one-time purchase or a grant, or without subscription:read.

    One of the following:

    • object
    • null
  • activations
    object
    required

    The devices it counts now and the most it may hold, its own limit, else its tier's, else its product's; limit null when nothing limits it.

    • count
      number
      required
    • limit
      required

      One of the following:

      • number
      • null
  • key_ending
    string
    required

    The key's last characters, so a support reply can name it; getLicense answers it whole.

  • tier
    required

    The tier its access opens, else the one it last opened; null for access with no tier.

    One of the following:

    • object
    • null
  • customer
    required

    One of the following:

    • object
    • null
  • id
    string
    required
  • product_id
    string
    required
  • customer_id
    string
    required
  • source
    string
    required
  • status
    string
    required

    Where it stands now: active, expired, revoked, disabled or replaced.

  • expires_at
    required

    When access ends; null while it never does.

    One of the following:

    • string
    • null
  • reason
    required

    Why it reads its status: replaced, disabled, lapse, refund or revoke; null while active, or before any access began.

    One of the following:

    • string
    • null
  • has_access
    boolean
    required

    Whether its holder has access now, whatever its status; false before access begins.

  • activation_limit
    required

    One of the following:

    • number
    • null
  • uses
    number
    required
  • metadata
    map of
    any of
    required
  • created_at
    required

    One of the following:

    • string
    • null
  • disabled_at
    required

    One of the following:

    • string
    • null
  • disabled_reason
    required

    One of the following:

    • string
    • null
  • replaced_by
    required

    One of the following:

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