### Example Project Response (GET) Source: https://www.planhat.com/developers/api/project This is an example of a successful response when retrieving project data using the API. It includes details like project ID, company information, and custom fields. ```json { "_id": "609a88660b73992504816060", "companyId": "609975100b73992504810554", "companyName": "Tenet", "name": "SAP Integration", "__v": 0, "startDate": "2021-05-12T03:00:00.000Z", "custom": { "Notes": "", "Product": [ "Product A" ], "Days in Phase": 0, "NRR30": 0, "t123": "undefined", "Logins": 0, "Renewal in days": -1, "Activity Count": 0, "Week No": 29.285714285714285 }, "mrr": 1000 } ``` -------------------------------- ### Example JSON Response for Project List Source: https://www.planhat.com/developers/api/project This is an example of the JSON response when retrieving a list of projects, showing selected fields. ```json [ { "_id": "60228bae4a93f65f056d2412", "companyId": "6022884d40bd001fb4b6e554", "name": "Älvdalen 2" }, { "_id": "60228915f4d2e51f9cc29856", "companyId": "6022884d40bd001fb4b6e554", "name": "URL123" } ] ``` -------------------------------- ### Example Task Response Source: https://www.planhat.com/developers/api/task This is an example of a successful response when retrieving or updating a task. ```json { "mainType": "task", "noSpecificTime": true, "shared": false, "overdueNotified": false, "activityTags": [], "isArchived": false, "status": "In-progress", "_id": "6102c9748084189dcbf0df60", "ownerId": "58e231b14246fc73139f29e8", "companyId": "61006bc89a3e0b702ed8ea49", "startTime": "2021-07-29T00:00:00.000Z", "repeat": "daily", "action": "Daily contact", "description": "

Call the client.

