Account
Account related resources of the Lytics API.
The Account resource describes an account. An account can be a Master account, which means that it is a billing account. Master accounts have children accounts which act more as separate projects, for same billing account. Each child account can be used for Dev, Testing, etc., or for separate siloes of data for sub-divisions, etc.
The Account resource has the following attributes:
field | DataType | Description |
---|---|---|
id | string | unique id |
created | Date | Created date |
updated | Date | Last Updated Date |
fid | string | Unique Foreign ID, must be unique, can be assigned, if not provided, derive from email/domain. |
domain | string | customer-assigned unique id (auto assigned to domain name). This must be unique across lytics accounts |
string | primary email contact for account owner | |
parent_id | string | parent account if this account is a child-account of master billing account |
name | string | account name |
roles | array[roles] | List of roles for this account. |
Account
/api/account/{id}
Account Api.
Parameters | ||
---|---|---|
id | string (required) Ex: 1234abcd | id of account. |
GET
Retrieve a Single Account
/api/account/{id}
Get single account by id.
Response 200
Headers
Content-Type: application/json
Body
{
"id": "CNakHAobwEeLuUyrKc5AQTif",
"domain": "example.lytics.io",
"email": "[email protected]",
"name": "Lytics Test",
"parent_id": "CNakHAobwEeLuUyrKc5AQTif",
"timezone": "America/Los_Angeles",
"created": "2014-10-30T21:01:06.493Z",
"updated": "2014-10-30T21:01:06.493Z"
}
PUT
Account Update
/api/account/{id}
Post update to account. See list of fields above.
Request
Headers
Content-Type: application/json
Body
{
"name": "updated account name"
}
Response 200
Headers
Content-Type: application/json
Body
{
"id": "CNakHAobwEeLuUyrKc5AQTif",
"domain": "example.lytics.io",
"email": "[email protected]",
"name": "Lytics Test",
"parent_id": "CNakHAobwEeLuUyrKc5AQTif",
"timezone": "America/Los_Angeles",
"created": "2014-10-30T21:01:06.493Z",
"updated": "2014-10-30T21:01:06.493Z"
}
POST
Account Create
/api/account
To create a child Account of a parent account, just post:
Request
Headers
Content-Type: application/json
Body
{
"name": "String content",
"domain":"yourdomain.com"
}
Response 201
Headers
Content-Type: application/json
Body
{
"id": "CNakHAobwEeLuUyrKc5AQTif",
"domain": "example.lytics.io",
"email": "[email protected]",
"name": "Lytics Test",
"parent_id": "CNakHAobwEeLuUyrKc5AQTif",
"timezone": "America/Los_Angeles",
"created": "2014-10-30T21:01:06.493Z",
"updated": "2014-10-30T21:01:06.493Z"
}
Accounts List
/api/account
Collection of all Accounts current user or auth token has access to.
GET
Accounts List
/api/account
Response 200
Headers
Content-Type: application/json
Body
{
"status": "success",
"data": [
{
"created": "2014-10-30T21:01:06.493Z",
"domain": "example.lytics.io",
"email": "[email protected]",
"id": "CNakHAobwEeLuUyrKc5AQTif",
"name": "Lytics Test",
"parent_id": "CNakHAobwEeLuUyrKc5AQTif",
"features":{
"segment-sizes":true
}
}
]
}