Organization APIs
Manage account settings and administrative records. Requests authenticate by secret key.
Collections
Collections are unordered organizational units of case-sensitive member strings.
Collections keep Findustry AI synchronized with systems of record, for example to enable or disable features for segments of a merchant base.
List Collections
Request
GET /ou
Authorization: sk_findustryai_kkkkkkkkkkkk_nnnnn
Response
{
data: [
{
alias: String,
createdAt: String,
updatedAt: String
}
]
}
Add Members
Request
POST /ou/:alias/add
Authorization: sk_findustryai_kkkkkkkkkkkk_nnnnn
{
data: {
members: [String]
}
}
| Field | Type | Required | Description |
|---|---|---|---|
members |
Array of Strings | Yes |
Strings to add. Leading and trailing space is removed. Limit
5000 members per request
|
Response
{
data: {
added: [String],
alias: String,
duplicates: [String],
errors: [
{
member: String,
message: String
}
],
total: Number
}
}
| Field | Type | Description |
|---|---|---|
added |
Array of Strings | Added member, with leading and trailing space removed |
duplicates |
Array of Strings | Already enrolled member |
errors |
Array of Objects | Failed member and error message |
total |
Number | Resulting member count |
Remove Members
Request
POST /ou/:alias/remove
Authorization: sk_findustryai_kkkkkkkkkkkk_nnnnn
{
data: {
members: [String]
}
}
Response
{
data: {
alias: String,
errors: [
{
member: String,
message: String
}
],
missing: [String],
removed: [String],
total: Number
}
}
| Field | Type | Description |
|---|---|---|
errors |
Array of Objects | Failed member and error message |
missing |
Array of Strings | Member not found in collection |
removed |
Array of Strings | Removed member |
total |
Number | Resulting member count |
List Members
Members are returned alphabetically with a metadata.cursor when
additional pages of results are available.
The final page carries no metadata.
Request
GET /ou/:alias/members?limit=500&cursor=565500000928297
Authorization: sk_findustryai_kkkkkkkkkkkk_nnnnn
| Parameter | Type | Required | Description |
|---|---|---|---|
cursor |
String | No | metadata.cursor from previous page |
limit |
Number | No | Members per page. Default 500, max 1000 |
Response
{
data: [String],
metadata: {
cursor: String
}
}
Errors
| Status | Cause |
|---|---|
400 Bad Request |
Missing or malformed field, see detail for mitigation |
401 Unauthorized |
Invalid secret key |
403 Forbidden |
Organization does not have the Organization APIs enabled, contact support@findustryai.com |
404 Not Found |
Collection not found |