LogoLogo
  • Inveterate Dev Docs
  • API Reference Docs
    • Public API 2.0 Reference
      • Admin
        • Benefits
        • Members
          • Credits
        • Merchant
        • Tiers
          • Benefits
          • Campaigns
        • Webhooks
      • Storefront
        • Members
          • Credits
            • Redemption
          • Cancellation
        • Benefits
        • Tiers
          • Benefits
          • Campaigns
        • Specification
      • Schemas
    • [LEGACY] Public API Reference
      • Benefits API
      • Campaigns API
      • Customers API
      • Merchant API
      • Credits API
      • Free tiers API
      • Webhooks
  • Stack Reference Docs
    • Landing Page
    • Storefront
      • Properties
      • Customizations
        • Add To Cart Button
    • Customer Metafields
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. API Reference Docs
  2. Public API 2.0 Reference
  3. Admin

Benefits

This set of benefit endpoints should only be used by merchant that have Tiers disabled. Benefit access for merchants that have enabled Tiers can be found in the Tiers tab in this API reference.

PreviousAdminNextMembers

Last updated 1 year ago

Was this helpful?

get

This endpoint will return all benefits for a merchant. It will return an array of benefits. Each benefit will have a type field that will identify the type of benefit.

Header parameters
X-Inveterate-Api-KeystringRequired

Your private Inveterate API key.

Responses
200
Returned upon successful direct action to our database. Action is immediate.
application/json
400
Returned upon a malformed request. Check your API key, URL parameters, and body parameters when this error is returned. Generally, if you see this error, that also means NO action was taken on our backend.
application/json
500
Returned for all other errors. Generally these come from our backend. Some multipart functions may execute somewhat and then fail, causing some data to be updated.
application/json
get
GET /v2.0/admin/benefits HTTP/1.1
Host: 
X-Inveterate-Api-Key: text
Accept: */*
{
  "message": "text",
  "data": {}
}
get

This endpoint will return one specific benefit given a benefit type. Note that the benefit type is a string character. For a list of all benefit types, look at the default type value in each schema.

Path parameters
typestringRequired

The benefit type.

Header parameters
X-Inveterate-Api-KeystringRequired

Your private Inveterate API key.

Responses
200
Returned upon successful direct action to our database. Action is immediate.
application/json
400
Returned upon a malformed request. Check your API key, URL parameters, and body parameters when this error is returned. Generally, if you see this error, that also means NO action was taken on our backend.
application/json
500
Returned for all other errors. Generally these come from our backend. Some multipart functions may execute somewhat and then fail, causing some data to be updated.
application/json
get
GET /v2.0/admin/benefits/{type} HTTP/1.1
Host: 
X-Inveterate-Api-Key: text
Accept: */*
{
  "message": "text",
  "data": {}
}
delete

Forwards a request to our backend to delete a given benefit. Benefit will be identified by the benefit type field. For a list of all benefit types, take a look at each schema's default type value.

This is STRICTLY for deleting CUSTOM benefits. You cannot delete default benefits
via the Public API. Use your admin dashboard to disable default benefits.
Path parameters
typestringRequired

The benefit identification name/type.

Header parameters
X-Inveterate-Api-KeystringRequired

Your private Inveterate API key.

Responses
201
Returned upon successful request made to our backend. Requests that return this code may take a small amount of time after successful API return to fully update.
application/json
400
Returned upon a malformed request. Check your API key, URL parameters, and body parameters when this error is returned. Generally, if you see this error, that also means NO action was taken on our backend.
application/json
500
Returned for all other errors. Generally these come from our backend. Some multipart functions may execute somewhat and then fail, causing some data to be updated.
application/json
delete
DELETE /v2.0/admin/benefits/{type} HTTP/1.1
Host: 
X-Inveterate-Api-Key: text
Accept: */*
{
  "message": "text",
  "data": {}
}
  • GET/v2.0/admin/benefits
  • GET/v2.0/admin/benefits/{type}
  • DELETE/v2.0/admin/benefits/{type}
  • PATCH/v2.0/admin/benefits/{type}
patch

This endpoint will take a benefit type and any other values in the relevant schema and send a request to our backend to update the benefit. with the new information. Keep in mind that, like with the POST method, this is a request against our backend. Thus, the effect will not be immediate.

Path parameters
typestringRequired

The benefit identification name/type.

Header parameters
X-Inveterate-Api-KeystringRequired

Your private Inveterate API key.

Body
one ofOptional
or
or
or
or
or
or
or
or
or
Responses
201
Returned upon successful request made to our backend. Requests that return this code may take a small amount of time after successful API return to fully update.
application/json
400
Returned upon a malformed request. Check your API key, URL parameters, and body parameters when this error is returned. Generally, if you see this error, that also means NO action was taken on our backend.
application/json
500
Returned for all other errors. Generally these come from our backend. Some multipart functions may execute somewhat and then fail, causing some data to be updated.
application/json
patch
PATCH /v2.0/admin/benefits/{type} HTTP/1.1
Host: 
X-Inveterate-Api-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 92

{
  "creditAmount": 1,
  "name": "text",
  "days": 1,
  "description": "text",
  "type": "SIGNUP_STORE_CREDITS"
}
{
  "message": "text",
  "data": {}
}