Overview
Overview
Welcome to the Captain.AI API! You can use our API to access Captain.AI API endpoints, which can get information on your stores, delivery drivers, and orders.
You can
- create orders and delivery jobs
- retrieve orders and delivery jobs
- retrieve drivers for an account
- cancel orders
- automate orders preparation
Captain uses a REST protocol with methods GET, POST, PATCH, DELETE to interact with resources on Captain. All data is transmitted in JSON format.
Resources
Order
- usually has oneDelivery Job
(can have multiple in the case of Redelivery) - has oneFinancial record
- has oneRecipient
Driver
Business Logic
Before using the API it's useful to understand the Captain ecosystem. Here’s a 60 second intro:
Captain is a platform that enables Drivers
and Orders
with DeliveryJobs
to be managed. We have the following concepts:
Business
- A
Business
is a financially independent organisation. ABusiness
has a Business Owner and can have manyAccounts
(aka stores). - eg. A Business owner owns 3
Accounts
in different parts of New York under the brand ‘Frank Sinatra Pizza’.
- A
Account
- You might know this as a Store / Hub / Base
- There are two types of accounts - store or fleet, a single store would be a store type and a fleet of drivers delivering across many stores would be a account of kind 'fleet'
- An account of kind 'store' is a single store where deliveries are picked up from and then delivered to
Recipients
. - Typically this would also be the base where the
Drivers
return after completing a group ofOrders
(aka deliveries). Account
has manyOrders
Driver
- Also known as Agent. These are the individual people who perform Delivery
Jobs
as part ofOrders
- A driver performs Delivery
Jobs
as part of aTaskGroup
consisting of multipleTasks
. - A Driver Profile always belongs to a single
Account
, however a single user (identified by email) can have multiple driver profiles (each profile belongs to a single account.
- Also known as Agent. These are the individual people who perform Delivery
Job
- Known as
Job
on Captain system - This belongs to an
Order
. - These are the deliveries made to Recipients. A
Job
is typicallymatched
one to one with anOrder
. Sometimes an order can have many delivery jobs, e.g. in the case of a re-delivery. - The Delivery
Job
has adropoff
which is typically the recipients address.
- Known as
Recipient
- This is the recipient of the delivery, this is the end customer who receives the delivery. Each
DeliveryJob
/Order
has aRecipient
- This is the recipient of the delivery, this is the end customer who receives the delivery. Each