# GHL Invoices API **Endpoints:** 42 **Base URL:** `https://rest.gohighlevel.com/v1` **Version Header(s):** `2021-07-28` --- ## Endpoints - [GET /invoices/](#get--invoices-) — List invoices - [POST /invoices/](#post--invoices-) — Create Invoice - [POST /invoices/estimate](#post--invoices-estimate) — Create New Estimate - [GET /invoices/estimate/list](#get--invoices-estimate-list) — List Estimates - [GET /invoices/estimate/number/generate](#get--invoices-estimate-number-generate) — Generate Estimate Number - [PATCH /invoices/estimate/stats/last-visited-at](#patch--invoices-estimate-stats-last-visited-at) — Update estimate last visited at - [GET /invoices/estimate/template](#get--invoices-estimate-template) — List Estimate Templates - [POST /invoices/estimate/template](#post--invoices-estimate-template) — Create Estimate Template - [GET /invoices/estimate/template/preview](#get--invoices-estimate-template-preview) — Preview Estimate Template - [DELETE /invoices/estimate/template/{templateId}](#delete--invoices-estimate-template-templateId) — Delete Estimate Template - [PUT /invoices/estimate/template/{templateId}](#put--invoices-estimate-template-templateId) — Update Estimate Template - [DELETE /invoices/estimate/{estimateId}](#delete--invoices-estimate-estimateId) — Delete Estimate - [PUT /invoices/estimate/{estimateId}](#put--invoices-estimate-estimateId) — Update Estimate - [POST /invoices/estimate/{estimateId}/invoice](#post--invoices-estimate-estimateId-invoice) — Create Invoice from Estimate - [POST /invoices/estimate/{estimateId}/send](#post--invoices-estimate-estimateId-send) — Send Estimate - [GET /invoices/generate-invoice-number](#get--invoices-generate-invoice-number) — Generate Invoice Number - [GET /invoices/schedule](#get--invoices-schedule) — List schedules - [POST /invoices/schedule](#post--invoices-schedule) — Create Invoice Schedule - [DELETE /invoices/schedule/{scheduleId}](#delete--invoices-schedule-scheduleId) — Delete schedule - [GET /invoices/schedule/{scheduleId}](#get--invoices-schedule-scheduleId) — Get an schedule - [PUT /invoices/schedule/{scheduleId}](#put--invoices-schedule-scheduleId) — Update schedule - [POST /invoices/schedule/{scheduleId}/auto-payment](#post--invoices-schedule-scheduleId-auto-payment) — Manage Auto payment for an schedule invoice - [POST /invoices/schedule/{scheduleId}/cancel](#post--invoices-schedule-scheduleId-cancel) — Cancel an scheduled invoice - [POST /invoices/schedule/{scheduleId}/schedule](#post--invoices-schedule-scheduleId-schedule) — Schedule an schedule invoice - [POST /invoices/schedule/{scheduleId}/updateAndSchedule](#post--invoices-schedule-scheduleId-updateAndSchedule) — Update scheduled recurring invoice - [GET /invoices/settings](#get--invoices-settings) — Get Invoice Settings - [PATCH /invoices/stats/last-visited-at](#patch--invoices-stats-last-visited-at) — Update invoice last visited at - [GET /invoices/template](#get--invoices-template) — List templates - [POST /invoices/template](#post--invoices-template) — Create template - [DELETE /invoices/template/{templateId}](#delete--invoices-template-templateId) — Delete template - [GET /invoices/template/{templateId}](#get--invoices-template-templateId) — Get an template - [PUT /invoices/template/{templateId}](#put--invoices-template-templateId) — Update template - [PATCH /invoices/template/{templateId}/late-fees-configuration](#patch--invoices-template-templateId-late-fees-configuration) — Update template late fees configuration - [PATCH /invoices/template/{templateId}/payment-methods-configuration](#patch--invoices-template-templateId-payment-methods-configuration) — Update template late fees configuration - [POST /invoices/text2pay](#post--invoices-text2pay) — Create & Send - [DELETE /invoices/{invoiceId}](#delete--invoices-invoiceId) — Delete invoice - [GET /invoices/{invoiceId}](#get--invoices-invoiceId) — Get invoice - [PUT /invoices/{invoiceId}](#put--invoices-invoiceId) — Update invoice - [PATCH /invoices/{invoiceId}/late-fees-configuration](#patch--invoices-invoiceId-late-fees-configuration) — Update invoice late fees configuration - [POST /invoices/{invoiceId}/record-payment](#post--invoices-invoiceId-record-payment) — Record a manual payment for an invoice - [POST /invoices/{invoiceId}/send](#post--invoices-invoiceId-send) — Send invoice - [POST /invoices/{invoiceId}/void](#post--invoices-invoiceId-void) — Void invoice --- ## GET /invoices/ **Summary:** List invoices API to get list of invoices **Version Header:** `2021-07-28` **Operation ID:** `list-invoices` **Tags:** Invoice ### cURL ```bash curl -X GET 'https://rest.gohighlevel.com/v1/invoices/?altId=6578278e879ad2646715ba9c&altType=location&status=VALUE&startAt=2023-01-01&endAt=2023-01-01&search=Alex&paymentMode=live&contactId=AmuzcoPBpgKeccNsFlib&limit=10&offset=10&sortField=issueDate&sortOrder=descend' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('GET', '/v1/invoices/?altId=6578278e879ad2646715ba9c&altType=location&status=VALUE&startAt=2023-01-01&endAt=2023-01-01&search=Alex&paymentMode=live&contactId=AmuzcoPBpgKeccNsFlib&limit=10&offset=10&sortField=issueDate&sortOrder=descend', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - GET invoices", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "GET", "url": "https://rest.gohighlevel.com/v1/invoices/", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "6578278e879ad2646715ba9c" }, { "name": "altType", "value": "location" }, { "name": "status", "value": "VALUE" }, { "name": "startAt", "value": "2023-01-01" }, { "name": "endAt", "value": "2023-01-01" }, { "name": "search", "value": "Alex" }, { "name": "paymentMode", "value": "live" }, { "name": "contactId", "value": "AmuzcoPBpgKeccNsFlib" }, { "name": "limit", "value": 10 }, { "name": "offset", "value": 10 }, { "name": "sortField", "value": "issueDate" }, { "name": "sortOrder", "value": "descend" } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `altId` | Query | `string` | ✅ | location Id / company Id based on altType [example: `6578278e879ad2646715ba9c`] | | `altType` | Query | `string` | ✅ | Alt Type (values: location) [example: `location`] | | `status` | Query | `string` | — | status to be filtered | | `startAt` | Query | `string` | — | startAt in YYYY-MM-DD format [example: `2023-01-01`] | | `endAt` | Query | `string` | — | endAt in YYYY-MM-DD format [example: `2023-01-01`] | | `search` | Query | `string` | — | To search for an invoice by id / name / email / phoneNo [example: `Alex`] | | `paymentMode` | Query | `string` | — | payment mode (values: default, live, test) [example: `live`] | | `contactId` | Query | `string` | — | Contact ID for the invoice [example: `AmuzcoPBpgKeccNsFlib`] | | `limit` | Query | `string` | ✅ | Limit the number of items to return [example: `10`] | | `offset` | Query | `string` | ✅ | Number of items to skip [example: `10`] | | `sortField` | Query | `string` | — | The field on which sorting should be applied (values: issueDate) [example: `issueDate`] | | `sortOrder` | Query | `string` | — | The order of sort which should be applied for the sortField (values: ascend, descend) [example: `... | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **invoices** (array of GetInvoiceResponseDto) (required)
- **total** (number) (required) (e.g. `100`): Total number of invoices | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/ **Summary:** Create Invoice API to create an invoice **Version Header:** `2021-07-28` **Operation ID:** `create-invoice` **Tags:** Invoice ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/invoices/', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST invoices", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type - **name** (string) (required) (e.g. `New Invoice`): Invoice Name - **businessDetails** (BusinessDetailsDto) (required) - **currency** (string) (required) (e.g. `USD`): Currency code - **items** (array of InvoiceItemDto) (required): An array of items for the invoice. - **discount** (DiscountDto) (required) - **termsNotes** (string) (e.g. `

