Get an account's lifecycle
const url = 'https://api.ebitex.io/audience/management/v1/accounts/example/stages';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.ebitex.io/audience/management/v1/accounts/example/stages \ --header 'Authorization: Bearer <token>'Returns the account’s journey: for each of the five stages, the open pass if there is one and the last ten closed ones, each with where it stands and the moves open to this key.
An account moves through the same five lifecycle stages a person does (awareness, acquisition, conversion, retention, advocacy), each with the states and moves the organization defined in Audience settings. An account has at most one open pass per stage. A key holds no role, so it can only fire a move that has no role restriction.
Key: an Audience management key with audience.management.read (write also needs read; erase needs both).
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Responses
Section titled “ Responses ”{ "stages": [ { "stage", "open", "history": [ … ] } ] }, each pass as ``{ “id”, “stage”, “openedAtUtc”, “stateEnteredAtUtc”, “closedAtUtc”, “outcome”, “state”: { “id”, “name”, … }, “facts”: { “source”, “medium”, “campaign” }, “availableTransitions”: [ … ], “rowVersion” }. facts is the first touch the pass was opened with.
missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired, or it was not created from the Audience settings page.
payment_required: the organization’s subscription needs attention.
scope_denied: the key lacks this route’s scope. ip_denied: the caller’s address is outside the key’s allowed ranges. app_not_available: Audience is not enabled for the organization.
account_not_found: no account with that external id in this organization.
not_found: no such route.
accounts_not_enabled: the organization has not turned accounts on.
rate_limited: the key spent its requests-per-minute budget; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.