You are able to publish Smart Voucher via this API.

GraphQL API

  • Query String
  • Query Variables
  • HTTP Headers

HTTP Request and Response

Request

  • URL
    • For development: https://test.fstk.io/api
    • For production: https://engine.fstk.io/api
  • Method: POST
  • Headers
    • accept: application/json
    • content-type: application/json
    • authorization: Bearer [JWT Web-to-Server access token]
      • (for example)
  • Body

    The value of query in the body is a String. Please refer to GraphQL multipart request specification for files upload.

Response

Parameters

Request

  • name <String!>
    • Smart Voucher name.
  • symbol <String!>
    • Smart Voucher symbol.
  • totalSupply <String!>
    • Total supply of the Smart Voucher. The format is Decimaled Number.
  • price <Fraction!>
  • Smart Voucher price.
  • numerator <String!>
    • The numerator of this fraction.
  • denominator <String!>
    • The denominator of this fraction.
  • consumable <Boolean!>
    • The Smart Voucher is consumable or not.
  • expiry <String!>
    • Expiry date of the Smart Voucher. The format is Unix Timestamp in millisecond resolution.
  • description <Upload!>
    • Description of the Smart Voucher.
  • por <enum PORMode>
    • ENABLE or DISABLE <enum>
    • Default is DISABLE.

Response

  • publishVoucher <PublishVoucherPayload>
    • transaction <JSON>
      • UNSIGNED raw transaction format in Ethereum.
    • submitToken <String!>
    • hash <String>
      • PORMode ENABLE: Hash of the abi encode.
      • PORMode DISABLE: Hash of the RLP encode.