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

Members

Member accessing and altering endpoints.

PreviousBenefitsNextCredits

Last updated 6 months ago

Was this helpful?

get

Returns a single member for a given merchant. Merchant is pulled from the public API key for security reasons.

Path parameters
idstringRequired

The customer ID number which you would like to retrieve.

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/members/{id} HTTP/1.1
Host: 
X-Inveterate-Api-Key: text
Accept: */*
{
  "message": "text",
  "data": {}
}
patch

This endpoint is used to update a member. It takes a member ID and uses your public API key to match the customer to your account. As of now, all fields in the update schema are required, so it is not possible to update a single field at a time.

Path parameters
idstringRequired

The customer ID number which you would like to update.

Header parameters
X-Inveterate-Api-KeystringRequired

Your private Inveterate API key.

Body
firstNamestringRequired

The customer's first name.

lastNamestringRequired

The customer's last name.

notesstringRequired

Internal notes for this customer. Only viewable by the merchant.

phoneNumberstringRequired

The customer's phone number.

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/members/{id} HTTP/1.1
Host: 
X-Inveterate-Api-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 74

{
  "firstName": "text",
  "lastName": "text",
  "notes": "text",
  "phoneNumber": "text"
}
{
  "message": "text",
  "data": {}
}
get

Returns all members for a given merchant. Merchant is pulled from the public API key for security reasons.

Pagination is supported by passing limit and lastCustomerId values as
query parameters. You will get a lastCustomerId value in the response
of the previous request, which can be used for the next.
Query parameters
limitstringRequired
lastCustomerIdstringRequired
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/members?limit=text&lastCustomerId=text HTTP/1.1
Host: 
X-Inveterate-Api-Key: text
Accept: */*
{
  "message": "text",
  "data": {}
}
  • GET/v2.0/admin/members
  • POST/v2.0/admin/members
  • GET/v2.0/admin/members/{id}
  • PATCH/v2.0/admin/members/{id}
post

This endpoint is used to create a free tier member. You can also provide a credit value to add credits to the new members account. The overrideSpendThreshold parameter allows you to add customers to a spend based tier, and the keepInSpendBasedTier parameter ensures that the member won't be downgraded if they don't hit the spend minimum. NOTE: This endpoint will downgrade a customer specified to a lower tier if that is the tier provided to the endpoint!

Header parameters
X-Inveterate-Api-KeystringRequired

Your private Inveterate API key.

Body
customerIdstringRequired

The customerId to add to the specified free tier.

referralsstringRequired

The signify whether or not the customer was referred. NOTE: NOT to be used to indicate the referring customer.

segmentIdstringRequired

The segmentId of the tier you want to add this customer to.

overrideSpendThresholdbooleanRequired

Whether or not to override the spend required to add a cutomer to a spend based tier.

keepInSpendBasedTierbooleanRequired

Whether or not you want to keep this customer in the spend based tier despite not meeting the spend threshold.

creditsnumber ยท min: 1Required

Especially for member creation requests, if you would like to add some credits to the specified customer.

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
post
POST /v2.0/admin/members HTTP/1.1
Host: 
X-Inveterate-Api-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 129

{
  "customerId": "text",
  "referrals": "text",
  "segmentId": "text",
  "overrideSpendThreshold": true,
  "keepInSpendBasedTier": true,
  "credits": 1
}
{
  "message": "text",
  "data": {}
}