W3Block Docs
  • ๐Ÿš€Start here
    • Welcome to the Docs
    • Integrated Blockchains
  • ๐Ÿ‘จโ€๐Ÿ’ปDev Docs
    • API
      • Getting Started
      • Authentication
      • Commerce API services
        • Company Administration
          • Companies (Admin)
          • Assets (Admin)
          • Tags (Admin)
          • Products (Admin)
            • Order Rules (Admin)
          • Orders (Admin)
          • Faq (Admin)
          • Webhooks (Admin)
        • Products
        • Orders
        • Webhooks
        • Faq
        • Globals
      • Key API Services
        • Authentication
        • Companies
        • Tokens
          • Contracts
            • External Contacts
            • Royalty Eligible
          • Categories
            • Subcategories
          • Token Collections
            • Token Editions
          • Metadata
        • Blockchain
        • Cloudinary
        • Integration
          • Ecommerce
            • Associate Tokens
            • Hooks
        • Users
        • Vouchers
  • ๐Ÿ“˜Knowledge Base
    • First Steps
    • FAQ
    • Glossary
Powered by GitBook
On this page
  1. Dev Docs
  2. API
  3. Key API Services

Vouchers

PreviousUsersNextFirst Steps

Last updated 2 years ago

๐Ÿ‘จโ€๐Ÿ’ป
delete
Authorizations
Path parameters
idstringRequired
companyIdstringRequired
Responses
401
Need user with one of these roles: superAdmin, admin
delete
DELETE /{companyId}/vouchers/{id} HTTP/1.1
Host: 
x-w3block-api-key: YOUR_API_KEY
Accept: */*
401

Need user with one of these roles: superAdmin, admin

No content

get
Authorizations
Path parameters
companyIdstringRequired
codestringRequired
Responses
200Success
401
Unauthorized - Integration API key or JWT required
get
GET /{companyId}/vouchers/{code} HTTP/1.1
Host: 
x-w3block-api-key: YOUR_API_KEY
Accept: */*

No content

  • GET/{companyId}/vouchers
  • POST/{companyId}/vouchers
  • DELETE/{companyId}/vouchers/{id}
  • GET/{companyId}/vouchers/{code}
  • POST/{companyId}/vouchers/redeem
get
Authorizations
Path parameters
companyIdstringRequired
Query parameters
pagenumberOptionalDefault: 1
limitnumberOptionalDefault: 10
searchstringOptional
sortBystringOptional
orderBystring ยท enumOptionalDefault: DESCPossible values:
enabledbooleanOptional
startDatestringOptionalExample: 2022-07-20T23:59:59.000Z
endDatestringOptionalExample: 2022-07-20T23:59:59.000Z
Responses
401
Need user with one of these roles: superAdmin, admin
get
GET /{companyId}/vouchers HTTP/1.1
Host: 
x-w3block-api-key: YOUR_API_KEY
Accept: */*
401

Need user with one of these roles: superAdmin, admin

No content

post
Authorizations
Path parameters
companyIdstringRequired
Body
codestringOptional
amountnumberOptionalDefault: 1
limitPerUsernumberOptionalDefault: 1
userIdstringOptional
whitelistIdstringOptional
startDatestringOptionalExample: 2022-07-20T23:59:59.000Z
endDatestringOptionalExample: 2022-07-20T23:59:59.000Z
Responses
401
Need user with one of these roles: superAdmin, admin
post
POST /{companyId}/vouchers HTTP/1.1
Host: 
x-w3block-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 261

{
  "code": "text",
  "amount": 1,
  "limitPerUser": 1,
  "userId": "text",
  "whitelistId": "text",
  "tokenCollections": [
    {
      "tokenCollectionId": "123e4567-e89b-12d3-a456-426614174000",
      "tokenEditionIds": [
        []
      ]
    }
  ],
  "startDate": "2022-07-20T23:59:59.000Z",
  "endDate": "2022-07-20T23:59:59.000Z"
}
401

Need user with one of these roles: superAdmin, admin

No content

post
Authorizations
Path parameters
companyIdstringRequired
Body
codestringRequired
userIdstringRequired
Responses
201Success
401
Unauthorized - Integration API key or JWT required
post
POST /{companyId}/vouchers/redeem HTTP/1.1
Host: 
x-w3block-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 31

{
  "code": "text",
  "userId": "text"
}

No content