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
| domain | string | customer-assigned unique id (auto assigned to domain name). This must be unique across lytics accounts
| email | 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
Retrieve a Single Account
https://api.lytics.io/api/account/{id}Get single account by id.
{
"created": "2014-10-30T21:01:06.493Z",
"updated": "2014-10-30T21:01:06.493Z",
"domain": "example.lytics.io",
"email": "[email protected]",
"id": "CNakHAobwEeLuUyrKc5AQTif",
"name": "Lytics Test",
"parent_id": "CNakHAobwEeLuUyrKc5AQTif",
"timezone": "America/Los_Angeles"
}Account Update
https://api.lytics.io/api/account/{id}Post update to account. See list of fields above.
{
"name": "updated account name"
}{
"created": "2014-10-30T21:01:06.493Z",
"updated": "2014-10-30T21:01:06.493Z",
"domain": "example.lytics.io",
"email": "[email protected]",
"id": "CNakHAobwEeLuUyrKc5AQTif",
"name": "Lytics Test",
"parent_id": "CNakHAobwEeLuUyrKc5AQTif",
"timezone": "America/Los_Angeles"
}Accounts List
https://api.lytics.io/api/account{
"status": "success",
"data": [
{
"apikey": "ceHNqmr0ELpNTjRhVg7FFpzM",
"created": "2014-10-30T21:01:06.493Z",
"dataapikey": "qQsOcWCe-QipNGC2n5NRVVH7",
"domain": "example.lytics.io",
"email": "[email protected]",
"id": "CNakHAobwEeLuUyrKc5AQTif",
"name": "Lytics Test",
"parent_id": "CNakHAobwEeLuUyrKc5AQTif",
"features": {
"segment-sizes": true
}
}
]
}Account Create
https://api.lytics.io/api/accountTo create a child Account of a parent account, just post:
{
"name": "String content",
"domain": "yourdomain.com"
}{
"created": "2014-10-30T21:01:06.493Z",
"updated": "2014-10-30T21:01:06.493Z",
"domain": "example.lytics.io",
"email": "[email protected]",
"id": "CNakHAobwEeLuUyrKc5AQTif",
"name": "Lytics Test",
"parent_id": "CNakHAobwEeLuUyrKc5AQTif",
"timezone": "America/Los_Angeles"
}