This is a default terms.

`): Terms notes, Also supports HTML markups - **title** (string) (e.g. `INVOICE`): Title for the invoice - **contactDetails** (string) (required): Contact information to send the invoice to - **invoiceNumber** (string) (e.g. `1001`): Invoice Number - **issueDate** (string) (required) (e.g. `2023-01-01`): Issue date in YYYY-MM-DD format - **dueDate** (string) (e.g. `2023-01-14`): Due date in YYYY-MM-DD format - **sentTo** (SentToDto) (required) - **liveMode** (boolean) (required) - **automaticTaxesEnabled** (boolean) (e.g. `True`): Automatic taxes enabled for the Invoice - **paymentSchedule** (string): split invoice into payment schedule summing up to full invoice amount - **lateFeesConfiguration** (string): late fees configuration - **tipsConfiguration** (string): tips configuration for the invoice - **invoiceNumberPrefix** (string) (e.g. `INV-`): prefix for invoice number - **paymentMethods** (string): Payment Methods for Invoices - **attachments** (array of AttachmentsDto): attachments for the invoice - **miscellaneousCharges** (string): miscellaneous charges for the invoice ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Invoice Id
- **status** (string) (required) (e.g. `draft`): Invoice Status
-... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/estimate **Summary:** Create New Estimate Create a new estimate with the provided details **Version Header:** `2021-07-28` **Operation ID:** `create-new-estimate` **Tags:** Estimate ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/estimate' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/invoices/estimate', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST estimate", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/estimate", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Location Id or Agency Id - **altType** (string) (required) - **name** (string) (required) (e.g. `Home Service Estimate`): Estimate Name - **businessDetails** (BusinessDetailsDto) (required) - **currency** (string) (required) (e.g. `USD`): Currency code - **items** (array of EstimateLineItemDto) (required): An array of items for the estimate. - **liveMode** (boolean) (e.g. `True`): livemode for estimate - **discount** (DiscountDto) (required) - **termsNotes** (string) (e.g. `

This is a default terms.

