Customers
POST /customer (Requires App level super key/token)
* Denotes optional parameter1
2
3
4
5
6
7
8
9
10
11
12{
company: STRING,
email: STRING,
*name: STRING,
*address: STRING,
*country: STRING,
*city: STRING,
*zip: STRING,
*state: STRING,
*phone: STRING,
*website: STRING
}
Create a new customer record in ATOM
Response will include:1
2
3
4
5{
cuid: [ATOM CUSTOMER ID],
key: [AUTH_KEY],
token: [AUTH_TOKEN]
}
These are to be used for that specific customer in future API calls
GET /customer/ (Requires App level super key/token)
Get an array of customer objects belonging to that SUPER USER
GET /customer/:cuid
Get the information about a specific customer (self)
GET /customer/:email/sso (Requires App level super key/token)
“Single Sign On” to ATOM
powered platforms, including ATOM and white labeled ones, for a specific customer by :email
.
On success, it redirects the user to designated ATOM
powered platform with a status code 302.
On failure, the expected errors:
500
- server side error, usually a JSON withmessage
field will be returned to give insights.404
- User not found.401
- User not allowed for API access.
GET /customer/:email/passcode (Requires App level super key/token, and special provisioning on App level access)
Sends passcode to a specific customer by :email
. This is to support the auth workflow that is very similar to
- Get
:email
from your app user - Call this API endpoint to get the passcode generated and sent to the provided
:email
- Get passcode from your app user
- Call
/customer/:identifier/auth
endpoint to retrieve this app user’s Customer level key/token
On success, it returns status code 200 and JSON1
2
3{
"message": "We have emailed the passcode to: <:email>"
}
On failure, the expected errors are:
500
- server side error, usually a JSON withmessage
field will be returned to give insights.404
- User not found.401
- User not allowed for API access.
GET /customer/:identifier/auth (Requires App level super key/token)
Get newly generated or renewed Customer level key/token with given :identifier
, which can either be a cuid
(Customer ID) or email
. When :identifier
is email
, an additional query string arg passcode=<passcode>
must exist in order for the endpoint to work.
On success, it returns status code 200 and JSON1
2
3
4
5{
"cuid": "<Customer ID required by other endpoints>",
"key": "<Customer level API key>",
"token": "<Customer level API token>"
}
On failure, the expected errors are:
500
- server side error, usually a JSON withmessage
field will be returned to give insights.404
- User not found.401
- Expired or invalid passcode.401
- User not allowed for API access.
GET /customer/:email/auth/nopasscode (Requires App level super key/token, and special provisioning on App level access)
Similar to /customer/:identifier/auth
except that :identifier
is limited to only :email
and behaves exactly like when :identifier
is a cuid
(Customer ID) where no passcode is checked. Responses are also identical to /customer/:identifier/auth
endpoint.