", "snippet": "Call the client.", "companyName": "Tenet", "endusers": [], "users": [], "checklist": [], "__v": 0, "ownerName": "Alex", "sourceId": "sfdc-1234", "createdAt": "2022-07-05T09:51:52.818Z", "updatedAt": "2022-07-05T09:51:52.818Z" } ``` -------------------------------- ### Example Asset Response (List) Source: https://www.planhat.com/developers/api/asset This is an example JSON response when fetching a list of assets, showing selected properties like '_id', 'companyId', and 'name'. ```json [ { "_id": "60fb0869694ea374023924cb", "companyId": "56bccdf554d64d837d01be4a", "name": "ZPA Product" }, { "_id": "601c0a253e5ed41388982528", "companyId": "6011889f52181c5640bf41ba", "name": "Trello.io" } ] ``` -------------------------------- ### Example Response for Get Companies Lean List Source: https://www.planhat.com/developers/api/company This is an example of the JSON response when fetching a lean list of companies. It includes basic company identifiers and names. ```json [ { "_id": "56bccdf554d64d837d01be8c", "name": "Chevron", "externalId": "chevron", "sourceId": "0012000001UchdsAAB" }, { "_id": "56ccc2d39b760ff232295798", "sourceId": "0012000001Tjy5xAAB", "name": "United Oil & Gas, Singapore", "externalId": "CD355120-B" }, { "_id": "56bccdf554d64d837d01be63", "name": "Burger King", "externalId": "", "sourceId": "0012000001VKEiVAAX" }, { "_id": "56bccdf554d64d837d01be4e", "name": "McDonalds", "externalId": "mcdonalds", "sourceId": "0012000001TwtO7AAJ" } ] ``` -------------------------------- ### Example Project Response (PUT) Source: https://www.planhat.com/developers/api/project This is an example of a successful response after updating a project. It reflects the changes made, such as an updated project name, and may include new custom fields. ```json { "_id": "6101a50072c0e0884d5e8db1", "companyId": "61006bc89a3e0b702ea49", "startDate": "2021-07-26T04:00:00.000Z", "endDate": "2021-07-31T04:00:00.000Z", "currency": "USD", "mrr": 1000, "name": "Big project", "companyName": "Tenet", "__v": 0, "custom": { "Days until project end": 2 } } ``` -------------------------------- ### Get Churn List Example Source: https://www.planhat.com/developers/api/churn Fetches a list of churn records. Supports filtering by companyId, limiting results, pagination with offset, sorting, and selecting specific properties. ```bash curl --location -g --request GET 'https://api.planhat.com/churn' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}' ``` -------------------------------- ### Example Issue Response Source: https://www.planhat.com/developers/api/issue This is an example of a successful response when retrieving or creating an issue. It includes details about the issue, associated companies, and end-users. ```json { "companyMatchingValue": [], "companyIds": [ "61006bc89a3e0b702ed8ea49" ], "enduserIds": [ "610091916d643a7c418aef42" ], "conversationIds": [], "archived": false, "_id": "610411d5b046afb2109df12c", "title": "Problem with integration", "description": "There is a problem with our integration settings that is affecting some users.", "status": "Open", "companies": [ { "id": "61006bc89a3e0b702ed8ea49", "name": "Tenet" } ], "endusers": [ { "id": "610091916d643a7c418aef42", "name": "Lara Croft" } ], "updatedAt": "2021-07-30T14:51:01.691Z", "createdAt": "2021-07-30T14:51:01.691Z", "__v": 0 } ``` -------------------------------- ### Example Task Response JSON Source: https://www.planhat.com/developers/api/task This is an example of a successful JSON response when retrieving a single task by its ID. ```json { "_id": "5db866ceab7aac67dc3637c8", "mainType": "task", "noSpecificTime": true, "shared": false, "overdueNotified": false, "activityTags": [], "isArchived": false, "status": "In-progress", "action": "Sub activity", "description": "", "companyId": "56ccc2d39b760ff232295794", "companyName": "Grand Hotels", "createdAt": "2022-07-05T09:51:52.818Z", "updatedAt": "2022-07-05T09:51:52.818Z", "ownerId": "54ddc90a3570c76e2cbd08a5", "ownerName": "Niklas", "workflowId": "5db866ceab7aac67dc3637be", "workflowName": "QBR", "workflowTaskId": "5d27408853372f7cd1170407", "checklist": [], "parent": "5db866ceab7aac67dc3637c6", "sortPosition": 5, "snippet": "", "endusers": [], "users": [], "children": [], "comments": [], "__v": 0, "workflowTemplateId": "5a57d7754b5f1d13128a0533", "repeat": null, "custom": { "HScore": 0 }, "workflowStepId": "5db866ceab7aac67dc3637c8" } ``` -------------------------------- ### Example License Response Source: https://www.planhat.com/developers/api/license This is an example of a successful JSON response when retrieving a single license. It includes details about renewal status, dates, financial information, and associated company data. ```json { "_id": "56bccdf554d64d837d01beb2", "renewalStatus": "renewed", "issues": null, "autoRenews": false, "noticePeriod": null, "renewalUnit": "month", "noticeUnit": null, "invoicesGenerated": false, "isOverdue": false, "renewalDaysFromNow": -1313, "renewalDate": "2017-12-22T00:00:00.000Z", "mrr": 1958.3333333333333, "length": 24, "fixedPeriod": true, "product": "", "value": 47000, "_currency": "USD", "fromDate": "2015-12-22T00:00:00.000Z", "toDate": "2017-12-22T00:00:00.000Z", "salesDate": "2015-12-22T18:07:49.000Z", "renewalPeriod": 24, "toDateIncluded": false, "invoiceCycleInterval": 0, "sourceId": "0060O00000xdyr4QAA", "companyId": "56bccdf554d64d837d01beaf", "companyName": "Siemens", "custom": { "Days in Phase": 0, "NRR30": 0, "t123": "undefined", "Logins": 0, "Days until renewal": -1, "Renewal in days": -1, "Activity Count": 0, "Week No": 29.285714285714285 } } ``` -------------------------------- ### Create License Response Source: https://www.planhat.com/developers/api/license Example JSON response returned after successfully creating a license. ```json '{ "renewalStatus": "ongoing", "issues": [], "autoRenews": false, "noticePeriod": null, "renewalUnit": "month", "noticeUnit": null, "invoicesGenerated": false, "_id": "61006fbf1df7fa77a20d9d0a", "companyId": "61006bc89a3e0b702ed8ea49", "fixedPeriod": true, "fromDate": "2021-07-27T00:00:00.000Z", "toDate": "2022-07-27T00:00:00.000Z", "invoiceCycleInterval": 0, "mrr": 83.33333333333333, "product": "Large License", "_currency": "USD", "renewalPeriod": 12, "companyName": "Tenet", "toDateIncluded": false, "length": 12, "value": 1000, "renewalDate": "2022-07-27T00:00:00.000Z", "renewalDaysFromNow": 364, "isOverdue": false, "__v": 0 }' ``` -------------------------------- ### Example Asset Response (Single) Source: https://www.planhat.com/developers/api/asset This is an example JSON response for a single asset, detailing its ID, company information, name, custom fields, external ID, and usage data. ```json { "_id": "5ffcce42ad67267f66741147", "companyId": "56bccdf554d64d837d01be9d", "companyName": "Tenet", "name": "Gold asset", "__v": 0, "custom": { "Comments": "", "Main Product": [ "Recipe Database" ], "Days in Phase": 0, "NRR30": 0, "t123": "undefined", "Logins": 0, "Overall Outlet Health": 4, "Kary FF": null }, "externalId": "4467", "usage": { "6053b728fa96fa0262729a3d": 0, "6053ba62ca3eaf023a54d268": 0 } } ``` -------------------------------- ### Update License Request Example Source: https://www.planhat.com/developers/api/license This example demonstrates how to send a PUT request to update a license using its _id. Ensure you include the Content-Type and Authorization headers. ```curl curl --location -g --request PUT 'https://api.planhat.com/licenses/61006fbf1df7fa77a20d9d0a' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}' \ --data-raw '{ "mrr": 100000 }' ``` -------------------------------- ### Get End User Request Example Source: https://www.planhat.com/developers/api/enduser Example cURL command to retrieve an end user. Replace {{apiToken}} with your API token and the ID with the specific end user's ID. ```bash curl --location -g --request GET 'https://api.planhat.com/endusers/56bccdf554d64d837d01bf42' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}' ``` -------------------------------- ### Example Company Response (JSON) Source: https://www.planhat.com/developers/api/company This is an example of a successful JSON response when retrieving company data by ID. ```json { "_id": "60ff42f8d627295c259999af", "shareable": { "team": { "fields": [] }, "enabled": false, "euIds": [], "sunits": false }, "followers": [], "domains": [ "abcdinc.com", "777.com" ], "collaborators": [], "products": [], "tags": [], "lastPerformedTriggers": [], "status": "prospect", "name": "Company new name", "externalId": "Planhat-81ock9l81wl", "phase": "Renewal", "h": 10, "csmScore": 4, "mr": 0, "nrr30": 0, "custom": { "CompanyRating": 4, "CompanyRichText": "

