Accounts

Update the account state for a customer or bulk set of customers.

Currently this is used to process an approval / withdrawn approval for invite-only tiers.

Preconditions

  • This API requires a server-to-server auth token:

  • You can generate a server-to-server token using the S2S Auth API

Required Scopes

tier_points:override

Request

URL

/v2/tier-points/accounts

Method

POST

Headers

Name
Required
Description

Authorization

true

a s2s Bearer token for accessing the API

Request Object

  • You may submit a maximum of 200 transactions in the payload

Field
Type
Required
Description

accounts

array

true

List of account approval instructions.

accounts[].account_tenant_fanid

string (UUID)

true

Tenant-scoped FanID of the customer.

accounts[].invite_approval_map

object (map<uuid, boolean>)

true

Dictionary of invite-only tier IDs to approval flags.

accounts[].invite_approval_map["{tier_id}"]

boolean

true

Approval flag for the specified tier: true = approved, false = not approved / approval withdrawn.

Example

View Example JSON Payload
{
    "accounts": [
        {
            "account_tenant_fanid": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
            "invite_approval_map":
                {
                    "12345678-1234-1234-dddd-eeeeeeeeeeee": true
                }
        }
    ]
}

Response

Please note: in most cases this endpoint will return 201 Status Created, but there may be issues with individual transactions. Please inspect the response body for an "ok" or "nok" for each transaction's status.

Response Object

Field
Type
Description

accounts

array

List of per-account results returned by the endpoint.

accounts[].account_tenant_fanid

string (UUID)

Tenant-scoped FanID for the processed account.

accounts[].result

string

Outcome for this account (e.g., "ok", "nok").

accounts[].details

string

Additional information about the result.

Examples

View Example Normal JSON Response
{
    "accounts": [
        {
            "account_tenant_fanid": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
            "result": "ok",
            "details": "success"
        }
    ]
}
View Example JSON Response With Transaction-level Issue ("nok")
{
    "accounts": [
        {
            "account_tenant_fanid": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
            "result": "nok",
            "details": "Invalid account_tenant_fanid"
        }
    ]
}

Error Response Data

Error Response Wrapper

Property
Description

errors

array containing error response entries

rc

randomly generated identifier allowing call tracing within Fanatics. When reporting repeated errors or coordinating issue resolution with Fanatics, this value will assist in diagnosing any issues.

timestamp

processing timestamp in Zulu time of Fanatics API server using ISO 8601 format (https://datatracker.ietf.org/doc/html/rfc3339#section-5.6). Useful for issue resolution with Fanatics as log data is partitioned by date and time.

Error Response Wrapper -> Errors -> item

Property
Description

code

Fanatics error code for the specific error; this is generally not an http status code. Code values are generally stable for the API.

message

additional textual information describing the error. This is useful in debugging, but should not be checked programmatically

Full Spec

Update invite status for accounts

post

Update invite status for accounts. Requires the tier_points:override permission.

Header parameters
AuthorizationstringRequired

Server Bearer Token

Body
Responses
201

Created

application/json
post
POST /v2/tier-points/accounts HTTP/1.1
Host: 
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 101

{
  "accounts": [
    {
      "account_tenant_fanid": "text",
      "invite_approval_map": {
        "ANY_ADDITIONAL_PROPERTY": true
      }
    }
  ]
}
{
  "accounts": [
    {
      "account_tenant_fanid": "text",
      "details": "text",
      "result": "ok/nok"
    }
  ]
}

Last updated