`): Terms notes, Also supports HTML markups - **title** (string) (e.g. `ESTIMATE`): Title for the estimate - **contactDetails** (string) (required): Contact information to send the estimate to - **estimateNumber** (number) (e.g. `1001`): Estimate Number, if not specified will take in the next valid estimate number - **issueDate** (string) (e.g. `2024-08-07`): issue date estimate - **expiryDate** (string) (e.g. `2024-08-10`): expiry date estimate - **sentTo** (string): Email and sent to details for the estimate - **automaticTaxesEnabled** (boolean) (e.g. `True`): Automatic taxes enabled for the Estimate - **meta** (object) (e.g. `{'key': 'value'}`): Meta data for the estimate - **sendEstimateDetails** (string): When sending estimate directly while saving - **frequencySettings** (string) (required): frequency settings for the estimate - **estimateNumberPrefix** (string) (e.g. `EST-`): Prefix for the estimate number - **userId** (string) (e.g. `6578278e879ad2646715ba9c`): User Id - **attachments** (array of AttachmentsDto): attachments for the invoice - **autoInvoice** (string) (e.g. `{'enabled': True, 'directPayments': True}`): Auto invoice for the estimate - **miscellaneousCharges** (string): miscellaneous charges for the estimate - **paymentScheduleConfig** (string): Payment Schedule Config for the estimate ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `201` | Created | - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Location Id or Agency Id
- **altType** (string) (required)
- **_id** (stri... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## GET /invoices/estimate/list **Summary:** List Estimates Get a paginated list of estimates **Version Header:** `2021-07-28` **Operation ID:** `list-estimates` **Tags:** Estimate ### cURL ```bash curl -X GET 'https://rest.gohighlevel.com/v1/invoices/estimate/list?altId=6578278e879ad2646715ba9c&altType=location&startAt=2023-01-01&endAt=2023-01-01&search=Home services estimate&status=sent&contactId=AmuzcoPBpgKeccNsFlib&limit=10&offset=10' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('GET', '/v1/invoices/estimate/list?altId=6578278e879ad2646715ba9c&altType=VALUE&startAt=2023-01-01&endAt=2023-01-01&search=Home services estimate&status=sent&contactId=AmuzcoPBpgKeccNsFlib&limit=10&offset=10', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - GET list", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "GET", "url": "https://rest.gohighlevel.com/v1/invoices/estimate/list", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "6578278e879ad2646715ba9c" }, { "name": "altType", "value": "VALUE" }, { "name": "startAt", "value": "2023-01-01" }, { "name": "endAt", "value": "2023-01-01" }, { "name": "search", "value": "Home services estimate" }, { "name": "status", "value": "sent" }, { "name": "contactId", "value": "AmuzcoPBpgKeccNsFlib" }, { "name": "limit", "value": 10 }, { "name": "offset", "value": 10 } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `altId` | Query | `string` | ✅ | Location Id or Agency Id [example: `6578278e879ad2646715ba9c`] | | `altType` | Query | `string` | ✅ | (values: location) | | `startAt` | Query | `string` | — | startAt in YYYY-MM-DD format [example: `2023-01-01`] | | `endAt` | Query | `string` | — | endAt in YYYY-MM-DD format [example: `2023-01-01`] | | `search` | Query | `string` | — | search text for estimates name [example: `Home services estimate`] | | `status` | Query | `string` | — | estimate status (values: all, draft, sent, accepted, declined, invoiced, viewed) [example: `sent`] | | `contactId` | Query | `string` | — | Contact ID for the estimate [example: `AmuzcoPBpgKeccNsFlib`] | | `limit` | Query | `string` | ✅ | Limit the number of items to return [example: `10`] | | `offset` | Query | `string` | ✅ | Number of items to skip [example: `10`] | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **estimates** (array) (required): List of estimates
- **total** (number) (required): Total number of estimates
- **traceId** (string) (requ... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## GET /invoices/estimate/number/generate **Summary:** Generate Estimate Number Get the next estimate number for the given location **Version Header:** `2021-07-28` **Operation ID:** `generate-estimate-number` **Tags:** Estimate ### cURL ```bash curl -X GET 'https://rest.gohighlevel.com/v1/invoices/estimate/number/generate?altId=6578278e879ad2646715ba9c&altType=location' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('GET', '/v1/invoices/estimate/number/generate?altId=6578278e879ad2646715ba9c&altType=VALUE', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - GET generate", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "GET", "url": "https://rest.gohighlevel.com/v1/invoices/estimate/number/generate", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "6578278e879ad2646715ba9c" }, { "name": "altType", "value": "VALUE" } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `altId` | Query | `string` | ✅ | Location Id or Agency Id [example: `6578278e879ad2646715ba9c`] | | `altType` | Query | `string` | ✅ | (values: location) | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **estimateNumber** (number) (required)
- **traceId** (string) (required) | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## PATCH /invoices/estimate/stats/last-visited-at **Summary:** Update estimate last visited at API to update estimate last visited at by estimate id **Version Header:** `2021-07-28` **Operation ID:** `update-estimate-last-visited-at` **Tags:** Estimate ### cURL ```bash curl -X PATCH 'https://rest.gohighlevel.com/v1/invoices/estimate/stats/last-visited-at' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('PATCH', '/v1/invoices/estimate/stats/last-visited-at', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - PATCH last-visited-at", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "PATCH", "url": "https://rest.gohighlevel.com/v1/invoices/estimate/stats/last-visited-at", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Body Schema - **estimateId** (string) (required) (e.g. `5f9d6d8b1b2d2c001f2d9e4b`): Estimate Id ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | | — | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## GET /invoices/estimate/template **Summary:** List Estimate Templates Get a list of estimate templates or a specific template by ID **Version Header:** `2021-07-28` **Operation ID:** `list-estimate-templates` **Tags:** Estimate ### cURL ```bash curl -X GET 'https://rest.gohighlevel.com/v1/invoices/estimate/template?altId=6578278e879ad2646715ba9c&altType=location&search=Alex&limit=10&offset=10' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('GET', '/v1/invoices/estimate/template?altId=6578278e879ad2646715ba9c&altType=VALUE&search=Alex&limit=10&offset=10', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - GET template", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "GET", "url": "https://rest.gohighlevel.com/v1/invoices/estimate/template", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "6578278e879ad2646715ba9c" }, { "name": "altType", "value": "VALUE" }, { "name": "search", "value": "Alex" }, { "name": "limit", "value": 10 }, { "name": "offset", "value": 10 } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `altId` | Query | `string` | ✅ | Location Id or Agency Id [example: `6578278e879ad2646715ba9c`] | | `altType` | Query | `string` | ✅ | (values: location) | | `search` | Query | `string` | — | To search for an estimate template by id / name [example: `Alex`] | | `limit` | Query | `string` | ✅ | Limit the number of items to return [example: `10`] | | `offset` | Query | `string` | ✅ | Number of items to skip [example: `10`] | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **data** (array) (required): List of estimate templates
- **totalCount** (number) (required): Total number of estimate templates available
... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/estimate/template **Summary:** Create Estimate Template Create a new estimate template **Version Header:** `2021-07-28` **Operation ID:** `create-estimate-template` **Tags:** Estimate ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/estimate/template' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/invoices/estimate/template', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST template", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/estimate/template", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Location Id or Agency Id - **altType** (string) (required) - **name** (string) (required) (e.g. `Home Service Estimate Template`): Estimate Name - **businessDetails** (BusinessDetailsDto) (required) - **currency** (string) (required) (e.g. `USD`): Currency code - **items** (array) (required): An array of items for the estimate. - **liveMode** (boolean) (e.g. `True`): livemode for estimate - **discount** (DiscountDto) (required) - **termsNotes** (string) (e.g. `

This is a default terms.

`): Terms notes, Also supports HTML markups - **title** (string) (e.g. `ESTIMATE`): Title for the estimate - **automaticTaxesEnabled** (boolean) (e.g. `True`): Automatic taxes enabled for the Estimate - **meta** (object) (e.g. `{'key': 'value'}`): Meta data for the estimate - **sendEstimateDetails** (string): When sending estimate directly while saving - **estimateNumberPrefix** (string) (e.g. `EST-`): Prefix for the estimate number - **attachments** (array of AttachmentsDto): attachments for the invoice - **miscellaneousCharges** (string): miscellaneous charges for the estimate ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `201` | Successfully created | - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Location Id or Agency Id
- **altType** (string) (required)
- **_id** (stri... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## GET /invoices/estimate/template/preview **Summary:** Preview Estimate Template Get a preview of an estimate template **Version Header:** `2021-07-28` **Operation ID:** `preview-estimate-template` **Tags:** Estimate ### cURL ```bash curl -X GET 'https://rest.gohighlevel.com/v1/invoices/estimate/template/preview?altId=6578278e879ad2646715ba9c&altType=location&templateId=5f9d6d8b1b2d2c001f2d9e4b' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('GET', '/v1/invoices/estimate/template/preview?altId=6578278e879ad2646715ba9c&altType=VALUE&templateId=5f9d6d8b1b2d2c001f2d9e4b', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - GET preview", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "GET", "url": "https://rest.gohighlevel.com/v1/invoices/estimate/template/preview", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "6578278e879ad2646715ba9c" }, { "name": "altType", "value": "VALUE" }, { "name": "templateId", "value": "5f9d6d8b1b2d2c001f2d9e4b" } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `altId` | Query | `string` | ✅ | Location Id or Agency Id [example: `6578278e879ad2646715ba9c`] | | `altType` | Query | `string` | ✅ | (values: location) | | `templateId` | Query | `string` | ✅ | Template Id [example: `5f9d6d8b1b2d2c001f2d9e4b`] | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Location Id or Agency Id
- **altType** (string) (required)
- **_id** (stri... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## DELETE /invoices/estimate/template/{templateId} **Summary:** Delete Estimate Template Delete an existing estimate template **Version Header:** `2021-07-28` **Operation ID:** `delete-estimate-template` **Tags:** Estimate ### cURL ```bash curl -X DELETE 'https://rest.gohighlevel.com/v1/invoices/estimate/template/5f9d6d8b1b2d2c001f2d9e4b' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('DELETE', '/v1/invoices/estimate/template/5f9d6d8b1b2d2c001f2d9e4b', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - DELETE 5f9d6d8b1b2d2c001f2d9e4b", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "DELETE", "url": "https://rest.gohighlevel.com/v1/invoices/estimate/template/5f9d6d8b1b2d2c001f2d9e4b", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `templateId` | Path | `string` | ✅ | Template Id [example: `5f9d6d8b1b2d2c001f2d9e4b`] | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successfully deleted | - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Location Id or Agency Id
- **altType** (string) (required)
- **_id** (stri... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## PUT /invoices/estimate/template/{templateId} **Summary:** Update Estimate Template Update an existing estimate template **Version Header:** `2021-07-28` **Operation ID:** `update-estimate-template` **Tags:** Estimate ### cURL ```bash curl -X PUT 'https://rest.gohighlevel.com/v1/invoices/estimate/template/5f9d6d8b1b2d2c001f2d9e4b' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('PUT', '/v1/invoices/estimate/template/5f9d6d8b1b2d2c001f2d9e4b', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - PUT 5f9d6d8b1b2d2c001f2d9e4b", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "PUT", "url": "https://rest.gohighlevel.com/v1/invoices/estimate/template/5f9d6d8b1b2d2c001f2d9e4b", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `templateId` | Path | `string` | ✅ | Template Id [example: `5f9d6d8b1b2d2c001f2d9e4b`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Location Id or Agency Id - **altType** (string) (required) - **name** (string) (required) (e.g. `Home Service Estimate Template`): Estimate Name - **businessDetails** (BusinessDetailsDto) (required) - **currency** (string) (required) (e.g. `USD`): Currency code - **items** (array) (required): An array of items for the estimate. - **liveMode** (boolean) (e.g. `True`): livemode for estimate - **discount** (DiscountDto) (required) - **termsNotes** (string) (e.g. `

This is a default terms.

`): Terms notes, Also supports HTML markups - **title** (string) (e.g. `ESTIMATE`): Title for the estimate - **automaticTaxesEnabled** (boolean) (e.g. `True`): Automatic taxes enabled for the Estimate - **meta** (object) (e.g. `{'key': 'value'}`): Meta data for the estimate - **sendEstimateDetails** (string): When sending estimate directly while saving - **estimateNumberPrefix** (string) (e.g. `EST-`): Prefix for the estimate number - **attachments** (array of AttachmentsDto): attachments for the invoice - **miscellaneousCharges** (string): miscellaneous charges for the estimate ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successfully updated | - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Location Id or Agency Id
- **altType** (string) (required)
- **_id** (stri... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## DELETE /invoices/estimate/{estimateId} **Summary:** Delete Estimate Delete an existing estimate **Version Header:** `2021-07-28` **Operation ID:** `delete-estimate` **Tags:** Estimate ### cURL ```bash curl -X DELETE 'https://rest.gohighlevel.com/v1/invoices/estimate/5f9d6d8b1b2d2c001f2d9e4b' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('DELETE', '/v1/invoices/estimate/5f9d6d8b1b2d2c001f2d9e4b', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - DELETE 5f9d6d8b1b2d2c001f2d9e4b", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "DELETE", "url": "https://rest.gohighlevel.com/v1/invoices/estimate/5f9d6d8b1b2d2c001f2d9e4b", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `estimateId` | Path | `string` | ✅ | Estimate Id [example: `5f9d6d8b1b2d2c001f2d9e4b`] | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successfully Deleted | - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Location Id or Agency Id
- **altType** (string) (required)
- **_id** (stri... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## PUT /invoices/estimate/{estimateId} **Summary:** Update Estimate Update an existing estimate with new details **Version Header:** `2021-07-28` **Operation ID:** `update-estimate` **Tags:** Estimate ### cURL ```bash curl -X PUT 'https://rest.gohighlevel.com/v1/invoices/estimate/5f9d6d8b1b2d2c001f2d9e4b' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('PUT', '/v1/invoices/estimate/5f9d6d8b1b2d2c001f2d9e4b', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - PUT 5f9d6d8b1b2d2c001f2d9e4b", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "PUT", "url": "https://rest.gohighlevel.com/v1/invoices/estimate/5f9d6d8b1b2d2c001f2d9e4b", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `estimateId` | Path | `string` | ✅ | Estimate Id [example: `5f9d6d8b1b2d2c001f2d9e4b`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Location Id or Agency Id - **altType** (string) (required) - **name** (string) (required) (e.g. `Home Service Estimate`): Estimate Name - **businessDetails** (BusinessDetailsDto) (required) - **currency** (string) (required) (e.g. `USD`): Currency code - **items** (array of EstimateLineItemDto) (required): An array of items for the estimate. - **liveMode** (boolean) (e.g. `True`): livemode for estimate - **discount** (DiscountDto) (required) - **termsNotes** (string) (e.g. `

This is a default terms.

`): Terms notes, Also supports HTML markups - **title** (string) (e.g. `ESTIMATE`): Title for the estimate - **contactDetails** (string) (required): Contact information to send the estimate to - **estimateNumber** (number) (e.g. `1001`): Estimate Number, if not specified will take in the next valid estimate number - **issueDate** (string) (e.g. `2024-08-07`): issue date estimate - **expiryDate** (string) (e.g. `2024-08-10`): expiry date estimate - **sentTo** (string): Email and sent to details for the estimate - **automaticTaxesEnabled** (boolean) (e.g. `True`): Automatic taxes enabled for the Estimate - **meta** (object) (e.g. `{'key': 'value'}`): Meta data for the estimate - **sendEstimateDetails** (string): When sending estimate directly while saving - **frequencySettings** (string) (required): frequency settings for the estimate - **estimateNumberPrefix** (string) (e.g. `EST-`): Prefix for the estimate number - **userId** (string) (e.g. `6578278e879ad2646715ba9c`): User Id - **attachments** (array of AttachmentsDto): attachments for the invoice - **autoInvoice** (string) (e.g. `{'enabled': True, 'directPayments': True}`): Auto invoice for the estimate - **miscellaneousCharges** (string): miscellaneous charges for the estimate - **paymentScheduleConfig** (string): Payment Schedule Config for the estimate - **estimateStatus** (string) (e.g. `sent`): Estimate Status ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successfully updated | - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Location Id or Agency Id
- **altType** (string) (required)
- **_id** (stri... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/estimate/{estimateId}/invoice **Summary:** Create Invoice from Estimate Create a new invoice from an existing estimate **Version Header:** `2021-07-28` **Operation ID:** `create-invoice-from-estimate` **Tags:** Estimate ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/estimate/5f9d6d8b1b2d2c001f2d9e4b/invoice' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/invoices/estimate/5f9d6d8b1b2d2c001f2d9e4b/invoice', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST invoice", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/estimate/5f9d6d8b1b2d2c001f2d9e4b/invoice", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `estimateId` | Path | `string` | ✅ | Estimate Id [example: `5f9d6d8b1b2d2c001f2d9e4b`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Location Id or Agency Id - **altType** (string) (required) - **markAsInvoiced** (boolean) (required) (e.g. `True`): Mark Estimate as Invoiced - **version** (string) (e.g. `v2`): Version of the update request ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successfully Created | - **estimate** (string) (required): Estimate details
- **invoice** (string) (required): Invoice details | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/estimate/{estimateId}/send **Summary:** Send Estimate API to send estimate by estimate id **Version Header:** `2021-07-28` **Operation ID:** `send-estimate` **Tags:** Estimate ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/estimate/5f9d6d8b1b2d2c001f2d9e4b/send' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/invoices/estimate/5f9d6d8b1b2d2c001f2d9e4b/send', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST send", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/estimate/5f9d6d8b1b2d2c001f2d9e4b/send", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `estimateId` | Path | `string` | ✅ | Estimate Id [example: `5f9d6d8b1b2d2c001f2d9e4b`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Location Id or Agency Id - **altType** (string) (required) - **action** (string) (required) - **liveMode** (boolean) (required) (e.g. `True`): livemode for estimate - **userId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Please ensure that the UserId corresponds to an authorized personnel, either by an employee ID or agency ID, to access this location. This account will serve as the primary channel for all future communications and updates. - **sentFrom** (string): sender details for invoice, valid only if invoice is not sent manually - **estimateName** (string) (e.g. `Estimate`): estimate name ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `201` | Created | - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Location Id or Agency Id
- **altType** (string) (required)
- **_id** (stri... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## GET /invoices/generate-invoice-number **Summary:** Generate Invoice Number Get the next invoice number for the given location **Version Header:** `2021-07-28` **Operation ID:** `generate-invoice-number` **Tags:** Invoice ### cURL ```bash curl -X GET 'https://rest.gohighlevel.com/v1/invoices/generate-invoice-number?altId=VALUE&altType=location' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('GET', '/v1/invoices/generate-invoice-number?altId=VALUE&altType=VALUE', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - GET generate-invoice-number", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "GET", "url": "https://rest.gohighlevel.com/v1/invoices/generate-invoice-number", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "VALUE" }, { "name": "altType", "value": "VALUE" } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `altId` | Query | `string` | ✅ | Location Id | | `altType` | Query | `string` | ✅ | (values: location) | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **invoiceNumber** (number) (e.g. `19`): Invoice Number | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## GET /invoices/schedule **Summary:** List schedules API to get list of schedules **Version Header:** `2021-07-28` **Operation ID:** `list-invoice-schedules` **Tags:** Schedule ### cURL ```bash curl -X GET 'https://rest.gohighlevel.com/v1/invoices/schedule?altId=6578278e879ad2646715ba9c&altType=location&status=VALUE&startAt=2023-01-01&endAt=2023-01-01&search=Alex&paymentMode=live&limit=10&offset=10' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('GET', '/v1/invoices/schedule?altId=6578278e879ad2646715ba9c&altType=location&status=VALUE&startAt=2023-01-01&endAt=2023-01-01&search=Alex&paymentMode=live&limit=10&offset=10', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - GET schedule", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "GET", "url": "https://rest.gohighlevel.com/v1/invoices/schedule", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "6578278e879ad2646715ba9c" }, { "name": "altType", "value": "location" }, { "name": "status", "value": "VALUE" }, { "name": "startAt", "value": "2023-01-01" }, { "name": "endAt", "value": "2023-01-01" }, { "name": "search", "value": "Alex" }, { "name": "paymentMode", "value": "live" }, { "name": "limit", "value": 10 }, { "name": "offset", "value": 10 } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `altId` | Query | `string` | ✅ | location Id / company Id based on altType [example: `6578278e879ad2646715ba9c`] | | `altType` | Query | `string` | ✅ | Alt Type (values: location) [example: `location`] | | `status` | Query | `string` | — | status to be filtered | | `startAt` | Query | `string` | — | startAt in YYYY-MM-DD format [example: `2023-01-01`] | | `endAt` | Query | `string` | — | endAt in YYYY-MM-DD format [example: `2023-01-01`] | | `search` | Query | `string` | — | To search for an invoice by id / name / email / phoneNo [example: `Alex`] | | `paymentMode` | Query | `string` | — | payment mode (values: default, live, test) [example: `live`] | | `limit` | Query | `string` | ✅ | Limit the number of items to return [example: `10`] | | `offset` | Query | `string` | ✅ | Number of items to skip [example: `10`] | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **schedules** (array of GetScheduleResponseDto) (required)
- **total** (number) (required) (e.g. `100`): Total number of Schedules | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/schedule **Summary:** Create Invoice Schedule API to create an invoice Schedule **Version Header:** `2021-07-28` **Operation ID:** `create-invoice-schedule` **Tags:** Schedule ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/schedule' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/invoices/schedule', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST schedule", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/schedule", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type - **name** (string) (required) - **contactDetails** (ContactDetailsDto) (required) - **schedule** (ScheduleOptionsDto) (required) - **liveMode** (boolean) (required) - **businessDetails** (BusinessDetailsDto) (required) - **currency** (string) (required) - **items** (array of InvoiceItemDto) (required) - **automaticTaxesEnabled** (boolean) (e.g. `True`): Automatic taxes enabled for the Invoice - **discount** (DiscountDto) (required) - **termsNotes** (string) - **title** (string) - **tipsConfiguration** (string): Configuration for tips on invoices - **lateFeesConfiguration** (string): Late fees configuration for the invoices - **invoiceNumberPrefix** (string) (e.g. `INV-`): prefix for invoice number - **paymentMethods** (string): Payment Methods for Invoices - **attachments** (array of AttachmentsDto): attachments for the invoice - **miscellaneousCharges** (string): miscellaneous charges for the invoice ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Schedule Id
- **status** (object) (required) (e.g. `draft`): Schedule Status
... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## DELETE /invoices/schedule/{scheduleId} **Summary:** Delete schedule API to delete an schedule by schedule id **Version Header:** `2021-07-28` **Operation ID:** `delete-invoice-schedule` **Tags:** Schedule ### cURL ```bash curl -X DELETE 'https://rest.gohighlevel.com/v1/invoices/schedule/6578278e879ad2646715ba9c?altId=6578278e879ad2646715ba9c&altType=location' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('DELETE', '/v1/invoices/schedule/6578278e879ad2646715ba9c?altId=6578278e879ad2646715ba9c&altType=location', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - DELETE 6578278e879ad2646715ba9c", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "DELETE", "url": "https://rest.gohighlevel.com/v1/invoices/schedule/6578278e879ad2646715ba9c", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "6578278e879ad2646715ba9c" }, { "name": "altType", "value": "location" } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `scheduleId` | Path | `string` | ✅ | Schedule Id [example: `6578278e879ad2646715ba9c`] | | `altId` | Query | `string` | ✅ | location Id / company Id based on altType [example: `6578278e879ad2646715ba9c`] | | `altType` | Query | `string` | ✅ | Alt Type (values: location) [example: `location`] | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **success** (boolean) (required) (e.g. `True`): success | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## GET /invoices/schedule/{scheduleId} **Summary:** Get an schedule API to get an schedule by schedule id **Version Header:** `2021-07-28` **Operation ID:** `get-invoice-schedule` **Tags:** Schedule ### cURL ```bash curl -X GET 'https://rest.gohighlevel.com/v1/invoices/schedule/6578278e879ad2646715ba9c?altId=6578278e879ad2646715ba9c&altType=location' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('GET', '/v1/invoices/schedule/6578278e879ad2646715ba9c?altId=6578278e879ad2646715ba9c&altType=location', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - GET 6578278e879ad2646715ba9c", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "GET", "url": "https://rest.gohighlevel.com/v1/invoices/schedule/6578278e879ad2646715ba9c", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "6578278e879ad2646715ba9c" }, { "name": "altType", "value": "location" } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `scheduleId` | Path | `string` | ✅ | Schedule Id [example: `6578278e879ad2646715ba9c`] | | `altId` | Query | `string` | ✅ | location Id / company Id based on altType [example: `6578278e879ad2646715ba9c`] | | `altType` | Query | `string` | ✅ | Alt Type (values: location) [example: `location`] | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Schedule Id
- **status** (object) (required) (e.g. `draft`): Schedule Status
... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## PUT /invoices/schedule/{scheduleId} **Summary:** Update schedule API to update an schedule by schedule id **Version Header:** `2021-07-28` **Operation ID:** `update-invoice-schedule` **Tags:** Schedule ### cURL ```bash curl -X PUT 'https://rest.gohighlevel.com/v1/invoices/schedule/6578278e879ad2646715ba9c' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('PUT', '/v1/invoices/schedule/6578278e879ad2646715ba9c', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - PUT 6578278e879ad2646715ba9c", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "PUT", "url": "https://rest.gohighlevel.com/v1/invoices/schedule/6578278e879ad2646715ba9c", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `scheduleId` | Path | `string` | ✅ | Schedule Id [example: `6578278e879ad2646715ba9c`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type - **name** (string) (required) - **contactDetails** (ContactDetailsDto) (required) - **schedule** (ScheduleOptionsDto) (required) - **liveMode** (boolean) (required) - **businessDetails** (BusinessDetailsDto) (required) - **currency** (string) (required) - **items** (array of InvoiceItemDto) (required) - **discount** (DiscountDto) (required) - **termsNotes** (string) - **title** (string) - **attachments** (array of AttachmentsDto): attachments for the invoice - **miscellaneousCharges** (string): miscellaneous charges for the invoice ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Schedule Id
- **status** (object) (required) (e.g. `draft`): Schedule Status
... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/schedule/{scheduleId}/auto-payment **Summary:** Manage Auto payment for an schedule invoice API to manage auto payment for a schedule **Version Header:** `2021-07-28` **Operation ID:** `auto-payment-invoice-schedule` **Tags:** Schedule ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/schedule/6578278e879ad2646715ba9c/auto-payment' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/invoices/schedule/6578278e879ad2646715ba9c/auto-payment', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST auto-payment", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/schedule/6578278e879ad2646715ba9c/auto-payment", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `scheduleId` | Path | `string` | ✅ | Schedule Id [example: `6578278e879ad2646715ba9c`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type - **id** (string) (required) - **autoPayment** (string) (required): auto-payment configuration ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Schedule Id
- **status** (object) (required) (e.g. `draft`): Schedule Status
... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/schedule/{scheduleId}/cancel **Summary:** Cancel an scheduled invoice API to cancel a scheduled invoice by schedule id **Version Header:** `2021-07-28` **Operation ID:** `cancel-invoice-schedule` **Tags:** Schedule ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/schedule/6578278e879ad2646715ba9c/cancel' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/invoices/schedule/6578278e879ad2646715ba9c/cancel', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST cancel", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/schedule/6578278e879ad2646715ba9c/cancel", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `scheduleId` | Path | `string` | ✅ | Schedule Id [example: `6578278e879ad2646715ba9c`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Schedule Id
- **status** (object) (required) (e.g. `draft`): Schedule Status
... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/schedule/{scheduleId}/schedule **Summary:** Schedule an schedule invoice API to schedule an schedule invoice to start sending to the customer **Version Header:** `2021-07-28` **Operation ID:** `schedule-invoice-schedule` **Tags:** Schedule ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/schedule/6578278e879ad2646715ba9c/schedule' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/invoices/schedule/6578278e879ad2646715ba9c/schedule', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST schedule", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/schedule/6578278e879ad2646715ba9c/schedule", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `scheduleId` | Path | `string` | ✅ | Schedule Id [example: `6578278e879ad2646715ba9c`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type - **liveMode** (boolean) (required) - **autoPayment** (string): auto-payment configuration ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Schedule Id
- **status** (object) (required) (e.g. `draft`): Schedule Status
... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/schedule/{scheduleId}/updateAndSchedule **Summary:** Update scheduled recurring invoice API to update scheduled recurring invoice **Version Header:** `2021-07-28` **Operation ID:** `update-and-schedule-invoice-schedule` **Tags:** Schedule ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/schedule/6578278e879ad2646715ba9c/updateAndSchedule' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('POST', '/v1/invoices/schedule/6578278e879ad2646715ba9c/updateAndSchedule', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST updateAndSchedule", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/schedule/6578278e879ad2646715ba9c/updateAndSchedule", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `scheduleId` | Path | `string` | ✅ | Schedule Id [example: `6578278e879ad2646715ba9c`] | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Schedule Id
- **status** (object) (required) (e.g. `draft`): Schedule Status
... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## GET /invoices/settings **Summary:** Get Invoice Settings Get the invoice settings for the given location **Version Header:** `2021-07-28` **Operation ID:** `get-invoice-settings` **Tags:** Invoice ### cURL ```bash curl -X GET 'https://rest.gohighlevel.com/v1/invoices/settings?altId=6578278e879ad2646715ba9c&altType=location' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('GET', '/v1/invoices/settings?altId=6578278e879ad2646715ba9c&altType=VALUE', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - GET settings", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "GET", "url": "https://rest.gohighlevel.com/v1/invoices/settings", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "6578278e879ad2646715ba9c" }, { "name": "altType", "value": "VALUE" } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `altId` | Query | `string` | ✅ | Location Id or Agency Id [example: `6578278e879ad2646715ba9c`] | | `altType` | Query | `string` | ✅ | (values: location) | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **altId** (string) (e.g. `6578278e879ad2646715ba9c`): Sub-Account Id
- **altType** (string) (e.g. `location`): Alt Type
- **termsNote** (st... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## PATCH /invoices/stats/last-visited-at **Summary:** Update invoice last visited at API to update invoice last visited at by invoice id **Version Header:** `2021-07-28` **Operation ID:** `update-invoice-last-visited-at` **Tags:** Invoice ### cURL ```bash curl -X PATCH 'https://rest.gohighlevel.com/v1/invoices/stats/last-visited-at' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('PATCH', '/v1/invoices/stats/last-visited-at', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - PATCH last-visited-at", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "PATCH", "url": "https://rest.gohighlevel.com/v1/invoices/stats/last-visited-at", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Body Schema - **invoiceId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Invoice Id ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | | — | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## GET /invoices/template **Summary:** List templates API to get list of templates **Version Header:** `2021-07-28` **Operation ID:** `list-invoice-templates` **Tags:** Template ### cURL ```bash curl -X GET 'https://rest.gohighlevel.com/v1/invoices/template?altId=6578278e879ad2646715ba9c&altType=location&status=VALUE&startAt=2023-01-01&endAt=2023-01-01&search=Alex&paymentMode=live&limit=10&offset=10' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('GET', '/v1/invoices/template?altId=6578278e879ad2646715ba9c&altType=location&status=VALUE&startAt=2023-01-01&endAt=2023-01-01&search=Alex&paymentMode=live&limit=10&offset=10', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - GET template", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "GET", "url": "https://rest.gohighlevel.com/v1/invoices/template", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "6578278e879ad2646715ba9c" }, { "name": "altType", "value": "location" }, { "name": "status", "value": "VALUE" }, { "name": "startAt", "value": "2023-01-01" }, { "name": "endAt", "value": "2023-01-01" }, { "name": "search", "value": "Alex" }, { "name": "paymentMode", "value": "live" }, { "name": "limit", "value": 10 }, { "name": "offset", "value": 10 } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `altId` | Query | `string` | ✅ | location Id / company Id based on altType [example: `6578278e879ad2646715ba9c`] | | `altType` | Query | `string` | ✅ | Alt Type (values: location) [example: `location`] | | `status` | Query | `string` | — | status to be filtered | | `startAt` | Query | `string` | — | startAt in YYYY-MM-DD format [example: `2023-01-01`] | | `endAt` | Query | `string` | — | endAt in YYYY-MM-DD format [example: `2023-01-01`] | | `search` | Query | `string` | — | To search for an invoice by id / name / email / phoneNo [example: `Alex`] | | `paymentMode` | Query | `string` | — | payment mode (values: default, live, test) [example: `live`] | | `limit` | Query | `string` | ✅ | Limit the number of items to return [example: `10`] | | `offset` | Query | `string` | ✅ | Number of items to skip [example: `10`] | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **data** (array of GetTemplateResponseDto) (required)
- **totalCount** (number) (required) (e.g. `100`): Total number of Templates | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/template **Summary:** Create template API to create a template **Version Header:** `2021-07-28` **Operation ID:** `create-invoice-template` **Tags:** Template ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/template' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/invoices/template', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST template", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/template", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type - **internal** (boolean) - **name** (string) (required) (e.g. `New Template`): Name of the template - **businessDetails** (BusinessDetailsDto) (required) - **currency** (string) (required) - **items** (array of InvoiceItemDto) (required) - **automaticTaxesEnabled** (boolean) (e.g. `True`): Automatic taxes enabled for the Invoice - **discount** (DiscountDto) - **termsNotes** (string) - **title** (string) (e.g. `New Template`): Template title - **tipsConfiguration** (string): Configuration for tips on invoices - **lateFeesConfiguration** (string): Late fees configuration for the invoices - **invoiceNumberPrefix** (string) (e.g. `INV-`): prefix for invoice number - **paymentMethods** (string): Payment Methods for Invoices - **attachments** (array): attachments for the invoice - **miscellaneousCharges** (string): miscellaneous charges for the invoice ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Template Id
- **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`):... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## DELETE /invoices/template/{templateId} **Summary:** Delete template API to update an template by template id **Version Header:** `2021-07-28` **Operation ID:** `delete-invoice-template` **Tags:** Template ### cURL ```bash curl -X DELETE 'https://rest.gohighlevel.com/v1/invoices/template/6578278e879ad2646715ba9c?altId=6578278e879ad2646715ba9c&altType=location' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('DELETE', '/v1/invoices/template/6578278e879ad2646715ba9c?altId=6578278e879ad2646715ba9c&altType=location', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - DELETE 6578278e879ad2646715ba9c", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "DELETE", "url": "https://rest.gohighlevel.com/v1/invoices/template/6578278e879ad2646715ba9c", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "6578278e879ad2646715ba9c" }, { "name": "altType", "value": "location" } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `templateId` | Path | `string` | ✅ | Template Id [example: `6578278e879ad2646715ba9c`] | | `altId` | Query | `string` | ✅ | location Id / company Id based on altType [example: `6578278e879ad2646715ba9c`] | | `altType` | Query | `string` | ✅ | Alt Type (values: location) [example: `location`] | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **success** (boolean) (required) (e.g. `True`): success | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## GET /invoices/template/{templateId} **Summary:** Get an template API to get an template by template id **Version Header:** `2021-07-28` **Operation ID:** `get-invoice-template` **Tags:** Template ### cURL ```bash curl -X GET 'https://rest.gohighlevel.com/v1/invoices/template/6578278e879ad2646715ba9c?altId=6578278e879ad2646715ba9c&altType=location' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('GET', '/v1/invoices/template/6578278e879ad2646715ba9c?altId=6578278e879ad2646715ba9c&altType=location', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - GET 6578278e879ad2646715ba9c", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "GET", "url": "https://rest.gohighlevel.com/v1/invoices/template/6578278e879ad2646715ba9c", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "6578278e879ad2646715ba9c" }, { "name": "altType", "value": "location" } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `templateId` | Path | `string` | ✅ | Template Id [example: `6578278e879ad2646715ba9c`] | | `altId` | Query | `string` | ✅ | location Id / company Id based on altType [example: `6578278e879ad2646715ba9c`] | | `altType` | Query | `string` | ✅ | Alt Type (values: location) [example: `location`] | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Template Id
- **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`):... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## PUT /invoices/template/{templateId} **Summary:** Update template API to update an template by template id **Version Header:** `2021-07-28` **Operation ID:** `update-invoice-template` **Tags:** Template ### cURL ```bash curl -X PUT 'https://rest.gohighlevel.com/v1/invoices/template/6578278e879ad2646715ba9c' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('PUT', '/v1/invoices/template/6578278e879ad2646715ba9c', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - PUT 6578278e879ad2646715ba9c", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "PUT", "url": "https://rest.gohighlevel.com/v1/invoices/template/6578278e879ad2646715ba9c", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `templateId` | Path | `string` | ✅ | Template Id [example: `6578278e879ad2646715ba9c`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type - **internal** (boolean) - **name** (string) (required) (e.g. `New Template`): Name of the template - **businessDetails** (BusinessDetailsDto) (required) - **currency** (string) (required) - **items** (array of InvoiceItemDto) (required) - **discount** (DiscountDto) - **termsNotes** (string) - **title** (string) (e.g. `New Template`): Template title - **miscellaneousCharges** (string): miscellaneous charges for the invoice ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Template Id
- **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`):... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## PATCH /invoices/template/{templateId}/late-fees-configuration **Summary:** Update template late fees configuration API to update template late fees configuration by template id **Version Header:** `2021-07-28` **Operation ID:** `update-invoice-template-late-fees-configuration` **Tags:** Template ### cURL ```bash curl -X PATCH 'https://rest.gohighlevel.com/v1/invoices/template/6578278e879ad2646715ba9c/late-fees-configuration' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('PATCH', '/v1/invoices/template/6578278e879ad2646715ba9c/late-fees-configuration', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - PATCH late-fees-configuration", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "PATCH", "url": "https://rest.gohighlevel.com/v1/invoices/template/6578278e879ad2646715ba9c/late-fees-configuration", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `templateId` | Path | `string` | ✅ | Template Id [example: `6578278e879ad2646715ba9c`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type - **lateFeesConfiguration** (string) (required): late fees configuration ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Template Id
- **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`):... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## PATCH /invoices/template/{templateId}/payment-methods-configuration **Summary:** Update template late fees configuration API to update template late fees configuration by template id **Version Header:** `2021-07-28` **Operation ID:** `update-invoice-payment-methods-configuration` **Tags:** Template ### cURL ```bash curl -X PATCH 'https://rest.gohighlevel.com/v1/invoices/template/6578278e879ad2646715ba9c/payment-methods-configuration' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('PATCH', '/v1/invoices/template/6578278e879ad2646715ba9c/payment-methods-configuration', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - PATCH payment-methods-configuration", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "PATCH", "url": "https://rest.gohighlevel.com/v1/invoices/template/6578278e879ad2646715ba9c/payment-methods-configuration", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `templateId` | Path | `string` | ✅ | Template Id [example: `6578278e879ad2646715ba9c`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type - **paymentMethods** (string): Payment Methods for Invoices ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Template Id
- **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`):... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/text2pay **Summary:** Create & Send API to create or update a text2pay invoice **Version Header:** `2021-07-28` **Operation ID:** `text2pay-invoice` **Tags:** Text2Pay ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/text2pay' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/invoices/text2pay', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST text2pay", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/text2pay", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type - **name** (string) (required) (e.g. `New Invoice`): Invoice Name - **currency** (string) (required) (e.g. `USD`): Currency code - **items** (array of InvoiceItemDto) (required): An array of items for the invoice. - **termsNotes** (string) (e.g. `

This is a default terms.

`): Terms notes, Also supports HTML markups - **title** (string) (e.g. `INVOICE`): Title for the invoice - **contactDetails** (string) (required): Contact information to send the invoice to - **invoiceNumber** (string) (e.g. `1001`): Invoice Number - **issueDate** (string) (required) (e.g. `2023-01-01`): Issue date in YYYY-MM-DD format - **dueDate** (string) (e.g. `2023-01-14`): Due date in YYYY-MM-DD format - **sentTo** (SentToDto) (required) - **liveMode** (boolean) (required) - **automaticTaxesEnabled** (boolean) (e.g. `True`): Automatic taxes enabled for the Invoice - **paymentSchedule** (string): split invoice into payment schedule summing up to full invoice amount - **lateFeesConfiguration** (string): late fees configuration - **tipsConfiguration** (string): tips configuration for the invoice - **invoiceNumberPrefix** (string) (e.g. `INV-`): prefix for invoice number - **paymentMethods** (string): Payment Methods for Invoices - **attachments** (array of AttachmentsDto): attachments for the invoice - **miscellaneousCharges** (string): miscellaneous charges for the invoice - **id** (string): id of invoice to update. If skipped, a new invoice will be created - **includeTermsNote** (boolean) (e.g. `True`): include terms & notes with receipts - **action** (string) (required) (e.g. `draft`): create invoice in draft mode or send mode - **userId** (string) (required): id of user generating invoice - **discount** (DiscountDto) - **businessDetails** (BusinessDetailsDto) ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **invoice** (DefaultInvoiceResponseDto) (required)
- **invoiceUrl** (string) (required): preview url of generated invoice | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## DELETE /invoices/{invoiceId} **Summary:** Delete invoice API to delete invoice by invoice id **Version Header:** `2021-07-28` **Operation ID:** `delete-invoice` **Tags:** Invoice ### cURL ```bash curl -X DELETE 'https://rest.gohighlevel.com/v1/invoices/6578278e879ad2646715ba9c?altId=6578278e879ad2646715ba9c&altType=location' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('DELETE', '/v1/invoices/6578278e879ad2646715ba9c?altId=6578278e879ad2646715ba9c&altType=location', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - DELETE 6578278e879ad2646715ba9c", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "DELETE", "url": "https://rest.gohighlevel.com/v1/invoices/6578278e879ad2646715ba9c", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "6578278e879ad2646715ba9c" }, { "name": "altType", "value": "location" } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `invoiceId` | Path | `string` | ✅ | Invoice Id [example: `6578278e879ad2646715ba9c`] | | `altId` | Query | `string` | ✅ | location Id / company Id based on altType [example: `6578278e879ad2646715ba9c`] | | `altType` | Query | `string` | ✅ | Alt Type (values: location) [example: `location`] | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Invoice Id
- **status** (string) (required) (e.g. `draft`): Invoice Status
-... | | `400` | Bad Request | — | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## GET /invoices/{invoiceId} **Summary:** Get invoice API to get invoice by invoice id **Version Header:** `2021-07-28` **Operation ID:** `get-invoice` **Tags:** Invoice ### cURL ```bash curl -X GET 'https://rest.gohighlevel.com/v1/invoices/6578278e879ad2646715ba9c?altId=6578278e879ad2646715ba9c&altType=location' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } conn.request('GET', '/v1/invoices/6578278e879ad2646715ba9c?altId=6578278e879ad2646715ba9c&altType=location', headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - GET 6578278e879ad2646715ba9c", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "GET", "url": "https://rest.gohighlevel.com/v1/invoices/6578278e879ad2646715ba9c", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": false, "bodyParameters": { "parameters": [] }, "options": {}, "sendQuery": true, "queryParameters": { "parameters": [ { "name": "altId", "value": "6578278e879ad2646715ba9c" }, { "name": "altType", "value": "location" } ] } } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `invoiceId` | Path | `string` | ✅ | Invoice Id [example: `6578278e879ad2646715ba9c`] | | `altId` | Query | `string` | ✅ | location Id / company Id based on altType [example: `6578278e879ad2646715ba9c`] | | `altType` | Query | `string` | ✅ | Alt Type (values: location) [example: `location`] | ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Invoice Id
- **status** (string) (required) (e.g. `draft`): Invoice Status
-... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## PUT /invoices/{invoiceId} **Summary:** Update invoice API to update invoice by invoice id **Version Header:** `2021-07-28` **Operation ID:** `update-invoice` **Tags:** Invoice ### cURL ```bash curl -X PUT 'https://rest.gohighlevel.com/v1/invoices/6578278e879ad2646715ba9c' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('PUT', '/v1/invoices/6578278e879ad2646715ba9c', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - PUT 6578278e879ad2646715ba9c", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "PUT", "url": "https://rest.gohighlevel.com/v1/invoices/6578278e879ad2646715ba9c", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `invoiceId` | Path | `string` | ✅ | Invoice Id [example: `6578278e879ad2646715ba9c`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type - **name** (string) (required) (e.g. `New Invoice`): Name to be updated - **title** (string) (e.g. `INVOICE`): Title for the invoice - **currency** (string) (required) (e.g. `USD`): Currency - **description** (string) (e.g. `ABC Corp payments`): Description - **businessDetails** (string) (e.g. `{'name': 'Alex', 'address': {'addressLine1': '9931 Beechwood', 'city': 'St. Houston', 'state': 'TX', 'countryCode': 'USA', 'postalCode': '559-6993'}, 'phoneNo': '+1-214-559-6993', 'website': 'www.example.com'}`): Business details which need to be updated - **invoiceNumber** (string) (e.g. `1001`): Invoice Number - **contactId** (string) (e.g. `6578278e879ad2646715ba9c`): Id of the contact which you need to send the invoice - **contactDetails** (ContactDetailsDto) - **termsNotes** (string) (e.g. `

This is a default terms.

`): Terms notes, Also supports HTML markups - **discount** (DiscountDto) - **invoiceItems** (array of InvoiceItemDto) (required) - **automaticTaxesEnabled** (boolean) (e.g. `True`): Automatic taxes enabled for the Invoice - **liveMode** (boolean): Payment mode - **issueDate** (string) (required) (e.g. `2023-01-01`): Issue date in YYYY-MM-DD format - **dueDate** (string) (required) (e.g. `2023-01-14`): Due date in YYYY-MM-DD format - **paymentSchedule** (string): split invoice into payment schedule summing up to full invoice amount - **tipsConfiguration** (string): tips configuration for the invoice - **xeroDetails** (object) - **invoiceNumberPrefix** (string) (e.g. `INV-`): prefix for invoice number - **paymentMethods** (string): Payment Methods for Invoices - **attachments** (array of AttachmentsDto): attachments for the invoice - **miscellaneousCharges** (string): miscellaneous charges for the invoice ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Invoice Id
- **status** (string) (required) (e.g. `draft`): Invoice Status
-... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## PATCH /invoices/{invoiceId}/late-fees-configuration **Summary:** Update invoice late fees configuration API to update invoice late fees configuration by invoice id **Version Header:** `2021-07-28` **Operation ID:** `update-invoice-late-fees-configuration` **Tags:** Invoice ### cURL ```bash curl -X PATCH 'https://rest.gohighlevel.com/v1/invoices/6578278e879ad2646715ba9c/late-fees-configuration' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('PATCH', '/v1/invoices/6578278e879ad2646715ba9c/late-fees-configuration', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - PATCH late-fees-configuration", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "PATCH", "url": "https://rest.gohighlevel.com/v1/invoices/6578278e879ad2646715ba9c/late-fees-configuration", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `invoiceId` | Path | `string` | ✅ | Invoice Id [example: `6578278e879ad2646715ba9c`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type - **lateFeesConfiguration** (string) (required): late fees configuration ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Invoice Id
- **status** (string) (required) (e.g. `draft`): Invoice Status
-... | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/{invoiceId}/record-payment **Summary:** Record a manual payment for an invoice API to record manual payment for an invoice by invoice id **Version Header:** `2021-07-28` **Operation ID:** `record-invoice` **Tags:** Invoice ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/6578278e879ad2646715ba9c/record-payment' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/invoices/6578278e879ad2646715ba9c/record-payment', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST record-payment", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/6578278e879ad2646715ba9c/record-payment", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `invoiceId` | Path | `string` | ✅ | Invoice Id [example: `6578278e879ad2646715ba9c`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type - **mode** (string) (required) (e.g. `card`): manual payment method - **card** (CardDto) (required) - **cheque** (ChequeDto) (required) - **notes** (string) (required) (e.g. `This was a direct payment`): Any note to be recorded with the transaction - **amount** (number) (e.g. `999`): Amount to be paid against the invoice. - **meta** (object) - **paymentScheduleIds** (array) (e.g. `['6578278e879ad2646715ba9c']`): Payment Schedule Ids to be recorded against the invoice. - **fulfilledAt** (string) (e.g. `2025-03-19T05:03:00.000Z`): Updated At to be recorded against the invoice. ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **success** (boolean) (required) (e.g. `True`): status
- **invoice** (DefaultInvoiceResponseDto) (required) | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/{invoiceId}/send **Summary:** Send invoice API to send invoice by invoice id **Version Header:** `2021-07-28` **Operation ID:** `send-invoice` **Tags:** Invoice ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/6578278e879ad2646715ba9c/send' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/invoices/6578278e879ad2646715ba9c/send', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST send", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/6578278e879ad2646715ba9c/send", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `invoiceId` | Path | `string` | ✅ | Invoice Id [example: `6578278e879ad2646715ba9c`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type - **userId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Please ensure that the UserId corresponds to an authorized personnel, either by an employee ID or agency ID, to access this location. This account will serve as the primary channel for all future communications and updates. - **action** (string) (required) - **liveMode** (boolean) (required) - **sentFrom** (string): sender details for invoice, valid only if invoice is not sent manually - **autoPayment** (string): auto-payment configuration ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **invoice** (DefaultInvoiceResponseDto) (required)
- **smsData** (object) (required)
- **emailData** (object) (required) | | `400` | Bad Request | Standard error response for bad requests (400). Contains message, statusCode fields. | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- ## POST /invoices/{invoiceId}/void **Summary:** Void invoice API to delete invoice by invoice id **Version Header:** `2021-07-28` **Operation ID:** `void-invoice` **Tags:** Invoice ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/invoices/6578278e879ad2646715ba9c/void' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/invoices/6578278e879ad2646715ba9c/void', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST void", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/invoices/6578278e879ad2646715ba9c/void", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Parameters | Name | Location | Type | Required | Description | |------|----------|------|----------|-------------| | `invoiceId` | Path | `string` | ✅ | Invoice Id [example: `6578278e879ad2646715ba9c`] | ### Request Body Schema - **altId** (string) (required) (e.g. `6578278e879ad2646715ba9c`): location Id / company Id based on altType - **altType** (string) (required) (e.g. `location`): Alt Type ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `200` | Successful response | - **_id** (string) (required) (e.g. `6578278e879ad2646715ba9c`): Invoice Id
- **status** (string) (required) (e.g. `draft`): Invoice Status
-... | | `400` | Bad Request | — | | `401` | Unauthorized | Standard error response for unauthorized requests (401). Contains message, statusCode fields. | | `422` | Unprocessable Entity | Standard error response for unprocessable entity (422). Contains message, statusCode, errors array fields. | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- *Documentation generated from GHL OpenAPI specifications. Verify against official docs for latest changes.*