### Install Python Requests Package Source: https://github.com/paymo-org/api/blob/master/sections/sample_code.md Before using the Python examples, install the 'requests' package. ```sh pip install requests ``` -------------------------------- ### Python GET Request Example Source: https://github.com/paymo-org/api/blob/master/sections/sample_code.md Example of how to perform a GET request to the Paymo API using Python. ```python import requests url = 'https://api.paymoapp.com/api/projects' headers = { 'Authorization': 'Basic YOUR_API_KEY' } response = requests.get(url, headers=headers) print(response.json()) ``` -------------------------------- ### Install Node.js Request Module Source: https://github.com/paymo-org/api/blob/master/sections/sample_code.md Before using the Node.js examples, install the 'request' npm module. ```sh npm install request --save ``` -------------------------------- ### PHP GET Request Example Source: https://github.com/paymo-org/api/blob/master/sections/sample_code.md Example of how to perform a GET request to the Paymo API using PHP. ```php get('projects'); print_r($response); ``` -------------------------------- ### Task GET Request with Includes Source: https://github.com/paymo-org/api/blob/master/sections/webhooks.md Example of a GET request to retrieve task details, including related project and tasklist names. ```text /tasks/[TASK_ID]?include=*,progress_status,project.name,tasklist.name ``` -------------------------------- ### Get Task Example Response Source: https://github.com/paymo-org/api/blob/master/sections/tasks.md Example JSON response when retrieving a single task, showing its properties. ```json { "tasks": [ { "id": 2158, "name": "Design", "code": "PD-12", "project_id": 1, "tasklist_id": 2, "user_id": 1, "complete": false, "billable": true, "seq": 1, "description": "", "price_per_hour": null, "due_date": null, "budget_hours": null, "users": [ 45 ], "created_on": "2014-07-25T11:16:24Z", "updated_on": "2014-10-13T14:22:53Z" } ] } ``` -------------------------------- ### Node.js GET Request Example Source: https://github.com/paymo-org/api/blob/master/sections/sample_code.md Example of how to perform a GET request to the Paymo API using Node.js. ```javascript const request = require('request'); const options = { url: 'https://api.paymoapp.com/api/projects', headers: { 'Authorization': 'Basic YOUR_API_KEY' } }; request(options, (error, response, body) => { if (error) throw error; console.log(body); }); ``` -------------------------------- ### Google Apps Script GET Request Example Source: https://github.com/paymo-org/api/blob/master/sections/sample_code.md Example of how to perform a GET request to the Paymo API using Google Apps Script. ```javascript function getProjects() { var apiKey = 'YOUR_API_KEY'; var url = 'https://api.paymoapp.com/api/projects'; var options = { 'method': 'get', 'headers': { 'Authorization': 'Basic ' + apiKey } }; var response = UrlFetchApp.fetch(url, options); Logger.log(response.getContentText()); } ``` -------------------------------- ### Python POST Request Example Source: https://github.com/paymo-org/api/blob/master/sections/sample_code.md Example of how to perform a POST request to the Paymo API using Python. ```python import requests url = 'https://api.paymoapp.com/api/projects' headers = { 'Authorization': 'Basic YOUR_API_KEY' } data = { 'name': 'New Project' } response = requests.post(url, headers=headers, data=data) print(response.json()) ``` -------------------------------- ### Python File Upload Example Source: https://github.com/paymo-org/api/blob/master/sections/sample_code.md Example of how to upload a file to the Paymo API using Python. ```python import requests url = 'https://api.paymoapp.com/api/files' headers = { 'Authorization': 'Basic YOUR_API_KEY' } files = { 'file': open('YOUR_FILE_PATH', 'rb') } response = requests.post(url, headers=headers, files=files) print(response.json()) ``` -------------------------------- ### Get Webhook Response Example Source: https://github.com/paymo-org/api/blob/master/sections/webhooks.md Example JSON response when retrieving a specific webhook. It shows the details of a single webhook, including its status. ```json { "hooks": [ { "id": 1, "target_url": "https://myapp.com/paymo-insert-task-hook", "last_status_code": 200, "event": "model.insert.Task", "where": null, "created_on": "2017-01-04T13:39:40Z", "updated_on": "2017-01-04T13:39:40Z" } ] } ``` -------------------------------- ### PHP File Upload Example Source: https://github.com/paymo-org/api/blob/master/sections/sample_code.md Example of how to upload a file to the Paymo API using PHP. ```php uploadFile('YOUR_FILE_PATH'); print_r($response); ``` -------------------------------- ### Start a Timer Source: https://github.com/paymo-org/api/blob/master/sections/entries.md Initiate a timer for a user by creating a time entry with a start time and no end time. A 409 error is returned if another timer is already active for the user. ```json { "task_id": 241184, "user_id": 1563, "description": "Running timer description", "start_time": "2017-06-20T09:30:00Z" } ``` -------------------------------- ### Starting a Timer Source: https://github.com/paymo-org/api/blob/master/sections/entries.md Initiates a timer by creating a new time entry with a start time and no end time. If a timer is already running for the user, this will result in a 409 error. ```APIDOC ## POST /api/entries ### Description Starts a timer for a user by creating a time entry with a `start_time` and no `end_time`. ### Method POST ### Endpoint /api/entries ### Request Body - **task_id** (integer) - Required - The ID of the task. - **user_id** (integer) - Required - The ID of the user. - **description** (text) - Optional - A description for the time entry. - **start_time** (datetime) - Required - The start time of the timer in ISO 8601 format. ### Request Example ```json { "task_id": 241184, "user_id": 1563, "description": "Running timer description", "start_time": "2017-06-20T09:30:00Z" } ``` ### Response #### Success Response (201 Created) - **id** (integer) - Unique entry identifier. - **task_id** (integer) - Id of the task for which the time is added. - **user_id** (integer) - Id of the user for whom the time is added. - **start_time** (datetime) - Date and time when the time entry started. - **description** (text) - Time entry description. #### Error Response (409 Conflict) Returned if another timer is already running for the specified user. ``` -------------------------------- ### Node.js File Upload Example Source: https://github.com/paymo-org/api/blob/master/sections/sample_code.md Example of how to upload a file to the Paymo API using Node.js. ```javascript const request = require('request'); const fs = require('fs'); const options = { url: 'https://api.paymoapp.com/api/files', method: 'POST', headers: { 'Authorization': 'Basic YOUR_API_KEY' }, formData: { 'file': fs.createReadStream('YOUR_FILE_PATH') } }; request(options, (error, response, body) => { if (error) throw error; console.log(body); }); ``` -------------------------------- ### PHP POST Request Example Source: https://github.com/paymo-org/api/blob/master/sections/sample_code.md Example of how to perform a POST request to the Paymo API using PHP. ```php post('projects', ['name' => 'New Project']); print_r($response); ``` -------------------------------- ### Node.js POST Request Example Source: https://github.com/paymo-org/api/blob/master/sections/sample_code.md Example of how to perform a POST request to the Paymo API using Node.js. ```javascript const request = require('request'); const options = { url: 'https://api.paymoapp.com/api/projects', method: 'POST', headers: { 'Authorization': 'Basic YOUR_API_KEY' }, form: { 'name': 'New Project' } }; request(options, (error, response, body) => { if (error) throw error; console.log(body); }); ``` -------------------------------- ### Get Specific Booking Response Example Source: https://github.com/paymo-org/api/blob/master/sections/bookings.md Example JSON structure for a single booking object when retrieved by its ID. ```json { "bookings": [ { "id": 15200864, "user_task_id": 241185, "start_date": "2016-12-15", "end_date": "2016-12-25", "hours_per_day": 4, "description": null, "created_on": "2014-12-12T14:42:49Z", "updated_on": "2014-12-12T14:42:49Z" } ] } ``` -------------------------------- ### Task Object Example Source: https://github.com/paymo-org/api/blob/master/sections/tasks.md Example JSON structure for a task object, including details like ID, name, project, user, completion status, and timestamps. ```json { "tasks": [ { "id": 2158, "name": "Design", "code": "PD-16", "project_id": 1, "tasklist_id": 2, "user_id": 1, "complete": false, "billable": true, "seq": 1, "description": "", "price_per_hour": null, "due_date": null, "budget_hours": null, "users": [ 45 ], "created_on": "2014-07-25T11:16:24Z", "updated_on": "2014-10-13T14:22:53Z" }, { "id": 3320, "name": "Testing", "code": "PD-17", "project_id": 1, "tasklist_id": 3, "user_id": 2, "complete": true, "billable": true, "seq": 2, "description": "", "price_per_hour": null, "due_date": "2014-10-30", "budget_hours": null, "users": [], "created_on": "2014-07-25T11:18:11Z", "updated_on": "2014-08-23T14:22:05Z" } ] } ``` -------------------------------- ### Booking Object Example Source: https://github.com/paymo-org/api/blob/master/sections/bookings.md Example JSON structure of a booking object returned by the API. ```json { "bookings": [ { "id": 15200864, "user_task_id": 241184, "start_date": "2016-12-11", "end_date": "2016-12-12", "hours_per_day": 10, "description": "Plan the meeting", "created_on": "2014-12-12T14:42:49Z", "updated_on": "2014-12-12T14:42:49Z" }, { "id": 15200864, "user_task_id": 241185, "start_date": "2016-12-15", "end_date": "2016-12-25", "hours_per_day": 8, "description": null, "created_on": "2014-12-12T14:42:49Z", "updated_on": "2014-12-12T14:42:49Z" } ] } ``` -------------------------------- ### List Webhooks Response Example Source: https://github.com/paymo-org/api/blob/master/sections/webhooks.md Example JSON response when listing existing webhooks. It includes details like ID, target URL, event type, and associated conditions. ```json { "hooks": [ { "id": 1, "target_url": "https://myapp.com/paymo-insert-task-hook", "last_status_code": null, "event": "model.insert.Task", "where": null, "created_on": "2017-01-04T13:39:40Z", "updated_on": "2017-01-04T13:39:40Z" }, { "id": 2, "target_url": "https://myapp.com/paymo-delete-task-hook", "last_status_code": null, "event": "model.delete.Task", "where": "project_id=123456", "created_on": "2017-01-04T13:40:11Z", "updated_on": "2017-01-04T13:40:11Z" } ] } ``` -------------------------------- ### Google Apps Script POST Request Example Source: https://github.com/paymo-org/api/blob/master/sections/sample_code.md Example of how to perform a POST request to the Paymo API using Google Apps Script. ```javascript function createProject() { var apiKey = 'YOUR_API_KEY'; var url = 'https://api.paymoapp.com/api/projects'; var payload = JSON.stringify({ 'name': 'New Project' }); var options = { 'method': 'post', 'contentType': 'application/json', 'headers': { 'Authorization': 'Basic ' + apiKey }, 'payload': payload }; var response = UrlFetchApp.fetch(url, options); Logger.log(response.getContentText()); } ``` -------------------------------- ### Webhook Signature Example Source: https://github.com/paymo-org/api/blob/master/sections/webhooks.md Example of an X-Paymo-Signature header for a delete project webhook. This is generated using HMAC-SHA1 with the provided secret. ```text X-Paymo-Signature: sha1=dc03736e396e70138bf7af4ffaa2948cde42dcf1 ``` -------------------------------- ### Create Time Entry with Start and End Times Source: https://github.com/paymo-org/api/blob/master/sections/entries.md Create a new time entry by providing the task ID, start time, and end time. The minimum duration for such entries is 1 minute. ```json { "task_id": 241184, "start_time": "2014-12-10T09:00:00Z", "end_time": "2014-12-10T10:00:00Z", "description": "Talked to Susan on the phone." } ``` -------------------------------- ### Getting a Project Source: https://github.com/paymo-org/api/blob/master/sections/projects.md Retrieve the details of a specific project by providing its unique project ID. ```APIDOC ## Getting a project To get the project's info if you know the project id, make a GET request to: * `/api/projects/[PROJECT_ID]` Example of response: ```json { "projects": [ { "id": 397706, "name": "Understanding Paymo", "code": "UP", "task_code_increment": 19, "description": "", "client_id": 151303, "status_id": 1922, "active": true, "budget_hours": 0.25, "price_per_hour": 0, "billable": false, "color": "#68BE5E", "users": [ 23129 ], "managers": [ 23129 ], "created_on": "2014-10-03T12:49:05Z", "updated_on": "2014-10-24T14:34:59Z" } ] } ``` You can also [include related content](includes.md) when getting a project. ``` -------------------------------- ### Create Project Template from Scratch Source: https://github.com/paymo-org/api/blob/master/sections/project_templates.md Create a new project template with no predefined tasks or task lists. The template name is the only required field. ```json { "name": "Template for Advertising Campaigns" } ``` -------------------------------- ### Create New Project Source: https://github.com/paymo-org/api/blob/master/sections/projects.md Create a new project by sending a POST request with project details in the request body. The 'name' field is required. If 'client_id' is omitted, a default client will be created. ```json { "name": "New Project", "description": "Latest project we'll be working on", "billable": true, "client_id": 999999, "users": [ 123, 124 ], "managers": [ 123 ] } ``` -------------------------------- ### Example Response for Getting a Task Assignment Source: https://github.com/paymo-org/api/blob/master/sections/users_tasks.md This JSON structure represents a successful response when retrieving a single task assignment. ```JSON { "userstasks": [ { "id": 15200864, "user_id": 241185, "task_id": 1536, "created_on": "2017-02-16T14:43:11Z", "updated_on": "2017-02-16T14:43:11Z" } ] } ``` -------------------------------- ### Update Booking Request Body (Partial) Source: https://github.com/paymo-org/api/blob/master/sections/bookings.md Send only the fields you want to change when updating an existing booking. This example shows updating only the start date. ```json { "start_date": "2016-12-10" } ``` -------------------------------- ### Creating a Project Source: https://github.com/paymo-org/api/blob/master/sections/projects.md Create a new project by sending a POST request with project details in the request body. The 'name' field is required. ```APIDOC ## Creating a project To create a new project, make a POST request to: * `/api/projects` with the request body containing the new project info, as in the example below: ```json { "name": "New Project", "description": "Latest project we'll be working on", "billable": true, "client_id": 999999, "users": [ 123, 124 ], "managers": [ 123 ] } ``` If successful, the response will return `201 Created`. The response header `Location` will contain a link for the new project. The response body will contain the new project info as in the **Getting a project** section. If your company does not have a Paymo paid subscription and you have reached the active projects limit, you will get a `403 Error: Adding projects denied. Projects limit reached.` ### Required fields When creating a project: `name`. **Note**: although `client_id` is not required, if `client_id` is not specified a `Sample Client` will be created automatically and the project will be assigned to this client. ``` -------------------------------- ### Task Insert/Update Notification Body Source: https://github.com/paymo-org/api/blob/master/sections/webhooks.md Example JSON payload for a task creation or update event notification. This structure is similar to a GET request for a task, with additional includes. ```json { "id":109403, "name":"New Task", "project_id":59032, "tasklist_id":250019, "user_id":1093, "complete":false, "billable":true, "flat_billing":false, "seq":1, "description":"", "price_per_hour":null, "estimated_price":null, "price":null, "invoiced":false, "invoice_item_id":null, "due_date":null, "start_date":null, "budget_hours":null, "users":[ 1093 ], "created_on":"2016-09-29T09:46:55Z", "updated_on":"2016-09-29T09:46:55Z", "files_count":0, "comments_count":0, "project":{ "name":"AT&T Flyer Design" }, "tasklist":{ "name":"Planning" } } ``` -------------------------------- ### Create New Client Source: https://github.com/paymo-org/api/blob/master/sections/clients.md Create a new client by sending a POST request with the client's name and email in the request body. The 'name' field is required. ```json { "name": "Smith and Sons", "email": "office@smithandsons.com" } ``` -------------------------------- ### Create Time and Materials Project Source: https://github.com/paymo-org/api/blob/master/sections/projects.md Use this request to create a time and materials project. Ensure `billable` is true and `flat_billing` is false. The `price_per_hour` and `hourly_billing_mode` fields are specific to this project type. ```json { "name": "Time and materials project", "billable": true, "flat_billing": false, "price_per_hour": 50.00, "hourly_billing_mode": "project" } ``` -------------------------------- ### Creating a project template Source: https://github.com/paymo-org/api/blob/master/sections/project_templates.md Create a new project template. Templates can be created from scratch or by duplicating an existing project. ```APIDOC ## Creating a project template To create a project template, make a POST request to: * `/api/projecttemplates` with the request body containing the new template info. By default, this will create a project template with no task lists or tasks. To create a template from an existing project, send the ID of the project as `project_id` in the request body. If successful, the response will return `201 Created`. The response header `Location` will contain a link for the new project template. The response body will contain the new project template info. ### Method POST ### Endpoint /api/projecttemplates ### Request Body - **name** (string) - Required - The name of the new project template. - **project_id** (integer) - Optional - The ID of an existing project to create the template from. ``` -------------------------------- ### Getting Company Info Source: https://github.com/paymo-org/api/blob/master/sections/company.md Retrieve the company information and its associated settings by making a GET request to the specified endpoint. ```APIDOC ## GET /api/company ### Description Retrieves the company information and settings. ### Method GET ### Endpoint /api/company ### Response #### Success Response (200) - **company** (object) - Contains detailed company information. ### Response Example { "company": { "id": 123, "name": "Dunder Mifflin Paper Company", "address": "Academy St, Scranton, PA 18504", "phone": "+015641789891", "email": "michael@dundermifflin.com", "url": "www.dundermifflin.com", "fiscal_information": "", "country": "US", "image": "https:\/\/app.paymoapp.com\/assets\/123\/ec4e71d560281f6d55b8c24c7f42db2f.png", "active": true, "account_type": "commercial", "created_on": "2014-10-03T12:49:05Z", "updated_on": "2014-12-03T12:55:49Z", "apply_tax_to_expenses": "1", "date_format": "m\/d\/Y", "default_currency": "USD", "default_price_per_hour": "30", "default_tax": "0", "default_tax2": "0", "default_tax2_text": "Tax2", "default_tax_text": "V.A.T.», "due_interval": "30", "estimate_format": "#EST-[yyyy][mm][dd]-[i]", "hide_tax_field": "", "invoice_format": "#INV-[yyyy][mm][dd]-[i]", "language": "en", "next_estimate_number": "101", "next_invoice_number": "201", "payment_reminder_1": "0", "payment_reminder_2": "0", "payment_reminder_3": "0", "remove_paymo_branding": "", "tax_on_tax": "0", "timezone": "US\/Eastern", "time_format": "h:i a", "week_start": "1", "workday_start": "09:00", "workday_end": "17:00", "working_days": "1,2,3,4,5", "decimal_sep": ".", "thousands_sep": ",", "online_payments": true, "max_users": 4, "current_users": 2, "max_projects": null, "current_projects": 6, "max_invoices": null, "current_invoices": 0 } } ``` -------------------------------- ### Creating a Project from a Template Source: https://github.com/paymo-org/api/blob/master/sections/projects.md Create a new project and add tasks and task lists from a project template by including the `template_id` in the POST request body. ```APIDOC ## Adding tasks from a project template (Create Project) ### Description Create a new project and add tasks and task lists from a project template by including the `template_id` in the POST request body. ### Method POST ### Endpoint `/api/projects` ### Parameters #### Request Body - **name** (string) - Required - The name of the new project. - **description** (string) - Optional - A description for the new project. - **billable** (boolean) - Optional - Indicates if the project is billable. - **client_id** (integer) - Optional - The ID of the client associated with the project. - **users** (array of integers) - Optional - A list of user IDs to assign to the project. - **managers** (array of integers) - Optional - A list of user IDs to assign as managers. - **template_id** (integer) - Required - The ID of the project template to use. ### Request Example ```json { "name": "Project from template", "description": "This project was created from a template", "billable": true, "client_id": 561, "users": [ 123, 124 ], "managers": [ 123 ], "template_id": 10 } ``` ``` -------------------------------- ### Get Single Milestone Source: https://github.com/paymo-org/api/blob/master/sections/milestones.md Retrieve a specific milestone's information by making a GET request to the milestones endpoint with the milestone ID. ```http /api/milestones/[MILESTONE_ID] ``` -------------------------------- ### Get Specific Booking Source: https://github.com/paymo-org/api/blob/master/sections/bookings.md Retrieve details for a single booking using its ID. Make a GET request to the booking's specific URL. ```api /api/bookings/[BOOKING_ID] ``` -------------------------------- ### Creating a client Source: https://github.com/paymo-org/api/blob/master/sections/clients.md Create a new client by sending their details in the request body. ```APIDOC ## Creating a client To create a client, make a POST request to: * `/api/clients` with the request body containing the new client info, as in the example below: ### Method POST ### Endpoint /api/clients ### Request Body - **name** (string) - Required - The name of the client. - **email** (string) - Optional - The email address of the client. ### Request Example ```json { "name": "Smith and Sons", "email": "office@smithandsons.com" } ``` ### Response #### Success Response (201 Created) The response header `Location` will contain a link for the new client. The response body will contain the new client info. ### Response Example ```json { "clients": [ { "id": 1, "name": "Smith and Sons", "email": "office@smithandsons.com", "active": true, "created_on": "2023-10-27T10:00:00Z", "updated_on": "2023-10-27T10:00:00Z" } ] } ``` ``` -------------------------------- ### Get Specific Workflow Source: https://github.com/paymo-org/api/blob/master/sections/workflows.md Retrieve information for a specific workflow by making a GET request to the workflow's ID. The response includes workflow details. ```json { "workflows": [ { "id": 2, "name": "Basic", "is_default": false, "created_on": "2018-11-12T13:14:06Z", "updated_on": "2018-11-12T13:14:06Z" } ] } ``` -------------------------------- ### Creating a Task List Source: https://github.com/paymo-org/api/blob/master/sections/tasklists.md Create a new task list within a project. ```APIDOC ## Creating a Task List To create a task list, make a POST request to: * `/api/tasklists` with the request body containing the new task list info. ### Method POST ### Endpoint `/api/tasklists` ### Request Body - **name** (string) - Required - The name of the new task list. - **project_id** (integer) - Required - The ID of the project to which the task list belongs. ### Request Example ```json { "name": "Website Design", "project_id": 100 } ``` ### Response #### Success Response (201 Created) The response header `Location` will contain a link for the new task list. The response body will contain the new task list info. #### Response Example (Body) ```json { "id": 519, "name": "Website Design", "project_id": 100, "seq": 3, "milestone_id": null, "created_on": "2024-01-01T10:00:00Z", "updated_on": "2024-01-01T10:00:00Z" } ``` ``` -------------------------------- ### Get Company Information Source: https://github.com/paymo-org/api/blob/master/sections/company.md Retrieve comprehensive company details and settings by making a GET request to the /api/company endpoint. The response includes all company attributes. ```json { "company": { "id": 123, "name": "Dunder Mifflin Paper Company", "address": "Academy St, Scranton, PA 18504", "phone": "+015641789891", "email": "michael@dundermifflin.com", "url": "www.dundermifflin.com", "fiscal_information": "", "country": "US", "image": "https:\/\/app.paymoapp.com\/assets\/123\/ec4e71d560281f6d55b8c24c7f42db2f.png", "active": true, "account_type": "commercial", "created_on": "2014-10-03T12:49:05Z", "updated_on": "2014-12-03T12:55:49Z", "apply_tax_to_expenses": "1", "date_format": "m\/d\/Y", "default_currency": "USD", "default_price_per_hour": "30", "default_tax": "0", "default_tax2": "0", "default_tax2_text": "Tax2", "default_tax_text": "V.A.T.», "due_interval": "30", "estimate_format": "#EST-[yyyy][mm][dd]-[i]", "hide_tax_field": "", "invoice_format": "#INV-[yyyy][mm][dd]-[i]", "language": "en", "next_estimate_number": "101", "next_invoice_number": "201", "payment_reminder_1": "0", "payment_reminder_2": "0", "payment_reminder_3": "0", "remove_paymo_branding": "", "tax_on_tax": "0", "timezone": "US\/Eastern", "time_format": "h:i a", "week_start": "1", "workday_start": "09:00", "workday_end": "17:00", "working_days": "1,2,3,4,5", "decimal_sep": ".", "thousands_sep": ",", "online_payments": true, "max_users": 4, "current_users": 2, "max_projects": null, "current_projects": 6, "max_invoices": null, "current_invoices": 0 } } ``` -------------------------------- ### Get Basic Project Status Info Source: https://github.com/paymo-org/api/blob/master/sections/project_statuses.md Retrieve basic information for a specific project status by its ID. Make a GET request to the `/api/projectstatuses/[STATUS_ID]` endpoint. ```json { "projectstatuses": [ { "id": 28282, "name": "Active", "active": true, "readonly": true, "seq": 0, "created_on": "2017-07-12T09:02:39Z", "updated_on": "2017-07-12T09:02:39Z" } ] } ``` -------------------------------- ### Create Task List Source: https://github.com/paymo-org/api/blob/master/sections/tasklists.md Create a new task list by sending a POST request with the required 'name' and 'project_id' in the request body. A successful creation returns a 201 status code and a 'Location' header with the new list's URL. ```json { "name": "Website Design", "project_id": 100 } ``` -------------------------------- ### Get a Specific Time Entry Source: https://github.com/paymo-org/api/blob/master/sections/entries.md Retrieve detailed information for a single time entry by its ID. Make a GET request to the entries endpoint with the entry ID. ```http /api/entries/[ENTRY_ID] ``` -------------------------------- ### Create Project Template from Existing Project Source: https://github.com/paymo-org/api/blob/master/sections/project_templates.md Create a new project template by cloning an existing project. The 'project_id' field in the request body specifies the source project. ```json { "name": "Template for Advertising Campaigns", "project_id": 90033 } ``` -------------------------------- ### Get Specific Workflow Status Source: https://github.com/paymo-org/api/blob/master/sections/workflow_statuses.md Retrieve details for a single workflow status by making a GET request with the workflow status ID. The response includes the status object. ```json { "workflowstatuses":[ { "id":1, "workflow_id":1, "name":"Backlog", "color":null, "action":"backlog", "created_on":"2018-11-21T08:29:15Z", "updated_on":"2018-11-21T08:29:15Z" } ] } ``` -------------------------------- ### List Project Templates Source: https://github.com/paymo-org/api/blob/master/sections/project_templates.md Retrieve a list of all available project templates. Use the 'include' parameter to fetch associated task lists and tasks. ```json { "project_templates":[ { "id":16137, "name":"Billboard design", "created_on":"2015-10-16T12:22:06Z", "updated_on":"2015-10-16T12:22:06Z" }, { "id":16134, "name":"Flyer design", "created_on":"2015-10-16T12:21:02Z", "updated_on":"2015-10-16T12:21:02Z" } ] } ``` -------------------------------- ### Get Project Status with Projects Info Source: https://github.com/paymo-org/api/blob/master/sections/project_statuses.md Retrieve comprehensive project status information, including associated projects, by making a GET request to `/api/projectstatuses/[STATUS_ID]?include=projects`. ```json { "projectstatuses": [ { "id": 28282, "name": "Active", "active": true, "readonly": true, "seq": 0, "created_on": "2017-07-12T09:02:39Z", "updated_on": "2017-07-12T09:02:39Z", "projects": [ { "id": 1383832, "name": "Paymo Walkthrough", "code": "PW", "task_code_increment": 7, "description": "This walkthrough sample project contains a collection of tasks/to-dos that help describe the basics of using Paymo. If you need help you can always get in touch with us using the small chat icon in the bottom right corner of the screen.", "client_id": 923821, "status_id": 28282, "active": true, "adjustable_hours": null, "hourly_billing_mode": null, "budget_hours": 0.25, "price_per_hour": 60, "estimated_price": null, "price": null, "invoiced": false, "invoice_item_id": null, "billable": false, "flat_billing": false, "color": "#68BE5E", "users": [ 19393 ], "managers": [ 19393 ], "created_on": "2017-07-12T09:02:39Z", "updated_on": "2017-07-12T09:02:39Z", "billing_type": "non" }, { "id": 393932, "name": "Product downloader", "code": "PD", "task_code_increment": 54, "description": "", "client_id": 923821, "status_id": 28282, "active": true, "adjustable_hours": null, "hourly_billing_mode": null, "budget_hours": 105, "price_per_hour": 90, "estimated_price": 0, "price": null, "invoiced": false, "invoice_item_id": null, "billable": true, "flat_billing": false, "color": null, "users": [ 92983, 2392029 ], "managers": [ 92983 ], "created_on": "2017-07-12T09:02:39Z", "updated_on": "2017-07-12T09:06:37Z", "billing_type": "pph" } ] } ] } ``` -------------------------------- ### List All Project Statuses Source: https://github.com/paymo-org/api/blob/master/sections/project_statuses.md Retrieve a list of all project statuses. Append '?include=projects' to also include project information. ```json { "projectstatuses": [ { "id": 28282, "name": "Active", "active": true, "readonly": true, "seq": 0, "created_on": "2017-07-12T09:02:39Z", "updated_on": "2017-07-12T09:02:39Z" }, { "id": 28283, "name": "Proposal", "active": true, "readonly": false, "seq": 1, "created_on": "2017-07-12T09:02:39Z", "updated_on": "2017-07-12T09:02:39Z" }, { "id": 28284, "name": "On-hold", "active": false, "readonly": false, "seq": 2, "created_on": "2017-07-12T09:02:39Z", "updated_on": "2017-07-12T09:02:39Z" }, { "id": 28285, "name": "Cancelled", "active": false, "readonly": false, "seq": 3, "created_on": "2017-07-12T09:02:39Z", "updated_on": "2017-07-12T09:02:39Z" }, { "id": 28286, "name": "Completed", "active": false, "readonly": false, "seq": 4, "created_on": "2017-07-12T09:02:39Z", "updated_on": "2017-07-12T09:02:39Z" }, { "id": 28287, "name": "Archived", "active": false, "readonly": true, "seq": 5, "created_on": "2017-07-12T09:02:39Z", "updated_on": "2017-07-12T09:02:39Z" } ] } ``` -------------------------------- ### Get Invoice Details Source: https://github.com/paymo-org/api/blob/master/sections/invoices.md Retrieve basic invoice information by making a GET request to the invoices endpoint. Include `?include=invoiceitems` to also retrieve line item details. ```json { "invoices":[ { "id":110723, "client_id":10872, "template_id":null, "number":"#INV-20140312-162", "status":"draft", "currency":"USD", "date":"2014-03-12", "due_date":"2014-04-11", "subtotal":375, "total":386.25, "tax":3, "tax2":0, "tax_amount":11.25, "tax2_amount":0, "tax_on_tax":true, "language":"", "bill_to":"Cisco Systems, Inc.\n170 West Tasman Dr\nSan Jose, California 95134\nUS", "company_info":"Dunder Mifflin\nAcademy St\nScranton, PA 18504\nmichael@dundermifflin.com\n+015641789891\nTest Fiscal information", "footer":"invoice footer", "notes":"", "outstanding":null, "tax_text":"V.A.T.", "tax2_text":"Tax2", "title":"INVOICE", "pay_online":false, "reminder_1_sent":null, "reminder_2_sent":null, "reminder_3_sent":null, "download_token":"MUakYT1hv12mgT/Me8TsMiw9gGl+nB+5pUuK1UbY36ykR2Di/4dBmuNYormwYZ7BbLLqJ+5+emQHh2cBW2Xc7g==", "permalink":"https://app.paymoapp.com/api/invoices/110723/?token=i%2Bz6uJ%2BahzZKdfM0pu8e%2BF3OSt1xKShAWdtliiXHlKL6eEbWCOACHQutqPz1IUI%2BdMqSYuvJ9omKUz%2BgqmXhdLvkovr%2BSyE%2BoR3plvIuuVE%3D&format=html", "pdf_link":"https://app.paymoapp.com/api/invoices/110723/?token=i%2Bz6uJ%2BahzZKdfM0pu8e%2BF3OSt1xKShAWdtliiXHlKL6eEbWCOACHQutqPz1IUI%2BdMqSYuvJ9omKUz%2BgqmXhdLvkovr%2BSyE%2BoR3plvIuuVE%3D&format=pdf", "token":"i+z6uJ+ahzZKdfM0pu8e+F3OSt1xKShAWdtliiXHlKL6eEbWCOACHQutqPz1IUI+dMqSYuvJ9omKUz+gqmXhdLvkovr+SyE+oR3plvIuuVE=", "created_on":"2014-03-12T10:10:02Z", "updated_on":"2014-07-23T14:22:05Z", "invoiceitems":[ { "id":240130, "invoice_id":110723, "item":"Monthly campaign", "description":"placing banners/adds", "price_unit":15, "quantity":25, "expense_id":null, "apply_tax":true, "seq":1, "created_on":"2014-03-12T10:10:02Z", "updated_on":"2014-07-23T14:22:05Z" } ] } ] } ``` -------------------------------- ### Create Flat Rate Project Source: https://github.com/paymo-org/api/blob/master/sections/projects.md This request is used to create a flat rate project. Set `billable` to true and `flat_billing` to true. The `price` field defines the fixed cost for the project. ```json { "name": "Flat rate project", "billable": true, "flat_billing": true, "price": 2000.00 } ``` -------------------------------- ### Authenticate with API Key Source: https://github.com/paymo-org/api/blob/master/sections/authentication.md For third-party software, use API Keys instead of user credentials. Provide the API Key as the username and any text as the password. ```shell curl -u YOUR_API_KEY:SOME_RANDOM_TEXT \ -H 'Accept: application/json' https://app.paymoapp.com/api/me ```