Harpoon API Documentation
Welcome to the Harpoon API, an interface for accessing data endpoints in your Harpoon account. The API can be used to get or post clients, projects, time entries, and more. Questions can be directed to Harpoon Support. To learn more about Harpoon visit our website.
Getting Started ¶
Generating a Token
To access the API you will need to create a personal access token by visiting your Account API page.
Once you generate a token you will need to include it in the authorization header with every request:
Authorization: bearer {your_token_here}
Clients ¶
Show all clients ¶
Show all clientsGET/clients
Example URI
GET /clients
Response
200
Headers
Content-Type: application/json
Body
[
{
"id": 56,
"type": "client",
"attributes": {
"team_id": 12,
"name": "Acme Inc.",
"source": "Referral",
"address": "123 Main St, Schenectady, NY, 12345",
"tax_name": "VAT",
"tax_number": "123456"
}
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Show a single client ¶
Show a single clientGET/clients/{client_id}
Example URI
GET /clients/56
URI Parameters
- client_id
integer
(required) Example: 56ID of the Client
Response
200
Headers
Content-Type: application/json
Body
{
"id": 56,
"type": "client",
"attributes": {
"team_id": 12,
"name": "Acme Inc.",
"source": "Referral",
"address": "123 Main St, Schenectady, NY, 12345",
"tax_name": "VAT",
"tax_number": "123456"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"type": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"name": {
"type": "string"
},
"source": {
"type": "string"
},
"address": {
"type": "string"
},
"tax_name": {
"type": "string"
},
"tax_number": {
"type": "string"
}
}
}
}
}
Create a new client ¶
Create a new clientPOST/clients
Example URI
POST /clients
Request
Headers
Content-Type: application/json
Body
{
"team_id": 12,
"name": "Acme Inc.",
"source": "Referral",
"address": "123 Main St, Schenectady, NY, 12345",
"tax_name": "VAT",
"tax_number": "123456"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"name": {
"type": "string"
},
"source": {
"type": "string"
},
"address": {
"type": "string"
},
"tax_name": {
"type": "string"
},
"tax_number": {
"type": "string"
}
}
}
Response
200
Headers
Content-Type: application/json
Body
{
"id": 56,
"type": "client",
"attributes": {
"team_id": 12,
"name": "Acme Inc.",
"source": "Referral",
"address": "123 Main St, Schenectady, NY, 12345",
"tax_name": "VAT",
"tax_number": "123456"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"type": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"name": {
"type": "string"
},
"source": {
"type": "string"
},
"address": {
"type": "string"
},
"tax_name": {
"type": "string"
},
"tax_number": {
"type": "string"
}
}
}
}
}
Contacts ¶
Show all contacts ¶
Show all contactsGET/contacts
Example URI
GET /contacts
Response
200
Headers
Content-Type: application/json
Body
[
{
"id": 112,
"type": "contact",
"attributes": {
"team_id": 12,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "555-111-2222"
}
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Show a single contact ¶
Show a single contactGET/contacts/{contact_id}
Example URI
GET /contacts/112
URI Parameters
- contact_id
integer
(required) Example: 112ID of the Contact
Response
200
Headers
Content-Type: application/json
Body
{
"id": 112,
"type": "contact",
"attributes": {
"team_id": 12,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "555-111-2222"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"type": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"phone": {
"type": "string"
}
}
}
}
}
Create a new contact ¶
Create a new contactPOST/contacts
Example URI
POST /contacts
Request
Headers
Content-Type: application/json
Body
{
"team_id": 12,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "555-111-2222"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"phone": {
"type": "string"
}
}
}
Response
200
Headers
Content-Type: application/json
Body
{
"id": 112,
"type": "contact",
"attributes": {
"team_id": 12,
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "555-111-2222"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"type": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"email": {
"type": "string"
},
"phone": {
"type": "string"
}
}
}
}
}
Expenses ¶
Show all expenses ¶
Show all expensesGET/expenses
Example URI
GET /expenses
Response
200
Headers
Content-Type: application/json
Body
[
{
"id": 19,
"attributes": {
"team_id": 12,
"project_id": 42,
"category_id": 6,
"description": "6 Pack of Anvils",
"amount": 10.5,
"vendor": "Acme Inc.",
"date": "2021-01-09",
"status": "billed"
}
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Show a single expense ¶
Show a single expenseGET/expenses/{expense_id}
Example URI
GET /expenses/42
URI Parameters
- expense_id
integer
(required) Example: 42ID of the Expense
Response
200
Headers
Content-Type: application/json
Body
{
"id": 19,
"attributes": {
"team_id": 12,
"project_id": 42,
"category_id": 6,
"description": "6 Pack of Anvils",
"amount": 10.5,
"vendor": "Acme Inc.",
"date": "2021-01-09",
"status": "billed"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"project_id": {
"type": "number"
},
"category_id": {
"type": "number"
},
"description": {
"type": "string"
},
"amount": {
"type": "number"
},
"vendor": {
"type": "string"
},
"date": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
}
}
Create a new expense ¶
Create a new expensePOST/expenses
Example URI
POST /expenses
Request
Headers
Content-Type: application/json
Body
{
"team_id": 12,
"project_id": 42,
"category_id": 6,
"description": "6 Pack of Anvils",
"amount": 10.5,
"vendor": "Acme Inc.",
"date": "2021-01-09",
"status": "billed"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"project_id": {
"type": "number"
},
"category_id": {
"type": "number"
},
"description": {
"type": "string"
},
"amount": {
"type": "number"
},
"vendor": {
"type": "string"
},
"date": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
Response
200
Headers
Content-Type: application/json
Body
{
"id": 19,
"attributes": {
"team_id": 12,
"project_id": 42,
"category_id": 6,
"description": "6 Pack of Anvils",
"amount": 10.5,
"vendor": "Acme Inc.",
"date": "2021-01-09",
"status": "billed"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"project_id": {
"type": "number"
},
"category_id": {
"type": "number"
},
"description": {
"type": "string"
},
"amount": {
"type": "number"
},
"vendor": {
"type": "string"
},
"date": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
}
}
Expense Categories ¶
Show all expense categories ¶
Show all expense categoriesGET/expense_categories
Example URI
GET /expense_categories
Response
200
Headers
Content-Type: application/json
Body
[
{
"id": 6,
"attributes": {
"team_id": 12,
"name": "World Domination"
}
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Show a single expense category ¶
Show a single expense categoryGET/expense_categories/{expense_category_id}
Example URI
GET /expense_categories/42
URI Parameters
- expense_category_id
integer
(required) Example: 42ID of the ExpenseCategory
Response
200
Headers
Content-Type: application/json
Body
{
"id": 6,
"attributes": {
"team_id": 12,
"name": "World Domination"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"name": {
"type": "string"
}
}
}
}
}
Create a new expense category ¶
Create a new expense categoryPOST/expense_categories
Example URI
POST /expense_categories
Request
Headers
Content-Type: application/json
Body
{
"team_id": 12,
"name": "World Domination"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"name": {
"type": "string"
}
}
}
Response
200
Headers
Content-Type: application/json
Body
{
"id": 6,
"attributes": {
"team_id": 12,
"name": "World Domination"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"name": {
"type": "string"
}
}
}
}
}
Invoice Payments ¶
Show all payments ¶
Show all paymentsGET/payments
Example URI
GET /payments
Response
200
Headers
Content-Type: application/json
Body
[
{
"id": 19,
"type": "payment",
"attributes": {
"amount": 1000,
"date": "2021-01-09",
"client_name": "Acme Inc.",
"invoice_number": "123",
"project_name": "Logo Design"
}
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Show a single payment ¶
Show a single paymentGET/payments/{payment_id}
Example URI
GET /payments/42
URI Parameters
- payment_id
integer
(required) Example: 42ID of the Payment
Response
200
Headers
Content-Type: application/json
Body
{
"id": 19,
"type": "payment",
"attributes": {
"amount": 1000,
"date": "2021-01-09",
"client_name": "Acme Inc.",
"invoice_number": "123",
"project_name": "Logo Design"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"type": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"amount": {
"type": "number"
},
"date": {
"type": "string"
},
"client_name": {
"type": "string"
},
"invoice_number": {
"type": "string"
},
"project_name": {
"type": "string"
}
}
}
}
}
Other Income ¶
Show all other income entries ¶
Show all other income entriesGET/other_income
Example URI
GET /other_income
Response
200
Headers
Content-Type: application/json
Body
[
{
"id": 19,
"type": "other_income",
"attributes": {
"team_id": 12,
"client_id": 56,
"amount": 1000,
"date": "2021-01-09",
"source": "Shopify",
"note": "Merch sales"
}
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Show a single other income entry ¶
Show a single other income entryGET/other_income/{other_income_id}
Example URI
GET /other_income/42
URI Parameters
- other_income_id
integer
(required) Example: 42ID of the other income entry
Response
200
Headers
Content-Type: application/json
Body
{
"id": 19,
"type": "other_income",
"attributes": {
"team_id": 12,
"client_id": 56,
"amount": 1000,
"date": "2021-01-09",
"source": "Shopify",
"note": "Merch sales"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"type": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"client_id": {
"type": "number"
},
"amount": {
"type": "number"
},
"date": {
"type": "string"
},
"source": {
"type": "string"
},
"note": {
"type": "string"
}
}
}
}
}
Create a new other income entry ¶
Create a new other income entryPOST/other_income
Example URI
POST /other_income
Request
Headers
Content-Type: application/json
Body
{
"team_id": 12,
"client_id": 56,
"amount": 1000,
"date": "2021-01-09",
"source": "Shopify",
"note": "Merch sales"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"client_id": {
"type": "number"
},
"amount": {
"type": "number"
},
"date": {
"type": "string"
},
"source": {
"type": "string"
},
"note": {
"type": "string"
}
}
}
Response
200
Headers
Content-Type: application/json
Body
{
"id": 19,
"type": "other_income",
"attributes": {
"team_id": 12,
"client_id": 56,
"amount": 1000,
"date": "2021-01-09",
"source": "Shopify",
"note": "Merch sales"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"type": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"client_id": {
"type": "number"
},
"amount": {
"type": "number"
},
"date": {
"type": "string"
},
"source": {
"type": "string"
},
"note": {
"type": "string"
}
}
}
}
}
Projects ¶
Show all projects ¶
Show all projectsGET/projects
Example URI
GET /projects
Response
200
Headers
Content-Type: application/json
Body
[
{
"id": 42,
"type": "project",
"attributes": {
"team_id": 12,
"client_id": 56,
"name": "Logo Design",
"source": "Referral",
"hours_budgeted": 100,
"start": "01/2021",
"end": "02/2021",
"status": "done"
}
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Show a single project ¶
Show a single projectGET/projects/{project_id}
Example URI
GET /projects/42
URI Parameters
- project_id
integer
(required) Example: 42ID of the Project
Response
200
Headers
Content-Type: application/json
Body
{
"id": 42,
"type": "project",
"attributes": {
"team_id": 12,
"client_id": 56,
"name": "Logo Design",
"source": "Referral",
"hours_budgeted": 100,
"start": "01/2021",
"end": "02/2021",
"status": "done"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"type": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"client_id": {
"type": "number"
},
"name": {
"type": "string"
},
"source": {
"type": "string"
},
"hours_budgeted": {
"type": "number"
},
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
}
}
Create a new project ¶
Create a new projectPOST/projects
Example URI
POST /projects
Request
Headers
Content-Type: application/json
Body
{
"team_id": 12,
"client_id": 56,
"name": "Logo Design",
"source": "Referral",
"hours_budgeted": 100,
"start": "01/2021",
"end": "02/2021",
"status": "done"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"client_id": {
"type": "number"
},
"name": {
"type": "string"
},
"source": {
"type": "string"
},
"hours_budgeted": {
"type": "number"
},
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
Response
200
Headers
Content-Type: application/json
Body
{
"id": 42,
"type": "project",
"attributes": {
"team_id": 12,
"client_id": 56,
"name": "Logo Design",
"source": "Referral",
"hours_budgeted": 100,
"start": "01/2021",
"end": "02/2021",
"status": "done"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"type": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"client_id": {
"type": "number"
},
"name": {
"type": "string"
},
"source": {
"type": "string"
},
"hours_budgeted": {
"type": "number"
},
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
}
}
Task Categories ¶
Show all tasks ¶
Show all tasksGET/tasks
Example URI
GET /tasks
Response
200
Headers
Content-Type: application/json
Body
[
{
"id": 25,
"attributes": {
"team_id": 12,
"name": "Administrative"
}
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Show a single task ¶
Show a single taskGET/tasks/{task_id}
Example URI
GET /tasks/25
URI Parameters
- task_id
integer
(required) Example: 25ID of the Task
Response
200
Headers
Content-Type: application/json
Body
{
"id": 25,
"attributes": {
"team_id": 12,
"name": "Administrative"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"name": {
"type": "string"
}
}
}
}
}
Teams ¶
Show all teams ¶
Show all teamsGET/teams
Example URI
GET /teams
Response
200
Headers
Content-Type: application/json
Body
[
{
"id": 12,
"type": "team",
"attributes": {
"name": "A-Team",
"address": "30 Rockefeller Plaza, New York, NY, 10112",
"email": "ateam@example.com",
"phone": "555-111-1111",
"owner_id": 20,
"active": true
}
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Show a single team ¶
Show a single teamGET/teams/{team_id}
Example URI
GET /teams/12
URI Parameters
- team_id
integer
(required) Example: 12ID of the Team
Response
200
Headers
Content-Type: application/json
Body
{
"id": 12,
"type": "team",
"attributes": {
"name": "A-Team",
"address": "30 Rockefeller Plaza, New York, NY, 10112",
"email": "ateam@example.com",
"phone": "555-111-1111",
"owner_id": 20,
"active": true
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"type": {
"type": "string"
},
"attributes": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"address": {
"type": "string"
},
"email": {
"type": "string"
},
"phone": {
"type": "string"
},
"owner_id": {
"type": "number"
},
"active": {
"type": "boolean"
}
}
}
}
}
Time Entries ¶
Show all time entries ¶
Show all time entriesGET/time_entries
Example URI
GET /time_entries
Response
200
Headers
Content-Type: application/json
Body
[
{
"id": 12,
"attributes": {
"team_id": 12,
"description": "Brainstorming with client",
"quantity": 10.5,
"date": "2021-01-03",
"status": "log"
}
}
]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}
Show a single time entry ¶
Show a single time entryGET/time_entries/{time_entry_id}
Example URI
GET /time_entries/42
URI Parameters
- time_entry_id
integer
(required) Example: 42ID of the Time Entry
Response
200
Headers
Content-Type: application/json
Body
{
"id": 12,
"attributes": {
"team_id": 12,
"description": "Brainstorming with client",
"quantity": 10.5,
"date": "2021-01-03",
"status": "log"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"description": {
"type": "string"
},
"quantity": {
"type": "number"
},
"date": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
}
}
Create a new time entry ¶
Create a new time entryPOST/time_entries
Example URI
POST /time_entries
Request
Headers
Content-Type: application/json
Body
{
"team_id": 12,
"description": "Brainstorming with client",
"quantity": 10.5,
"date": "2021-01-03",
"status": "log"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"description": {
"type": "string"
},
"quantity": {
"type": "number"
},
"date": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
Response
200
Headers
Content-Type: application/json
Body
{
"id": 12,
"attributes": {
"team_id": 12,
"description": "Brainstorming with client",
"quantity": 10.5,
"date": "2021-01-03",
"status": "log"
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number"
},
"attributes": {
"type": "object",
"properties": {
"team_id": {
"type": "number"
},
"description": {
"type": "string"
},
"quantity": {
"type": "number"
},
"date": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
}
}