Test

rich

text

", "CompanyText": "Test" }, "mrrTotal": 0, "nrrTotal": 5555, "mrTotal": 5555, "country": "Latvia", "description": "

Up and coming tech company

", "csmScoreLog": [ { "date": "2021-07-26T23:19:20.871Z", "score": 4 } ], "phaseSince": "2021-07-26T23:19:20.873Z", "createDate": "2021-07-26T23:19:20.873Z", "lastUpdated": "2021-07-26T23:24:47.778Z", "lastTouchByType": {}, "sales": [], "licenses": [], "features": {}, "usage": {}, "documents": [], "links": [], "alerts": [], "updatedAt": "2021-07-26T23:24:47.778Z", "__v": 0 } ``` -------------------------------- ### Example List Invoices Response Source: https://www.planhat.com/developers/api/invoice This is an example of a successful response when fetching multiple invoices. It returns an array of invoice objects, each with selected fields as specified in the request. ```json [ { "_id": "5bec1521b63ce46d84dd7a7d", "invoiceNo": 1, "amountDue": 226029, "amountPaid": 226029, "emails": [], "status": "paid", "cId": "598b753cc488358437483eb9", "cName": "Alphabet Inc.", "invoiceDate": 17752, "dueDate": 18116, "lineItems": [ { "_id": "5bec1521b63ce46d84dd7a7e", "licenseId": "5baa914c6919c0ec85106069", "product": "License Fee", "amount": 244864.75, "dateFrom": 17752, "dateTo": 18116 } ], "__v": 0, "paidDate": 18673, "invoiceCycle": "once", "custom": { "t1": 0, "HScore": 0, "Days in Phase": 0, "Sent": true, "NRR30": 0, "t123": "undefined", "Logins": 0, "Renewal in days": -1, "Activity Count": 0, "Week No": 29.285714285714285 }, "updatedAt": "2021-02-15T15:36:41.372Z", "comments": [], "amountTotal": 244864.75, "lastUpdated": "2021-05-28T11:35:12.265Z" }, { "_id": "5bec958059e144aa751dd7e7", "invoiceNo": 1, "amountDue": 150890, "amountPaid": 0, "emails": [], "status": "paid", "dueDate": 17880, "invoiceDate": 17850, "currency": "USD", "lineItems": [ { "_id": "5bec958059e144aa751dd7e8", "licenseId": "598b765d49c568a81b052acc", "product": "License Fee", "amount": 150890, "dateFrom": 17386, "dateTo": 17746 } ], "cId": "598b762249c568a81b052a75", "cName": "Amazon", "__v": 0, "custom": { "t1": 0, "HScore": 0, "Days in Phase": 0, "Sent": true, "NRR30": 0, "t123": "undefined", "Logins": 0, "Renewal in days": -1, "Activity Count": 0, "Week No": 29.285714285714285 }, "updatedAt": "2020-10-01T13:46:32.781Z", "amountTotal": 150890, "paidDate": 18551, "lastUpdated": "2021-05-28T11:35:12.265Z" } ] ``` -------------------------------- ### Create Task Response Source: https://www.planhat.com/developers/api/task Example JSON response returned after successfully creating a task. ```json '{ "mainType": "task", "noSpecificTime": true, "shared": false, "overdueNotified": false, "activityTags": [], "isArchived": false, "status": "In-progress", "_id": "6102c9748084189dcbf0df60", "ownerId": "58e231b14246fc73139f29e8", "companyId": "61006bc89a3e0b702ed8ea49", "startTime": "2021-07-29T00:00:00.000Z", "repeat": "daily", "action": "New task", "description": "

