Skip to content

Customer

These end points allow you to manage your customers.

Depending whether you are connecting Zoined via database poll or ZAPI, there are some differences in the data associated with each customers.

ZAPI: If you are connecting via ZAPI, the returned customer information contains a token field with the API token needed to access ZAPI for that customer.

{
  "key": "Demo company",
  ...
  "token": "abcdefghijklmn"
}

Database poll: If you are connecting via database fetch, you need to define additional data source configuration when creating the customer. We'll also return dataSource block which will return the the data source configuration for the customer with password masked.

{
  "dataSource": {
    "host": "db-host",
    "port": 3306,
    "database": "database_name",
    "username": "db-username",
    "password": "db-XXXXXXXXXX",
    "filters": {
      "companyId": "123"
    }
  }
}

List customers

Request

Lists all your customers.

GET https://partners.zoined.com/api/customers

Security
partnerToken
curl -i -X GET \
  https://zone-api.zoined.com/_mock/api/customers \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Request has been processed successfully.

Bodyapplication/json
Array [
keystring

Company's key

Example:"dm_company"
namestring

Company name

Example:"Demo company"
createdAtstring

12-10T12:12:30Z (string) - Customer creation time stamp

Example:"2019"
disabledboolean

Customers's processing state. Disabled customers don't poll for new data

Example:false
productionboolean

Whether customer is in production mode

Example:true
customerTypestring

Customer Type

Example:"other"
tokenstring

ZAPI access token for customer if applicable

Example:"abcdefghijklmn"
statusstring

Status for the customer

Example:"ok"
licensesArray of strings

Customer product licenses

Example:
[ "standard" ]
dataUpdatedobject(DataUpdated)
dataSourceobject(DataSourceConfigurationResponse)
ssoSecretstring

SSO token if defined

Example:"asdajksdajdsjsdadjsasodaj"
]
Response
[ { "key": "dm_company", "name": "Demo company", "createdAt": "2019", "disabled": false, "production": true, "customerType": "other", "token": "abcdefghijklmn", "status": "ok", "licenses": [ … ], "dataUpdated": { … }, "dataSource": { … }, "ssoSecret": "asdajksdajdsjsdadjsasodaj" } ]