Axon Integration
This page details how Axon can create a user account in SpeakWrite’s system. When the user is created they will be added to the main Axon account as a distinctive customer account. This account will be billed separately from all other Axon accounts.
Getting a Token
In other to interact with SpeakWrite’s API you must first get a valid token using the client credentials that were already provided to you. You must then make a POST request to our authentication server to retrieve the token. For dev testing the authentication server URL is: https://auth-dev.speakwrite.com/connect/token. For production the authentication server URL is: https://auth.speakwrite.com/connect/token. The request must be a form url encoded request and you must include the grant_type (this must always be “client_credentials”), client_id (already provided to you) and client_secret (already provided to you). If successful you will get a 200 OK response with access_token (this will be used to make subsequent requests to our API). See below screenshot of what this request looks like in Postman:
Creating a customer
Once you have retrieved a valid token from the authentication server you are now able to create a customer on the SpeakWrite system. To create the customer you must make a post request to our External API. For dev testing the External API URL is: https://external-api-dev.speakwrite.com/customer/v1/axon. For production the External API URL is: https://external-api.speakwrite.com/customer/v1/axon. If the request is successful you will receive a 200 Ok. If the request fails you will receive a 400 Bad Request and a message indicating what went wrong. Below is the expected JSON payload to be included in the body of the request:
{
Company : "",
Title : "",
User :
{
EmailAddress : "",
FirstName : "",
LastName : "",
PhoneNumber : "",
Address1 : "",
Address2 : "",
Address3 : "",
City : "",
State : "",
Zip : ""
}
}
Below is a screenshot of what this request would look like in Postman
Customer payload details
Field | Required | Details |
---|---|---|
Company | Yes | This is typically the name of the police department. |
Title | No | This is typically the title of the police officer that will be maintaining this account. |
User.EmailAddress | Yes | This is the email address of the police officer that will be maintaining this account. |
User.FirstName | Yes | This is the first name of the police officer that will be maintaining this account. |
User.LastName | Yes | This is the last name of the police officer that will be maintaining this account. |
User.PhoneNumber | Yes | This is the phone number of the police officer that will be maintaining this account. |
User.Address1 | No | This is the address 1 of the police officer that will be maintaining this account. |
User.Address2 | No | This is the address 2 of the police officer that will be maintaining this account. |
User.Address3 | No | This is the address 3 of the police officer that will be maintaining this account. |
User.City | No | This is the city of the police officer that will be maintaining this account. |
User.State | No | This is the state of the police officer that will be maintaining this account. |
User.Zip | No | This is the zip code of the police officer that will be maintaining this account. |