Call the client.

", "snippet": "Call the client.", "companyName": "Tenet", "endusers": [], "users": [], "checklist": [], "__v": 0, "userEmail": "user@planhat.com", "createdAt": "2022-07-05T09:51:52.818Z", "updatedAt": "2022-07-05T09:51:52.818Z" }' ``` -------------------------------- ### Example Invoice Response Source: https://www.planhat.com/developers/api/invoice This is an example of a successful response when fetching a single invoice. It includes details such as amount due, status, customer information, and line items. ```json { "_id": "5bec1521b63ce46d84dd7a7d", "invoiceNo": 1, "amountDue": 226029, "amountPaid": 226029, "emails": [], "status": "paid", "cId": "598b753cc488358437483eb9", "cName": "Alphabet Inc.", "invoiceDate": 17752, "dueDate": 18116, "lineItems": [ { "_id": "5bec1521b63ce46d84dd7a7e", "licenseId": "5baa914c6919c0ec85106069", "product": "License Fee", "amount": 244864.75, "dateFrom": 17752, "dateTo": 18116 } ], "__v": 0, "paidDate": 18673, "invoiceCycle": "once", "custom": { "t1": 0, "HScore": 0, "Days in Phase": 0, "Sent": true, "NRR30": 0, "t123": "undefined", "Logins": 0, "Renewal in days": -1, "Activity Count": 0, "Week No": 29.285714285714285 }, "updatedAt": "2021-02-15T15:36:41.372Z", "comments": [], "amountTotal": 244864.75, "lastUpdated": "2021-05-28T11:35:12.265Z" } ``` -------------------------------- ### Get Task by ID Example Source: https://www.planhat.com/developers/api/task To retrieve a specific task, include its _id in the request URL. Alternatively, you can use its sourceId with a prefix. ```curl curl --location -g --request GET 'https://api.planhat.com/tasks/5db866ceab7aac67dc3637c8' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}' ``` -------------------------------- ### Create Project - API Response Source: https://www.planhat.com/developers/api/project Example successful response when creating a project. It includes the newly created project's details. ```json { "_id": "6101a50072c0e0884d5e8db1", "companyId": "61006bc89a3e0b702ed8ea49", "startDate": "2021-07-26T04:00:00.000Z", "endDate": "2021-07-31T04:00:00.000Z", "currency": "USD", "mrr": 1000, "name": "New project", "companyName": "Tenet", "__v": 0 } ``` -------------------------------- ### List Licenses Response Source: https://www.planhat.com/developers/api/license Example JSON response body returned when successfully fetching a list of licenses. ```json '[ { "_id": "601188a152181c5640bf429f", "companyId": "6011889f52181c5640bf41bb", "value": 292500 }, { "_id": "598b7911c488358437484797", "value": 280950, "product": "", "companyId": "598b78ef49c568a81b052f49" } ] ' ``` -------------------------------- ### Remove Array Value Example Source: https://www.planhat.com/developers/api/planhat-models Payload example for removing a specific value from a custom field array. ```json { "custom": { "Industry": { "operation": "remove", "data": ["Healthcare"] } } }; ``` -------------------------------- ### List End Users Source: https://www.planhat.com/developers/api/enduser Example request for fetching a list of end users with pagination parameters. ```bash curl --location -g --request GET 'https://api.planhat.com/endusers?limit=2&offset=0' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}' ``` -------------------------------- ### Example License Response Source: https://www.planhat.com/developers/api/license This is a sample JSON response for a license object, showing various properties including IDs, renewal status, dates, and financial information. ```json { "_id": "61006fbf1df7fa77a20d9d0a", "renewalStatus": "ongoing", "issues": [], "autoRenews": false, "noticePeriod": null, "renewalUnit": "month", "noticeUnit": null, "invoicesGenerated": false, "companyId": "61006bc89a3e0b702ed8ea49", "fixedPeriod": true, "fromDate": "2021-07-27T00:00:00.000Z", "toDate": "2022-07-27T00:00:00.000Z", "invoiceCycleInterval": 0, "mrr": 100000, "product": "Large License", "_currency": "USD", "renewalPeriod": 12, "companyName": "Tenet", "toDateIncluded": false, "length": 12, "value": 1200000, "renewalDate": "2022-07-27T00:00:00.000Z", "renewalDaysFromNow": 364, "isOverdue": false, "__v": 0 } ``` -------------------------------- ### Example Company Response with Sales Data (JSON) Source: https://www.planhat.com/developers/api/company This JSON response illustrates a company's data, including detailed sales information. ```json { "_id": "61006bc89a3e0b702ed8ea49", "shareable": { "team": { "fields": [] }, "enabled": false, "euIds": [], "sunits": false }, "followers": [], "domains": [ "stjohns.k12.fl.us" ], "collaborators": [], "products": [], "tags": [], "lastPerformedTriggers": [], "owner": "60ccb1c5965cc9e0f3848075", "custom": { "Days in Phase": 0, "Days until renewal": 364, "# Overdue Invoices": 1 }, "name": "Tenet", "phase": "Onboarding", "status": "prospect", "phaseSince": "2021-07-27T20:25:44.430Z", "sunits": { "5b49b52a1ac87812818de26d": { "status": "on", "default": true } }, "createDate": "2021-07-27T20:25:44.430Z", "lastUpdated": "2021-08-11T16:12:41.657Z", "lastTouchByType": { "note": "2021-08-22T16:15:50.772Z" }, "sales": [ { "_id": "61016c80675c1b871faf2d4f", "value": 10000, "product": "Advanced Onboarding", "_currency": { "_id": "USD", "rate": 1, "symbol": "$", "isBase": true, "__v": 0, "overrides": {} }, "salesDate": "2021-07-28T00:00:00.000Z", "companyId": "61006bc89a3e0b702ed8ea49", "companyName": "Tenet", "__v": 0, "externalId": "sale-1234" } ], "licenses": [], "features": {}, "usage": {}, "csmScoreLog": [], "documents": [], "links": [], "alerts": [], "updatedAt": "2021-08-09T16:54:17.298Z", "__v": 0, "h": 3, "autoRenews": false, "customerTo": "2022-07-27T00:00:00.000Z", "headId": "6100772b919fd37905810fc6", "lastRenewal": "2021-07-27T00:00:00.000Z", "mr": 15000, "mrTotal": 15000, "mrr": 0, "mrrTotal": 0, "nrr30": 15000, "nrrTotal": 15000, "renewalDate": "2022-07-27T00:00:00.000Z", "renewalDaysFromNow": 363, "renewalMrr": 0, "nps": 8.5, "sourceId": "119", "hDiff": -2, "hDiffDate": "2021-08-04T20:21:24.117Z", "hProfile": "5f87f152f5fc6f26057ac901", "orgCount": 0, "orgPathCount": 0 } ``` -------------------------------- ### Example Companies List Response Source: https://www.planhat.com/developers/api/company This is a sample JSON response when successfully fetching a list of companies. It includes details for each company such as ID, domains, tags, phase, status, and custom fields. ```json [ { "_id": "61002458cb43626b3a7fb186", "shareable": { "team": { "fields": [] }, "enabled": false, "euIds": [], "sunits": false }, "domains": [ "https://google.lv", "https://draugiem.lv" ], "tags": [ "test", "test2" ], "owner": null, "coOwner": null, "externalId": "23z887cpocs", "sourceId": "23z887cpocs", "phase": "Onboarding", "status": "prospect", "h": 3, "csmScore": 3, "mr": 2, "nrr30": 3, "mrrTotal": 4, "mrTotal": 5, "name": "Altus", "phaseSince": "2021-07-27T15:20:56.552Z", "features": {}, "usage": {}, "alerts": [], "custom": { "Days in Phase": 0, "MRR_PLUS_TWOkwu7xl5ziq": 6 } }, { "_id": "6100186428706a6646358453", "shareable": { "team": { "fields": [] }, "enabled": false, "euIds": [], "sunits": false }, "domains": [ "https://google.lv", "https://draugiem.lv" ], "tags": [ "test", "test2" ], "owner": null, "coOwner": null, "externalId": "3mfo0a71pa7", "sourceId": "3mfo0a71pa7", "phase": "Onboarding", "status": "prospect", "h": 3, "csmScore": 3, "mr": 2, "nrr30": 3, "mrrTotal": 4, "mrTotal": 5, "name": "Beta", "phaseSince": "2021-07-27T14:29:56.119Z", "features": {}, "usage": {}, "alerts": [], "custom": { "Days in Phase": 0, "MRR_PLUS_TWOkwu7xl5ziq": 6 } } ] ``` -------------------------------- ### Example Task Response Source: https://www.planhat.com/developers/api/task A sample JSON array representing a list of task and event objects returned by the API. ```json '[ { "_id": "5da4bbec7b1616495b53a35b", "mainType": "task", "noSpecificTime": true, "shared": false, "overdueNotified": false, "activityTags": [], "isArchived": false, "ownerId": "5524481f516d59216a6d2b80", "companyId": "56bccdf554d64d837d01be96", "companyName": "Daimler Group", "createdAt": "2022-07-05T09:51:52.818Z", "updatedAt": "2022-07-05T09:51:52.818Z", "startTime": null, "action": "Send them gift card", "ownerName": "Sarah", "endusers": [], "users": [], "children": [], "comments": [], "checklist": [], "__v": 0, "repeat": null, "custom": { "HScore": 0 } }, { "_id": "5db866ceab7aac67dc3637c8", "mainType": "task", "noSpecificTime": true, "shared": false, "overdueNotified": false, "activityTags": [], "isArchived": false, "action": "Sub activity", "description": "", "companyId": "56ccc2d39b760ff232295794", "companyName": "Grand Hotels", "ownerId": "54ddc90a3570c76e2cbd08a5", "ownerName": "Niklas", "workflowId": "5db866ceab7aac67dc3637be", "workflowName": "QBR", "workflowTaskId": "5d27408853372f7cd1170407", "checklist": [], "parent": "5db866ceab7aac67dc3637c6", "sortPosition": 5, "snippet": "", "endusers": [], "users": [], "children": [], "comments": [], "__v": 0, "workflowTemplateId": "5a57d7754b5f1d13128a0533", "repeat": null, "custom": { "HScore": 0 }, "workflowStepId": "5db866ceab7aac67dc3637c8" }, { "_id": "5f05cc03da205d2dfb2ad775", "mainType": "event", "noSpecificTime": true, "shared": true, "overdueNotified": false, "activityTags": [], "isArchived": false, "action": "Test", "description": "", "companyId": "56bccdf554d64d837d01be55", "companyName": "Sweco", "ownerId": "564b063a508f068051ee82a5", "ownerName": "Diego", "workflowId": "5f05cc03da205d2dfb2ad773", "workflowName": "Churn Prevention", "workflowTaskId": "5ed7bba1492c366143976d13", "workflowTemplateId": "57fdd14e8be8ceb43f8b1bc6", "checklist": [ { "title": "A" }, { "title": "B" }, { "title": "C" } ], "sortPosition": 1, "snippet": "", "endusers": [], "users": [], "children": [ { "_id": "5f6889608baac92465787bf4" } ], "comments": [], "__v": 0, "custom": { "HScore": 0 }, "workflowStepId": "5f05cc03da205d2dfb2ad775" }, { "_id": "5f317749604a74699f58f669", "mainType": "event", "noSpecificTime": true, "shared": false, "overdueNotified": false, "activityTags": [], "isArchived": false, "status": "In-progress", "companyId": "5942d6dfd4333a2f083011e8", "companyName": "iBM", "workflowId": "5f317728604a74699f58f65f", "workflowName": "Test Playbook", "workflowTemplateId": "5f317715d2b1cc0ebb619beb", "action": "Test Event", "description": "

