Chaskify authentication

Before you start using the API you'll need a client_id and client_secret. Please contact us at support@chaskify.com to obtain this information via email first. With this data you will be able to generate an access token which will allow you to use the services provided by Chaskify.

Getting access_token - Code Example

Getting the access token for working with the API.

cURL Code Example

  --request POST \
  --url https://chaskify.auth0.com/oauth/token \
  --header 'content-type: application/json' \
  --data '{"client_id":"{client_id}","client_secret":"{client_secret}","audience":"http://chaskify-api-dev.azurewebsites.net","grant_type":"client_credentials"}'

Summarizing

  • You will be sent an email with your client_id and client_secret, if you do not get the email please contact us at info@chaskify.com.
  • Get your API access token as show in the example above by modifying the [client_id] and [client_secret] texts for the values ​​sent to you via email.
  • Enter the value of the access token in the Token box of the API, as shown in the image.

With the access token and the examples below you can now begin to use the services provided by the API.

Task

A task is created after an order if placed by your customer. The basic data is specified and can be assigned to a driver now or at another time. Each task belongs to a customer and tasks have several statues associated with it which allows you to know the progress of the task. If there are multiple orders that need to be assigned to a driver they can be added as waypoints which are then used to optimize the route. Tasks information can be retrieved, modified, and deleted. You can retrieve a list of all tasks from a client and the task's status can be modified in real time.

Create Task - Code Example

To create a task or any other object will require a key that you send in each request to the API. This key will be sent when creating a customer. You can modify every detail of a task, modify the driver assignment or client details.

cURL

  --request POST \
  --url http://chaskify-api-dev.azurewebsites.net/tasks \
  --header 'authorization: Bearer {access_token}' \
  --data '{
            "taskDescription":"Example of creating a task",
            "type":"delivery",
            "contactNumber":"3482309465",
            "emailAddress":"example@example.com",
            "customerName":"client's name",
            "deliveryDate":"2017-06-23T13:41:16Z", 
            "deliveryAddress":"2405 Sunny Isles Boulevard, North Miami Beach, Florida",
            "teamID":"{team_id}",
            "driverID":"{driver_id}",
            "ipAddrees":"::1",
            "tags":"sunny isles"
          }'

Driver

The drivers are the individuals that will execute the tasks and can change to their status to on-duty or off-duty. A driver is assigned one or more tasks with an optimized route and they can accept the task or decline it. When the driver starts executing a task the status of the task is changed to "IN ROUTE". Upon reaching the destination the status can be changed to "ARRIVED". At the destination, a photo and/or signature can be taken as documentation that the task was done. After this the driver can change the task's status to "SUCCESSFUL". With the API you can create, modify, delete, and get a list of all drivers belonging to your business.

Location Driver - Code Example

Through this service you can get the location of the driver in real time.

cURL

  --request GET \
  --url http://chaskify-api-dev.azurewebsites.net/drivers/location/{driver_id} \
  --header 'authorization: Bearer {access_token}' \                                                                                                      

Team

Before you create drivers you must create the teams to which each driver belongs.

Delete Team - Code Example

You can delete the teams you created.

cURL

  --request DELETE \
  --url http://chaskify-api-dev.azurewebsites.net/teams/delete/{team_id} \
  --header 'authorization: Bearer {access_token}' \  

Waypoint

With waypoints, you can create a single task with multiple orders or services. Then you can optimize the route to help with efficiency.

Create waypoint - Code Example

You can create multiple orders or services associated with a single task, this will form a route which can be seen in the driver app.

cURL

  --request POST \
  --url http://chaskify-api-dev.azurewebsites.net/tasks/waypoints/{task_id} \
  --header 'authorization: Bearer {access_token}' \
  --data '{
            "contactNumber":"3482309465",
            "emailAddress":"example@example.com",
            "customerName":"client's name",
            "deliveryDate":"2017-06-23T13:41:16Z", 
            "deliveryAddress":"2405 Sunny Isles Boulevard, North Miami Beach, Florida",
            "type":"delivery",
            "ipAddrees":"::1",
            "tags":"sunny isles"
          }'

Get waypoint - Code Example

You can get the optimized route of a task with all the waypoints.

cURL

  --request GET \
  --url http://chaskify-api-dev.azurewebsites.net/tasks/waypoints/{task_id}/{waypoint_id} \
  --header 'authorization: Bearer {access_token}' \   

Client

Clients can be created individually or through the creation of a task. If a task is created with a new client, a new client profile is also created. The client information can also be modified through the task.

List Client - Code Example

Here is an example of a GET, where you get the customer list of the customer making the call.

cURL
 
  --request GET \
  --url http://chaskify-api-dev.azurewebsites.net/clients \
  --header 'authorization: Bearer [access_token]' \

API

Our API is very easy to use.

API

Data Dictionary

Definition of terms used in working with the system.

Customer

A customer is a single business usign the system.

Aplication

An application is the account registered by a customer that is using the API. A customer can have several applications registered. All task, drivers, clients and users will belong to a single application.

Team

A team is used to group the drivers, so you can assign tasks to the teams or to a specific driver. If you want to assign tasks by team, this association will assist in the proper distribution of tasks by their members (drivers).

Driver

A driver is an employee or contractor of the business or company (customer). They use the Chaskify native application to connect to the web based system.

Client

A client is the person whom the service is provided by the business or company.

Task

A task is an order or service that a business or company (customer) provides to a client. The tasks are executed by the drivers. A task can have several associated waypoints.

Waypoint

A waypoint is also an order or service by the client. Waypoints can be added to a single task to help driver efficiency with multiple orders or services instead of creating individual task for each order.

Admin

An administrator is responsible for registering the customer in the Chaskify system. This is donde by selecting a plan from the pricing page on the Chaskify main website. After the customer has been registered, they can access the web system to manage their business. You can register online.

Free demo