Your business is connected and Ayna makes that possible with a rich and growing set of API calls that connects your business to other services online.
If you need an API call and it is NOT listed here, please contact support and we will make it available for you
All Active API calls start with the current version of v1.
Auth: We use HTTP Digest Authentication. Please request an API key through support
Use this call to get basic account information about an Ayna business presence. Any authenticated user has access.
Allowed Methods: GET
GET /v1/{{business_id}}/account.json
1. business_id
2. business_name (Name of Business in English)
3. business_enabled (1 = yes, 0 = disabled)
4. business_type (1 = mall, 0 = single)
5. service_name (Name of Current Service Level)
[{
"business_id": "37447",
"business_name": "Punto by Ayna",
"business_enabled": "1",
"business_type": "0",
"service_name": "PUNTO"
}]
Name | Required |
---|---|
list_id | ✓ |
Use this call to get the subscriber informtion of an existing list that belong to an Ayna business presence. Any authenticated user has access.
Allowed Methods: GET
GET /v1/{{business_id}}/list.json?list_id=1
1. list_id (what list are we talking about?)
1. id (subscriber id)
2. buiness_id
3. subscribe_phone (subscriber phone)
4. subscribe_email (subscriber email)
5. subscribe_name (subscriber full name)
6. subscribe_preferences (preferences - not used)
7. list_id (list id)
8. lastupdated (datetime of last update)
[{
"id": "1",
"business_id": "37447",
"subscribe_phone": "xxxxxx",
"subscribe_email": "xxxxx",
"subscribe_name": "xxxxxx",
"subscribe_preferences": null,
"list_id": "1",
"lastupdated": "2013-01-25 20:08:56"
}, {
"id": "72",
"business_id": "37447",
"subscribe_phone": "xxxxxx",
"subscribe_email": "",
"subscribe_name": "xxxxxx",
"subscribe_preferences": null,
"list_id": "1",
"lastupdated": "2013-01-25 20:08:56"
}]
Use this call to get the names and ids of lists that belong to an Ayna business presence. Any authenticated user has access.
Allowed Methods: GET
GET /v1/{{business_id}}/lists.json
1. id (list id)
2. list_name (list name)
3. business_id (business_id)
[{
"id": "1",
"list_name": "Developer Newsletter",
"business_id": "37447"
}, {
"id": "22",
"list_name": "EMEA Newsletter",
"business_id": "37447"
}, {
"id": "66",
"list_name": "Ayna Corporation Newsletter",
"business_id": "37447"
}]
Name | Required |
---|---|
list_id | ✓ |
user_email | ✓ |
user_name | ✓ |
user_mobile | ✗ |
Use this call to manage single subscriptions and synchronize between ayna group lists and external ones such as mailchimp, activecampaign etc... Any authenticated user has access.
Allowed Methods: GET POST DELETE
POST /v1/{{business_id}}/subscriber.json
1. list_id
2. user_email
3. user_name
4. user_mobile
DELETE /v1/{{business_id}}/subscriber.json
1. list_id
2. user_email
GET /v1/{{business_id}}/subscriber.json
1. list_id
2. user_email
1. business_id
2. user_email
3. user_mobile
4. user_name
5. list_id
When found...
[{
"business_id": "37447",
"user_email": "xxxxx",
"user_mobile": "111222333444",
"user_name": "xxxxx",
"list_id": "1"
}]
when NOT found...
{"error":"Not found"}
This error is returned whenever a collection or a resource prevents the use of the DELETE method.
DELETE calls are not accepted for this request.
This error is returned whenever a collection or a resource prevents the use of the GET method.
GET calls are not accepted for this request.
This error is returned whenever a collection or a resource prevents the use of the POST method.
POST calls are not accepted for this request.
This error is returned whenever someone tries to execute a PUT request on a collection or a resource that prevents PUT requests.
PUT calls are not accepted for this request.
Could not find user email in database
Could not find user email in database
Permissions do not add up, please check your business_id