Book a thing

Was it fun?

", "ownerId": "54ddc90a3570c76e2cbd08a5", "ownerName": "Niklas", "snippet": "Book a thing\n\nWas it fun?", "endusers": [], "users": [], "children": [], "comments": [], "checklist": [], "__v": 0, "custom": { "HScore": 0 }, "workflowStepId": "5f317749604a74699f58f669" } ]' ``` -------------------------------- ### Bulk Upsert Tasks Response Example Source: https://www.planhat.com/developers/api/task This is an example of a successful response when performing a bulk upsert operation for tasks. It indicates the number of created and updated tasks, along with any errors or identifiers. ```json { "created": 3, "createdErrors": [], "insertsKeys": [ { "_id": "62c549dcfde99d59485c3314" }, { "_id": "62c549dcfde99d59485c3315" }, { "_id": "62c549dcfde99d59485c3316" } ], "updated": 0, "updatedErrors": [], "updatesKeys": [], "nonupdates": 0, "modified": [], "upsertedIds": [ "62c549dcfde99d59485c3314", "62c549dcfde99d59485c3315", "62c549dcfde99d59485c3316" ], "permissionErrors": [] } ``` -------------------------------- ### Example Bulk Upsert Asset Response Source: https://www.planhat.com/developers/api/asset This is an example JSON response after a bulk upsert operation, detailing the number of assets created and updated, along with their new IDs and any errors encountered. ```json { "created": 2, "createdErrors": [], "insertsKeys": [ { "_id": "60fde9ad57df5b411cf39be5", "sourceId": "sfc-1234", "externalId": "1234" }, { "_id": "60fde9ad57df5b411cf39be6", "sourceId": "sfc-1235", "externalId": "1235" } ], "updated": 0, "updatedErrors": [], "updatesKeys": [], "nonupdates": 0, "modified": [], "upsertedIds": [ "60fde9ad57df5b411cf39be5", "60fde9ad57df5b411cf39be6" ], "permissionErrors": [] } ``` -------------------------------- ### GET /assets/:id Source: https://www.planhat.com/developers/api/asset Retrieve details of a specific asset. ```APIDOC ## GET /assets/:id ### Description Retrieves a specific asset by its _id. ### Method GET ### Endpoint https://api.planhat.com/assets/:id ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the asset ``` -------------------------------- ### Create a Conversation - Response Source: https://www.planhat.com/developers/api/conversation Example of a successful response when creating a conversation. ```json { "starred": false, "pinned": false, "autoTags": [], "activityTags": [], "emailTemplateIds": [], "isOpen": false, "tags": [], "waitsToBeFiltered": true, "timeBucket": [], "archived": false, "_id": "6102e3b08084189dcbf0e3f0", "users": [ { "id": "58e231b14246fc73139f29e8", "name": "Alex", "isOwner": true } ], "date": "2021-07-29T15:29:34.330Z", "type": "note", "companyId": "61006bc89a3e0b702ed8ea49", "subject": "New conversation", "description": "Little call with the client.", "endusers": [ { "id": "610091916d643a7c418aef42", "name": "Lara Croft" } ], "snippet": "Little call with the client.", "companyName": "Tenet", "createDate": "2021-07-29T17:21:52.347Z", "sender": [], "history": [], "__v": 0, "owner": "60ccb1c5965cc9e0f3848075", "followers": [], "userId": "610015551b990c65d4fb0a4c", "note": "New conversation: Little call with the client.", "nickName": "Test user" } ``` -------------------------------- ### GET /projects Source: https://www.planhat.com/developers/api/project Fetch a list of projects with support for filtering, pagination, sorting, and field selection. ```APIDOC ## GET /projects ### Description Fetch multiple projects with optional filtering, pagination, sorting, and field selection. ### Method GET ### Endpoint https://api.planhat.com/projects ### Parameters #### Query Parameters - **companyId** (string) - Optional - Filter using company id. - **limit** (integer) - Optional - Limit the list length (Default: 100, Max: 2000). - **offset** (integer) - Optional - Start the list on a specific integer index. - **sort** (string) - Optional - Sort based on a specific property. Prefix with '-' for descending order. - **select** (string) - Optional - Select specific properties separated by commas. ### Response #### Success Response (200) - **projects** (array) - List of project objects. #### Response Example [ { "_id": "60228bae4a93f65f056d2412", "companyId": "6022884d40bd001fb4b6e554", "name": "Älvdalen 2" }, { "_id": "60228915f4d2e51f9cc29856", "companyId": "6022884d40bd001fb4b6e554", "name": "URL123" } ] ```