# Add custom audience member
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-add-custom-audience-member
Add a member to a Facebook custom audience
Add a member to a Facebook custom audience
```http theme={null}
PUT https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/{audienceId}/member
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Custom audience identifier
## Body
Account identifier
Contact identifier
Facebook ad account ID
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId/member' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_abc123",
"contactId": "contact_123",
"fbAdAccountId": "act_123456"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId/member', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_abc123", "contactId": "contact_123", "fbAdAccountId": "act_123456"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId/member',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_abc123", "contactId": "contact_123", "fbAdAccountId": "act_123456"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_abc123', 'contactId': 'contact_123', 'fbAdAccountId': 'act_123456'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Batch update audience members
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-batch-update-audience-members
Add or remove members in bulk from a Facebook custom audience via CSV or smart lists
Add or remove members in bulk from a Facebook custom audience via CSV or smart lists
```http theme={null}
PUT https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/{audienceId}/member/batch
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Custom audience identifier
## Body
Account identifier
CSV file path
Batch operation type
Smartlist IDs array
Dynamic audience flag
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId/member/batch' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_abc123",
"csvPath": "/uploads/audience.csv",
"operationType": "ADD",
"smartlistIds": [
"list_1",
"list_2"
],
"dynamicAudience": "true"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId/member/batch', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_abc123", "csvPath": "/uploads/audience.csv", "operationType": "ADD", "smartlistIds": ["list_1", "list_2"], "dynamicAudience": "true"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId/member/batch',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_abc123", "csvPath": "/uploads/audience.csv", "operationType": "ADD", "smartlistIds": ["list_1", "list_2"], "dynamicAudience": "true"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_abc123', 'csvPath': '/uploads/audience.csv', 'operationType': 'ADD', 'smartlistIds': ['list_1', 'list_2'], 'dynamicAudience': 'true'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create conversation form
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-create-conversation-form
Create a new Facebook conversation lead form
Create a new Facebook conversation lead form
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/facebook/conversation-forms
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account identifier
Conversation form name
Welcome message text
Quick-reply questions shown in the welcome message of the conversation form
Question title text
Auto-response message
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/facebook/conversation-forms' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_abc123",
"name": "Welcome Form",
"text": "Hi! How can we help?",
"questions": [
{
"question": "How can we help?",
"response": "Thanks for reaching out! A team member will assist you shortly."
},
{
"question": "I want to learn more",
"response": "Great! Here is a link to our services."
}
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/conversation-forms', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_abc123", "name": "Welcome Form", "text": "Hi! How can we help?", "questions": [{"question": "How can we help?", "response": "Thanks for reaching out! A team member will assist you shortly."}, {"question": "I want to learn more", "response": "Great! Here is a link to our services."}]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/facebook/conversation-forms',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_abc123", "name": "Welcome Form", "text": "Hi! How can we help?", "questions": [{"question": "How can we help?", "response": "Thanks for reaching out! A team member will assist you shortly."}, {"question": "I want to learn more", "response": "Great! Here is a link to our services."}]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_abc123', 'name': 'Welcome Form', 'text': 'Hi! How can we help?', 'questions': [{'question': 'How can we help?', 'response': 'Thanks for reaching out! A team member will assist you shortly.'}, {'question': 'I want to learn more', 'response': 'Great! Here is a link to our services.'}]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Facebook integration
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-create-integration
Create a Facebook ad integration for a account with page and ad account
Create a Facebook ad integration for a account with page and ad account
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/facebook/integration
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account identifier
Facebook page ID
Ad account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/facebook/integration' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_abc123",
"pageId": "123456789",
"adAccountId": "act_123456"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/integration', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_abc123", "pageId": "123456789", "adAccountId": "act_123456"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/facebook/integration',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_abc123", "pageId": "123456789", "adAccountId": "act_123456"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_abc123', 'pageId': '123456789', 'adAccountId': 'act_123456'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create page lead form
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-create-page-lead-form
Create a new lead gen form on a Facebook page
Create a new lead gen form on a Facebook page
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/facebook/page/{pageId}/forms
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Facebook page identifier
## Body
Lead form type Posibles valores: 'MORE\_VOLUME', 'HIGHER\_INTENT'
Lead form name
Account identifier
Greeting card config
List of questions displayed on the lead form
Question label text shown to the user
Question key
Question input type — use a prefilled type for standard fields or CUSTOM / SHORT\_ANSWER for freeform questions Posibles valores: 'CUSTOM', 'CITY', 'COMPANY\_NAME', 'COUNTRY', 'DATE\_OF\_BIRTH', 'EMAIL', 'FIRST\_NAME', 'FULL\_NAME', 'GENDER', 'JOB\_TITLE', 'LAST\_NAME', 'MARITAL\_STATUS', 'MILITARY\_STATUS', 'PHONE', 'POST\_CODE', 'RELATIONSHIP\_STATUS', 'STATE', 'STREET\_ADDRESS', 'WORK\_EMAIL', 'WORK\_PHONE\_NUMBER', 'ZIP', 'SHORT\_ANSWER'
Answer options for multiple-choice questions (only applies to CUSTOM type)
Option key
Option value
Question page headline
Privacy policy URL
Privacy policy text
Custom disclaimer config
Thank you page config
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/facebook/page/YOUR_pageId/forms' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"type": "MORE_VOLUME",
"name": "Contact Form",
"locationId": "loc_abc123",
"questions": [
{
"key": "full_name",
"type": "FULL_NAME",
"options": []
},
{
"key": "email_address",
"type": "EMAIL",
"options": []
},
{
"key": "are_you_interested",
"label": "Are you interested?",
"type": "CUSTOM",
"options": [
{
"value": "Yes"
},
{
"value": "No"
}
]
}
],
"questionPageHeadline": "Tell us about yourself",
"privacyPolicyLink": "https://example.com/privacy",
"privacyPolicyText": "We respect your privacy"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/page/YOUR_pageId/forms', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"type": "MORE_VOLUME", "name": "Contact Form", "locationId": "loc_abc123", "questions": [{"key": "full_name", "type": "FULL_NAME", "options": []}, {"key": "email_address", "type": "EMAIL", "options": []}, {"key": "are_you_interested", "label": "Are you interested?", "type": "CUSTOM", "options": [{"value": "Yes"}, {"value": "No"}]}], "questionPageHeadline": "Tell us about yourself", "privacyPolicyLink": "https://example.com/privacy", "privacyPolicyText": "We respect your privacy"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/facebook/page/YOUR_pageId/forms',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"type": "MORE_VOLUME", "name": "Contact Form", "locationId": "loc_abc123", "questions": [{"key": "full_name", "type": "FULL_NAME", "options": []}, {"key": "email_address", "type": "EMAIL", "options": []}, {"key": "are_you_interested", "label": "Are you interested?", "type": "CUSTOM", "options": [{"value": "Yes"}, {"value": "No"}]}], "questionPageHeadline": "Tell us about yourself", "privacyPolicyLink": "https://example.com/privacy", "privacyPolicyText": "We respect your privacy"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'type': 'MORE_VOLUME', 'name': 'Contact Form', 'locationId': 'loc_abc123', 'questions': [{'key': 'full_name', 'type': 'FULL_NAME', 'options': []}, {'key': 'email_address', 'type': 'EMAIL', 'options': []}, {'key': 'are_you_interested', 'label': 'Are you interested?', 'type': 'CUSTOM', 'options': [{'value': 'Yes'}, {'value': 'No'}]}], 'questionPageHeadline': 'Tell us about yourself', 'privacyPolicyLink': 'https://example.com/privacy', 'privacyPolicyText': 'We respect your privacy'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete ad
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-delete-ad
Delete a Facebook ad by ID
Delete a Facebook ad by ID
```http theme={null}
DELETE https://services.leadconnectorhq.com/ad-publishing/facebook/ads/{adId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/ad-publishing/facebook/ads/YOUR_adId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/ads/YOUR_adId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/ad-publishing/facebook/ads/YOUR_adId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete ad account
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-delete-ad-account
Remove a Facebook ad account connection from a account
Remove a Facebook ad account connection from a account
```http theme={null}
DELETE https://services.leadconnectorhq.com/ad-publishing/facebook/ad-accounts/{adAccountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Ad account identifier
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/ad-publishing/facebook/ad-accounts/YOUR_adAccountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/ad-accounts/YOUR_adAccountId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/ad-publishing/facebook/ad-accounts/YOUR_adAccountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete ad set
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-delete-adset
Delete a Facebook ad set by ID
Delete a Facebook ad set by ID
```http theme={null}
DELETE https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/{adsetId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/YOUR_adsetId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/YOUR_adsetId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/YOUR_adsetId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete campaign
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-delete-campaign
Delete a Facebook campaign by ID
Delete a Facebook campaign by ID
```http theme={null}
DELETE https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/{campaignId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete custom audience
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-delete-custom-audience
Delete a Facebook custom audience by ID
Delete a Facebook custom audience by ID
```http theme={null}
DELETE https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/{audienceId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Custom audience identifier
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Facebook integration
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-delete-integration
Remove the Facebook ad integration from a account
Remove the Facebook ad integration from a account
```http theme={null}
DELETE https://services.leadconnectorhq.com/ad-publishing/facebook/integration
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/ad-publishing/facebook/integration' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/integration', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/ad-publishing/facebook/integration',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete page connection
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-delete-page
Remove a Facebook page connection from a account
Remove a Facebook page connection from a account
```http theme={null}
DELETE https://services.leadconnectorhq.com/ad-publishing/facebook/page
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Facebook page ID
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/ad-publishing/facebook/page' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/page', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/ad-publishing/facebook/page',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Duplicate ad
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-duplicate-ad
Duplicate an existing Facebook ad
Duplicate an existing Facebook ad
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/facebook/ads/{adId}/duplicate
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/facebook/ads/YOUR_adId/duplicate' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/ads/YOUR_adId/duplicate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/facebook/ads/YOUR_adId/duplicate',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Duplicate ad set
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-duplicate-adset
Duplicate an existing Facebook ad set
Duplicate an existing Facebook ad set
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/{adsetId}/duplicate
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/YOUR_adsetId/duplicate' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/YOUR_adsetId/duplicate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/YOUR_adsetId/duplicate',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Duplicate campaign
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-duplicate-campaign
Duplicate an existing Facebook campaign
Duplicate an existing Facebook campaign
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/{campaignId}/duplicate
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId/duplicate' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId/duplicate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId/duplicate',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get ad account details
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-ad-account
Retrieve details of a specific Facebook ad account
Retrieve details of a specific Facebook ad account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/ad-accounts/{adAccountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Ad account identifier
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/ad-accounts/YOUR_adAccountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/ad-accounts/YOUR_adAccountId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/ad-accounts/YOUR_adAccountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get ad accounts
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-ad-accounts
Retrieve Facebook ad accounts available for the connected user
Retrieve Facebook ad accounts available for the connected user
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/ad-accounts
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Account source type
Pagination cursor
Fetch all accounts
Results page limit
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/ad-accounts' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/ad-accounts', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/ad-accounts',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get campaign with linked entities
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-campaign
Retrieve a Facebook campaign with its linked adsets and ads
Retrieve a Facebook campaign with its linked adsets and ads
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/campaign/{campaignId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Campaign identifier
## Query parameters
Account identifier
Comma-separated field names
Campaign data source
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/campaign/YOUR_campaignId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/campaign/YOUR_campaignId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/campaign/YOUR_campaignId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get campaign reporting
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-campaign-reporting
Retrieve reporting metrics for a specific Facebook campaign
Retrieve reporting metrics for a specific Facebook campaign
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/reporting/campaign/{campaignId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Campaign identifier
## Query parameters
Account identifier
Report start date
Report end date
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/reporting/campaign/YOUR_campaignId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/reporting/campaign/YOUR_campaignId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/reporting/campaign/YOUR_campaignId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get conversation forms
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-conversation-forms
Retrieve Facebook conversation lead forms for a account
Retrieve Facebook conversation lead forms for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/conversation-forms
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/conversation-forms' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/conversation-forms', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/conversation-forms',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get current Facebook user
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-current-user
Retrieve the authenticated Facebook user profile for a account
Retrieve the authenticated Facebook user profile for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/me
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/me' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/me', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/me',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get custom audience by ID
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-custom-audience-by-id
Retrieve a specific Facebook custom audience by its ID
Retrieve a specific Facebook custom audience by its ID
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/{audienceId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Custom audience identifier
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get custom audiences
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-custom-audiences
Retrieve Facebook custom audiences for a account
Retrieve Facebook custom audiences for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Audience list type
Audience data source
Ad account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get entities
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-entity
Retrieve Facebook campaigns, adsets, or ads based on entity type
Retrieve Facebook campaigns, adsets, or ads based on entity type
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/entity
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Integration source type
Pagination cursor
Fetch all entities
Campaign identifier
Ad set identifier
Entity type to fetch
Search identifier
Selected ad account ID
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/entity' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/entity', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/entity',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Instagram accounts for page
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-instagram-accounts
Retrieve Instagram accounts linked to a specific Facebook page
Retrieve Instagram accounts linked to a specific Facebook page
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/page/{pageId}/instagram
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Facebook page identifier
## Query parameters
Account identifier
Integration type
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/page/YOUR_pageId/instagram' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/page/YOUR_pageId/instagram', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/page/YOUR_pageId/instagram',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Facebook integration
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-integration
Retrieve the Facebook ad integration details for a account
Retrieve the Facebook ad integration details for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/integration
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/integration' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/integration', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/integration',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get lead form by ID
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-lead-form
Retrieve a specific Facebook lead form by its ID
Retrieve a specific Facebook lead form by its ID
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/lead-form/{leadFormId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Lead form identifier
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/lead-form/YOUR_leadFormId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/lead-form/YOUR_leadFormId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/lead-form/YOUR_leadFormId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get page lead forms
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-page-lead-forms
Retrieve lead gen forms for a specific Facebook page
Retrieve lead gen forms for a specific Facebook page
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/page/{pageId}/forms
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Facebook page identifier
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/page/YOUR_pageId/forms' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/page/YOUR_pageId/forms', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/page/YOUR_pageId/forms',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Facebook pages
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-pages
Retrieve Facebook pages associated with the connected account
Retrieve Facebook pages associated with the connected account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/pages
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Fetch existing pages flag
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/pages' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/pages', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/pages',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get conversion pixels
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-pixels
Retrieve Facebook conversion pixels for a account
Retrieve Facebook conversion pixels for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/pixels
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Channel type
Facebook page ID
Instagram user ID
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/pixels' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/pixels', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/pixels',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get reporting data
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-reporting
Retrieve aggregated Facebook ad reporting metrics for a account
Retrieve aggregated Facebook ad reporting metrics for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/reporting
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Time grouping interval
Report start date
Report end date
Integration source type
Comma-separated reporting fields
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/reporting' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/reporting', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/reporting',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get reporting list
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-get-reporting-list
Retrieve a list of Facebook campaigns, adsets, or ads with reporting data
Retrieve a list of Facebook campaigns, adsets, or ads with reporting data
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/reporting/list
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Reporting list type
Report start date
Report end date
Campaign identifier
Integration source type
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/reporting/list' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/reporting/list', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/reporting/list',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Pause ad
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-pause-ad
Pause a running Facebook ad
Pause a running Facebook ad
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/facebook/ads/{adId}/pause
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/facebook/ads/YOUR_adId/pause' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/ads/YOUR_adId/pause', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/facebook/ads/YOUR_adId/pause',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Pause ad set
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-pause-adset
Pause a running Facebook ad set
Pause a running Facebook ad set
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/{adsetId}/pause
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/YOUR_adsetId/pause' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/YOUR_adsetId/pause', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/YOUR_adsetId/pause',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Pause campaign
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-pause-campaign
Pause a running Facebook campaign
Pause a running Facebook campaign
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/{campaignId}/pause
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId/pause' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId/pause', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId/pause',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Publish campaign
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-publish-campaign
Publish a Facebook campaign and push it live to Facebook
Publish a Facebook campaign and push it live to Facebook
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/{campaignId}/publish
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Campaign identifier
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId/publish' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_abc123"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId/publish', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_abc123"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId/publish',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_abc123"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_abc123'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Remove custom audience member
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-remove-custom-audience-member
Remove a member from a Facebook custom audience
Remove a member from a Facebook custom audience
```http theme={null}
DELETE https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/{audienceId}/member
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Custom audience identifier
## Body
Account identifier
Contact identifier
Facebook ad account ID
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId/member' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_abc123",
"contactId": "contact_123",
"fbAdAccountId": "act_123456"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId/member', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_abc123", "contactId": "contact_123", "fbAdAccountId": "act_123456"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId/member',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_abc123", "contactId": "contact_123", "fbAdAccountId": "act_123456"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_abc123', 'contactId': 'contact_123', 'fbAdAccountId': 'act_123456'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Resume ad
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-resume-ad
Resume a paused Facebook ad
Resume a paused Facebook ad
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/facebook/ads/{adId}/resume
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/facebook/ads/YOUR_adId/resume' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/ads/YOUR_adId/resume', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/facebook/ads/YOUR_adId/resume',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Resume ad set
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-resume-adset
Resume a paused Facebook ad set
Resume a paused Facebook ad set
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/{adsetId}/resume
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/YOUR_adsetId/resume' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/YOUR_adsetId/resume', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/facebook/adsets/YOUR_adsetId/resume',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Resume campaign
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-resume-campaign
Resume a paused Facebook campaign
Resume a paused Facebook campaign
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/{campaignId}/resume
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId/resume' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId/resume', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns/YOUR_campaignId/resume',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Search targeting options
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-search-targeting
Search Facebook geo-accounts and interests for ad targeting
Search Facebook geo-accounts and interests for ad targeting
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/facebook/targeting/search
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Targeting search type
Search query string
Specific search subtype
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/facebook/targeting/search' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/targeting/search', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/facebook/targeting/search',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Set default page
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-set-default-page
Set the default Facebook page for a account
Set the default Facebook page for a account
```http theme={null}
PUT https://services.leadconnectorhq.com/ad-publishing/facebook/page/default
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
## Body
Facebook page identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/ad-publishing/facebook/page/default' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"pageId": "103456789012345"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/page/default', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"pageId": "103456789012345"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/ad-publishing/facebook/page/default',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"pageId": "103456789012345"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'pageId': '103456789012345'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update custom audience
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-update-custom-audience
Update name or description of a Facebook custom audience
Update name or description of a Facebook custom audience
```http theme={null}
PUT https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/{audienceId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Custom audience identifier
## Body
Account identifier
Audience name
Audience description
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe",
"name": "My Custom Audience",
"description": "Lookalike audience from website visitors"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe", "name": "My Custom Audience", "description": "Lookalike audience from website visitors"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/ad-publishing/facebook/custom-audience/YOUR_audienceId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe", "name": "My Custom Audience", "description": "Lookalike audience from website visitors"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe', 'name': 'My Custom Audience', 'description': 'Lookalike audience from website visitors'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Upsert ad
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-upsert-ad
Create or update a Facebook ad (v2)
Create or update a Facebook ad (v2)
```http theme={null}
PUT https://services.leadconnectorhq.com/ad-publishing/facebook/ads-v2
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Ad identifier
Account identifier
Ad name
Ad primary text
Ad headline text
Ad description text
Ad image URL
Ad media type Posibles valores: 'SINGLE', 'CAROUSEL'
Media items (images or videos) attached to the ad creative
Media source URL
Thumbnail URL (required when type is video)
Selected poster index (required when type is video)
Media content type Posibles valores: 'image', 'video'
Media file name
Media headline
Media description
Media destination link
Enable multi-advertiser ads
Parent campaign ID
Parent ad set ID
Call to action type
Conversation form ID
Destination link URL
Destination form ID
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/ad-publishing/facebook/ads-v2' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"id": "ad_123",
"locationId": "loc_abc123",
"name": "My Ad Creative",
"primaryText": "Check out our offer!",
"headline": "Great Deal",
"description": "Limited time offer",
"imageUrl": "https://example.com/img.jpg",
"mediaType": "SINGLE",
"media": [
{
"src": "https://example.com/image.jpg",
"thumbnailUrl": "https://example.com/thumb.jpg",
"selectedPoster": 0,
"type": "IMAGE",
"name": "ad_image.jpg"
}
],
"multiAdvertiserAds": false,
"campaignId": "camp_123",
"adsetId": "adset_123",
"cta": "LEARN_MORE",
"conversationFormId": "conv_123",
"destinationLink": "https://example.com",
"destinationFormId": "form_123"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/ads-v2', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"id": "ad_123", "locationId": "loc_abc123", "name": "My Ad Creative", "primaryText": "Check out our offer!", "headline": "Great Deal", "description": "Limited time offer", "imageUrl": "https://example.com/img.jpg", "mediaType": "SINGLE", "media": [{"src": "https://example.com/image.jpg", "thumbnailUrl": "https://example.com/thumb.jpg", "selectedPoster": 0, "type": "IMAGE", "name": "ad_image.jpg"}], "multiAdvertiserAds": false, "campaignId": "camp_123", "adsetId": "adset_123", "cta": "LEARN_MORE", "conversationFormId": "conv_123", "destinationLink": "https://example.com", "destinationFormId": "form_123"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/ad-publishing/facebook/ads-v2',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"id": "ad_123", "locationId": "loc_abc123", "name": "My Ad Creative", "primaryText": "Check out our offer!", "headline": "Great Deal", "description": "Limited time offer", "imageUrl": "https://example.com/img.jpg", "mediaType": "SINGLE", "media": [{"src": "https://example.com/image.jpg", "thumbnailUrl": "https://example.com/thumb.jpg", "selectedPoster": 0, "type": "IMAGE", "name": "ad_image.jpg"}], "multiAdvertiserAds": false, "campaignId": "camp_123", "adsetId": "adset_123", "cta": "LEARN_MORE", "conversationFormId": "conv_123", "destinationLink": "https://example.com", "destinationFormId": "form_123"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'id': 'ad_123', 'locationId': 'loc_abc123', 'name': 'My Ad Creative', 'primaryText': 'Check out our offer!', 'headline': 'Great Deal', 'description': 'Limited time offer', 'imageUrl': 'https://example.com/img.jpg', 'mediaType': 'SINGLE', 'media': [{'src': 'https://example.com/image.jpg', 'thumbnailUrl': 'https://example.com/thumb.jpg', 'selectedPoster': 0, 'type': 'IMAGE', 'name': 'ad_image.jpg'}], 'multiAdvertiserAds': false, 'campaignId': 'camp_123', 'adsetId': 'adset_123', 'cta': 'LEARN_MORE', 'conversationFormId': 'conv_123', 'destinationLink': 'https://example.com', 'destinationFormId': 'form_123'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Upsert adset
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-upsert-adset
Create or update a Facebook ad set
Create or update a Facebook ad set
```http theme={null}
PUT https://services.leadconnectorhq.com/ad-publishing/facebook/adsets
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Ad set identifier
Account identifier
Ad set name
Facebook page ID
Instagram actor ID
Messaging platforms Posibles valores: 'WHATSAPP', 'MESSENGER', 'INSTAGRAM\_DIRECT'
WhatsApp phone number
Targeting audience configuration including geo-accounts, locales, placements, and custom audiences
Ad set budget config
Conversion account
Custom event type
Conversion pixel ID
Parent campaign ID
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/ad-publishing/facebook/adsets' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"id": "adset_123",
"locationId": "loc_abc123",
"name": "Targeting Group A",
"pageId": "123456789",
"instagramActorId": "ig_123",
"messagingPlatforms": "WHATSAPP",
"whatsappNumber": "+1234567890",
"conversionLocation": "website",
"customEventType": "Purchase",
"pixelId": "px_123",
"campaignId": "camp_123"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/adsets', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"id": "adset_123", "locationId": "loc_abc123", "name": "Targeting Group A", "pageId": "123456789", "instagramActorId": "ig_123", "messagingPlatforms": "WHATSAPP", "whatsappNumber": "+1234567890", "conversionLocation": "website", "customEventType": "Purchase", "pixelId": "px_123", "campaignId": "camp_123"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/ad-publishing/facebook/adsets',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"id": "adset_123", "locationId": "loc_abc123", "name": "Targeting Group A", "pageId": "123456789", "instagramActorId": "ig_123", "messagingPlatforms": "WHATSAPP", "whatsappNumber": "+1234567890", "conversionLocation": "website", "customEventType": "Purchase", "pixelId": "px_123", "campaignId": "camp_123"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'id': 'adset_123', 'locationId': 'loc_abc123', 'name': 'Targeting Group A', 'pageId': '123456789', 'instagramActorId': 'ig_123', 'messagingPlatforms': 'WHATSAPP', 'whatsappNumber': '+1234567890', 'conversionLocation': 'website', 'customEventType': 'Purchase', 'pixelId': 'px_123', 'campaignId': 'camp_123'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Upsert campaign
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-upsert-campaign
Create or update a Facebook campaign
Create or update a Facebook campaign
```http theme={null}
PUT https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Campaign identifier
Account identifier
Campaign name
Campaign objective Posibles valores: 'OUTCOME\_LEADS', 'OUTCOME\_TRAFFIC', 'OUTCOME\_ENGAGEMENT', 'OUTCOME\_SALES'
Special ad categories Posibles valores: 'EMPLOYMENT', 'CREDIT', 'FINANCIAL\_PRODUCTS\_SERVICES', 'HOUSING', 'ISSUES\_ELECTIONS\_POLITICS', 'ONLINE\_GAMBLING\_AND\_GAMING', 'NONE'
Campaign data source
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"id": "camp_123",
"locationId": "loc_abc123",
"name": "Summer Campaign",
"objective": "LEAD_GENERATION",
"specialAdCategories": "EMPLOYMENT",
"source": "facebook"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"id": "camp_123", "locationId": "loc_abc123", "name": "Summer Campaign", "objective": "LEAD_GENERATION", "specialAdCategories": "EMPLOYMENT", "source": "facebook"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/ad-publishing/facebook/campaigns',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"id": "camp_123", "locationId": "loc_abc123", "name": "Summer Campaign", "objective": "LEAD_GENERATION", "specialAdCategories": "EMPLOYMENT", "source": "facebook"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'id': 'camp_123', 'locationId': 'loc_abc123', 'name': 'Summer Campaign', 'objective': 'LEAD_GENERATION', 'specialAdCategories': 'EMPLOYMENT', 'source': 'facebook'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Upsert conversion pixel
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-fb-upsert-pixel
Create or update a Facebook conversion pixel configuration
Create or update a Facebook conversion pixel configuration
```http theme={null}
PUT https://services.leadconnectorhq.com/ad-publishing/facebook/pixels
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account identifier
Conversion pixel ID
Pixel name
Instagram user ID
Pixel event type
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/ad-publishing/facebook/pixels' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_abc123",
"conversionPixelId": "px_123",
"name": "My Pixel",
"igUserId": "ig_user_123",
"type": "LEAD_EVENT"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/facebook/pixels', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_abc123", "conversionPixelId": "px_123", "name": "My Pixel", "igUserId": "ig_user_123", "type": "LEAD_EVENT"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/ad-publishing/facebook/pixels',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_abc123", "conversionPixelId": "px_123", "name": "My Pixel", "igUserId": "ig_user_123", "type": "LEAD_EVENT"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_abc123', 'conversionPixelId': 'px_123', 'name': 'My Pixel', 'igUserId': 'ig_user_123', 'type': 'LEAD_EVENT'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Google integration
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-create-integration
Create a Google Ads integration for a account
Create a Google Ads integration for a account
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/google/integration
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account identifier
Ad account identifier
MCC identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/google/integration' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_abc123",
"adAccountId": "123-456-7890",
"mccId": "987-654-3210"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/integration', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_abc123", "adAccountId": "123-456-7890", "mccId": "987-654-3210"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/google/integration',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_abc123", "adAccountId": "123-456-7890", "mccId": "987-654-3210"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_abc123', 'adAccountId': '123-456-7890', 'mccId': '987-654-3210'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create offline user list job
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-create-offline-user-list-job
Create a job to upload users to a Google customer match list
Create a job to upload users to a Google customer match list
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/google/segments/offline-user-list-job
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account identifier
Smart list IDs
CSV file path
User list identifier
Dynamic list flag
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/google/segments/offline-user-list-job' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_abc123",
"smartListIds": [
"sl_123"
],
"csvPath": "/uploads/users.csv",
"userListId": "ul_123",
"isDynamic": false
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/segments/offline-user-list-job', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_abc123", "smartListIds": ["sl_123"], "csvPath": "/uploads/users.csv", "userListId": "ul_123", "isDynamic": false}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/google/segments/offline-user-list-job',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_abc123", "smartListIds": ["sl_123"], "csvPath": "/uploads/users.csv", "userListId": "ul_123", "isDynamic": false},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_abc123', 'smartListIds': ['sl_123'], 'csvPath': '/uploads/users.csv', 'userListId': 'ul_123', 'isDynamic': false}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete ad account
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-delete-ad-account
Remove a Google Ads account connection from a account
Remove a Google Ads account connection from a account
```http theme={null}
DELETE https://services.leadconnectorhq.com/ad-publishing/google/ad-accounts/{adAccountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Ad account identifier
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/ad-publishing/google/ad-accounts/YOUR_adAccountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/ad-accounts/YOUR_adAccountId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/ad-publishing/google/ad-accounts/YOUR_adAccountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete conversion
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-delete-conversion
Delete a Google Ads conversion action by ID
Delete a Google Ads conversion action by ID
```http theme={null}
DELETE https://services.leadconnectorhq.com/ad-publishing/google/conversions/{conversionId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Conversion identifier
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/ad-publishing/google/conversions/YOUR_conversionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/conversions/YOUR_conversionId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/ad-publishing/google/conversions/YOUR_conversionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete segment
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-delete-segment
Delete a Google Ads audience segment by ID
Delete a Google Ads audience segment by ID
```http theme={null}
DELETE https://services.leadconnectorhq.com/ad-publishing/google/segments/{segmentId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Segment identifier
## Query parameters
Account identifier
Segment type
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/ad-publishing/google/segments/YOUR_segmentId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/segments/YOUR_segmentId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/ad-publishing/google/segments/YOUR_segmentId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get ad account details
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-ad-account-details
Retrieve details of a specific Google Ads account
Retrieve details of a specific Google Ads account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/ad-accounts/{adAccountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Ad account identifier
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/ad-accounts/YOUR_adAccountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/ad-accounts/YOUR_adAccountId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/ad-accounts/YOUR_adAccountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Google ad accounts
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-ad-accounts
Retrieve Google Ads accounts available for the connected user
Retrieve Google Ads accounts available for the connected user
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/ad-accounts
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Account type
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/ad-accounts' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/ad-accounts', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/ad-accounts',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get assets
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-assets
Retrieve Google Ads creative assets for a account
Retrieve Google Ads creative assets for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/assets
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Asset type to retrieve
Asset identifier
Advertiser only flag
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/assets' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/assets', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/assets',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get audience by ID
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-audience-by-id
Retrieve a specific Google Ads combined audience by ID
Retrieve a specific Google Ads combined audience by ID
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/audiences/{audienceId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Audience identifier
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/audiences/YOUR_audienceId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/audiences/YOUR_audienceId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/audiences/YOUR_audienceId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get audiences
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-audiences
Retrieve Google Ads combined audiences for a account
Retrieve Google Ads combined audiences for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/audiences
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/audiences' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/audiences', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/audiences',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Google campaign by ID
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-campaign-by-id
Retrieve a specific Google Ads campaign by ID
Retrieve a specific Google Ads campaign by ID
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/ads/{adId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Ad identifier
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/ads/YOUR_adId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/ads/YOUR_adId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/ads/YOUR_adId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get campaign reporting
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-campaign-reporting
Retrieve reporting metrics for a specific Google campaign
Retrieve reporting metrics for a specific Google campaign
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/reporting/campaign/{campaignId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Campaign identifier
## Query parameters
Account identifier
Report start date
Report end date
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/reporting/campaign/YOUR_campaignId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/reporting/campaign/YOUR_campaignId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/reporting/campaign/YOUR_campaignId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get conversion by ID
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-conversion-by-id
Retrieve a specific Google Ads conversion action by ID
Retrieve a specific Google Ads conversion action by ID
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/conversions/{conversionId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Conversion identifier
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/conversions/YOUR_conversionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/conversions/YOUR_conversionId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/conversions/YOUR_conversionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get conversion goals
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-conversion-goals
Retrieve Google Ads conversion goals for a account
Retrieve Google Ads conversion goals for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/conversion-goals
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/conversion-goals' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/conversion-goals', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/conversion-goals',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get conversions
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-conversions
Retrieve Google Ads conversion actions for a account
Retrieve Google Ads conversion actions for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/conversions
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Integration type
Conversion type
Conversion category
Filter start date
Filter end date
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/conversions' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/conversions', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/conversions',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get current Google user
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-current-user
Retrieve the authenticated Google user info for a account
Retrieve the authenticated Google user info for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/me
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/me' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/me', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/me',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get entities
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-entity
Retrieve Google campaigns, ad groups, or ads based on entity type
Retrieve Google campaigns, ad groups, or ads based on entity type
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/entity
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Integration type
Campaign identifier
Ad group identifier
Entity type
Search identifier
Filter start date
Filter end date
Selected ad account ID
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/entity' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/entity', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/entity',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Google integration
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-integration
Retrieve the Google Ads integration details for a account
Retrieve the Google Ads integration details for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/integration
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/integration' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/integration', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/integration',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get keyword ideas
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-keyword-ideas
Retrieve keyword suggestions for Google Ads campaigns
Retrieve keyword suggestions for Google Ads campaigns
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/google/keyword-ideas
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
## Body
Target URL
Language code
Target accounts
Seed keywords
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/google/keyword-ideas' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com",
"languageCode": "en",
"locations": [
"US",
"CA"
],
"keywords": [
"marketing"
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/keyword-ideas', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"url": "https://example.com", "languageCode": "en", "locations": ["US", "CA"], "keywords": ["marketing"]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/google/keyword-ideas',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"url": "https://example.com", "languageCode": "en", "locations": ["US", "CA"], "keywords": ["marketing"]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'url': 'https://example.com', 'languageCode': 'en', 'locations': ['US', 'CA'], 'keywords': ['marketing']}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get reporting data
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-reporting
Retrieve aggregated Google Ads reporting metrics for a account
Retrieve aggregated Google Ads reporting metrics for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/reporting
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Group by period
Report start date
Report end date
Integration type
Comma-separated reporting fields
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/reporting' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/reporting', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/reporting',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get reporting list
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-reporting-list
Retrieve a list of Google campaigns or ad groups with reporting data
Retrieve a list of Google campaigns or ad groups with reporting data
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/reporting/list
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Report list type
Report start date
Report end date
Campaign identifier
Integration type
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/reporting/list' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/reporting/list', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/reporting/list',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get segment by ID
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-segment-by-id
Retrieve a specific Google Ads audience segment by ID
Retrieve a specific Google Ads audience segment by ID
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/segments/{segmentId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Segment identifier
## Query parameters
Account identifier
Segment type
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/segments/YOUR_segmentId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/segments/YOUR_segmentId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/segments/YOUR_segmentId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get segments
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-segments
Retrieve Google Ads audience segments for a account
Retrieve Google Ads audience segments for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/segments
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Segment type
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/segments' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/segments', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/segments',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get target interests
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-get-target-interests
Retrieve affinity and in-market audience options for Google Ads targeting
Retrieve affinity and in-market audience options for Google Ads targeting
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/target-interests
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Interest type
Channel type
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/target-interests' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/target-interests', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/target-interests',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Publish ad
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-publish-ad
Publish a Google ad and push it live
Publish a Google ad and push it live
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/google/ads/{adId}/publish
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Ad identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/google/ads/YOUR_adId/publish' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/ads/YOUR_adId/publish', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/google/ads/YOUR_adId/publish',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Search targeting options
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-search-targeting
Search Google geo-accounts for ad targeting
Search Google geo-accounts for ad targeting
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/google/targeting/search
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Search type
Search query
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/google/targeting/search' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/targeting/search', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/google/targeting/search',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Upsert assets
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-upsert-assets
Create or update Google Ads creative assets
Create or update Google Ads creative assets
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/google/assets
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account identifier
Asset type to create or update Posibles valores: 'CALL', 'SITELINK', 'LEAD\_FORM'
Asset payload — shape depends on the type field: CallAssetPayload (CALL), SitelinkAssetPayload (SITELINK), or LeadFormAssetPayload (LEAD\_FORM)
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/google/assets' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_abc123",
"type": "CALL"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/assets', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_abc123", "type": "CALL"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/google/assets',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_abc123", "type": "CALL"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_abc123', 'type': 'CALL'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Upsert audience
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-upsert-audience
Create or update a Google Ads combined audience
Create or update a Google Ads combined audience
```http theme={null}
PUT https://services.leadconnectorhq.com/ad-publishing/google/audiences
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account identifier
Audience resource name
Audience name
Audience dimensions
Exclusion dimensions
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/ad-publishing/google/audiences' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_abc123",
"resourceName": "customers/123/audiences/456",
"name": "My Audience"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/audiences', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_abc123", "resourceName": "customers/123/audiences/456", "name": "My Audience"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/ad-publishing/google/audiences',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_abc123", "resourceName": "customers/123/audiences/456", "name": "My Audience"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_abc123', 'resourceName': 'customers/123/audiences/456', 'name': 'My Audience'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Upsert Google campaign
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-upsert-campaign
Create or update a full Google Ads campaign structure
Create or update a full Google Ads campaign structure
```http theme={null}
PUT https://services.leadconnectorhq.com/ad-publishing/google/ads
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Campaign identifier
Campaign name
Account identifier
Advertising channel Posibles valores: 'SEARCH', 'DISCOVERY', 'DISPLAY', 'HOTEL', 'LOCAL', 'MULTI\_CHANNEL', 'PERFORMANCE\_MAX', 'DEMAND\_GEN'
Channel sub type Posibles valores: 'DEMAND\_GEN'
Goal type Posibles valores: 'WEBSITE\_TRAFFIC', 'LEAD'
Campaign budget
Campaign audience targeting
Network settings
Bidding strategy config
Campaign assets
EU political ads flag
Campaign ad groups
Ad group identifier
Google ad group identifier
Ad group name
Ad campaign identifier
Ad content items
Ad identifier
Ad name
Media type Posibles valores: 'IMAGE', 'VIDEO', 'CAROUSEL'
Ad headlines
Long headlines
Ad descriptions
Final URL
Display path 1
Display path 2
Whether the ad is soft-deleted
Ad-level error message from Google
Ad publishing status Posibles valores: 'DRAFT', 'SCHEDULED', 'PUBLISHED', 'PUBLISHING', 'FAILED', 'IN\_REVIEW', 'PAUSED', 'ARCHIVED', 'WITH\_ISSUES', 'REJECTED'
Internal ad identifier
Ad campaign identifier
Ad group identifier
Google Ads ad resource ID
Ad media items
Media type Posibles valores: 'IMAGE'
Media source URL
Is logo flag
Error message if media failed
Public URL of the media
Image type classification
Call to action label Posibles valores: 'AUTOMATED', 'LEARN\_MORE', 'GET\_QUOTE', 'APPLY\_NOW', 'SIGN\_UP', 'CONTACT\_US', 'SUBSCRIBE', 'DOWNLOAD', 'BOOK\_NOW', 'SHOP\_NOW', 'BUY\_NOW', 'DONATE\_NOW', 'ORDER\_NOW', 'PLAY\_NOW', 'SEE\_MORE'
Business name
YouTube video links
YouTube video ID
Carousel cards
Card headline
Card final URL
Call to action label
Card media items
Media type Posibles valores: 'IMAGE'
Media source URL
Is logo flag
Error message if media failed
Public URL of the media
Image type classification
Channel placements
Custom channels flag
Keyword targeting
Ad group publishing status Posibles valores: 'DRAFT', 'SCHEDULED', 'PUBLISHED', 'PUBLISHING', 'FAILED', 'IN\_REVIEW', 'PAUSED', 'ARCHIVED', 'WITH\_ISSUES', 'REJECTED'
Ad group-level error from Google
Google Ads ad group resource ID
Custom channels flag
Selected channel placements
Google audience resource ID
Ad group audience targeting
Campaign goal config
Ad schedule rules
Day of week Posibles valores: 'FRIDAY', 'MONDAY', 'SATURDAY', 'SUNDAY', 'THURSDAY', 'TUESDAY', 'UNKNOWN', 'UNSPECIFIED', 'WEDNESDAY', 'ALL\_DAYS', 'MONDAY\_TO\_FRIDAY', 'SATURDAY\_AND\_SUNDAY'
Start time (HH:MM)
End time (HH:MM)
Publishing status Posibles valores: 'DRAFT', 'SCHEDULED', 'PUBLISHED', 'PUBLISHING', 'FAILED', 'IN\_REVIEW', 'PAUSED', 'ARCHIVED', 'WITH\_ISSUES', 'REJECTED'
Google Ad account identifier
Whether the campaign has unpublished changes
Maximum CPC bid in micros
Google Ads campaign resource ID
Traffic source
Advanced options
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/ad-publishing/google/ads' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"id": "string",
"name": "My Campaign",
"locationId": "loc_abc123",
"advertisingChannelType": "SEARCH",
"advertisingChannelSubType": "DEMAND_GEN",
"goalType": "WEBSITE_TRAFFIC",
"isEuPoliticalAds": false,
"adGroups": [
{
"id": "string",
"adGroupId": "string",
"name": "Ad Group 1",
"adCampaignId": "string",
"adContent": [
{}
],
"publishingStatus": "DRAFT",
"adGroupError": "string",
"googleAdGroupId": "string",
"customChannels": true,
"selectedChannels": [
"GMAIL"
],
"googleAudienceId": "string"
}
],
"adSchedule": [
{
"dayOfWeek": "FRIDAY",
"from": "09:00",
"to": "17:00"
}
],
"publishingStatus": "DRAFT",
"googleAdAccountId": "string",
"unpublishedChanges": true,
"maximumCpc": 0,
"googleCampaignId": "string",
"source": "WEBSITE",
"advancedOptions": {}
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/ads', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"id": "string", "name": "My Campaign", "locationId": "loc_abc123", "advertisingChannelType": "SEARCH", "advertisingChannelSubType": "DEMAND_GEN", "goalType": "WEBSITE_TRAFFIC", "isEuPoliticalAds": false, "adGroups": [{"id": "string", "adGroupId": "string", "name": "Ad Group 1", "adCampaignId": "string", "adContent": [{}], "publishingStatus": "DRAFT", "adGroupError": "string", "googleAdGroupId": "string", "customChannels": true, "selectedChannels": ["GMAIL"], "googleAudienceId": "string"}], "adSchedule": [{"dayOfWeek": "FRIDAY", "from": "09:00", "to": "17:00"}], "publishingStatus": "DRAFT", "googleAdAccountId": "string", "unpublishedChanges": true, "maximumCpc": 0, "googleCampaignId": "string", "source": "WEBSITE", "advancedOptions": {}}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/ad-publishing/google/ads',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"id": "string", "name": "My Campaign", "locationId": "loc_abc123", "advertisingChannelType": "SEARCH", "advertisingChannelSubType": "DEMAND_GEN", "goalType": "WEBSITE_TRAFFIC", "isEuPoliticalAds": false, "adGroups": [{"id": "string", "adGroupId": "string", "name": "Ad Group 1", "adCampaignId": "string", "adContent": [{}], "publishingStatus": "DRAFT", "adGroupError": "string", "googleAdGroupId": "string", "customChannels": true, "selectedChannels": ["GMAIL"], "googleAudienceId": "string"}], "adSchedule": [{"dayOfWeek": "FRIDAY", "from": "09:00", "to": "17:00"}], "publishingStatus": "DRAFT", "googleAdAccountId": "string", "unpublishedChanges": true, "maximumCpc": 0, "googleCampaignId": "string", "source": "WEBSITE", "advancedOptions": {}},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'id': 'string', 'name': 'My Campaign', 'locationId': 'loc_abc123', 'advertisingChannelType': 'SEARCH', 'advertisingChannelSubType': 'DEMAND_GEN', 'goalType': 'WEBSITE_TRAFFIC', 'isEuPoliticalAds': false, 'adGroups': [{'id': 'string', 'adGroupId': 'string', 'name': 'Ad Group 1', 'adCampaignId': 'string', 'adContent': [{}], 'publishingStatus': 'DRAFT', 'adGroupError': 'string', 'googleAdGroupId': 'string', 'customChannels': true, 'selectedChannels': ['GMAIL'], 'googleAudienceId': 'string'}], 'adSchedule': [{'dayOfWeek': 'FRIDAY', 'from': '09:00', 'to': '17:00'}], 'publishingStatus': 'DRAFT', 'googleAdAccountId': 'string', 'unpublishedChanges': true, 'maximumCpc': 0, 'googleCampaignId': 'string', 'source': 'WEBSITE', 'advancedOptions': {}}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Upsert conversion
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-upsert-conversion
Create or update a Google Ads conversion action
Create or update a Google Ads conversion action
```http theme={null}
PUT https://services.leadconnectorhq.com/ad-publishing/google/conversions
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account identifier
Conversion identifier
Conversion name
Conversion type Posibles valores: 'UPLOAD\_CLICKS', 'UPLOAD\_CALLS', 'WEBPAGE', 'LEAD\_FORM\_SUBMIT'
Conversion category
Value settings that control how monetary value is attributed to conversions
How conversions are counted per interaction Posibles valores: 'ONE\_PER\_CLICK', 'MANY\_PER\_CLICK'
Attribution model used to credit conversions Posibles valores: 'GOOGLE\_SEARCH\_ATTRIBUTION\_DATA\_DRIVEN', 'GOOGLE\_ADS\_LAST\_CLICK'
Click-through conversion window in days
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/ad-publishing/google/conversions' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_abc123",
"conversionId": "conv_456",
"name": "Purchase Conversion",
"type": "WEBPAGE",
"category": "PURCHASE",
"valueSettings": {
"defaultValue": "10.00",
"defaultCurrencyCode": "USD",
"alwaysUseDefaultValue": false
},
"countingType": "ONE_PER_CLICK",
"attributionModel": "GOOGLE_ADS_LAST_CLICK",
"clickThroughWindow": 30
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/conversions', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_abc123", "conversionId": "conv_456", "name": "Purchase Conversion", "type": "WEBPAGE", "category": "PURCHASE", "valueSettings": {"defaultValue": "10.00", "defaultCurrencyCode": "USD", "alwaysUseDefaultValue": false}, "countingType": "ONE_PER_CLICK", "attributionModel": "GOOGLE_ADS_LAST_CLICK", "clickThroughWindow": 30}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/ad-publishing/google/conversions',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_abc123", "conversionId": "conv_456", "name": "Purchase Conversion", "type": "WEBPAGE", "category": "PURCHASE", "valueSettings": {"defaultValue": "10.00", "defaultCurrencyCode": "USD", "alwaysUseDefaultValue": false}, "countingType": "ONE_PER_CLICK", "attributionModel": "GOOGLE_ADS_LAST_CLICK", "clickThroughWindow": 30},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_abc123', 'conversionId': 'conv_456', 'name': 'Purchase Conversion', 'type': 'WEBPAGE', 'category': 'PURCHASE', 'valueSettings': {'defaultValue': '10.00', 'defaultCurrencyCode': 'USD', 'alwaysUseDefaultValue': false}, 'countingType': 'ONE_PER_CLICK', 'attributionModel': 'GOOGLE_ADS_LAST_CLICK', 'clickThroughWindow': 30}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Upsert segment
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-google-upsert-segment
Create or update a Google Ads audience segment
Create or update a Google Ads audience segment
```http theme={null}
PUT https://services.leadconnectorhq.com/ad-publishing/google/segments
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Segment type
## Body
Segment name
Segment description
Segment members — keywords, URLs, or apps that define the custom segment
Member type Posibles valores: 'KEYWORD', 'URL', 'APP'
Keyword value
URL value
App identifier
Segment status
Segment type
Segment identifier
Membership status
Rule-based user list config
Membership life span
Seed user list IDs
Country codes
Expansion level Posibles valores: 'BALANCED', 'BROAD', 'NARROW'
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/ad-publishing/google/segments' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "My Segment",
"description": "Target audience segment",
"members": [
{
"memberType": "KEYWORD",
"keyword": "digital marketing"
},
{
"memberType": "URL",
"url": "https://example.com"
},
{
"memberType": "APP",
"app": "com.example.app"
}
],
"status": "ENABLED",
"type": "CUSTOM_SEGMENTS",
"id": "seg_123",
"membershipStatus": "OPEN",
"membershipLifeSpan": 30,
"seedUserListIds": [
"list_1"
],
"countryCodes": [
"US",
"CA"
],
"expansionLevel": "BALANCED"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/segments', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "My Segment", "description": "Target audience segment", "members": [{"memberType": "KEYWORD", "keyword": "digital marketing"}, {"memberType": "URL", "url": "https://example.com"}, {"memberType": "APP", "app": "com.example.app"}], "status": "ENABLED", "type": "CUSTOM_SEGMENTS", "id": "seg_123", "membershipStatus": "OPEN", "membershipLifeSpan": 30, "seedUserListIds": ["list_1"], "countryCodes": ["US", "CA"], "expansionLevel": "BALANCED"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/ad-publishing/google/segments',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "My Segment", "description": "Target audience segment", "members": [{"memberType": "KEYWORD", "keyword": "digital marketing"}, {"memberType": "URL", "url": "https://example.com"}, {"memberType": "APP", "app": "com.example.app"}], "status": "ENABLED", "type": "CUSTOM_SEGMENTS", "id": "seg_123", "membershipStatus": "OPEN", "membershipLifeSpan": 30, "seedUserListIds": ["list_1"], "countryCodes": ["US", "CA"], "expansionLevel": "BALANCED"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'My Segment', 'description': 'Target audience segment', 'members': [{'memberType': 'KEYWORD', 'keyword': 'digital marketing'}, {'memberType': 'URL', 'url': 'https://example.com'}, {'memberType': 'APP', 'app': 'com.example.app'}], 'status': 'ENABLED', 'type': 'CUSTOM_SEGMENTS', 'id': 'seg_123', 'membershipStatus': 'OPEN', 'membershipLifeSpan': 30, 'seedUserListIds': ['list_1'], 'countryCodes': ['US', 'CA'], 'expansionLevel': 'BALANCED'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create LinkedIn integration
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-create-integration
Create a LinkedIn Ads integration for a account with ad account details
Create a LinkedIn Ads integration for a account with ad account details
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/linkedin/integration
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account identifier
Ad account identifier
Ad account name
Currency code
Organization identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/linkedin/integration' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_123",
"adAccountId": "12345678",
"adAccountName": "My Ad Account",
"currencyCode": "USD",
"organizationId": "12345678"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/integration', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_123", "adAccountId": "12345678", "adAccountName": "My Ad Account", "currencyCode": "USD", "organizationId": "12345678"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/integration',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_123", "adAccountId": "12345678", "adAccountName": "My Ad Account", "currencyCode": "USD", "organizationId": "12345678"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_123', 'adAccountId': '12345678', 'adAccountName': 'My Ad Account', 'currencyCode': 'USD', 'organizationId': '12345678'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create lead form
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-create-lead-form
Create a new LinkedIn lead gen form for an ad account
Create a new LinkedIn lead gen form for an ad account
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/linkedin/{accountId}/form
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
## Body
Form owner
Creation locale
Form name
Form state Posibles valores: 'PUBLISHED'
Form content
Hidden fields
Field name
Field value
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/linkedin/YOUR_accountId/form' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "Contact Us",
"state": "PUBLISHED",
"hiddenFields": [
{
"name": "utm_source",
"value": "linkedin"
}
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/YOUR_accountId/form', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "Contact Us", "state": "PUBLISHED", "hiddenFields": [{"name": "utm_source", "value": "linkedin"}]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/YOUR_accountId/form',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "Contact Us", "state": "PUBLISHED", "hiddenFields": [{"name": "utm_source", "value": "linkedin"}]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'Contact Us', 'state': 'PUBLISHED', 'hiddenFields': [{'name': 'utm_source', 'value': 'linkedin'}]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete ad account
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-delete-ad-account
Remove a LinkedIn ad account connection from a account
Remove a LinkedIn ad account connection from a account
```http theme={null}
DELETE https://services.leadconnectorhq.com/ad-publishing/linkedin/ad-account
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Ad account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/ad-publishing/linkedin/ad-account' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/ad-account', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/ad-account',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get ad account details
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-get-ad-account-details
Retrieve details of a specific LinkedIn ad account
Retrieve details of a specific LinkedIn ad account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/linkedin/ad-account
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Ad account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/linkedin/ad-account' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/ad-account', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/ad-account',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get LinkedIn ad accounts
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-get-ad-accounts
Retrieve LinkedIn Ads accounts available for the connected user
Retrieve LinkedIn Ads accounts available for the connected user
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/linkedin/ad-accounts
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/linkedin/ad-accounts' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/ad-accounts', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/ad-accounts',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get ad analytics
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-get-ad-analytics
Retrieve LinkedIn Ads analytics data with configurable pivot and time grouping
Retrieve LinkedIn Ads analytics data with configurable pivot and time grouping
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account ID
Analytics pivot type
Time granularity for analytics
Start date in yyyy-mm-dd format
End date in yyyy-mm-dd format
Comma-separated list of entity URNs
Comma-separated list of fields to retrieve
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get ad campaign group
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-get-campaign-group
Retrieve a LinkedIn ad campaign group by ID
Retrieve a LinkedIn ad campaign group by ID
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/linkedin/ads/{adId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Ad identifier
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/linkedin/ads/YOUR_adId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/ads/YOUR_adId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/ads/YOUR_adId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get campaign group reporting
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-get-campaign-group-reporting
Retrieve reporting metrics for a specific LinkedIn campaign group
Retrieve reporting metrics for a specific LinkedIn campaign group
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/campaign-group/{campaignGroupId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Campaign group identifier
## Query parameters
Account ID
Start date in yyyy-mm-dd format
End date in yyyy-mm-dd format
Comma-separated list of fields to retrieve
Campaign group ID
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/campaign-group/YOUR_campaignGroupId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/campaign-group/YOUR_campaignGroupId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/campaign-group/YOUR_campaignGroupId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get current LinkedIn user
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-get-current-user
Retrieve the authenticated LinkedIn user info for a account
Retrieve the authenticated LinkedIn user info for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/linkedin/me
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/linkedin/me' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/me', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/me',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get LinkedIn integration
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-get-integration
Retrieve the LinkedIn Ads integration details for a account
Retrieve the LinkedIn Ads integration details for a account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/linkedin/integration
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/linkedin/integration' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/integration', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/integration',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get lead forms
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-get-lead-forms
Retrieve LinkedIn lead gen forms for an ad account
Retrieve LinkedIn lead gen forms for an ad account
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/linkedin/{accountId}/forms
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account identifier
## Query parameters
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/linkedin/YOUR_accountId/forms' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/YOUR_accountId/forms', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/YOUR_accountId/forms',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get reporting list
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-get-reporting-list
Retrieve a list of LinkedIn campaigns or campaign groups with reporting data
Retrieve a list of LinkedIn campaigns or campaign groups with reporting data
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/list
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account ID
List type
Campaign ID
Campaign group ID
Start date in yyyy-mm-dd format
End date in yyyy-mm-dd format
Comma-separated list of fields to retrieve
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/list' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/list', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/list',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Publish ad campaign group
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-publish-campaign-group
Publish a LinkedIn ad campaign group and push it live
Publish a LinkedIn ad campaign group and push it live
```http theme={null}
POST https://services.leadconnectorhq.com/ad-publishing/linkedin/ads/{adId}/publish
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Ad identifier
## Body
Account identifier
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/linkedin/ads/YOUR_adId/publish' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HChooFuiyPpVYzeJ4HMe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/ads/YOUR_adId/publish', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HChooFuiyPpVYzeJ4HMe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/ads/YOUR_adId/publish',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HChooFuiyPpVYzeJ4HMe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HChooFuiyPpVYzeJ4HMe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Search targeting options
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-search-targeting
Search LinkedIn targeting facets such as accounts, industries, and job titles
Search LinkedIn targeting facets such as accounts, industries, and job titles
```http theme={null}
GET https://services.leadconnectorhq.com/ad-publishing/linkedin/targeting/search
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier
Targeting facet
Search query
Query parameter
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/ad-publishing/linkedin/targeting/search' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/targeting/search', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/targeting/search',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update ad status
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-update-ad-status
Pause or resume a LinkedIn ad, campaign, or ad group
Pause or resume a LinkedIn ad, campaign, or ad group
```http theme={null}
PATCH https://services.leadconnectorhq.com/ad-publishing/linkedin/{adId}/status
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Ad identifier
## Query parameters
Account identifier
## Body
Update operation Posibles valores: 'PAUSED', 'ARCHIVED', 'RESUME'
Ad object type Posibles valores: 'adGroup', 'adCampaign', 'ad'
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PATCH 'https://services.leadconnectorhq.com/ad-publishing/linkedin/YOUR_adId/status' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"operationType": "PAUSED",
"type": "adCampaign"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/YOUR_adId/status', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"operationType": "PAUSED", "type": "adCampaign"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/YOUR_adId/status',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"operationType": "PAUSED", "type": "adCampaign"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'operationType': 'PAUSED', 'type': 'adCampaign'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Upsert ad campaign group
Source: https://developers.leadwaycrm.com/api-reference/ad-manager/ad-manager-li-upsert-campaign-group
Create or update a LinkedIn ad campaign group with campaigns and ads
Create or update a LinkedIn ad campaign group with campaigns and ads
```http theme={null}
PUT https://services.leadconnectorhq.com/ad-publishing/linkedin/ads
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account ID
Posibles valores: 'DAILY', 'LIFETIME'
Schedule start date (ISO 8601)
Schedule end date (ISO 8601)
Campaign locale
Posibles valores: 'DRAFT', 'SCHEDULED', 'PUBLISHED', 'PUBLISHING', 'FAILED', 'IN\_REVIEW', 'PAUSED', 'ARCHIVED', 'WITH\_ISSUES', 'REJECTED'
Campaign audience targeting Posibles valores: 'STANDARD\_UPDATE', 'SINGLE\_VIDEO', 'CAROUSEL'
Campaign audience targeting
Bid unit cost
Media type Posibles valores: 'video', 'image'
Media source URL
Video frame URLs
Selected poster frame index
Thumbnail URL
Media name
Media headline
Click-through destination URL
File size in bytes
Posibles valores: 'DRAFT', 'SCHEDULED', 'PUBLISHED', 'PUBLISHING', 'FAILED', 'IN\_REVIEW', 'PAUSED', 'ARCHIVED', 'WITH\_ISSUES', 'REJECTED'
LinkedIn API error message
LinkedIn API error message
Posibles valores: 'MAXIMUM\_DELIVERY', 'COST\_CAP'
Posibles valores: 'LEAD\_GENERATION', 'WEBSITE\_VISIT'
Posibles valores: 'DRAFT', 'SCHEDULED', 'PUBLISHED', 'PUBLISHING', 'FAILED', 'IN\_REVIEW', 'PAUSED', 'ARCHIVED', 'WITH\_ISSUES', 'REJECTED'
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/ad-publishing/linkedin/ads' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"id": "string",
"locationId": "string",
"budget": {
"budgetType": "DAILY",
"amount": 0,
"scheduleStartDate": "2025-01-01",
"scheduleEndDate": "2025-12-31"
},
"adCampaigns": [
{
"id": "string",
"name": "string",
"publishingStatus": "DRAFT",
"mediaType": "STANDARD_UPDATE",
"campaignType": "string",
"adCampaignGroupId": "string",
"adCampaignId": "string",
"ads": [
{}
],
"linkedInError": "string",
"meta": {}
}
],
"adBudgetOptimization": "MAXIMUM_DELIVERY",
"objectiveType": "LEAD_GENERATION",
"name": "string",
"adCampaignGroupId": "string",
"publishingStatus": "DRAFT",
"linkedInAdAccountId": "string",
"unpublishedChanges": true,
"meta": {},
"linkedInError": "string"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/ads', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"id": "string", "locationId": "string", "budget": {"budgetType": "DAILY", "amount": 0, "scheduleStartDate": "2025-01-01", "scheduleEndDate": "2025-12-31"}, "adCampaigns": [{"id": "string", "name": "string", "publishingStatus": "DRAFT", "mediaType": "STANDARD_UPDATE", "campaignType": "string", "adCampaignGroupId": "string", "adCampaignId": "string", "ads": [{}], "linkedInError": "string", "meta": {}}], "adBudgetOptimization": "MAXIMUM_DELIVERY", "objectiveType": "LEAD_GENERATION", "name": "string", "adCampaignGroupId": "string", "publishingStatus": "DRAFT", "linkedInAdAccountId": "string", "unpublishedChanges": true, "meta": {}, "linkedInError": "string"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/ads',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"id": "string", "locationId": "string", "budget": {"budgetType": "DAILY", "amount": 0, "scheduleStartDate": "2025-01-01", "scheduleEndDate": "2025-12-31"}, "adCampaigns": [{"id": "string", "name": "string", "publishingStatus": "DRAFT", "mediaType": "STANDARD_UPDATE", "campaignType": "string", "adCampaignGroupId": "string", "adCampaignId": "string", "ads": [{}], "linkedInError": "string", "meta": {}}], "adBudgetOptimization": "MAXIMUM_DELIVERY", "objectiveType": "LEAD_GENERATION", "name": "string", "adCampaignGroupId": "string", "publishingStatus": "DRAFT", "linkedInAdAccountId": "string", "unpublishedChanges": true, "meta": {}, "linkedInError": "string"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'id': 'string', 'locationId': 'string', 'budget': {'budgetType': 'DAILY', 'amount': 0, 'scheduleStartDate': '2025-01-01', 'scheduleEndDate': '2025-12-31'}, 'adCampaigns': [{'id': 'string', 'name': 'string', 'publishingStatus': 'DRAFT', 'mediaType': 'STANDARD_UPDATE', 'campaignType': 'string', 'adCampaignGroupId': 'string', 'adCampaignId': 'string', 'ads': [{}], 'linkedInError': 'string', 'meta': {}}], 'adBudgetOptimization': 'MAXIMUM_DELIVERY', 'objectiveType': 'LEAD_GENERATION', 'name': 'string', 'adCampaignGroupId': 'string', 'publishingStatus': 'DRAFT', 'linkedInAdAccountId': 'string', 'unpublishedChanges': true, 'meta': {}, 'linkedInError': 'string'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Affiliate
Source: https://developers.leadwaycrm.com/api-reference/affiliate-manager/affiliate-manager-get-affiliate
Retrieve a single affiliate by id for a account.
Retrieve a single affiliate by id for a account.
```http theme={null}
GET https://services.leadconnectorhq.com/affiliate-manager/{locationId}/affiliates/{affiliateId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
Affiliate Id
## Respuestas
Affiliate id
Affiliate first name
Affiliate last name
Affiliate phone number
Whether the affiliate is deleted
Account id
Whether the affiliate is active
Affiliate address
Affiliate avatar URL
Created at timestamp
Created by audit info
Facebook URL
Instagram URL
LinkedIn URL
Twitter URL
YouTube URL
Website URL
Contact id associated with the affiliate
Campaign ids
VAT ID
Updated at timestamp
W8 form URL
W9 form URL
Last updated by audit info
Affiliate email
Affiliate revenue
Customer count
Lead count
Dropped customer count
Click count
Paid amount
Currency code
Owned amount
```json theme={null}
{
"_id": "63d147176c5bbc30e9e091a4",
"firstName": "John",
"lastName": "Doe",
"phone": "+1 888 888-8888",
"deleted": false,
"locationId": "ve9EPM428h8vShlRW1KT",
"active": true,
"address": "123 Main St",
"avatar": "https://example.com/avatar.png",
"createdAt": "2024-06-16T00:00:00.000Z",
"createdBy": {},
"facebookUrl": "https://facebook.com/johndoe",
"instagramUrl": "https://instagram.com/johndoe",
"linkedInUrl": "https://linkedin.com/in/johndoe",
"twitterUrl": "https://twitter.com/johndoe",
"youtubeUrl": "https://youtube.com/channel",
"websiteUrl": "https://example.com",
"contactId": "ve9EPM428h8vShlRW1KT",
"campaignIds": [
"650173614761b33c46d33b19"
],
"vatId": "VAT123",
"updatedAt": "2024-06-16T00:00:00.000Z",
"w8Form": "string",
"w9Form": "string",
"lastUpdatedBy": {},
"email": "john.doe@example.com",
"revenue": 1250.5,
"customer": 15,
"lead": 5,
"droppedCustomer": 2,
"clickCount": 100,
"paid": 500,
"currency": "USD",
"owned": 750
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/affiliates/YOUR_affiliateId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/affiliates/YOUR_affiliateId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/affiliates/YOUR_affiliateId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Affiliates
Source: https://developers.leadwaycrm.com/api-reference/affiliate-manager/affiliate-manager-list-affiliates
Retrieve the list of affiliates for a account.
Retrieve the list of affiliates for a account.
```http theme={null}
GET https://services.leadconnectorhq.com/affiliate-manager/{locationId}/affiliates
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
## Query parameters
Maximum number of records to return. Maximum allowed value is 100.
## Respuestas
Affiliate list
Affiliate id
Affiliate first name
Affiliate last name
Affiliate phone number
Whether the affiliate is deleted
Account id
Whether the affiliate is active
Affiliate address
Affiliate avatar URL
Created at timestamp
Created by audit info
Facebook URL
Instagram URL
LinkedIn URL
Twitter URL
YouTube URL
Website URL
Contact id associated with the affiliate
Campaign ids
VAT ID
Updated at timestamp
W8 form URL
W9 form URL
Last updated by audit info
Affiliate email
Affiliate revenue
Customer count
Lead count
Dropped customer count
Click count
Paid amount
Currency code
Owned amount
Pagination metadata
```json theme={null}
{
"affiliates": [
{
"_id": "63d147176c5bbc30e9e091a4",
"firstName": "John",
"lastName": "Doe",
"phone": "+1 888 888-8888",
"deleted": false,
"locationId": "ve9EPM428h8vShlRW1KT",
"active": true,
"address": "123 Main St",
"avatar": "https://example.com/avatar.png",
"createdAt": "2024-06-16T00:00:00.000Z",
"createdBy": {},
"facebookUrl": "https://facebook.com/johndoe",
"instagramUrl": "https://instagram.com/johndoe",
"linkedInUrl": "https://linkedin.com/in/johndoe",
"twitterUrl": "https://twitter.com/johndoe",
"youtubeUrl": "https://youtube.com/channel",
"websiteUrl": "https://example.com",
"contactId": "ve9EPM428h8vShlRW1KT",
"campaignIds": [
"650173614761b33c46d33b19"
],
"vatId": "VAT123",
"updatedAt": "2024-06-16T00:00:00.000Z",
"w8Form": "string",
"w9Form": "string",
"lastUpdatedBy": {},
"email": "john.doe@example.com",
"revenue": 1250.5,
"customer": 15,
"lead": 5,
"droppedCustomer": 2,
"clickCount": 100,
"paid": 500,
"currency": "USD",
"owned": 750
}
// truncado: 2 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/affiliates' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/affiliates', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/affiliates',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Commissions
Source: https://developers.leadwaycrm.com/api-reference/affiliate-manager/affiliate-manager-list-commissions
Retrieve the list of commissions for a account.
Retrieve the list of commissions for a account.
```http theme={null}
GET https://services.leadconnectorhq.com/affiliate-manager/{locationId}/commissions
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
## Query parameters
Campaign Id
Affiliate Id
Status
Query
Maximum number of records to return. Maximum allowed value is 100.
## Respuestas
Commission list
Commission id
Product id
Product name
Quantity
Product commission amount
Commission amount
Base amount
Unit discount
Campaign name
Commission percentage or value
Commission type
Transaction time
Transaction id
Affiliate id
Payout id
Commission status
Currency
Whether the item is a trial commission
Customer details
Created at
Event id
Campaign details
Affiliate details
Due date
Whether the commission is in live mode
Commission tier
Pagination metadata
```json theme={null}
{
"commissions": [
{
"_id": "6385d230f6d19db03eef6fb2",
"productId": "6385d230f6d19db03eef6fb2",
"productName": "Basic Plan",
"qty": 1,
"productCommission": 25,
"commissionAmount": 25,
"amount": 100,
"unitDiscount": 5,
"campaignName": "Summer Promo",
"commission": 25,
"commissionType": "percentage",
"transactionAt": "2024-06-16T00:00:00.000Z",
"transactionId": "txn_123",
"affiliateId": "6385d230f6d19db03eef6fb2",
"payoutId": "6385d230f6d19db03eef6fb2",
"status": "pending",
"currency": "USD",
"isTrial": false,
"createdAt": "2024-06-16T00:00:00.000Z",
"eventId": "evt_123",
"dueAt": "2024-06-30T00:00:00.000Z",
"liveMode": true,
"tier": 1
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/commissions' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/commissions', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/commissions',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Payouts
Source: https://developers.leadwaycrm.com/api-reference/affiliate-manager/affiliate-manager-list-payouts
Retrieve the list of payouts for a account.
Retrieve the list of payouts for a account.
```http theme={null}
GET https://services.leadconnectorhq.com/affiliate-manager/{locationId}/payouts
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
## Query parameters
Payout status
query
Affiliate Id
Campaign Id
## Respuestas
Payout list
Payout id
Account id
Affiliate id
Campaign id
Payout currency
Payout amount
Payout status
Payout month
Payout due date
Payout paid date
Payout metadata
Payout paid method
Alternate id
Whether the payout is deleted
Whether the payout is migrated
Created at timestamp
Updated at timestamp
Campaign name
Affiliate display name
Affiliate email
Primary payout method
Affiliate details
Pagination metadata
```json theme={null}
{
"payouts": [
{
"_id": "65df04201e428a0c5ebb6571",
"locationId": "ve9EPM428h8vShlRW1KT",
"affiliateId": "65df04201e428a0c5ebb6572",
"campaignId": "65df04201e428a0c5ebb6573",
"currency": "USD",
"amount": 150,
"status": "pending",
"payoutMonth": "2024-06-01T00:00:00.000Z",
"dueAt": "2024-06-30T00:00:00.000Z",
"paidAt": "2024-06-30T00:00:00.000Z",
"paidMeta": {},
"paidMethod": "manual",
"altId": "alt_123",
"deleted": false,
"isMigrated": false,
"createdAt": "2024-06-16T00:00:00.000Z",
"updatedAt": "2024-06-17T00:00:00.000Z",
"campaign": "Summer Promo",
"affiliateName": "John Doe",
"affiliateEmail": "john.doe@example.com",
"payoutMethod": "paypal"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/payouts' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/payouts', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/affiliate-manager/YOUR_locationId/payouts',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Association
Source: https://developers.leadwaycrm.com/api-reference/associations/associations-create-association
Allow you to create contact - contact , contact - custom objects associations, will add more in the future.Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3
Allow you to create contact - contact , contact - custom objects associations, will add more in the future.Documentation Link - [https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3](https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3)
```http theme={null}
POST https://services.leadconnectorhq.com/associations/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Association's Unique key
First Objects Association Label (custom\_objects.children)
First Objects Key
Second Object Association Label (contact)
Second Objects Key
## Respuestas
First Objects Association Label (custom\_objects.children)
First Objects Association Label (custom\_objects.children)
First Objects Key
Second Object Association Label (contact)
Second Objects Key
Association Type can be USER\_DEFINED or SYSTEM\_DEFINED
```json theme={null}
{
"locationId": "string",
"id": "ve9EPM428h8vShlRW1KT",
"key": "student",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact",
"associationType": "USER_DEFINED"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/associations/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "string",
"key": "student_teacher",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/associations/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "string", "key": "student_teacher", "firstObjectLabel": "student", "firstObjectKey": "custom_objects.children", "secondObjectLabel": "Teacher", "secondObjectKey": "contact"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/associations/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "string", "key": "student_teacher", "firstObjectLabel": "student", "firstObjectKey": "custom_objects.children", "secondObjectLabel": "Teacher", "secondObjectKey": "contact"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'string', 'key': 'student_teacher', 'firstObjectLabel': 'student', 'firstObjectKey': 'custom_objects.children', 'secondObjectLabel': 'Teacher', 'secondObjectKey': 'contact'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Relation for you associated entities.
Source: https://developers.leadwaycrm.com/api-reference/associations/associations-create-relation
Create Relation.Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3
Create Relation.Documentation Link - [https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3](https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3)
```http theme={null}
POST https://services.leadconnectorhq.com/associations/relations
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Your Sub Account's ID
Association's Id
First Record's Id. For instance, if you have an association between a contact and a custom object, and you specify the contact as the first object while creating the association, then your firstRecordId would be the contactId
Second Record's Id.For instance, if you have an association between a contact and a custom object, and you specify the custom object as the second entity while creating the association, then your secondRecordId would be the customObject record Id
## Respuestas
First Objects Association Label (custom\_objects.children)
First Objects Association Label (custom\_objects.children)
First Objects Key
Second Object Association Label (contact)
Second Objects Key
Association Type can be USER\_DEFINED or SYSTEM\_DEFINED
```json theme={null}
{
"locationId": "string",
"id": "ve9EPM428h8vShlRW1KT",
"key": "student",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact",
"associationType": "USER_DEFINED"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/associations/relations' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "clF1LD04GTUKN3b3XuOj",
"associationId": "ve9EPM428h8vShlRW1KT",
"firstRecordId": "ve9EPM428h8vShlRW1KT",
"secondRecordId": "ve9EPM428h8vShlRW1KT"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/associations/relations', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "clF1LD04GTUKN3b3XuOj", "associationId": "ve9EPM428h8vShlRW1KT", "firstRecordId": "ve9EPM428h8vShlRW1KT", "secondRecordId": "ve9EPM428h8vShlRW1KT"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/associations/relations',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "clF1LD04GTUKN3b3XuOj", "associationId": "ve9EPM428h8vShlRW1KT", "firstRecordId": "ve9EPM428h8vShlRW1KT", "secondRecordId": "ve9EPM428h8vShlRW1KT"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'clF1LD04GTUKN3b3XuOj', 'associationId': 've9EPM428h8vShlRW1KT', 'firstRecordId': 've9EPM428h8vShlRW1KT', 'secondRecordId': 've9EPM428h8vShlRW1KT'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Association
Source: https://developers.leadwaycrm.com/api-reference/associations/associations-delete-association
Delete USER_DEFINED Association By Id, deleting an association will also all the relations for that association
Delete USER\_DEFINED Association By Id, deleting an association will also all the relations for that association
```http theme={null}
DELETE https://services.leadconnectorhq.com/associations/{associationId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Respuestas
Deletion status
Association Id
```json theme={null}
{
"deleted": true,
"id": "6d6f6e676f5f6576656e7473",
"message": "Association deleted successfully"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/associations/YOUR_associationId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/associations/YOUR_associationId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/associations/YOUR_associationId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Relation
Source: https://developers.leadwaycrm.com/api-reference/associations/associations-delete-relation
Delete Relation
Delete Relation
```http theme={null}
DELETE https://services.leadconnectorhq.com/associations/relations/{relationId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Query parameters
Your Sub Account's ID
## Respuestas
First Objects Association Label (custom\_objects.children)
First Objects Association Label (custom\_objects.children)
First Objects Key
Second Object Association Label (contact)
Second Objects Key
Association Type can be USER\_DEFINED or SYSTEM\_DEFINED
```json theme={null}
{
"locationId": "string",
"id": "ve9EPM428h8vShlRW1KT",
"key": "student",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact",
"associationType": "USER_DEFINED"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/associations/relations/YOUR_relationId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/associations/relations/YOUR_relationId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/associations/relations/YOUR_relationId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get all associations for a account / account
Source: https://developers.leadwaycrm.com/api-reference/associations/associations-find-associations
Get all Associations
Get all Associations
```http theme={null}
GET https://services.leadconnectorhq.com/associations/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
## Respuestas
First Objects Association Label (custom\_objects.children)
First Objects Association Label (custom\_objects.children)
First Objects Key
Second Object Association Label (contact)
Second Objects Key
Association Type can be USER\_DEFINED or SYSTEM\_DEFINED
```json theme={null}
{
"locationId": "string",
"id": "ve9EPM428h8vShlRW1KT",
"key": "student",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact",
"associationType": "USER_DEFINED"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/associations/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/associations/', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/associations/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get association by ID
Source: https://developers.leadwaycrm.com/api-reference/associations/associations-get-association-by-id
Using this api you can get SYSTEM_DEFINED / USER_DEFINED association by id
Using this api you can get SYSTEM\_DEFINED / USER\_DEFINED association by id
```http theme={null}
GET https://services.leadconnectorhq.com/associations/{associationId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Respuestas
First Objects Association Label (custom\_objects.children)
First Objects Association Label (custom\_objects.children)
First Objects Key
Second Object Association Label (contact)
Second Objects Key
Association Type can be USER\_DEFINED or SYSTEM\_DEFINED
```json theme={null}
{
"locationId": "string",
"id": "ve9EPM428h8vShlRW1KT",
"key": "student",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact",
"associationType": "USER_DEFINED"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/associations/YOUR_associationId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/associations/YOUR_associationId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/associations/YOUR_associationId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get association by object keys
Source: https://developers.leadwaycrm.com/api-reference/associations/associations-get-association-by-object-keys
Get association by object keys like contacts, custom objects and opportunities. Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3
Get association by object keys like contacts, custom objects and opportunities. Documentation Link - [https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3](https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3)
```http theme={null}
GET https://services.leadconnectorhq.com/associations/objectKey/{objectKey}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Query parameters
## Respuestas
First Objects Association Label (custom\_objects.children)
First Objects Association Label (custom\_objects.children)
First Objects Key
Second Object Association Label (contact)
Second Objects Key
Association Type can be USER\_DEFINED or SYSTEM\_DEFINED
```json theme={null}
{
"locationId": "string",
"id": "ve9EPM428h8vShlRW1KT",
"key": "student",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact",
"associationType": "USER_DEFINED"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/associations/objectKey/YOUR_objectKey' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/associations/objectKey/YOUR_objectKey', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/associations/objectKey/YOUR_objectKey',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get association key by key name
Source: https://developers.leadwaycrm.com/api-reference/associations/associations-get-association-key-by-key-name
Using this api you can get standard / user defined association by key
Using this api you can get standard / user defined association by key
```http theme={null}
GET https://services.leadconnectorhq.com/associations/key/{key_name}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Query parameters
## Respuestas
First Objects Association Label (custom\_objects.children)
First Objects Association Label (custom\_objects.children)
First Objects Key
Second Object Association Label (contact)
Second Objects Key
Association Type can be USER\_DEFINED or SYSTEM\_DEFINED
```json theme={null}
{
"locationId": "string",
"id": "ve9EPM428h8vShlRW1KT",
"key": "student",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact",
"associationType": "USER_DEFINED"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/associations/key/YOUR_key_name' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/associations/key/YOUR_key_name', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/associations/key/YOUR_key_name',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get all relations By record Id
Source: https://developers.leadwaycrm.com/api-reference/associations/associations-get-relations-by-record-id
Get all relations by record Id
Get all relations by record Id
```http theme={null}
GET https://services.leadconnectorhq.com/associations/relations/{recordId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Query parameters
Your Sub Account's ID
Association Ids
## Respuestas
First Objects Association Label (custom\_objects.children)
First Objects Association Label (custom\_objects.children)
First Objects Key
Second Object Association Label (contact)
Second Objects Key
Association Type can be USER\_DEFINED or SYSTEM\_DEFINED
```json theme={null}
{
"locationId": "string",
"id": "ve9EPM428h8vShlRW1KT",
"key": "student",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact",
"associationType": "USER_DEFINED"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/associations/relations/YOUR_recordId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/associations/relations/YOUR_recordId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/associations/relations/YOUR_recordId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Association By Id
Source: https://developers.leadwaycrm.com/api-reference/associations/associations-update-association
Update Association , Allows you to update labels of an associations. Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3
Update Association , Allows you to update labels of an associations. Documentation Link - [https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3](https://doc.clickup.com/8631005/d/h/87cpx-293776/cd0f4122abc04d3)
```http theme={null}
PUT https://services.leadconnectorhq.com/associations/{associationId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
## Respuestas
First Objects Association Label (custom\_objects.children)
First Objects Association Label (custom\_objects.children)
First Objects Key
Second Object Association Label (contact)
Second Objects Key
Association Type can be USER\_DEFINED or SYSTEM\_DEFINED
```json theme={null}
{
"locationId": "string",
"id": "ve9EPM428h8vShlRW1KT",
"key": "student",
"firstObjectLabel": "student",
"firstObjectKey": "custom_objects.children",
"secondObjectLabel": "Teacher",
"secondObjectKey": "contact",
"associationType": "USER_DEFINED"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/associations/YOUR_associationId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"firstObjectLabel": "student",
"secondObjectLabel": "tutor"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/associations/YOUR_associationId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"firstObjectLabel": "student", "secondObjectLabel": "tutor"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/associations/YOUR_associationId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"firstObjectLabel": "student", "secondObjectLabel": "tutor"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'firstObjectLabel': 'student', 'secondObjectLabel': 'tutor'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Check url slug
Source: https://developers.leadwaycrm.com/api-reference/blogs/blogs-check-url-slug-exists
The "Check url slug" API allows check the blog slug validation which is needed before publishing any blog post. Please use blogs/check-slug.readonly. you can find the POST ID from the post edit url.
The "Check url slug" API allows check the blog slug validation which is needed before publishing any blog post. Please use blogs/check-slug.readonly. you can find the POST ID from the post edit url.
```http theme={null}
GET https://services.leadconnectorhq.com/blogs/posts/url-slug-exists
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
## Respuestas
Indicates whether the url slug exists or not
```json theme={null}
{
"exists": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/blogs/posts/url-slug-exists' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/blogs/posts/url-slug-exists', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/blogs/posts/url-slug-exists',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Blog Post
Source: https://developers.leadwaycrm.com/api-reference/blogs/blogs-create-blog-post
The "Create Blog Post" API allows you create blog post for any given blog site. Please use blogs/post.write
The "Create Blog Post" API allows you create blog post for any given blog site. Please use blogs/post.write
```http theme={null}
POST https://services.leadconnectorhq.com/blogs/posts
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
You can find the blog id from blog site dashboard link
Posibles valores: 'DRAFT', 'PUBLISHED', 'SCHEDULED', 'ARCHIVED'
This needs to be array of category ids, which you can get from the category get api call.
This needs to be author id, which you can get from the author get api call.
Provide ISO timestamp
## Respuestas
Array of category IDs associated with the blog post
Array of tags associated with the blog post
Indicates whether the blog post is archived
Unique identifier of the blog post
Title of the blog post
Description of the blog post
URL of the image associated with the blog post
Publication status of the blog post
Alternative text for the blog post image
URL slug for the blog post
Canonical link of the blog post
Identifier of the author of the blog post
Timestamp when the blog post was published
Timestamp when the blog post was last updated
```json theme={null}
{
"data": {
"categories": [
"659ecabc4a37969a2b7cc370",
"6683abde331c041f32c07aee"
],
"tags": [
"Apple",
"Banana"
],
"archived": false,
"_id": "66c381b38be80858b9af62b6",
"title": "Banana is good source of energy",
"description": "Description",
"imageUrl": "https://storage.googleapis.com/ghl-test/fACm0Ojm5oC70G3DcFmE/media/66b5aa3b1745b2713a8d033f.jpeg",
"status": "PUBLISHED",
"imageAltText": "alt",
"urlSlug": "banana-good-energy",
"canonicalLink": "https://blog.chatgpts.agency/post/test-8384",
"author": "659ec9634a3796e4e47cc360",
"publishedAt": "2024-08-19T17:14:57.000Z",
"updatedAt": "2024-08-19T17:32:36.182Z"
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/blogs/posts' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"title": "Your blog title",
"locationId": "Account ID",
"blogId": "Blog ID",
"imageUrl": "Image URl",
"description": "A short description",
"rawHTML": "
Your blog content
",
"status": "This can be PUBLISHED OR SCHEDULED OR ARCHIVED OR DRAFT",
"imageAltText": "Alt text for your blog image",
"categories": [
"9c48df2694a849b6089f9d0d3513efe",
"6683abde331c041f32c07aee"
],
"tags": [
"blog",
"seo"
],
"author": "6683abde331c041f32c07aea",
"urlSlug": "any-blog-post-url",
"canonicalLink": "https://tryghl.blog/post/testing-unsplash",
"publishedAt": "2025-02-05T18:30:47.000Z"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/blogs/posts', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"title": "Your blog title", "locationId": "Account ID", "blogId": "Blog ID", "imageUrl": "Image URl", "description": "A short description", "rawHTML": "
Your blog content
", "status": "This can be PUBLISHED OR SCHEDULED OR ARCHIVED OR DRAFT", "imageAltText": "Alt text for your blog image", "categories": ["9c48df2694a849b6089f9d0d3513efe", "6683abde331c041f32c07aee"], "tags": ["blog", "seo"], "author": "6683abde331c041f32c07aea", "urlSlug": "any-blog-post-url", "canonicalLink": "https://tryghl.blog/post/testing-unsplash", "publishedAt": "2025-02-05T18:30:47.000Z"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/blogs/posts',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"title": "Your blog title", "locationId": "Account ID", "blogId": "Blog ID", "imageUrl": "Image URl", "description": "A short description", "rawHTML": "
Your blog content
", "status": "This can be PUBLISHED OR SCHEDULED OR ARCHIVED OR DRAFT", "imageAltText": "Alt text for your blog image", "categories": ["9c48df2694a849b6089f9d0d3513efe", "6683abde331c041f32c07aee"], "tags": ["blog", "seo"], "author": "6683abde331c041f32c07aea", "urlSlug": "any-blog-post-url", "canonicalLink": "https://tryghl.blog/post/testing-unsplash", "publishedAt": "2025-02-05T18:30:47.000Z"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'title': 'Your blog title', 'locationId': 'Account ID', 'blogId': 'Blog ID', 'imageUrl': 'Image URl', 'description': 'A short description', 'rawHTML': '
Your blog content
', 'status': 'This can be PUBLISHED OR SCHEDULED OR ARCHIVED OR DRAFT', 'imageAltText': 'Alt text for your blog image', 'categories': ['9c48df2694a849b6089f9d0d3513efe', '6683abde331c041f32c07aee'], 'tags': ['blog', 'seo'], 'author': '6683abde331c041f32c07aea', 'urlSlug': 'any-blog-post-url', 'canonicalLink': 'https://tryghl.blog/post/testing-unsplash', 'publishedAt': '2025-02-05T18:30:47.000Z'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get all authors
Source: https://developers.leadwaycrm.com/api-reference/blogs/blogs-get-all-blog-authors-by-account
The "Get all authors" Api return the blog authors for a given account ID. Please use "blogs/author.readonly"
The "Get all authors" Api return the blog authors for a given account ID. Please use "blogs/author.readonly"
```http theme={null}
GET https://services.leadconnectorhq.com/blogs/authors
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
Number of authors to show in the listing
Number of authors to skip in listing
## Respuestas
Array of authors
```json theme={null}
{
"authors": [
{
"_id": "lMOzIQZne5m6zQ528sT6",
"name": "Leadway",
"locationId": "lMOzIQZne5m6zQ528sT6",
"updatedAt": "2025-01-03T11:06:35.822Z",
"canonicalLink": "https://tryghl.blog/post/technology"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/blogs/authors' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/blogs/authors', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/blogs/authors',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get all categories
Source: https://developers.leadwaycrm.com/api-reference/blogs/blogs-get-all-categories-by-account
The "Get all categories" Api return the blog categoies for a given account ID. Please use "blogs/category.readonly"
The "Get all categories" Api return the blog categoies for a given account ID. Please use "blogs/category.readonly"
```http theme={null}
GET https://services.leadconnectorhq.com/blogs/categories
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Number of categories to show in the listing
Number of categories to skip in listing
## Respuestas
Array of categories
```json theme={null}
{
"categories": [
{
"_id": "lMOzIQZne5m6zQ528sT6",
"label": "Leadway",
"locationId": "lMOzIQZne5m6zQ528sT6",
"updatedAt": "2025-01-03T11:06:35.822Z",
"canonicalLink": "https://tryghl.blog/doc/category/agency-growth",
"urlSlug": "agency-growth"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/blogs/categories' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/blogs/categories', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/blogs/categories',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Blog posts by Blog ID
Source: https://developers.leadwaycrm.com/api-reference/blogs/blogs-get-blog-post
The "Get Blog posts by Blog ID" API allows you get blog posts for any given blog site using blog ID.Please use blogs/posts.readonly
The "Get Blog posts by Blog ID" API allows you get blog posts for any given blog site using blog ID.Please use blogs/posts.readonly
```http theme={null}
GET https://services.leadconnectorhq.com/blogs/posts/all
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
search for any post by name
## Respuestas
Object containing response data of blog posts
Array of category IDs associated with the blog post
Array of tags associated with the blog post
Indicates whether the blog post is archived
Unique identifier of the blog post
Title of the blog post
Description of the blog post
URL of the image associated with the blog post
Publication status of the blog post
Alternative text for the blog post image
URL slug for the blog post
Canonical link of the blog post
Identifier of the author of the blog post
Timestamp when the blog post was published
Timestamp when the blog post was last updated
```json theme={null}
{
"blogs": [
{
"categories": [
"659ecabc4a37969a2b7cc370",
"6683abde331c041f32c07aee"
],
"tags": [
"Apple",
"Banana"
],
"archived": false,
"_id": "66c381b38be80858b9af62b6",
"title": "Banana is good source of energy",
"description": "Description",
"imageUrl": "https://storage.googleapis.com/ghl-test/fACm0Ojm5oC70G3DcFmE/media/66b5aa3b1745b2713a8d033f.jpeg",
"status": "PUBLISHED",
"imageAltText": "alt",
"urlSlug": "banana-good-energy",
"canonicalLink": "https://blog.chatgpts.agency/post/test-8384",
"author": "659ec9634a3796e4e47cc360",
"publishedAt": "2024-08-19T17:14:57.000Z",
"updatedAt": "2024-08-19T17:32:36.182Z"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/blogs/posts/all' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/blogs/posts/all', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/blogs/posts/all',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Blogs by Account ID
Source: https://developers.leadwaycrm.com/api-reference/blogs/blogs-get-blogs
The "Get Blogs by Account ID" API allows you get blogs using Account ID.Please use blogs/list.readonly
The "Get Blogs by Account ID" API allows you get blogs using Account ID.Please use blogs/list.readonly
```http theme={null}
GET https://services.leadconnectorhq.com/blogs/site/all
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
search for any post by name
## Respuestas
Object containing response data of blog
Unique identifier of the blog
Name of the blog
```json theme={null}
{
"data": [
{
"_id": "lMOzIQZne5m6zQ528sT6",
"name": "My blog"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/blogs/site/all' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/blogs/site/all', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/blogs/site/all',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Blog Post
Source: https://developers.leadwaycrm.com/api-reference/blogs/blogs-update-blog-post
The "Update Blog Post" API allows you update blog post for any given blog site. Please use blogs/post-update.write
The "Update Blog Post" API allows you update blog post for any given blog site. Please use blogs/post-update.write
```http theme={null}
PUT https://services.leadconnectorhq.com/blogs/posts/{postId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
You can find the blog id from blog site dashboard link
Posibles valores: 'DRAFT', 'PUBLISHED', 'SCHEDULED', 'ARCHIVED'
This needs to be array of category ids, which you can get from the category get api call.
This needs to be author id, which you can get from the author get api call.
Provide ISO timestamp
## Respuestas
Array of category IDs associated with the blog post
Array of tags associated with the blog post
Indicates whether the blog post is archived
Unique identifier of the blog post
Title of the blog post
Description of the blog post
URL of the image associated with the blog post
Publication status of the blog post
Alternative text for the blog post image
URL slug for the blog post
Canonical link of the blog post
Identifier of the author of the blog post
Timestamp when the blog post was published
Timestamp when the blog post was last updated
```json theme={null}
{
"updatedBlogPost": {
"categories": [
"659ecabc4a37969a2b7cc370",
"6683abde331c041f32c07aee"
],
"tags": [
"Apple",
"Banana"
],
"archived": false,
"_id": "66c381b38be80858b9af62b6",
"title": "Banana is good source of energy",
"description": "Description",
"imageUrl": "https://storage.googleapis.com/ghl-test/fACm0Ojm5oC70G3DcFmE/media/66b5aa3b1745b2713a8d033f.jpeg",
"status": "PUBLISHED",
"imageAltText": "alt",
"urlSlug": "banana-good-energy",
"canonicalLink": "https://blog.chatgpts.agency/post/test-8384",
"author": "659ec9634a3796e4e47cc360",
"publishedAt": "2024-08-19T17:14:57.000Z",
"updatedAt": "2024-08-19T17:32:36.182Z"
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/blogs/posts/YOUR_postId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"title": "Your blog title",
"locationId": "Account ID",
"blogId": "Blog ID",
"imageUrl": "Image URl",
"description": "A short description",
"rawHTML": "
The Upsert API will adhere to the configuration defined under the “Allow Duplicate Contact” setting at the Account leve
Please find the list of acceptable values for the `country` field here\ \ The Upsert API will adhere to the configuration defined under the “Allow Duplicate Contact” setting at the Account level. If the setting is configured to check both Email and Phone, the API will attempt to identify an existing contact based on the priority sequence specified in the setting, and will create or update the contact accordingly.\ \ If two separate contacts already exist—one with the same email and another with the same phone—and an upsert request includes both the email and phone, the API will update the contact that matches the first field in the configured sequence, and ignore the second field to prevent duplication.
```http theme={null}
POST https://services.leadconnectorhq.com/contacts/upsert
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Posibles valores: 'active', 'inactive', 'permanent'
Posibles valores: 'active', 'inactive', 'permanent'
Posibles valores: 'active', 'inactive', 'permanent'
Posibles valores: 'active', 'inactive', 'permanent'
Posibles valores: 'active', 'inactive', 'permanent'
Posibles valores: 'active', 'inactive', 'permanent'
Posibles valores: 'active', 'inactive'
This field will overwrite all current tags associated with the contact. To update a tags, it is recommended to use the Add Tag or Remove Tag API instead.
The birth date of the contact. Supported formats: YYYY/MM/DD, MM/DD/YYYY, YYYY-MM-DD, MM-DD-YYYY, YYYY.MM.DD, MM.DD.YYYY, YYYY\_MM\_DD, MM\_DD\_YYYY
User's Id
Controls whether to create a new contact or update an existing duplicate. **Scenario 1:** If this value is `true` and the account allows duplicate contacts, a new contact will be created immediately without checking for duplicates. **Scenario 2:** If this value is `true` but the account does not allow duplicate contacts, this field is ignored and the normal upsert behavior applies: the API will search for an existing duplicate contact, update it if found, or create a new contact if not found. **Scenario 3:** If this value is `false` or not provided, the normal upsert behavior applies regardless of the account's duplicate contact setting.
## Respuestas
Posibles valores: 'active', 'inactive', 'permanent'
Posibles valores: 'active', 'inactive', 'permanent'
Posibles valores: 'active', 'inactive', 'permanent'
Posibles valores: 'active', 'inactive', 'permanent'
Posibles valores: 'active', 'inactive', 'permanent'
Posibles valores: 'active', 'inactive', 'permanent'
visitorId is the Unique ID assigned to each Live chat visitor.
```json theme={null}
{
"new": true,
"contact": {
"id": "seD4PfOuKoVMLkEZqohJ",
"name": "rubika deo",
"locationId": "ve9EPM428h8vShlRW1KT",
"firstName": "rubika",
"lastName": "Deo",
"email": "rubika@deos.com",
"emailLowerCase": "rubika@deos.com",
"timezone": "Asia/Calcutta",
"companyName": "DGS VolMAX",
"phone": "+18832327657",
"dnd": true,
"dndSettings": {
"Call": {
"status": "active",
"message": "string",
"code": "string"
},
"Email": {
"status": "active",
"message": "string",
"code": "string"
},
"SMS": {
"status": "active",
"message": "string",
"code": "string"
},
"WhatsApp": {
"status": "active",
"message": "string",
"code": "string"
},
"GMB": {
"status": "active",
"message": "string",
"code": "string"
// truncado: 81 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/contacts/upsert' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"firstName": "Rosan",
"lastName": "Deo",
"name": "Rosan Deo",
"email": "rosan@deos.com",
"locationId": "ve9EPM428h8vShlRW1KT",
"gender": "male",
"phone": "+1 888-888-8888",
"address1": "3535 1st St N",
"city": "Dolomite",
"state": "AL",
"postalCode": "35061",
"website": "https://www.tesla.com",
"timezone": "America/Chihuahua",
"dnd": true,
"dndSettings": {
"Call": {
"status": "active",
"message": "string",
"code": "string"
},
"Email": {
"status": "active",
"message": "string",
"code": "string"
},
"SMS": {
"status": "active",
"message": "string",
"code": "string"
},
"WhatsApp": {
"status": "active",
"message": "string",
"code": "string"
},
"GMB": {
"status": "active",
"message": "string",
"code": "string"
},
"FB": {
"status": "active",
"message": "string",
"code": "string"
}
},
"inboundDndSettings": {
"all": {
"status": "active",
"message": "string"
}
},
"tags": [
"nisi sint commodo amet",
"consequat"
],
"customFields": [],
"source": "public api",
"dateOfBirth": "1990-09-25",
"country": "US",
"companyName": "DGS VolMAX",
"assignedTo": "y0BeYjuRIlDwsDcOHOJo",
"createNewIfDuplicateAllowed": false
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/contacts/upsert', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"firstName": "Rosan", "lastName": "Deo", "name": "Rosan Deo", "email": "rosan@deos.com", "locationId": "ve9EPM428h8vShlRW1KT", "gender": "male", "phone": "+1 888-888-8888", "address1": "3535 1st St N", "city": "Dolomite", "state": "AL", "postalCode": "35061", "website": "https://www.tesla.com", "timezone": "America/Chihuahua", "dnd": true, "dndSettings": {"Call": {"status": "active", "message": "string", "code": "string"}, "Email": {"status": "active", "message": "string", "code": "string"}, "SMS": {"status": "active", "message": "string", "code": "string"}, "WhatsApp": {"status": "active", "message": "string", "code": "string"}, "GMB": {"status": "active", "message": "string", "code": "string"}, "FB": {"status": "active", "message": "string", "code": "string"}}, "inboundDndSettings": {"all": {"status": "active", "message": "string"}}, "tags": ["nisi sint commodo amet", "consequat"], "customFields": [], "source": "public api", "dateOfBirth": "1990-09-25", "country": "US", "companyName": "DGS VolMAX", "assignedTo": "y0BeYjuRIlDwsDcOHOJo", "createNewIfDuplicateAllowed": false}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/contacts/upsert',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"firstName": "Rosan", "lastName": "Deo", "name": "Rosan Deo", "email": "rosan@deos.com", "locationId": "ve9EPM428h8vShlRW1KT", "gender": "male", "phone": "+1 888-888-8888", "address1": "3535 1st St N", "city": "Dolomite", "state": "AL", "postalCode": "35061", "website": "https://www.tesla.com", "timezone": "America/Chihuahua", "dnd": true, "dndSettings": {"Call": {"status": "active", "message": "string", "code": "string"}, "Email": {"status": "active", "message": "string", "code": "string"}, "SMS": {"status": "active", "message": "string", "code": "string"}, "WhatsApp": {"status": "active", "message": "string", "code": "string"}, "GMB": {"status": "active", "message": "string", "code": "string"}, "FB": {"status": "active", "message": "string", "code": "string"}}, "inboundDndSettings": {"all": {"status": "active", "message": "string"}}, "tags": ["nisi sint commodo amet", "consequat"], "customFields": [], "source": "public api", "dateOfBirth": "1990-09-25", "country": "US", "companyName": "DGS VolMAX", "assignedTo": "y0BeYjuRIlDwsDcOHOJo", "createNewIfDuplicateAllowed": false},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'firstName': 'Rosan', 'lastName': 'Deo', 'name': 'Rosan Deo', 'email': 'rosan@deos.com', 'locationId': 've9EPM428h8vShlRW1KT', 'gender': 'male', 'phone': '+1 888-888-8888', 'address1': '3535 1st St N', 'city': 'Dolomite', 'state': 'AL', 'postalCode': '35061', 'website': 'https://www.tesla.com', 'timezone': 'America/Chihuahua', 'dnd': true, 'dndSettings': {'Call': {'status': 'active', 'message': 'string', 'code': 'string'}, 'Email': {'status': 'active', 'message': 'string', 'code': 'string'}, 'SMS': {'status': 'active', 'message': 'string', 'code': 'string'}, 'WhatsApp': {'status': 'active', 'message': 'string', 'code': 'string'}, 'GMB': {'status': 'active', 'message': 'string', 'code': 'string'}, 'FB': {'status': 'active', 'message': 'string', 'code': 'string'}}, 'inboundDndSettings': {'all': {'status': 'active', 'message': 'string'}}, 'tags': ['nisi sint commodo amet', 'consequat'], 'customFields': [], 'source': 'public api', 'dateOfBirth': '1990-09-25', 'country': 'US', 'companyName': 'DGS VolMAX', 'assignedTo': 'y0BeYjuRIlDwsDcOHOJo', 'createNewIfDuplicateAllowed': false}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Attach Action to Agent
Source: https://developers.leadwaycrm.com/api-reference/conversation-ai/conversation-ai-create-action
Creates and attach a new action for an AI agent. Actions define specific tasks or behaviors that the agent can perform, such as booking appointments, sending follow-ups, or collecting information.
Creates and attach a new action for an AI agent. Actions define specific tasks or behaviors that the agent can perform, such as booking appointments, sending follow-ups, or collecting information.
```http theme={null}
POST https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}/actions
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Posibles valores: 'triggerWorkflow', 'updateContactField', 'appointmentBooking', 'stopBot', 'humanHandOver', 'advancedFollowup', 'transferBot'
Action-specific details. The structure depends on the action type. For TRIGGER\_WORKFLOW use triggerWorkflowDto, for UPDATE\_CONTACT\_FIELD use updateContactFieldDto, for APPOINTMENT\_BOOKING use appointmentBookingDto, for STOP\_BOT use stopBotDto, for HUMAN\_HAND\_OVER use humanHandOverDto, for ADVANCED\_FOLLOWUP use advancedFollowupDto, and for TRANSFER\_BOT use transferBotDto.
## Respuestas
Created action details
Success status of the request
```json theme={null}
{
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"type": "triggerWorkflow",
"name": "Trigger a Workflow"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"type": "triggerWorkflow", "name": "Trigger a Workflow"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"type": "triggerWorkflow", "name": "Trigger a Workflow"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'type': 'triggerWorkflow', 'name': 'Trigger a Workflow'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create an Agent
Source: https://developers.leadwaycrm.com/api-reference/conversation-ai/conversation-ai-create-agent
Creates a new AI agent for the account. The agent will be created with the specified configuration including name, role, actions, and behavior settings.
Creates a new AI agent for the account. The agent will be created with the specified configuration including name, role, actions, and behavior settings.
```http theme={null}
POST https://services.leadconnectorhq.com/conversation-ai/agents
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Name of the agent.
Name of the business the agent represents.
Mode of operation - OFF, SUGGESTIVE, or AUTO\_PILOT Posibles valores: 'off', 'suggestive', 'auto-pilot'
Communication channels the agent can operate on
Indicates if this agent is a primary agent.
Wait time before agent responds (max 5 for minutes, 300 for seconds)
Unit for wait time - SECONDS or MINUTES Posibles valores: 'minutes', 'seconds'
Indicates if sleep functionality is enabled.
Duration of sleep period (required if sleepEnabled is true). Set to null for indefinite sleep. (max 2880 for minutes, 172800 for seconds, 48 for hours)
Unit of sleep time - HOURS, MINUTES, or SECONDS (required if sleepEnabled is true). Set to null for indefinite sleep. Posibles valores: 'hours', 'minutes', 'seconds'
Personality traits of the agent.
The goal of the agent.
Instructions for the agent.
Maximum number of messages in auto-pilot mode before requiring human intervention. (max: 100, min: 1)
Array of knowledge base IDs associated with this agent.
Allow agent to respond to images
Allow agent to respond to audio
Enable sleep when a manual outbound message is sent.
Enable sleep when a workflow outbound message is sent.
## Respuestas
Unique identifier for the agent.
Name of the agent.
Name of the business the agent represents.
Current operating mode of the agent. Posibles valores: 'off', 'suggestive', 'auto-pilot'
Communication channels the agent operates on.
Wait time before agent responds.
Unit for wait time. Posibles valores: 'minutes', 'seconds'
Indicates if sleep functionality is enabled.
Duration of sleep period.
Unit of sleep time. Posibles valores: 'hours', 'minutes', 'seconds'
List of actions associated with this agent.
Unique identifier for the action.
type of action. Posibles valores: 'triggerWorkflow', 'updateContactField', 'appointmentBooking', 'stopBot', 'humanHandOver', 'advancedFollowup', 'transferBot'
Indicates if this agent is a primary agent.
Maximum number of messages in auto-pilot mode before requiring human intervention.
The goal of the agent.
Personality traits of the agent.
Instructions for the agent.
Array of knowledge base IDs associated with this agent.
Whether the bot sleeps on manual outbound messages.
Whether the bot sleeps on workflow outbound messages.
```json theme={null}
{
"id": "emp_123",
"name": "John Doe",
"businessName": "Tech Corp",
"mode": "auto-pilot",
"channels": [
"SMS",
"Live_Chat"
],
"waitTime": 30,
"waitTimeUnit": "seconds",
"sleepEnabled": false,
"sleepTime": 2,
"sleepTimeUnit": "hours",
"actions": [
{
"id": "actionId123",
"type": "triggerWorkflow"
}
],
"isPrimary": false,
"autoPilotMaxMessages": 25,
"goal": "Assist customers with inquiries",
"personality": "Friendly and helpful",
"instructions": "Provide excellent customer service",
"knowledgeBaseIds": [
"kb_123",
"kb_456"
],
"sleepOnManualMessage": false,
"sleepOnWorkflowMessage": false
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/conversation-ai/agents' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "John Doe",
"businessName": "Tech Corp",
"mode": "auto-pilot",
"channels": [
"SMS",
"Live_Chat",
"WhatsApp"
],
"isPrimary": true,
"waitTime": 2,
"waitTimeUnit": "seconds",
"sleepEnabled": false,
"sleepTime": 2,
"sleepTimeUnit": "hours",
"personality": "Friendly and helpful",
"goal": "Assist customers with inquiries.",
"instructions": "Provide customer service.",
"autoPilotMaxMessages": 75,
"knowledgeBaseIds": [
"string"
],
"respondToImages": true,
"respondToAudio": true,
"sleepOnManualMessage": false,
"sleepOnWorkflowMessage": false
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/agents', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "John Doe", "businessName": "Tech Corp", "mode": "auto-pilot", "channels": ["SMS", "Live_Chat", "WhatsApp"], "isPrimary": true, "waitTime": 2, "waitTimeUnit": "seconds", "sleepEnabled": false, "sleepTime": 2, "sleepTimeUnit": "hours", "personality": "Friendly and helpful", "goal": "Assist customers with inquiries.", "instructions": "Provide customer service.", "autoPilotMaxMessages": 75, "knowledgeBaseIds": ["string"], "respondToImages": true, "respondToAudio": true, "sleepOnManualMessage": false, "sleepOnWorkflowMessage": false}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/conversation-ai/agents',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "John Doe", "businessName": "Tech Corp", "mode": "auto-pilot", "channels": ["SMS", "Live_Chat", "WhatsApp"], "isPrimary": true, "waitTime": 2, "waitTimeUnit": "seconds", "sleepEnabled": false, "sleepTime": 2, "sleepTimeUnit": "hours", "personality": "Friendly and helpful", "goal": "Assist customers with inquiries.", "instructions": "Provide customer service.", "autoPilotMaxMessages": 75, "knowledgeBaseIds": ["string"], "respondToImages": true, "respondToAudio": true, "sleepOnManualMessage": false, "sleepOnWorkflowMessage": false},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'John Doe', 'businessName': 'Tech Corp', 'mode': 'auto-pilot', 'channels': ['SMS', 'Live_Chat', 'WhatsApp'], 'isPrimary': true, 'waitTime': 2, 'waitTimeUnit': 'seconds', 'sleepEnabled': false, 'sleepTime': 2, 'sleepTimeUnit': 'hours', 'personality': 'Friendly and helpful', 'goal': 'Assist customers with inquiries.', 'instructions': 'Provide customer service.', 'autoPilotMaxMessages': 75, 'knowledgeBaseIds': ['string'], 'respondToImages': true, 'respondToAudio': true, 'sleepOnManualMessage': false, 'sleepOnWorkflowMessage': false}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Remove Action from Agent
Source: https://developers.leadwaycrm.com/api-reference/conversation-ai/conversation-ai-delete-action
Permanently deletes an action. This will remove the action from all associated agents and cannot be undone.
Permanently deletes an action. This will remove the action from all associated agents and cannot be undone.
```http theme={null}
DELETE https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}/actions/{actionId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
The unique identifier of the action ID Attached to the agent
## Respuestas
Deleted action information
Success status of the request
```json theme={null}
{
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/YOUR_actionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/YOUR_actionId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/YOUR_actionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Agent
Source: https://developers.leadwaycrm.com/api-reference/conversation-ai/conversation-ai-delete-agent
Deletes an AI agent permanently. This action cannot be undone. All associated configurations and conversation history will be removed.
Deletes an AI agent permanently. This action cannot be undone. All associated configurations and conversation history will be removed.
```http theme={null}
DELETE https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Conversations AI agent id
## Respuestas
Indicates if the agent was deleted successfully.
Unique identifier of the deleted agent.
```json theme={null}
{
"success": true,
"id": "emp_123"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Action by ID
Source: https://developers.leadwaycrm.com/api-reference/conversation-ai/conversation-ai-get-action-by-id
Retrieves detailed information about a specific action using its unique identifier. Returns the action configuration, associated agents, and performance metrics.
Retrieves detailed information about a specific action using its unique identifier. Returns the action configuration, associated agents, and performance metrics.
```http theme={null}
GET https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}/actions/{actionId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
The unique identifier of the action ID Attached to the agent
## Respuestas
Action details
Success status of the request
```json theme={null}
{
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/YOUR_actionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/YOUR_actionId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/YOUR_actionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Agent
Source: https://developers.leadwaycrm.com/api-reference/conversation-ai/conversation-ai-get-agent
Retrieves a specific AI agent by its ID. Returns the complete agent configuration including name, status, actions, and settings.
Retrieves a specific AI agent by its ID. Returns the complete agent configuration including name, status, actions, and settings.
```http theme={null}
GET https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Conversations AI agent id
## Respuestas
Unique identifier for the agent.
Name of the agent.
Name of the business the agent represents.
Current operating mode of the agent. Posibles valores: 'off', 'suggestive', 'auto-pilot'
Communication channels the agent operates on.
Wait time before agent responds.
Unit for wait time. Posibles valores: 'minutes', 'seconds'
Indicates if sleep functionality is enabled.
Duration of sleep period.
Unit of sleep time. Posibles valores: 'hours', 'minutes', 'seconds'
List of actions associated with this agent.
Unique identifier for the action.
type of action. Posibles valores: 'triggerWorkflow', 'updateContactField', 'appointmentBooking', 'stopBot', 'humanHandOver', 'advancedFollowup', 'transferBot'
Indicates if this agent is a primary agent.
Maximum number of messages in auto-pilot mode before requiring human intervention.
The goal of the agent.
Personality traits of the agent.
Instructions for the agent.
Array of knowledge base IDs associated with this agent.
Whether the bot sleeps on manual outbound messages.
Whether the bot sleeps on workflow outbound messages.
```json theme={null}
{
"id": "emp_123",
"name": "John Doe",
"businessName": "Tech Corp",
"mode": "auto-pilot",
"channels": [
"SMS",
"Live_Chat"
],
"waitTime": 30,
"waitTimeUnit": "seconds",
"sleepEnabled": false,
"sleepTime": 2,
"sleepTimeUnit": "hours",
"actions": [
{
"id": "actionId123",
"type": "triggerWorkflow"
}
],
"isPrimary": false,
"autoPilotMaxMessages": 25,
"goal": "Assist customers with inquiries",
"personality": "Friendly and helpful",
"instructions": "Provide excellent customer service",
"knowledgeBaseIds": [
"kb_123",
"kb_456"
],
"sleepOnManualMessage": false,
"sleepOnWorkflowMessage": false
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get the generation details
Source: https://developers.leadwaycrm.com/api-reference/conversation-ai/conversation-ai-get-generation-details
Retrieves detailed information about AI responses including the System Prompt, Conversation history, Knowledge base, website, FAQ chunks, and Rich Text chunks.
Retrieves detailed information about AI responses including the System Prompt, Conversation history, Knowledge base, website, FAQ chunks, and Rich Text chunks.
```http theme={null}
GET https://services.leadconnectorhq.com/conversation-ai/generations
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Message Id
## Respuestas
The complete prompt used for the AI response.
The intent/goal extracted from account prompt.
The response message generated by the AI.
FAQ chunks used in generating the response from fine-tuned data.
Website content chunks used in generating the response.
ID of the employee/agent that generated the response.
The original input message that triggered this response.
List of actions taken during this interaction.
Conversation history leading up to this response.
Mode of operation during this interaction.
```json theme={null}
{
"prompt": "Personality:\nFriendly and professional,\n\nIntent:\nAssist customers with inquiries\n\nAdditional Information:\nHandle basic support queries",
"intent": "Assist customers with product inquiries and support",
"responseMessage": "Hello! I understand you're interested in our products. How can I assist you today?",
"faqs": [
{
"id": "chunk_123",
"content": "Our return policy allows returns within 30 days of purchase.",
"title": "Return Policy FAQ"
}
],
"website": [
{
"id": "chunk_456",
"content": "We offer free shipping on orders over $50.",
"url": "https://example.com/shipping"
}
],
"agentId": "emp_123",
"input": "What is your return policy?",
"actionLogs": [
{
"contactUpdateAction": [
{
"fieldId": "field_123",
"value": "John Doe"
}
]
}
],
"history": [
{
"role": "user",
"content": "Hi, I have a question about returns"
},
{
"role": "assistant",
"content": "I'll be happy to help you with information about our return policy."
}
// truncado: 3 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversation-ai/generations' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/generations', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversation-ai/generations',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Actions for an Agent
Source: https://developers.leadwaycrm.com/api-reference/conversation-ai/conversation-ai-list-actions
List for actions for an agent
List for actions for an agent
```http theme={null}
GET https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}/actions/list
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Respuestas
Grouped actions by type
Unique identifier for the action
Name of the action
Type of the action Posibles valores: 'triggerWorkflow', 'updateContactField', 'appointmentBooking', 'stopBot', 'humanHandOver', 'advancedFollowup', 'transferBot'
Agent ID where the action belongs
Action-specific details. The structure depends on the action type. For TRIGGER\_WORKFLOW use triggerWorkflowDto, for UPDATE\_CONTACT\_FIELD use updateContactFieldDto, for APPOINTMENT\_BOOKING use appointmentBookingDto, for STOP\_BOT use stopBotDto, for HUMAN\_HAND\_OVER use humanHandOverDto, for ADVANCED\_FOLLOWUP use advancedFollowupDto, and for TRANSFER\_BOT use transferBotDto.
Success status of the request
```json theme={null}
{
"data": [
{
"id": "actionId123",
"name": "Trigger Workflow",
"type": "triggerWorkflow",
"agentId": "agentId123"
}
],
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/list' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/list', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/list',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Search Agents
Source: https://developers.leadwaycrm.com/api-reference/conversation-ai/conversation-ai-search-agent
Searches for AI agents based on various criteria including name, status, and configuration. Supports advanced filtering and full-text search capabilities.
Searches for AI agents based on various criteria including name, status, and configuration. Supports advanced filtering and full-text search capabilities.
```http theme={null}
GET https://services.leadconnectorhq.com/conversation-ai/agents/search
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Start after is the agent id to start after, Serving as skip, send empty when first page
Records per page
query to search on agent name, must be provided in lowercase
## Respuestas
List of agents matching the search criteria.
Unique identifier for the agent.
Name of the agent.
Name of the business the agent represents.
Current operating mode of the agent. Posibles valores: 'off', 'suggestive', 'auto-pilot'
Communication channels the agent operates on.
Wait time before agent responds.
Unit for wait time. Posibles valores: 'minutes', 'seconds'
Indicates if sleep functionality is enabled.
Duration of sleep period.
Unit of sleep time. Posibles valores: 'hours', 'minutes', 'seconds'
List of actions associated with this agent.
Indicates if this agent is a primary agent. (First agent created for a account is primary by default)
Maximum number of messages in auto-pilot mode before requiring human intervention.
Goal configuration for the agent.
Array of knowledge base IDs associated with this agent.
Timestamp when the agent was created.
Timestamp when the agent was last updated.
Whether the bot sleeps on manual outbound messages.
Whether the bot sleeps on workflow outbound messages.
Total number of agents in the account (unfiltered count).
Number of agents in the current response (filtered/paginated count).
```json theme={null}
{
"agents": [
{
"id": "emp_123",
"name": "John Doe",
"businessName": "Tech Corp",
"mode": "auto-pilot",
"channels": [
"SMS",
"LIVE_CHAT"
],
"waitTime": 30,
"waitTimeUnit": "seconds",
"sleepEnabled": false,
"sleepTime": 2,
"sleepTimeUnit": "hours",
"actions": [
{
"id": "action_123",
"type": "triggerWorkflow"
}
],
"isPrimary": false,
"autoPilotMaxMessages": 25,
"goal": {
"prompt": "Assist customers",
"type": "custom",
"actionId": null
},
"knowledgeBaseIds": [
"kb_123",
"kb_456"
],
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z",
"sleepOnManualMessage": false,
"sleepOnWorkflowMessage": false
}
],
// truncado: 3 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversation-ai/agents/search' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/agents/search', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversation-ai/agents/search',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Action
Source: https://developers.leadwaycrm.com/api-reference/conversation-ai/conversation-ai-update-action
Updates an existing actions configuration. This includes modifying the action name, description, trigger conditions, and behavior settings.
Updates an existing action's configuration. This includes modifying the action name, description, trigger conditions, and behavior settings.
```http theme={null}
PUT https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}/actions/{actionId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
The unique identifier of the action ID Attached to the agent
## Body
Posibles valores: 'triggerWorkflow', 'updateContactField', 'appointmentBooking', 'stopBot', 'humanHandOver', 'advancedFollowup', 'transferBot'
Action-specific details. The structure depends on the action type. For TRIGGER\_WORKFLOW use triggerWorkflowDto, for UPDATE\_CONTACT\_FIELD use updateContactFieldDto, for APPOINTMENT\_BOOKING use appointmentBookingDto, for STOP\_BOT use stopBotDto, for HUMAN\_HAND\_OVER use humanHandOverDto, for ADVANCED\_FOLLOWUP use advancedFollowupDto, and for TRANSFER\_BOT use transferBotDto.
## Respuestas
Updated action details
Success status of the request
```json theme={null}
{
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/YOUR_actionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"type": "triggerWorkflow",
"name": "Trigger a Workflow"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/YOUR_actionId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"type": "triggerWorkflow", "name": "Trigger a Workflow"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/actions/YOUR_actionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"type": "triggerWorkflow", "name": "Trigger a Workflow"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'type': 'triggerWorkflow', 'name': 'Trigger a Workflow'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Agent
Source: https://developers.leadwaycrm.com/api-reference/conversation-ai/conversation-ai-update-agent
Updates an existing AI agents configuration. All fields in the agent configuration can be updated including name, status, actions, and behavior settings.
Updates an existing AI agent's configuration. All fields in the agent configuration can be updated including name, status, actions, and behavior settings.
```http theme={null}
PUT https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Conversations AI agent id
## Body
Name of the agent.
Name of the business the agent represents.
Mode of operation for the agent, required if primary is enabled. Posibles valores: 'off', 'suggestive', 'auto-pilot'
Channels the agent can use.
Indicates if this agent is a primary agent.
Wait time before agent responds (max 5 for minutes, 300 for seconds).
Unit for wait time - SECONDS or MINUTES Posibles valores: 'minutes', 'seconds'
Indicates if sleep functionality is enabled.
Duration of sleep period (required if sleepEnabled is true). Set to null for indefinite sleep. (max 2880 for minutes, 172800 for seconds, 48 for hours)
Unit of sleep time - HOURS, MINUTES, or SECONDS (required if sleepEnabled is true). Set to null for indefinite sleep. Posibles valores: 'hours', 'minutes', 'seconds'
Personality traits of the agent.
The goal of the agent.
Instructions for the agent.
Maximum number of messages in auto-pilot mode before requiring human intervention. (max: 100, min: 1)
Array of knowledge base IDs associated with this agent.
Allow agent to respond to images
Allow agent to respond to audio
Enable sleep when a manual outbound message is sent.
Enable sleep when a workflow outbound message is sent.
## Respuestas
Unique identifier for the agent.
Name of the agent.
Name of the business the agent represents.
Current operating mode of the agent. Posibles valores: 'off', 'suggestive', 'auto-pilot'
Communication channels the agent operates on.
Wait time before agent responds.
Unit for wait time. Posibles valores: 'minutes', 'seconds'
Indicates if sleep functionality is enabled.
Duration of sleep period.
Unit of sleep time. Posibles valores: 'hours', 'minutes', 'seconds'
List of actions associated with this agent.
Unique identifier for the action.
type of action. Posibles valores: 'triggerWorkflow', 'updateContactField', 'appointmentBooking', 'stopBot', 'humanHandOver', 'advancedFollowup', 'transferBot'
Indicates if this agent is a primary agent.
Maximum number of messages in auto-pilot mode before requiring human intervention.
The goal of the agent.
Personality traits of the agent.
Instructions for the agent.
Array of knowledge base IDs associated with this agent.
Whether the bot sleeps on manual outbound messages.
Whether the bot sleeps on workflow outbound messages.
```json theme={null}
{
"id": "emp_123",
"name": "John Doe",
"businessName": "Tech Corp",
"mode": "auto-pilot",
"channels": [
"SMS",
"Live_Chat"
],
"waitTime": 30,
"waitTimeUnit": "seconds",
"sleepEnabled": false,
"sleepTime": 2,
"sleepTimeUnit": "hours",
"actions": [
{
"id": "actionId123",
"type": "triggerWorkflow"
}
],
"isPrimary": false,
"autoPilotMaxMessages": 25,
"goal": "Assist customers with inquiries",
"personality": "Friendly and helpful",
"instructions": "Provide excellent customer service",
"knowledgeBaseIds": [
"kb_123",
"kb_456"
],
"sleepOnManualMessage": false,
"sleepOnWorkflowMessage": false
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "John Doe",
"businessName": "Tech Corp",
"mode": "off",
"channels": [
"IG"
],
"isPrimary": true,
"waitTime": 30,
"waitTimeUnit": "seconds",
"sleepEnabled": false,
"sleepTime": 10,
"sleepTimeUnit": "hours",
"personality": "You re an AI assistant and you are friendly and helpful",
"goal": "You are an AI assistant and you are helping customers with inquiries.",
"instructions": "Provide excellent customer service.",
"autoPilotMaxMessages": 75,
"knowledgeBaseIds": [
"string"
],
"respondToImages": true,
"respondToAudio": true,
"sleepOnManualMessage": false,
"sleepOnWorkflowMessage": false
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "John Doe", "businessName": "Tech Corp", "mode": "off", "channels": ["IG"], "isPrimary": true, "waitTime": 30, "waitTimeUnit": "seconds", "sleepEnabled": false, "sleepTime": 10, "sleepTimeUnit": "hours", "personality": "You re an AI assistant and you are friendly and helpful", "goal": "You are an AI assistant and you are helping customers with inquiries.", "instructions": "Provide excellent customer service.", "autoPilotMaxMessages": 75, "knowledgeBaseIds": ["string"], "respondToImages": true, "respondToAudio": true, "sleepOnManualMessage": false, "sleepOnWorkflowMessage": false}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "John Doe", "businessName": "Tech Corp", "mode": "off", "channels": ["IG"], "isPrimary": true, "waitTime": 30, "waitTimeUnit": "seconds", "sleepEnabled": false, "sleepTime": 10, "sleepTimeUnit": "hours", "personality": "You re an AI assistant and you are friendly and helpful", "goal": "You are an AI assistant and you are helping customers with inquiries.", "instructions": "Provide excellent customer service.", "autoPilotMaxMessages": 75, "knowledgeBaseIds": ["string"], "respondToImages": true, "respondToAudio": true, "sleepOnManualMessage": false, "sleepOnWorkflowMessage": false},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'John Doe', 'businessName': 'Tech Corp', 'mode': 'off', 'channels': ['IG'], 'isPrimary': true, 'waitTime': 30, 'waitTimeUnit': 'seconds', 'sleepEnabled': false, 'sleepTime': 10, 'sleepTimeUnit': 'hours', 'personality': 'You re an AI assistant and you are friendly and helpful', 'goal': 'You are an AI assistant and you are helping customers with inquiries.', 'instructions': 'Provide excellent customer service.', 'autoPilotMaxMessages': 75, 'knowledgeBaseIds': ['string'], 'respondToImages': true, 'respondToAudio': true, 'sleepOnManualMessage': false, 'sleepOnWorkflowMessage': false}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Followup Settings
Source: https://developers.leadwaycrm.com/api-reference/conversation-ai/conversation-ai-update-followup-settings
Update the followup settings for an action
Update the followup settings for an action
```http theme={null}
PATCH https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}/followup-settings
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Whether to dynamically switch channels for followups
Whether to respect working hours for followups
Working hours configuration for followups
Day of the week (0=Sunday, 1=Monday, etc.)
Time intervals for this day
Start hour (24-hour format)
Start minute
End hour (24-hour format)
End minute
Timezone to use for followups, contact or account Posibles valores: 'contact', 'business'
## Respuestas
Updated action details
Success status of the request
```json theme={null}
{
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PATCH 'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/followup-settings' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"actionIds": [
"edxcfghbnjkimd"
],
"followupSettings": {
"dynamicChannelSwitching": true,
"followUpHours": true,
"workingHours": [
{
"dayOfTheWeek": 1,
"intervals": []
}
],
"timezoneToUse": "contact"
}
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/followup-settings', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"actionIds": ["edxcfghbnjkimd"], "followupSettings": {"dynamicChannelSwitching": true, "followUpHours": true, "workingHours": [{"dayOfTheWeek": 1, "intervals": []}], "timezoneToUse": "contact"}}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/conversation-ai/agents/YOUR_agentId/followup-settings',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"actionIds": ["edxcfghbnjkimd"], "followupSettings": {"dynamicChannelSwitching": true, "followUpHours": true, "workingHours": [{"dayOfTheWeek": 1, "intervals": []}], "timezoneToUse": "contact"}},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'actionIds': ['edxcfghbnjkimd'], 'followupSettings': {'dynamicChannelSwitching': true, 'followUpHours': true, 'workingHours': [{'dayOfTheWeek': 1, 'intervals': []}], 'timezoneToUse': 'contact'}}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Add an inbound message
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-add-an-inbound-message
Post the necessary fields for the API to add a new inbound message.
Post the necessary fields for the API to add a new inbound message. \
```http theme={null}
POST https://services.leadconnectorhq.com/conversations/messages/inbound
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Message Type Posibles valores: 'SMS', 'RCS', 'Email', 'WhatsApp', 'GMB', 'IG', 'FB', 'Custom', 'WebChat', 'Live\_Chat', 'Call', 'IVR\_Call', 'Campaign\_Call', 'Campaign\_VoiceMail', 'TIKTOK', 'ALL\_IN\_ONE\_CHAT', 'FORM\_SUBMISSION'
Array of attachments
Message Body
Conversation Id
Contact Id
Conversation Provider Id
HTML Body of Email
Subject of the Email
Email address to send from. This field is associated with the contact record and cannot be dynamically changed.
Recipient email address. This field is associated with the contact record and cannot be dynamically changed.
List of email address to CC
List of email address to BCC
Send the email message id for which this email should be threaded. This is for replying to a specific email
external mail provider's message id
Message direction, if required can be set manually, default is outbound
Date of the inbound message
Phone call dialer and receiver information
## Respuestas
Conversation ID.
This is the main Message ID
```json theme={null}
{
"success": true,
"conversationId": "ABC12h2F6uBrIkfXYazb",
"messageId": "t22c6DQcTDf3MjRhwf77",
"message": "string",
"contactId": "string",
"dateAdded": "2024-01-15T10:30:00Z",
"emailMessageId": "string"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/conversations/messages/inbound' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"type": "SMS",
"attachments": [
"string"
],
"message": "string",
"conversationId": "ve9EPM428h8vShlRW1KT",
"contactId": "ve9EPM428h8vShlRW1KT",
"conversationProviderId": "61d6d1f9cdac7612faf80753",
"html": "string",
"subject": "string",
"emailFrom": "sender@company.com",
"emailTo": "string",
"emailCc": [
"john1@doe.com",
"john2@doe.com"
],
"emailBcc": [
"john1@doe.com",
"john2@doe.com"
],
"emailMessageId": "string",
"altId": "61d6d1f9cdac7612faf80753",
"direction": [
"outbound",
"inbound"
],
"date": "2024-01-15T10:30:00Z"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/inbound', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"type": "SMS", "attachments": ["string"], "message": "string", "conversationId": "ve9EPM428h8vShlRW1KT", "contactId": "ve9EPM428h8vShlRW1KT", "conversationProviderId": "61d6d1f9cdac7612faf80753", "html": "string", "subject": "string", "emailFrom": "sender@company.com", "emailTo": "string", "emailCc": ["john1@doe.com", "john2@doe.com"], "emailBcc": ["john1@doe.com", "john2@doe.com"], "emailMessageId": "string", "altId": "61d6d1f9cdac7612faf80753", "direction": ["outbound", "inbound"], "date": "2024-01-15T10:30:00Z"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/conversations/messages/inbound',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"type": "SMS", "attachments": ["string"], "message": "string", "conversationId": "ve9EPM428h8vShlRW1KT", "contactId": "ve9EPM428h8vShlRW1KT", "conversationProviderId": "61d6d1f9cdac7612faf80753", "html": "string", "subject": "string", "emailFrom": "sender@company.com", "emailTo": "string", "emailCc": ["john1@doe.com", "john2@doe.com"], "emailBcc": ["john1@doe.com", "john2@doe.com"], "emailMessageId": "string", "altId": "61d6d1f9cdac7612faf80753", "direction": ["outbound", "inbound"], "date": "2024-01-15T10:30:00Z"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'type': 'SMS', 'attachments': ['string'], 'message': 'string', 'conversationId': 've9EPM428h8vShlRW1KT', 'contactId': 've9EPM428h8vShlRW1KT', 'conversationProviderId': '61d6d1f9cdac7612faf80753', 'html': 'string', 'subject': 'string', 'emailFrom': 'sender@company.com', 'emailTo': 'string', 'emailCc': ['john1@doe.com', 'john2@doe.com'], 'emailBcc': ['john1@doe.com', 'john2@doe.com'], 'emailMessageId': 'string', 'altId': '61d6d1f9cdac7612faf80753', 'direction': ['outbound', 'inbound'], 'date': '2024-01-15T10:30:00Z'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Add an external outbound call
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-add-an-outbound-message
Post the necessary fields for the API to add a new outbound call.
Post the necessary fields for the API to add a new outbound call.
```http theme={null}
POST https://services.leadconnectorhq.com/conversations/messages/outbound
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Message Type Posibles valores: 'Call'
Array of attachments
Conversation Id
Conversation Provider Id
external mail provider's message id
Date of the outbound message
Phone call dialer and receiver information
## Respuestas
Conversation ID.
This is the main Message ID
```json theme={null}
{
"success": true,
"conversationId": "ABC12h2F6uBrIkfXYazb",
"messageId": "t22c6DQcTDf3MjRhwf77",
"message": "string",
"contactId": "string",
"dateAdded": "2024-01-15T10:30:00Z",
"emailMessageId": "string"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/conversations/messages/outbound' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"type": "Call",
"attachments": [
"string"
],
"conversationId": "ve9EPM428h8vShlRW1KT",
"conversationProviderId": "61d6d1f9cdac7612faf80753",
"altId": "61d6d1f9cdac7612faf80753",
"date": "2024-01-15T10:30:00Z"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/outbound', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"type": "Call", "attachments": ["string"], "conversationId": "ve9EPM428h8vShlRW1KT", "conversationProviderId": "61d6d1f9cdac7612faf80753", "altId": "61d6d1f9cdac7612faf80753", "date": "2024-01-15T10:30:00Z"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/conversations/messages/outbound',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"type": "Call", "attachments": ["string"], "conversationId": "ve9EPM428h8vShlRW1KT", "conversationProviderId": "61d6d1f9cdac7612faf80753", "altId": "61d6d1f9cdac7612faf80753", "date": "2024-01-15T10:30:00Z"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'type': 'Call', 'attachments': ['string'], 'conversationId': 've9EPM428h8vShlRW1KT', 'conversationProviderId': '61d6d1f9cdac7612faf80753', 'altId': '61d6d1f9cdac7612faf80753', 'date': '2024-01-15T10:30:00Z'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Add message attachments
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-add-message-attachments
Set attachments on an existing message (replaces existing). Maximum 5 URLs. Supported for TYPE_CUSTOM_CALL (34) and TYPE_CALL (1) with subType EXTERNAL_CALL.
Set attachments on an existing message (replaces existing). Maximum 5 URLs. Supported for TYPE\_CUSTOM\_CALL (34) and TYPE\_CALL (1) with subType EXTERNAL\_CALL.
```http theme={null}
PUT https://services.leadconnectorhq.com/conversations/messages/{messageId}/attachments
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Message Id
## Body
Array of attachment URLs to set on the message (replaces existing). Maximum 5 URLs.
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/conversations/messages/YOUR_messageId/attachments' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"attachments": [
"https://provider.com/recordings/call-123.mp3"
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/YOUR_messageId/attachments', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"attachments": ["https://provider.com/recordings/call-123.mp3"]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/conversations/messages/YOUR_messageId/attachments',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"attachments": ["https://provider.com/recordings/call-123.mp3"]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'attachments': ['https://provider.com/recordings/call-123.mp3']}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Cancel a scheduled email message.
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-cancel-scheduled-email-message
Post the messageId for the API to delete a scheduled email message.
Post the messageId for the API to delete a scheduled email message. \
```http theme={null}
DELETE https://services.leadconnectorhq.com/conversations/messages/email/{emailMessageId}/schedule
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Email Message Id
## Respuestas
HTTP Status code of the request
Error message of the request
```json theme={null}
{
"status": 404,
"message": "Failed cancel the scheduled message"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/conversations/messages/email/YOUR_emailMessageId/schedule' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/email/YOUR_emailMessageId/schedule', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/conversations/messages/email/YOUR_emailMessageId/schedule',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Cancel a scheduled message.
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-cancel-scheduled-message
Post the messageId for the API to delete a scheduled message.
Post the messageId for the API to delete a scheduled message. \
```http theme={null}
DELETE https://services.leadconnectorhq.com/conversations/messages/{messageId}/schedule
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Message Id
## Respuestas
HTTP Status code of the request
Error message of the request
```json theme={null}
{
"status": 404,
"message": "Failed cancel the scheduled message"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/conversations/messages/YOUR_messageId/schedule' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/YOUR_messageId/schedule', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/conversations/messages/YOUR_messageId/schedule',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Complete file upload
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-complete-file-upload
Validates the uploaded file in GCS and returns the public URL. Call this endpoint after successfully uploading the file to the signed URL.
Validates the uploaded file in GCS and returns the public URL. Call this endpoint after successfully uploading the file to the signed URL.
```http theme={null}
POST https://services.leadconnectorhq.com/conversations/messages/upload/complete
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Upload ID from request response
File path from request response
Account ID
Conversation ID
Original filename (for response mapping)
## Respuestas
Map of filename to public URL
File metadata
```json theme={null}
{
"uploadedFiles": {
"video.mp4": "https://your-domain.com/conversations-assets/account/.../video.mp4"
},
"metadata": {
"size": 52428800,
"contentType": "video/mp4"
}
}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/conversations/messages/upload/complete' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"uploadId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"filePath": "account/loc123/conversations/conv456/uuid.mp4",
"locationId": "ve9EPM428h8vShlRW1KT",
"conversationId": "ve9EPM428h8vShlRW1KT",
"filename": "video.mp4"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/upload/complete', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"uploadId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "filePath": "account/loc123/conversations/conv456/uuid.mp4", "locationId": "ve9EPM428h8vShlRW1KT", "conversationId": "ve9EPM428h8vShlRW1KT", "filename": "video.mp4"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/conversations/messages/upload/complete',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"uploadId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "filePath": "account/loc123/conversations/conv456/uuid.mp4", "locationId": "ve9EPM428h8vShlRW1KT", "conversationId": "ve9EPM428h8vShlRW1KT", "filename": "video.mp4"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'uploadId': 'a1b2c3d4-e5f6-7890-abcd-ef1234567890', 'filePath': 'account/loc123/conversations/conv456/uuid.mp4', 'locationId': 've9EPM428h8vShlRW1KT', 'conversationId': 've9EPM428h8vShlRW1KT', 'filename': 'video.mp4'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Conversation
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-create-conversation
Creates a new conversation with the data provided
Creates a new conversation with the data provided
```http theme={null}
POST https://services.leadconnectorhq.com/conversations/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account ID as string
Contact ID as string
## Respuestas
Indicates whether the API request was successful.
Conversation data of the provided conversation ID.
```json theme={null}
{
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/conversations/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "tDtDnQdgm2LXpyiqYvZ6",
"contactId": "tDtDnQdgm2LXpyiqYvZ6"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "tDtDnQdgm2LXpyiqYvZ6", "contactId": "tDtDnQdgm2LXpyiqYvZ6"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/conversations/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "tDtDnQdgm2LXpyiqYvZ6", "contactId": "tDtDnQdgm2LXpyiqYvZ6"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'tDtDnQdgm2LXpyiqYvZ6', 'contactId': 'tDtDnQdgm2LXpyiqYvZ6'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Custom Subtype
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-create-custom-subtype
Create a new custom subtype for a account. Requires agency or account admin role.
Create a new custom subtype for a account. Requires agency or account admin role.
```http theme={null}
POST https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
## Body
Name of the custom subtype (max 100 characters)
Description of the custom subtype (max 100 characters)
Communication channel Posibles valores: 'email', 'sms'
Language code
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "Newsletter Subscription",
"description": "Weekly newsletter subscription preferences",
"channel": "email",
"language": "en"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "Newsletter Subscription", "description": "Weekly newsletter subscription preferences", "channel": "email", "language": "en"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "Newsletter Subscription", "description": "Weekly newsletter subscription preferences", "channel": "email", "language": "en"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'Newsletter Subscription', 'description': 'Weekly newsletter subscription preferences', 'channel': 'email', 'language': 'en'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Conversation
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-delete-conversation
Delete the conversation details based on the conversation ID
Delete the conversation details based on the conversation ID
```http theme={null}
DELETE https://services.leadconnectorhq.com/conversations/{conversationId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Conversation ID as string
## Respuestas
Boolean value as the API response.
```json theme={null}
{
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/conversations/YOUR_conversationId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/YOUR_conversationId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/conversations/YOUR_conversationId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Download transcription by Message ID
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-download-message-transcription
Download the recording transcription for a message by passing the message id
Download the recording transcription for a message by passing the message id
```http theme={null}
GET https://services.leadconnectorhq.com/conversations/locations/{locationId}/messages/{messageId}/transcription/download
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account ID as string
Message ID as string
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversations/locations/YOUR_locationId/messages/YOUR_messageId/transcription/download' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/locations/YOUR_locationId/messages/YOUR_messageId/transcription/download', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversations/locations/YOUR_locationId/messages/YOUR_messageId/transcription/download',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Export messages by account ID
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-export-messages-by-account
Export messages for a specific account with cursor-based pagination support. Response includes messageType (string), source, and subType fields. The channel parameter is optional - if not provided, al
Export messages for a specific account with cursor-based pagination support. Response includes messageType (string), source, and subType fields. The channel parameter is optional - if not provided, all non-email message types will be returned including activity messages (opportunity updates, appointments, etc.).
```http theme={null}
GET https://services.leadconnectorhq.com/conversations/messages/export
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account ID to filter messages by
Number of messages to return per page
Cursor for pagination. Pass the nextCursor from previous response to get next page.
Field to sort by
Sort order
Filter messages by conversation ID
Filter messages by contact ID
Filter by message channel. If not provided, all non-email message types will be returned including activity messages (opportunity updates, appointments, etc.)
Start date to filter messages by
End date to filter messages by
## Respuestas
Array of messages
Type of the message as a string Posibles valores: 'TYPE\_CALL', 'TYPE\_SMS', 'TYPE\_RCS', 'TYPE\_EMAIL', 'TYPE\_SMS\_REVIEW\_REQUEST', 'TYPE\_WEBCHAT', 'TYPE\_SMS\_NO\_SHOW\_REQUEST', 'TYPE\_CAMPAIGN\_SMS', 'TYPE\_CAMPAIGN\_CALL', 'TYPE\_CAMPAIGN\_EMAIL', 'TYPE\_CAMPAIGN\_VOICEMAIL', 'TYPE\_FACEBOOK', 'TYPE\_CAMPAIGN\_FACEBOOK', 'TYPE\_CAMPAIGN\_MANUAL\_CALL', 'TYPE\_CAMPAIGN\_MANUAL\_SMS', 'TYPE\_GMB', 'TYPE\_CAMPAIGN\_GMB', 'TYPE\_REVIEW', 'TYPE\_INSTAGRAM', 'TYPE\_WHATSAPP', 'TYPE\_CUSTOM\_SMS', 'TYPE\_CUSTOM\_EMAIL', 'TYPE\_CUSTOM\_PROVIDER\_SMS', 'TYPE\_CUSTOM\_PROVIDER\_EMAIL', 'TYPE\_IVR\_CALL', 'TYPE\_ACTIVITY\_CONTACT', 'TYPE\_ACTIVITY\_INVOICE', 'TYPE\_ACTIVITY\_PAYMENT', 'TYPE\_ACTIVITY\_OPPORTUNITY', 'TYPE\_LIVE\_CHAT', 'TYPE\_LIVE\_CHAT\_INFO\_MESSAGE', 'TYPE\_ACTIVITY\_APPOINTMENT', 'TYPE\_FACEBOOK\_COMMENT', 'TYPE\_INSTAGRAM\_COMMENT', 'TYPE\_CUSTOM\_CALL', 'TYPE\_INTERNAL\_COMMENT', 'TYPE\_ACTIVITY\_EMPLOYEE\_ACTION\_LOG', 'TYPE\_TIKTOK', 'TYPE\_TIKTOK\_COMMENT', 'TYPE\_ACTIVITY\_WHATSAPP', 'TYPE\_FORM\_SUBMISSION', 'TYPE\_SMS\_REACTION'
Posibles valores: 'inbound', 'outbound'
Posibles valores: 'connected', 'delivered', 'failed', 'opened', 'pending', 'read', 'scheduled', 'sent', 'undelivered', 'clicked', 'opt\_out', 'queued'
An array of attachment URLs. Attachments will be empty for Call and Voicemails, type 1 and 10. Please use get call recording API to fetch call recording and voicemails.
Call duration in seconds
Call status - can be pending, completed, answered, busy, no-answer, failed, canceled, or voicemail Posibles valores: 'pending', 'completed', 'answered', 'busy', 'no-answer', 'failed', 'canceled', 'voicemail'
meta will contain email, for message type 3 (email). messageIds is list of all email message ids under the message thread
Message source Posibles valores: 'workflow', 'bulk\_actions', 'campaign', 'api', 'app'
User Id
Conversation Provider Id
Chat Widget Id
Cursor for fetching next page. Null if no more results.
Total number of messages matching the query
```json theme={null}
{
"messages": [
{
"id": "ve9EPM428h8vShlRW1KT",
"type": 1,
"messageType": "SMS",
"locationId": "ve9EPM428h8vShlRW1KT",
"contactId": "ve9EPM428h8vShlRW1KT",
"conversationId": "ve9EPM428h8vShlRW1KT",
"dateAdded": "2024-03-27T18:13:49.000Z",
"body": "Hi there",
"direction": "inbound",
"status": "connected",
"contentType": "text/plain",
"attachments": [
"string"
],
"meta": {
"callDuration": 120,
"callStatus": "completed",
"email": {
"email": {
"messageIds": [
"ve9EPM428kjkvShlRW1KT",
"ve9EPs1028kjkvShlRW1KT"
]
}
}
},
"source": "workflow",
"userId": "ve9EPM428kjkvShlRW1KT",
"conversationProviderId": "ve9EPM428kjkvShlRW1KT",
"chatWidgetId": "67b0cc8cf14b19d85ace7s35"
}
],
"nextCursor": "eyJwaXRJZCI6ImFiYy0xMjMiLCJsYXN0U29ydCI6WzE2NDY4NjQ0MDBdLCJsYXN0SWQiOiIxMjMifQ==",
"total": 1234
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversations/messages/export' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/export', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversations/messages/export',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get All Custom Subtypes
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-get-all-custom-subtypes
Get all custom subtypes for a account
Get all custom subtypes for a account
```http theme={null}
GET https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Contact Unsubscription Status
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-get-contact-unsubscription-status
Get all subscription statuses for a contact (all emails or specific email)
Get all subscription statuses for a contact (all emails or specific email)
```http theme={null}
GET https://services.leadconnectorhq.com/conversations/preferences/unsubscriptions/status
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
Contact Id
Email address (optional - if not provided, gets all emails for contact)
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversations/preferences/unsubscriptions/status' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/preferences/unsubscriptions/status', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversations/preferences/unsubscriptions/status',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Conversation
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-get-conversation
Get the conversation details based on the conversation ID
Get the conversation details based on the conversation ID
```http theme={null}
GET https://services.leadconnectorhq.com/conversations/{conversationId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Conversation ID as string
## Respuestas
Unique identifier of the contact associated with this conversation
Unique identifier of the business account where this conversation takes place
Flag indicating if this conversation has been moved to trash/deleted
Flag indicating if this conversation is currently in the main inbox view
Communication channel type for this conversation: 1 (Phone), 2 (Email), 3 (Facebook Messenger), 4 (Review), 5 (Group SMS), 6 (Internal Chat - coming soon)
Number of messages in this conversation that have not been read by the user
Unique identifier of the team member currently responsible for handling this conversation
Unique identifier for this specific conversation thread
Flag indicating if this conversation has been marked as important/starred by the user
```json theme={null}
{
"contactId": "ve9EPM428kjkvShlRW1KT",
"locationId": "ve9EPM428kjkvShlRW1KT",
"deleted": false,
"inbox": true,
"type": 0,
"unreadCount": 1,
"assignedTo": "ve9EPM428kjkvShlRW1KT",
"id": "ve9EPM428kjkvShlRW1KT",
"starred": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversations/YOUR_conversationId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/YOUR_conversationId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversations/YOUR_conversationId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get email by Id
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-get-email-by-id
Get email by Id
Get email by Id
```http theme={null}
GET https://services.leadconnectorhq.com/conversations/messages/email/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Respuestas
External Id
Message Id or thread Id
Posibles valores: 'inbound', 'outbound'
Posibles valores: 'pending', 'scheduled', 'sent', 'delivered', 'read', 'undelivered', 'connected', 'failed', 'opened'
An array of attachment URLs.
Name and Email Id of the sender
List of email Ids of the receivers
List of email Ids of the people in the cc field
List of email Ids of the people in the bcc field
In case of reply, email message Id of the reply to email
Email source Posibles valores: 'workflow', 'bulk\_actions', 'campaign', 'api', 'app'
Conversation provider ID
```json theme={null}
{
"id": "ve9EPM428h8vShlRW1KT",
"altId": "ve9EPM428h8vShlRW1KT",
"threadId": "ve9EPM428h8vShlRW1KT",
"locationId": "ve9EPM428h8vShlRW1KT",
"contactId": "ve9EPM428h8vShlRW1KT",
"conversationId": "ve9EPM428h8vShlRW1KT",
"dateAdded": "2024-03-27T18:13:49.000Z",
"subject": "Order confirm",
"body": "Hi there",
"direction": "inbound",
"status": "pending",
"contentType": "text/plain",
"attachments": [
"string"
],
"provider": "string",
"from": "string",
"to": [
"string"
],
"cc": [
"string"
],
"bcc": [
"string"
],
"replyToMessageId": "string",
"source": "workflow",
"conversationProviderId": "cI08i1Bls3iTB9bKgF01"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversations/messages/email/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/email/YOUR_id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversations/messages/email/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get message by message id
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-get-message
Get message by message id.
Get message by message id.
```http theme={null}
GET https://services.leadconnectorhq.com/conversations/messages/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Respuestas
Type of the message as a string Posibles valores: 'TYPE\_CALL', 'TYPE\_SMS', 'TYPE\_RCS', 'TYPE\_EMAIL', 'TYPE\_SMS\_REVIEW\_REQUEST', 'TYPE\_WEBCHAT', 'TYPE\_SMS\_NO\_SHOW\_REQUEST', 'TYPE\_CAMPAIGN\_SMS', 'TYPE\_CAMPAIGN\_CALL', 'TYPE\_CAMPAIGN\_EMAIL', 'TYPE\_CAMPAIGN\_VOICEMAIL', 'TYPE\_FACEBOOK', 'TYPE\_CAMPAIGN\_FACEBOOK', 'TYPE\_CAMPAIGN\_MANUAL\_CALL', 'TYPE\_CAMPAIGN\_MANUAL\_SMS', 'TYPE\_GMB', 'TYPE\_CAMPAIGN\_GMB', 'TYPE\_REVIEW', 'TYPE\_INSTAGRAM', 'TYPE\_WHATSAPP', 'TYPE\_CUSTOM\_SMS', 'TYPE\_CUSTOM\_EMAIL', 'TYPE\_CUSTOM\_PROVIDER\_SMS', 'TYPE\_CUSTOM\_PROVIDER\_EMAIL', 'TYPE\_IVR\_CALL', 'TYPE\_ACTIVITY\_CONTACT', 'TYPE\_ACTIVITY\_INVOICE', 'TYPE\_ACTIVITY\_PAYMENT', 'TYPE\_ACTIVITY\_OPPORTUNITY', 'TYPE\_LIVE\_CHAT', 'TYPE\_LIVE\_CHAT\_INFO\_MESSAGE', 'TYPE\_ACTIVITY\_APPOINTMENT', 'TYPE\_FACEBOOK\_COMMENT', 'TYPE\_INSTAGRAM\_COMMENT', 'TYPE\_CUSTOM\_CALL', 'TYPE\_INTERNAL\_COMMENT', 'TYPE\_ACTIVITY\_EMPLOYEE\_ACTION\_LOG', 'TYPE\_TIKTOK', 'TYPE\_TIKTOK\_COMMENT', 'TYPE\_ACTIVITY\_WHATSAPP', 'TYPE\_FORM\_SUBMISSION', 'TYPE\_SMS\_REACTION'
Posibles valores: 'inbound', 'outbound'
Posibles valores: 'connected', 'delivered', 'failed', 'opened', 'pending', 'read', 'scheduled', 'sent', 'undelivered', 'clicked', 'opt\_out', 'queued'
An array of attachment URLs. Attachments will be empty for Call and Voicemails, type 1 and 10. Please use get call recording API to fetch call recording and voicemails.
Call duration in seconds
Call status - can be pending, completed, answered, busy, no-answer, failed, canceled, or voicemail Posibles valores: 'pending', 'completed', 'answered', 'busy', 'no-answer', 'failed', 'canceled', 'voicemail'
meta will contain email, for message type 3 (email). messageIds is list of all email message ids under the message thread
Message source Posibles valores: 'workflow', 'bulk\_actions', 'campaign', 'api', 'app'
User Id
Conversation Provider Id
Chat Widget Id
```json theme={null}
{
"id": "ve9EPM428h8vShlRW1KT",
"type": 1,
"messageType": "SMS",
"locationId": "ve9EPM428h8vShlRW1KT",
"contactId": "ve9EPM428h8vShlRW1KT",
"conversationId": "ve9EPM428h8vShlRW1KT",
"dateAdded": "2024-03-27T18:13:49.000Z",
"body": "Hi there",
"direction": "inbound",
"status": "connected",
"contentType": "text/plain",
"attachments": [
"string"
],
"meta": {
"callDuration": 120,
"callStatus": "completed",
"email": {
"email": {
"messageIds": [
"ve9EPM428kjkvShlRW1KT",
"ve9EPs1028kjkvShlRW1KT"
]
}
}
},
"source": "workflow",
"userId": "ve9EPM428kjkvShlRW1KT",
"conversationProviderId": "ve9EPM428kjkvShlRW1KT",
"chatWidgetId": "67b0cc8cf14b19d85ace7s35"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversations/messages/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/YOUR_id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversations/messages/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Recording by Message ID
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-get-message-recording
Get the recording for a message by passing the message id
Get the recording for a message by passing the message id
```http theme={null}
GET https://services.leadconnectorhq.com/conversations/messages/{messageId}/locations/{locationId}/recording
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account ID as string
Message ID as string
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversations/messages/YOUR_messageId/locations/YOUR_locationId/recording' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/YOUR_messageId/locations/YOUR_locationId/recording', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversations/messages/YOUR_messageId/locations/YOUR_locationId/recording',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get transcription by Message ID
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-get-message-transcription
Get the recording transcription for a message by passing the message id
Get the recording transcription for a message by passing the message id
```http theme={null}
GET https://services.leadconnectorhq.com/conversations/locations/{locationId}/messages/{messageId}/transcription
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account ID as string
Message ID as string
## Respuestas
Media channel describes the user interaction channel
Index of the sentence in the transcription
Start time of the sentence in milliseconds
End time of the sentence in milliseconds
Transcript of the sentence
Confidence of the transcription
```json theme={null}
{
"mediaChannel": "1",
"sentenceIndex": "1",
"startTime": "34",
"endTime": "45",
"transcript": "This call may be recorded for quality assurance purposes.",
"confidence": "0.5"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversations/locations/YOUR_locationId/messages/YOUR_messageId/transcription' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/locations/YOUR_locationId/messages/YOUR_messageId/transcription', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversations/locations/YOUR_locationId/messages/YOUR_messageId/transcription',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get messages by conversation id
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-get-messages
Get messages by conversation id.
Get messages by conversation id.
```http theme={null}
GET https://services.leadconnectorhq.com/conversations/{conversationId}/messages
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Conversation ID as string
## Query parameters
Message ID of the last message in the list as a string
Number of messages to be fetched from the conversation. Default limit is 20
Types of message to fetched separated with comma
## Respuestas
Id of the last message in the messages array
Next page value true indicates only 20 message is in the response. Rest of the messages are in the next page. Please use the lastMessageId value in the query to get the next page messages
Array of messages
Type of the message as a string Posibles valores: 'TYPE\_CALL', 'TYPE\_SMS', 'TYPE\_RCS', 'TYPE\_EMAIL', 'TYPE\_SMS\_REVIEW\_REQUEST', 'TYPE\_WEBCHAT', 'TYPE\_SMS\_NO\_SHOW\_REQUEST', 'TYPE\_CAMPAIGN\_SMS', 'TYPE\_CAMPAIGN\_CALL', 'TYPE\_CAMPAIGN\_EMAIL', 'TYPE\_CAMPAIGN\_VOICEMAIL', 'TYPE\_FACEBOOK', 'TYPE\_CAMPAIGN\_FACEBOOK', 'TYPE\_CAMPAIGN\_MANUAL\_CALL', 'TYPE\_CAMPAIGN\_MANUAL\_SMS', 'TYPE\_GMB', 'TYPE\_CAMPAIGN\_GMB', 'TYPE\_REVIEW', 'TYPE\_INSTAGRAM', 'TYPE\_WHATSAPP', 'TYPE\_CUSTOM\_SMS', 'TYPE\_CUSTOM\_EMAIL', 'TYPE\_CUSTOM\_PROVIDER\_SMS', 'TYPE\_CUSTOM\_PROVIDER\_EMAIL', 'TYPE\_IVR\_CALL', 'TYPE\_ACTIVITY\_CONTACT', 'TYPE\_ACTIVITY\_INVOICE', 'TYPE\_ACTIVITY\_PAYMENT', 'TYPE\_ACTIVITY\_OPPORTUNITY', 'TYPE\_LIVE\_CHAT', 'TYPE\_LIVE\_CHAT\_INFO\_MESSAGE', 'TYPE\_ACTIVITY\_APPOINTMENT', 'TYPE\_FACEBOOK\_COMMENT', 'TYPE\_INSTAGRAM\_COMMENT', 'TYPE\_CUSTOM\_CALL', 'TYPE\_INTERNAL\_COMMENT', 'TYPE\_ACTIVITY\_EMPLOYEE\_ACTION\_LOG', 'TYPE\_TIKTOK', 'TYPE\_TIKTOK\_COMMENT', 'TYPE\_ACTIVITY\_WHATSAPP', 'TYPE\_FORM\_SUBMISSION', 'TYPE\_SMS\_REACTION'
Posibles valores: 'inbound', 'outbound'
Posibles valores: 'connected', 'delivered', 'failed', 'opened', 'pending', 'read', 'scheduled', 'sent', 'undelivered', 'clicked', 'opt\_out', 'queued'
An array of attachment URLs. Attachments will be empty for Call and Voicemails, type 1 and 10. Please use get call recording API to fetch call recording and voicemails.
Call duration in seconds
Call status - can be pending, completed, answered, busy, no-answer, failed, canceled, or voicemail Posibles valores: 'pending', 'completed', 'answered', 'busy', 'no-answer', 'failed', 'canceled', 'voicemail'
meta will contain email, for message type 3 (email). messageIds is list of all email message ids under the message thread
Message source Posibles valores: 'workflow', 'bulk\_actions', 'campaign', 'api', 'app'
User Id
Conversation Provider Id
Chat Widget Id
```json theme={null}
{
"lastMessageId": "p1mRSHeLDhAms5q0LMr4",
"nextPage": true,
"messages": [
{
"id": "ve9EPM428h8vShlRW1KT",
"type": 1,
"messageType": "SMS",
"locationId": "ve9EPM428h8vShlRW1KT",
"contactId": "ve9EPM428h8vShlRW1KT",
"conversationId": "ve9EPM428h8vShlRW1KT",
"dateAdded": "2024-03-27T18:13:49.000Z",
"body": "Hi there",
"direction": "inbound",
"status": "connected",
"contentType": "text/plain",
"attachments": [
"string"
],
"meta": {
"callDuration": 120,
"callStatus": "completed",
"email": {
"email": {
"messageIds": [
"ve9EPM428kjkvShlRW1KT",
"ve9EPs1028kjkvShlRW1KT"
]
}
}
},
"source": "workflow",
"userId": "ve9EPM428kjkvShlRW1KT",
"conversationProviderId": "ve9EPM428kjkvShlRW1KT",
"chatWidgetId": "67b0cc8cf14b19d85ace7s35"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversations/YOUR_conversationId/messages' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/YOUR_conversationId/messages', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversations/YOUR_conversationId/messages',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Initiate file upload to GCS
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-initiate-file-upload
Generates a signed URL for direct file upload to Google Cloud Storage. Returns a signed URL valid for 15 minutes. Upload file via PUT request, then call /complete to finalize.
Generates a signed URL for direct file upload to Google Cloud Storage. Returns a signed URL valid for 15 minutes. Upload file via PUT request, then call /complete to finalize.
```http theme={null}
POST https://services.leadconnectorhq.com/conversations/messages/upload/initiate
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account ID
Conversation ID
Original filename with extension
MIME type of the file
File size in bytes (optional, for pre-validation)
Channel type for size limits (WHATSAPP for 100MB limit, others for 5MB)
## Respuestas
Signed URL for direct upload to GCS. Use PUT request with file content.
Unique upload ID for tracking and completing the upload
File path in GCS bucket (needed for confirmation endpoint)
URL expiration timestamp (Unix milliseconds)
Maximum allowed file size in bytes
```json theme={null}
{
"uploadUrl": "https://storage.googleapis.com/bucket/path?X-Goog-Algorithm=...",
"uploadId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"filePath": "account/loc123/conversations/conv456/uuid.mp4",
"expiresAt": 1701619200000,
"maxFileSize": 104857600
}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/conversations/messages/upload/initiate' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "ve9EPM428h8vShlRW1KT",
"conversationId": "ve9EPM428h8vShlRW1KT",
"filename": "video.mp4",
"contentType": "video/mp4",
"fileSize": 52428800,
"channel": "WHATSAPP"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/upload/initiate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "ve9EPM428h8vShlRW1KT", "conversationId": "ve9EPM428h8vShlRW1KT", "filename": "video.mp4", "contentType": "video/mp4", "fileSize": 52428800, "channel": "WHATSAPP"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/conversations/messages/upload/initiate',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "ve9EPM428h8vShlRW1KT", "conversationId": "ve9EPM428h8vShlRW1KT", "filename": "video.mp4", "contentType": "video/mp4", "fileSize": 52428800, "channel": "WHATSAPP"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 've9EPM428h8vShlRW1KT', 'conversationId': 've9EPM428h8vShlRW1KT', 'filename': 'video.mp4', 'contentType': 'video/mp4', 'fileSize': 52428800, 'channel': 'WHATSAPP'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Agent/Ai-Bot is typing a message indicator for live chat
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-live-chat-agent-typing
Agent/AI-Bot will call this when they are typing a message in live chat message
Agent/AI-Bot will call this when they are typing a message in live chat message
```http theme={null}
POST https://services.leadconnectorhq.com/conversations/providers/live-chat/typing
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id
Typing status
visitorId is the Unique ID assigned to each Live chat visitor. visitorId will be added soon in GET Contact API
Conversation Id
## Respuestas
```json theme={null}
{
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/conversations/providers/live-chat/typing' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "ve9EPM428h8vShlRW1KT",
"isTyping": true,
"visitorId": "ve9EPM428h8vShlRW1KT",
"conversationId": "ve9EPM428h8vShlRW1KT"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/providers/live-chat/typing', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "ve9EPM428h8vShlRW1KT", "isTyping": true, "visitorId": "ve9EPM428h8vShlRW1KT", "conversationId": "ve9EPM428h8vShlRW1KT"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/conversations/providers/live-chat/typing',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "ve9EPM428h8vShlRW1KT", "isTyping": true, "visitorId": "ve9EPM428h8vShlRW1KT", "conversationId": "ve9EPM428h8vShlRW1KT"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 've9EPM428h8vShlRW1KT', 'isTyping': true, 'visitorId': 've9EPM428h8vShlRW1KT', 'conversationId': 've9EPM428h8vShlRW1KT'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Search Conversations
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-search-conversation
Returns a list of all conversations matching the search criteria along with the sort and filter options selected.
Returns a list of all conversations matching the search criteria along with the sort and filter options selected.
```http theme={null}
GET https://services.leadconnectorhq.com/conversations/search
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
Contact Id
User IDs that conversations are assigned to. Multiple IDs can be provided as comma-separated values. Use "unassigned" to fetch conversations not assigned to any user.
User IDs of followers to filter conversations by. Multiple IDs can be provided as comma-separated values.
User Id of the mention. Multiple values are comma separated.
Search paramater as a string
Sort paramater - asc or desc
Search to begin after the specified date - should contain the sort value of the last document
Id of the conversation
Limit of conversations - Default is 20
Type of the last message in the conversation as a string
Action of the last outbound message in the conversation as string.
Direction of the last message in the conversation as string.
The status of the conversation to be filtered - all, read, unread, starred
The sorting of the conversation to be filtered as - manual messages or all messages
Id of score profile on which sortBy.ScoreProfile should sort on
Id of score profile on which conversations should get filtered out, works with scoreProfileMin & scoreProfileMax
Minimum value for score
Maximum value for score
Start date filter for dateAdded field (Unix timestamp in milliseconds)
End date filter for dateAdded field (Unix timestamp in milliseconds)
## Respuestas
The list of all conversations found for the given query
Conversation Id
Contact Id
Account Id
Content of the most recent message in the conversation
Channel/type of the most recent message (SMS, Email, Call, etc) Posibles valores: 'TYPE\_CALL', 'TYPE\_SMS', 'TYPE\_RCS', 'TYPE\_EMAIL', 'TYPE\_SMS\_REVIEW\_REQUEST', 'TYPE\_WEBCHAT', 'TYPE\_SMS\_NO\_SHOW\_REQUEST', 'TYPE\_CAMPAIGN\_SMS', 'TYPE\_CAMPAIGN\_CALL', 'TYPE\_CAMPAIGN\_EMAIL', 'TYPE\_CAMPAIGN\_VOICEMAIL', 'TYPE\_FACEBOOK', 'TYPE\_CAMPAIGN\_FACEBOOK', 'TYPE\_CAMPAIGN\_MANUAL\_CALL', 'TYPE\_CAMPAIGN\_MANUAL\_SMS', 'TYPE\_GMB', 'TYPE\_CAMPAIGN\_GMB', 'TYPE\_REVIEW', 'TYPE\_INSTAGRAM', 'TYPE\_WHATSAPP', 'TYPE\_CUSTOM\_SMS', 'TYPE\_CUSTOM\_EMAIL', 'TYPE\_CUSTOM\_PROVIDER\_SMS', 'TYPE\_CUSTOM\_PROVIDER\_EMAIL', 'TYPE\_IVR\_CALL', 'TYPE\_ACTIVITY\_CONTACT', 'TYPE\_ACTIVITY\_INVOICE', 'TYPE\_ACTIVITY\_PAYMENT', 'TYPE\_ACTIVITY\_OPPORTUNITY', 'TYPE\_LIVE\_CHAT', 'TYPE\_LIVE\_CHAT\_INFO\_MESSAGE', 'TYPE\_ACTIVITY\_APPOINTMENT', 'TYPE\_FACEBOOK\_COMMENT', 'TYPE\_INSTAGRAM\_COMMENT', 'TYPE\_CUSTOM\_CALL', 'TYPE\_INTERNAL\_COMMENT', 'TYPE\_ACTIVITY\_EMPLOYEE\_ACTION\_LOG', 'TYPE\_TIKTOK', 'TYPE\_TIKTOK\_COMMENT', 'TYPE\_ACTIVITY\_WHATSAPP', 'TYPE\_FORM\_SUBMISSION', 'TYPE\_SMS\_REACTION'
Primary channel/type of the conversation (Phone, Email, etc) Posibles valores: 'TYPE\_PHONE', 'TYPE\_EMAIL', 'TYPE\_FB\_MESSENGER', 'TYPE\_REVIEW', 'TYPE\_GROUP\_SMS'
Number of unread messages in this conversation
Complete name of the contact (first and last name)
Alternative display name for the contact - used when full name is not available
Primary email address of the contact
Primary phone number of the contact
Total Number of results found for the given query
```json theme={null}
{
"conversations": [
{
"id": "ABCHkzuJQ8ZMd4Te84GK",
"contactId": "ABCHkzuJQ8ZMd4Te84GK",
"locationId": "ABCHkzuJQ8ZMd4Te84GK",
"lastMessageBody": "This is a sample message body",
"lastMessageType": "TYPE_SMS",
"type": "TYPE_PHONE",
"unreadCount": 1,
"fullName": "John Doe",
"contactName": "John Doe Company",
"email": "johndoe@mailingdomain.com",
"phone": "+15550001234"
}
],
"total": 100
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/conversations/search' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/search', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/conversations/search',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Send a new message
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-send-a-new-message
Post the necessary fields for the API to send a new message.
Post the necessary fields for the API to send a new message.
```http theme={null}
POST https://services.leadconnectorhq.com/conversations/messages
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Type of message being sent Posibles valores: 'SMS', 'RCS', 'Email', 'WhatsApp', 'IG', 'FB', 'Custom', 'Live\_Chat', 'TIKTOK'
Type of message being sent
ID of the contact receiving the message
ID of the associated appointment
Array of attachment URLs
Email address to send from
Array of CC email addresses
Array of BCC email addresses
HTML content of the message
Text content of the message
Subject line for email messages
ID of message being replied to
ID of message template
ID of message thread. For email messages, this is the message ID that contains multiple email messages in the thread
UTC Timestamp (in seconds) at which the message should be scheduled
ID of conversation provider
Email address to send to, if different from contact's primary email. This should be a valid email address associated with the contact.
Custom subtype ID for email unsubscription preferences. Only applies to email messages.
Mode for email replies Posibles valores: 'reply', 'reply\_all'
Phone number used as the sender number for outbound messages
Recipient phone number for outbound messages
Forwarding configuration for emails
Message status Posibles valores: 'delivered', 'failed', 'pending', 'read'
Whether the scheduled email uses native AI for the email scheduling
Optimization period in hours (24h, 48h, or 72h) Posibles valores: '24h', '48h', '72h'
## Respuestas
Conversation ID.
This contains the email message id (only for Email type). Use this ID to send inbound replies to GHL to create a threaded email.
This is the main Message ID
When sending via the GMB channel, we will be returning list of `messageIds` instead of single `messageId`.
Additional response message when sending a workflow message
Optional metadata for forwarded email
Message status Posibles valores: 'delivered', 'failed', 'pending', 'read'
```json theme={null}
{
"conversationId": "ABC12h2F6uBrIkfXYazb",
"emailMessageId": "rnGyqh2F6uBrIkfhFo9A",
"messageId": "t22c6DQcTDf3MjRhwf77",
"messageIds": [
"string"
],
"msg": "Message queued successfully.",
"forwardData": {
"forwardWholeThread": false,
"messageId": "t22c6DQcTDf3MjRhwf77",
"emailMessageId": "rnGyqh2F6uBrIkfhFo9A",
"forwardToEmail": "recipient@example.com",
"recipientContactId": "DEF56h2F6uBrIkfXYacd"
},
"status": "delivered"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/conversations/messages' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"type": "Email",
"subType": "Email",
"contactId": "abc123def456",
"appointmentId": "appt123",
"attachments": [
"https://storage.com/file1.pdf",
"https://storage.com/file2.jpg"
],
"emailFrom": "sender@company.com",
"emailCc": [
"cc1@company.com",
"cc2@company.com"
],
"emailBcc": [
"bcc1@company.com",
"bcc2@company.com"
],
"html": "
', 'message': 'Hello, how can I help you today?', 'subject': 'Important Update', 'replyMessageId': 'msg123', 'templateId': 'template123', 'threadId': 'thread123', 'scheduledTimestamp': 1669287863, 'conversationProviderId': 'provider123', 'emailTo': 'recipient@company.com', 'customSubtypeId': '507f1f77bcf86cd799439011', 'emailReplyMode': 'reply_all', 'fromNumber': '+1499499299', 'toNumber': '+1439499299', 'forward': {'isForwarded': true, 'forwardWholeThread': false, 'messageId': 't22c6DQcTDf3MjRhwf77', 'emailMessageId': 'rnGyqh2F6uBrIkfhFo9A', 'toEmail': 'forward@example.com', 'recipientContactId': 'DEF56h2F6uBrIkfXYacd'}, 'status': 'delivered', 'usesNativeSchedulingAi': false, 'optimizationPeriod': '24h'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Send a review reply to Google My Business
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-send-review-reply
Post a reply to a customer review on Google My Business
Post a reply to a customer review on Google My Business
```http theme={null}
POST https://services.leadconnectorhq.com/conversations/messages/review-reply
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Conversation ID (must have reviewId)
Account ID
Review reply message text
## Respuestas
Conversation ID.
This contains the email message id (only for Email type). Use this ID to send inbound replies to GHL to create a threaded email.
This is the main Message ID
When sending via the GMB channel, we will be returning list of `messageIds` instead of single `messageId`.
Additional response message when sending a workflow message
Optional metadata for forwarded email
Message status Posibles valores: 'delivered', 'failed', 'pending', 'read'
```json theme={null}
{
"conversationId": "ABC12h2F6uBrIkfXYazb",
"emailMessageId": "rnGyqh2F6uBrIkfhFo9A",
"messageId": "t22c6DQcTDf3MjRhwf77",
"messageIds": [
"string"
],
"msg": "Message queued successfully.",
"forwardData": {
"forwardWholeThread": false,
"messageId": "t22c6DQcTDf3MjRhwf77",
"emailMessageId": "rnGyqh2F6uBrIkfhFo9A",
"forwardToEmail": "recipient@example.com",
"recipientContactId": "DEF56h2F6uBrIkfXYacd"
},
"status": "delivered"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/conversations/messages/review-reply' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"conversationId": "conv123",
"locationId": "loc123",
"message": "Thank you for your review!"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/review-reply', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"conversationId": "conv123", "locationId": "loc123", "message": "Thank you for your review!"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/conversations/messages/review-reply',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"conversationId": "conv123", "locationId": "loc123", "message": "Thank you for your review!"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'conversationId': 'conv123', 'locationId': 'loc123', 'message': 'Thank you for your review!'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Conversation
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-update-conversation
Update the conversation details based on the conversation ID
Update the conversation details based on the conversation ID
```http theme={null}
PUT https://services.leadconnectorhq.com/conversations/{conversationId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Conversation ID as string
## Body
Account ID as string
Count of unread messages in the conversation
Starred status of the conversation.
## Respuestas
Boolean value as the API response.
Conversation data of the provided conversation ID.
```json theme={null}
{
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/conversations/YOUR_conversationId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "tDtDnQdgm2LXpyiqYvZ6",
"unreadCount": 1,
"starred": true,
"feedback": {}
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/YOUR_conversationId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "tDtDnQdgm2LXpyiqYvZ6", "unreadCount": 1, "starred": true, "feedback": {}}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/conversations/YOUR_conversationId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "tDtDnQdgm2LXpyiqYvZ6", "unreadCount": 1, "starred": true, "feedback": {}},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'tDtDnQdgm2LXpyiqYvZ6', 'unreadCount': 1, 'starred': true, 'feedback': {}}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Custom Subtype
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-update-custom-subtype
Update or archive a custom subtype. Requires agency or account admin role.
Update or archive a custom subtype. Requires agency or account admin role.
```http theme={null}
PUT https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Custom Subtype Id
## Query parameters
Account Id
## Body
Name of the custom subtype (max 100 characters)
Description of the custom subtype (max 100 characters)
Whether the custom subtype is archived
Resubscription legal form ID (optional when archiving)
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "Newsletter Subscription",
"description": "Updated weekly newsletter subscription preferences",
"archived": false,
"resubscription_legal_form_id": "form_123456"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes/YOUR_id', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "Newsletter Subscription", "description": "Updated weekly newsletter subscription preferences", "archived": false, "resubscription_legal_form_id": "form_123456"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "Newsletter Subscription", "description": "Updated weekly newsletter subscription preferences", "archived": false, "resubscription_legal_form_id": "form_123456"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'Newsletter Subscription', 'description': 'Updated weekly newsletter subscription preferences', 'archived': false, 'resubscription_legal_form_id': 'form_123456'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update message status
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-update-message-status
Post the necessary fields for the API to update message status.
Post the necessary fields for the API to update message status.
```http theme={null}
PUT https://services.leadconnectorhq.com/conversations/messages/{messageId}/status
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Message Id
## Body
Message status Posibles valores: 'delivered', 'failed', 'pending', 'read'
Error object from the conversation provider
Email message Id
Email delivery status for additional email recipients.
## Respuestas
Conversation ID.
This contains the email message id (only for Email type). Use this ID to send inbound replies to GHL to create a threaded email.
This is the main Message ID
When sending via the GMB channel, we will be returning list of `messageIds` instead of single `messageId`.
Additional response message when sending a workflow message
Optional metadata for forwarded email
Message status Posibles valores: 'delivered', 'failed', 'pending', 'read'
```json theme={null}
{
"conversationId": "ABC12h2F6uBrIkfXYazb",
"emailMessageId": "rnGyqh2F6uBrIkfhFo9A",
"messageId": "t22c6DQcTDf3MjRhwf77",
"messageIds": [
"string"
],
"msg": "Message queued successfully.",
"forwardData": {
"forwardWholeThread": false,
"messageId": "t22c6DQcTDf3MjRhwf77",
"emailMessageId": "rnGyqh2F6uBrIkfhFo9A",
"forwardToEmail": "recipient@example.com",
"recipientContactId": "DEF56h2F6uBrIkfXYacd"
},
"status": "delivered"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/conversations/messages/YOUR_messageId/status' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"status": "read",
"emailMessageId": "ve9EPM428h8vShlRW1KT",
"recipients": [
"string"
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/YOUR_messageId/status', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"status": "read", "emailMessageId": "ve9EPM428h8vShlRW1KT", "recipients": ["string"]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/conversations/messages/YOUR_messageId/status',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"status": "read", "emailMessageId": "ve9EPM428h8vShlRW1KT", "recipients": ["string"]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'status': 'read', 'emailMessageId': 've9EPM428h8vShlRW1KT', 'recipients': ['string']}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Upload file attachments
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-upload-file-attachments
Post the necessary fields for the API to upload files. The files need to be a buffer with the key "fileAttachment".
The allowed file types are:
JPG
JPEG
PNG<
Post the necessary fields for the API to upload files. The files need to be a buffer with the key "fileAttachment". \ \ The allowed file types are: \ \
\
JPG\
\
JPEG\
\
PNG\
\
MP4\
\
MPEG\
\
ZIP\
\
RAR\
\
PDF\
\
DOC\
\
DOCX\
\
TXT\
\
MP3\
\
WAV\
\
\ \ The API will return an object with the URLs
```http theme={null}
POST https://services.leadconnectorhq.com/conversations/messages/upload
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Conversation Id
Contact Id
Twilio chat service SID for group SMS uploads
Flag to indicate group SMS upload flow. When true, only 1 file upload is allowed per request.
## Respuestas
Twilio media SIDs for group SMS (when isGroupSms=true)
```json theme={null}
{
"uploadedFiles": {},
"twilioMediaSids": [
"MExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
HTTP Status code of the request Posibles valores: 400, 413, 415
Error message of the request
```json theme={null}
{
"status": 413,
"message": "Failed to upload the files"
}
```
HTTP Status code of the request Posibles valores: 400, 413, 415
Error message of the request
```json theme={null}
{
"status": 413,
"message": "Failed to upload the files"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/conversations/messages/upload' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"conversationId": "ve9EPM428h8vShlRW1KT",
"contactId": "ve9EPM428h8vShlRW1KT",
"locationId": "string",
"attachmentUrls": [
"string"
],
"chatServiceSid": "ISxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"isGroupSms": "true"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/messages/upload', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"conversationId": "ve9EPM428h8vShlRW1KT", "contactId": "ve9EPM428h8vShlRW1KT", "locationId": "string", "attachmentUrls": ["string"], "chatServiceSid": "ISxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "isGroupSms": "true"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/conversations/messages/upload',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"conversationId": "ve9EPM428h8vShlRW1KT", "contactId": "ve9EPM428h8vShlRW1KT", "locationId": "string", "attachmentUrls": ["string"], "chatServiceSid": "ISxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "isGroupSms": "true"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'conversationId': 've9EPM428h8vShlRW1KT', 'contactId': 've9EPM428h8vShlRW1KT', 'locationId': 'string', 'attachmentUrls': ['string'], 'chatServiceSid': 'ISxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'isGroupSms': 'true'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# User Subscription Change
Source: https://developers.leadwaycrm.com/api-reference/conversations/conversations-user-subscription-change
Process subscription change initiated by a user (admin/agent). Supports individual custom subscription changes and resub all functionality. Legal forms are automatically created for user-initiated res
Process subscription change initiated by a user (admin/agent). Supports individual custom subscription changes and resub all functionality. Legal forms are automatically created for user-initiated resubscribe actions on custom subscriptions.
```http theme={null}
POST https://services.leadconnectorhq.com/conversations/preferences/unsubscriptions/user-change
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id
Contact Id
Email address
Subscription action details
Legal reason for the change (required only for resubscribe and resub\_all actions)
Legal description/details
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/conversations/preferences/unsubscriptions/user-change' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "ve9EPM428h8vShlRW1KT",
"contactId": "OP7z4LCyPACyH5fcEIZa",
"email": "user@example.com",
"legal_reason": "User requested resubscribe via customer service",
"legal_description": "Customer called support on 2024-01-15 requesting to be removed from newsletter"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/conversations/preferences/unsubscriptions/user-change', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "ve9EPM428h8vShlRW1KT", "contactId": "OP7z4LCyPACyH5fcEIZa", "email": "user@example.com", "legal_reason": "User requested resubscribe via customer service", "legal_description": "Customer called support on 2024-01-15 requesting to be removed from newsletter"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/conversations/preferences/unsubscriptions/user-change',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "ve9EPM428h8vShlRW1KT", "contactId": "OP7z4LCyPACyH5fcEIZa", "email": "user@example.com", "legal_reason": "User requested resubscribe via customer service", "legal_description": "Customer called support on 2024-01-15 requesting to be removed from newsletter"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 've9EPM428h8vShlRW1KT', 'contactId': 'OP7z4LCyPACyH5fcEIZa', 'email': 'user@example.com', 'legal_reason': 'User requested resubscribe via customer service', 'legal_description': 'Customer called support on 2024-01-15 requesting to be removed from newsletter'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Import Courses
Source: https://developers.leadwaycrm.com/api-reference/courses/courses-import-courses
Import Courses through public channels
Import Courses through public channels
```http theme={null}
POST https://services.leadconnectorhq.com/courses/courses-exporter/public/import
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Posibles valores: 'published', 'draft'
Posibles valores: 'published', 'draft'
Posibles valores: 'video', 'assignment', 'quiz'
Posibles valores: 'pdf', 'image', 'docx', 'pptx', 'xlsx', 'html', 'dotx', 'epub', 'webp', 'gdoc', 'mp3', 'doc', 'txt', 'zip', 'ppt', 'key', 'htm', 'xls', 'odp', 'odt', 'rtf', 'm4a', 'ods', 'mp4', 'ai', 'avi', 'mov', 'wmv', 'mkv', 'wav', 'flac', 'ogg', 'png', 'jpeg', 'jpg', 'gif', 'bmp', 'tiff', 'svg', 'odg', 'sxw', 'sxc', 'sxi', 'rar', '7z', 'json', 'xml', 'csv', 'md', 'obj', 'stl', 'woff', 'ttf'
Posibles valores: 'published', 'draft'
Posibles valores: 'published', 'draft'
Posibles valores: 'video', 'assignment', 'quiz'
## Respuestas
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/courses/courses-exporter/public/import' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "string",
"userId": "string",
"products": [
{
"title": "string",
"description": "string",
"imageUrl": "string",
"categories": [
{}
],
"instructorDetails": {
"name": "string",
"description": "string"
}
}
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/courses/courses-exporter/public/import', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "string", "userId": "string", "products": [{"title": "string", "description": "string", "imageUrl": "string", "categories": [{}], "instructorDetails": {"name": "string", "description": "string"}}]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/courses/courses-exporter/public/import',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "string", "userId": "string", "products": [{"title": "string", "description": "string", "imageUrl": "string", "categories": [{}], "instructorDetails": {"name": "string", "description": "string"}}]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'string', 'userId': 'string', 'products': [{'title': 'string', 'description': 'string', 'imageUrl': 'string', 'categories': [{}], 'instructorDetails': {'name': 'string', 'description': 'string'}}]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Custom Field
Source: https://developers.leadwaycrm.com/api-reference/custom-fields/custom-fields-create-custom-field
Create Custom Field
!
\
\
\
Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
\
\
\
\
```http theme={null}
POST https://services.leadconnectorhq.com/custom-fields/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id
Field name
Description of the field
Placeholder text for the field
Whether the field should be shown in forms
Options for the field (Optional, valid only for SINGLE\_OPTIONS, MULTIPLE\_OPTIONS, RADIO, CHECKBOX, TEXTBOX\_LIST type)
Key of the option (Included in Create and Response, excluded in Update)
Value of the option
URL associated with the option (Optional, valid only for RADIO type)
Allowed file formats for uploads. Options include: .pdf, .docx, .doc, .jpg, .jpeg, .png, .gif, .csv, .xlsx, .xls, all Posibles valores: '.pdf', '.docx', '.doc', '.jpg', '.jpeg', '.png', '.gif', '.csv', '.xlsx', '.xls', 'all'
Type of field that you are trying to create Posibles valores: 'TEXT', 'LARGE\_TEXT', 'NUMERICAL', 'PHONE', 'MONETORY', 'CHECKBOX', 'SINGLE\_OPTIONS', 'MULTIPLE\_OPTIONS', 'DATE', 'TEXTBOX\_LIST', 'FILE\_UPLOAD', 'RADIO', 'EMAIL'
Field key. For Custom Object it's formatted as "custom\_object.\{objectKey}.\{fieldKey}". "custom\_object" is a fixed prefix, "\{objectKey}" is your custom object's identifier, and "\{fieldKey}" is the unique field name within that object. Example: "custom\_object.pet.name" for a "name" field in a "pet" custom object.
The key for your custom object. This key uniquely identifies the custom object. Example: "custom\_object.pet" for a custom object related to pets.
Maximum file limit for uploads. Applicable only for fields with a data type of FILE\_UPLOAD.
Determines if users can add a custom option value different from the predefined options in records for RADIO type fields. A custom value added in one record does not automatically become an option and will not appear as an option for other records.
ID of the parent folder
## Respuestas
Account Id
Field name
Description of the field
Placeholder text for the field
Whether the field should be shown in forms
Options for the field (Optional, valid only for SINGLE\_OPTIONS, MULTIPLE\_OPTIONS, RADIO, CHECKBOX, TEXTBOX\_LIST type)
Key of the option (Included in Create and Response, excluded in Update)
Value of the option
URL associated with the option (Optional, valid only for RADIO type)
Allowed file formats for uploads. Options include: .pdf, .docx, .doc, .jpg, .jpeg, .png, .gif, .csv, .xlsx, .xls, all Posibles valores: '.pdf', '.docx', '.doc', '.jpg', '.jpeg', '.png', '.gif', '.csv', '.xlsx', '.xls', 'all'
Unique identifier of the object
The key for your custom / standard object. This key uniquely identifies the custom object. Example: "custom\_object.pet" for a custom object related to pets.
Type of field that you are trying to create Posibles valores: 'TEXT', 'LARGE\_TEXT', 'NUMERICAL', 'PHONE', 'MONETORY', 'CHECKBOX', 'SINGLE\_OPTIONS', 'MULTIPLE\_OPTIONS', 'DATE', 'TEXTBOX\_LIST', 'FILE\_UPLOAD', 'RADIO'
ID of the parent folder
Field key. For Custom Object it's formatted as "custom\_object.\{objectKey}.\{fieldKey}". "custom\_object" is a fixed prefix, "\{objectKey}" is your custom object's identifier, and "\{fieldName}" is the unique field name within that object. Example: "custom\_object.pet.name" for a "name" field in a "pet" custom object.
Determines if users can add a custom option value different from the predefined options in records for RADIO type fields. A custom value added in one record does not automatically become an option and will not appear as an option for other records.
Maximum file limit for uploads
Date and time when the object was added
Date and time when the object was last updated
```json theme={null}
{
"field": {
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "Name",
"description": "string",
"placeholder": "string",
"showInForms": true,
"options": [
{
"key": "string",
"label": "string",
"url": "string"
}
],
"acceptedFormats": ".pdf",
"id": "string",
"objectKey": "custom_object.pet",
"dataType": "TEXT",
"parentId": "3v34PM428h8vShlRW1KT",
"fieldKey": "custom_object.pet.name",
"allowCustomOption": true,
"maxFileLimit": 2,
"dateAdded": "2024-01-15T10:30:00Z",
"dateUpdated": "2024-01-15T10:30:00Z"
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/custom-fields/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "Name",
"description": "string",
"placeholder": "string",
"showInForms": true,
"options": [
{
"key": "string",
"label": "string",
"url": "string"
}
],
"acceptedFormats": ".pdf",
"dataType": "TEXT",
"fieldKey": "custom_object.pet.name",
"objectKey": "custom_object.pet",
"maxFileLimit": 2,
"allowCustomOption": true,
"parentId": "string"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/custom-fields/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "ve9EPM428h8vShlRW1KT", "name": "Name", "description": "string", "placeholder": "string", "showInForms": true, "options": [{"key": "string", "label": "string", "url": "string"}], "acceptedFormats": ".pdf", "dataType": "TEXT", "fieldKey": "custom_object.pet.name", "objectKey": "custom_object.pet", "maxFileLimit": 2, "allowCustomOption": true, "parentId": "string"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/custom-fields/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "ve9EPM428h8vShlRW1KT", "name": "Name", "description": "string", "placeholder": "string", "showInForms": true, "options": [{"key": "string", "label": "string", "url": "string"}], "acceptedFormats": ".pdf", "dataType": "TEXT", "fieldKey": "custom_object.pet.name", "objectKey": "custom_object.pet", "maxFileLimit": 2, "allowCustomOption": true, "parentId": "string"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 've9EPM428h8vShlRW1KT', 'name': 'Name', 'description': 'string', 'placeholder': 'string', 'showInForms': true, 'options': [{'key': 'string', 'label': 'string', 'url': 'string'}], 'acceptedFormats': '.pdf', 'dataType': 'TEXT', 'fieldKey': 'custom_object.pet.name', 'objectKey': 'custom_object.pet', 'maxFileLimit': 2, 'allowCustomOption': true, 'parentId': 'string'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Custom Field Folder
Source: https://developers.leadwaycrm.com/api-reference/custom-fields/custom-fields-create-custom-field-folder
Create Custom Field Folder
!
\
\
\
Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
\
\
\
\
```http theme={null}
POST https://services.leadconnectorhq.com/custom-fields/folder
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
The key for your custom object. This key uniquely identifies the custom object. Example: "custom\_object.pet" for a custom object related to pets.
Field name
Account Id
## Respuestas
Unique identifier of the object
The key for your custom object. This key uniquely identifies the custom object. Example: "custom\_object.pet" for a custom object related to pets.
Account Id
Field name
```json theme={null}
{
"id": "string",
"objectKey": "custom_object.pet",
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "Name"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/custom-fields/folder' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"objectKey": "custom_object.pet",
"name": "Name",
"locationId": "ve9EPM428h8vShlRW1KT"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/custom-fields/folder', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"objectKey": "custom_object.pet", "name": "Name", "locationId": "ve9EPM428h8vShlRW1KT"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/custom-fields/folder',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"objectKey": "custom_object.pet", "name": "Name", "locationId": "ve9EPM428h8vShlRW1KT"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'objectKey': 'custom_object.pet', 'name': 'Name', 'locationId': 've9EPM428h8vShlRW1KT'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Custom Field By Id
Source: https://developers.leadwaycrm.com/api-reference/custom-fields/custom-fields-delete-custom-field
Delete Custom Field By Id
!
\
\
\
Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
\
\
\
!
\
\
\
Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
\
\
\
\
```http theme={null}
GET https://services.leadconnectorhq.com/custom-fields/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Respuestas
Account Id
Field name
Description of the field
Placeholder text for the field
Whether the field should be shown in forms
Options for the field (Optional, valid only for SINGLE\_OPTIONS, MULTIPLE\_OPTIONS, RADIO, CHECKBOX, TEXTBOX\_LIST type)
Key of the option (Included in Create and Response, excluded in Update)
Value of the option
URL associated with the option (Optional, valid only for RADIO type)
Allowed file formats for uploads. Options include: .pdf, .docx, .doc, .jpg, .jpeg, .png, .gif, .csv, .xlsx, .xls, all Posibles valores: '.pdf', '.docx', '.doc', '.jpg', '.jpeg', '.png', '.gif', '.csv', '.xlsx', '.xls', 'all'
Unique identifier of the object
The key for your custom / standard object. This key uniquely identifies the custom object. Example: "custom\_object.pet" for a custom object related to pets.
Type of field that you are trying to create Posibles valores: 'TEXT', 'LARGE\_TEXT', 'NUMERICAL', 'PHONE', 'MONETORY', 'CHECKBOX', 'SINGLE\_OPTIONS', 'MULTIPLE\_OPTIONS', 'DATE', 'TEXTBOX\_LIST', 'FILE\_UPLOAD', 'RADIO'
ID of the parent folder
Field key. For Custom Object it's formatted as "custom\_object.\{objectKey}.\{fieldKey}". "custom\_object" is a fixed prefix, "\{objectKey}" is your custom object's identifier, and "\{fieldName}" is the unique field name within that object. Example: "custom\_object.pet.name" for a "name" field in a "pet" custom object.
Determines if users can add a custom option value different from the predefined options in records for RADIO type fields. A custom value added in one record does not automatically become an option and will not appear as an option for other records.
Maximum file limit for uploads
Date and time when the object was added
Date and time when the object was last updated
```json theme={null}
{
"field": {
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "Name",
"description": "string",
"placeholder": "string",
"showInForms": true,
"options": [
{
"key": "string",
"label": "string",
"url": "string"
}
],
"acceptedFormats": ".pdf",
"id": "string",
"objectKey": "custom_object.pet",
"dataType": "TEXT",
"parentId": "3v34PM428h8vShlRW1KT",
"fieldKey": "custom_object.pet.name",
"allowCustomOption": true,
"maxFileLimit": 2,
"dateAdded": "2024-01-15T10:30:00Z",
"dateUpdated": "2024-01-15T10:30:00Z"
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/custom-fields/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/custom-fields/YOUR_id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/custom-fields/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Custom Fields By Object Key
Source: https://developers.leadwaycrm.com/api-reference/custom-fields/custom-fields-get-custom-fields-by-object-key
Get Custom Fields By Object Key
!
\
\
\
Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
\
\
\
\
```http theme={null}
GET https://services.leadconnectorhq.com/custom-fields/object-key/{objectKey}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
key of the Object. Must include "custom\_objects." prefix for custom objects. Available on the Custom Objects details Page under settings
## Query parameters
## Respuestas
Custom Fields for the object.
Account Id
Field name
Description of the field
Placeholder text for the field
Whether the field should be shown in forms
Options for the field (Optional, valid only for SINGLE\_OPTIONS, MULTIPLE\_OPTIONS, RADIO, CHECKBOX, TEXTBOX\_LIST type)
Key of the option (Included in Create and Response, excluded in Update)
Value of the option
URL associated with the option (Optional, valid only for RADIO type)
Allowed file formats for uploads. Options include: .pdf, .docx, .doc, .jpg, .jpeg, .png, .gif, .csv, .xlsx, .xls, all Posibles valores: '.pdf', '.docx', '.doc', '.jpg', '.jpeg', '.png', '.gif', '.csv', '.xlsx', '.xls', 'all'
Unique identifier of the object
The key for your custom / standard object. This key uniquely identifies the custom object. Example: "custom\_object.pet" for a custom object related to pets.
Type of field that you are trying to create Posibles valores: 'TEXT', 'LARGE\_TEXT', 'NUMERICAL', 'PHONE', 'MONETORY', 'CHECKBOX', 'SINGLE\_OPTIONS', 'MULTIPLE\_OPTIONS', 'DATE', 'TEXTBOX\_LIST', 'FILE\_UPLOAD', 'RADIO'
ID of the parent folder
Field key. For Custom Object it's formatted as "custom\_object.\{objectKey}.\{fieldKey}". "custom\_object" is a fixed prefix, "\{objectKey}" is your custom object's identifier, and "\{fieldName}" is the unique field name within that object. Example: "custom\_object.pet.name" for a "name" field in a "pet" custom object.
Determines if users can add a custom option value different from the predefined options in records for RADIO type fields. A custom value added in one record does not automatically become an option and will not appear as an option for other records.
Maximum file limit for uploads
Date and time when the object was added
Date and time when the object was last updated
Custom Fields folder for the object.
Account Id
Field name
Description of the field
Placeholder text for the field
Whether the field should be shown in forms
Options for the field (Optional, valid only for SINGLE\_OPTIONS, MULTIPLE\_OPTIONS, RADIO, CHECKBOX, TEXTBOX\_LIST type)
Key of the option (Included in Create and Response, excluded in Update)
Value of the option
URL associated with the option (Optional, valid only for RADIO type)
Allowed file formats for uploads. Options include: .pdf, .docx, .doc, .jpg, .jpeg, .png, .gif, .csv, .xlsx, .xls, all Posibles valores: '.pdf', '.docx', '.doc', '.jpg', '.jpeg', '.png', '.gif', '.csv', '.xlsx', '.xls', 'all'
Unique identifier of the object
The key for your custom / standard object. This key uniquely identifies the custom object. Example: "custom\_object.pet" for a custom object related to pets.
Type of field that you are trying to create Posibles valores: 'TEXT', 'LARGE\_TEXT', 'NUMERICAL', 'PHONE', 'MONETORY', 'CHECKBOX', 'SINGLE\_OPTIONS', 'MULTIPLE\_OPTIONS', 'DATE', 'TEXTBOX\_LIST', 'FILE\_UPLOAD', 'RADIO'
ID of the parent folder
Field key. For Custom Object it's formatted as "custom\_object.\{objectKey}.\{fieldKey}". "custom\_object" is a fixed prefix, "\{objectKey}" is your custom object's identifier, and "\{fieldName}" is the unique field name within that object. Example: "custom\_object.pet.name" for a "name" field in a "pet" custom object.
Determines if users can add a custom option value different from the predefined options in records for RADIO type fields. A custom value added in one record does not automatically become an option and will not appear as an option for other records.
Maximum file limit for uploads
Date and time when the object was added
Date and time when the object was last updated
```json theme={null}
{
"fields": [
{
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "Name",
"description": "string",
"placeholder": "string",
"showInForms": true,
"options": [
{}
],
"acceptedFormats": ".pdf",
"id": "string",
"objectKey": "custom_object.pet",
"dataType": "TEXT",
"parentId": "3v34PM428h8vShlRW1KT",
"fieldKey": "custom_object.pet.name",
"allowCustomOption": true,
"maxFileLimit": 2,
"dateAdded": "2024-01-15T10:30:00Z",
"dateUpdated": "2024-01-15T10:30:00Z"
}
],
"folders": [
{
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "Name",
"description": "string",
"placeholder": "string",
"showInForms": true,
"options": [
{}
],
"acceptedFormats": ".pdf",
"id": "string",
"objectKey": "custom_object.pet",
"dataType": "TEXT",
"parentId": "3v34PM428h8vShlRW1KT",
"fieldKey": "custom_object.pet.name",
// truncado: 7 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/custom-fields/object-key/YOUR_objectKey' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/custom-fields/object-key/YOUR_objectKey', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/custom-fields/object-key/YOUR_objectKey',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Custom Field By Id
Source: https://developers.leadwaycrm.com/api-reference/custom-fields/custom-fields-update-custom-field
Update Custom Field By Id
!
\
\
\
Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
\
\
\
\
```http theme={null}
PUT https://services.leadconnectorhq.com/custom-fields/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Account Id
Field name
Description of the field
Placeholder text for the field
Whether the field should be shown in forms
Options for the field. Important: Providing options will completely replace the existing options array. You must include all existing options alongside any new options you wish to add. Removal of options is not supported through this update. Applicable only for SINGLE\_OPTIONS, MULTIPLE\_OPTIONS, RADIO, CHECKBOX, TEXTBOX\_LIST types.
Key of the option (Included in Create and Response, excluded in Update)
Value of the option
URL associated with the option (Optional, valid only for RADIO type)
Allowed file formats for uploads. Options include: .pdf, .docx, .doc, .jpg, .jpeg, .png, .gif, .csv, .xlsx, .xls, all Posibles valores: '.pdf', '.docx', '.doc', '.jpg', '.jpeg', '.png', '.gif', '.csv', '.xlsx', '.xls', 'all'
Maximum file limit for uploads. Applicable only for fields with a data type of FILE\_UPLOAD.
## Respuestas
Account Id
Field name
Description of the field
Placeholder text for the field
Whether the field should be shown in forms
Options for the field (Optional, valid only for SINGLE\_OPTIONS, MULTIPLE\_OPTIONS, RADIO, CHECKBOX, TEXTBOX\_LIST type)
Key of the option (Included in Create and Response, excluded in Update)
Value of the option
URL associated with the option (Optional, valid only for RADIO type)
Allowed file formats for uploads. Options include: .pdf, .docx, .doc, .jpg, .jpeg, .png, .gif, .csv, .xlsx, .xls, all Posibles valores: '.pdf', '.docx', '.doc', '.jpg', '.jpeg', '.png', '.gif', '.csv', '.xlsx', '.xls', 'all'
Unique identifier of the object
The key for your custom / standard object. This key uniquely identifies the custom object. Example: "custom\_object.pet" for a custom object related to pets.
Type of field that you are trying to create Posibles valores: 'TEXT', 'LARGE\_TEXT', 'NUMERICAL', 'PHONE', 'MONETORY', 'CHECKBOX', 'SINGLE\_OPTIONS', 'MULTIPLE\_OPTIONS', 'DATE', 'TEXTBOX\_LIST', 'FILE\_UPLOAD', 'RADIO'
ID of the parent folder
Field key. For Custom Object it's formatted as "custom\_object.\{objectKey}.\{fieldKey}". "custom\_object" is a fixed prefix, "\{objectKey}" is your custom object's identifier, and "\{fieldName}" is the unique field name within that object. Example: "custom\_object.pet.name" for a "name" field in a "pet" custom object.
Determines if users can add a custom option value different from the predefined options in records for RADIO type fields. A custom value added in one record does not automatically become an option and will not appear as an option for other records.
Maximum file limit for uploads
Date and time when the object was added
Date and time when the object was last updated
```json theme={null}
{
"field": {
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "Name",
"description": "string",
"placeholder": "string",
"showInForms": true,
"options": [
{
"key": "string",
"label": "string",
"url": "string"
}
],
"acceptedFormats": ".pdf",
"id": "string",
"objectKey": "custom_object.pet",
"dataType": "TEXT",
"parentId": "3v34PM428h8vShlRW1KT",
"fieldKey": "custom_object.pet.name",
"allowCustomOption": true,
"maxFileLimit": 2,
"dateAdded": "2024-01-15T10:30:00Z",
"dateUpdated": "2024-01-15T10:30:00Z"
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/custom-fields/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "Name",
"description": "string",
"placeholder": "string",
"showInForms": true,
"options": [
{
"key": "string",
"label": "string",
"url": "string"
}
],
"acceptedFormats": ".pdf",
"maxFileLimit": 2
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/custom-fields/YOUR_id', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "ve9EPM428h8vShlRW1KT", "name": "Name", "description": "string", "placeholder": "string", "showInForms": true, "options": [{"key": "string", "label": "string", "url": "string"}], "acceptedFormats": ".pdf", "maxFileLimit": 2}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/custom-fields/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "ve9EPM428h8vShlRW1KT", "name": "Name", "description": "string", "placeholder": "string", "showInForms": true, "options": [{"key": "string", "label": "string", "url": "string"}], "acceptedFormats": ".pdf", "maxFileLimit": 2},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 've9EPM428h8vShlRW1KT', 'name': 'Name', 'description': 'string', 'placeholder': 'string', 'showInForms': true, 'options': [{'key': 'string', 'label': 'string', 'url': 'string'}], 'acceptedFormats': '.pdf', 'maxFileLimit': 2}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Custom Field Folder Name
Source: https://developers.leadwaycrm.com/api-reference/custom-fields/custom-fields-update-custom-field-folder
Create Custom Field Folder
!
\
\
\
Only supports Custom Objects and Company (Business) today. Will be extended to other Standard Objects in the future.
\
\
\
\
```http theme={null}
PUT https://services.leadconnectorhq.com/custom-fields/folder/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Field name
Account Id
## Respuestas
Unique identifier of the object
The key for your custom object. This key uniquely identifies the custom object. Example: "custom\_object.pet" for a custom object related to pets.
Account Id
Field name
```json theme={null}
{
"id": "string",
"objectKey": "custom_object.pet",
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "Name"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/custom-fields/folder/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "Name",
"locationId": "ve9EPM428h8vShlRW1KT"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/custom-fields/folder/YOUR_id', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "Name", "locationId": "ve9EPM428h8vShlRW1KT"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/custom-fields/folder/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "Name", "locationId": "ve9EPM428h8vShlRW1KT"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'Name', 'locationId': 've9EPM428h8vShlRW1KT'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Custom Menu Link
Source: https://developers.leadwaycrm.com/api-reference/custom-menus/custom-menus-create-custom-menu
Creates a new custom menu for a company. Requires authentication and proper permissions. For Icon Usage Details please refer to https://doc.clickup.com/8631005/d/h/87cpx-243696/d60fa70db6b92b2
Creates a new custom menu for a company. Requires authentication and proper permissions. For Icon Usage Details please refer to [https://doc.clickup.com/8631005/d/h/87cpx-243696/d60fa70db6b92b2](https://doc.clickup.com/8631005/d/h/87cpx-243696/d60fa70db6b92b2)
```http theme={null}
POST https://services.leadconnectorhq.com/custom-menus/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Title of the custom menu
URL of the custom menu
Icon information for the custom menu
Whether the menu must be displayed on the agency's level
Whether the menu must be displayed for accounts level
Whether the menu must be displayed to all accounts
Mode for opening the menu link Posibles valores: 'iframe', 'new\_tab', 'current\_tab'
List of account IDs where the menu should be shown. This list is applicable only when showOnLocation is true and showToAllLocations is false
Which user-roles should the menu be accessible to? Posibles valores: 'all', 'admin', 'user'
Whether to allow camera access (only for iframe mode)
Whether to allow microphone access (only for iframe mode)
## Respuestas
Single Custom menu link object
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/custom-menus/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"title": "Custom Menu",
"url": "https://custom-menus.com/",
"showOnCompany": true,
"showOnLocation": true,
"showToAllLocations": true,
"openMode": "iframe",
"locations": [
"gfWreTIHL8pDbggBb7af",
"67WreTIHL8pDbggBb7ty"
],
"userRole": "all",
"allowCamera": false,
"allowMicrophone": false
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/custom-menus/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"title": "Custom Menu", "url": "https://custom-menus.com/", "showOnCompany": true, "showOnLocation": true, "showToAllLocations": true, "openMode": "iframe", "locations": ["gfWreTIHL8pDbggBb7af", "67WreTIHL8pDbggBb7ty"], "userRole": "all", "allowCamera": false, "allowMicrophone": false}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/custom-menus/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"title": "Custom Menu", "url": "https://custom-menus.com/", "showOnCompany": true, "showOnLocation": true, "showToAllLocations": true, "openMode": "iframe", "locations": ["gfWreTIHL8pDbggBb7af", "67WreTIHL8pDbggBb7ty"], "userRole": "all", "allowCamera": false, "allowMicrophone": false},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'title': 'Custom Menu', 'url': 'https://custom-menus.com/', 'showOnCompany': true, 'showOnLocation': true, 'showToAllLocations': true, 'openMode': 'iframe', 'locations': ['gfWreTIHL8pDbggBb7af', '67WreTIHL8pDbggBb7ty'], 'userRole': 'all', 'allowCamera': false, 'allowMicrophone': false}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Custom Menu Link
Source: https://developers.leadwaycrm.com/api-reference/custom-menus/custom-menus-delete-custom-menu
Removes a specific custom menu from the system. This operation requires authentication and proper permissions. The custom menu is identified by its unique ID, and the operation is performed within the
Removes a specific custom menu from the system. This operation requires authentication and proper permissions. The custom menu is identified by its unique ID, and the operation is performed within the context of a specific company.
```http theme={null}
DELETE https://services.leadconnectorhq.com/custom-menus/{customMenuId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the custom menu to delete
## Respuestas
Indicates whether the custom menu was successfully deleted
A message providing additional information about the deletion operation
The ID of the deleted custom menu
Timestamp of when the deletion was performed
```json theme={null}
{
"success": true,
"message": "Custom menu successfully deleted",
"deletedMenuId": "12345abcde",
"deletedAt": "2023-09-12T15:30:45.123Z"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/custom-menus/YOUR_customMenuId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/custom-menus/YOUR_customMenuId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/custom-menus/YOUR_customMenuId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Custom Menu Link
Source: https://developers.leadwaycrm.com/api-reference/custom-menus/custom-menus-get-custom-menu-by-id
Fetches a single custom menus based on id. This endpoint allows clients to retrieve custom menu configurations, which may include menu items, categories, and associated metadata
Fetches a single custom menus based on id. This endpoint allows clients to retrieve custom menu configurations, which may include menu items, categories, and associated metadata
```http theme={null}
GET https://services.leadconnectorhq.com/custom-menus/{customMenuId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Unique identifier of the custom menu
## Respuestas
Single Custom menu link object
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/custom-menus/YOUR_customMenuId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/custom-menus/YOUR_customMenuId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/custom-menus/YOUR_customMenuId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Custom Menu Links
Source: https://developers.leadwaycrm.com/api-reference/custom-menus/custom-menus-get-custom-menus
Fetches a collection of custom menus based on specified criteria. This endpoint allows clients to retrieve custom menu configurations, which may include menu items, categories, and associated metadata
Fetches a collection of custom menus based on specified criteria. This endpoint allows clients to retrieve custom menu configurations, which may include menu items, categories, and associated metadata. The response can be tailored using query parameters for filtering, sorting, and pagination.
```http theme={null}
GET https://services.leadconnectorhq.com/custom-menus/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Unique identifier of the account
Number of items to skip for pagination
Maximum number of items to return
Search query to filter custom menus by name, supports partial || full names
Filter to show only agency-level menu links. When omitted, fetches both agency and account menu links. Ignored if locationId is provided
## Respuestas
Array of custom menu links
Unique identifier for the custom menu
Icon information for the menu item
Title of the custom menu
URL of the custom menu
Order of the custom menu
Filter to show only agency-level menu links. When omitted, fetches both agency and account menu links. Ignored if locationId is provided
Whether the menu must be displayed for accounts level
Whether the menu must be displayed to all accounts
List of account IDs where the menu should be shown. This list is applicable only when showOnLocation is true and showToAllLocations is false
Mode for opening the menu link Posibles valores: 'iframe', 'new\_tab', 'current\_tab'
Which user-roles should the menu be accessible to? Posibles valores: 'all', 'admin', 'user'
Indicates if camera access is allowed for this menu
Indicates if microphone access is allowed for this menu
Total number of custom menu records
```json theme={null}
{
"customMenus": [
{
"id": "12345",
"title": "Dashboard",
"url": "/dashboard",
"order": 1,
"showOnCompany": true,
"showOnLocation": true,
"showToAllLocations": true,
"locations": [
"gfWreTIHL8pDbggBb7af",
"67WreTIHL8pDbggBb7ty"
],
"openMode": "iframe",
"userRole": "all",
"allowCamera": false,
"allowMicrophone": false
}
],
"totalLinks": 100
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/custom-menus/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/custom-menus/', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/custom-menus/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Custom Menu Link
Source: https://developers.leadwaycrm.com/api-reference/custom-menus/custom-menus-update-custom-menu
Updates an existing custom menu for a given company. Requires authentication and proper permissions.
Updates an existing custom menu for a given company. Requires authentication and proper permissions.
```http theme={null}
PUT https://services.leadconnectorhq.com/custom-menus/{customMenuId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the custom menu to update
## Body
Title of the custom menu
URL of the custom menu
Icon information for the custom menu
Whether the menu must be displayed on the agency's level
Whether the menu must be displayed for accounts level
Whether the menu must be displayed to all accounts
Mode for opening the menu link Posibles valores: 'iframe', 'new\_tab', 'current\_tab'
List of account IDs where the menu should be shown. This list is applicable only when showOnLocation is true and showToAllLocations is false
Which user-roles should the menu be accessible to? Posibles valores: 'all', 'admin', 'user'
Whether to allow camera access (only for iframe mode)
Whether to allow microphone access (only for iframe mode)
## Respuestas
Status of update
Updated custom menu link
```json theme={null}
{
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/custom-menus/YOUR_customMenuId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"title": "Custom Menu",
"url": "https://custom-menus.com/",
"showOnCompany": true,
"showOnLocation": true,
"showToAllLocations": true,
"openMode": "iframe",
"locations": [
"gfWreTIHL8pDbggBb7af",
"67WreTIHL8pDbggBb7ty"
],
"userRole": "all",
"allowCamera": false,
"allowMicrophone": false
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/custom-menus/YOUR_customMenuId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"title": "Custom Menu", "url": "https://custom-menus.com/", "showOnCompany": true, "showOnLocation": true, "showToAllLocations": true, "openMode": "iframe", "locations": ["gfWreTIHL8pDbggBb7af", "67WreTIHL8pDbggBb7ty"], "userRole": "all", "allowCamera": false, "allowMicrophone": false}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/custom-menus/YOUR_customMenuId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"title": "Custom Menu", "url": "https://custom-menus.com/", "showOnCompany": true, "showOnLocation": true, "showToAllLocations": true, "openMode": "iframe", "locations": ["gfWreTIHL8pDbggBb7af", "67WreTIHL8pDbggBb7ty"], "userRole": "all", "allowCamera": false, "allowMicrophone": false},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'title': 'Custom Menu', 'url': 'https://custom-menus.com/', 'showOnCompany': true, 'showOnLocation': true, 'showToAllLocations': true, 'openMode': 'iframe', 'locations': ['gfWreTIHL8pDbggBb7af', '67WreTIHL8pDbggBb7ty'], 'userRole': 'all', 'allowCamera': false, 'allowMicrophone': false}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Forms
Source: https://developers.leadwaycrm.com/api-reference/email-forms/email-forms-get-forms
Get Forms
Get Forms
```http theme={null}
GET https://services.leadconnectorhq.com/forms/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Limit Per Page records count. will allow maximum up to 50 and default will be 10
## Respuestas
Total number of forms
```json theme={null}
{
"forms": [
{
"id": "YSWdvS4Is98wtIDGnpmI",
"name": "Form 1",
"locationId": "ve9EPM428h8vShlRW1KT"
}
],
"total": "20"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/forms/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/forms/', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/forms/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Forms Submissions
Source: https://developers.leadwaycrm.com/api-reference/email-forms/email-forms-get-forms-submissions
Get Forms Submissions
Get Forms Submissions
```http theme={null}
GET https://services.leadconnectorhq.com/forms/submissions
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Page No. By default it will be 1
Limit Per Page records count. will allow maximum up to 100 and default will be 20
Filter submission by form id
Filter by contactId, name, email or phone no.
Get submission by starting of this date. By default it will be same date of last month(YYYY-MM-DD).
Get submission by ending of this date. By default it will be current date(YYYY-MM-DD).
## Respuestas
```json theme={null}
{
"submissions": [
{
"id": "38303ec7-629a-49e2-888a-cf8bf0b1f97e",
"contactId": "DWQ45t2IPVxi9LDu1wBl",
"createdAt": "2021-06-23T06:07:04.000Z",
"formId": "YSWdvS4Is98wtIDGnpmI",
"name": "test",
"email": "test@test.com",
"others": {
"__submissions_other_field__": "john@deo.com",
"__custom_field_id__": "20",
"eventData": {},
"fieldsOriSequance": [
"full_name",
"first_name",
"last_name",
"phone",
"email"
]
}
}
],
"meta": {
"total": 1,
"currentPage": 1
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/forms/submissions' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/forms/submissions', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/forms/submissions',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Upload files to custom fields
Source: https://developers.leadwaycrm.com/api-reference/email-forms/email-forms-upload-to-custom-fields
Post the necessary fields for the API to upload files. The files need to be a buffer with the key "< custom_field_id >_< file_id >". Here custom field id is the ID of your custom field and file
Post the necessary fields for the API to upload files. The files need to be a buffer with the key "\< custom\_field\_id >\_\< file\_id >". \ Here custom field id is the ID of your custom field and file id is a randomly generated id (or uuid) \ There is support for multiple file uploads as well. Have multiple fields in the format mentioned.\ File size is limited to 50 MB.\ \ The allowed file types are: \ \
\
PDF\
\
DOCX\
\
DOC\
\
JPG\
\
JPEG\
\
PNG\
\
GIF\
\
CSV\
\
XLSX\
\
XLS\
\
MP4\
\
MPEG\
\
ZIP\
\
RAR\
\
TXT\
\
SVG\
\
\ \ The API will return the updated contact object.
```http theme={null}
POST https://services.leadconnectorhq.com/forms/upload-custom-files
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Contact ID to upload the file to.
Account ID of the contact.
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/forms/upload-custom-files' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/forms/upload-custom-files', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/forms/upload-custom-files',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Redirect
Source: https://developers.leadwaycrm.com/api-reference/funnels/funnels-create-redirect
The "Create Redirect" API Allows adding a new url redirect to the system. Use this endpoint to create a url redirect with the specified details. Ensure that the required information is provided in the
The "Create Redirect" API Allows adding a new url redirect to the system. Use this endpoint to create a url redirect with the specified details. Ensure that the required information is provided in the request payload.
```http theme={null}
POST https://services.leadconnectorhq.com/funnels/lookup/redirect
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Posibles valores: 'funnel', 'website', 'url', 'all'
## Respuestas
Data containing details of the created redirect
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/funnels/lookup/redirect' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "6p2RxpgtMKQwO3E6IUaT",
"domain": "example.com",
"path": "/Hello",
"target": "https://www.google.com",
"action": "URL"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/funnels/lookup/redirect', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "6p2RxpgtMKQwO3E6IUaT", "domain": "example.com", "path": "/Hello", "target": "https://www.google.com", "action": "URL"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/funnels/lookup/redirect',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "6p2RxpgtMKQwO3E6IUaT", "domain": "example.com", "path": "/Hello", "target": "https://www.google.com", "action": "URL"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': '6p2RxpgtMKQwO3E6IUaT', 'domain': 'example.com', 'path': '/Hello', 'target': 'https://www.google.com', 'action': 'URL'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Redirect By Id
Source: https://developers.leadwaycrm.com/api-reference/funnels/funnels-delete-redirect-by-id
The "Delete Redirect By Id" API Allows deletion of a URL redirect from the system using its unique identifier. Use this endpoint to delete a URL redirect with the specified ID using details provided i
The "Delete Redirect By Id" API Allows deletion of a URL redirect from the system using its unique identifier. Use this endpoint to delete a URL redirect with the specified ID using details provided in the request payload.
```http theme={null}
DELETE https://services.leadconnectorhq.com/funnels/lookup/redirect/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Query parameters
## Respuestas
Status of the delete operation
```json theme={null}
{
"data": {
"status": "ok"
}
}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/funnels/lookup/redirect/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/funnels/lookup/redirect/YOUR_id', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/funnels/lookup/redirect/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Fetch List of Redirects
Source: https://developers.leadwaycrm.com/api-reference/funnels/funnels-fetch-redirects-list
Retrieves a list of all URL redirects based on the given query parameters.
Retrieves a list of all URL redirects based on the given query parameters.
```http theme={null}
GET https://services.leadconnectorhq.com/funnels/lookup/redirect/list
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
## Respuestas
Object containing the count of redirects and an array of redirect data
```json theme={null}
{
"data": {
"count": 42,
"data": []
}
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/funnels/lookup/redirect/list' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/funnels/lookup/redirect/list', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/funnels/lookup/redirect/list',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Fetch List of Funnels
Source: https://developers.leadwaycrm.com/api-reference/funnels/funnels-getfunnels
Retrieves a list of all funnels based on the given query parameters.
Retrieves a list of all funnels based on the given query parameters.
```http theme={null}
GET https://services.leadconnectorhq.com/funnels/funnel/list
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
## Respuestas
```json theme={null}
{
"funnels": {
"_id": "SkIDfu0S4m3NYQyvWHC6",
"dateAdded": "2024-04-29T15:00:05.681Z",
"dateUpdated": "2024-04-29T15:00:28.465Z",
"deleted": false,
"domainId": "",
"locationId": "ojQjykmwNIU88vfsfzvH",
"name": "Chaitanya Copy",
"orderFormVersion": 2,
"originId": "hAmyh7jrJH5FfEEKAJ9z",
"steps": [
{
"id": "f5d178c0-8bbb-4cd4-927c-691c68a62c59",
"name": "Step 1",
"originId": "80b2f227-5bc8-4ca5-980d-817745ea4e8b",
"pages": [
"2IhBmBcQRx9JXV1JZsRt"
],
"products": [],
"sequence": 1,
"type": "optin_funnel_page",
"url": "/newtestifypath"
}
],
"type": "funnel",
"updatedAt": "2024-04-29T15:00:34.233Z",
"faviconUrl": "",
"globalSectionVersion": 1,
"globalSectionsPath": "funnel/SkIDfu0S4m3NYQyvWHC6/global-sections-1",
"globalSectionsUrl": "https://firebasestorage.googleapis.com/v0/b/leadway-staging.appspot.com/o/funnel%2FSkIDfu0S4m3NYQyvWHC6%2Fglobal-sections-1?alt=media&token=9cc5c211-093b-4751-aeba-19282ac92955",
"isStoreActive": false,
"trackingCodeBody": "",
"trackingCodeHead": "",
"url": "/chaitanya"
},
"count": 24,
"traceId": "03774d31-a57e-4b4f-95c7-315ce61969f1"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/funnels/funnel/list' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/funnels/funnel/list', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/funnels/funnel/list',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Fetch list of funnel pages
Source: https://developers.leadwaycrm.com/api-reference/funnels/funnels-getpagesbyfunnelid
Retrieves a list of all funnel pages based on the given query parameters.
Retrieves a list of all funnel pages based on the given query parameters.
```http theme={null}
GET https://services.leadconnectorhq.com/funnels/page
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
## Respuestas
```json theme={null}
{
"_id": "0yJbP3q7t7pLmeTWRAE2",
"locationId": "ojQjykmwNIU88vfsfzvH",
"funnelId": "iucJ6TdFZiddhq9f6znh",
"name": "Home",
"stepId": "343bf634-3aa6-4ade-b963-2d3cd0bf2ede",
"deleted": false,
"updatedAt": "2024-04-18T12:25:23.029Z"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/funnels/page' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/funnels/page', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/funnels/page',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Fetch count of funnel pages
Source: https://developers.leadwaycrm.com/api-reference/funnels/funnels-getpagescountbyfunnelid
Retrieves count of all funnel pages based on the given query parameters.
Retrieves count of all funnel pages based on the given query parameters.
```http theme={null}
GET https://services.leadconnectorhq.com/funnels/page/count
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
## Respuestas
```json theme={null}
{
"count": 20
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/funnels/page/count' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/funnels/page/count', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/funnels/page/count',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Redirect By Id
Source: https://developers.leadwaycrm.com/api-reference/funnels/funnels-update-redirect-by-id
The "Update Redirect By Id" API Allows updating an existing URL redirect in the system. Use this endpoint to modify a URL redirect with the specified ID using details provided in the request payload.
The "Update Redirect By Id" API Allows updating an existing URL redirect in the system. Use this endpoint to modify a URL redirect with the specified ID using details provided in the request payload.
```http theme={null}
PATCH https://services.leadconnectorhq.com/funnels/lookup/redirect/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
Posibles valores: 'funnel', 'website', 'url', 'all'
## Respuestas
Data containing details of the updated redirect
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PATCH 'https://services.leadconnectorhq.com/funnels/lookup/redirect/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"target": "https://www.google.com",
"action": "URL",
"locationId": "6p2RxpgtMKQwO3E6IUaT"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/funnels/lookup/redirect/YOUR_id', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"target": "https://www.google.com", "action": "URL", "locationId": "6p2RxpgtMKQwO3E6IUaT"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/funnels/lookup/redirect/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"target": "https://www.google.com", "action": "URL", "locationId": "6p2RxpgtMKQwO3E6IUaT"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'target': 'https://www.google.com', 'action': 'URL', 'locationId': '6p2RxpgtMKQwO3E6IUaT'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Manage Auto payment for an schedule invoice
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-auto-payment-invoice-schedule
API to manage auto payment for a schedule
API to manage auto payment for a schedule
```http theme={null}
POST https://services.leadconnectorhq.com/invoices/schedule/{scheduleId}/auto-payment
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Schedule Id
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
auto-payment configuration
## Respuestas
Schedule Id
Schedule Status
Live Mode
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Posibles valores: 'yearly', 'monthly', 'weekly', 'daily', 'hourly', 'minutely', 'secondly'
Start date in YYYY-MM-DD format
Start time in HH:mm:ss format
End date in YYYY-MM-DD format
End time in HH:mm:ss format
-1, 1, 2, 3, ..., 27, 28
Posibles valores: 'mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'
-1, 1, 2, 3, 4
Posibles valores: 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'
Max number of task executions
Execute task number of days before
Start as primary user accepted date
End type like after, by, count
List of invoices
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
Business Details
Currency
Contact Details
Discount
Invoice Items
Total Amount
Title
Terms notes
Compiled terms notes
created at
updated at
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"schedule": {
"executeAt": "string",
"rrule": {
"intervalType": "monthly",
"interval": 2,
"startDate": "2023-01-01",
"startTime": "20:45:00",
"endDate": "2029-11-01",
"endTime": "18:45:00",
"dayOfMonth": 15,
"dayOfWeek": "mo",
"numOfWeek": -1,
"monthOfYear": "jan",
"count": 10,
"daysBefore": 5,
"useStartAsPrimaryUserAccepted": true,
"endType": "by"
}
},
"invoices": [
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"name": "Alex",
"address": {
"addressLine1": "9931 Beechwood",
// truncado: 94 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId/auto-payment' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"id": "string"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId/auto-payment', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "id": "string"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId/auto-payment',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "id": "string"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'id': 'string'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Cancel an scheduled invoice
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-cancel-invoice-schedule
API to cancel a scheduled invoice by schedule id
API to cancel a scheduled invoice by schedule id
```http theme={null}
POST https://services.leadconnectorhq.com/invoices/schedule/{scheduleId}/cancel
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Schedule Id
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
## Respuestas
Schedule Id
Schedule Status
Live Mode
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Posibles valores: 'yearly', 'monthly', 'weekly', 'daily', 'hourly', 'minutely', 'secondly'
Start date in YYYY-MM-DD format
Start time in HH:mm:ss format
End date in YYYY-MM-DD format
End time in HH:mm:ss format
-1, 1, 2, 3, ..., 27, 28
Posibles valores: 'mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'
-1, 1, 2, 3, 4
Posibles valores: 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'
Max number of task executions
Execute task number of days before
Start as primary user accepted date
End type like after, by, count
List of invoices
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
Business Details
Currency
Contact Details
Discount
Invoice Items
Total Amount
Title
Terms notes
Compiled terms notes
created at
updated at
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"schedule": {
"executeAt": "string",
"rrule": {
"intervalType": "monthly",
"interval": 2,
"startDate": "2023-01-01",
"startTime": "20:45:00",
"endDate": "2029-11-01",
"endTime": "18:45:00",
"dayOfMonth": 15,
"dayOfWeek": "mo",
"numOfWeek": -1,
"monthOfYear": "jan",
"count": 10,
"daysBefore": 5,
"useStartAsPrimaryUserAccepted": true,
"endType": "by"
}
},
"invoices": [
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"name": "Alex",
"address": {
"addressLine1": "9931 Beechwood",
// truncado: 94 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId/cancel' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId/cancel', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId/cancel',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Estimate Template
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-create-estimate-template
Create a new estimate template
Create a new estimate template
```http theme={null}
POST https://services.leadconnectorhq.com/invoices/estimate/template
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id or Agency Id
Posibles valores: 'account'
Estimate Name
Business Logo URL
Business Name
Business Phone Number
Business Address
Business Website Link
Custom Values
Currency code
An array of items for the estimate.
livemode for estimate
Discount Value
Discount type Posibles valores: 'percentage', 'fixed'
Product Ids on which discount is applicable
Terms notes, Also supports HTML markups
Title for the estimate
Automatic taxes enabled for the Estimate
Meta data for the estimate
When sending estimate directly while saving
Prefix for the estimate number
attachments for the invoice
Id of the file selected
Name of the file
URL of the file
Type of the file
Size of the file
miscellaneous charges for the estimate
## Respuestas
Account Id or Agency Id
Posibles valores: 'account'
Unique identifier
Indicates if it is in live mode
Indicates if deleted
Name
Currency code
Business details associated with the estimate
An array of items
Discount details for the estimate template
Title
Estimate number prefix
Attachments
Id of the file selected
Name of the file
URL of the file
Type of the file
Size of the file
User Id of who last updated
Total amount
Timestamp when created
Timestamp when last updated
Version number
Indicates if automatic taxes are enabled for this estimate
Terms and conditions for the estimate, supports HTML markup
```json theme={null}
{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"_id": "67ac9a51106ee8311e911XXXX",
"liveMode": true,
"deleted": false,
"name": "Estimate Name",
"currency": "USD",
"businessDetails": {
"logoUrl": "your_image-url",
"name": "Business name",
"address": {
"addressLine1": "address line 1",
"city": "Test City",
"state": "State Name",
"countryCode": "US",
"postalCode": "12345"
},
"phoneNo": "+1 1234567890",
"website": "www.example.com",
"customValues": [
{
"name": "Test",
"fieldKey": "{{custom_values.test}}",
"id": "5DYTWoiQvWiIJZXX44XXX",
"value": "Test's Custom Value"
}
]
},
"items": [
{
"taxes": [],
"taxInclusive": false,
"_id": "67ac9a51106ee8311e911XXXX",
"description": "
', 'title': 'ESTIMATE', 'automaticTaxesEnabled': true, 'meta': {'key': 'value'}, 'estimateNumberPrefix': 'EST-', 'attachments': [{'id': '6241712be68f7a98102ba272', 'name': 'Electronics.pdf', 'url': 'https://example.com/digital-delivery', 'type': 'string', 'size': 10000}]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Invoice
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-create-invoice
API to create an invoice
API to create an invoice
```http theme={null}
POST https://services.leadconnectorhq.com/invoices/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
Invoice Name
Business Logo URL
Business Name
Business Phone Number
Business Address
Business Website Link
Custom Values
Currency code
An array of items for the invoice.
Invoice Item Name
Invoice descriptions
Product Id
Price Id
Currency
Product amount
Product Quantity
Tax
Posibles valores: 'exclusive'
Tax category id for calculating automatic tax
Setupfee item, only created when 1st invoice of recurring schedule is generated
Price type of the item Posibles valores: 'one\_time', 'recurring'
true if item amount is tax inclusive
Discount Value
Discount type Posibles valores: 'percentage', 'fixed'
Product Ids on which discount is applicable
Terms notes, Also supports HTML markups
Title for the invoice
Contact information to send the invoice to
Invoice Number
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Email Address
cc to be kept in any sent out emails
bcc to be kept in any sent out emails
Contact Phone Number
Automatic taxes enabled for the Invoice
split invoice into payment schedule summing up to full invoice amount
late fees configuration
tips configuration for the invoice
prefix for invoice number
Payment Methods for Invoices
attachments for the invoice
Id of the file selected
Name of the file
URL of the file
Type of the file
Size of the file
miscellaneous charges for the invoice
## Respuestas
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"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"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"discount": {
"type": "percentage",
"value": 0
},
"invoiceItems": [
// truncado: 20 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/invoices/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"logoUrl": "https://example.com/logo.png",
"name": "ABC Corp.",
"phoneNo": "+1-214-559-6993",
"address": "9931 Beechwood, TX",
"website": "wwww.example.com",
"customValues": [
"string"
]
},
"currency": "USD",
"items": [
{
"name": "ABC Product",
"description": "ABC Corp.",
"productId": "6578278e879ad2646715ba9c",
"priceId": "6578278e879ad2646715ba9c",
"currency": "USD",
"amount": 999,
"qty": 1,
"taxes": [
{}
],
"automaticTaxCategoryId": "6578278e879ad2646715ba9c",
"isSetupFeeItem": true,
"type": "one_time",
"taxInclusive": true
}
],
"discount": {
"value": 10,
"type": "percentage",
"validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
},
"termsNotes": "
', 'title': 'ESTIMATE', 'estimateNumber': 1001, 'issueDate': '2024-08-07', 'expiryDate': '2024-08-10', 'automaticTaxesEnabled': true, 'meta': {'key': 'value'}, 'estimateNumberPrefix': 'EST-', 'userId': '6578278e879ad2646715ba9c', 'attachments': [{'id': '6241712be68f7a98102ba272', 'name': 'Electronics.pdf', 'url': 'https://example.com/digital-delivery', 'type': 'string', 'size': 10000}], 'autoInvoice': {'enabled': true, 'directPayments': true}}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Estimate
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-delete-estimate
Delete an existing estimate
Delete an existing estimate
```http theme={null}
DELETE https://services.leadconnectorhq.com/invoices/estimate/{estimateId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Estimate Id
## Body
Account Id or Agency Id
Posibles valores: 'account'
## Respuestas
Account Id or Agency Id
Posibles valores: 'account'
Unique identifier
Indicates if it is in live mode
Indicates if deleted
Name
Currency code
Business details associated with the estimate
An array of items
Discount details for the estimate template
Title
Estimate number prefix
Attachments
Id of the file selected
Name of the file
URL of the file
Type of the file
Size of the file
User Id of who last updated
Total amount
Timestamp when created
Timestamp when last updated
Version number
Indicates if automatic taxes are enabled for this estimate
Terms and conditions for the estimate, supports HTML markup
Company identifier associated with the estimate
Contact details for the estimate
Date when the estimate was issued
Date when the estimate expires
User who sent the estimate
Indicates if automatic taxes were calculated
Additional metadata associated with the estimate
History of actions taken on the estimate
Recipient details for the estimate
Frequency settings for recurring estimates
Timestamp when the estimate was last visited
Total amount in USD
Auto-invoice settings for the estimate
Trace ID for logging and debugging
```json theme={null}
{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"_id": "67ac9a51106ee8311e911XXXX",
"liveMode": true,
"deleted": false,
"name": "Estimate Name",
"currency": "USD",
"businessDetails": {
"logoUrl": "your_image-url",
"name": "Business name",
"address": {
"addressLine1": "address line 1",
"city": "Test City",
"state": "State Name",
"countryCode": "US",
"postalCode": "12345"
},
"phoneNo": "+1 1234567890",
"website": "www.example.com",
"customValues": [
{
"name": "Test",
"fieldKey": "{{custom_values.test}}",
"id": "5DYTWoiQvWiIJZXX44XXX",
"value": "Test's Custom Value"
}
]
},
"items": [
{
"taxes": [],
"taxInclusive": false,
"_id": "67ac9a51106ee8311e911XXXX",
"description": "
Futuristic anti-gravity racing
",
"currency": "USD",
"productId": "67ac9a51106ee8311e911XXXX",
"priceId": "67ac9a51106ee8311e911XXXX",
"amount": 9.99,
// truncado: 86 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/invoices/estimate/YOUR_estimateId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/estimate/YOUR_estimateId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/invoices/estimate/YOUR_estimateId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Estimate Template
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-delete-estimate-template
Delete an existing estimate template
Delete an existing estimate template
```http theme={null}
DELETE https://services.leadconnectorhq.com/invoices/estimate/template/{templateId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Template Id
## Body
Account Id or Agency Id
Posibles valores: 'account'
## Respuestas
Account Id or Agency Id
Posibles valores: 'account'
Unique identifier
Indicates if it is in live mode
Indicates if deleted
Name
Currency code
Business details associated with the estimate
An array of items
Discount details for the estimate template
Title
Estimate number prefix
Attachments
Id of the file selected
Name of the file
URL of the file
Type of the file
Size of the file
User Id of who last updated
Total amount
Timestamp when created
Timestamp when last updated
Version number
Indicates if automatic taxes are enabled for this estimate
Terms and conditions for the estimate, supports HTML markup
```json theme={null}
{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"_id": "67ac9a51106ee8311e911XXXX",
"liveMode": true,
"deleted": false,
"name": "Estimate Name",
"currency": "USD",
"businessDetails": {
"logoUrl": "your_image-url",
"name": "Business name",
"address": {
"addressLine1": "address line 1",
"city": "Test City",
"state": "State Name",
"countryCode": "US",
"postalCode": "12345"
},
"phoneNo": "+1 1234567890",
"website": "www.example.com",
"customValues": [
{
"name": "Test",
"fieldKey": "{{custom_values.test}}",
"id": "5DYTWoiQvWiIJZXX44XXX",
"value": "Test's Custom Value"
}
]
},
"items": [
{
"taxes": [],
"taxInclusive": false,
"_id": "67ac9a51106ee8311e911XXXX",
"description": "
Futuristic anti-gravity racing
",
"currency": "USD",
"productId": "67ac9a51106ee8311e911XXXX",
"priceId": "67ac9a51106ee8311e911XXXX",
"amount": 9.99,
// truncado: 48 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/invoices/estimate/template/YOUR_templateId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/estimate/template/YOUR_templateId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/invoices/estimate/template/YOUR_templateId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete invoice
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-delete-invoice
API to delete invoice by invoice id
API to delete invoice by invoice id
```http theme={null}
DELETE https://services.leadconnectorhq.com/invoices/{invoiceId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Invoice Id
## Query parameters
account Id / company Id based on altType
Alt Type
## Respuestas
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"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"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"discount": {
"type": "percentage",
"value": 0
},
"invoiceItems": [
// truncado: 20 lineas mas
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Unable to find an invoice with the given invoice id"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/YOUR_invoiceId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete schedule
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-delete-invoice-schedule
API to delete an schedule by schedule id
API to delete an schedule by schedule id
```http theme={null}
DELETE https://services.leadconnectorhq.com/invoices/schedule/{scheduleId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Schedule Id
## Query parameters
account Id / company Id based on altType
Alt Type
## Respuestas
success
```json theme={null}
{
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete template
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-delete-invoice-template
API to update an template by template id
API to update an template by template id
```http theme={null}
DELETE https://services.leadconnectorhq.com/invoices/template/{templateId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Template Id
## Query parameters
account Id / company Id based on altType
Alt Type
## Respuestas
success
```json theme={null}
{
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/invoices/template/YOUR_templateId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/template/YOUR_templateId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/invoices/template/YOUR_templateId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Generate Estimate Number
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-generate-estimate-number
Get the next estimate number for the given account
Get the next estimate number for the given account
```http theme={null}
GET https://services.leadconnectorhq.com/invoices/estimate/number/generate
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id or Agency Id
## Respuestas
```json theme={null}
{
"estimateNumber": 0,
"traceId": "string"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/invoices/estimate/number/generate' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/estimate/number/generate', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/invoices/estimate/number/generate',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Generate Invoice Number
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-generate-invoice-number
Get the next invoice number for the given account
Get the next invoice number for the given account
```http theme={null}
GET https://services.leadconnectorhq.com/invoices/generate-invoice-number
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
## Respuestas
Invoice Number
```json theme={null}
{
"invoiceNumber": "19"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/invoices/generate-invoice-number' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/generate-invoice-number', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/invoices/generate-invoice-number',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get invoice
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-get-invoice
API to get invoice by invoice id
API to get invoice by invoice id
```http theme={null}
GET https://services.leadconnectorhq.com/invoices/{invoiceId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Invoice Id
## Query parameters
account Id / company Id based on altType
Alt Type
## Respuestas
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
subTotal
discount
tax
Reminders Configuration
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"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"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"discount": {
"type": "percentage",
"value": 0
},
"invoiceItems": [
// truncado: 25 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/YOUR_invoiceId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get an schedule
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-get-invoice-schedule
API to get an schedule by schedule id
API to get an schedule by schedule id
```http theme={null}
GET https://services.leadconnectorhq.com/invoices/schedule/{scheduleId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Schedule Id
## Query parameters
account Id / company Id based on altType
Alt Type
## Respuestas
Schedule Id
Schedule Status
Live Mode
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Posibles valores: 'yearly', 'monthly', 'weekly', 'daily', 'hourly', 'minutely', 'secondly'
Start date in YYYY-MM-DD format
Start time in HH:mm:ss format
End date in YYYY-MM-DD format
End time in HH:mm:ss format
-1, 1, 2, 3, ..., 27, 28
Posibles valores: 'mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'
-1, 1, 2, 3, 4
Posibles valores: 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'
Max number of task executions
Execute task number of days before
Start as primary user accepted date
End type like after, by, count
List of invoices
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
Business Details
Currency
Contact Details
Discount
Invoice Items
Total Amount
Title
Terms notes
Compiled terms notes
created at
updated at
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"schedule": {
"executeAt": "string",
"rrule": {
"intervalType": "monthly",
"interval": 2,
"startDate": "2023-01-01",
"startTime": "20:45:00",
"endDate": "2029-11-01",
"endTime": "18:45:00",
"dayOfMonth": 15,
"dayOfWeek": "mo",
"numOfWeek": -1,
"monthOfYear": "jan",
"count": 10,
"daysBefore": 5,
"useStartAsPrimaryUserAccepted": true,
"endType": "by"
}
},
"invoices": [
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"name": "Alex",
"address": {
"addressLine1": "9931 Beechwood",
// truncado: 94 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Invoice Settings
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-get-invoice-settings
Get the invoice settings for the given account
Get the invoice settings for the given account
```http theme={null}
GET https://services.leadconnectorhq.com/invoices/settings
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id or Agency Id
## Respuestas
Account Id
Alt Type Posibles valores: 'account'
Terms and conditions for invoices
Terms and conditions for estimates
Title for invoices
Title for estimates
Prefix for invoice numbers
Prefix for estimate numbers
Number of days after which invoice is due
Number of days after which estimate expires
Minimum percentage for partial payment
Custom fields array
Custom notification settings
Business details
Sender configuration
Product settings
Reminder settings
Late fees configuration
Tips configuration
Payment methods configuration
```json theme={null}
{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"termsNote": "Payment is due within 30 days.",
"estimatesTermsNote": "This estimate is valid for 30 days.",
"title": "INVOICE",
"estimatesTitle": "ESTIMATE",
"invoiceNumberPrefix": "INV-",
"estimateNumberPrefix": "EST-",
"dueAfterXDays": 30,
"estimatesExpireAfterXDays": 30,
"minimumPercentagePartialPayment": 25,
"customFields": [
"6578278e879ad2646715baxc",
"6901e9fb77ac4d701ba0b996"
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/invoices/settings' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/settings', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/invoices/settings',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get an template
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-get-invoice-template
API to get an template by template id
API to get an template by template id
```http theme={null}
GET https://services.leadconnectorhq.com/invoices/template/{templateId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Template Id
## Query parameters
account Id / company Id based on altType
Alt Type
## Respuestas
Template Id
Account Id or Agency Id
Posibles valores: 'account'
Name of the Template
Business Details
Currency
Discount
Invoice Items
prefix for invoice number
Total Amount
created at
updated at
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Template",
"businessDetails": {
"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"
},
"currency": "USD",
"discount": {
"type": "percentage",
"value": 0
},
"items": [
{
"taxes": [],
"_id": "c6tZZU0rJBf30ZXx9Gli",
"productId": "c6tZZU0rJBf30ZXx9Gli",
"priceId": "c6tZZU0rJBf30ZXx9Gli",
"currency": "USD",
"name": "Macbook Pro",
"qty": 1,
"amount": 999
}
],
"invoiceNumberPrefix": "INV-",
"total": 999,
"createdAt": "2023-12-12T09:27:42.355Z",
"updatedAt": "2023-12-12T09:27:42.355Z"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/invoices/template/YOUR_templateId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/template/YOUR_templateId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/invoices/template/YOUR_templateId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Estimate Templates
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-list-estimate-templates
Get a list of estimate templates or a specific template by ID
Get a list of estimate templates or a specific template by ID
```http theme={null}
GET https://services.leadconnectorhq.com/invoices/estimate/template
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id or Agency Id
To search for an estimate template by id / name
Limit the number of items to return
Number of items to skip
## Respuestas
List of estimate templates
Total number of estimate templates available
Unique identifier for tracing the request
```json theme={null}
{
"data": [
"string"
],
"totalCount": 0,
"traceId": "string"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/invoices/estimate/template' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/estimate/template', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/invoices/estimate/template',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Estimates
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-list-estimates
Get a paginated list of estimates
Get a paginated list of estimates
```http theme={null}
GET https://services.leadconnectorhq.com/invoices/estimate/list
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id or Agency Id
startAt in YYYY-MM-DD format
endAt in YYYY-MM-DD format
search text for estimates name
estimate status
Contact ID for the estimate
Limit the number of items to return
Number of items to skip
## Respuestas
List of estimates
Total number of estimates
Unique identifier for tracing the request
```json theme={null}
{
"estimates": [
"string"
],
"total": 0,
"traceId": "string"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/invoices/estimate/list' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/estimate/list', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/invoices/estimate/list',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List schedules
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-list-invoice-schedules
API to get list of schedules
API to get list of schedules
```http theme={null}
GET https://services.leadconnectorhq.com/invoices/schedule
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
account Id / company Id based on altType
Alt Type
status to be filtered
startAt in YYYY-MM-DD format
endAt in YYYY-MM-DD format
To search for an invoice by id / name / email / phoneNo
payment mode
Limit the number of items to return
Number of items to skip
## Respuestas
Schedule Id
Schedule Status
Live Mode
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Posibles valores: 'yearly', 'monthly', 'weekly', 'daily', 'hourly', 'minutely', 'secondly'
Start date in YYYY-MM-DD format
Start time in HH:mm:ss format
End date in YYYY-MM-DD format
End time in HH:mm:ss format
-1, 1, 2, 3, ..., 27, 28
Posibles valores: 'mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'
-1, 1, 2, 3, 4
Posibles valores: 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'
Max number of task executions
Execute task number of days before
Start as primary user accepted date
End type like after, by, count
List of invoices
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
Business Details
Currency
Contact Details
Discount
Invoice Items
Total Amount
Title
Terms notes
Compiled terms notes
created at
updated at
Total number of Schedules
```json theme={null}
{
"schedules": [
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"schedule": {
"executeAt": "string",
"rrule": {}
},
"invoices": [
{}
],
"businessDetails": {
"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"
},
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
// truncado: 26 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/invoices/schedule' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/schedule', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/invoices/schedule',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List templates
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-list-invoice-templates
API to get list of templates
API to get list of templates
```http theme={null}
GET https://services.leadconnectorhq.com/invoices/template
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
account Id / company Id based on altType
Alt Type
status to be filtered
startAt in YYYY-MM-DD format
endAt in YYYY-MM-DD format
To search for an invoice by id / name / email / phoneNo
payment mode
Limit the number of items to return
Number of items to skip
## Respuestas
Template Id
Account Id or Agency Id
Posibles valores: 'account'
Name of the Template
Business Details
Currency
Discount
Invoice Items
prefix for invoice number
Total Amount
created at
updated at
Total number of Templates
```json theme={null}
{
"data": [
{
"_id": "6578278e879ad2646715ba9c",
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Template",
"businessDetails": {
"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"
},
"currency": "USD",
"discount": {
"type": "percentage",
"value": 0
},
"items": [
{
"taxes": [],
"_id": "c6tZZU0rJBf30ZXx9Gli",
"productId": "c6tZZU0rJBf30ZXx9Gli",
"priceId": "c6tZZU0rJBf30ZXx9Gli",
"currency": "USD",
"name": "Macbook Pro",
"qty": 1,
"amount": 999
}
],
"invoiceNumberPrefix": "INV-",
"total": 999,
"createdAt": "2023-12-12T09:27:42.355Z",
// truncado: 5 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/invoices/template' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/template', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/invoices/template',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List invoices
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-list-invoices
API to get list of invoices
API to get list of invoices
```http theme={null}
GET https://services.leadconnectorhq.com/invoices/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
account Id / company Id based on altType
Alt Type
status to be filtered
startAt in YYYY-MM-DD format
endAt in YYYY-MM-DD format
To search for an invoice by id / name / email / phoneNo
payment mode
Contact ID for the invoice
Limit the number of items to return
Number of items to skip
The field on which sorting should be applied
The order of sort which should be applied for the sortField
## Respuestas
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
subTotal
discount
tax
Reminders Configuration
Total number of invoices
```json theme={null}
{
"invoices": [
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"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"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"discount": {
"type": "percentage",
"value": 0
// truncado: 30 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/invoices/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/invoices/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Preview Estimate Template
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-preview-estimate-template
Get a preview of an estimate template
Get a preview of an estimate template
```http theme={null}
GET https://services.leadconnectorhq.com/invoices/estimate/template/preview
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id or Agency Id
Template Id
## Respuestas
Account Id or Agency Id
Posibles valores: 'account'
Unique identifier
Indicates if it is in live mode
Indicates if deleted
Name
Currency code
Business details associated with the estimate
An array of items
Discount details for the estimate template
Title
Estimate number prefix
Attachments
Id of the file selected
Name of the file
URL of the file
Type of the file
Size of the file
User Id of who last updated
Total amount
Timestamp when created
Timestamp when last updated
Version number
Indicates if automatic taxes are enabled for this estimate
Terms and conditions for the estimate, supports HTML markup
```json theme={null}
{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"_id": "67ac9a51106ee8311e911XXXX",
"liveMode": true,
"deleted": false,
"name": "Estimate Name",
"currency": "USD",
"businessDetails": {
"logoUrl": "your_image-url",
"name": "Business name",
"address": {
"addressLine1": "address line 1",
"city": "Test City",
"state": "State Name",
"countryCode": "US",
"postalCode": "12345"
},
"phoneNo": "+1 1234567890",
"website": "www.example.com",
"customValues": [
{
"name": "Test",
"fieldKey": "{{custom_values.test}}",
"id": "5DYTWoiQvWiIJZXX44XXX",
"value": "Test's Custom Value"
}
]
},
"items": [
{
"taxes": [],
"taxInclusive": false,
"_id": "67ac9a51106ee8311e911XXXX",
"description": "
Futuristic anti-gravity racing
",
"currency": "USD",
"productId": "67ac9a51106ee8311e911XXXX",
"priceId": "67ac9a51106ee8311e911XXXX",
"amount": 9.99,
// truncado: 48 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/invoices/estimate/template/preview' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/estimate/template/preview', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/invoices/estimate/template/preview',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Record a manual payment for an invoice
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-record-invoice
API to record manual payment for an invoice by invoice id
API to record manual payment for an invoice by invoice id
```http theme={null}
POST https://services.leadconnectorhq.com/invoices/{invoiceId}/record-payment
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Invoice Id
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
manual payment method Posibles valores: 'cash', 'card', 'cheque', 'bank\_transfer', 'other'
check number
Any note to be recorded with the transaction
Amount to be paid against the invoice.
Payment Schedule Ids to be recorded against the invoice.
Updated At to be recorded against the invoice.
## Respuestas
status
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
```json theme={null}
{
"success": true,
"invoice": {
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"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"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"discount": {
"type": "percentage",
"value": 0
// truncado: 23 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/record-payment' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"mode": "card",
"card": {
"brand": "string",
"last4": "string"
},
"cheque": {
"number": "129-129-129-912"
},
"notes": "This was a direct payment",
"amount": 999,
"meta": {},
"paymentScheduleIds": [
"6578278e879ad2646715ba9c"
],
"fulfilledAt": "2025-03-19T05:03:00.000Z"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/record-payment', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "mode": "card", "card": {"brand": "string", "last4": "string"}, "cheque": {"number": "129-129-129-912"}, "notes": "This was a direct payment", "amount": 999, "meta": {}, "paymentScheduleIds": ["6578278e879ad2646715ba9c"], "fulfilledAt": "2025-03-19T05:03:00.000Z"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/record-payment',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "mode": "card", "card": {"brand": "string", "last4": "string"}, "cheque": {"number": "129-129-129-912"}, "notes": "This was a direct payment", "amount": 999, "meta": {}, "paymentScheduleIds": ["6578278e879ad2646715ba9c"], "fulfilledAt": "2025-03-19T05:03:00.000Z"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'mode': 'card', 'card': {'brand': 'string', 'last4': 'string'}, 'cheque': {'number': '129-129-129-912'}, 'notes': 'This was a direct payment', 'amount': 999, 'meta': {}, 'paymentScheduleIds': ['6578278e879ad2646715ba9c'], 'fulfilledAt': '2025-03-19T05:03:00.000Z'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Schedule an schedule invoice
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-schedule-invoice-schedule
API to schedule an schedule invoice to start sending to the customer
API to schedule an schedule invoice to start sending to the customer
```http theme={null}
POST https://services.leadconnectorhq.com/invoices/schedule/{scheduleId}/schedule
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Schedule Id
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
auto-payment configuration
## Respuestas
Schedule Id
Schedule Status
Live Mode
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Posibles valores: 'yearly', 'monthly', 'weekly', 'daily', 'hourly', 'minutely', 'secondly'
Start date in YYYY-MM-DD format
Start time in HH:mm:ss format
End date in YYYY-MM-DD format
End time in HH:mm:ss format
-1, 1, 2, 3, ..., 27, 28
Posibles valores: 'mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'
-1, 1, 2, 3, 4
Posibles valores: 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'
Max number of task executions
Execute task number of days before
Start as primary user accepted date
End type like after, by, count
List of invoices
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
Business Details
Currency
Contact Details
Discount
Invoice Items
Total Amount
Title
Terms notes
Compiled terms notes
created at
updated at
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"schedule": {
"executeAt": "string",
"rrule": {
"intervalType": "monthly",
"interval": 2,
"startDate": "2023-01-01",
"startTime": "20:45:00",
"endDate": "2029-11-01",
"endTime": "18:45:00",
"dayOfMonth": 15,
"dayOfWeek": "mo",
"numOfWeek": -1,
"monthOfYear": "jan",
"count": 10,
"daysBefore": 5,
"useStartAsPrimaryUserAccepted": true,
"endType": "by"
}
},
"invoices": [
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"name": "Alex",
"address": {
"addressLine1": "9931 Beechwood",
// truncado: 94 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId/schedule' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"liveMode": true
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId/schedule', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "liveMode": true}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId/schedule',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "liveMode": true},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'liveMode': true}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Send Estimate
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-send-estimate
API to send estimate by estimate id
API to send estimate by estimate id
```http theme={null}
POST https://services.leadconnectorhq.com/invoices/estimate/{estimateId}/send
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Estimate Id
## Body
Account Id or Agency Id
Posibles valores: 'account'
Posibles valores: 'sms\_and\_email', 'send\_manually', 'email', 'sms'
livemode for estimate
Please ensure that the UserId corresponds to an authorized personnel, either by an employee ID or agency ID, to access this account. This account will serve as the primary channel for all future communications and updates.
sender details for invoice, valid only if invoice is not sent manually
estimate name
## Respuestas
Account Id or Agency Id
Posibles valores: 'account'
Unique identifier
Indicates if it is in live mode
Indicates if deleted
Name
Currency code
Business details associated with the estimate
An array of items
Discount details for the estimate template
Title
Estimate number prefix
Attachments
Id of the file selected
Name of the file
URL of the file
Type of the file
Size of the file
User Id of who last updated
Total amount
Timestamp when created
Timestamp when last updated
Version number
Indicates if automatic taxes are enabled for this estimate
Terms and conditions for the estimate, supports HTML markup
Company identifier associated with the estimate
Contact details for the estimate
Date when the estimate was issued
Date when the estimate expires
User who sent the estimate
Indicates if automatic taxes were calculated
Additional metadata associated with the estimate
History of actions taken on the estimate
Recipient details for the estimate
Frequency settings for recurring estimates
Timestamp when the estimate was last visited
Total amount in USD
Auto-invoice settings for the estimate
Trace ID for logging and debugging
```json theme={null}
{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"_id": "67ac9a51106ee8311e911XXXX",
"liveMode": true,
"deleted": false,
"name": "Estimate Name",
"currency": "USD",
"businessDetails": {
"logoUrl": "your_image-url",
"name": "Business name",
"address": {
"addressLine1": "address line 1",
"city": "Test City",
"state": "State Name",
"countryCode": "US",
"postalCode": "12345"
},
"phoneNo": "+1 1234567890",
"website": "www.example.com",
"customValues": [
{
"name": "Test",
"fieldKey": "{{custom_values.test}}",
"id": "5DYTWoiQvWiIJZXX44XXX",
"value": "Test's Custom Value"
}
]
},
"items": [
{
"taxes": [],
"taxInclusive": false,
"_id": "67ac9a51106ee8311e911XXXX",
"description": "
Futuristic anti-gravity racing
",
"currency": "USD",
"productId": "67ac9a51106ee8311e911XXXX",
"priceId": "67ac9a51106ee8311e911XXXX",
"amount": 9.99,
// truncado: 86 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/invoices/estimate/YOUR_estimateId/send' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"action": "sms_and_email",
"liveMode": true,
"userId": "6578278e879ad2646715ba9c",
"estimateName": "Estimate"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/estimate/YOUR_estimateId/send', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "action": "sms_and_email", "liveMode": true, "userId": "6578278e879ad2646715ba9c", "estimateName": "Estimate"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/invoices/estimate/YOUR_estimateId/send',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "action": "sms_and_email", "liveMode": true, "userId": "6578278e879ad2646715ba9c", "estimateName": "Estimate"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'action': 'sms_and_email', 'liveMode': true, 'userId': '6578278e879ad2646715ba9c', 'estimateName': 'Estimate'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Send invoice
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-send-invoice
API to send invoice by invoice id
API to send invoice by invoice id
```http theme={null}
POST https://services.leadconnectorhq.com/invoices/{invoiceId}/send
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Invoice Id
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
Please ensure that the UserId corresponds to an authorized personnel, either by an employee ID or agency ID, to access this account. This account will serve as the primary channel for all future communications and updates.
Posibles valores: 'sms\_and\_email', 'send\_manually', 'email', 'sms'
sender details for invoice, valid only if invoice is not sent manually
auto-payment configuration
## Respuestas
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
```json theme={null}
{
"invoice": {
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"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"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"discount": {
"type": "percentage",
"value": 0
},
// truncado: 24 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/send' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"userId": "6578278e879ad2646715ba9c",
"action": "sms_and_email",
"liveMode": true
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/send', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "userId": "6578278e879ad2646715ba9c", "action": "sms_and_email", "liveMode": true}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/send',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "userId": "6578278e879ad2646715ba9c", "action": "sms_and_email", "liveMode": true},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'userId': '6578278e879ad2646715ba9c', 'action': 'sms_and_email', 'liveMode': true}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create & Send
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-text2pay-invoice
API to create or update a text2pay invoice
API to create or update a text2pay invoice
```http theme={null}
POST https://services.leadconnectorhq.com/invoices/text2pay
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
Invoice Name
Currency code
An array of items for the invoice.
Invoice Item Name
Invoice descriptions
Product Id
Price Id
Currency
Product amount
Product Quantity
Tax
Posibles valores: 'exclusive'
Tax category id for calculating automatic tax
Setupfee item, only created when 1st invoice of recurring schedule is generated
Price type of the item Posibles valores: 'one\_time', 'recurring'
true if item amount is tax inclusive
Terms notes, Also supports HTML markups
Title for the invoice
Contact information to send the invoice to
Invoice Number
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Email Address
cc to be kept in any sent out emails
bcc to be kept in any sent out emails
Contact Phone Number
Automatic taxes enabled for the Invoice
split invoice into payment schedule summing up to full invoice amount
late fees configuration
tips configuration for the invoice
prefix for invoice number
Payment Methods for Invoices
attachments for the invoice
Id of the file selected
Name of the file
URL of the file
Type of the file
Size of the file
miscellaneous charges for the invoice
id of invoice to update. If skipped, a new invoice will be created
include terms & notes with receipts
create invoice in draft mode or send mode Posibles valores: 'draft', 'send'
id of user generating invoice
Discount Value
Discount type Posibles valores: 'percentage', 'fixed'
Product Ids on which discount is applicable
Business Logo URL
Business Name
Business Phone Number
Business Address
Business Website Link
Custom Values
## Respuestas
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
preview url of generated invoice
```json theme={null}
{
"invoice": {
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"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"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"discount": {
"type": "percentage",
"value": 0
},
// truncado: 23 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/invoices/text2pay' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"currency": "USD",
"items": [
{
"name": "ABC Product",
"description": "ABC Corp.",
"productId": "6578278e879ad2646715ba9c",
"priceId": "6578278e879ad2646715ba9c",
"currency": "USD",
"amount": 999,
"qty": 1,
"taxes": [
{}
],
"automaticTaxCategoryId": "6578278e879ad2646715ba9c",
"isSetupFeeItem": true,
"type": "one_time",
"taxInclusive": true
}
],
"termsNotes": "
', 'title': 'INVOICE', 'invoiceNumber': '1001', 'issueDate': '2023-01-01', 'dueDate': '2023-01-14', 'sentTo': {'email': ['alex@example.com'], 'emailCc': ['alex@example.com'], 'emailBcc': ['alex@example.com'], 'phoneNo': ['+1-214-559-6993']}, 'liveMode': true, 'automaticTaxesEnabled': true, 'invoiceNumberPrefix': 'INV-', 'attachments': [{'id': '6241712be68f7a98102ba272', 'name': 'Electronics.pdf', 'url': 'https://example.com/digital-delivery', 'type': 'string', 'size': 10000}], 'id': 'string', 'includeTermsNote': true, 'action': 'draft', 'userId': 'string', 'discount': {'value': 10, 'type': 'percentage', 'validOnProductIds': '[ '6579751d56f60276e5bd4154' ]'}, 'businessDetails': {'logoUrl': 'https://example.com/logo.png', 'name': 'ABC Corp.', 'phoneNo': '+1-214-559-6993', 'address': '9931 Beechwood, TX', 'website': 'wwww.example.com', 'customValues': ['string']}}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update scheduled recurring invoice
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-update-and-schedule-invoice-schedule
API to update scheduled recurring invoice
API to update scheduled recurring invoice
```http theme={null}
POST https://services.leadconnectorhq.com/invoices/schedule/{scheduleId}/updateAndSchedule
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Schedule Id
## Respuestas
Schedule Id
Schedule Status
Live Mode
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Posibles valores: 'yearly', 'monthly', 'weekly', 'daily', 'hourly', 'minutely', 'secondly'
Start date in YYYY-MM-DD format
Start time in HH:mm:ss format
End date in YYYY-MM-DD format
End time in HH:mm:ss format
-1, 1, 2, 3, ..., 27, 28
Posibles valores: 'mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'
-1, 1, 2, 3, 4
Posibles valores: 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'
Max number of task executions
Execute task number of days before
Start as primary user accepted date
End type like after, by, count
List of invoices
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
Business Details
Currency
Contact Details
Discount
Invoice Items
Total Amount
Title
Terms notes
Compiled terms notes
created at
updated at
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"schedule": {
"executeAt": "string",
"rrule": {
"intervalType": "monthly",
"interval": 2,
"startDate": "2023-01-01",
"startTime": "20:45:00",
"endDate": "2029-11-01",
"endTime": "18:45:00",
"dayOfMonth": 15,
"dayOfWeek": "mo",
"numOfWeek": -1,
"monthOfYear": "jan",
"count": 10,
"daysBefore": 5,
"useStartAsPrimaryUserAccepted": true,
"endType": "by"
}
},
"invoices": [
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"name": "Alex",
"address": {
"addressLine1": "9931 Beechwood",
// truncado: 94 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId/updateAndSchedule' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId/updateAndSchedule', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId/updateAndSchedule',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Estimate
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-update-estimate
Update an existing estimate with new details
Update an existing estimate with new details
```http theme={null}
PUT https://services.leadconnectorhq.com/invoices/estimate/{estimateId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Estimate Id
## Body
Account Id or Agency Id
Posibles valores: 'account'
Estimate Name
Business Logo URL
Business Name
Business Phone Number
Business Address
Business Website Link
Custom Values
Currency code
An array of items for the estimate.
Invoice Item Name
Invoice descriptions
Product Id
Price Id
Currency
Product amount
Product Quantity
Tax
Posibles valores: 'exclusive'
Tax category id for calculating automatic tax
Setupfee item, only created when 1st invoice of recurring schedule is generated
Price type of the item Posibles valores: 'one\_time', 'recurring'
true if item amount is tax inclusive
Attachments for the line item
livemode for estimate
Discount Value
Discount type Posibles valores: 'percentage', 'fixed'
Product Ids on which discount is applicable
Terms notes, Also supports HTML markups
Title for the estimate
Contact information to send the estimate to
Estimate Number, if not specified will take in the next valid estimate number
issue date estimate
expiry date estimate
Email and sent to details for the estimate
Automatic taxes enabled for the Estimate
Meta data for the estimate
When sending estimate directly while saving
frequency settings for the estimate
Prefix for the estimate number
User Id
attachments for the invoice
Id of the file selected
Name of the file
URL of the file
Type of the file
Size of the file
Auto invoice for the estimate
miscellaneous charges for the estimate
Payment Schedule Config for the estimate
Estimate Status Posibles valores: 'all', 'draft', 'sent', 'accepted', 'declined', 'invoiced', 'viewed'
## Respuestas
Account Id or Agency Id
Posibles valores: 'account'
Unique identifier
Indicates if it is in live mode
Indicates if deleted
Name
Currency code
Business details associated with the estimate
An array of items
Discount details for the estimate template
Title
Estimate number prefix
Attachments
Id of the file selected
Name of the file
URL of the file
Type of the file
Size of the file
User Id of who last updated
Total amount
Timestamp when created
Timestamp when last updated
Version number
Indicates if automatic taxes are enabled for this estimate
Terms and conditions for the estimate, supports HTML markup
Company identifier associated with the estimate
Contact details for the estimate
Date when the estimate was issued
Date when the estimate expires
User who sent the estimate
Indicates if automatic taxes were calculated
Additional metadata associated with the estimate
History of actions taken on the estimate
Recipient details for the estimate
Frequency settings for recurring estimates
Timestamp when the estimate was last visited
Total amount in USD
Auto-invoice settings for the estimate
Trace ID for logging and debugging
```json theme={null}
{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"_id": "67ac9a51106ee8311e911XXXX",
"liveMode": true,
"deleted": false,
"name": "Estimate Name",
"currency": "USD",
"businessDetails": {
"logoUrl": "your_image-url",
"name": "Business name",
"address": {
"addressLine1": "address line 1",
"city": "Test City",
"state": "State Name",
"countryCode": "US",
"postalCode": "12345"
},
"phoneNo": "+1 1234567890",
"website": "www.example.com",
"customValues": [
{
"name": "Test",
"fieldKey": "{{custom_values.test}}",
"id": "5DYTWoiQvWiIJZXX44XXX",
"value": "Test's Custom Value"
}
]
},
"items": [
{
"taxes": [],
"taxInclusive": false,
"_id": "67ac9a51106ee8311e911XXXX",
"description": "
', 'title': 'ESTIMATE', 'estimateNumber': 1001, 'issueDate': '2024-08-07', 'expiryDate': '2024-08-10', 'automaticTaxesEnabled': true, 'meta': {'key': 'value'}, 'estimateNumberPrefix': 'EST-', 'userId': '6578278e879ad2646715ba9c', 'attachments': [{'id': '6241712be68f7a98102ba272', 'name': 'Electronics.pdf', 'url': 'https://example.com/digital-delivery', 'type': 'string', 'size': 10000}], 'autoInvoice': {'enabled': true, 'directPayments': true}, 'estimateStatus': 'sent'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update estimate last visited at
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-update-estimate-last-visited-at
API to update estimate last visited at by estimate id
API to update estimate last visited at by estimate id
```http theme={null}
PATCH https://services.leadconnectorhq.com/invoices/estimate/stats/last-visited-at
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Estimate Id
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PATCH 'https://services.leadconnectorhq.com/invoices/estimate/stats/last-visited-at' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"estimateId": "5f9d6d8b1b2d2c001f2d9e4b"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/estimate/stats/last-visited-at', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"estimateId": "5f9d6d8b1b2d2c001f2d9e4b"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/invoices/estimate/stats/last-visited-at',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"estimateId": "5f9d6d8b1b2d2c001f2d9e4b"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'estimateId': '5f9d6d8b1b2d2c001f2d9e4b'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Estimate Template
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-update-estimate-template
Update an existing estimate template
Update an existing estimate template
```http theme={null}
PUT https://services.leadconnectorhq.com/invoices/estimate/template/{templateId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Template Id
## Body
Account Id or Agency Id
Posibles valores: 'account'
Estimate Name
Business Logo URL
Business Name
Business Phone Number
Business Address
Business Website Link
Custom Values
Currency code
An array of items for the estimate.
livemode for estimate
Discount Value
Discount type Posibles valores: 'percentage', 'fixed'
Product Ids on which discount is applicable
Terms notes, Also supports HTML markups
Title for the estimate
Automatic taxes enabled for the Estimate
Meta data for the estimate
When sending estimate directly while saving
Prefix for the estimate number
attachments for the invoice
Id of the file selected
Name of the file
URL of the file
Type of the file
Size of the file
miscellaneous charges for the estimate
## Respuestas
Account Id or Agency Id
Posibles valores: 'account'
Unique identifier
Indicates if it is in live mode
Indicates if deleted
Name
Currency code
Business details associated with the estimate
An array of items
Discount details for the estimate template
Title
Estimate number prefix
Attachments
Id of the file selected
Name of the file
URL of the file
Type of the file
Size of the file
User Id of who last updated
Total amount
Timestamp when created
Timestamp when last updated
Version number
Indicates if automatic taxes are enabled for this estimate
Terms and conditions for the estimate, supports HTML markup
```json theme={null}
{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"_id": "67ac9a51106ee8311e911XXXX",
"liveMode": true,
"deleted": false,
"name": "Estimate Name",
"currency": "USD",
"businessDetails": {
"logoUrl": "your_image-url",
"name": "Business name",
"address": {
"addressLine1": "address line 1",
"city": "Test City",
"state": "State Name",
"countryCode": "US",
"postalCode": "12345"
},
"phoneNo": "+1 1234567890",
"website": "www.example.com",
"customValues": [
{
"name": "Test",
"fieldKey": "{{custom_values.test}}",
"id": "5DYTWoiQvWiIJZXX44XXX",
"value": "Test's Custom Value"
}
]
},
"items": [
{
"taxes": [],
"taxInclusive": false,
"_id": "67ac9a51106ee8311e911XXXX",
"description": "
', 'title': 'ESTIMATE', 'automaticTaxesEnabled': true, 'meta': {'key': 'value'}, 'estimateNumberPrefix': 'EST-', 'attachments': [{'id': '6241712be68f7a98102ba272', 'name': 'Electronics.pdf', 'url': 'https://example.com/digital-delivery', 'type': 'string', 'size': 10000}]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update invoice
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-update-invoice
API to update invoice by invoice id
API to update invoice by invoice id
```http theme={null}
PUT https://services.leadconnectorhq.com/invoices/{invoiceId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Invoice Id
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
Name to be updated
Title for the invoice
Currency
Description
Business details which need to be updated
Invoice Number
Id of the contact which you need to send the invoice
Contact ID
Contact Name
Contact Phone Number
Contact Email
Secondary email addresses for the contact to be saved
Contact Company Name
Address Line 1
Address Line 2
City
State
Country Code
Postal Code
Custom Values
Terms notes, Also supports HTML markups
Discount Value
Discount type Posibles valores: 'percentage', 'fixed'
Product Ids on which discount is applicable
Invoice Item Name
Invoice descriptions
Product Id
Price Id
Currency
Product amount
Product Quantity
Tax
Posibles valores: 'exclusive'
Tax category id for calculating automatic tax
Setupfee item, only created when 1st invoice of recurring schedule is generated
Price type of the item Posibles valores: 'one\_time', 'recurring'
true if item amount is tax inclusive
Automatic taxes enabled for the Invoice
Payment mode
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
split invoice into payment schedule summing up to full invoice amount
tips configuration for the invoice
prefix for invoice number
Payment Methods for Invoices
attachments for the invoice
Id of the file selected
Name of the file
URL of the file
Type of the file
Size of the file
miscellaneous charges for the invoice
## Respuestas
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"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"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"discount": {
"type": "percentage",
"value": 0
},
"invoiceItems": [
// truncado: 20 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"title": "INVOICE",
"currency": "USD",
"description": "ABC Corp payments",
"businessDetails": {
"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"
},
"invoiceNumber": "1001",
"contactId": "6578278e879ad2646715ba9c",
"contactDetails": {
"id": "6578278e879ad2646715ba9c",
"name": "Alex",
"phoneNo": "+1234567890",
"email": "alex@example.com",
"additionalEmails": [
{
"email": "alex@example.com"
}
],
"companyName": "ABC Corp.",
"address": {
"addressLine1": "9931 Beechwood",
"addressLine2": "Beechwood",
"city": "St. Houston",
"state": "TX",
"countryCode": "US",
"postalCode": "559-6993"
},
"customFields": [
"string"
]
},
"termsNotes": "
', 'discount': {'value': 10, 'type': 'percentage', 'validOnProductIds': '[ '6579751d56f60276e5bd4154' ]'}, 'invoiceItems': [{'name': 'ABC Product', 'description': 'ABC Corp.', 'productId': '6578278e879ad2646715ba9c', 'priceId': '6578278e879ad2646715ba9c', 'currency': 'USD', 'amount': 999, 'qty': 1, 'taxes': [{}], 'automaticTaxCategoryId': '6578278e879ad2646715ba9c', 'isSetupFeeItem': true, 'type': 'one_time', 'taxInclusive': true}], 'automaticTaxesEnabled': true, 'liveMode': true, 'issueDate': '2023-01-01', 'dueDate': '2023-01-14', 'xeroDetails': {}, 'invoiceNumberPrefix': 'INV-', 'attachments': [{'id': '6241712be68f7a98102ba272', 'name': 'Electronics.pdf', 'url': 'https://example.com/digital-delivery', 'type': 'string', 'size': 10000}]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update invoice last visited at
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-update-invoice-last-visited-at
API to update invoice last visited at by invoice id
API to update invoice last visited at by invoice id
```http theme={null}
PATCH https://services.leadconnectorhq.com/invoices/stats/last-visited-at
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Invoice Id
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PATCH 'https://services.leadconnectorhq.com/invoices/stats/last-visited-at' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"invoiceId": "6578278e879ad2646715ba9c"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/stats/last-visited-at', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"invoiceId": "6578278e879ad2646715ba9c"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/invoices/stats/last-visited-at',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"invoiceId": "6578278e879ad2646715ba9c"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'invoiceId': '6578278e879ad2646715ba9c'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update invoice late fees configuration
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-update-invoice-late-fees-configuration
API to update invoice late fees configuration by invoice id
API to update invoice late fees configuration by invoice id
```http theme={null}
PATCH https://services.leadconnectorhq.com/invoices/{invoiceId}/late-fees-configuration
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Invoice Id
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
late fees configuration
## Respuestas
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"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"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"discount": {
"type": "percentage",
"value": 0
},
"invoiceItems": [
// truncado: 20 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PATCH 'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/late-fees-configuration' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/late-fees-configuration', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/late-fees-configuration',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update template late fees configuration
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-update-invoice-payment-methods-configuration
API to update template late fees configuration by template id
API to update template late fees configuration by template id
```http theme={null}
PATCH https://services.leadconnectorhq.com/invoices/template/{templateId}/payment-methods-configuration
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Template Id
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
Payment Methods for Invoices
## Respuestas
Template Id
Account Id or Agency Id
Posibles valores: 'account'
Name of the Template
Business Details
Currency
Discount
Invoice Items
prefix for invoice number
Total Amount
created at
updated at
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Template",
"businessDetails": {
"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"
},
"currency": "USD",
"discount": {
"type": "percentage",
"value": 0
},
"items": [
{
"taxes": [],
"_id": "c6tZZU0rJBf30ZXx9Gli",
"productId": "c6tZZU0rJBf30ZXx9Gli",
"priceId": "c6tZZU0rJBf30ZXx9Gli",
"currency": "USD",
"name": "Macbook Pro",
"qty": 1,
"amount": 999
}
],
"invoiceNumberPrefix": "INV-",
"total": 999,
"createdAt": "2023-12-12T09:27:42.355Z",
"updatedAt": "2023-12-12T09:27:42.355Z"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PATCH 'https://services.leadconnectorhq.com/invoices/template/YOUR_templateId/payment-methods-configuration' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/template/YOUR_templateId/payment-methods-configuration', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/invoices/template/YOUR_templateId/payment-methods-configuration',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update schedule
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-update-invoice-schedule
API to update an schedule by schedule id
API to update an schedule by schedule id
```http theme={null}
PUT https://services.leadconnectorhq.com/invoices/schedule/{scheduleId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Schedule Id
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
Contact ID
Contact Name
Contact Phone Number
Contact Email
Secondary email addresses for the contact to be saved
Contact Company Name
Address Line 1
Address Line 2
City
State
Country Code
Postal Code
Custom Values
Posibles valores: 'yearly', 'monthly', 'weekly', 'daily', 'hourly', 'minutely', 'secondly'
Start date in YYYY-MM-DD format
Start time in HH:mm:ss format
End date in YYYY-MM-DD format
End time in HH:mm:ss format
-1, 1, 2, 3, ..., 27, 28
Posibles valores: 'mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'
-1, 1, 2, 3, 4
Posibles valores: 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'
Max number of task executions
Execute task number of days before
Start as primary user accepted date
End type like after, by, count
Business Logo URL
Business Name
Business Phone Number
Business Address
Business Website Link
Custom Values
Invoice Item Name
Invoice descriptions
Product Id
Price Id
Currency
Product amount
Product Quantity
Tax
Posibles valores: 'exclusive'
Tax category id for calculating automatic tax
Setupfee item, only created when 1st invoice of recurring schedule is generated
Price type of the item Posibles valores: 'one\_time', 'recurring'
true if item amount is tax inclusive
Discount Value
Discount type Posibles valores: 'percentage', 'fixed'
Product Ids on which discount is applicable
attachments for the invoice
Id of the file selected
Name of the file
URL of the file
Type of the file
Size of the file
miscellaneous charges for the invoice
## Respuestas
Schedule Id
Schedule Status
Live Mode
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Posibles valores: 'yearly', 'monthly', 'weekly', 'daily', 'hourly', 'minutely', 'secondly'
Start date in YYYY-MM-DD format
Start time in HH:mm:ss format
End date in YYYY-MM-DD format
End time in HH:mm:ss format
-1, 1, 2, 3, ..., 27, 28
Posibles valores: 'mo', 'tu', 'we', 'th', 'fr', 'sa', 'su'
-1, 1, 2, 3, 4
Posibles valores: 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'
Max number of task executions
Execute task number of days before
Start as primary user accepted date
End type like after, by, count
List of invoices
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
Business Details
Currency
Contact Details
Discount
Invoice Items
Total Amount
Title
Terms notes
Compiled terms notes
created at
updated at
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"schedule": {
"executeAt": "string",
"rrule": {
"intervalType": "monthly",
"interval": 2,
"startDate": "2023-01-01",
"startTime": "20:45:00",
"endDate": "2029-11-01",
"endTime": "18:45:00",
"dayOfMonth": 15,
"dayOfWeek": "mo",
"numOfWeek": -1,
"monthOfYear": "jan",
"count": 10,
"daysBefore": 5,
"useStartAsPrimaryUserAccepted": true,
"endType": "by"
}
},
"invoices": [
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"name": "Alex",
"address": {
"addressLine1": "9931 Beechwood",
// truncado: 94 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "string",
"contactDetails": {
"id": "6578278e879ad2646715ba9c",
"name": "Alex",
"phoneNo": "+1234567890",
"email": "alex@example.com",
"additionalEmails": [
{
"email": "alex@example.com"
}
],
"companyName": "ABC Corp.",
"address": {
"addressLine1": "9931 Beechwood",
"addressLine2": "Beechwood",
"city": "St. Houston",
"state": "TX",
"countryCode": "US",
"postalCode": "559-6993"
},
"customFields": [
"string"
]
},
"schedule": {
"executeAt": "string",
"rrule": {
"intervalType": "monthly",
"interval": 2,
"startDate": "2023-01-01",
"startTime": "20:45:00",
"endDate": "2029-11-01",
"endTime": "18:45:00",
"dayOfMonth": 15,
"dayOfWeek": "mo",
"numOfWeek": -1,
"monthOfYear": "jan",
"count": 10,
"daysBefore": 5,
"useStartAsPrimaryUserAccepted": true,
"endType": "by"
}
},
"liveMode": true,
"businessDetails": {
"logoUrl": "https://example.com/logo.png",
"name": "ABC Corp.",
"phoneNo": "+1-214-559-6993",
"address": "9931 Beechwood, TX",
"website": "wwww.example.com",
"customValues": [
"string"
]
},
"currency": "string",
"items": [
{
"name": "ABC Product",
"description": "ABC Corp.",
"productId": "6578278e879ad2646715ba9c",
"priceId": "6578278e879ad2646715ba9c",
"currency": "USD",
"amount": 999,
"qty": 1,
"taxes": [
{}
],
"automaticTaxCategoryId": "6578278e879ad2646715ba9c",
"isSetupFeeItem": true,
"type": "one_time",
"taxInclusive": true
}
],
"discount": {
"value": 10,
"type": "percentage",
"validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
},
"termsNotes": "string",
"title": "string",
"attachments": [
{
"id": "6241712be68f7a98102ba272",
"name": "Electronics.pdf",
"url": "https://example.com/digital-delivery",
"type": "string",
"size": 10000
}
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "name": "string", "contactDetails": {"id": "6578278e879ad2646715ba9c", "name": "Alex", "phoneNo": "+1234567890", "email": "alex@example.com", "additionalEmails": [{"email": "alex@example.com"}], "companyName": "ABC Corp.", "address": {"addressLine1": "9931 Beechwood", "addressLine2": "Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "US", "postalCode": "559-6993"}, "customFields": ["string"]}, "schedule": {"executeAt": "string", "rrule": {"intervalType": "monthly", "interval": 2, "startDate": "2023-01-01", "startTime": "20:45:00", "endDate": "2029-11-01", "endTime": "18:45:00", "dayOfMonth": 15, "dayOfWeek": "mo", "numOfWeek": -1, "monthOfYear": "jan", "count": 10, "daysBefore": 5, "useStartAsPrimaryUserAccepted": true, "endType": "by"}}, "liveMode": true, "businessDetails": {"logoUrl": "https://example.com/logo.png", "name": "ABC Corp.", "phoneNo": "+1-214-559-6993", "address": "9931 Beechwood, TX", "website": "wwww.example.com", "customValues": ["string"]}, "currency": "string", "items": [{"name": "ABC Product", "description": "ABC Corp.", "productId": "6578278e879ad2646715ba9c", "priceId": "6578278e879ad2646715ba9c", "currency": "USD", "amount": 999, "qty": 1, "taxes": [{}], "automaticTaxCategoryId": "6578278e879ad2646715ba9c", "isSetupFeeItem": true, "type": "one_time", "taxInclusive": true}], "discount": {"value": 10, "type": "percentage", "validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"}, "termsNotes": "string", "title": "string", "attachments": [{"id": "6241712be68f7a98102ba272", "name": "Electronics.pdf", "url": "https://example.com/digital-delivery", "type": "string", "size": 10000}]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/invoices/schedule/YOUR_scheduleId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "name": "string", "contactDetails": {"id": "6578278e879ad2646715ba9c", "name": "Alex", "phoneNo": "+1234567890", "email": "alex@example.com", "additionalEmails": [{"email": "alex@example.com"}], "companyName": "ABC Corp.", "address": {"addressLine1": "9931 Beechwood", "addressLine2": "Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "US", "postalCode": "559-6993"}, "customFields": ["string"]}, "schedule": {"executeAt": "string", "rrule": {"intervalType": "monthly", "interval": 2, "startDate": "2023-01-01", "startTime": "20:45:00", "endDate": "2029-11-01", "endTime": "18:45:00", "dayOfMonth": 15, "dayOfWeek": "mo", "numOfWeek": -1, "monthOfYear": "jan", "count": 10, "daysBefore": 5, "useStartAsPrimaryUserAccepted": true, "endType": "by"}}, "liveMode": true, "businessDetails": {"logoUrl": "https://example.com/logo.png", "name": "ABC Corp.", "phoneNo": "+1-214-559-6993", "address": "9931 Beechwood, TX", "website": "wwww.example.com", "customValues": ["string"]}, "currency": "string", "items": [{"name": "ABC Product", "description": "ABC Corp.", "productId": "6578278e879ad2646715ba9c", "priceId": "6578278e879ad2646715ba9c", "currency": "USD", "amount": 999, "qty": 1, "taxes": [{}], "automaticTaxCategoryId": "6578278e879ad2646715ba9c", "isSetupFeeItem": true, "type": "one_time", "taxInclusive": true}], "discount": {"value": 10, "type": "percentage", "validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"}, "termsNotes": "string", "title": "string", "attachments": [{"id": "6241712be68f7a98102ba272", "name": "Electronics.pdf", "url": "https://example.com/digital-delivery", "type": "string", "size": 10000}]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'name': 'string', 'contactDetails': {'id': '6578278e879ad2646715ba9c', 'name': 'Alex', 'phoneNo': '+1234567890', 'email': 'alex@example.com', 'additionalEmails': [{'email': 'alex@example.com'}], 'companyName': 'ABC Corp.', 'address': {'addressLine1': '9931 Beechwood', 'addressLine2': 'Beechwood', 'city': 'St. Houston', 'state': 'TX', 'countryCode': 'US', 'postalCode': '559-6993'}, 'customFields': ['string']}, 'schedule': {'executeAt': 'string', 'rrule': {'intervalType': 'monthly', 'interval': 2, 'startDate': '2023-01-01', 'startTime': '20:45:00', 'endDate': '2029-11-01', 'endTime': '18:45:00', 'dayOfMonth': 15, 'dayOfWeek': 'mo', 'numOfWeek': -1, 'monthOfYear': 'jan', 'count': 10, 'daysBefore': 5, 'useStartAsPrimaryUserAccepted': true, 'endType': 'by'}}, 'liveMode': true, 'businessDetails': {'logoUrl': 'https://example.com/logo.png', 'name': 'ABC Corp.', 'phoneNo': '+1-214-559-6993', 'address': '9931 Beechwood, TX', 'website': 'wwww.example.com', 'customValues': ['string']}, 'currency': 'string', 'items': [{'name': 'ABC Product', 'description': 'ABC Corp.', 'productId': '6578278e879ad2646715ba9c', 'priceId': '6578278e879ad2646715ba9c', 'currency': 'USD', 'amount': 999, 'qty': 1, 'taxes': [{}], 'automaticTaxCategoryId': '6578278e879ad2646715ba9c', 'isSetupFeeItem': true, 'type': 'one_time', 'taxInclusive': true}], 'discount': {'value': 10, 'type': 'percentage', 'validOnProductIds': '[ '6579751d56f60276e5bd4154' ]'}, 'termsNotes': 'string', 'title': 'string', 'attachments': [{'id': '6241712be68f7a98102ba272', 'name': 'Electronics.pdf', 'url': 'https://example.com/digital-delivery', 'type': 'string', 'size': 10000}]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update template
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-update-invoice-template
API to update an template by template id
API to update an template by template id
```http theme={null}
PUT https://services.leadconnectorhq.com/invoices/template/{templateId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Template Id
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
Name of the template
Business Logo URL
Business Name
Business Phone Number
Business Address
Business Website Link
Custom Values
Invoice Item Name
Invoice descriptions
Product Id
Price Id
Currency
Product amount
Product Quantity
Tax
Posibles valores: 'exclusive'
Tax category id for calculating automatic tax
Setupfee item, only created when 1st invoice of recurring schedule is generated
Price type of the item Posibles valores: 'one\_time', 'recurring'
true if item amount is tax inclusive
Discount Value
Discount type Posibles valores: 'percentage', 'fixed'
Product Ids on which discount is applicable
Template title
miscellaneous charges for the invoice
## Respuestas
Template Id
Account Id or Agency Id
Posibles valores: 'account'
Name of the Template
Business Details
Currency
Discount
Invoice Items
prefix for invoice number
Total Amount
created at
updated at
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Template",
"businessDetails": {
"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"
},
"currency": "USD",
"discount": {
"type": "percentage",
"value": 0
},
"items": [
{
"taxes": [],
"_id": "c6tZZU0rJBf30ZXx9Gli",
"productId": "c6tZZU0rJBf30ZXx9Gli",
"priceId": "c6tZZU0rJBf30ZXx9Gli",
"currency": "USD",
"name": "Macbook Pro",
"qty": 1,
"amount": 999
}
],
"invoiceNumberPrefix": "INV-",
"total": 999,
"createdAt": "2023-12-12T09:27:42.355Z",
"updatedAt": "2023-12-12T09:27:42.355Z"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/invoices/template/YOUR_templateId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"internal": true,
"name": "New Template",
"businessDetails": {
"logoUrl": "https://example.com/logo.png",
"name": "ABC Corp.",
"phoneNo": "+1-214-559-6993",
"address": "9931 Beechwood, TX",
"website": "wwww.example.com",
"customValues": [
"string"
]
},
"currency": "string",
"items": [
{
"name": "ABC Product",
"description": "ABC Corp.",
"productId": "6578278e879ad2646715ba9c",
"priceId": "6578278e879ad2646715ba9c",
"currency": "USD",
"amount": 999,
"qty": 1,
"taxes": [
{}
],
"automaticTaxCategoryId": "6578278e879ad2646715ba9c",
"isSetupFeeItem": true,
"type": "one_time",
"taxInclusive": true
}
],
"discount": {
"value": 10,
"type": "percentage",
"validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"
},
"termsNotes": "string",
"title": "New Template"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/template/YOUR_templateId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "internal": true, "name": "New Template", "businessDetails": {"logoUrl": "https://example.com/logo.png", "name": "ABC Corp.", "phoneNo": "+1-214-559-6993", "address": "9931 Beechwood, TX", "website": "wwww.example.com", "customValues": ["string"]}, "currency": "string", "items": [{"name": "ABC Product", "description": "ABC Corp.", "productId": "6578278e879ad2646715ba9c", "priceId": "6578278e879ad2646715ba9c", "currency": "USD", "amount": 999, "qty": 1, "taxes": [{}], "automaticTaxCategoryId": "6578278e879ad2646715ba9c", "isSetupFeeItem": true, "type": "one_time", "taxInclusive": true}], "discount": {"value": 10, "type": "percentage", "validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"}, "termsNotes": "string", "title": "New Template"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/invoices/template/YOUR_templateId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "internal": true, "name": "New Template", "businessDetails": {"logoUrl": "https://example.com/logo.png", "name": "ABC Corp.", "phoneNo": "+1-214-559-6993", "address": "9931 Beechwood, TX", "website": "wwww.example.com", "customValues": ["string"]}, "currency": "string", "items": [{"name": "ABC Product", "description": "ABC Corp.", "productId": "6578278e879ad2646715ba9c", "priceId": "6578278e879ad2646715ba9c", "currency": "USD", "amount": 999, "qty": 1, "taxes": [{}], "automaticTaxCategoryId": "6578278e879ad2646715ba9c", "isSetupFeeItem": true, "type": "one_time", "taxInclusive": true}], "discount": {"value": 10, "type": "percentage", "validOnProductIds": "[ '6579751d56f60276e5bd4154' ]"}, "termsNotes": "string", "title": "New Template"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'internal': true, 'name': 'New Template', 'businessDetails': {'logoUrl': 'https://example.com/logo.png', 'name': 'ABC Corp.', 'phoneNo': '+1-214-559-6993', 'address': '9931 Beechwood, TX', 'website': 'wwww.example.com', 'customValues': ['string']}, 'currency': 'string', 'items': [{'name': 'ABC Product', 'description': 'ABC Corp.', 'productId': '6578278e879ad2646715ba9c', 'priceId': '6578278e879ad2646715ba9c', 'currency': 'USD', 'amount': 999, 'qty': 1, 'taxes': [{}], 'automaticTaxCategoryId': '6578278e879ad2646715ba9c', 'isSetupFeeItem': true, 'type': 'one_time', 'taxInclusive': true}], 'discount': {'value': 10, 'type': 'percentage', 'validOnProductIds': '[ '6579751d56f60276e5bd4154' ]'}, 'termsNotes': 'string', 'title': 'New Template'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update template late fees configuration
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-update-invoice-template-late-fees-configuration
API to update template late fees configuration by template id
API to update template late fees configuration by template id
```http theme={null}
PATCH https://services.leadconnectorhq.com/invoices/template/{templateId}/late-fees-configuration
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Template Id
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
late fees configuration
## Respuestas
Template Id
Account Id or Agency Id
Posibles valores: 'account'
Name of the Template
Business Details
Currency
Discount
Invoice Items
prefix for invoice number
Total Amount
created at
updated at
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Template",
"businessDetails": {
"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"
},
"currency": "USD",
"discount": {
"type": "percentage",
"value": 0
},
"items": [
{
"taxes": [],
"_id": "c6tZZU0rJBf30ZXx9Gli",
"productId": "c6tZZU0rJBf30ZXx9Gli",
"priceId": "c6tZZU0rJBf30ZXx9Gli",
"currency": "USD",
"name": "Macbook Pro",
"qty": 1,
"amount": 999
}
],
"invoiceNumberPrefix": "INV-",
"total": 999,
"createdAt": "2023-12-12T09:27:42.355Z",
"updatedAt": "2023-12-12T09:27:42.355Z"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PATCH 'https://services.leadconnectorhq.com/invoices/template/YOUR_templateId/late-fees-configuration' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/template/YOUR_templateId/late-fees-configuration', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/invoices/template/YOUR_templateId/late-fees-configuration',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Void invoice
Source: https://developers.leadwaycrm.com/api-reference/invoice/invoice-void-invoice
API to delete invoice by invoice id
API to delete invoice by invoice id
```http theme={null}
POST https://services.leadconnectorhq.com/invoices/{invoiceId}/void
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Invoice Id
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
## Respuestas
Invoice Id
Invoice Status Posibles valores: 'draft', 'sent', 'payment\_processing', 'paid', 'void', 'partially\_paid'
Live Mode
Amount Paid
Account Id or Agency Id
Posibles valores: 'account'
Name of the invoice
Business Details
Invoice Number
Currency
Contact Details
Issue date in YYYY-MM-DD format
Due date in YYYY-MM-DD format
Discount
Invoice Items
Total Amount
Title
Total Amount Due
created at
updated at
Automatic taxes enabled for the Invoice
Is Automatic taxes calculated for the Invoice items
split invoice into payment schedule summing up to full invoice amount
```json theme={null}
{
"_id": "6578278e879ad2646715ba9c",
"status": "draft",
"liveMode": false,
"amountPaid": 0,
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "New Invoice",
"businessDetails": {
"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"
},
"invoiceNumber": "19",
"currency": "USD",
"contactDetails": {
"id": "c6tZZU0rJBf30ZXx9Gli",
"phoneNo": "+1-214-559-6993",
"email": "alex@example.com",
"customFields": [],
"name": "Alex",
"address": {
"countryCode": "US"
}
},
"issueDate": "2023-01-01",
"dueDate": "2023-01-01",
"discount": {
"type": "percentage",
"value": 0
},
"invoiceItems": [
// truncado: 20 lineas mas
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Unable to find an invoice with the given invoice id"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/void' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/void', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/invoices/YOUR_invoiceId/void',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create a new FAQ inside knowledge base
Source: https://developers.leadwaycrm.com/api-reference/knowledge-base/knowledge-base-create
```http theme={null}
POST https://services.leadconnectorhq.com/knowledge-bases/faqs
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
account ID as string
faq question as a string
faq answer as a string
knowledge base ID as string
## Respuestas
Success status of the operation
Created FAQ details
```json theme={null}
{
"success": true
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
```json theme={null}
{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/knowledge-bases/faqs' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "HqDZpF8GH3qvgJTmKCoL",
"question": "What is the capital of France?",
"answer": "The capital of France is Paris.",
"knowledgeBaseId": "710KoEzy793Fxubft0bc"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/faqs', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "HqDZpF8GH3qvgJTmKCoL", "question": "What is the capital of France?", "answer": "The capital of France is Paris.", "knowledgeBaseId": "710KoEzy793Fxubft0bc"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/knowledge-bases/faqs',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "HqDZpF8GH3qvgJTmKCoL", "question": "What is the capital of France?", "answer": "The capital of France is Paris.", "knowledgeBaseId": "710KoEzy793Fxubft0bc"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'HqDZpF8GH3qvgJTmKCoL', 'question': 'What is the capital of France?', 'answer': 'The capital of France is Paris.', 'knowledgeBaseId': '710KoEzy793Fxubft0bc'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create a new knowledge base (max 15 knowledge bases per account)
Source: https://developers.leadwaycrm.com/api-reference/knowledge-base/knowledge-base-createknowledgebase
```http theme={null}
POST https://services.leadconnectorhq.com/knowledge-bases/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
## Respuestas
Success status of the operation
Created knowledge base details
```json theme={null}
{
"success": true
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/knowledge-bases/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"description": "string",
"locationId": "string"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "string", "description": "string", "locationId": "string"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/knowledge-bases/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "string", "description": "string", "locationId": "string"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'string', 'description': 'string', 'locationId': 'string'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete an existing knowledge base FAQ
Source: https://developers.leadwaycrm.com/api-reference/knowledge-base/knowledge-base-delete
```http theme={null}
DELETE https://services.leadconnectorhq.com/knowledge-bases/faqs/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
faq ID as string
## Respuestas
Success status of the delete operation
```json theme={null}
{
"success": true
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
```json theme={null}
{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/knowledge-bases/faqs/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/faqs/YOUR_id', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/knowledge-bases/faqs/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete a knowledge base
Source: https://developers.leadwaycrm.com/api-reference/knowledge-base/knowledge-base-deleteknowledgebase
```http theme={null}
DELETE https://services.leadconnectorhq.com/knowledge-bases/{knowledgeBaseId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Respuestas
```json theme={null}
{
"success": true
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/knowledge-bases/YOUR_knowledgeBaseId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/YOUR_knowledgeBaseId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/knowledge-bases/YOUR_knowledgeBaseId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete trained pages
Source: https://developers.leadwaycrm.com/api-reference/knowledge-base/knowledge-base-deletetrainedurlsforknowledgebase
```http theme={null}
DELETE https://services.leadconnectorhq.com/knowledge-bases/crawler
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
knowledge base ID as string
account ID as string
List of trained urls ids ( fetched from the Get all trained page links by knowledge base endpoint)
## Respuestas
Indicates if the operation was successful
```json theme={null}
{
"success": true
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
```json theme={null}
{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/knowledge-bases/crawler' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"knowledgeBaseId": "tDtDnQdgm2LXpyiqYvZ6",
"locationId": "tDtDnQdgm2LXpyiqYvZ6",
"urlIds": "[tDtDnQdgm2LXpyiqYvZ6]"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/crawler', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"knowledgeBaseId": "tDtDnQdgm2LXpyiqYvZ6", "locationId": "tDtDnQdgm2LXpyiqYvZ6", "urlIds": "[tDtDnQdgm2LXpyiqYvZ6]"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/knowledge-bases/crawler',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"knowledgeBaseId": "tDtDnQdgm2LXpyiqYvZ6", "locationId": "tDtDnQdgm2LXpyiqYvZ6", "urlIds": "[tDtDnQdgm2LXpyiqYvZ6]"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'knowledgeBaseId': 'tDtDnQdgm2LXpyiqYvZ6', 'locationId': 'tDtDnQdgm2LXpyiqYvZ6', 'urlIds': '[tDtDnQdgm2LXpyiqYvZ6]'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Start crawling and discover pages for training
Source: https://developers.leadwaycrm.com/api-reference/knowledge-base/knowledge-base-discoverwebsite
```http theme={null}
POST https://services.leadconnectorhq.com/knowledge-bases/crawler
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account ID as string
Website URL as string
Mode as string Posibles valores: 'Exact', 'Path', 'Domain'
knowledge base ID as string
## Respuestas
Indicates if the operation was successful
Data containing operation details
```json theme={null}
{
"success": true
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
```json theme={null}
{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/knowledge-bases/crawler' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "tDtDnQdgm2LXpyiqYvZ6",
"url": "https://kubernetes.io/tDtDnQdgm2LXpyiqYvZ6",
"option": "Exact",
"knowledgeBaseId": "tDtDnQdgm2LXpyiqYvZ6"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/crawler', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "tDtDnQdgm2LXpyiqYvZ6", "url": "https://kubernetes.io/tDtDnQdgm2LXpyiqYvZ6", "option": "Exact", "knowledgeBaseId": "tDtDnQdgm2LXpyiqYvZ6"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/knowledge-bases/crawler',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "tDtDnQdgm2LXpyiqYvZ6", "url": "https://kubernetes.io/tDtDnQdgm2LXpyiqYvZ6", "option": "Exact", "knowledgeBaseId": "tDtDnQdgm2LXpyiqYvZ6"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'tDtDnQdgm2LXpyiqYvZ6', 'url': 'https://kubernetes.io/tDtDnQdgm2LXpyiqYvZ6', 'option': 'Exact', 'knowledgeBaseId': 'tDtDnQdgm2LXpyiqYvZ6'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get all trained page links by knowledge base
Source: https://developers.leadwaycrm.com/api-reference/knowledge-base/knowledge-base-getallwebsiteurlsdatabyknowledgebase
```http theme={null}
GET https://services.leadconnectorhq.com/knowledge-bases/crawler
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
knowledge base ID as string
account ID as string
Page number
Records per page
query to filter on url links
## Respuestas
Total count of URLs in the knowledge base
Array of crawled URLs with their details
Unique identifier for the URL
The actual URL that was crawled
Title of the webpage
Current processing status of the URL Posibles valores: 'Pending', 'Processing', 'Successful', 'Failed', 'Existing', 'Restricted', 'Cancelled', 'Aborted', 'Training'
Account ID associated with this URL
Knowledge base ID this URL belongs to
URL to the stored content file
Whether the content was edited by user
Last updated timestamp
```json theme={null}
{
"count": 64,
"urls": [
{
"id": "688c73a25275c513f5f3a7de",
"url": "https://developer.mozilla.org/en-US/blog",
"title": "MDN Blog",
"status": "Successful",
"locationId": "qIyivCmsuEOSnyoFYEej",
"knowledgeBaseId": "Arc9QRauPKkSuMJO8D0m",
"content": "https://storage.googleapis.com/crm-conversations-ai-staging/conversationAI/2025/8/1/locations/qIyivCmsuEOSnyoFYEej/688c739c88c89f21ad30f63e-4IseusbZ3vDXMT8WNw9M.txt",
"contentEditedByUser": false,
"updatedAt": "2025-08-01T07:58:29.858Z"
}
]
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
```json theme={null}
{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/knowledge-bases/crawler' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/crawler', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/knowledge-bases/crawler',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get crawling status for the latest operation
Source: https://developers.leadwaycrm.com/api-reference/knowledge-base/knowledge-base-getcrawlingstatusforlatestoperation
```http theme={null}
GET https://services.leadconnectorhq.com/knowledge-bases/crawler/status
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account ID as string
operation id as string
knowledge base id
## Respuestas
Indicates if the operation was successful
Detailed crawling status data
```json theme={null}
{
"success": true
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
```json theme={null}
{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/knowledge-bases/crawler/status' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/crawler/status', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/knowledge-bases/crawler/status',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get knowledge base by ID
Source: https://developers.leadwaycrm.com/api-reference/knowledge-base/knowledge-base-getknowledgebasebyid
```http theme={null}
GET https://services.leadconnectorhq.com/knowledge-bases/{knowledgeBaseId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Respuestas
Success status of the operation
Knowledge base details
```json theme={null}
{
"success": true
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/knowledge-bases/YOUR_knowledgeBaseId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/YOUR_knowledgeBaseId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/knowledge-bases/YOUR_knowledgeBaseId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get all FAQs by knowledge base with pagination support
Source: https://developers.leadwaycrm.com/api-reference/knowledge-base/knowledge-base-list
Retrieves FAQs for a knowledge base. Supports pagination using limit and lastFaqId parameters.
Retrieves FAQs for a knowledge base. Supports pagination using limit and lastFaqId parameters.
```http theme={null}
GET https://services.leadconnectorhq.com/knowledge-bases/faqs
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
knowledge base ID as string
account ID as string
Limit the number of FAQs returned
Last FAQ ID for pagination (cursor-based)
## Respuestas
Total count of all FAQs in the knowledge base
Array of FAQ objects
FAQ ID as string
FAQ question
FAQ question in lowercase
FAQ answer
Knowledge base ID
Account ID
Trained URL ID
Whether the FAQ is deleted
Date when FAQ was created
Date when FAQ was last updated
Last FAQ ID for pagination (use as lastFaqId in next request)
Whether there are more FAQs available
```json theme={null}
{
"count": 150,
"faqs": [
{
"id": "3rzeElC1FOVY91veVBkp",
"question": "What is 1+2?",
"questionLowerCase": "what is 1+2?",
"answer": "3",
"knowledgeBaseId": "I1rITlYLJofFosIqC4Np",
"locationId": "qIyivCmsuEOSnyoFYEej",
"trainedUrlId": "688e6b6d8a1887e6d94d1475",
"deleted": false,
"createdAt": "2025-08-02T19:47:57.243Z",
"updatedAt": "2025-08-02T19:47:57.243Z"
}
],
"lastFaqId": "3rzeElC1FOVY91veVBkp",
"hasMore": true
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
```json theme={null}
{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/knowledge-bases/faqs' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/faqs', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/knowledge-bases/faqs',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get all knowledge bases for a account by account Id (paginated)
Source: https://developers.leadwaycrm.com/api-reference/knowledge-base/knowledge-base-listallknowledgebasespaginated
```http theme={null}
GET https://services.leadconnectorhq.com/knowledge-bases/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
search query for knowledge base name
Maximum number of knowledge bases to return
ID of the last knowledge base from the previous page (for pagination)
## Respuestas
Success status of the operation
Paginated knowledge bases data
```json theme={null}
{
"success": true
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/knowledge-bases/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/knowledge-bases/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Train discovered website pages and ingest into the knowledge base
Source: https://developers.leadwaycrm.com/api-reference/knowledge-base/knowledge-base-traindiscoveredurls
```http theme={null}
POST https://services.leadconnectorhq.com/knowledge-bases/crawler/train
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account ID as string
List of Object ids of the discovered urls
knowledge base id
operation id as string
## Respuestas
Indicates if the operation was successful
```json theme={null}
{
"success": true
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
```json theme={null}
{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/knowledge-bases/crawler/train' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "tDtDnQdgm2LXpyiqYvZ6",
"urlIds": [
"688b640bcb02d498102a13ec",
"688b640bcb02d498102a13ea"
],
"knowledgeBaseId": "jjkkxftgvbhjmn,",
"operationId": "688b640bcb02d498102a13f0,"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/crawler/train', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "tDtDnQdgm2LXpyiqYvZ6", "urlIds": ["688b640bcb02d498102a13ec", "688b640bcb02d498102a13ea"], "knowledgeBaseId": "jjkkxftgvbhjmn,", "operationId": "688b640bcb02d498102a13f0,"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/knowledge-bases/crawler/train',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "tDtDnQdgm2LXpyiqYvZ6", "urlIds": ["688b640bcb02d498102a13ec", "688b640bcb02d498102a13ea"], "knowledgeBaseId": "jjkkxftgvbhjmn,", "operationId": "688b640bcb02d498102a13f0,"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'tDtDnQdgm2LXpyiqYvZ6', 'urlIds': ['688b640bcb02d498102a13ec', '688b640bcb02d498102a13ea'], 'knowledgeBaseId': 'jjkkxftgvbhjmn,', 'operationId': '688b640bcb02d498102a13f0,'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update an existing knowledge base FAQ
Source: https://developers.leadwaycrm.com/api-reference/knowledge-base/knowledge-base-update
```http theme={null}
PUT https://services.leadconnectorhq.com/knowledge-bases/faqs/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
faq ID as string
## Body
faq question as a string
faq answer as a string
## Respuestas
Success status of the update operation
```json theme={null}
{
"success": true
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
```json theme={null}
{
"statusCode": 422,
"message": [
"Unprocessable Entity"
],
"error": "Unprocessable Entity"
}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/knowledge-bases/faqs/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"question": "What is the capital of France?",
"answer": "The capital of France is Paris."
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/faqs/YOUR_id', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"question": "What is the capital of France?", "answer": "The capital of France is Paris."}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/knowledge-bases/faqs/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"question": "What is the capital of France?", "answer": "The capital of France is Paris."},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'question': 'What is the capital of France?', 'answer': 'The capital of France is Paris.'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update a knowledge base
Source: https://developers.leadwaycrm.com/api-reference/knowledge-base/knowledge-base-updateknowledgebase
```http theme={null}
PUT https://services.leadconnectorhq.com/knowledge-bases/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Body
field to update the name of the knowledge base
field to update the description of the knowledge base
## Respuestas
```json theme={null}
{
"success": true
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/knowledge-bases/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"description": "string"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/knowledge-bases/YOUR_id', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "string", "description": "string"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/knowledge-bases/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "string", "description": "string"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'string', 'description': 'string'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create a new template
Source: https://developers.leadwaycrm.com/api-reference/lc-email/lc-email-create-template
Create a new template
Create a new template
```http theme={null}
POST https://services.leadconnectorhq.com/emails/builder
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Posibles valores: 'html', 'folder', 'import', 'builder', 'blank'
Posibles valores: '1', '2'
Posibles valores: 'mailchimp', 'active\_campaign', 'kajabi'
## Respuestas
template id
trace id
```json theme={null}
{
"redirect": "66e811229245fc098765590",
"traceId": "0c52e980-41f6-4be7-8c4b-e2c5a13dc3c2"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/emails/builder' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "ve9EPM428h8vShlRW1KT",
"title": "template title",
"type": "html",
"updatedBy": "zYy3YOUuHxgomU1uYJty",
"builderVersion": "2",
"name": "Template1",
"parentId": "zYy3YOUuHxgomU1uYJty",
"templateDataUrl": "",
"importProvider": "mailchimp",
"importURL": "https://tplshare.com/fhYJ3Mi",
"templateSource": "template_library",
"isPlainText": false
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/emails/builder', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "ve9EPM428h8vShlRW1KT", "title": "template title", "type": "html", "updatedBy": "zYy3YOUuHxgomU1uYJty", "builderVersion": "2", "name": "Template1", "parentId": "zYy3YOUuHxgomU1uYJty", "templateDataUrl": "", "importProvider": "mailchimp", "importURL": "https://tplshare.com/fhYJ3Mi", "templateSource": "template_library", "isPlainText": false}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/emails/builder',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "ve9EPM428h8vShlRW1KT", "title": "template title", "type": "html", "updatedBy": "zYy3YOUuHxgomU1uYJty", "builderVersion": "2", "name": "Template1", "parentId": "zYy3YOUuHxgomU1uYJty", "templateDataUrl": "", "importProvider": "mailchimp", "importURL": "https://tplshare.com/fhYJ3Mi", "templateSource": "template_library", "isPlainText": false},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 've9EPM428h8vShlRW1KT', 'title': 'template title', 'type': 'html', 'updatedBy': 'zYy3YOUuHxgomU1uYJty', 'builderVersion': '2', 'name': 'Template1', 'parentId': 'zYy3YOUuHxgomU1uYJty', 'templateDataUrl': '', 'importProvider': 'mailchimp', 'importURL': 'https://tplshare.com/fhYJ3Mi', 'templateSource': 'template_library', 'isPlainText': false}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete a template
Source: https://developers.leadwaycrm.com/api-reference/lc-email/lc-email-delete-template
Delete a template
Delete a template
```http theme={null}
DELETE https://services.leadconnectorhq.com/emails/builder/{locationId}/{templateId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Respuestas
ok
trace id
```json theme={null}
{
"ok": "true",
"traceId": "0c52e980-41f6-4be7-8c4b-32332ss"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/emails/builder/YOUR_locationId/YOUR_templateId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/emails/builder/YOUR_locationId/YOUR_templateId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/emails/builder/YOUR_locationId/YOUR_templateId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Campaigns
Source: https://developers.leadwaycrm.com/api-reference/lc-email/lc-email-fetch-campaigns
Get Campaigns
Get Campaigns
```http theme={null}
GET https://services.leadconnectorhq.com/emails/schedule
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account ID to fetch campaigns from
Maximum number of campaigns to return. Defaults to 10, maximum is 100
Number of campaigns to skip for pagination
Filter by schedule status
Filter by email delivery status
Filter campaigns by name
Filter campaigns by parent folder ID
When true, returns only essential campaign fields like id, templateDataDownloadUrl, updatedAt, type, templateType, templateId, downloadUrl and isPlainText. When false, returns complete campaign data including meta information, bulkRequestStatusInfo, ABTestInfo, resendScheduleInfo and all other campaign properties
Filter archived campaigns
Return only campaigns, excluding folders
When true, returns campaign statistics including delivered count, opened count, clicked count and revenue if available for the campaign. When false, returns campaign data without statistics.
## Respuestas
The list of campaigns
The total number of campaigns
Trace Id
```json theme={null}
{
"schedules": [
{
"name": "Untitled new campaign",
"repeatAfter": "string",
"id": "string",
"parentId": "string",
"childCount": 0,
"campaignType": "string",
"bulkActionVersion": "string",
"_id": "string",
"status": "string",
"sendDays": [
"string"
],
"deleted": true,
"migrated": true,
"archived": true,
"hasTracking": true,
"isPlainText": true,
"hasUtmTracking": true,
"enableResendToUnopened": true,
"locationId": "string",
"templateId": "string",
"templateType": "string",
"createdAt": "string",
"updatedAt": "string",
"__v": 0,
"documentId": "string",
"downloadUrl": "string",
"templateDataDownloadUrl": "string",
"child": [
"string"
]
}
],
"total": [
"string"
],
// truncado: 2 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{
"statusCode": 403,
"message": "The token does not have access to this account"
}
```
```json theme={null}
{
"statusCode": 404,
"message": "Not Found",
"error": "The requested resource was not found"
}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/emails/schedule' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/emails/schedule', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/emails/schedule',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Fetch email templates
Source: https://developers.leadwaycrm.com/api-reference/lc-email/lc-email-fetch-template
Fetch email templates by account id
Fetch email templates by account id
```http theme={null}
GET https://services.leadconnectorhq.com/emails/builder
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
## Respuestas
template name
updated by
plain text based template
last updated
date added
preview url
id
version
type
```json theme={null}
{
"name": "New Template",
"updatedBy": "John Doe",
"isPlainText": "false",
"lastUpdated": "2024-11-12T12:34:36.070Z",
"dateAdded": "2024-11-12T12:34:36.070Z",
"previewUrl": "https://example.com",
"id": "67334b231f2fad724062f52b5",
"version": "1",
"templateType": "builder"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/emails/builder' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/emails/builder', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/emails/builder',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update a template
Source: https://developers.leadwaycrm.com/api-reference/lc-email/lc-email-update-template
Update a template
Update a template
```http theme={null}
POST https://services.leadconnectorhq.com/emails/builder/data
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Posibles valores: 'html', 'builder'
## Respuestas
ok
trace id
preview url
template data download url
```json theme={null}
{
"ok": "true",
"traceId": "0c52e980-41f6-4be7-8c4b-32332ss",
"previewUrl": "https://example.com",
"templateDownloadUrl": "https://example.com"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/emails/builder/data' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "ve9EPM428h8vShlRW1KT",
"templateId": "zYy3YOUuHxgomU1uYJty",
"updatedBy": "zYy3YOUuHxgomU1uYJty",
"dnd": "{elements:[], attrs:{}, templateSettings:{}}",
"html": "",
"editorType": "html",
"previewText": "zYy3YOUuHxgomU1uYJty",
"isPlainText": "false"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/emails/builder/data', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "ve9EPM428h8vShlRW1KT", "templateId": "zYy3YOUuHxgomU1uYJty", "updatedBy": "zYy3YOUuHxgomU1uYJty", "dnd": "{elements:[], attrs:{}, templateSettings:{}}", "html": "", "editorType": "html", "previewText": "zYy3YOUuHxgomU1uYJty", "isPlainText": "false"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/emails/builder/data',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "ve9EPM428h8vShlRW1KT", "templateId": "zYy3YOUuHxgomU1uYJty", "updatedBy": "zYy3YOUuHxgomU1uYJty", "dnd": "{elements:[], attrs:{}, templateSettings:{}}", "html": "", "editorType": "html", "previewText": "zYy3YOUuHxgomU1uYJty", "isPlainText": "false"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 've9EPM428h8vShlRW1KT', 'templateId': 'zYy3YOUuHxgomU1uYJty', 'updatedBy': 'zYy3YOUuHxgomU1uYJty', 'dnd': '{elements:[], attrs:{}, templateSettings:{}}', 'html': '', 'editorType': 'html', 'previewText': 'zYy3YOUuHxgomU1uYJty', 'isPlainText': 'false'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Bulk Delete / Trash Files or Folders
Source: https://developers.leadwaycrm.com/api-reference/media-storage/media-storage-bulk-delete-media-objects
Soft-deletes or trashes multiple files and folders in a single request
Soft-deletes or trashes multiple files and folders in a single request
```http theme={null}
PUT https://services.leadconnectorhq.com/medias/delete-files
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Array of file objects to be deleted or trashed
Unique identifier of the file or folder to be deleted
Type of entity that owns the files Posibles valores: 'account'
Account identifier
Status to set for the files (deleted or trashed) Posibles valores: 'deleted', 'trashed'
## Respuestas
```json theme={null}
[
{
"deleted": true,
"id": "686f630df0d3166d68fbcec2"
}
]
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/medias/delete-files' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"filesToBeDeleted": [
{
"_id": "686f630df0d3166d68fbcec2"
}
],
"altType": "account",
"altId": "sx6wyHhbFdRXh302LLNR",
"status": "deleted"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/medias/delete-files', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"filesToBeDeleted": [{"_id": "686f630df0d3166d68fbcec2"}], "altType": "account", "altId": "sx6wyHhbFdRXh302LLNR", "status": "deleted"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/medias/delete-files',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"filesToBeDeleted": [{"_id": "686f630df0d3166d68fbcec2"}], "altType": "account", "altId": "sx6wyHhbFdRXh302LLNR", "status": "deleted"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'filesToBeDeleted': [{'_id': '686f630df0d3166d68fbcec2'}], 'altType': 'account', 'altId': 'sx6wyHhbFdRXh302LLNR', 'status': 'deleted'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Bulk Update Files/ Folders
Source: https://developers.leadwaycrm.com/api-reference/media-storage/media-storage-bulk-update-media-objects
Updates metadata or status of multiple files and folders
Updates metadata or status of multiple files and folders
```http theme={null}
PUT https://services.leadconnectorhq.com/medias/update-files
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account identifier
Type of entity that owns the files Posibles valores: 'account'
Array of file objects to be updated
Unique identifier of the file or folder to be updated
New name for the file or folder
## Respuestas
```json theme={null}
[
{
"updated": true,
"id": "686f9817f0d3165be9fbcef6"
}
]
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/medias/update-files' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "sx6wyHhbFdRXh302LLNR",
"altType": "account",
"filesToBeUpdated": [
{
"id": "686f9817f0d3165be9fbcef6",
"name": "Updated File Name.pdf"
}
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/medias/update-files', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "sx6wyHhbFdRXh302LLNR", "altType": "account", "filesToBeUpdated": [{"id": "686f9817f0d3165be9fbcef6", "name": "Updated File Name.pdf"}]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/medias/update-files',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "sx6wyHhbFdRXh302LLNR", "altType": "account", "filesToBeUpdated": [{"id": "686f9817f0d3165be9fbcef6", "name": "Updated File Name.pdf"}]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': 'sx6wyHhbFdRXh302LLNR', 'altType': 'account', 'filesToBeUpdated': [{'id': '686f9817f0d3165be9fbcef6', 'name': 'Updated File Name.pdf'}]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Folder
Source: https://developers.leadwaycrm.com/api-reference/media-storage/media-storage-create-media-folder
Creates a new folder in the media storage
Creates a new folder in the media storage
```http theme={null}
POST https://services.leadconnectorhq.com/medias/folder
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id
Type of entity (account only) Posibles valores: 'account'
Name of the folder to be created
ID of the parent folder (optional)
## Respuestas
Account identifier that owns this folder
Type of entity that owns the folder Posibles valores: 'account'
Name of the folder
ID of the parent folder (null for root folders)
Type of the object (always 'folder' for folders)
Whether the folder has been deleted
Whether there are pending uploads to this folder
Primary category of content stored in the folder
Sub-category of content stored in the folder
Whether the folder is private and not publicly accessible
Whether the folder has been moved from its original account
Whether the data migration process has been completed for this folder
Whether this is a system-generated application folder
Whether the folder is essential and should not be deleted
Current status of the folder
ID of the user who last updated the folder
```json theme={null}
{
"altId": "sx6wyHhbFdRXh302LLNR",
"altType": "account",
"name": "New Folder",
"parentId": "64af50c42d567a3b4f5989e0",
"type": "folder",
"deleted": false,
"pendingUpload": false,
"category": "image",
"subCategory": "logo",
"isPrivate": false,
"relocatedFolder": false,
"migrationCompleted": true,
"appFolder": false,
"isEssential": false,
"status": "string",
"lastUpdatedBy": "user-uuid-123"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/medias/folder' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "sx6wyHhbFdRXh302LLNR",
"altType": "account",
"name": "New Folder",
"parentId": "64af50c42d567a3b4f5989e0"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/medias/folder', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "sx6wyHhbFdRXh302LLNR", "altType": "account", "name": "New Folder", "parentId": "64af50c42d567a3b4f5989e0"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/medias/folder',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "sx6wyHhbFdRXh302LLNR", "altType": "account", "name": "New Folder", "parentId": "64af50c42d567a3b4f5989e0"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': 'sx6wyHhbFdRXh302LLNR', 'altType': 'account', 'name': 'New Folder', 'parentId': '64af50c42d567a3b4f5989e0'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete File or Folder
Source: https://developers.leadwaycrm.com/api-reference/media-storage/media-storage-delete-media-content
Deletes specific file or folder from the media storage
Deletes specific file or folder from the media storage
```http theme={null}
DELETE https://services.leadconnectorhq.com/medias/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Query parameters
AltType
account Id
## Respuestas
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/medias/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/medias/YOUR_id', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/medias/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get List of Files/ Folders
Source: https://developers.leadwaycrm.com/api-reference/media-storage/media-storage-fetch-media-content
Fetches list of files and folders from the media storage
Fetches list of files and folders from the media storage
```http theme={null}
GET https://services.leadconnectorhq.com/medias/files
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Number of files to skip in listing
Number of files to show in the listing
Field to sorting the file listing by
Direction in which file needs to be sorted
Type
Query text
AltType
account Id
parent id or folder id
Fetch all files or folders
## Respuestas
Array of File Objects
```json theme={null}
{
"files": {
"altId": "locationId",
"altType": "account",
"name": "file name",
"parentId": "parent folder id",
"url": "file url",
"path": "file path"
}
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/medias/files' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/medias/files', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/medias/files',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update File/ Folder
Source: https://developers.leadwaycrm.com/api-reference/media-storage/media-storage-update-media-object
Updates a single file or folder by ID
Updates a single file or folder by ID
```http theme={null}
POST https://services.leadconnectorhq.com/medias/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Unique identifier of the file or folder to update
## Body
New name for the file or folder
Type of entity that owns the file or folder Posibles valores: 'account'
Account identifier that owns the file or folder
## Respuestas
```json theme={null}
{
"updated": true,
"traceId": "33a641a2-c4a6-4123-aa82-c5b84f1a14ee"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/medias/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "Updated File Name.pdf",
"altType": "account",
"altId": "sx6wyHhbFdRXh302LLNR"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/medias/YOUR_id', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "Updated File Name.pdf", "altType": "account", "altId": "sx6wyHhbFdRXh302LLNR"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/medias/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "Updated File Name.pdf", "altType": "account", "altId": "sx6wyHhbFdRXh302LLNR"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'Updated File Name.pdf', 'altType': 'account', 'altId': 'sx6wyHhbFdRXh302LLNR'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Upload File into Media Storage
Source: https://developers.leadwaycrm.com/api-reference/media-storage/media-storage-upload-media-content
If hosted is set to true then fileUrl is required. Else file is required. If adding a file, maximum allowed is 25 MB
If hosted is set to true then fileUrl is required. Else file is required. If adding a file, maximum allowed is 25 MB
```http theme={null}
POST https://services.leadconnectorhq.com/medias/upload-file
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
## Respuestas
ID of the uploaded file
Google Cloud Storage URL of the uploaded file
```json theme={null}
{
"fileId": "file.pdf",
"url": "https://storage.googleapis.com/bucket-name/path/to/file.pdf"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/medias/upload-file' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"file": "string",
"hosted": true,
"fileUrl": "string",
"name": "string",
"parentId": "string"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/medias/upload-file', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"file": "string", "hosted": true, "fileUrl": "string", "name": "string", "parentId": "string"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/medias/upload-file',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"file": "string", "hosted": true, "fileUrl": "string", "name": "string", "parentId": "string"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'file': 'string', 'hosted': true, 'fileUrl': 'string', 'name': 'string', 'parentId': 'string'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Custom Object
Source: https://developers.leadwaycrm.com/api-reference/objects/objects-create-custom-object-schema
Allows you to create a custom object schema. To understand objects and records, please have a look at the documentation here : https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0
Allows you to create a custom object schema. To understand objects and records, please have a look at the documentation here : [https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0](https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0)
```http theme={null}
POST https://services.leadconnectorhq.com/objects/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
This is what your custom object will be called. These labels will be used to display your custom object on the UI
key that would be used to refer the Custom Object internally (lowercase + underscore\_separated). 'custom\_objects.' would be added as prefix by default
Pet Object\`s description
Account Id
Primary property which will be displayed on the record page
## Respuestas
id of the custom / standard object schema
false in case of custom objects and true in case of standard objects like contacts and opportunities
key that would be used to refer the custom / standard Object internally (lowercase + underscore\_separated). For custom objects, 'custom\_objects.' would be added as prefix by default
This is what your custom / standard object will be called. These labels will be used to display your custom object on the UI
Custom / Standard Object Descriptions for example , Pet Object\`s description
account's id
Primary property for the custom / standard Object. This would be used as primary data when rendering the UI. 'custom\_objects.\{\{object\_key}} or business.\{\{object\_key}} (for company)' would be added as prefix by default for all the custom / standard objects
Date and time when the object was added
Date and time when the object was last updated
Object\`s Type
```json theme={null}
{
"object": {
"id": "661c06b4ffde146bdb469442",
"standard": false,
"key": "custom_objects.pet",
"labels": {
"singular": "Pet",
"plural": "Pets"
},
"description": "These are non vaccinated pets",
"locationId": "Q9DT3OAqEXDLYuob1G32",
"primaryDisplayProperty": "custom_objects.pet.name",
"dateAdded": "2024-01-15T10:30:00Z",
"dateUpdated": "2024-01-15T10:30:00Z",
"type": "The Object type can either USER_DEFINED or SYSTEM_DEFINED"
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/objects/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"labels": {
"singular": "Pet",
"plural": "Pets"
},
"key": "custom_objects.pet",
"description": "These are non vaccinated pets",
"locationId": "ve9EPM428h8vShlRW1KT"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/objects/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"labels": {"singular": "Pet", "plural": "Pets"}, "key": "custom_objects.pet", "description": "These are non vaccinated pets", "locationId": "ve9EPM428h8vShlRW1KT"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/objects/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"labels": {"singular": "Pet", "plural": "Pets"}, "key": "custom_objects.pet", "description": "These are non vaccinated pets", "locationId": "ve9EPM428h8vShlRW1KT"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'labels': {'singular': 'Pet', 'plural': 'Pets'}, 'key': 'custom_objects.pet', 'description': 'These are non vaccinated pets', 'locationId': 've9EPM428h8vShlRW1KT'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Record
Source: https://developers.leadwaycrm.com/api-reference/objects/objects-create-object-record
Create a Custom Object Record. Supported Objects business and custom objects. Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0/87cpx-376296
Create a Custom Object Record. Supported Objects business and custom objects. Documentation Link - [https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0/87cpx-376296](https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0/87cpx-376296)
```http theme={null}
POST https://services.leadconnectorhq.com/objects/{schemaKey}/records
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
The key of the Custom Object / Standard Object Schema. For custom objects, the key must include the “custom\_objects.” prefix, while standard objects use their respective object keys. This information is available on the Custom Objects Details page under Settings.
## Body
## Respuestas
id of the record
Owner (User's id). Limited to 1 for now. Only Supported with custom objects
Follower (User's ids). Limited to 10 for now
Properties of the record
Date and time when the object was added
Date and time when the object was last updated
```json theme={null}
{
"record": {
"id": "661c06b4ffde146bdb469442",
"owner": [
"sx6wyHhbFdRXh302Lunr"
],
"followers": [
"sx6wyHhbFdRXh302Lunr",
"v5cEPM428h8vShlRW1KT"
],
"properties": {
"customer_number": 1424,
"ticket_name": "Customer not able login",
"phone_number": "+917000000000",
"money": {
"currency": "default",
"value": 100
},
"type_of_ticket": "doubt",
"section_of_app": [
"contacts",
"smartlist"
],
"recieved_on": "2024-07-11",
"my_files": [
{
"url": "---url_of_file---"
}
],
"my_textbox_list.option_a": "Value 1",
"my_textbox_list.option_b": "Value 2"
},
"dateAdded": "2024-01-15T10:30:00Z",
"dateUpdated": "2024-01-15T10:30:00Z"
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(None),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Record
Source: https://developers.leadwaycrm.com/api-reference/objects/objects-delete-object-record
Delete Record By Id . Supported Objects are business and custom objects.
Delete Record By Id . Supported Objects are business and custom objects.
```http theme={null}
DELETE https://services.leadconnectorhq.com/objects/{schemaKey}/records/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
The key of the Custom Object / Standard Object Schema. For custom objects, the key must include the “custom\_objects.” prefix, while standard objects use their respective object keys. This information is available on the Custom Objects Details page under Settings.
id of the record to be updated. Available on the Record details page under the 3 dots or in the url
## Respuestas
id of the deleted object
boolean that defines if the operation was a success or not
```json theme={null}
{
"id": "661c06b4ffde146bdb469442",
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/YOUR_id', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get all objects for a account
Source: https://developers.leadwaycrm.com/api-reference/objects/objects-get-object-by-account-id
Get all objects for a account. Supported Objects are contact, opportunity, business and custom objects.To understand objects and records, please have a look at the documentation here : https://doc.cli
Get all objects for a account. Supported Objects are contact, opportunity, business and custom objects.To understand objects and records, please have a look at the documentation here : [https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0](https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0)
```http theme={null}
GET https://services.leadconnectorhq.com/objects/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
account id
## Respuestas
id of the custom / standard object schema
false in case of custom objects and true in case of standard objects like contacts and opportunities
key that would be used to refer the custom / standard Object internally (lowercase + underscore\_separated). For custom objects, 'custom\_objects.' would be added as prefix by default
This is what your custom / standard object will be called. These labels will be used to display your custom object on the UI
Custom / Standard Object Descriptions for example , Pet Object\`s description
account's id
Primary property for the custom / standard Object. This would be used as primary data when rendering the UI. 'custom\_objects.\{\{object\_key}} or business.\{\{object\_key}} (for company)' would be added as prefix by default for all the custom / standard objects
Date and time when the object was added
Date and time when the object was last updated
Object\`s Type
```json theme={null}
{
"objects": [
{
"id": "661c06b4ffde146bdb469442",
"standard": false,
"key": "custom_objects.pet",
"labels": {
"singular": "Pet",
"plural": "Pets"
},
"description": "These are non vaccinated pets",
"locationId": "Q9DT3OAqEXDLYuob1G32",
"primaryDisplayProperty": "custom_objects.pet.name",
"dateAdded": "2024-01-15T10:30:00Z",
"dateUpdated": "2024-01-15T10:30:00Z",
"type": "The Object type can either USER_DEFINED or SYSTEM_DEFINED"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/objects/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/objects/', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/objects/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Object Schema by key / id
Source: https://developers.leadwaycrm.com/api-reference/objects/objects-get-object-schema-by-key
Retrieve Object Schema by key or ID. This will return the schema of the custom object, including all its fields and properties. Supported objects include contact, opportunity, business and custom obje
Retrieve Object Schema by key or ID. This will return the schema of the custom object, including all its fields and properties. Supported objects include contact, opportunity, business and custom objects.To understand objects and records, please have a look the documentation here : [https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0](https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0)
```http theme={null}
GET https://services.leadconnectorhq.com/objects/{key}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
key of the custom or standard object. For custom objects, the key must include the prefix “custom\_objects.”. This key can be found on the Object Details page under Settings in the UI.
## Query parameters
account id of the sub account
Fetch Properties , Fetches all the standard / custom fields of the object when set to true
## Respuestas
id of the custom / standard object schema
false in case of custom objects and true in case of standard objects like contacts and opportunities
key that would be used to refer the custom / standard Object internally (lowercase + underscore\_separated). For custom objects, 'custom\_objects.' would be added as prefix by default
This is what your custom / standard object will be called. These labels will be used to display your custom object on the UI
Custom / Standard Object Descriptions for example , Pet Object\`s description
account's id
Primary property for the custom / standard Object. This would be used as primary data when rendering the UI. 'custom\_objects.\{\{object\_key}} or business.\{\{object\_key}} (for company)' would be added as prefix by default for all the custom / standard objects
Date and time when the object was added
Date and time when the object was last updated
Object\`s Type
Is the response served from cache
Account Id
Field name
Description of the field
Placeholder text for the field
Whether the field should be shown in forms
Options for the field (Optional, valid only for SINGLE\_OPTIONS, MULTIPLE\_OPTIONS, RADIO, CHECKBOX, TEXTBOX\_LIST type)
Key of the option (Included in Create and Response, excluded in Update)
Value of the option
URL associated with the option (Optional, valid only for RADIO type)
Allowed file formats for uploads. Options include: .pdf, .docx, .doc, .jpg, .jpeg, .png, .gif, .csv, .xlsx, .xls, all Posibles valores: '.pdf', '.docx', '.doc', '.jpg', '.jpeg', '.png', '.gif', '.csv', '.xlsx', '.xls', 'all'
Unique identifier of the object
The key for your custom / standard object. This key uniquely identifies the custom object. Example: "custom\_object.pet" for a custom object related to pets.
Type of field that you are trying to create Posibles valores: 'TEXT', 'LARGE\_TEXT', 'NUMERICAL', 'PHONE', 'MONETORY', 'CHECKBOX', 'SINGLE\_OPTIONS', 'MULTIPLE\_OPTIONS', 'DATE', 'TEXTBOX\_LIST', 'FILE\_UPLOAD', 'RADIO'
ID of the parent folder
Field key. For Custom Object it's formatted as "custom\_object.\{objectKey}.\{fieldKey}". "custom\_object" is a fixed prefix, "\{objectKey}" is your custom object's identifier, and "\{fieldName}" is the unique field name within that object. Example: "custom\_object.pet.name" for a "name" field in a "pet" custom object.
Determines if users can add a custom option value different from the predefined options in records for RADIO type fields. A custom value added in one record does not automatically become an option and will not appear as an option for other records.
Maximum file limit for uploads
Date and time when the object was added
Date and time when the object was last updated
```json theme={null}
{
"object": {
"id": "661c06b4ffde146bdb469442",
"standard": false,
"key": "custom_objects.pet",
"labels": {
"singular": "Pet",
"plural": "Pets"
},
"description": "These are non vaccinated pets",
"locationId": "Q9DT3OAqEXDLYuob1G32",
"primaryDisplayProperty": "custom_objects.pet.name",
"dateAdded": "2024-01-15T10:30:00Z",
"dateUpdated": "2024-01-15T10:30:00Z",
"type": "The Object type can either USER_DEFINED or SYSTEM_DEFINED"
},
"cache": true,
"fields": [
{
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "Name",
"description": "string",
"placeholder": "string",
"showInForms": true,
"options": [
{}
],
"acceptedFormats": ".pdf",
"id": "string",
"objectKey": "custom_object.pet",
"dataType": "TEXT",
"parentId": "3v34PM428h8vShlRW1KT",
"fieldKey": "custom_object.pet.name",
"allowCustomOption": true,
"maxFileLimit": 2,
"dateAdded": "2024-01-15T10:30:00Z",
"dateUpdated": "2024-01-15T10:30:00Z"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/objects/YOUR_key' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/objects/YOUR_key', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/objects/YOUR_key',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Record By Id
Source: https://developers.leadwaycrm.com/api-reference/objects/objects-get-record-by-id
Allows you to get a Standard Object like business and custom object record by Id
Allows you to get a Standard Object like business and custom object record by Id
```http theme={null}
GET https://services.leadconnectorhq.com/objects/{schemaKey}/records/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
The key of the Custom Object / Standard Object Schema. For custom objects, the key must include the “custom\_objects.” prefix, while standard objects use their respective object keys. This information is available on the Custom Objects Details page under Settings.
id of the record to be updated. Available on the Record details page under the 3 dots or in the url
## Respuestas
id of the record
Owner (User's id). Limited to 1 for now. Only Supported with custom objects
Follower (User's ids). Limited to 10 for now
Properties of the record
Date and time when the object was added
Date and time when the object was last updated
```json theme={null}
{
"record": {
"id": "661c06b4ffde146bdb469442",
"owner": [
"sx6wyHhbFdRXh302Lunr"
],
"followers": [
"sx6wyHhbFdRXh302Lunr",
"v5cEPM428h8vShlRW1KT"
],
"properties": {
"customer_number": 1424,
"ticket_name": "Customer not able login",
"phone_number": "+917000000000",
"money": {
"currency": "default",
"value": 100
},
"type_of_ticket": "doubt",
"section_of_app": [
"contacts",
"smartlist"
],
"recieved_on": "2024-07-11",
"my_files": [
{
"url": "---url_of_file---"
}
],
"my_textbox_list.option_a": "Value 1",
"my_textbox_list.option_b": "Value 2"
},
"dateAdded": "2024-01-15T10:30:00Z",
"dateUpdated": "2024-01-15T10:30:00Z"
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/YOUR_id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Search Object Records
Source: https://developers.leadwaycrm.com/api-reference/objects/objects-search-object-records
Supported Objects are custom objects and standard objects like "business". Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0/87cpx-379336
Supported Objects are custom objects and standard objects like "business". Documentation Link - [https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0/87cpx-379336](https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0/87cpx-379336)
```http theme={null}
POST https://services.leadconnectorhq.com/objects/{schemaKey}/records/search
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
custom object key
## Body
Account Id
Page
Page Limit
Pass this query parameter to search using your searchable properties. For example, if you have a custom object called “Pets” and have configured “name” as a searchable property, you can pass name:Buddy to search for pets with the name “Buddy.”
## Respuestas
Records
id of the record
Owner (User's id). Limited to 1 for now . Only supported for custom objects for now
Follower (User's ids). Limited to 10 and supported for custom objects for now
Properties of the record
Date and time when the object was added
Date and time when the object was last updated
Account Id
ObjectId Id
ObjectId key
Created By Meta
Last Updated By Meta
Total Number of records
```json theme={null}
{
"records": [
{
"id": "661c06b4ffde146bdb469442",
"owner": [
"sx6wyHhbFdRXh302Lunr"
],
"followers": [
"sx6wyHhbFdRXh302Lunr",
"v5cEPM428h8vShlRW1KT"
],
"properties": {
"customer_number": 1424,
"ticket_name": "Customer not able login",
"phone_number": "+917000000000",
"money": {
"currency": "default",
"value": 100
},
"type_of_ticket": "doubt",
"section_of_app": [
"contacts",
"smartlist"
],
"recieved_on": "2024-07-11",
"my_files": [
{
"url": "---url_of_file---"
}
],
"my_textbox_list.option_a": "Value 1",
"my_textbox_list.option_b": "Value 2"
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"locationId": "ve9EPM428h8vShlRW1KT",
"objectId": "6d6f6e676f5f6576656e7473",
"objectKey": "custom_objects.pet",
"searchAfter": [
// truncado: 7 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/search' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "ve9EPM428h8vShlRW1KT",
"page": 1,
"pageLimit": 10,
"query": "Buddy",
"searchAfter": [
"sx6wyHhbFdRXh302Lunr",
"sx6wyHhbFdRXh302Lunr"
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/search', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "ve9EPM428h8vShlRW1KT", "page": 1, "pageLimit": 10, "query": "Buddy", "searchAfter": ["sx6wyHhbFdRXh302Lunr", "sx6wyHhbFdRXh302Lunr"]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/search',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "ve9EPM428h8vShlRW1KT", "page": 1, "pageLimit": 10, "query": "Buddy", "searchAfter": ["sx6wyHhbFdRXh302Lunr", "sx6wyHhbFdRXh302Lunr"]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 've9EPM428h8vShlRW1KT', 'page': 1, 'pageLimit': 10, 'query': 'Buddy', 'searchAfter': ['sx6wyHhbFdRXh302Lunr', 'sx6wyHhbFdRXh302Lunr']}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Object Schema By Key / Id
Source: https://developers.leadwaycrm.com/api-reference/objects/objects-update-custom-object
Update Custom Object Schema or standard objects like contact, opportunity, business searchable fields. To understand objects and records, please have a look at the documentation here : https://doc.cl
Update Custom Object Schema or standard object's like contact, opportunity, business searchable fields. To understand objects and records, please have a look at the documentation here : [https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0](https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0)
```http theme={null}
PUT https://services.leadconnectorhq.com/objects/{key}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
key of the custom or standard object. For custom objects, the key must include the prefix “custom\_objects.”. This key can be found on the Object Details page under Settings in the UI.
## Body
This is how your custom object will be displayed
Pet Object\`s description
account id
Searchable Fields: Provide the field key of your object that you want to search on, using the format (custom\_object.\
## Respuestas
id of the custom / standard object schema
false in case of custom objects and true in case of standard objects like contacts and opportunities
key that would be used to refer the custom / standard Object internally (lowercase + underscore\_separated). For custom objects, 'custom\_objects.' would be added as prefix by default
This is what your custom / standard object will be called. These labels will be used to display your custom object on the UI
Custom / Standard Object Descriptions for example , Pet Object\`s description
account's id
Primary property for the custom / standard Object. This would be used as primary data when rendering the UI. 'custom\_objects.\{\{object\_key}} or business.\{\{object\_key}} (for company)' would be added as prefix by default for all the custom / standard objects
Date and time when the object was added
Date and time when the object was last updated
Object\`s Type
```json theme={null}
{
"object": {
"id": "661c06b4ffde146bdb469442",
"standard": false,
"key": "custom_objects.pet",
"labels": {
"singular": "Pet",
"plural": "Pets"
},
"description": "These are non vaccinated pets",
"locationId": "Q9DT3OAqEXDLYuob1G32",
"primaryDisplayProperty": "custom_objects.pet.name",
"dateAdded": "2024-01-15T10:30:00Z",
"dateUpdated": "2024-01-15T10:30:00Z",
"type": "The Object type can either USER_DEFINED or SYSTEM_DEFINED"
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/objects/YOUR_key' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"labels": {
"singular": "Pet",
"plural": "Pets"
},
"description": "These are non vaccinated pets",
"locationId": "632c34b4c9b7da3358ac9891",
"searchableProperties": [
"custom_objects.mad.mad",
"custom_objects.mad.record_1",
"custom_objects.mad.nn"
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/objects/YOUR_key', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"labels": {"singular": "Pet", "plural": "Pets"}, "description": "These are non vaccinated pets", "locationId": "632c34b4c9b7da3358ac9891", "searchableProperties": ["custom_objects.mad.mad", "custom_objects.mad.record_1", "custom_objects.mad.nn"]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/objects/YOUR_key',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"labels": {"singular": "Pet", "plural": "Pets"}, "description": "These are non vaccinated pets", "locationId": "632c34b4c9b7da3358ac9891", "searchableProperties": ["custom_objects.mad.mad", "custom_objects.mad.record_1", "custom_objects.mad.nn"]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'labels': {'singular': 'Pet', 'plural': 'Pets'}, 'description': 'These are non vaccinated pets', 'locationId': '632c34b4c9b7da3358ac9891', 'searchableProperties': ['custom_objects.mad.mad', 'custom_objects.mad.record_1', 'custom_objects.mad.nn']}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Record
Source: https://developers.leadwaycrm.com/api-reference/objects/objects-update-object-record
Update a Custom Object Record by Id. Supported Objects are business and custom objects. Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0/87cpx-376296
Update a Custom Object Record by Id. Supported Objects are business and custom objects. Documentation Link - [https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0/87cpx-376296](https://doc.clickup.com/8631005/d/h/87cpx-277156/93bf0c2e23177b0/87cpx-376296)
```http theme={null}
PUT https://services.leadconnectorhq.com/objects/{schemaKey}/records/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
The key of the Custom Object / Standard Object Schema. For custom objects, the key must include the “custom\_objects.” prefix, while standard objects use their respective object keys. This information is available on the Custom Objects Details page under Settings.
id of the record to be updated. Available on the Record details page under the 3 dots or in the url
## Query parameters
## Body
## Respuestas
id of the record
Owner (User's id). Limited to 1 for now. Only Supported with custom objects
Follower (User's ids). Limited to 10 for now
Properties of the record
Date and time when the object was added
Date and time when the object was last updated
```json theme={null}
{
"record": {
"id": "661c06b4ffde146bdb469442",
"owner": [
"sx6wyHhbFdRXh302Lunr"
],
"followers": [
"sx6wyHhbFdRXh302Lunr",
"v5cEPM428h8vShlRW1KT"
],
"properties": {
"customer_number": 1424,
"ticket_name": "Customer not able login",
"phone_number": "+917000000000",
"money": {
"currency": "default",
"value": 100
},
"type_of_ticket": "doubt",
"section_of_app": [
"contacts",
"smartlist"
],
"recieved_on": "2024-07-11",
"my_files": [
{
"url": "---url_of_file---"
}
],
"my_textbox_list.option_a": "Value 1",
"my_textbox_list.option_b": "Value 2"
},
"dateAdded": "2024-01-15T10:30:00Z",
"dateUpdated": "2024-01-15T10:30:00Z"
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/YOUR_id', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/objects/YOUR_schemaKey/records/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(None),
]);
$data = json_decode(curl_exec($ch), true);
```
# Add Followers
Source: https://developers.leadwaycrm.com/api-reference/opportunities/opportunities-add-followers-opportunity
Add Followers
Add Followers
```http theme={null}
POST https://services.leadconnectorhq.com/opportunities/{id}/followers
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Opportunity Id
## Body
## Respuestas
```json theme={null}
{
"followers": [
"sx6wyHhbFdRXh302Lunr",
"sx6wyHhbFdRXh302LLss"
],
"followersAdded": [
"Mx6wyHhbFdRXh302Luer",
"Ka6wyHhbFdRXh302LLsAm"
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/opportunities/YOUR_id/followers' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"followers": [
"sx6wyHhbFdRXh302Lunr",
"sx6wyHhbFdRXh302Lunr"
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/opportunities/YOUR_id/followers', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"followers": ["sx6wyHhbFdRXh302Lunr", "sx6wyHhbFdRXh302Lunr"]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/opportunities/YOUR_id/followers',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"followers": ["sx6wyHhbFdRXh302Lunr", "sx6wyHhbFdRXh302Lunr"]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'followers': ['sx6wyHhbFdRXh302Lunr', 'sx6wyHhbFdRXh302Lunr']}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Opportunity
Source: https://developers.leadwaycrm.com/api-reference/opportunities/opportunities-create-opportunity
Create Opportunity
Create Opportunity
```http theme={null}
POST https://services.leadconnectorhq.com/opportunities/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
pipeline Id
Posibles valores: 'open', 'won', 'lost', 'abandoned', 'all'
Add custom fields to opportunities.
## Respuestas
The value of the custom field
```json theme={null}
{
"opportunity": {
"id": "yWQobCRIhRguQtD2llvk",
"name": "testing",
"monetaryValue": 500,
"pipelineId": "VDm7RPYC2GLUvdpKmBfC",
"pipelineStageId": "e93ba61a-53b3-45e7-985a-c7732dbcdb69",
"assignedTo": "zT46WSCPbudrq4zhWMk6",
"status": "open",
"source": "",
"lastStatusChangeAt": "2021-08-03T04:55:17.355Z",
"lastStageChangeAt": "2021-08-03T04:55:17.355Z",
"lastActionDate": "2021-08-03T04:55:17.355Z",
"indexVersion": 1,
"createdAt": "2021-08-03T04:55:17.355Z",
"updatedAt": "2021-08-03T04:55:17.355Z",
"contactId": "zT46WSCPbudrq4zhWMk6",
"locationId": "zT46WSCPbudrq4zhW",
"contact": {
"id": "byMEV0NQinDhq8ZfiOi2",
"name": "John Deo",
"companyName": "Tesla Inc",
"email": "john@deo.com",
"phone": "+1202-555-0107",
"tags": [
"string"
]
},
"notes": [
[]
],
"tasks": [
[]
],
"calendarEvents": [
[]
],
"lostReasonId": "zT46WSCPbudrq4zhWMk6",
"customFields": [
// truncado: 10 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/opportunities/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"pipelineId": "VDm7RPYC2GLUvdpKmBfC",
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "First Opps",
"pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
"status": "open",
"contactId": "mTkSCb1UBjb5tk4OvB69",
"monetaryValue": 220,
"assignedTo": "082goXVW3lIExEQPOnd3",
"customFields": []
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/opportunities/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"pipelineId": "VDm7RPYC2GLUvdpKmBfC", "locationId": "ve9EPM428h8vShlRW1KT", "name": "First Opps", "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10", "status": "open", "contactId": "mTkSCb1UBjb5tk4OvB69", "monetaryValue": 220, "assignedTo": "082goXVW3lIExEQPOnd3", "customFields": []}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/opportunities/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"pipelineId": "VDm7RPYC2GLUvdpKmBfC", "locationId": "ve9EPM428h8vShlRW1KT", "name": "First Opps", "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10", "status": "open", "contactId": "mTkSCb1UBjb5tk4OvB69", "monetaryValue": 220, "assignedTo": "082goXVW3lIExEQPOnd3", "customFields": []},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'pipelineId': 'VDm7RPYC2GLUvdpKmBfC', 'locationId': 've9EPM428h8vShlRW1KT', 'name': 'First Opps', 'pipelineStageId': '7915dedc-8f18-44d5-8bc3-77c04e994a10', 'status': 'open', 'contactId': 'mTkSCb1UBjb5tk4OvB69', 'monetaryValue': 220, 'assignedTo': '082goXVW3lIExEQPOnd3', 'customFields': []}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Opportunity
Source: https://developers.leadwaycrm.com/api-reference/opportunities/opportunities-delete-opportunity
Delete Opportunity
Delete Opportunity
```http theme={null}
DELETE https://services.leadconnectorhq.com/opportunities/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Opportunity Id
## Respuestas
```json theme={null}
{
"succeded": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/opportunities/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/opportunities/YOUR_id', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/opportunities/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get lost reason
Source: https://developers.leadwaycrm.com/api-reference/opportunities/opportunities-get-lost-reason
Get lost reason
Get lost reason
```http theme={null}
GET https://services.leadconnectorhq.com/opportunities/lost-reason
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
lost reason name
deleted
search query
skip
limit
get count
## Respuestas
lost reason id
lost reason name
account id
updated at
created at
```json theme={null}
{
"lostReasons": [
{
"id": "ve9EPM428h8vShlRW1KT",
"name": "lost reason",
"locationId": "location_id",
"updatedAt": "2023-06-19T12:04:22.488Z",
"createdAt": "2023-06-19T12:04:22.488Z"
}
],
"total": 100
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/opportunities/lost-reason' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/opportunities/lost-reason', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/opportunities/lost-reason',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Opportunity
Source: https://developers.leadwaycrm.com/api-reference/opportunities/opportunities-get-opportunity
Get Opportunity
Get Opportunity
```http theme={null}
GET https://services.leadconnectorhq.com/opportunities/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Opportunity Id
## Respuestas
The value of the custom field
```json theme={null}
{
"opportunity": {
"id": "yWQobCRIhRguQtD2llvk",
"name": "testing",
"monetaryValue": 500,
"pipelineId": "VDm7RPYC2GLUvdpKmBfC",
"pipelineStageId": "e93ba61a-53b3-45e7-985a-c7732dbcdb69",
"assignedTo": "zT46WSCPbudrq4zhWMk6",
"status": "open",
"source": "",
"lastStatusChangeAt": "2021-08-03T04:55:17.355Z",
"lastStageChangeAt": "2021-08-03T04:55:17.355Z",
"lastActionDate": "2021-08-03T04:55:17.355Z",
"indexVersion": 1,
"createdAt": "2021-08-03T04:55:17.355Z",
"updatedAt": "2021-08-03T04:55:17.355Z",
"contactId": "zT46WSCPbudrq4zhWMk6",
"locationId": "zT46WSCPbudrq4zhW",
"contact": {
"id": "byMEV0NQinDhq8ZfiOi2",
"name": "John Deo",
"companyName": "Tesla Inc",
"email": "john@deo.com",
"phone": "+1202-555-0107",
"tags": [
"string"
]
},
"notes": [
[]
],
"tasks": [
[]
],
"calendarEvents": [
[]
],
"lostReasonId": "zT46WSCPbudrq4zhWMk6",
"customFields": [
// truncado: 10 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/opportunities/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/opportunities/YOUR_id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/opportunities/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Pipelines
Source: https://developers.leadwaycrm.com/api-reference/opportunities/opportunities-get-pipelines
Get Pipelines
Get Pipelines
```http theme={null}
GET https://services.leadconnectorhq.com/opportunities/pipelines
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
## Respuestas
How pipeline/stage colors are rendered Posibles valores: 'dot', 'bg-tint', 'none'
```json theme={null}
{
"pipelines": [
{
"id": "aWdODOBVOlH1RUFKWQke",
"name": "new pipeline",
"stages": [
[]
],
"showInFunnel": false,
"showInPieChart": true,
"locationId": "dsjddjkndadqaja",
"colorRenderMode": "dot"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/opportunities/pipelines' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/opportunities/pipelines', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/opportunities/pipelines',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Remove Followers
Source: https://developers.leadwaycrm.com/api-reference/opportunities/opportunities-remove-followers-opportunity
Allows removal of one or all followers from an opportunity.
Allows removal of one or all followers from an opportunity.
```http theme={null}
DELETE https://services.leadconnectorhq.com/opportunities/{id}/followers
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Opportunity Id
## Query parameters
## Body
## Respuestas
```json theme={null}
{
"followers": [
"sx6wyHhbFdRXh302Lunr",
"sx6wyHhbFdRXh302LLss"
],
"followersRemoved": [
"Mx6wyHhbFdRXh302Luer",
"Ka6wyHhbFdRXh302LLsAm"
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/opportunities/YOUR_id/followers' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"followers": [
"sx6wyHhbFdRXh302Lunr",
"sx6wyHhbFdRXh302Lunr"
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/opportunities/YOUR_id/followers', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"followers": ["sx6wyHhbFdRXh302Lunr", "sx6wyHhbFdRXh302Lunr"]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/opportunities/YOUR_id/followers',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"followers": ["sx6wyHhbFdRXh302Lunr", "sx6wyHhbFdRXh302Lunr"]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'followers': ['sx6wyHhbFdRXh302Lunr', 'sx6wyHhbFdRXh302Lunr']}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Search Opportunities
Source: https://developers.leadwaycrm.com/api-reference/opportunities/opportunities-search-opportunities-advanced
Search Opportunities based on combinations of advanced filters. Documentation Link - https://doc.clickup.com/8631005/d/h/87cpx-424216/7bf11bc9b94f80f
Search Opportunities based on combinations of advanced filters. Documentation Link - [https://doc.clickup.com/8631005/d/h/87cpx-424216/7bf11bc9b94f80f](https://doc.clickup.com/8631005/d/h/87cpx-424216/7bf11bc9b94f80f)
```http theme={null}
POST https://services.leadconnectorhq.com/opportunities/search
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id
## Respuestas
The value of the custom field
```json theme={null}
{
"opportunities": [
{
"id": "yWQobCRIhRguQtD2llvk",
"name": "testing",
"monetaryValue": 500,
"pipelineId": "VDm7RPYC2GLUvdpKmBfC",
"pipelineStageId": "e93ba61a-53b3-45e7-985a-c7732dbcdb69",
"assignedTo": "zT46WSCPbudrq4zhWMk6",
"status": "open",
"source": "",
"lastStatusChangeAt": "2021-08-03T04:55:17.355Z",
"lastStageChangeAt": "2021-08-03T04:55:17.355Z",
"lastActionDate": "2021-08-03T04:55:17.355Z",
"indexVersion": 1,
"createdAt": "2021-08-03T04:55:17.355Z",
"updatedAt": "2021-08-03T04:55:17.355Z",
"contactId": "zT46WSCPbudrq4zhWMk6",
"locationId": "zT46WSCPbudrq4zhW",
"contact": {
"id": "byMEV0NQinDhq8ZfiOi2",
"name": "John Deo",
"companyName": "Tesla Inc",
"email": "john@deo.com",
"phone": "+1202-555-0107",
"tags": []
},
"notes": [
[]
],
"tasks": [
[]
],
"calendarEvents": [
[]
],
"lostReasonId": "zT46WSCPbudrq4zhWMk6",
"customFields": [
{}
// truncado: 10 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/opportunities/search' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "i2SpAtBVHSVea1sL6oah",
"query": "string",
"limit": 0,
"page": 0,
"searchAfter": [
"string"
],
"additionalDetails": {
"notes": true,
"tasks": true,
"calendarEvents": true,
"unReadConversations": true
}
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/opportunities/search', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "i2SpAtBVHSVea1sL6oah", "query": "string", "limit": 0, "page": 0, "searchAfter": ["string"], "additionalDetails": {"notes": true, "tasks": true, "calendarEvents": true, "unReadConversations": true}}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/opportunities/search',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "i2SpAtBVHSVea1sL6oah", "query": "string", "limit": 0, "page": 0, "searchAfter": ["string"], "additionalDetails": {"notes": true, "tasks": true, "calendarEvents": true, "unReadConversations": true}},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'i2SpAtBVHSVea1sL6oah', 'query': 'string', 'limit': 0, 'page': 0, 'searchAfter': ['string'], 'additionalDetails': {'notes': true, 'tasks': true, 'calendarEvents': true, 'unReadConversations': true}}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Search Opportunity
Source: https://developers.leadwaycrm.com/api-reference/opportunities/opportunities-search-opportunity
Search Opportunity
Search Opportunity
```http theme={null}
GET https://services.leadconnectorhq.com/opportunities/search
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
Pipeline Id
stage Id
Contact Id
Campaign Id
Opportunity Id
End date
Start After
Start After Id
Start date
Limit Per Page records count. will allow maximum up to 100 and default will be 20
get Tasks in contact
get Notes in contact
get Calendar event in contact
## Respuestas
The value of the custom field
```json theme={null}
{
"opportunities": [
{
"id": "yWQobCRIhRguQtD2llvk",
"name": "testing",
"monetaryValue": 500,
"pipelineId": "VDm7RPYC2GLUvdpKmBfC",
"pipelineStageId": "e93ba61a-53b3-45e7-985a-c7732dbcdb69",
"assignedTo": "zT46WSCPbudrq4zhWMk6",
"status": "open",
"source": "",
"lastStatusChangeAt": "2021-08-03T04:55:17.355Z",
"lastStageChangeAt": "2021-08-03T04:55:17.355Z",
"lastActionDate": "2021-08-03T04:55:17.355Z",
"indexVersion": 1,
"createdAt": "2021-08-03T04:55:17.355Z",
"updatedAt": "2021-08-03T04:55:17.355Z",
"contactId": "zT46WSCPbudrq4zhWMk6",
"locationId": "zT46WSCPbudrq4zhW",
"contact": {
"id": "byMEV0NQinDhq8ZfiOi2",
"name": "John Deo",
"companyName": "Tesla Inc",
"email": "john@deo.com",
"phone": "+1202-555-0107",
"tags": []
},
"notes": [
[]
],
"tasks": [
[]
],
"calendarEvents": [
[]
],
"lostReasonId": "zT46WSCPbudrq4zhWMk6",
"customFields": [
{}
// truncado: 18 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/opportunities/search' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/opportunities/search', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/opportunities/search',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Opportunity
Source: https://developers.leadwaycrm.com/api-reference/opportunities/opportunities-update-opportunity
Update Opportunity
Update Opportunity
```http theme={null}
PUT https://services.leadconnectorhq.com/opportunities/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Opportunity Id
## Body
pipeline Id
Posibles valores: 'open', 'won', 'lost', 'abandoned', 'all'
Update custom fields to opportunities.
## Respuestas
The value of the custom field
```json theme={null}
{
"opportunity": {
"id": "yWQobCRIhRguQtD2llvk",
"name": "testing",
"monetaryValue": 500,
"pipelineId": "VDm7RPYC2GLUvdpKmBfC",
"pipelineStageId": "e93ba61a-53b3-45e7-985a-c7732dbcdb69",
"assignedTo": "zT46WSCPbudrq4zhWMk6",
"status": "open",
"source": "",
"lastStatusChangeAt": "2021-08-03T04:55:17.355Z",
"lastStageChangeAt": "2021-08-03T04:55:17.355Z",
"lastActionDate": "2021-08-03T04:55:17.355Z",
"indexVersion": 1,
"createdAt": "2021-08-03T04:55:17.355Z",
"updatedAt": "2021-08-03T04:55:17.355Z",
"contactId": "zT46WSCPbudrq4zhWMk6",
"locationId": "zT46WSCPbudrq4zhW",
"contact": {
"id": "byMEV0NQinDhq8ZfiOi2",
"name": "John Deo",
"companyName": "Tesla Inc",
"email": "john@deo.com",
"phone": "+1202-555-0107",
"tags": [
"string"
]
},
"notes": [
[]
],
"tasks": [
[]
],
"calendarEvents": [
[]
],
"lostReasonId": "zT46WSCPbudrq4zhWMk6",
"customFields": [
// truncado: 10 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/opportunities/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"pipelineId": "bCkKGpDsyPP4peuKowkG",
"name": "First Opps",
"pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
"status": "open",
"monetaryValue": 220,
"assignedTo": "082goXVW3lIExEQPOnd3",
"customFields": []
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/opportunities/YOUR_id', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"pipelineId": "bCkKGpDsyPP4peuKowkG", "name": "First Opps", "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10", "status": "open", "monetaryValue": 220, "assignedTo": "082goXVW3lIExEQPOnd3", "customFields": []}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/opportunities/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"pipelineId": "bCkKGpDsyPP4peuKowkG", "name": "First Opps", "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10", "status": "open", "monetaryValue": 220, "assignedTo": "082goXVW3lIExEQPOnd3", "customFields": []},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'pipelineId': 'bCkKGpDsyPP4peuKowkG', 'name': 'First Opps', 'pipelineStageId': '7915dedc-8f18-44d5-8bc3-77c04e994a10', 'status': 'open', 'monetaryValue': 220, 'assignedTo': '082goXVW3lIExEQPOnd3', 'customFields': []}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Opportunity Status
Source: https://developers.leadwaycrm.com/api-reference/opportunities/opportunities-update-opportunity-status
Update Opportunity Status
Update Opportunity Status
```http theme={null}
PUT https://services.leadconnectorhq.com/opportunities/{id}/status
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Opportunity Id
## Body
Posibles valores: 'open', 'won', 'lost', 'abandoned', 'all'
lost reason Id
## Respuestas
```json theme={null}
{
"succeded": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/opportunities/YOUR_id/status' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"status": "open",
"lostReasonId": "CLu7BaljjqrEjBGKTNNe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/opportunities/YOUR_id/status', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"status": "open", "lostReasonId": "CLu7BaljjqrEjBGKTNNe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/opportunities/YOUR_id/status',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"status": "open", "lostReasonId": "CLu7BaljjqrEjBGKTNNe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'status': 'open', 'lostReasonId': 'CLu7BaljjqrEjBGKTNNe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Upsert Opportunity
Source: https://developers.leadwaycrm.com/api-reference/opportunities/opportunities-upsert-opportunity
Upsert Opportunity
Upsert Opportunity
```http theme={null}
POST https://services.leadconnectorhq.com/opportunities/upsert
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
opportunityId
pipeline Id
locationId
contactId
isRemoveAllFollowers
followers action type Posibles valores: 'add', 'remove'
name
Posibles valores: 'open', 'won', 'lost', 'abandoned', 'all'
lost reason Id
## Respuestas
Updated / New Opportunity
```json theme={null}
{
"opportunity": {},
"new": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/opportunities/upsert' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"id": "yWQobCRIhRguQtD2llvk",
"pipelineId": "bCkKGpDsyPP4peuKowkG",
"locationId": "CLu7BaljjqrEjBGKTNNe",
"followers": "LiKJ2vnRg5ETM8Z19K7",
"isRemoveAllFollowers": true,
"followersActionType": "add",
"name": "opportunity name",
"status": "open",
"pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10",
"monetaryValue": 220,
"assignedTo": "082goXVW3lIExEQPOnd3",
"lostReasonId": "CLu7BaljjqrEjBGKTNNe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/opportunities/upsert', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"id": "yWQobCRIhRguQtD2llvk", "pipelineId": "bCkKGpDsyPP4peuKowkG", "locationId": "CLu7BaljjqrEjBGKTNNe", "followers": "LiKJ2vnRg5ETM8Z19K7", "isRemoveAllFollowers": true, "followersActionType": "add", "name": "opportunity name", "status": "open", "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10", "monetaryValue": 220, "assignedTo": "082goXVW3lIExEQPOnd3", "lostReasonId": "CLu7BaljjqrEjBGKTNNe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/opportunities/upsert',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"id": "yWQobCRIhRguQtD2llvk", "pipelineId": "bCkKGpDsyPP4peuKowkG", "locationId": "CLu7BaljjqrEjBGKTNNe", "followers": "LiKJ2vnRg5ETM8Z19K7", "isRemoveAllFollowers": true, "followersActionType": "add", "name": "opportunity name", "status": "open", "pipelineStageId": "7915dedc-8f18-44d5-8bc3-77c04e994a10", "monetaryValue": 220, "assignedTo": "082goXVW3lIExEQPOnd3", "lostReasonId": "CLu7BaljjqrEjBGKTNNe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'id': 'yWQobCRIhRguQtD2llvk', 'pipelineId': 'bCkKGpDsyPP4peuKowkG', 'locationId': 'CLu7BaljjqrEjBGKTNNe', 'followers': 'LiKJ2vnRg5ETM8Z19K7', 'isRemoveAllFollowers': true, 'followersActionType': 'add', 'name': 'opportunity name', 'status': 'open', 'pipelineStageId': '7915dedc-8f18-44d5-8bc3-77c04e994a10', 'monetaryValue': 220, 'assignedTo': '082goXVW3lIExEQPOnd3', 'lostReasonId': 'CLu7BaljjqrEjBGKTNNe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create new provider config
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-create-config
API to create a new payment config for given account
API to create a new payment config for given account
```http theme={null}
POST https://services.leadconnectorhq.com/payments/custom-provider/connect
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account id
## Body
Live config containing api-key and publishable key for live payments
Test config containing api-key and publishable-key for test payments
## Respuestas
The name of the custom provider
Description of payment gateway. Shown on the payments integrations page as subtext
This url will be loaded in iFrame to start a payment session.
The url used for querying payments related events. Ex. verify, refund, subscription etc.
Public image url for logo of the payment gateway displayed on the payments integrations page.
The unique identifier for the custom provider.
Account id
The application id of marketplace
Payment provider details.
Whether the config is deleted or not. true represents config is deleted
The creation timestamp of the custom provider.
The last update timestamp of the custom provider.
Trace id of the custom provider.
```json theme={null}
{
"name": "Company Paypal Integration",
"description": "This payment gateway supports payments in India via UPI, Net banking, cards and wallets.",
"paymentsUrl": "https://testpayment.paypal.com",
"queryUrl": "https://testsubscription.paypal.com",
"imageUrl": "https://testsubscription.paypal.com",
"_id": "662a44ad19a2a44d3cd9d749",
"locationId": "Lk3nlfk4lxlelVEwcW",
"marketplaceAppId": "65f0b217a05c774da7f1efa5",
"paymentProvider": "{ live: { liveMode: true }, test: { liveMode: false, apiKey: \"y5ZQxryRFXZHvUJZdLXXXXXX\", publishableKey: \"rzp_test_zPRoVMLOa0A9wo\" }}",
"deleted": true,
"createdAt": "2023-11-20T10:23:36.515Z",
"updatedAt": "2024-01-23T09:57:04.846Z",
"traceId": "302d2cf4-1ba0-4bf5-bc3b-f8fa76fda58a"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/payments/custom-provider/connect' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/custom-provider/connect', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/payments/custom-provider/connect',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(None),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Coupon
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-create-coupon
The "Create Coupon" API allows you to create a new promotional coupon with customizable parameters such as discount amount, validity period, usage limits, and applicable products. Use this endpoint to
The "Create Coupon" API allows you to create a new promotional coupon with customizable parameters such as discount amount, validity period, usage limits, and applicable products. Use this endpoint to set up promotional offers and special discounts for your customers.
```http theme={null}
POST https://services.leadconnectorhq.com/payments/coupon
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id
Alt Type Posibles valores: 'account'
Coupon Name
Coupon Code
Discount Type Posibles valores: 'percentage', 'amount'
Discount Value
Start date in YYYY-MM-DDTHH:mm:ssZ format
End date in YYYY-MM-DDTHH:mm:ssZ format
Max number of times coupon can be used
Product Ids
Is Coupon applicable on upcoming subscription transactions
If coupon is applicable on upcoming subscription transactions, how many months should it be applicable for a subscription
Limits whether a coupon can be redeemed only once per customer.
## Respuestas
Unique MongoDB identifier for the coupon
Number of times the coupon has been used
Maximum number of times a customer can use this coupon (0 for unlimited)
Account Id
Type of entity
Display name of the coupon
Redemption code for the coupon
Type of discount (percentage or amount) Posibles valores: 'percentage', 'amount'
Value of the discount (percentage or fixed amount)
Current status of the coupon Posibles valores: 'scheduled', 'active', 'expired'
Date when the coupon becomes active
End date when the coupon expires
Indicates if the coupon applies to future recurring payments
Configuration for how the coupon applies to future payments
User ID associated with the coupon (if applicable)
Creation timestamp
Last update timestamp
Unique identifier for tracing this API request
```json theme={null}
{
"_id": "67f6c132d9485f9dacd5f123",
"usageCount": 12,
"limitPerCustomer": 5,
"altId": "79t07PzK8Tvf73d12312",
"altType": "account",
"name": "NEWT6",
"code": "NEWT6",
"discountType": "percentage",
"discountValue": 25,
"status": "scheduled",
"startDate": "2025-04-30T18:30:00.000Z",
"endDate": "2025-05-30T18:30:00.000Z",
"applyToFuturePayments": true,
"userId": "q0m15dTLGeiGOXG123123",
"createdAt": "2025-04-09T18:49:22.026Z",
"updatedAt": "2025-04-09T18:49:22.026Z",
"traceId": "c667b18d-8f5e-44cf-a914"
}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/payments/coupon' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "BQdAwxa0ky1iK2sstLGJ",
"altType": "account",
"name": "New Year Sale",
"code": "LEVELUPDAY2022",
"discountType": "amount",
"discountValue": 10,
"startDate": "2023-01-01T22:45:00.000Z",
"endDate": "2023-01-31T22:45:00.000Z",
"usageLimit": 10,
"productIds": [
"6241712be68f7a98102ba272"
],
"applyToFuturePayments": true,
"applyToFuturePaymentsConfig": [
{
"type": "fixed",
"duration": 5,
"durationType": "months"
},
{
"type": "forever"
}
],
"limitPerCustomer": true
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/coupon', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "BQdAwxa0ky1iK2sstLGJ", "altType": "account", "name": "New Year Sale", "code": "LEVELUPDAY2022", "discountType": "amount", "discountValue": 10, "startDate": "2023-01-01T22:45:00.000Z", "endDate": "2023-01-31T22:45:00.000Z", "usageLimit": 10, "productIds": ["6241712be68f7a98102ba272"], "applyToFuturePayments": true, "applyToFuturePaymentsConfig": [{"type": "fixed", "duration": 5, "durationType": "months"}, {"type": "forever"}], "limitPerCustomer": true}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/payments/coupon',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "BQdAwxa0ky1iK2sstLGJ", "altType": "account", "name": "New Year Sale", "code": "LEVELUPDAY2022", "discountType": "amount", "discountValue": 10, "startDate": "2023-01-01T22:45:00.000Z", "endDate": "2023-01-31T22:45:00.000Z", "usageLimit": 10, "productIds": ["6241712be68f7a98102ba272"], "applyToFuturePayments": true, "applyToFuturePaymentsConfig": [{"type": "fixed", "duration": 5, "durationType": "months"}, {"type": "forever"}], "limitPerCustomer": true},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': 'BQdAwxa0ky1iK2sstLGJ', 'altType': 'account', 'name': 'New Year Sale', 'code': 'LEVELUPDAY2022', 'discountType': 'amount', 'discountValue': 10, 'startDate': '2023-01-01T22:45:00.000Z', 'endDate': '2023-01-31T22:45:00.000Z', 'usageLimit': 10, 'productIds': ['6241712be68f7a98102ba272'], 'applyToFuturePayments': true, 'applyToFuturePaymentsConfig': [{'type': 'fixed', 'duration': 5, 'durationType': 'months'}, {'type': 'forever'}], 'limitPerCustomer': true}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create new integration
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-create-integration
API to create a new association for an app and account
API to create a new association for an app and account
```http theme={null}
POST https://services.leadconnectorhq.com/payments/custom-provider/provider
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account id
## Body
The name of the custom provider
Description of payment gateway. Shown on the payments integrations page as subtext
This url will be loaded in iFrame to start a payment session.
The url used for querying payments related events. Ex. verify, refund, subscription etc.
Public image url for logo of the payment gateway displayed on the payments integrations page.
Whether the config supports subscription schedule or not. true represents config supports subscription schedule
## Respuestas
The name of the custom provider
Description of payment gateway. Shown on the payments integrations page as subtext
This url will be loaded in iFrame to start a payment session.
The url used for querying payments related events. Ex. verify, refund, subscription etc.
Public image url for logo of the payment gateway displayed on the payments integrations page.
The unique identifier for the custom provider.
Account id
The application id of marketplace
Payment provider details.
Whether the config is deleted or not. true represents config is deleted
The creation timestamp of the custom provider.
The last update timestamp of the custom provider.
Trace id of the custom provider.
```json theme={null}
{
"name": "Company Paypal Integration",
"description": "This payment gateway supports payments in India via UPI, Net banking, cards and wallets.",
"paymentsUrl": "https://testpayment.paypal.com",
"queryUrl": "https://testsubscription.paypal.com",
"imageUrl": "https://testsubscription.paypal.com",
"_id": "662a44ad19a2a44d3cd9d749",
"locationId": "Lk3nlfk4lxlelVEwcW",
"marketplaceAppId": "65f0b217a05c774da7f1efa5",
"paymentProvider": "{ live: { liveMode: true }, test: { liveMode: false, apiKey: \"y5ZQxryRFXZHvUJZdLXXXXXX\", publishableKey: \"rzp_test_zPRoVMLOa0A9wo\" }}",
"deleted": true,
"createdAt": "2023-11-20T10:23:36.515Z",
"updatedAt": "2024-01-23T09:57:04.846Z",
"traceId": "302d2cf4-1ba0-4bf5-bc3b-f8fa76fda58a"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/payments/custom-provider/provider' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "Company Paypal Integration",
"description": "This payment gateway supports payments in India via UPI, Net banking, cards and wallets.",
"paymentsUrl": "https://testpayment.paypal.com",
"queryUrl": "https://testsubscription.paypal.com",
"imageUrl": "https://testsubscription.paypal.com",
"supportsSubscriptionSchedule": true
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/custom-provider/provider', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "Company Paypal Integration", "description": "This payment gateway supports payments in India via UPI, Net banking, cards and wallets.", "paymentsUrl": "https://testpayment.paypal.com", "queryUrl": "https://testsubscription.paypal.com", "imageUrl": "https://testsubscription.paypal.com", "supportsSubscriptionSchedule": true}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/payments/custom-provider/provider',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "Company Paypal Integration", "description": "This payment gateway supports payments in India via UPI, Net banking, cards and wallets.", "paymentsUrl": "https://testpayment.paypal.com", "queryUrl": "https://testsubscription.paypal.com", "imageUrl": "https://testsubscription.paypal.com", "supportsSubscriptionSchedule": true},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'Company Paypal Integration', 'description': 'This payment gateway supports payments in India via UPI, Net banking, cards and wallets.', 'paymentsUrl': 'https://testpayment.paypal.com', 'queryUrl': 'https://testsubscription.paypal.com', 'imageUrl': 'https://testsubscription.paypal.com', 'supportsSubscriptionSchedule': true}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create White-label Integration Provider
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-create-integration-provider
The "Create White-label Integration Provider" API allows adding a new payment provider integration to the system which is built on top of Authorize.net or NMI. Use this endpoint to create a integratio
The "Create White-label Integration Provider" API allows adding a new payment provider integration to the system which is built on top of Authorize.net or NMI. Use this endpoint to create a integration provider with the specified details. Ensure that the required information is provided in the request payload. This endpoint can be only invoked using marketplace-app token
```http theme={null}
POST https://services.leadconnectorhq.com/payments/integrations/provider/whitelabel
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
A unique name given to the integration provider, uniqueName must start and end with a character. Only lowercase characters and hyphens (-) are supported
The title or name of the integration provider.
The type of payment provider associated with the integration provider. Posibles valores: 'authorize-net', 'nmi'
A brief description providing additional information about the integration provider.
The URL to an image representing the integration provider. The imageUrl should start with "https\://" and ensure that this URL is publicly accessible.
## Respuestas
The unique identifier of the integration provider.
The altId / locationId of the integration provider.
The altType of the integration provider.
The title or name of the integration provider.
The route name associated with the integration provider.
The payment provider associated with the integration provider.
A brief description providing additional information about the integration provider.
The URL to an image representing the integration provider.
The timestamp when the integration provider was created.
The timestamp when the integration provider was last updated.
```json theme={null}
{
"_id": "65cb47dda50f4f13ced4b870",
"altId": "Z4Bxl8J4SaPEPLq9IQ8g",
"altType": "account",
"title": "Example",
"route": "epd",
"provider": "nmi",
"description": "Lorem",
"imageUrl": "https://example.com/assets/pmd/img/payments/nmi-logo.webp",
"createdAt": "2024-02-13T10:43:41.026Z",
"updatedAt": "2024-02-13T10:43:41.026Z"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/payments/integrations/provider/whitelabel' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"uniqueName": "easy-direct",
"title": "Title",
"provider": {
"AUTHORIZE_NET": "authorize-net",
"NMI": "nmi"
},
"description": "Description",
"imageUrl": "https://example.com/image.jpg"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/integrations/provider/whitelabel', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "uniqueName": "easy-direct", "title": "Title", "provider": {"AUTHORIZE_NET": "authorize-net", "NMI": "nmi"}, "description": "Description", "imageUrl": "https://example.com/image.jpg"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/payments/integrations/provider/whitelabel',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "uniqueName": "easy-direct", "title": "Title", "provider": {"AUTHORIZE_NET": "authorize-net", "NMI": "nmi"}, "description": "Description", "imageUrl": "https://example.com/image.jpg"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'uniqueName': 'easy-direct', 'title': 'Title', 'provider': {'AUTHORIZE_NET': 'authorize-net', 'NMI': 'nmi'}, 'description': 'Description', 'imageUrl': 'https://example.com/image.jpg'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create order fulfillment
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-create-order-fulfillment
The "Order Fulfillment" API facilitates the process of fulfilling an order.
The "Order Fulfillment" API facilitates the process of fulfilling an order.
```http theme={null}
POST https://services.leadconnectorhq.com/payments/orders/{orderId}/fulfillments
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the order that needs to be returned
## Body
Account Id or Agency Id
Posibles valores: 'account'
Fulfillment tracking information
Tracking number provided by the shipping carrier
Shipping carrier name
Tracking URL
Fulfilled items
The id of product price
The no of quantity of the item
Need to send a notification to customer
## Respuestas
Status of api action
fulfillment data
```json theme={null}
{
"status": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/fulfillments' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"trackings": [
{
"trackingNumber": "40012345678",
"shippingCarrier": "FedEx",
"trackingUrl": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"
}
],
"items": [
{
"priceId": "6578278e879ad2646715ba9c",
"qty": 1
}
],
"notifyCustomer": true
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/fulfillments', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "trackings": [{"trackingNumber": "40012345678", "shippingCarrier": "FedEx", "trackingUrl": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"}], "items": [{"priceId": "6578278e879ad2646715ba9c", "qty": 1}], "notifyCustomer": true}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/fulfillments',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "trackings": [{"trackingNumber": "40012345678", "shippingCarrier": "FedEx", "trackingUrl": "https://www.fedex.com/wtrk/track/?trknbr=40012345678"}], "items": [{"priceId": "6578278e879ad2646715ba9c", "qty": 1}], "notifyCustomer": true},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'trackings': [{'trackingNumber': '40012345678', 'shippingCarrier': 'FedEx', 'trackingUrl': 'https://www.fedex.com/wtrk/track/?trknbr=40012345678'}], 'items': [{'priceId': '6578278e879ad2646715ba9c', 'qty': 1}], 'notifyCustomer': true}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Custom-provider marketplace app update capabilities
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-custom-provider-marketplace-app-update-capabilities
Toggle capabilities for the marketplace app tied to the OAuth client
Toggle capabilities for the marketplace app tied to the OAuth client
```http theme={null}
PUT https://services.leadconnectorhq.com/payments/custom-provider/capabilities
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Whether the marketplace app supports subscription schedules or not
Company id. Mandatory if locationId is not provided
Account / Account id. Mandatory if companyId is not provided
## Respuestas
Whether the custom provider capabilities are updated or not. true represents capabilities are updated
```json theme={null}
{
"success": "true"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/payments/custom-provider/capabilities' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"supportsSubscriptionSchedules": true,
"companyId": "Yjnwuduw83e8x30sm0",
"locationId": "Yjnwuduw83e8x30sm0"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/custom-provider/capabilities', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"supportsSubscriptionSchedules": true, "companyId": "Yjnwuduw83e8x30sm0", "locationId": "Yjnwuduw83e8x30sm0"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/payments/custom-provider/capabilities',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"supportsSubscriptionSchedules": true, "companyId": "Yjnwuduw83e8x30sm0", "locationId": "Yjnwuduw83e8x30sm0"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'supportsSubscriptionSchedules': true, 'companyId': 'Yjnwuduw83e8x30sm0', 'locationId': 'Yjnwuduw83e8x30sm0'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Coupon
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-delete-coupon
The "Delete Coupon" API allows you to permanently remove a coupon from your system using its unique identifier. Use this endpoint to discontinue promotional offers or clean up unused coupons. Note tha
The "Delete Coupon" API allows you to permanently remove a coupon from your system using its unique identifier. Use this endpoint to discontinue promotional offers or clean up unused coupons. Note that this action cannot be undone.
```http theme={null}
DELETE https://services.leadconnectorhq.com/payments/coupon
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id
Alt Type Posibles valores: 'account'
Coupon Id
## Respuestas
Indicates whether the delete was successful
Unique identifier for tracing this API request
```json theme={null}
{
"success": true,
"traceId": "c667b18d-8f5e-44cf-a914"
}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/payments/coupon' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "BQdAwxa0ky1iK2sstLGJ",
"altType": "account",
"id": "6241712be68f7a98102ba272"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/coupon', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "BQdAwxa0ky1iK2sstLGJ", "altType": "account", "id": "6241712be68f7a98102ba272"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/payments/coupon',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "BQdAwxa0ky1iK2sstLGJ", "altType": "account", "id": "6241712be68f7a98102ba272"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': 'BQdAwxa0ky1iK2sstLGJ', 'altType': 'account', 'id': '6241712be68f7a98102ba272'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Deleting an existing integration
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-delete-integration
API to delete an association for an app and account
API to delete an association for an app and account
```http theme={null}
DELETE https://services.leadconnectorhq.com/payments/custom-provider/provider
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account id
## Respuestas
Whether the custom provider config is disconnect or not. true represents config is disconnect
```json theme={null}
{
"success": "true"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/payments/custom-provider/provider' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/custom-provider/provider', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/payments/custom-provider/provider',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Disconnect existing provider config
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-disconnect-config
API to disconnect an existing payment config for given account
API to disconnect an existing payment config for given account
```http theme={null}
POST https://services.leadconnectorhq.com/payments/custom-provider/disconnect
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account id
## Body
Whether the config is for test mode or live mode. true represents config is for live payments
## Respuestas
Whether the custom provider config is disconnect or not. true represents config is disconnect
```json theme={null}
{
"success": "true"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/payments/custom-provider/disconnect' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"liveMode": "true"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/custom-provider/disconnect', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"liveMode": "true"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/payments/custom-provider/disconnect',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"liveMode": "true"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'liveMode': 'true'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Fetch given provider config
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-fetch-config
API for fetching an existing payment config for given account
API for fetching an existing payment config for given account
```http theme={null}
GET https://services.leadconnectorhq.com/payments/custom-provider/connect
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account id
## Respuestas
The name of the custom provider
Description of payment gateway. Shown on the payments integrations page as subtext
This url will be loaded in iFrame to start a payment session.
The url used for querying payments related events. Ex. verify, refund, subscription etc.
Public image url for logo of the payment gateway displayed on the payments integrations page.
The unique identifier for the custom provider.
Account id
The application id of marketplace
Payment provider details.
Whether the config is deleted or not. true represents config is deleted
The creation timestamp of the custom provider.
The last update timestamp of the custom provider.
Trace id of the custom provider.
```json theme={null}
{
"name": "Company Paypal Integration",
"description": "This payment gateway supports payments in India via UPI, Net banking, cards and wallets.",
"paymentsUrl": "https://testpayment.paypal.com",
"queryUrl": "https://testsubscription.paypal.com",
"imageUrl": "https://testsubscription.paypal.com",
"_id": "662a44ad19a2a44d3cd9d749",
"locationId": "Lk3nlfk4lxlelVEwcW",
"marketplaceAppId": "65f0b217a05c774da7f1efa5",
"paymentProvider": "{ live: { liveMode: true }, test: { liveMode: false, apiKey: \"y5ZQxryRFXZHvUJZdLXXXXXX\", publishableKey: \"rzp_test_zPRoVMLOa0A9wo\" }}",
"deleted": true,
"createdAt": "2023-11-20T10:23:36.515Z",
"updatedAt": "2024-01-23T09:57:04.846Z",
"traceId": "302d2cf4-1ba0-4bf5-bc3b-f8fa76fda58a"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/payments/custom-provider/connect' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/custom-provider/connect', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/payments/custom-provider/connect',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Fetch Coupon
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-get-coupon
The "Get Coupon Details" API enables you to retrieve comprehensive information about a specific coupon using either its unique identifier or promotional code. Use this endpoint to view coupon paramete
The "Get Coupon Details" API enables you to retrieve comprehensive information about a specific coupon using either its unique identifier or promotional code. Use this endpoint to view coupon parameters, usage statistics, validity periods, and other promotional details.
```http theme={null}
GET https://services.leadconnectorhq.com/payments/coupon
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
Alt Type
Coupon id
Coupon code
## Respuestas
Unique MongoDB identifier for the coupon
Number of times the coupon has been used
Maximum number of times a customer can use this coupon (0 for unlimited)
Account Id
Type of entity
Display name of the coupon
Redemption code for the coupon
Type of discount (percentage or amount) Posibles valores: 'percentage', 'amount'
Value of the discount (percentage or fixed amount)
Current status of the coupon Posibles valores: 'scheduled', 'active', 'expired'
Date when the coupon becomes active
End date when the coupon expires
Indicates if the coupon applies to future recurring payments
Configuration for how the coupon applies to future payments
User ID associated with the coupon (if applicable)
Creation timestamp
Last update timestamp
Unique identifier for tracing this API request
```json theme={null}
{
"_id": "67f6c132d9485f9dacd5f123",
"usageCount": 12,
"limitPerCustomer": 5,
"altId": "79t07PzK8Tvf73d12312",
"altType": "account",
"name": "NEWT6",
"code": "NEWT6",
"discountType": "percentage",
"discountValue": 25,
"status": "scheduled",
"startDate": "2025-04-30T18:30:00.000Z",
"endDate": "2025-05-30T18:30:00.000Z",
"applyToFuturePayments": true,
"userId": "q0m15dTLGeiGOXG123123",
"createdAt": "2025-04-09T18:49:22.026Z",
"updatedAt": "2025-04-09T18:49:22.026Z",
"traceId": "c667b18d-8f5e-44cf-a914"
}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/payments/coupon' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/coupon', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/payments/coupon',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Order by ID
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-get-order-by-id
The "Get Order by ID" API allows to retrieve information for a specific order using its unique identifier. Use this endpoint to fetch details for a single order based on the provided order ID.
The "Get Order by ID" API allows to retrieve information for a specific order using its unique identifier. Use this endpoint to fetch details for a single order based on the provided order ID.
```http theme={null}
GET https://services.leadconnectorhq.com/payments/orders/{orderId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the order that needs to be returned
## Query parameters
LocationId is the id of the account.
AltId is the unique identifier e.g: account id.
## Respuestas
The unique identifier for the order.
AltId is the unique identifier eg: account id.
AltType is the type of identifier.
Contact id corresponding to the order.
Currency in which order was created.
Order value.
The status of the order (e.g., completed).
Order is in live / test mode.
The creation timestamp of the order.
The last update timestamp of the order.
Fulfillment status of the order.
Contact details of the order.
Amount details of the order.
Source details of the order.
Item details of the order.
Coupon details of the order.
Tracking id of the order.
Fingerprint id of the order.
Meta details of the order.
Is test order.
Trace id of the order.
Automatic taxes applied for the Order
Provider name for automatic tax calculation
User ID who created the order.
```json theme={null}
{
"_id": "653f5e0cde5a1314e62a837c",
"altId": "3SwdhCu3svxI8AKsPJt6",
"altType": "account",
"contactId": "XPLSw2SVagl12LMDeTmQ",
"currency": "USD",
"amount": "100",
"status": "completed",
"liveMode": "false",
"createdAt": "2023-11-20T10:23:36.515Z",
"updatedAt": "2024-01-23T09:57:04.846Z",
"fulfillmentStatus": "unfulfilled",
"contactSnapshot": "{ last_name: \"Mcclain\", type: \"lead\", first_name_lower_case: \"rogan\", email: \"anish+11@leadwaycrm.com\", last_name_lower_case: \"mcclain\", location_id: \"o6241QsiRwUIJHyjuhos\", company_name: \"Jordan and Cox Trading\"}",
"amountSummary": "{ subtotal: 100, discount: 5 }",
"source": "{ type: \"invoice\", id: \"61dd48ff65b013bc39bb09c6\" }",
"items": "{ _id: 61dd33e88058b9f967ca79dc, authorizeAmount: 0, locationId: \"SBAWb4yu7A4LSc0skQ6g\", name: \"Sample Product\": price: {}, product: { name: \"Testing product\", productType: \"SERVICE\" }}",
"coupon": "{ code: \"FEST10\", _id: \"63455e48901b43d4ef364a20\" }",
"trackingId": "63319ef9-de0a-4c84-aebd-3585fb4a0cdf",
"fingerprint": "5d51db5a-42b0-4b04-ba88-2c046c982a3a",
"meta": "{ couponSessionExpired: true }",
"markAsTest": "false",
"traceId": "d3b16a92-a8ed-4e6b-8467-844750f78ed5",
"automaticTaxesCalculated": true,
"taxCalculationProvider": "taxjar",
"createdBy": "user123"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/orders/YOUR_orderId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Subscription by ID
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-get-subscription-by-id
The "Get Subscription by ID" API allows to retrieve information for a specific subscription using its unique identifier. Use this endpoint to fetch details for a single subscription based on the provi
The "Get Subscription by ID" API allows to retrieve information for a specific subscription using its unique identifier. Use this endpoint to fetch details for a single subscription based on the provided subscription ID.
```http theme={null}
GET https://services.leadconnectorhq.com/payments/subscriptions/{subscriptionId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the subscription that needs to be returned
## Query parameters
AltId is the unique identifier e.g: account id.
AltType is the type of identifier.
## Respuestas
The unique identifier for the subscription.
AltType is the type of identifier.
AltId is the unique identifier eg: account id.
Contact id corresponding to the subscription.
Contact details of the subscriber.
Coupon details of the subscription.
Currency in which subscription was made.
Subscription value.
Subscription status.
Subscription is in live / test mode.
Entity type of subscription (eg: order).
Entity id for the subscription. e.g: order id
Entity source details for the subscription.
Subscription id for subscription.
Snapshot of subscription.
Payment provider details for the subscription.
Ip address from where subscription was initiated.
The creation timestamp of the subscription.
The last update timestamp of the subscription.
Meta details of the subscription.
Is test subscription.
Scedule details for the subscription.
Auto payment details of the subscription.
Recurring product details of the subscription.
Cancellation timestamp of the subscription.
User id who cancelled the subscription.
Trace id of the subscription.
User ID who created the subscription.
```json theme={null}
{
"_id": "64bf78af39118e4011926cba",
"altType": "account",
"altId": "3SwdhCu3svxI8AKsPJt6",
"contactId": "XPLSw2SVagl12LMDeTmQ",
"contactSnapshot": "{ last_name: \"Mcclain\", type: \"lead\", first_name_lower_case: \"rogan\", email: \"anish+11@leadwaycrm.com\", last_name_lower_case: \"mcclain\", location_id: \"o6241QsiRwUIJHyjuhos\", company_name: \"Jordan and Cox Trading\"}",
"coupon": "{ _id: \"6374c6926d119a393fe1e556\", usageCount: 5260, altId: \"jVFIxsMY19D94nOSIOEO\", altType: \"account\", name: \"FREE-100%\", code: \"FREE100\", discountType: \"percentage\", discountValue: 100 }",
"currency": "USD",
"amount": "100",
"status": "active",
"liveMode": "false",
"entityType": "order",
"entityId": "62f4db0f3059ecee61379012",
"entitySource": "{ type: \"funnel\", id: \"lx6ROqruHGVQD2PZwFxK\", subType: \"upsell\", name: \"test funnel\" }",
"subscriptionId": "I-0UE609H8E43P",
"subscriptionSnapshot": "{ status: \"ACTIVE\", status_update_time: \"2022-08-16T11:06:53Z\", id: \"I-0UE609H8E43P\", plan_id: \"P-82K11750F0313430KMLRGE6Y\", start_time: \"2022-08-16T11:05:31Z\", quantity: 1 }",
"paymentProvider": "{ type: \"paypal\", connectedAccount: { _id: \"64410debdc8f3b0503523abb\", merchantClientId: \"AeXtjrxdgsJiCPwQt5jML5pH-0mwmLs-tH7ub4Uo3IrDKvRl34FvJy8niI6E1wmS_pryIRdNllyVl58b\" } }",
"ipAddress": "103.100.16.82",
"createdAt": "2023-11-20T10:23:36.515Z",
"updatedAt": "2024-01-23T09:57:04.846Z",
"meta": "{ collection: \"transactionsv2\", id: \"6320652f0f664b6632006920\" }",
"markAsTest": "false",
"schedule": "{ collection: \"transactionsv2\", id: \"6320652f0f664b6632006920\" }",
"autoPayment": "{ customerId: \"908879612\", paymentMethodId: \"908646635\" }",
"recurringProduct": "{ locationId: \"Z4Bxl8J4SaPEPLq9IQ8g\", funnel: \"bQHJWKcyjiKjk4BHv91g\", step: \"2281a993-8a75-4b48-9912-571f29c99a74\", name: \"Sofa Set\" }",
"canceledAt": "2023-11-20T10:23:36.515Z",
"canceledBy": "qUuXUiB2AiA2DIthEicP",
"traceId": "302d2cf4-1ba0-4bf5-bc3b-f8fa76fda58a",
"createdBy": "user123"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/payments/subscriptions/YOUR_subscriptionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/subscriptions/YOUR_subscriptionId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/payments/subscriptions/YOUR_subscriptionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Transaction by ID
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-get-transaction-by-id
The "Get Transaction by ID" API allows to retrieve information for a specific transaction using its unique identifier. Use this endpoint to fetch details for a single transaction based on the provided
The "Get Transaction by ID" API allows to retrieve information for a specific transaction using its unique identifier. Use this endpoint to fetch details for a single transaction based on the provided transaction ID.
```http theme={null}
GET https://services.leadconnectorhq.com/payments/transactions/{transactionId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the transaction that needs to be returned
## Query parameters
LocationId is the id of the account.
AltId is the unique identifier e.g: account id.
AltType is the type of identifier.
## Respuestas
The unique identifier for the transaction.
AltType is the type of identifier.
AltId is the unique identifier eg: account id.
Contact id corresponding to the transaction.
Contact details of the transaction.
Currency in which transaction was made.
Transaction value.
Transaction status.
Transaction is in live / test mode.
The creation timestamp of the transaction.
The last update timestamp of the transaction.
Entity type of transaction (eg: order).
Entity id for the transaction. e.g: order id
Entity source details for the transaction.
Charge id for transaction.
Charge snapshot of transaction.
Invoice id for the transaction.
Subscription id for transaction.
Payment provider details of the transaction.
Ip address from where transaction was initiated.
Meta details of the transaction.
Is test transaction.
Is parent transaction.
Transaction amount refunded.
Receipt id for transaction.
Is transaction qbo synced.
Qbo details of the transaction.
Trace id of the transaction.
ID of the contact that was merged from.
User ID who created the transaction.
```json theme={null}
{
"_id": "61dd0feac077f72010f78804",
"altType": "account",
"altId": "3SwdhCu3svxI8AKsPJt6",
"contactId": "XPLSw2SVagl12LMDeTmQ",
"contactSnapshot": "{ last_name: \"Mcclain\", type: \"lead\", first_name_lower_case: \"rogan\", email: \"anish+11@leadwaycrm.com\", last_name_lower_case: \"mcclain\", location_id: \"o6241QsiRwUIJHyjuhos\", company_name: \"Jordan and Cox Trading\"}",
"currency": "USD",
"amount": "100",
"status": "succeeded",
"liveMode": "false",
"createdAt": "2023-11-20T10:23:36.515Z",
"updatedAt": "2024-01-23T09:57:04.846Z",
"entityType": "order",
"entityId": "61dd0fe9c077f73e67f78803",
"entitySource": "{ type: \"funnel\", id: \"BDBMEghdIUaqMPEsK349\", subType: \"two_step_order_form\", name: \"new funnel\" }",
"chargeId": "in_1KGcXDCScnf89tZohCsmImwE",
"chargeSnapshot": "{ id: \"in_1KGcXDCScnf89tZohCsmImwE\", object: \"invoice\", account_country: \"US\", account_name: \"GHL-Testing\" }",
"invoiceId": "in_1KGcXDCScnf89tZohCsmImwE",
"subscriptionId": "sub_1KGcXDCScnf89tZoVkoEMCEL",
"paymentProvider": "{ type: \"stripe\", connectedAccount: { _id: \"612ca676b484b241fef9d962\", accountId: \"acct_1Ihw53CScnf89tZo\" } }",
"ipAddress": "107.178.194.224",
"meta": "{ stepId: \"af7c731e-e36f-4152-bd1a-3f69a31d6d6d\", pageId: \"A8ltotc2jZxurJba4e3Y\", pageUrl: \"/v2/preview/A8ltotc2jZxurJba4e3Y\" }",
"markAsTest": "false",
"isParent": "false",
"amountRefunded": "10",
"receiptId": "6492fbea489bc07892c6defb",
"qboSynced": "false",
"qboResponse": "{ domain: \"QBO\", sparse: false, Id: \"180\", SyncToken: \"0\", TotalAmt: 25 }",
"traceId": "d3b16a92-a8ed-4e6b-8467-844750f78ed5",
"mergedFromContactId": "XPLSw2SVagl12LMDeTmQ",
"createdBy": "user123"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/payments/transactions/YOUR_transactionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/transactions/YOUR_transactionId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/payments/transactions/YOUR_transactionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Coupons
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-list-coupons
The "List Coupons" API allows you to retrieve a list of all coupons available in your account. Use this endpoint to view all promotional offers and special discounts for your customers.
The "List Coupons" API allows you to retrieve a list of all coupons available in your account. Use this endpoint to view all promotional offers and special discounts for your customers.
```http theme={null}
GET https://services.leadconnectorhq.com/payments/coupon/list
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
Alt Type
Maximum number of coupons to return
Number of coupons to skip for pagination
Filter coupons by status
Search term to filter coupons by name or code
## Respuestas
Array of coupon objects
Unique MongoDB identifier for the coupon
Number of times the coupon has been used
Maximum number of times a customer can use this coupon (0 for unlimited)
Account Id
Type of entity
Display name of the coupon
Redemption code for the coupon
Type of discount (percentage or amount) Posibles valores: 'percentage', 'amount'
Value of the discount (percentage or fixed amount)
Current status of the coupon Posibles valores: 'scheduled', 'active', 'expired'
Date when the coupon becomes active
End date when the coupon expires
Indicates if the coupon applies to future recurring payments
Configuration for how the coupon applies to future payments
User ID associated with the coupon (if applicable)
Creation timestamp
Last update timestamp
Total number of coupons matching the query criteria
Unique identifier for tracing this API request
```json theme={null}
{
"data": [
{
"_id": "67f6c132d9485f9dacd5f123",
"usageCount": 12,
"limitPerCustomer": 5,
"altId": "79t07PzK8Tvf73d12312",
"altType": "account",
"name": "NEWT6",
"code": "NEWT6",
"discountType": "percentage",
"discountValue": 25,
"status": "scheduled",
"startDate": "2025-04-30T18:30:00.000Z",
"endDate": "2025-05-30T18:30:00.000Z",
"applyToFuturePayments": true,
"userId": "q0m15dTLGeiGOXG123123",
"createdAt": "2025-04-09T18:49:22.026Z",
"updatedAt": "2025-04-09T18:49:22.026Z"
}
],
"totalCount": 20,
"traceId": "c667b18d-8f5e-44cf-a914"
}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/payments/coupon/list' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/coupon/list', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/payments/coupon/list',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List White-label Integration Providers
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-list-integration-providers
The "List White-label Integration Providers" API allows to retrieve a paginated list of integration providers. Customize your results by filtering whitelabel integration providers(which are built dire
The "List White-label Integration Providers" API allows to retrieve a paginated list of integration providers. Customize your results by filtering whitelabel integration providers(which are built directly on top of Authorize.net or NMI) based on name or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve integration provider information.
```http theme={null}
GET https://services.leadconnectorhq.com/payments/integrations/provider/whitelabel
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
account Id / company Id based on altType
Alt Type
The maximum number of items to be included in a single page of results
The starting index of the page, indicating the position from which the results should be retrieved.
## Respuestas
list of integration provider.
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/payments/integrations/provider/whitelabel' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/integrations/provider/whitelabel', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/payments/integrations/provider/whitelabel',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List fulfillment
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-list-order-fulfillment
List all fulfillment history of an order
List all fulfillment history of an order
```http theme={null}
GET https://services.leadconnectorhq.com/payments/orders/{orderId}/fulfillments
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the order that needs to be returned
## Query parameters
Account Id or Agency Id
## Respuestas
Status of api action
An array of fulfilled items
Account Id or Agency Id
Posibles valores: 'account'
Fulfillment tracking information
Tracking number provided by the shipping carrier
Shipping carrier name
Tracking URL
The unique identifier for the fulfillment item.
Fulfilled items
The id of product price
Name
Product details
Price details
The no of quantity of the current fulfilled item
created at
updated at
```json theme={null}
{
"status": true,
"data": [
{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"trackings": [
{}
],
"_id": "655b33a82209e60b6adb87a5",
"items": [
{}
],
"createdAt": "2023-12-12T09:27:42.355Z",
"updatedAt": "2023-12-12T09:27:42.355Z"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/fulfillments' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/fulfillments', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/fulfillments',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Order Notes
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-list-order-notes
List all notes of an order
List all notes of an order
```http theme={null}
GET https://services.leadconnectorhq.com/payments/orders/{orderId}/notes
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the order that needs to be returned
## Query parameters
Account Id or Agency Id
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/notes' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/notes', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/notes',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Orders
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-list-orders
The "List Orders" API allows to retrieve a paginated list of orders. Customize your results by filtering orders based on name, alt type, order status, payment mode, date range, type of source, contact
The "List Orders" API allows to retrieve a paginated list of orders. Customize your results by filtering orders based on name, alt type, order status, payment mode, date range, type of source, contact, funnel products or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve order information.
```http theme={null}
GET https://services.leadconnectorhq.com/payments/orders
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
LocationId is the id of the account.
AltId is the unique identifier e.g: account id.
Order status.
Payment Status of the Order
Mode of payment.
Starting interval of orders.
Closing interval of orders.
The name of the order for searching.
Contact id for filtering of orders.
Funnel product ids separated by comma.
Source id
The maximum number of items to be included in a single page of results
The starting index of the page, indicating the position from which the results should be retrieved.
## Respuestas
An array of orders
The unique identifier for the order.
AltId is the unique identifier eg: account id.
AltType is the type of identifier.
Contact id corresponding to the order.
Contact name corresponding to the order.
Contact email corresponding to the order.
Currency in which order was created.
Order value.
Order sub-total value.
Discount value on order.
The status of the order (e.g., completed).
Order is in live / test mode.
Total products in an order.
Source type of order (eg: funnel).
Source name for the order.
Source id for the order.
Meta content for the source of order.
Coupon code for the order.
The creation timestamp of the order.
The last update timestamp of the order.
Source sub-type for the order.
Fulfillment status of the order.
Total one time products in an order.
Total recurring time products in an order.
User ID who created the order.
total orders count
```json theme={null}
{
"data": [
{
"_id": "653f5e0cde5a1314e62a837c",
"altId": "3SwdhCu3svxI8AKsPJt6",
"altType": "account",
"contactId": "XPLSw2SVagl12LMDeTmQ",
"contactName": "James Bond",
"contactEmail": "james.bond@leadwaycrm.com",
"currency": "USD",
"amount": "100",
"subtotal": "100",
"discount": "10",
"status": "completed",
"liveMode": "false",
"totalProducts": "5",
"sourceType": "funnel",
"sourceName": "onestep",
"sourceId": "kDj7BHej9Zyyq3QakJmz",
"sourceMeta": "{ domain: \"app.leadwaycrm.com\", pageId: \"rBVhyYhMsbxbO8ZqOcei\", pageUrl: \"/v2/preview/rBVhyYhMsbxbO8ZqOcei\", stepId: \"5a772f62-3fbc-418b-af1b-be8929dd64c2\"}",
"couponCode": "100PER",
"createdAt": "2023-11-20T10:23:36.515Z",
"updatedAt": "2024-01-23T09:57:04.846Z",
"sourceSubType": "one_step_order_form",
"fulfillmentStatus": "unfulfilled",
"onetimeProducts": "1",
"recurringProducts": "1",
"createdBy": "user123"
}
],
"totalCount": 0
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/payments/orders' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/orders', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/payments/orders',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Subscriptions
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-list-subscriptions
The "List Subscriptions" API allows to retrieve a paginated list of subscriptions. Customize your results by filtering subscriptions based on name, alt type, subscription status, payment mode, date ra
The "List Subscriptions" API allows to retrieve a paginated list of subscriptions. Customize your results by filtering subscriptions based on name, alt type, subscription status, payment mode, date range, type of source, contact, subscription id, entity id, contact or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve subscription information.
```http theme={null}
GET https://services.leadconnectorhq.com/payments/subscriptions
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
AltId is the unique identifier e.g: account id.
AltType is the type of identifier.
Entity id for filtering of subscriptions.
Mode of payment.
Starting interval of subscriptions.
Closing interval of subscriptions.
Source of the subscriptions.
The name of the subscription for searching.
Contact ID for the subscription
Subscription id for filtering of subscriptions.
The maximum number of items to be included in a single page of results
The starting index of the page, indicating the position from which the results should be retrieved.
Get the total payments collected for the subscription.
## Respuestas
An array of subscriptions
The unique identifier for the subscription.
AltId is the unique identifier eg: account id.
AltType is the type of identifier. Posibles valores: 'account'
Contact id corresponding to the subscription.
Contact name corresponding to the subscription.
Contact email corresponding to the subscription.
Currency in which subscription occurred.
Subscription value.
The status of the subscription (e.g., succeeded).
Subscription is in live / test mode.
Entity type of subscription (eg: order).
Entity id for the subscription. e.g: order id
Entity source type of subscription (eg: funnel).
Entity source name for the subscription.
Entity source id for the subscription.
Meta content for the entity source of subscription.
Subscription id for subscription.
Snapshot of subscription.
Payment provider for subscription.
Payment provider connected account id for subscription.
Ip address from where subscription was initiated.
The creation timestamp of the subscription.
The update timestamp of the subscription.
User ID who created the subscription.
total subscriptions count
```json theme={null}
{
"data": [
{
"_id": "64bf78af39118e4011926cba",
"altId": "3SwdhCu3svxI8AKsPJt6",
"altType": "account",
"contactId": "XPLSw2SVagl12LMDeTmQ",
"contactName": "James Bond",
"contactEmail": "james.bond@leadwaycrm.com",
"currency": "USD",
"amount": "100",
"status": "active",
"liveMode": "false",
"entityType": "order",
"entityId": "62f4db0f3059ecee61379012",
"entitySourceType": "funnel",
"entitySourceName": "Attribution Funnel",
"entitySourceId": "bevrkPbLaDNXFaqfLKMm",
"entitySourceMeta": "{ domain: \"app.leadwaycrm.com\", pageId: \"sxC4lNhFIavEnLZh5KhC\", pageUrl: \"/v2/preview/sxC4lNhFIavEnLZh5KhC\", stepId: \"7d303d1f-cb85-403d-b548-bf01de5c7bb0\" }",
"subscriptionId": "I-0UE609H8E43P",
"subscriptionSnapshot": "{ status: \"ACTIVE\", status_update_time: \"2022-08-16T11:06:53Z\", id: \"I-0UE609H8E43P\", plan_id: \"P-82K11750F0313430KMLRGE6Y\", start_time: \"2022-08-16T11:05:31Z\", quantity: 1 }",
"paymentProviderType": "stripe",
"paymentProviderConnectedAccount": "ATn0CqrzrWS5ak185Bsb1xCpyzBDOZ8WdRxyFotppLYePTDhiuQ49H5QXO_L-4HKk1GBn7f9_QhbNK2s",
"ipAddress": "103.100.16.82",
"createdAt": "2023-11-20T10:23:36.515Z",
"updatedAt": "2023-11-20T10:23:36.515Z",
"createdBy": "user123"
}
],
"totalCount": 0
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/payments/subscriptions' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/subscriptions', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/payments/subscriptions',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Transactions
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-list-transactions
The "List Transactions" API allows to retrieve a paginated list of transactions. Customize your results by filtering transactions based on name, alt type, transaction status, payment mode, date range,
The "List Transactions" API allows to retrieve a paginated list of transactions. Customize your results by filtering transactions based on name, alt type, transaction status, payment mode, date range, type of source, contact, subscription id, entity id or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve transaction information.
```http theme={null}
GET https://services.leadconnectorhq.com/payments/transactions
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
LocationId is the id of the account.
AltId is the unique identifier e.g: account id.
AltType is the type of identifier.
Mode of payment.
Starting interval of transactions.
Closing interval of transactions.
Source of the transactions.
Source sub-type of the transactions.
The name of the transaction for searching.
Subscription id for filtering of transactions.
Entity id for filtering of transactions.
Contact id for filtering of transactions.
The maximum number of items to be included in a single page of results
The starting index of the page, indicating the position from which the results should be retrieved.
## Respuestas
An array of transactions
The unique identifier for the transaction.
AltId is the unique identifier eg: account id.
AltType is the type of identifier.
Contact id corresponding to the transaction.
ID of the contact that was merged from.
Contact name corresponding to the transaction.
Contact email corresponding to the transaction.
Currency in which transaction occurred.
Transaction value.
The status of the transaction (e.g., succeeded).
Transaction is in live / test mode.
Entity type of transaction (eg: order).
Entity id for the transaction. e.g: order id
Entity source type of transaction (eg: funnel).
Entity source sub-type of the transactions.
Entity source name for the transaction.
Entity source id for the transaction.
Meta content for the entity source of transaction.
Subscription id for transaction.
Charge id for transaction.
Charge snapshot of transaction.
Payment provider for transaction.
Payment provider account id for transaction.
Ip address from where transaction was initiated.
The creation timestamp of the transaction.
The update timestamp of the transaction.
Transaction amount refunded.
Transaction payment method details.
The charged timestamp of the transaction.
User ID who created the transaction.
total transactions count
```json theme={null}
{
"data": [
{
"_id": "61dd0feac077f72010f78804",
"altId": "3SwdhCu3svxI8AKsPJt6",
"altType": "account",
"contactId": "XPLSw2SVagl12LMDeTmQ",
"mergedFromContactId": "XPLSw2SVagl12LMDeTmQ",
"contactName": "James Bond",
"contactEmail": "james.bond@leadwaycrm.com",
"currency": "USD",
"amount": "100",
"status": "succeeded",
"liveMode": "false",
"entityType": "order",
"entityId": "61dd0fe9c077f73e67f78803",
"entitySourceType": "funnel",
"entitySourceSubType": "two_step_order_form",
"entitySourceName": "new funnel",
"entitySourceId": "BDBMEghdIUaqMPEsK349",
"entitySourceMeta": "{ domain: \"app.leadwaycrm.com\", pageId: \"rBVhyYhMsbxbO8ZqOcei\", pageUrl: \"/v2/preview/rBVhyYhMsbxbO8ZqOcei\", stepId: \"5a772f62-3fbc-418b-af1b-be8929dd64c2\"}",
"subscriptionId": "sub_1KGcXDCScnf89tZoVkoEMCEL",
"chargeId": "in_1KGcXDCScnf89tZohCsmImwE",
"chargeSnapshot": "{ id: \"in_1KGcXDCScnf89tZohCsmImwE\", object: \"invoice\", account_country: \"US\", account_name: \"GHL-Testing\" }",
"paymentProviderType": "stripe",
"paymentProviderConnectedAccount": "612ca676b484b241fef9d962",
"ipAddress": "107.178.194.224",
"createdAt": "2023-11-20T10:23:36.515Z",
"updatedAt": "2023-11-20T10:23:36.515Z",
"amountRefunded": "10",
"paymentMethod": "{ card: { \"brand\": \"discover\", \"last4\": \"0012\" } }",
"fulfilledAt": "2023-11-20T10:27:36.515Z",
"createdBy": "user123"
}
],
"totalCount": 0
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/payments/transactions' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/transactions', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/payments/transactions',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Record Order Payment
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-record-order-payment
The "Record Order Payment" API allows to record a payment for an order. Use this endpoint to record payment for an order and update the order status to "Paid".
The "Record Order Payment" API allows to record a payment for an order. Use this endpoint to record payment for an order and update the order status to "Paid".
```http theme={null}
POST https://services.leadconnectorhq.com/payments/orders/{orderId}/record-payment
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Order ID
## Body
account Id / company Id based on altType
Alt Type Posibles valores: 'account'
manual payment method Posibles valores: 'cash', 'card', 'cheque', 'bank\_transfer', 'other'
Details of Card if used for payment
Details of the Cheque if used for payment
Any note to be recorded with the transaction
Amount to be paid against the invoice.
Meta data to be recorded with the transaction
Indicates if the order is intended to be a partial payment.
## Respuestas
Success status of the request
```json theme={null}
{
"success": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/record-payment' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"mode": "card",
"notes": "This was a direct payment",
"amount": 100,
"meta": {},
"isPartialPayment": true
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/record-payment', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "mode": "card", "notes": "This was a direct payment", "amount": 100, "meta": {}, "isPartialPayment": true}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/payments/orders/YOUR_orderId/record-payment',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "mode": "card", "notes": "This was a direct payment", "amount": 100, "meta": {}, "isPartialPayment": true},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'mode': 'card', 'notes': 'This was a direct payment', 'amount': 100, 'meta': {}, 'isPartialPayment': true}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Coupon
Source: https://developers.leadwaycrm.com/api-reference/payments/payments-update-coupon
The "Update Coupon" API enables you to modify existing coupon details such as discount values, validity periods, usage limits, and other promotional parameters. Use this endpoint to adjust or extend p
The "Update Coupon" API enables you to modify existing coupon details such as discount values, validity periods, usage limits, and other promotional parameters. Use this endpoint to adjust or extend promotional offers for your customers.
```http theme={null}
PUT https://services.leadconnectorhq.com/payments/coupon
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id
Alt Type Posibles valores: 'account'
Coupon Name
Coupon Code
Discount Type Posibles valores: 'percentage', 'amount'
Discount Value
Start date in YYYY-MM-DDTHH:mm:ssZ format
End date in YYYY-MM-DDTHH:mm:ssZ format
Max number of times coupon can be used
Product Ids
Is Coupon applicable on upcoming subscription transactions
If coupon is applicable on upcoming subscription transactions, how many months should it be applicable for a subscription
Limits whether a coupon can be redeemed only once per customer.
Coupon Id
## Respuestas
Unique MongoDB identifier for the coupon
Number of times the coupon has been used
Maximum number of times a customer can use this coupon (0 for unlimited)
Account Id
Type of entity
Display name of the coupon
Redemption code for the coupon
Type of discount (percentage or amount) Posibles valores: 'percentage', 'amount'
Value of the discount (percentage or fixed amount)
Current status of the coupon Posibles valores: 'scheduled', 'active', 'expired'
Date when the coupon becomes active
End date when the coupon expires
Indicates if the coupon applies to future recurring payments
Configuration for how the coupon applies to future payments
User ID associated with the coupon (if applicable)
Creation timestamp
Last update timestamp
Unique identifier for tracing this API request
```json theme={null}
{
"_id": "67f6c132d9485f9dacd5f123",
"usageCount": 12,
"limitPerCustomer": 5,
"altId": "79t07PzK8Tvf73d12312",
"altType": "account",
"name": "NEWT6",
"code": "NEWT6",
"discountType": "percentage",
"discountValue": 25,
"status": "scheduled",
"startDate": "2025-04-30T18:30:00.000Z",
"endDate": "2025-05-30T18:30:00.000Z",
"applyToFuturePayments": true,
"userId": "q0m15dTLGeiGOXG123123",
"createdAt": "2025-04-09T18:49:22.026Z",
"updatedAt": "2025-04-09T18:49:22.026Z",
"traceId": "c667b18d-8f5e-44cf-a914"
}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/payments/coupon' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "BQdAwxa0ky1iK2sstLGJ",
"altType": "account",
"name": "New Year Sale",
"code": "LEVELUPDAY2022",
"discountType": "amount",
"discountValue": 10,
"startDate": "2023-01-01T22:45:00.000Z",
"endDate": "2023-01-31T22:45:00.000Z",
"usageLimit": 10,
"productIds": [
"6241712be68f7a98102ba272"
],
"applyToFuturePayments": true,
"applyToFuturePaymentsConfig": [
{
"type": "fixed",
"duration": 5,
"durationType": "months"
},
{
"type": "forever"
}
],
"limitPerCustomer": true,
"id": "6241712be68f7a98102ba272"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/payments/coupon', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "BQdAwxa0ky1iK2sstLGJ", "altType": "account", "name": "New Year Sale", "code": "LEVELUPDAY2022", "discountType": "amount", "discountValue": 10, "startDate": "2023-01-01T22:45:00.000Z", "endDate": "2023-01-31T22:45:00.000Z", "usageLimit": 10, "productIds": ["6241712be68f7a98102ba272"], "applyToFuturePayments": true, "applyToFuturePaymentsConfig": [{"type": "fixed", "duration": 5, "durationType": "months"}, {"type": "forever"}], "limitPerCustomer": true, "id": "6241712be68f7a98102ba272"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/payments/coupon',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "BQdAwxa0ky1iK2sstLGJ", "altType": "account", "name": "New Year Sale", "code": "LEVELUPDAY2022", "discountType": "amount", "discountValue": 10, "startDate": "2023-01-01T22:45:00.000Z", "endDate": "2023-01-31T22:45:00.000Z", "usageLimit": 10, "productIds": ["6241712be68f7a98102ba272"], "applyToFuturePayments": true, "applyToFuturePaymentsConfig": [{"type": "fixed", "duration": 5, "durationType": "months"}, {"type": "forever"}], "limitPerCustomer": true, "id": "6241712be68f7a98102ba272"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': 'BQdAwxa0ky1iK2sstLGJ', 'altType': 'account', 'name': 'New Year Sale', 'code': 'LEVELUPDAY2022', 'discountType': 'amount', 'discountValue': 10, 'startDate': '2023-01-01T22:45:00.000Z', 'endDate': '2023-01-31T22:45:00.000Z', 'usageLimit': 10, 'productIds': ['6241712be68f7a98102ba272'], 'applyToFuturePayments': true, 'applyToFuturePaymentsConfig': [{'type': 'fixed', 'duration': 5, 'durationType': 'months'}, {'type': 'forever'}], 'limitPerCustomer': true, 'id': '6241712be68f7a98102ba272'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# List active numbers
Source: https://developers.leadwaycrm.com/api-reference/phone-system/phone-system-active-numbers
Retrieve a paginated list of active phone numbers for a specific account. Supports filtering, pagination, and optional exclusion of number pool assignments.
Retrieve a paginated list of active phone numbers for a specific account. Supports filtering, pagination, and optional exclusion of number pool assignments.
```http theme={null}
GET https://services.leadconnectorhq.com/phone-system/numbers/location/{locationId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
The unique identifier of the account
## Query parameters
How many resources to return in each list page. The default is 50, and the maximum is 1000.
The page index for pagination. The default is 0.
Filter numbers by phone number pattern. Supports partial matching (e.g., "+91" to find all Indian numbers).
Whether to exclude numbers that are assigned to number pools. Default is true.
## Respuestas
Array of phone number objects with detailed configuration
E.164 formatted phone number
Human-readable name assigned to the number
Phone number SID (unique identifier)
ISO 3166-1 alpha-2 country code
Communication capabilities supported by this number
Whether the number supports voice calls
Whether the number supports SMS messaging
Whether the number supports MMS messaging
Whether the number supports fax transmission
Type of phone number (local, toll-free, mobile, etc.) Posibles valores: 'local', 'toll-free', 'mobile', 'national'
Whether this is the default outbound number for the account
User ID of the user assigned to this number
Array of user IDs that should ring when this number is called
Configuration for inbound call handling service
Type of inbound call service Posibles valores: 'voice\_ai', 'ivr', 'forward'
Service configuration value or ID
Phone number to forward calls to
Whether group conversations are enabled for this number (US/CA numbers with SMS/MMS only)
Address SID for compliance purposes
Bundle SID for regulatory compliance
When the number was originally purchased/added
When the number configuration was last updated
Source or origin of the phone number Posibles valores: 'twilio', 'hosted', 'ported'
Whether this account is manged by LeadconnectorHQ
Number of items requested per page
Current page index (0-based)
Current status of the account Posibles valores: 'active', 'suspended', 'closed'
```json theme={null}
{
"numbers": [
{
"phoneNumber": "+14155552671",
"friendlyName": "Sales Line 1",
"sid": "PN1234567890abcdef1234567890abcde",
"countryCode": "US",
"capabilities": {
"voice": true,
"sms": true,
"mms": true,
"fax": false
},
"type": "local",
"isDefaultNumber": true,
"linkedUser": "user_123456789",
"linkedRingAllUsers": [
"user_123",
"user_456"
],
"inboundCallService": {
"type": "voice_ai",
"value": "68e381b296a83800a27cd1"
},
"forwardingNumber": "+14155552672",
"isGroupConversationEnabled": true,
"addressSid": "AD1234567890abcdef1234567890abcde",
"bundleSid": "BU1234567890abcdef1234567890abcde",
"dateAdded": "2023-01-15T10:30:00Z",
"dateUpdated": "2023-02-20T14:45:00Z",
"origin": "twilio"
},
{
"phoneNumber": "+18005551234",
"friendlyName": "Support Toll-Free",
"sid": "PN9876543210fedcba9876543210fedcb",
"countryCode": "US",
"capabilities": {
"voice": true,
// truncado: 26 lineas mas
}
```
```json theme={null}
{
"message": "Invalid locationId format or pagination parameters",
"error": "Bad Request",
"statusCode": 400
}
```
```json theme={null}
{}
```
```json theme={null}
{
"message": "Phone system is not connected to this account",
"statusCode": 404
}
```
Account status when error occurs
```json theme={null}
{
"msg": "Internal server error",
"accountStatus": "suspended"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/phone-system/numbers/location/YOUR_locationId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/phone-system/numbers/location/YOUR_locationId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/phone-system/numbers/location/YOUR_locationId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List available phone numbers
Source: https://developers.leadwaycrm.com/api-reference/phone-system/phone-system-available-numbers
Search for available phone numbers to purchase for a specific account. Supports filtering by number pattern, type, and capabilities.
Search for available phone numbers to purchase for a specific account. Supports filtering by number pattern, type, and capabilities.
```http theme={null}
GET https://services.leadconnectorhq.com/phone-system/numbers/location/{locationId}/available
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
The unique identifier of the account
## Query parameters
ISO 3166-1 alpha-2 country code for which to search available numbers
Comma-separated list of phone number types to search for (e.g. local, tollFree, mobile)
Filter numbers that begin with this digit pattern
Filter numbers that end with this digit pattern
Filter numbers that contain this digit pattern anywhere
Filter for numbers with SMS capability
Filter for numbers with MMS capability
Filter for numbers with voice capability
## Respuestas
Unique fingerprint ID for this search result, required when purchasing one of the returned numbers
List of available phone numbers matching the search criteria
E.164 formatted phone number
Human-readable formatted phone number
ISO 3166-1 alpha-2 country code
Local Access and Transport Area code
City or locality of the number
Rate center of the number
Latitude coordinate of the number's account
Longitude coordinate of the number's account
State or region abbreviation
Postal code of the number
Address requirements for purchasing this number Posibles valores: 'none', 'any', 'local', 'foreign'
Whether this is a beta number
Communication capabilities supported by this number
Pricing information for this number
Type of number for billing purposes
Monthly price for this number
Currency unit for the price
```json theme={null}
{
"fingerprintId": "1773314252953",
"numbers": [
{
"phoneNumber": "+18705871861",
"friendlyName": "(870) 587-1861",
"lata": "528",
"locality": "Wynne",
"rateCenter": "WYNNE",
"latitude": "35.241800",
"longitude": "-90.846000",
"region": "AR",
"postalCode": "72396",
"isoCountry": "US",
"addressRequirements": "none",
"beta": false,
"capabilities": {
"MMS": true,
"SMS": true,
"voice": true
},
"price": {
"number_type": "local",
"price": 1.15,
"price_unit": "USD"
}
}
]
}
```
```json theme={null}
{
"message": "countryCode is required",
"error": "Bad Request",
"statusCode": 400
}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/phone-system/numbers/location/YOUR_locationId/available' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/phone-system/numbers/location/YOUR_locationId/available', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/phone-system/numbers/location/YOUR_locationId/available',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Number Pools
Source: https://developers.leadwaycrm.com/api-reference/phone-system/phone-system-getnumberpoollist
Get list of number pools
Get list of number pools
```http theme={null}
GET https://services.leadconnectorhq.com/phone-system/number-pools
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account ID to filter pools
## Respuestas
Indicates if the request was successful
Array of number pool objects
Unique identifier for the number pool
Human-readable name of the number pool
Account ID this pool belongs to
Phone numbers in this pool
E.164 formatted phone number
Human-readable name for the number
Number to forward calls to
Whether whisper is enabled
Message played during whisper
Whether call recording is enabled
Whether the number pool is active
Inbound call service configuration
Type of inbound call service
Service configuration value/ID
Total number of pools returned
```json theme={null}
{
"success": true,
"data": [
{
"id": "ve9EPM428h8vShlRW1KT",
"name": "Sales Team Pool",
"locationId": "loc123",
"numbers": [
{
"phoneNumber": "+14155552671",
"friendlyName": "Sales Line 1"
}
],
"forwardingNumber": "+14155552671",
"whisper": true,
"whisperMessage": "Incoming call from sales line",
"callRecording": true,
"isActive": true,
"inboundCallService": {
"type": "voice_ai",
"value": "68e381b296a83800a27cd1"
}
}
],
"total": 1
}
```
```json theme={null}
{
"message": "Invalid locationId format",
"error": "Bad Request",
"statusCode": 400
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/phone-system/number-pools' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/phone-system/number-pools', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/phone-system/number-pools',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Purchase a phone number
Source: https://developers.leadwaycrm.com/api-reference/phone-system/phone-system-purchase-phone-number
Purchase a phone number for a specific account.
Purchase a phone number for a specific account.
```http theme={null}
POST https://services.leadconnectorhq.com/phone-system/numbers/location/{locationId}/purchase
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
The unique identifier of the account
## Body
The phone number to purchase
ISO 3166-1 alpha-2 country code of the number
Type of phone number Posibles valores: 'local', 'tollFree', 'mobile'
Twilio address SID for compliance
Twilio bundle SID for regulatory compliance
Locality where the number is being purchased
Region where the number is being purchased
Unique request ID for idempotency (fingerprint of the purchase request)
Skip account-level KYC verification if agency-level compliance has already been verified
## Respuestas
Unique identifier of the Twilio account record
Twilio Account SID
Whether this account is under a GHL-managed Twilio account
Whether SMS validation is enabled
The account ID this Twilio account belongs to
Current migration status of the account
List of numbers being migrated
Map of phone numbers to assigned user IDs
Map of phone numbers to their service type (e.g. 'conversation')
Map of phone numbers to their friendly names
New account SID if the account has been migrated to new credentials
```json theme={null}
{
"id": "8xMPW85D2z5jgcTa5L1p",
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"under_ghl_account": true,
"validate_sms": true,
"location_id": "aa4PBpxnPc9bs4LSdiW7",
"migration_numbers": [],
"assigned_to_numbers": {},
"numbers": {
"+18705871861": "conversation"
},
"number_name": {
"+18705871861": "My Number"
},
"new_account_sid": ""
}
```
```json theme={null}
{
"message": "Phone number is no longer available",
"error": "Bad Request",
"statusCode": 400
}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/phone-system/numbers/location/YOUR_locationId/purchase' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"phoneNumber": "+18305551234",
"countryCode": "US",
"numberType": "local",
"addressSid": "AD1234567890abcdef1234567890abcde",
"bundleSid": "BU1234567890abcdef1234567890abcde",
"locality": "San Antonio",
"region": "TX",
"fingerprintId": "fp_abc123def456",
"skipLocationKYC": false
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/phone-system/numbers/location/YOUR_locationId/purchase', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"phoneNumber": "+18305551234", "countryCode": "US", "numberType": "local", "addressSid": "AD1234567890abcdef1234567890abcde", "bundleSid": "BU1234567890abcdef1234567890abcde", "locality": "San Antonio", "region": "TX", "fingerprintId": "fp_abc123def456", "skipLocationKYC": false}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/phone-system/numbers/location/YOUR_locationId/purchase',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"phoneNumber": "+18305551234", "countryCode": "US", "numberType": "local", "addressSid": "AD1234567890abcdef1234567890abcde", "bundleSid": "BU1234567890abcdef1234567890abcde", "locality": "San Antonio", "region": "TX", "fingerprintId": "fp_abc123def456", "skipLocationKYC": false},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'phoneNumber': '+18305551234', 'countryCode': 'US', 'numberType': 'local', 'addressSid': 'AD1234567890abcdef1234567890abcde', 'bundleSid': 'BU1234567890abcdef1234567890abcde', 'locality': 'San Antonio', 'region': 'TX', 'fingerprintId': 'fp_abc123def456', 'skipLocationKYC': false}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Product Reviews
Source: https://developers.leadwaycrm.com/api-reference/products/products-bulk-update-product-review
Update one or multiple product reviews: status, reply, etc.
Update one or multiple product reviews: status, reply, etc.
```http theme={null}
POST https://services.leadconnectorhq.com/products/reviews/bulk-update
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id or Agency Id
Posibles valores: 'account'
Array of Product Reviews
Review Id
Product Id
Store Id
Status of the review
## Respuestas
Status of api action
Success message
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/products/reviews/bulk-update' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"reviews": [
{
"reviewId": "6578278e879ad2646715ba9c",
"productId": "6578278e879ad2646715ba9d",
"storeId": "a1b2c3d4e5f6g7h8i9j0k1l2"
}
],
"status": "approved"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/reviews/bulk-update', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "reviews": [{"reviewId": "6578278e879ad2646715ba9c", "productId": "6578278e879ad2646715ba9d", "storeId": "a1b2c3d4e5f6g7h8i9j0k1l2"}], "status": "approved"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/products/reviews/bulk-update',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "reviews": [{"reviewId": "6578278e879ad2646715ba9c", "productId": "6578278e879ad2646715ba9d", "storeId": "a1b2c3d4e5f6g7h8i9j0k1l2"}], "status": "approved"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'reviews': [{'reviewId': '6578278e879ad2646715ba9c', 'productId': '6578278e879ad2646715ba9d', 'storeId': 'a1b2c3d4e5f6g7h8i9j0k1l2'}], 'status': 'approved'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Bulk Edit Products and Prices
Source: https://developers.leadwaycrm.com/api-reference/products/products-bulkedit
API to bulk edit products and their associated prices (max 30 entities)
API to bulk edit products and their associated prices (max 30 entities)
```http theme={null}
POST https://services.leadconnectorhq.com/products/bulk-update/edit
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id or Agency Id
Posibles valores: 'account'
Array of products to update. Note: The total count includes all prices within each product.
Product ID
Product name
Product description
Product image
Product availability in store
Array of price variants for the product
Price ID
Price name
Price amount
Price currency
Compare at price
Available quantity
Track inventory
Allow out of stock purchases
SKU
Trial period in days
Total billing cycles
Setup fee
Shipping options
Recurring details
Collection IDs
Enable product label
Enable taxes
SEO metadata for the product
Product URL slug
Automatic tax category ID
Tax inclusive pricing
Product taxes
Product media
Product label
## Respuestas
Success message
Operation status
Number of products updated
```json theme={null}
{
"message": "Products updated successfully",
"status": true,
"updatedCount": 5
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/products/bulk-update/edit' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"products": [
{
"_id": "64a1b2c3d4e5f67890123456",
"name": "Premium Product",
"description": "A high-quality premium product with excellent features and durability",
"image": "https://example.com/product-image.jpg",
"availableInStore": true,
"prices": [
{}
],
"collectionIds": [
"64a1b2c3d4e5f67890123458",
"64a1b2c3d4e5f67890123459"
],
"isLabelEnabled": true,
"isTaxesEnabled": true,
"slug": "premium-product",
"automaticTaxCategoryId": "64a1b2c3d4e5f67890123460",
"taxInclusive": false,
"taxes": [
{}
],
"medias": [
{}
],
"label": {}
}
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/bulk-update/edit', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "products": [{"_id": "64a1b2c3d4e5f67890123456", "name": "Premium Product", "description": "A high-quality premium product with excellent features and durability", "image": "https://example.com/product-image.jpg", "availableInStore": true, "prices": [{}], "collectionIds": ["64a1b2c3d4e5f67890123458", "64a1b2c3d4e5f67890123459"], "isLabelEnabled": true, "isTaxesEnabled": true, "slug": "premium-product", "automaticTaxCategoryId": "64a1b2c3d4e5f67890123460", "taxInclusive": false, "taxes": [{}], "medias": [{}], "label": {}}]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/products/bulk-update/edit',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "products": [{"_id": "64a1b2c3d4e5f67890123456", "name": "Premium Product", "description": "A high-quality premium product with excellent features and durability", "image": "https://example.com/product-image.jpg", "availableInStore": true, "prices": [{}], "collectionIds": ["64a1b2c3d4e5f67890123458", "64a1b2c3d4e5f67890123459"], "isLabelEnabled": true, "isTaxesEnabled": true, "slug": "premium-product", "automaticTaxCategoryId": "64a1b2c3d4e5f67890123460", "taxInclusive": false, "taxes": [{}], "medias": [{}], "label": {}}]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'products': [{'_id': '64a1b2c3d4e5f67890123456', 'name': 'Premium Product', 'description': 'A high-quality premium product with excellent features and durability', 'image': 'https://example.com/product-image.jpg', 'availableInStore': true, 'prices': [{}], 'collectionIds': ['64a1b2c3d4e5f67890123458', '64a1b2c3d4e5f67890123459'], 'isLabelEnabled': true, 'isTaxesEnabled': true, 'slug': 'premium-product', 'automaticTaxCategoryId': '64a1b2c3d4e5f67890123460', 'taxInclusive': false, 'taxes': [{}], 'medias': [{}], 'label': {}}]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Bulk Update Products
Source: https://developers.leadwaycrm.com/api-reference/products/products-bulkupdate
API to bulk update products (price, availability, collections, delete)
API to bulk update products (price, availability, collections, delete)
```http theme={null}
POST https://services.leadconnectorhq.com/products/bulk-update
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id or Agency Id
Posibles valores: 'account'
Type of bulk update operation Posibles valores: 'bulk-update-price', 'bulk-update-availability', 'bulk-update-product-collection', 'bulk-delete-products', 'bulk-update-currency'
Array of product IDs
Filters to apply when selectAll is true
Price update configuration
Compare at price update configuration
New availability status
Array of collection IDs
Currency code
## Respuestas
Status of api action
Success message
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/products/bulk-update' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"type": "bulk-update-price",
"productIds": [
"5f8d0d55b54764421b7156c1"
],
"availability": true,
"collectionIds": [
"string"
],
"currency": "USD"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/bulk-update', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "type": "bulk-update-price", "productIds": ["5f8d0d55b54764421b7156c1"], "availability": true, "collectionIds": ["string"], "currency": "USD"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/products/bulk-update',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "type": "bulk-update-price", "productIds": ["5f8d0d55b54764421b7156c1"], "availability": true, "collectionIds": ["string"], "currency": "USD"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'type': 'bulk-update-price', 'productIds': ['5f8d0d55b54764421b7156c1'], 'availability': true, 'collectionIds': ['string'], 'currency': 'USD'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Price for a Product
Source: https://developers.leadwaycrm.com/api-reference/products/products-create-price-for-product
The "Create Price for a Product" API allows adding a new price associated with a specific product to the system. Use this endpoint to create a price with the specified details for a particular product
The "Create Price for a Product" API allows adding a new price associated with a specific product to the system. Use this endpoint to create a price with the specified details for a particular product. Ensure that the required information is provided in the request payload.
```http theme={null}
POST https://services.leadconnectorhq.com/products/{productId}/price
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the product that needs to be used
## Body
The name of the price.
The type of the price. Posibles valores: 'one\_time', 'recurring'
The currency of the price.
The amount of the price. ( min: 0 )
The recurring details of the price (if type is recurring).
A brief description of the price.
An array of membership offers associated with the price.
Membership offer label
Membership offer label
The unique identifier for the membership offer.
The trial period duration in days (if applicable).
The total number of billing cycles for the price. ( min: 1 )
The setup fee for the price.
An array of variant option IDs associated with the price.
The compare at price for the price.
The unique identifier of the account associated with the price.
The unique identifier of the user who created the price.
Additional metadata associated with the price.
Need to track inventory stock quantity
Available inventory stock quantity
Continue selling when out of stock
The unique identifier of the SKU associated with the price
Shipping options of the Price
Is the product a digital product
Digital delivery options
## Respuestas
The unique identifier for the price.
An array of membership offers associated with the price.
Membership offer label
Membership offer label
The unique identifier for the membership offer.
An array of variant option IDs associated with the price.
The unique identifier for the account.
The unique identifier for the associated product.
The unique identifier for the user.
The name of the price.
The type of the price (e.g., one\_time). Posibles valores: 'one\_time', 'recurring'
The currency code for the price.
The amount of the price.
The recurring details of the price (if type is recurring).
The creation timestamp of the price.
The last update timestamp of the price.
The compare-at price for comparison purposes.
Indicates whether inventory tracking is enabled.
Available inventory stock quantity
Continue selling when out of stock
```json theme={null}
{
"_id": "655b33aa2209e60b6adb87a7",
"membershipOffers": [
{
"label": "top_50",
"value": "50",
"_id": "655b33aa2209e60b6adb87a7"
}
],
"variantOptionIds": [
"h4z7u0im2q8",
"h3nst2ltsnn"
],
"locationId": "3SwdhCsvxI8Au3KsPJt6",
"product": "655b33a82209e60b6adb87a5",
"userId": "6YAtzfzpmHAdj0e8GkKp",
"name": "Red / S",
"type": "one_time",
"currency": "INR",
"amount": 199999,
"createdAt": "2023-11-20T10:23:38.645Z",
"updatedAt": "2024-01-23T09:57:04.852Z",
"compareAtPrice": 2000000,
"availableQuantity": 5,
"allowOutOfStockPurchases": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/products/YOUR_productId/price' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "Price Name",
"type": "one_time",
"currency": "USD",
"amount": 99.99,
"description": "string",
"membershipOffers": [
{
"label": "top_50",
"value": "50",
"_id": "655b33aa2209e60b6adb87a7"
}
],
"trialPeriod": 7,
"totalCycles": 12,
"setupFee": 10.99,
"variantOptionIds": [
"option_id_1",
"option_id_2"
],
"compareAtPrice": 19.99,
"locationId": "6578278e879ad2646715ba9c",
"userId": "6578278e879ad2646715ba9c",
"trackInventory": true,
"availableQuantity": 5,
"allowOutOfStockPurchases": true,
"sku": "sku_123",
"isDigitalProduct": true,
"digitalDelivery": [
"string"
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/YOUR_productId/price', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "Price Name", "type": "one_time", "currency": "USD", "amount": 99.99, "description": "string", "membershipOffers": [{"label": "top_50", "value": "50", "_id": "655b33aa2209e60b6adb87a7"}], "trialPeriod": 7, "totalCycles": 12, "setupFee": 10.99, "variantOptionIds": ["option_id_1", "option_id_2"], "compareAtPrice": 19.99, "locationId": "6578278e879ad2646715ba9c", "userId": "6578278e879ad2646715ba9c", "trackInventory": true, "availableQuantity": 5, "allowOutOfStockPurchases": true, "sku": "sku_123", "isDigitalProduct": true, "digitalDelivery": ["string"]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/products/YOUR_productId/price',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "Price Name", "type": "one_time", "currency": "USD", "amount": 99.99, "description": "string", "membershipOffers": [{"label": "top_50", "value": "50", "_id": "655b33aa2209e60b6adb87a7"}], "trialPeriod": 7, "totalCycles": 12, "setupFee": 10.99, "variantOptionIds": ["option_id_1", "option_id_2"], "compareAtPrice": 19.99, "locationId": "6578278e879ad2646715ba9c", "userId": "6578278e879ad2646715ba9c", "trackInventory": true, "availableQuantity": 5, "allowOutOfStockPurchases": true, "sku": "sku_123", "isDigitalProduct": true, "digitalDelivery": ["string"]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'Price Name', 'type': 'one_time', 'currency': 'USD', 'amount': 99.99, 'description': 'string', 'membershipOffers': [{'label': 'top_50', 'value': '50', '_id': '655b33aa2209e60b6adb87a7'}], 'trialPeriod': 7, 'totalCycles': 12, 'setupFee': 10.99, 'variantOptionIds': ['option_id_1', 'option_id_2'], 'compareAtPrice': 19.99, 'locationId': '6578278e879ad2646715ba9c', 'userId': '6578278e879ad2646715ba9c', 'trackInventory': true, 'availableQuantity': 5, 'allowOutOfStockPurchases': true, 'sku': 'sku_123', 'isDigitalProduct': true, 'digitalDelivery': ['string']}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Product
Source: https://developers.leadwaycrm.com/api-reference/products/products-create-product
The "Create Product" API allows adding a new product to the system. Use this endpoint to create a product with the specified details. Ensure that the required information is provided in the request pa
The "Create Product" API allows adding a new product to the system. Use this endpoint to create a product with the specified details. Ensure that the required information is provided in the request payload.
```http theme={null}
POST https://services.leadconnectorhq.com/products/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
The name of the product.
The unique identifier for the account.
A brief description of the product.
Posibles valores: 'DIGITAL', 'PHYSICAL', 'SERVICE', 'PHYSICAL/DIGITAL'
The URL for the product image.
The statement descriptor for the product.
Indicates whether the product is available in-store.
An array of medias for the product.
The unique identifier for the media.
The title of the media file.
The URL where the media file is stored.
The type of the media file (e.g., image, video will be supporting soon). Posibles valores: 'image', 'video'
Indicates whether the media is featured.
Mongo ObjectIds of the prices for which the media is assigned
An array of variants for the product.
A unique identifier for the variant.
The name of the variant.
An array of options for the variant.
The unique identifier for the option.
The name of the option.
An array of category Ids for the product
Are there any taxes attached to the product. If this is true, taxes array cannot be empty.
List of ids of Taxes attached to the Product. If taxes are passed, isTaxesEnabled should be true.
Tax category ID for Automatic taxes calculation.
Is the product label enabled. If this is true, label object cannot be empty.
Details for Product Label
The slug using which the product navigation will be handled
SEO data for the product that will be displayed in the preview
Whether the taxes should be included in the purchase price
## Respuestas
The unique identifier for the product.
product description
An array of variants for the product.
A unique identifier for the variant.
The name of the variant.
An array of options for the variant.
The unique identifier for the option.
The name of the option.
The unique identifier for the account.
The name of the product.
The type of the product (e.g., PHYSICAL).
Indicates whether the product is available in-store.
The creation timestamp of the product.
The last update timestamp of the product.
The statement descriptor for the product.
The URL for the product image.
An array of category Ids for the product
The field indicates whether taxes are enabled for the product or not.
An array of ids of Taxes attached to the Product. If the expand query includes tax, the taxes will be of type `ProductTaxDto`. Please refer to the `ProductTaxDto` for additional details.
Tax category ID for Automatic taxes calculation.
The Product label details
The slug of the product by which the product will be navigated
```json theme={null}
{
"_id": "655b33a82209e60b6adb87a5",
"description": "This is a really awesome product",
"variants": [
{
"id": "38s63qmxfr4",
"name": "Size",
"options": [
{}
]
}
],
"locationId": "3SwdhCsvxI8Au3KsPJt6",
"name": "Awesome Product",
"productType": "PHYSICAL",
"availableInStore": true,
"createdAt": "2023-11-20T10:23:36.515Z",
"updatedAt": "2024-01-23T09:57:04.846Z",
"statementDescriptor": "abcde",
"image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png",
"collectionIds": [
"65d71377c326ea78e1c47df5",
"65d71377c326ea78e1c47d34"
],
"isTaxesEnabled": true,
"taxes": [
"654492a4e6bef380114de15a"
],
"automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
"slug": "washing-machine"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/products/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "Awesome Product",
"locationId": "3SwdhCsvxI8Au3KsPJt6",
"description": "Product description goes here.",
"productType": "DIGITAL",
"image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png",
"statementDescriptor": "abcde",
"availableInStore": true,
"medias": [
{
"id": "fzrgusiuu0m",
"title": "1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png",
"url": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/sample.png",
"type": "image",
"isFeatured": true,
"priceIds": "6578278e879ad2646715ba9c"
}
],
"variants": [
{
"id": "38s63qmxfr4",
"name": "Size",
"options": [
{}
]
}
],
"collectionIds": [
"65d71377c326ea78e1c47df5",
"65d71377c326ea78e1c47d34"
],
"isTaxesEnabled": true,
"taxes": [
"654492a4e6bef380114de15a"
],
"automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
"isLabelEnabled": true,
"slug": "awesome-product",
"taxInclusive": true
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "Awesome Product", "locationId": "3SwdhCsvxI8Au3KsPJt6", "description": "Product description goes here.", "productType": "DIGITAL", "image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png", "statementDescriptor": "abcde", "availableInStore": true, "medias": [{"id": "fzrgusiuu0m", "title": "1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png", "url": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/sample.png", "type": "image", "isFeatured": true, "priceIds": "6578278e879ad2646715ba9c"}], "variants": [{"id": "38s63qmxfr4", "name": "Size", "options": [{}]}], "collectionIds": ["65d71377c326ea78e1c47df5", "65d71377c326ea78e1c47d34"], "isTaxesEnabled": true, "taxes": ["654492a4e6bef380114de15a"], "automaticTaxCategoryId": "65d71377c326ea78e1c47df5", "isLabelEnabled": true, "slug": "awesome-product", "taxInclusive": true}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/products/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "Awesome Product", "locationId": "3SwdhCsvxI8Au3KsPJt6", "description": "Product description goes here.", "productType": "DIGITAL", "image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png", "statementDescriptor": "abcde", "availableInStore": true, "medias": [{"id": "fzrgusiuu0m", "title": "1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png", "url": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/sample.png", "type": "image", "isFeatured": true, "priceIds": "6578278e879ad2646715ba9c"}], "variants": [{"id": "38s63qmxfr4", "name": "Size", "options": [{}]}], "collectionIds": ["65d71377c326ea78e1c47df5", "65d71377c326ea78e1c47d34"], "isTaxesEnabled": true, "taxes": ["654492a4e6bef380114de15a"], "automaticTaxCategoryId": "65d71377c326ea78e1c47df5", "isLabelEnabled": true, "slug": "awesome-product", "taxInclusive": true},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'Awesome Product', 'locationId': '3SwdhCsvxI8Au3KsPJt6', 'description': 'Product description goes here.', 'productType': 'DIGITAL', 'image': 'https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png', 'statementDescriptor': 'abcde', 'availableInStore': true, 'medias': [{'id': 'fzrgusiuu0m', 'title': '1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png', 'url': 'https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/sample.png', 'type': 'image', 'isFeatured': true, 'priceIds': '6578278e879ad2646715ba9c'}], 'variants': [{'id': '38s63qmxfr4', 'name': 'Size', 'options': [{}]}], 'collectionIds': ['65d71377c326ea78e1c47df5', '65d71377c326ea78e1c47d34'], 'isTaxesEnabled': true, 'taxes': ['654492a4e6bef380114de15a'], 'automaticTaxCategoryId': '65d71377c326ea78e1c47df5', 'isLabelEnabled': true, 'slug': 'awesome-product', 'taxInclusive': true}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Product Collection
Source: https://developers.leadwaycrm.com/api-reference/products/products-create-product-collection
Create a new Product Collection for a specific account
Create a new Product Collection for a specific account
```http theme={null}
POST https://services.leadconnectorhq.com/products/collections
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id
The type of alt. For now it is only LOCATION Posibles valores: 'account'
Unique Identifier of the Product Collection, Mongo Id
Name of the Product Collection
Slug of the Product Collection which helps in navigation
The URL of the image that is going to be displayed as the collection Thumbnail
The metadata information which will be displayed in SEO previews
## Respuestas
created Collection
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/products/collections' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "LOCATION",
"collectionId": "66057f9d28536eae584ec047",
"name": "Best Sellers",
"slug": "best-sellers",
"image": "http://example.com/watermark.png"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/collections', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "LOCATION", "collectionId": "66057f9d28536eae584ec047", "name": "Best Sellers", "slug": "best-sellers", "image": "http://example.com/watermark.png"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/products/collections',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "LOCATION", "collectionId": "66057f9d28536eae584ec047", "name": "Best Sellers", "slug": "best-sellers", "image": "http://example.com/watermark.png"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'LOCATION', 'collectionId': '66057f9d28536eae584ec047', 'name': 'Best Sellers', 'slug': 'best-sellers', 'image': 'http://example.com/watermark.png'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Price by ID for a Product
Source: https://developers.leadwaycrm.com/api-reference/products/products-delete-price-by-id-for-product
The "Delete Price by ID for a Product" API allows deleting a specific price associated with a particular product using its unique identifier. Use this endpoint to remove a price from the system.
The "Delete Price by ID for a Product" API allows deleting a specific price associated with a particular product using its unique identifier. Use this endpoint to remove a price from the system.
```http theme={null}
DELETE https://services.leadconnectorhq.com/products/{productId}/price/{priceId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the product that needs to be used
ID of the price that needs to be returned
## Query parameters
account Id
## Respuestas
returns true if the price is successfully deleted
```json theme={null}
{
"status": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/products/YOUR_productId/price/YOUR_priceId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/YOUR_productId/price/YOUR_priceId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/products/YOUR_productId/price/YOUR_priceId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Product by ID
Source: https://developers.leadwaycrm.com/api-reference/products/products-delete-product-by-id
The "Delete Product by ID" API allows deleting a specific product using its unique identifier. Use this endpoint to remove a product from the system.
The "Delete Product by ID" API allows deleting a specific product using its unique identifier. Use this endpoint to remove a product from the system.
```http theme={null}
DELETE https://services.leadconnectorhq.com/products/{productId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID or the slug of the product that needs to be returned
## Query parameters
account Id
Parameter which will decide whether to show the wishlisting status of products
## Respuestas
returns true if the product is successfully deleted
```json theme={null}
{
"status": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/products/YOUR_productId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/YOUR_productId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/products/YOUR_productId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Product Collection
Source: https://developers.leadwaycrm.com/api-reference/products/products-delete-product-collection
Delete specific product collection with Id :collectionId
Delete specific product collection with Id :collectionId
```http theme={null}
DELETE https://services.leadconnectorhq.com/products/collections/{collectionId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
MongoId of the collection
## Query parameters
Account Id
The type of alt. For now it is only LOCATION
## Respuestas
Status of api action
Success message
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/products/collections/YOUR_collectionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/collections/YOUR_collectionId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/products/collections/YOUR_collectionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Product Review
Source: https://developers.leadwaycrm.com/api-reference/products/products-delete-product-review
Delete specific product review
Delete specific product review
```http theme={null}
DELETE https://services.leadconnectorhq.com/products/reviews/{reviewId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Review Id
## Query parameters
Account Id or Agency Id
Product Id of the product
## Respuestas
Status of api action
Success message
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/products/reviews/YOUR_reviewId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/reviews/YOUR_reviewId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/products/reviews/YOUR_reviewId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Inventory
Source: https://developers.leadwaycrm.com/api-reference/products/products-get-list-inventory
The "List Inventory API allows the user to retrieve a paginated list of inventory items. Use this endpoint to fetch details for multiple items in the inventory based on the provided query parameters.
The "List Inventory API allows the user to retrieve a paginated list of inventory items. Use this endpoint to fetch details for multiple items in the inventory based on the provided query parameters.
```http theme={null}
GET https://services.leadconnectorhq.com/products/inventory
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
The maximum number of items to be included in a single page of results
The starting index of the page, indicating the position from which the results should be retrieved.
Account Id or Agency Id
Search string for Variant Search
## Respuestas
List of inventory items
The unique identifier for the price
Name of the price/variant
Available quantity in inventory
SKU for the product variant
Whether out of stock purchases are allowed
Product ID this price belongs to
Last update timestamp
Product image URL
Product name
Total count of inventory items
```json theme={null}
{
"inventory": [
{
"_id": "6241712be68f7a98102ba272",
"name": "Medium T-shirt",
"availableQuantity": 50,
"sku": "TSHIRT-MED-001",
"allowOutOfStockPurchases": false,
"product": "6241712be68f7a98102ba270",
"updatedAt": "2023-12-12T09:27:42.355Z",
"image": "https://example.com/images/product.jpg",
"productName": "T-shirt"
}
],
"total": {
"total": 100
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/products/inventory' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/inventory', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/products/inventory',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Price by ID for a Product
Source: https://developers.leadwaycrm.com/api-reference/products/products-get-price-by-id-for-product
The "Get Price by ID for a Product" API allows retrieving information for a specific price associated with a particular product using its unique identifier. Use this endpoint to fetch details for a si
The "Get Price by ID for a Product" API allows retrieving information for a specific price associated with a particular product using its unique identifier. Use this endpoint to fetch details for a single price based on the provided price ID and product ID.
```http theme={null}
GET https://services.leadconnectorhq.com/products/{productId}/price/{priceId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the product that needs to be used
ID of the price that needs to be returned
## Query parameters
account Id
## Respuestas
The unique identifier for the price.
An array of membership offers associated with the price.
Membership offer label
Membership offer label
The unique identifier for the membership offer.
An array of variant option IDs associated with the price.
The unique identifier for the account.
The unique identifier for the associated product.
The unique identifier for the user.
The name of the price.
The type of the price (e.g., one\_time). Posibles valores: 'one\_time', 'recurring'
The currency code for the price.
The amount of the price.
The recurring details of the price (if type is recurring).
The creation timestamp of the price.
The last update timestamp of the price.
The compare-at price for comparison purposes.
Indicates whether inventory tracking is enabled.
Available inventory stock quantity
Continue selling when out of stock
```json theme={null}
{
"_id": "655b33aa2209e60b6adb87a7",
"membershipOffers": [
{
"label": "top_50",
"value": "50",
"_id": "655b33aa2209e60b6adb87a7"
}
],
"variantOptionIds": [
"h4z7u0im2q8",
"h3nst2ltsnn"
],
"locationId": "3SwdhCsvxI8Au3KsPJt6",
"product": "655b33a82209e60b6adb87a5",
"userId": "6YAtzfzpmHAdj0e8GkKp",
"name": "Red / S",
"type": "one_time",
"currency": "INR",
"amount": 199999,
"createdAt": "2023-11-20T10:23:38.645Z",
"updatedAt": "2024-01-23T09:57:04.852Z",
"compareAtPrice": 2000000,
"availableQuantity": 5,
"allowOutOfStockPurchases": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/products/YOUR_productId/price/YOUR_priceId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/YOUR_productId/price/YOUR_priceId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/products/YOUR_productId/price/YOUR_priceId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Product by ID
Source: https://developers.leadwaycrm.com/api-reference/products/products-get-product-by-id
The "Get Product by ID" API allows to retrieve information for a specific product using its unique identifier. Use this endpoint to fetch details for a single product based on the provided product ID.
The "Get Product by ID" API allows to retrieve information for a specific product using its unique identifier. Use this endpoint to fetch details for a single product based on the provided product ID.
```http theme={null}
GET https://services.leadconnectorhq.com/products/{productId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID or the slug of the product that needs to be returned
## Query parameters
account Id
Parameter which will decide whether to show the wishlisting status of products
## Respuestas
The unique identifier for the product.
product description
An array of variants for the product.
A unique identifier for the variant.
The name of the variant.
An array of options for the variant.
The unique identifier for the option.
The name of the option.
The unique identifier for the account.
The name of the product.
The type of the product (e.g., PHYSICAL).
Indicates whether the product is available in-store.
The creation timestamp of the product.
The last update timestamp of the product.
The statement descriptor for the product.
The URL for the product image.
An array of category Ids for the product
The field indicates whether taxes are enabled for the product or not.
An array of ids of Taxes attached to the Product. If the expand query includes tax, the taxes will be of type `ProductTaxDto`. Please refer to the `ProductTaxDto` for additional details.
Tax category ID for Automatic taxes calculation.
The Product label details
The slug of the product by which the product will be navigated
```json theme={null}
{
"_id": "655b33a82209e60b6adb87a5",
"description": "This is a really awesome product",
"variants": [
{
"id": "38s63qmxfr4",
"name": "Size",
"options": [
{}
]
}
],
"locationId": "3SwdhCsvxI8Au3KsPJt6",
"name": "Awesome Product",
"productType": "PHYSICAL",
"availableInStore": true,
"createdAt": "2023-11-20T10:23:36.515Z",
"updatedAt": "2024-01-23T09:57:04.846Z",
"statementDescriptor": "abcde",
"image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png",
"collectionIds": [
"65d71377c326ea78e1c47df5",
"65d71377c326ea78e1c47d34"
],
"isTaxesEnabled": true,
"taxes": [
"654492a4e6bef380114de15a"
],
"automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
"slug": "washing-machine"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/products/YOUR_productId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/YOUR_productId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/products/YOUR_productId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Fetch Product Collections
Source: https://developers.leadwaycrm.com/api-reference/products/products-get-product-collection
Internal API to fetch the Product Collections
Internal API to fetch the Product Collections
```http theme={null}
GET https://services.leadconnectorhq.com/products/collections
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
The maximum number of items to be included in a single page of results
The starting index of the page, indicating the position from which the results should be retrieved.
Account Id
The type of alt. For now it is only LOCATION
Ids of the collections separated by comma(,) for search purposes
Query to search collection based on names
## Respuestas
Array of Collections
The total count of the collections present, which is useful to calculate the pagination
```json theme={null}
{
"data": [
[]
],
"total": 0
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/products/collections' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/collections', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/products/collections',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Details about individual product collection
Source: https://developers.leadwaycrm.com/api-reference/products/products-get-product-collection-id
Get Details about individual product collection
Get Details about individual product collection
```http theme={null}
GET https://services.leadconnectorhq.com/products/collections/{collectionId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Collection Id
## Query parameters
Account Id
## Respuestas
Collection Data
Status of the operation
```json theme={null}
{
"status": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/products/collections/YOUR_collectionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/collections/YOUR_collectionId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/products/collections/YOUR_collectionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Fetch Product Reviews
Source: https://developers.leadwaycrm.com/api-reference/products/products-get-product-reviews
API to fetch the Product Reviews
API to fetch the Product Reviews
```http theme={null}
GET https://services.leadconnectorhq.com/products/reviews
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id or Agency Id
The maximum number of items to be included in a single page of results
The starting index of the page, indicating the position from which the results should be retrieved.
The field upon which the sort should be applied
The order of sort which should be applied for the sortField
Key to filter the ratings
The start date for filtering reviews
The end date for filtering reviews
Comma-separated list of product IDs
Comma-separated list of store IDs
## Respuestas
Array of Collections
The total count of the collections present, which is useful to calculate the pagination
```json theme={null}
{
"data": [
[]
],
"total": 0
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/products/reviews' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/reviews', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/products/reviews',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Fetch Product Store Stats
Source: https://developers.leadwaycrm.com/api-reference/products/products-get-product-store-stats
API to fetch the total number of products, included in the store, and excluded from the store and other stats
API to fetch the total number of products, included in the store, and excluded from the store and other stats
```http theme={null}
GET https://services.leadconnectorhq.com/products/store/{storeId}/stats
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Products related to the store
## Query parameters
Account Id or Agency Id
The name of the product for searching.
Filter by product collection Ids. Supports comma separated values
## Respuestas
Total number of products
Number of products included in the store
Number of products excluded from the store
```json theme={null}
{
"totalProducts": 100,
"includedInStore": 80,
"excludedFromStore": 20
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/products/store/YOUR_storeId/stats' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/store/YOUR_storeId/stats', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/products/store/YOUR_storeId/stats',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Fetch Review Count as per status
Source: https://developers.leadwaycrm.com/api-reference/products/products-get-reviews-count
API to fetch the Review Count as per status
API to fetch the Review Count as per status
```http theme={null}
GET https://services.leadconnectorhq.com/products/reviews/count
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id or Agency Id
Key to filter the ratings
The start date for filtering reviews
The end date for filtering reviews
Comma-separated list of product IDs
Comma-separated list of store IDs
## Respuestas
Array of review status counts
```json theme={null}
{
"data": [
[]
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/products/reviews/count' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/reviews/count', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/products/reviews/count',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Products
Source: https://developers.leadwaycrm.com/api-reference/products/products-list-invoices
The "List Products" API allows to retrieve a paginated list of products. Customize your results by filtering products based on name or paginate through the list using the provided query parameters. Th
The "List Products" API allows to retrieve a paginated list of products. Customize your results by filtering products based on name or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve product information.
```http theme={null}
GET https://services.leadconnectorhq.com/products/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
The maximum number of items to be included in a single page of results
The starting index of the page, indicating the position from which the results should be retrieved.
LocationId is the id of the account
The name of the product for searching.
Filter by product category Ids. Supports comma separated values
The slug value of the collection by which the collection would be searched
Name of an entity whose data has to be fetched along with product. Possible entities are tax, stripe and paypal. If not mentioned, only ID will be returned in case of taxes
List of product ids to be fetched.
fetch and project products based on the storeId
Separate products by which are included in the store and which are not
If the product is included in the online store
The order of sort which should be applied for the date
## Respuestas
An array of products
The unique identifier for the product.
product description
An array of variants for the product.
A unique identifier for the variant.
The name of the variant.
An array of options for the variant.
The unique identifier for the option.
The name of the option.
The unique identifier for the account.
The name of the product.
The type of the product (e.g., PHYSICAL).
Indicates whether the product is available in-store.
The creation timestamp of the product.
The last update timestamp of the product.
The statement descriptor for the product.
The URL for the product image.
An array of category Ids for the product
The field indicates whether taxes are enabled for the product or not.
An array of ids of Taxes attached to the Product. If the expand query includes tax, the taxes will be of type `ProductTaxDto`. Please refer to the `ProductTaxDto` for additional details.
Tax category ID for Automatic taxes calculation.
The Product label details
The slug of the product by which the product will be navigated
list products status
Total number of products
```json theme={null}
{
"products": [
{
"_id": "655b33a82209e60b6adb87a5",
"description": "This is a really awesome product",
"variants": [
{}
],
"locationId": "3SwdhCsvxI8Au3KsPJt6",
"name": "Awesome Product",
"productType": "PHYSICAL",
"availableInStore": true,
"createdAt": "2023-11-20T10:23:36.515Z",
"updatedAt": "2024-01-23T09:57:04.846Z",
"statementDescriptor": "abcde",
"image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png",
"collectionIds": [
"65d71377c326ea78e1c47df5",
"65d71377c326ea78e1c47d34"
],
"isTaxesEnabled": true,
"taxes": [
"654492a4e6bef380114de15a"
],
"automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
"slug": "washing-machine"
}
],
"total": [
{
"total": 20
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/products/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/products/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Prices for a Product
Source: https://developers.leadwaycrm.com/api-reference/products/products-list-prices-for-product
The "List Prices for a Product" API allows retrieving a paginated list of prices associated with a specific product. Customize your results by filtering prices or paginate through the list using the p
The "List Prices for a Product" API allows retrieving a paginated list of prices associated with a specific product. Customize your results by filtering prices or paginate through the list using the provided query parameters.
```http theme={null}
GET https://services.leadconnectorhq.com/products/{productId}/price
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the product that needs to be used
## Query parameters
The maximum number of items to be included in a single page of results
The starting index of the page, indicating the position from which the results should be retrieved.
The unique identifier for the account.
To filter the response only with the given price ids, Please provide with comma separated
## Respuestas
An array of prices
The unique identifier for the price.
An array of membership offers associated with the price.
Membership offer label
Membership offer label
The unique identifier for the membership offer.
An array of variant option IDs associated with the price.
The unique identifier for the account.
The unique identifier for the associated product.
The unique identifier for the user.
The name of the price.
The type of the price (e.g., one\_time). Posibles valores: 'one\_time', 'recurring'
The currency code for the price.
The amount of the price.
The recurring details of the price (if type is recurring).
The creation timestamp of the price.
The last update timestamp of the price.
The compare-at price for comparison purposes.
Indicates whether inventory tracking is enabled.
Available inventory stock quantity
Continue selling when out of stock
```json theme={null}
{
"prices": [
{
"_id": "655b33aa2209e60b6adb87a7",
"membershipOffers": [
{}
],
"variantOptionIds": [
"h4z7u0im2q8",
"h3nst2ltsnn"
],
"locationId": "3SwdhCsvxI8Au3KsPJt6",
"product": "655b33a82209e60b6adb87a5",
"userId": "6YAtzfzpmHAdj0e8GkKp",
"name": "Red / S",
"type": "one_time",
"currency": "INR",
"amount": 199999,
"createdAt": "2023-11-20T10:23:38.645Z",
"updatedAt": "2024-01-23T09:57:04.852Z",
"compareAtPrice": 2000000,
"availableQuantity": 5,
"allowOutOfStockPurchases": true
}
],
"total": 10
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/products/YOUR_productId/price' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/YOUR_productId/price', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/products/YOUR_productId/price',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update product display priorities in store
Source: https://developers.leadwaycrm.com/api-reference/products/products-update-display-priority
API to set the display priority of products in a store
API to set the display priority of products in a store
```http theme={null}
POST https://services.leadconnectorhq.com/products/store/{storeId}/priority
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Products related to the store
## Body
Account Id or Agency Id
Posibles valores: 'account'
Array of products with their display priorities
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/products/store/YOUR_storeId/priority' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"products": [
[]
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/store/YOUR_storeId/priority', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "products": [[]]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/products/store/YOUR_storeId/priority',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "products": [[]]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'products': [[]]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Inventory
Source: https://developers.leadwaycrm.com/api-reference/products/products-update-inventory
The Update Inventory API allows the user to bulk update the inventory for multiple items. Use this endpoint to update the available quantity and out-of-stock purchase settings for multiple items in th
The Update Inventory API allows the user to bulk update the inventory for multiple items. Use this endpoint to update the available quantity and out-of-stock purchase settings for multiple items in the inventory.
```http theme={null}
POST https://services.leadconnectorhq.com/products/inventory
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id or Agency Id
Posibles valores: 'account'
Array of items to update in the inventory.
The unique identifier for the price, in MongoDB ID format.
The available quantity of the item.
Whether to continue selling the item when out of stock.
## Respuestas
Status of api action
Success message
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/products/inventory' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"items": [
{
"priceId": "5e9f8f8f8f8f8f8f8f8f8f8",
"availableQuantity": 10,
"allowOutOfStockPurchases": false
}
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/inventory', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "items": [{"priceId": "5e9f8f8f8f8f8f8f8f8f8f8", "availableQuantity": 10, "allowOutOfStockPurchases": false}]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/products/inventory',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "items": [{"priceId": "5e9f8f8f8f8f8f8f8f8f8f8", "availableQuantity": 10, "allowOutOfStockPurchases": false}]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'items': [{'priceId': '5e9f8f8f8f8f8f8f8f8f8f8', 'availableQuantity': 10, 'allowOutOfStockPurchases': false}]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Price by ID for a Product
Source: https://developers.leadwaycrm.com/api-reference/products/products-update-price-by-id-for-product
The "Update Price by ID for a Product" API allows modifying information for a specific price associated with a particular product using its unique identifier. Use this endpoint to update details for a
The "Update Price by ID for a Product" API allows modifying information for a specific price associated with a particular product using its unique identifier. Use this endpoint to update details for a single price based on the provided price ID and product ID.
```http theme={null}
PUT https://services.leadconnectorhq.com/products/{productId}/price/{priceId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the product that needs to be used
ID of the price that needs to be returned
## Body
The name of the price.
The type of the price. Posibles valores: 'one\_time', 'recurring'
The currency of the price.
The amount of the price. ( min: 0 )
The recurring details of the price (if type is recurring).
A brief description of the price.
An array of membership offers associated with the price.
Membership offer label
Membership offer label
The unique identifier for the membership offer.
The trial period duration in days (if applicable).
The total number of billing cycles for the price. ( min: 1 )
The setup fee for the price.
An array of variant option IDs associated with the price.
The compare at price for the price.
The unique identifier of the account associated with the price.
The unique identifier of the user who created the price.
Additional metadata associated with the price.
Need to track inventory stock quantity
Available inventory stock quantity
Continue selling when out of stock
The unique identifier of the SKU associated with the price
Shipping options of the Price
Is the product a digital product
Digital delivery options
## Respuestas
The unique identifier for the price.
An array of membership offers associated with the price.
Membership offer label
Membership offer label
The unique identifier for the membership offer.
An array of variant option IDs associated with the price.
The unique identifier for the account.
The unique identifier for the associated product.
The unique identifier for the user.
The name of the price.
The type of the price (e.g., one\_time). Posibles valores: 'one\_time', 'recurring'
The currency code for the price.
The amount of the price.
The recurring details of the price (if type is recurring).
The creation timestamp of the price.
The last update timestamp of the price.
The compare-at price for comparison purposes.
Indicates whether inventory tracking is enabled.
Available inventory stock quantity
Continue selling when out of stock
```json theme={null}
{
"_id": "655b33aa2209e60b6adb87a7",
"membershipOffers": [
{
"label": "top_50",
"value": "50",
"_id": "655b33aa2209e60b6adb87a7"
}
],
"variantOptionIds": [
"h4z7u0im2q8",
"h3nst2ltsnn"
],
"locationId": "3SwdhCsvxI8Au3KsPJt6",
"product": "655b33a82209e60b6adb87a5",
"userId": "6YAtzfzpmHAdj0e8GkKp",
"name": "Red / S",
"type": "one_time",
"currency": "INR",
"amount": 199999,
"createdAt": "2023-11-20T10:23:38.645Z",
"updatedAt": "2024-01-23T09:57:04.852Z",
"compareAtPrice": 2000000,
"availableQuantity": 5,
"allowOutOfStockPurchases": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/products/YOUR_productId/price/YOUR_priceId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "Price Name",
"type": "one_time",
"currency": "USD",
"amount": 99.99,
"description": "string",
"membershipOffers": [
{
"label": "top_50",
"value": "50",
"_id": "655b33aa2209e60b6adb87a7"
}
],
"trialPeriod": 7,
"totalCycles": 12,
"setupFee": 10.99,
"variantOptionIds": [
"option_id_1",
"option_id_2"
],
"compareAtPrice": 19.99,
"locationId": "6578278e879ad2646715ba9c",
"userId": "6578278e879ad2646715ba9c",
"trackInventory": true,
"availableQuantity": 5,
"allowOutOfStockPurchases": true,
"sku": "sku_123",
"isDigitalProduct": true,
"digitalDelivery": [
"string"
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/YOUR_productId/price/YOUR_priceId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "Price Name", "type": "one_time", "currency": "USD", "amount": 99.99, "description": "string", "membershipOffers": [{"label": "top_50", "value": "50", "_id": "655b33aa2209e60b6adb87a7"}], "trialPeriod": 7, "totalCycles": 12, "setupFee": 10.99, "variantOptionIds": ["option_id_1", "option_id_2"], "compareAtPrice": 19.99, "locationId": "6578278e879ad2646715ba9c", "userId": "6578278e879ad2646715ba9c", "trackInventory": true, "availableQuantity": 5, "allowOutOfStockPurchases": true, "sku": "sku_123", "isDigitalProduct": true, "digitalDelivery": ["string"]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/products/YOUR_productId/price/YOUR_priceId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "Price Name", "type": "one_time", "currency": "USD", "amount": 99.99, "description": "string", "membershipOffers": [{"label": "top_50", "value": "50", "_id": "655b33aa2209e60b6adb87a7"}], "trialPeriod": 7, "totalCycles": 12, "setupFee": 10.99, "variantOptionIds": ["option_id_1", "option_id_2"], "compareAtPrice": 19.99, "locationId": "6578278e879ad2646715ba9c", "userId": "6578278e879ad2646715ba9c", "trackInventory": true, "availableQuantity": 5, "allowOutOfStockPurchases": true, "sku": "sku_123", "isDigitalProduct": true, "digitalDelivery": ["string"]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'Price Name', 'type': 'one_time', 'currency': 'USD', 'amount': 99.99, 'description': 'string', 'membershipOffers': [{'label': 'top_50', 'value': '50', '_id': '655b33aa2209e60b6adb87a7'}], 'trialPeriod': 7, 'totalCycles': 12, 'setupFee': 10.99, 'variantOptionIds': ['option_id_1', 'option_id_2'], 'compareAtPrice': 19.99, 'locationId': '6578278e879ad2646715ba9c', 'userId': '6578278e879ad2646715ba9c', 'trackInventory': true, 'availableQuantity': 5, 'allowOutOfStockPurchases': true, 'sku': 'sku_123', 'isDigitalProduct': true, 'digitalDelivery': ['string']}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Product by ID
Source: https://developers.leadwaycrm.com/api-reference/products/products-update-product-by-id
The "Update Product by ID" API allows modifying information for a specific product using its unique identifier. Use this endpoint to update details for a single product based on the provided product I
The "Update Product by ID" API allows modifying information for a specific product using its unique identifier. Use this endpoint to update details for a single product based on the provided product ID.
```http theme={null}
PUT https://services.leadconnectorhq.com/products/{productId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID or the slug of the product that needs to be returned
## Body
The name of the product.
The unique identifier for the account.
A brief description of the product.
Posibles valores: 'DIGITAL', 'PHYSICAL', 'SERVICE', 'PHYSICAL/DIGITAL'
The URL for the product image.
The statement descriptor for the product.
Indicates whether the product is available in-store.
An array of medias for the product.
The unique identifier for the media.
The title of the media file.
The URL where the media file is stored.
The type of the media file (e.g., image, video will be supporting soon). Posibles valores: 'image', 'video'
Indicates whether the media is featured.
Mongo ObjectIds of the prices for which the media is assigned
An array of variants for the product.
A unique identifier for the variant.
The name of the variant.
An array of options for the variant.
The unique identifier for the option.
The name of the option.
An array of category Ids for the product
Are there any taxes attached to the product. If this is true, taxes array cannot be empty.
List of ids of Taxes attached to the Product. If taxes are passed, isTaxesEnabled should be true.
Tax category ID for Automatic taxes calculation.
Is the product label enabled. If this is true, label object cannot be empty.
Details for Product Label
The slug using which the product navigation will be handled
SEO data for the product that will be displayed in the preview
Whether the taxes should be included in the purchase price
The prices of the product
## Respuestas
The unique identifier for the product.
product description
An array of variants for the product.
A unique identifier for the variant.
The name of the variant.
An array of options for the variant.
The unique identifier for the option.
The name of the option.
The unique identifier for the account.
The name of the product.
The type of the product (e.g., PHYSICAL).
Indicates whether the product is available in-store.
The creation timestamp of the product.
The last update timestamp of the product.
The statement descriptor for the product.
The URL for the product image.
An array of category Ids for the product
The field indicates whether taxes are enabled for the product or not.
An array of ids of Taxes attached to the Product. If the expand query includes tax, the taxes will be of type `ProductTaxDto`. Please refer to the `ProductTaxDto` for additional details.
Tax category ID for Automatic taxes calculation.
The Product label details
The slug of the product by which the product will be navigated
```json theme={null}
{
"_id": "655b33a82209e60b6adb87a5",
"description": "This is a really awesome product",
"variants": [
{
"id": "38s63qmxfr4",
"name": "Size",
"options": [
{}
]
}
],
"locationId": "3SwdhCsvxI8Au3KsPJt6",
"name": "Awesome Product",
"productType": "PHYSICAL",
"availableInStore": true,
"createdAt": "2023-11-20T10:23:36.515Z",
"updatedAt": "2024-01-23T09:57:04.846Z",
"statementDescriptor": "abcde",
"image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png",
"collectionIds": [
"65d71377c326ea78e1c47df5",
"65d71377c326ea78e1c47d34"
],
"isTaxesEnabled": true,
"taxes": [
"654492a4e6bef380114de15a"
],
"automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
"slug": "washing-machine"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/products/YOUR_productId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "Awesome Product",
"locationId": "3SwdhCsvxI8Au3KsPJt6",
"description": "Product description goes here.",
"productType": "DIGITAL",
"image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png",
"statementDescriptor": "abcde",
"availableInStore": true,
"medias": [
{
"id": "fzrgusiuu0m",
"title": "1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png",
"url": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/sample.png",
"type": "image",
"isFeatured": true,
"priceIds": "6578278e879ad2646715ba9c"
}
],
"variants": [
{
"id": "38s63qmxfr4",
"name": "Size",
"options": [
{}
]
}
],
"collectionIds": [
"65d71377c326ea78e1c47df5",
"65d71377c326ea78e1c47d34"
],
"isTaxesEnabled": true,
"taxes": [
"654492a4e6bef380114de15a"
],
"automaticTaxCategoryId": "65d71377c326ea78e1c47df5",
"isLabelEnabled": true,
"slug": "awesome-product",
"taxInclusive": true,
"prices": [
"string"
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/YOUR_productId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "Awesome Product", "locationId": "3SwdhCsvxI8Au3KsPJt6", "description": "Product description goes here.", "productType": "DIGITAL", "image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png", "statementDescriptor": "abcde", "availableInStore": true, "medias": [{"id": "fzrgusiuu0m", "title": "1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png", "url": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/sample.png", "type": "image", "isFeatured": true, "priceIds": "6578278e879ad2646715ba9c"}], "variants": [{"id": "38s63qmxfr4", "name": "Size", "options": [{}]}], "collectionIds": ["65d71377c326ea78e1c47df5", "65d71377c326ea78e1c47d34"], "isTaxesEnabled": true, "taxes": ["654492a4e6bef380114de15a"], "automaticTaxCategoryId": "65d71377c326ea78e1c47df5", "isLabelEnabled": true, "slug": "awesome-product", "taxInclusive": true, "prices": ["string"]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/products/YOUR_productId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "Awesome Product", "locationId": "3SwdhCsvxI8Au3KsPJt6", "description": "Product description goes here.", "productType": "DIGITAL", "image": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png", "statementDescriptor": "abcde", "availableInStore": true, "medias": [{"id": "fzrgusiuu0m", "title": "1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png", "url": "https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/sample.png", "type": "image", "isFeatured": true, "priceIds": "6578278e879ad2646715ba9c"}], "variants": [{"id": "38s63qmxfr4", "name": "Size", "options": [{}]}], "collectionIds": ["65d71377c326ea78e1c47df5", "65d71377c326ea78e1c47d34"], "isTaxesEnabled": true, "taxes": ["654492a4e6bef380114de15a"], "automaticTaxCategoryId": "65d71377c326ea78e1c47df5", "isLabelEnabled": true, "slug": "awesome-product", "taxInclusive": true, "prices": ["string"]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'Awesome Product', 'locationId': '3SwdhCsvxI8Au3KsPJt6', 'description': 'Product description goes here.', 'productType': 'DIGITAL', 'image': 'https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/65af8d5df88bdb4b1022ee90.png', 'statementDescriptor': 'abcde', 'availableInStore': true, 'medias': [{'id': 'fzrgusiuu0m', 'title': '1dd7dcd0-e71d-4cf7-a06b-6d47723d6a29.png', 'url': 'https://storage.googleapis.com/ghl-test/3SwdhCsvxI8Au3KsPJt6/media/sample.png', 'type': 'image', 'isFeatured': true, 'priceIds': '6578278e879ad2646715ba9c'}], 'variants': [{'id': '38s63qmxfr4', 'name': 'Size', 'options': [{}]}], 'collectionIds': ['65d71377c326ea78e1c47df5', '65d71377c326ea78e1c47d34'], 'isTaxesEnabled': true, 'taxes': ['654492a4e6bef380114de15a'], 'automaticTaxCategoryId': '65d71377c326ea78e1c47df5', 'isLabelEnabled': true, 'slug': 'awesome-product', 'taxInclusive': true, 'prices': ['string']}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Product Collection
Source: https://developers.leadwaycrm.com/api-reference/products/products-update-product-collection
Update a specific product collection with Id :collectionId
Update a specific product collection with Id :collectionId
```http theme={null}
PUT https://services.leadconnectorhq.com/products/collections/{collectionId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
MongoId of the collection
## Body
Account Id
The type of alt. For now it is only LOCATION Posibles valores: 'account'
Name of the Product Collection
Slug of the Product Collection which helps in navigation
The URL of the image that is going to be displayed as the collection Thumbnail
The metadata information which will be displayed in SEO previews
## Respuestas
Status of api action
Success message
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/products/collections/YOUR_collectionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "LOCATION",
"name": "Best Sellers",
"slug": "best-sellers",
"image": "http://example.com/watermark.png"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/collections/YOUR_collectionId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "LOCATION", "name": "Best Sellers", "slug": "best-sellers", "image": "http://example.com/watermark.png"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/products/collections/YOUR_collectionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "LOCATION", "name": "Best Sellers", "slug": "best-sellers", "image": "http://example.com/watermark.png"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'LOCATION', 'name': 'Best Sellers', 'slug': 'best-sellers', 'image': 'http://example.com/watermark.png'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Product Reviews
Source: https://developers.leadwaycrm.com/api-reference/products/products-update-product-review
Update status, reply, etc of a particular review
Update status, reply, etc of a particular review
```http theme={null}
PUT https://services.leadconnectorhq.com/products/reviews/{reviewId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Review Id
## Body
Account Id or Agency Id
Posibles valores: 'account'
Product Id
Status of the review
Reply of the review
Headline of the Review
Detailed Review of the product
User who is giving the review/reply
Rating of the product
Headline of the Review
Detailed Review of the product
## Respuestas
Status of api action
Success message
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/products/reviews/YOUR_reviewId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"productId": "6578278e879ad2646715ba9c",
"status": "approved",
"reply": [
{
"headline": "Amazing product with great quality",
"comment": "This product exceeded my expectations in terms of quality and performance. Highly recommended!"
}
],
"rating": "4.5",
"headline": "Amazing product with great quality",
"detail": "The product is for sure a must and recommended buy"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/reviews/YOUR_reviewId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "productId": "6578278e879ad2646715ba9c", "status": "approved", "reply": [{"headline": "Amazing product with great quality", "comment": "This product exceeded my expectations in terms of quality and performance. Highly recommended!"}], "rating": "4.5", "headline": "Amazing product with great quality", "detail": "The product is for sure a must and recommended buy"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/products/reviews/YOUR_reviewId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "productId": "6578278e879ad2646715ba9c", "status": "approved", "reply": [{"headline": "Amazing product with great quality", "comment": "This product exceeded my expectations in terms of quality and performance. Highly recommended!"}], "rating": "4.5", "headline": "Amazing product with great quality", "detail": "The product is for sure a must and recommended buy"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'productId': '6578278e879ad2646715ba9c', 'status': 'approved', 'reply': [{'headline': 'Amazing product with great quality', 'comment': 'This product exceeded my expectations in terms of quality and performance. Highly recommended!'}], 'rating': '4.5', 'headline': 'Amazing product with great quality', 'detail': 'The product is for sure a must and recommended buy'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Action to include/exclude the product in store
Source: https://developers.leadwaycrm.com/api-reference/products/products-update-store-status
API to update the status of products in a particular store
API to update the status of products in a particular store
```http theme={null}
POST https://services.leadconnectorhq.com/products/store/{storeId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Products related to the store
## Body
Account Id or Agency Id
Posibles valores: 'account'
Action to include or exclude the product from the store Posibles valores: 'include', 'exclude'
Array of product IDs
## Respuestas
Status of api action
Success message
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/products/store/YOUR_storeId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"action": "include",
"productIds": [
"productId1",
"productId2"
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/products/store/YOUR_storeId', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "action": "include", "productIds": ["productId1", "productId2"]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/products/store/YOUR_storeId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "action": "include", "productIds": ["productId1", "productId2"]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'action': 'include', 'productIds': ['productId1', 'productId2']}),
]);
$data = json_decode(curl_exec($ch), true);
```
# List documents
Source: https://developers.leadwaycrm.com/api-reference/proposals/proposals-list-documents-contracts
List documents for a account
List documents for a account
```http theme={null}
GET https://services.leadconnectorhq.com/proposals/document
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
Document status, pass as comma separated values
Payment status, pass as comma separated values
Limit to fetch number of records
Skip number of records
Search string
Date start from (ISO 8601), dateFrom & DateTo must be provided together
Date to (ISO 8601), dateFrom & DateTo must be provided together
## Respuestas
List of documents
Account Id
Document Id
Unique identifier
Name of the document
Type of the document
Whether the document is deleted
Whether the document is expired
Number of times document is moved to draft state
Fillable fields
Field Id
Is the field required
Has the field been completed
Recipient
Entity type Posibles valores: 'contacts', 'users'
Id
Element type Posibles valores: 'Page', 'Text', 'Image', 'Video', 'Table', 'ProductList', 'PageBreak', 'Signature', 'PaymentDetails', 'TextField', 'DateField', 'InitialsField', 'Checkbox', 'Row', 'Column'
Value of the field
Grand total object of the document
Locale of the account
Document status
Payment status
Recipients
Recipient Id
Recipient First Name
Recipient Last Name
Recipient Email
Recipient Phone Number
Recipient Phone
Recipient has completed the document
Recipient role Posibles valores: 'user', 'signer'
Recipient is primary
Recipient signing order
Recipient image url
Recipient ip
Recipient user agent
Recipient signed date
Recipient contact name
Recipient country
Recipient entity name
Recipient initials image url
Recipient last viewed date
Share link
Links for the document if its sent
Reference ID
Document ID
Recipient ID
Entity name that the recipient belongs to Posibles valores: 'contacts', 'users'
Recipient category (recipient, cc, or bcc) Posibles valores: 'recipient', 'cc', 'bcc'
Document revision number
Created by user ID
Whether the document is deleted
Date start from (ISO 8601)
Date to (ISO 8601)
Total records available
WhiteLabel url for document
WhiteLabel url for invoice
```json theme={null}
{
"documents": [
{
"locationId": "hTlkh7t8gujsahgg93",
"documentId": "hTlkh7t8gujsahgg93",
"_id": "67ac9a51106ee8311e911XXXX",
"name": "Document Name",
"type": "proposal",
"deleted": false,
"isExpired": false,
"documentRevision": 1,
"fillableFields": [
{}
],
"locale": "en-US",
"status": "draft",
"paymentStatus": "paid",
"recipients": [
{
"id": "u240JcS0E5qE0ziHnwMm",
"email": "jim@gmail.com",
"imageUrl": "",
"contactName": "Jim Anton",
"firstName": "Jim",
"lastName": "Anton",
"role": "signer",
"hasCompleted": true,
"signingOrder": 1,
"imgUrl": "base64 image url",
"ip": "123.123.123.123"
}
],
"links": [
{}
],
"updatedAt": "2025-02-03T18:30:00.000Z",
"createdAt": "2025-02-14T18:29:59.999Z"
}
],
// truncado: 4 lineas mas
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/proposals/document' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/proposals/document', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/proposals/document',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List templates
Source: https://developers.leadwaycrm.com/api-reference/proposals/proposals-list-documents-contracts-templates
List document contract templates for a account
List document contract templates for a account
```http theme={null}
GET https://services.leadconnectorhq.com/proposals/templates
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
Date start from (ISO 8601)
Date to (ISO 8601)
Comma-separated template types. Valid values: proposal, estimate, contentLibrary
Template Name
If the docForm is a DocForm
User Id, required when isPublicDocument is true
Limit
Skip
## Respuestas
Array of templates
Template ID
Whether the template is deleted
Template version
Template name
Account ID
Template type Posibles valores: 'proposal', 'estimate', 'contentLibrary'
User ID who last updated the template
Whether the template is a public document
Template creation date
Template last update date
Template ID (alias for \_id)
Document count (only present when isPublicDocument is true)
Document form URL (only present when isPublicDocument is true)
Total number of templates
Trace ID for request tracking
```json theme={null}
{
"data": [
{
"_id": "685d11c371c22e636e9c04b2",
"deleted": false,
"version": 2,
"name": "New Template",
"locationId": "5rORm9p7RtxWQPzBIbTG",
"type": "proposal",
"updatedBy": "K9PSPnWjfNoE8DCf5LJZ",
"isPublicDocument": true,
"createdAt": "2025-06-26T09:24:19.305Z",
"updatedAt": "2025-06-26T09:27:32.119Z",
"id": "685d11c371c22e636e9c04b2",
"documentCount": 0,
"docFormUrl": "https://staging.sendlink.co/documents/doc-form/685d11c371c22e636e9c04b2?locale=en_US"
}
],
"total": 2,
"traceId": "d5656876-86a5-46fb-84df-788f1da7937a"
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/proposals/templates' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/proposals/templates', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/proposals/templates',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Send document
Source: https://developers.leadwaycrm.com/api-reference/proposals/proposals-send-documents-contracts
Send document to a client
Send document to a client
```http theme={null}
POST https://services.leadconnectorhq.com/proposals/document/send
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id
Document Id
Document Name
Medium to be used for sending the document Posibles valores: 'link', 'email'
CC Recipient
Email
Contact ID
Contact Image URL
Contact Name
First Name
Last Name
Sent ByUser Id
## Respuestas
Success status
Links for all recipients
Reference ID
Document ID
Recipient ID
Entity name that the recipient belongs to Posibles valores: 'contacts', 'users'
Recipient category (recipient, cc, or bcc) Posibles valores: 'recipient', 'cc', 'bcc'
Document revision number
Created by user ID
Whether the document is deleted
```json theme={null}
{
"success": true,
"links": [
{
"referenceId": "550e8400-e29b-41d4-a716-446655440000",
"documentId": "c1e87a91-93b2-4b78-821f-85cf0e1f925b",
"recipientId": "u240JcS0E5qE0ziHnwMm",
"entityName": "contacts",
"recipientCategory": "recipient",
"documentRevision": 1,
"createdBy": "b6d8fa28-1112-4dc7-b9d2-f22b75a477ea",
"deleted": false
}
]
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/proposals/document/send' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "hTlkh7t8gujsahgg93",
"documentId": "hTlkh7t8gujsahgg93",
"documentName": "new Document",
"medium": "email",
"ccRecipients": [
{
"id": "u240JcS0E5qE0ziHnwMm",
"email": "jim@gmail.com",
"imageUrl": "",
"contactName": "Jim Anton",
"firstName": "Jim",
"lastName": "Anton"
}
],
"notificationSettings": {
"sender": {
"fromName": "",
"fromEmail": ""
},
"receive": {
"subject": "",
"templateId": ""
}
},
"sentBy": "1234567890"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/proposals/document/send', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "hTlkh7t8gujsahgg93", "documentId": "hTlkh7t8gujsahgg93", "documentName": "new Document", "medium": "email", "ccRecipients": [{"id": "u240JcS0E5qE0ziHnwMm", "email": "jim@gmail.com", "imageUrl": "", "contactName": "Jim Anton", "firstName": "Jim", "lastName": "Anton"}], "notificationSettings": {"sender": {"fromName": "", "fromEmail": ""}, "receive": {"subject": "", "templateId": ""}}, "sentBy": "1234567890"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/proposals/document/send',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "hTlkh7t8gujsahgg93", "documentId": "hTlkh7t8gujsahgg93", "documentName": "new Document", "medium": "email", "ccRecipients": [{"id": "u240JcS0E5qE0ziHnwMm", "email": "jim@gmail.com", "imageUrl": "", "contactName": "Jim Anton", "firstName": "Jim", "lastName": "Anton"}], "notificationSettings": {"sender": {"fromName": "", "fromEmail": ""}, "receive": {"subject": "", "templateId": ""}}, "sentBy": "1234567890"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'hTlkh7t8gujsahgg93', 'documentId': 'hTlkh7t8gujsahgg93', 'documentName': 'new Document', 'medium': 'email', 'ccRecipients': [{'id': 'u240JcS0E5qE0ziHnwMm', 'email': 'jim@gmail.com', 'imageUrl': '', 'contactName': 'Jim Anton', 'firstName': 'Jim', 'lastName': 'Anton'}], 'notificationSettings': {'sender': {'fromName': '', 'fromEmail': ''}, 'receive': {'subject': '', 'templateId': ''}}, 'sentBy': '1234567890'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Send template
Source: https://developers.leadwaycrm.com/api-reference/proposals/proposals-send-documents-contracts-template
Send template to a client
Send template to a client
```http theme={null}
POST https://services.leadconnectorhq.com/proposals/templates/send
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Template Id
User Id
Send Document
Account Id
Contact Id
Opportunity Id
## Respuestas
Success status
Links for all recipients
Reference ID
Document ID
Recipient ID
Entity name that the recipient belongs to Posibles valores: 'contacts', 'users'
Recipient category (recipient, cc, or bcc) Posibles valores: 'recipient', 'cc', 'bcc'
Document revision number
Created by user ID
Whether the document is deleted
```json theme={null}
{
"success": true,
"links": [
{
"referenceId": "550e8400-e29b-41d4-a716-446655440000",
"documentId": "c1e87a91-93b2-4b78-821f-85cf0e1f925b",
"recipientId": "u240JcS0E5qE0ziHnwMm",
"entityName": "contacts",
"recipientCategory": "recipient",
"documentRevision": 1,
"createdBy": "b6d8fa28-1112-4dc7-b9d2-f22b75a477ea",
"deleted": false
}
]
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/proposals/templates/send' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"templateId": "hTlkh7t8gujsahgg93",
"userId": "hTlkh7t8gujsahgg93",
"sendDocument": true,
"locationId": "hTlkh7t8gujsahgg93",
"contactId": "hTlkh7t8gujsahgg93",
"opportunityId": "hTlkh7t8gujsahgg93"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/proposals/templates/send', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"templateId": "hTlkh7t8gujsahgg93", "userId": "hTlkh7t8gujsahgg93", "sendDocument": true, "locationId": "hTlkh7t8gujsahgg93", "contactId": "hTlkh7t8gujsahgg93", "opportunityId": "hTlkh7t8gujsahgg93"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/proposals/templates/send',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"templateId": "hTlkh7t8gujsahgg93", "userId": "hTlkh7t8gujsahgg93", "sendDocument": true, "locationId": "hTlkh7t8gujsahgg93", "contactId": "hTlkh7t8gujsahgg93", "opportunityId": "hTlkh7t8gujsahgg93"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'templateId': 'hTlkh7t8gujsahgg93', 'userId': 'hTlkh7t8gujsahgg93', 'sendDocument': true, 'locationId': 'hTlkh7t8gujsahgg93', 'contactId': 'hTlkh7t8gujsahgg93', 'opportunityId': 'hTlkh7t8gujsahgg93'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Attach facebook pages
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-attach-facebook-page-group
Attach facebook pages
Attach facebook pages
```http theme={null}
POST https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/facebook/accounts/{accountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Account Id
Account Id
## Body
Company ID
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 201,
"message": "Added Facebook Account"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/facebook/accounts/YOUR_accountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"type": "page",
"originId": "244405****11687",
"name": "JOHN_DEO",
"avatar": "https://storage.googleapis.com/2ad21ebc23/test",
"companyId": "sdfdsfdsfEWEsdfsdsW32dd"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/facebook/accounts/YOUR_accountId', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"type": "page", "originId": "244405****11687", "name": "JOHN_DEO", "avatar": "https://storage.googleapis.com/2ad21ebc23/test", "companyId": "sdfdsfdsfEWEsdfsdsW32dd"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/facebook/accounts/YOUR_accountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"type": "page", "originId": "244405****11687", "name": "JOHN_DEO", "avatar": "https://storage.googleapis.com/2ad21ebc23/test", "companyId": "sdfdsfdsfEWEsdfsdsW32dd"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'type': 'page', 'originId': '244405****11687', 'name': 'JOHN_DEO', 'avatar': 'https://storage.googleapis.com/2ad21ebc23/test', 'companyId': 'sdfdsfdsfEWEsdfsdsW32dd'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Attach Instagram Professional Accounts
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-attach-instagram-page-group
Attach Instagram Professional Accounts
Attach Instagram Professional Accounts
```http theme={null}
POST https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/instagram/accounts/{accountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Account Id
Account Id
## Body
Company ID
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 201,
"message": "Added Instagram Account"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/instagram/accounts/YOUR_accountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"originId": "244405****11687",
"name": "JOHN_DEO",
"avatar": "string",
"pageId": "234234234242sd",
"companyId": "sdfdsfdsfEWEsdfsdsW32dd"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/instagram/accounts/YOUR_accountId', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"originId": "244405****11687", "name": "JOHN_DEO", "avatar": "string", "pageId": "234234234242sd", "companyId": "sdfdsfdsfEWEsdfsdsW32dd"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/instagram/accounts/YOUR_accountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"originId": "244405****11687", "name": "JOHN_DEO", "avatar": "string", "pageId": "234234234242sd", "companyId": "sdfdsfdsfEWEsdfsdsW32dd"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'originId': '244405****11687', 'name': 'JOHN_DEO', 'avatar': 'string', 'pageId': '234234234242sd', 'companyId': 'sdfdsfdsfEWEsdfsdsW32dd'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Attach linkedin pages and profile
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-attach-linkedin-page-profile
Attach linkedin pages and profile
Attach linkedin pages and profile
```http theme={null}
POST https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/linkedin/accounts/{accountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Account Id
Account Id
## Body
Posibles valores: 'page', 'group', 'profile', 'account', 'business'
Company ID
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Added LinkedIn Account"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/linkedin/accounts/YOUR_accountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"type": "page",
"originId": "244405****11687",
"name": "JOHN_DEO",
"avatar": "string",
"urn": "string",
"companyId": "sdfdsfdsfEWEsdfsdsW32dd"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/linkedin/accounts/YOUR_accountId', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"type": "page", "originId": "244405****11687", "name": "JOHN_DEO", "avatar": "string", "urn": "string", "companyId": "sdfdsfdsfEWEsdfsdsW32dd"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/linkedin/accounts/YOUR_accountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"type": "page", "originId": "244405****11687", "name": "JOHN_DEO", "avatar": "string", "urn": "string", "companyId": "sdfdsfdsfEWEsdfsdsW32dd"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'type': 'page', 'originId': '244405****11687', 'name': 'JOHN_DEO', 'avatar': 'string', 'urn': 'string', 'companyId': 'sdfdsfdsfEWEsdfsdsW32dd'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Attach Tiktok profile
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-attach-tiktok-profile
Attach Tiktok profile
Attach Tiktok profile
```http theme={null}
POST https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/tiktok/accounts/{accountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Account Id
Account Id
## Body
Posibles valores: 'page', 'group', 'profile', 'account', 'business'
Company ID
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 201,
"message": "Added Tiktok Account"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/tiktok/accounts/YOUR_accountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"type": "page",
"originId": "244405****11687",
"name": "JOHN_DEO",
"avatar": "string",
"verified": true,
"username": "JOHN_DEO",
"companyId": "sdfdsfdsfEWEsdfsdsW32dd"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/tiktok/accounts/YOUR_accountId', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"type": "page", "originId": "244405****11687", "name": "JOHN_DEO", "avatar": "string", "verified": true, "username": "JOHN_DEO", "companyId": "sdfdsfdsfEWEsdfsdsW32dd"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/tiktok/accounts/YOUR_accountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"type": "page", "originId": "244405****11687", "name": "JOHN_DEO", "avatar": "string", "verified": true, "username": "JOHN_DEO", "companyId": "sdfdsfdsfEWEsdfsdsW32dd"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'type': 'page', 'originId': '244405****11687', 'name': 'JOHN_DEO', 'avatar': 'string', 'verified': true, 'username': 'JOHN_DEO', 'companyId': 'sdfdsfdsfEWEsdfsdsW32dd'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Attach Twitter profile
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-attach-twitter-profile
!
\
\\As of December 4, 2024, X (formerly Twitter) is no longer supported. We apologise for any inconvenience.\\
\
\
```http theme={null}
POST https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/twitter/accounts/{accountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Account Id
Account Id
## Body
Company ID
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 201,
"message": "Added Twitter Account"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/twitter/accounts/YOUR_accountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"originId": "244405****11687",
"name": "JOHN_DEO",
"username": "user_name",
"avatar": "string",
"protected": true,
"verified": true,
"companyId": "sdfdsfdsfEWEsdfsdsW32dd"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/twitter/accounts/YOUR_accountId', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"originId": "244405****11687", "name": "JOHN_DEO", "username": "user_name", "avatar": "string", "protected": true, "verified": true, "companyId": "sdfdsfdsfEWEsdfsdsW32dd"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/twitter/accounts/YOUR_accountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"originId": "244405****11687", "name": "JOHN_DEO", "username": "user_name", "avatar": "string", "protected": true, "verified": true, "companyId": "sdfdsfdsfEWEsdfsdsW32dd"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'originId': '244405****11687', 'name': 'JOHN_DEO', 'username': 'user_name', 'avatar': 'string', 'protected': true, 'verified': true, 'companyId': 'sdfdsfdsfEWEsdfsdsW32dd'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Bulk Delete Social Planner Posts
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-bulk-delete-social-planner-posts
Deletes multiple posts based on the provided list of post IDs. This operation is useful for clearing up large numbers of posts efficiently. Note:
Deletes multiple posts based on the provided list of post IDs.
This operation is useful for clearing up large numbers of posts efficiently.
Note:
1.The maximum number of posts that can be deleted in a single request is '50'.
2.However, It will only get deleted in Leadway database but still
it is recommended to be cautious of this operation.
```http theme={null}
POST https://services.leadconnectorhq.com/social-media-posting/{locationId}/posts/bulk-delete
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Requested Results
## Respuestas
Success or Failure
Status Code
Message
Message and deleted count
```json theme={null}
{
"success": true,
"statusCode": 201,
"message": "Posts Deleted Successfully",
"results": {
"message": "Posts deleted successfully",
"deletedCount": 10
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/bulk-delete' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"postIds": [
"662791ee3f216822d7da0c8c"
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/bulk-delete', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"postIds": ["662791ee3f216822d7da0c8c"]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/bulk-delete',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"postIds": ["662791ee3f216822d7da0c8c"]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'postIds': ['662791ee3f216822d7da0c8c']}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create post
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-create-post
Create posts for all supported platforms. It is possible to create customized posts per channel by using the same platform account IDs in a request and hitting the create post API multiple times with
Create posts for all supported platforms. It is possible to create customized posts per channel by using the same platform account IDs in a request and hitting the create post API multiple times with different summaries and account IDs per platform.
The content and media limitations, as well as platform rate limiters corresponding to the respective platforms, are provided in the following reference link:
Link: [Platform Limitations](https://help.leadconnectorhq.com/support/solutions/articles/48001240003-social-planner-image-video-content-and-api-limitations "Social Planner Help")
```http theme={null}
POST https://services.leadconnectorhq.com/social-media-posting/{locationId}/posts
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
## Body
Account Ids
Post Content
The limitations of content as per the platforms is provided through the reference link in API description. The summary will be trimmed based on the limit
Post Media Data
The limitations of media as per the platforms is provided through the reference link in API description
Status must be one of the following values: null, in\_progress, draft, failed, published, scheduled, in\_review, notification\_sent, deleted
Schedule Date
Created By
Follow Up Comment on platform. It is not allowed on Tiktok and GMB accounts and there is a limit of 280 charecters for twitter account
Og Tags Meta Data
Post Type must be one of the following values: - post, story, reel
Post Approval Details
if schedule datetime is updated
Array of Tag Value
Category Id
Tiktok Post Details
GMB Post Details
User ID
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 201,
"message": "Created Post"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"accountIds": [
"aF3KhyL8JIuBwzK3m7Ly_iVrVJ2uoXNF0wzcBzgl5_12554616564525983496"
],
"summary": "Hello World",
"media": [
{
"url": "https://i0.wp.com/www.lifeofanarchitect.com/wp-content/uploads/2021/10/architectural-model-making-stairs.jpg",
"caption": "Caption 1",
"type": "video/mp4 or image/png",
"thumbnail": "https://storage.googleapis.com/test/test/media/test.jpeg",
"defaultThumb": "https://storage.googleapis.com/test/test/media/test.jpeg",
"id": "Edf3323fsfsdsd"
}
],
"status": "draft",
"scheduleDate": "string",
"createdBy": "string",
"followUpComment": "First comment",
"type": "post",
"scheduleTimeUpdated": true,
"tags": [
"65f151c99bc2bf3aaf970d72"
],
"categoryId": "65f151c99bc2bf3aaf970d72",
"userId": "sdfdsfdsfEWEsdfsdsW32dd"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"accountIds": ["aF3KhyL8JIuBwzK3m7Ly_iVrVJ2uoXNF0wzcBzgl5_12554616564525983496"], "summary": "Hello World", "media": [{"url": "https://i0.wp.com/www.lifeofanarchitect.com/wp-content/uploads/2021/10/architectural-model-making-stairs.jpg", "caption": "Caption 1", "type": "video/mp4 or image/png", "thumbnail": "https://storage.googleapis.com/test/test/media/test.jpeg", "defaultThumb": "https://storage.googleapis.com/test/test/media/test.jpeg", "id": "Edf3323fsfsdsd"}], "status": "draft", "scheduleDate": "string", "createdBy": "string", "followUpComment": "First comment", "type": "post", "scheduleTimeUpdated": true, "tags": ["65f151c99bc2bf3aaf970d72"], "categoryId": "65f151c99bc2bf3aaf970d72", "userId": "sdfdsfdsfEWEsdfsdsW32dd"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"accountIds": ["aF3KhyL8JIuBwzK3m7Ly_iVrVJ2uoXNF0wzcBzgl5_12554616564525983496"], "summary": "Hello World", "media": [{"url": "https://i0.wp.com/www.lifeofanarchitect.com/wp-content/uploads/2021/10/architectural-model-making-stairs.jpg", "caption": "Caption 1", "type": "video/mp4 or image/png", "thumbnail": "https://storage.googleapis.com/test/test/media/test.jpeg", "defaultThumb": "https://storage.googleapis.com/test/test/media/test.jpeg", "id": "Edf3323fsfsdsd"}], "status": "draft", "scheduleDate": "string", "createdBy": "string", "followUpComment": "First comment", "type": "post", "scheduleTimeUpdated": true, "tags": ["65f151c99bc2bf3aaf970d72"], "categoryId": "65f151c99bc2bf3aaf970d72", "userId": "sdfdsfdsfEWEsdfsdsW32dd"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'accountIds': ['aF3KhyL8JIuBwzK3m7Ly_iVrVJ2uoXNF0wzcBzgl5_12554616564525983496'], 'summary': 'Hello World', 'media': [{'url': 'https://i0.wp.com/www.lifeofanarchitect.com/wp-content/uploads/2021/10/architectural-model-making-stairs.jpg', 'caption': 'Caption 1', 'type': 'video/mp4 or image/png', 'thumbnail': 'https://storage.googleapis.com/test/test/media/test.jpeg', 'defaultThumb': 'https://storage.googleapis.com/test/test/media/test.jpeg', 'id': 'Edf3323fsfsdsd'}], 'status': 'draft', 'scheduleDate': 'string', 'createdBy': 'string', 'followUpComment': 'First comment', 'type': 'post', 'scheduleTimeUpdated': true, 'tags': ['65f151c99bc2bf3aaf970d72'], 'categoryId': '65f151c99bc2bf3aaf970d72', 'userId': 'sdfdsfdsfEWEsdfsdsW32dd'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Account
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-delete-account
Delete account and account from group
Delete account and account from group
```http theme={null}
DELETE https://services.leadconnectorhq.com/social-media-posting/{locationId}/accounts/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
Id
## Query parameters
Company ID
User ID
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Deleted Account"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/accounts/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/accounts/YOUR_id', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/accounts/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete CSV
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-delete-csv
```http theme={null}
DELETE https://services.leadconnectorhq.com/social-media-posting/{locationId}/csv/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
CSV Id
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Deleted Post"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv/YOUR_id', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete CSV Post
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-delete-csv-post
```http theme={null}
DELETE https://services.leadconnectorhq.com/social-media-posting/{locationId}/csv/{csvId}/post/{postId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
CSV Post Id
CSV Id
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Deleted Post"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv/YOUR_csvId/post/YOUR_postId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv/YOUR_csvId/post/YOUR_postId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv/YOUR_csvId/post/YOUR_postId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Post
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-delete-post
Delete Post
Delete Post
```http theme={null}
DELETE https://services.leadconnectorhq.com/social-media-posting/{locationId}/posts/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
Post Id
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Deleted Post"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/YOUR_id', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Edit post
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-edit-post
Create posts for all supported platforms. It is possible to create customized posts per channel by using the same platform account IDs in a request and hitting the create post API multiple times with
Create posts for all supported platforms. It is possible to create customized posts per channel by using the same platform account IDs in a request and hitting the create post API multiple times with different summaries and account IDs per platform.
The content and media limitations, as well as platform rate limiters corresponding to the respective platforms, are provided in the following reference link:
Link: [Platform Limitations](https://help.leadconnectorhq.com/support/solutions/articles/48001240003-social-planner-image-video-content-and-api-limitations "Social Planner Help")
```http theme={null}
PUT https://services.leadconnectorhq.com/social-media-posting/{locationId}/posts/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
Post Id
## Body
Account Ids
Post Content
The limitations of content as per the platforms is provided through the reference link in API description
Post Media Data
The limitations of media as per the platforms is provided through the reference link in API description
Status must be one of the following values: in\_progress, draft, failed, published, scheduled, in\_review, notification\_sent, deleted
Schedule Date
Created By
Follow Up Comment on platform. It is not allowed on Tiktok and GMB accounts and there is a limit of 280 charecters for twitter account
Og Tags Meta Data
Post Type must be one of the following values: - post, story, reel
Post Approval Details
if schedule datetime is updated
Array of Tag Value
Category Id
Tiktok Post Details
GMB Post Details
User ID
## Respuestas
Success or Failure
Status Code
Message
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Updated Post"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"accountIds": [
"aF3KhyL8JIuBwzK3m7Ly_iVrVJ2uoXNF0wzcBzgl5_12554616564525983496"
],
"summary": "Hello World",
"media": [
{
"url": "https://i0.wp.com/www.lifeofanarchitect.com/wp-content/uploads/2021/10/architectural-model-making-stairs.jpg",
"caption": "Caption 1",
"type": "video/mp4 or image/png",
"thumbnail": "https://storage.googleapis.com/test/test/media/test.jpeg",
"defaultThumb": "https://storage.googleapis.com/test/test/media/test.jpeg",
"id": "Edf3323fsfsdsd"
}
],
"status": "draft",
"scheduleDate": "string",
"createdBy": "string",
"followUpComment": "First comment",
"type": "post",
"scheduleTimeUpdated": true,
"tags": [
"Tag1"
],
"categoryId": "string",
"userId": "sdfdsfdsfEWEsdfsdsW32dd"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/YOUR_id', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"accountIds": ["aF3KhyL8JIuBwzK3m7Ly_iVrVJ2uoXNF0wzcBzgl5_12554616564525983496"], "summary": "Hello World", "media": [{"url": "https://i0.wp.com/www.lifeofanarchitect.com/wp-content/uploads/2021/10/architectural-model-making-stairs.jpg", "caption": "Caption 1", "type": "video/mp4 or image/png", "thumbnail": "https://storage.googleapis.com/test/test/media/test.jpeg", "defaultThumb": "https://storage.googleapis.com/test/test/media/test.jpeg", "id": "Edf3323fsfsdsd"}], "status": "draft", "scheduleDate": "string", "createdBy": "string", "followUpComment": "First comment", "type": "post", "scheduleTimeUpdated": true, "tags": ["Tag1"], "categoryId": "string", "userId": "sdfdsfdsfEWEsdfsdsW32dd"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"accountIds": ["aF3KhyL8JIuBwzK3m7Ly_iVrVJ2uoXNF0wzcBzgl5_12554616564525983496"], "summary": "Hello World", "media": [{"url": "https://i0.wp.com/www.lifeofanarchitect.com/wp-content/uploads/2021/10/architectural-model-making-stairs.jpg", "caption": "Caption 1", "type": "video/mp4 or image/png", "thumbnail": "https://storage.googleapis.com/test/test/media/test.jpeg", "defaultThumb": "https://storage.googleapis.com/test/test/media/test.jpeg", "id": "Edf3323fsfsdsd"}], "status": "draft", "scheduleDate": "string", "createdBy": "string", "followUpComment": "First comment", "type": "post", "scheduleTimeUpdated": true, "tags": ["Tag1"], "categoryId": "string", "userId": "sdfdsfdsfEWEsdfsdsW32dd"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'accountIds': ['aF3KhyL8JIuBwzK3m7Ly_iVrVJ2uoXNF0wzcBzgl5_12554616564525983496'], 'summary': 'Hello World', 'media': [{'url': 'https://i0.wp.com/www.lifeofanarchitect.com/wp-content/uploads/2021/10/architectural-model-making-stairs.jpg', 'caption': 'Caption 1', 'type': 'video/mp4 or image/png', 'thumbnail': 'https://storage.googleapis.com/test/test/media/test.jpeg', 'defaultThumb': 'https://storage.googleapis.com/test/test/media/test.jpeg', 'id': 'Edf3323fsfsdsd'}], 'status': 'draft', 'scheduleDate': 'string', 'createdBy': 'string', 'followUpComment': 'First comment', 'type': 'post', 'scheduleTimeUpdated': true, 'tags': ['Tag1'], 'categoryId': 'string', 'userId': 'sdfdsfdsfEWEsdfsdsW32dd'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Accounts
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-account
Get list of accounts and groups
Get list of accounts and groups
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/{locationId}/accounts
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Fetched Accounts"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/accounts' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/accounts', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/accounts',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get categories by account id
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-categories-account-id
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/{locationId}/categories
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
## Query parameters
Search text string
Limit
Skip
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Fetched Categories by Account ID"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/categories' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/categories', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/categories',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get categories by id
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-categories-id
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/{locationId}/categories/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Category Id
Account Id
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Fetched Category"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/categories/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/categories/YOUR_id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/categories/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get CSV Post
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-csv-post
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/{locationId}/csv/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
CSV Id
## Query parameters
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Fetched CSV Post"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv/YOUR_id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get facebook pages
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-facebook-page-group
Get facebook pages
Get facebook pages
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/facebook/accounts/{accountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Account Id
Account Id
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Fetched Facebook Account"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/facebook/accounts/YOUR_accountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/facebook/accounts/YOUR_accountId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/facebook/accounts/YOUR_accountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get google business accounts
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-google-accounts
Get google business accounts
Get google business accounts
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/google/locations/{accountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Account Id
Account Id
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Fetched Google Business Account"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/google/locations/YOUR_accountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/google/locations/YOUR_accountId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/google/locations/YOUR_accountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Instagram Professional Accounts
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-instagram-page-group
Get Instagram Professional Accounts
Get Instagram Professional Accounts
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/instagram/accounts/{accountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Account Id
Account Id
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Fetched Instagram Account"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/instagram/accounts/YOUR_accountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/instagram/accounts/YOUR_accountId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/instagram/accounts/YOUR_accountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Linkedin pages and profile
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-linkedin-page-profile
Get Linkedin pages and profile
Get Linkedin pages and profile
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/linkedin/accounts/{accountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Account Id
Account Id
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Fetched LinkedIn Account"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/linkedin/accounts/YOUR_accountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/linkedin/accounts/YOUR_accountId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/linkedin/accounts/YOUR_accountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get post
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-post
Get post
Get post
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/{locationId}/posts/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
Post Id
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Fetched Post"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/YOUR_id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get posts
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-posts
Get Posts
Get Posts
```http theme={null}
POST https://services.leadconnectorhq.com/social-media-posting/{locationId}/posts/list
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
## Body
type must be one of the following values: recent, all, scheduled, draft, failed, in\_review, published, in\_progress and deleted
List of account Ids separated by comma as a string
From Date
To Date
Include User Data
Post Type must be one of the following values: - post, story, reel
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 201,
"message": "Fetched Posts"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/list' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"type": "Filter type",
"accounts": "660a83fc29deacac50033e2b_omaDY3RbWtTP511e808O_17841465964543589, 38bF83fc29deacac50033e2b_omaDY3RbWtr3P11e808O_17841465964543998",
"skip": "1",
"limit": "10",
"fromDate": "2024-01-22T05:32:49.463Z",
"toDate": "2024-03-20T05:32:49.463Z",
"includeUsers": "true",
"postType": "post"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/list', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"type": "Filter type", "accounts": "660a83fc29deacac50033e2b_omaDY3RbWtTP511e808O_17841465964543589, 38bF83fc29deacac50033e2b_omaDY3RbWtr3P11e808O_17841465964543998", "skip": "1", "limit": "10", "fromDate": "2024-01-22T05:32:49.463Z", "toDate": "2024-03-20T05:32:49.463Z", "includeUsers": "true", "postType": "post"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/posts/list',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"type": "Filter type", "accounts": "660a83fc29deacac50033e2b_omaDY3RbWtTP511e808O_17841465964543589, 38bF83fc29deacac50033e2b_omaDY3RbWtr3P11e808O_17841465964543998", "skip": "1", "limit": "10", "fromDate": "2024-01-22T05:32:49.463Z", "toDate": "2024-03-20T05:32:49.463Z", "includeUsers": "true", "postType": "post"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'type': 'Filter type', 'accounts': '660a83fc29deacac50033e2b_omaDY3RbWtTP511e808O_17841465964543589, 38bF83fc29deacac50033e2b_omaDY3RbWtr3P11e808O_17841465964543998', 'skip': '1', 'limit': '10', 'fromDate': '2024-01-22T05:32:49.463Z', 'toDate': '2024-03-20T05:32:49.463Z', 'includeUsers': 'true', 'postType': 'post'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Social Media Statistics
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-social-media-statistics
Retrieve analytics data for multiple social media accounts. Provides metrics for the last 7 days with comparison to the previous 7 days. Supports filtering by platforms and specific connected accounts
Retrieve analytics data for multiple social media accounts. Provides metrics for the last 7 days with comparison to the previous 7 days. Supports filtering by platforms and specific connected accounts.
```http theme={null}
POST https://services.leadconnectorhq.com/social-media-posting/statistics
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account ID
## Body
Array of connected social media account IDs to fetch analytics for. This can be found as 'profileId' in /accounts api.
Array of social media platforms to filter analytics by. If not provided, all platforms will be included. NOTE: Linkedin (PAGE only) and Tiktok (BUSINESS only) are supported.
## Respuestas
Analytics data grouped by metrics and platforms
Array of day names for the analytics period
Aggregated metrics totals
Post performance metrics over time
Detailed breakdowns by metric and platform
Platform-wise totals with time series data
Demographic data breakdown
```json theme={null}
{
"results": {
"dayRange": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun"
],
"totals": {
"posts": 0,
"likes": 0,
"followers": 0,
"impressions": 0,
"comments": 0
},
"postPerformance": {
"posts": {
"google": [
0,
0,
0,
0,
0,
0,
0
]
},
"impressions": [
0,
0,
0,
0,
0,
0,
0
],
// truncado: 136 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/social-media-posting/statistics' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"profileIds": [
"67a5a9aa776c837de4aa5b12"
],
"platforms": [
"facebook",
"instagram"
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/statistics', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"profileIds": ["67a5a9aa776c837de4aa5b12"], "platforms": ["facebook", "instagram"]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/social-media-posting/statistics',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"profileIds": ["67a5a9aa776c837de4aa5b12"], "platforms": ["facebook", "instagram"]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'profileIds': ['67a5a9aa776c837de4aa5b12'], 'platforms': ['facebook', 'instagram']}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get tags by account id
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-tags-account-id
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/{locationId}/tags
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
## Query parameters
Search text string
Limit
Skip
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Fetched Tags by Account ID"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/tags' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/tags', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/tags',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get tags by ids
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-tags-by-ids
```http theme={null}
POST https://services.leadconnectorhq.com/social-media-posting/{locationId}/tags/details
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
## Body
Array of Tag Ids
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 201,
"message": "Fetched Tags by Tag IDs"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/tags/details' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"tagIds": [
"65fbdcfecc884f07e645ea8b"
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/tags/details', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"tagIds": ["65fbdcfecc884f07e645ea8b"]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/tags/details',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"tagIds": ["65fbdcfecc884f07e645ea8b"]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'tagIds': ['65fbdcfecc884f07e645ea8b']}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Tiktok Business profile
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-tiktok-business-profile
Get Tiktok Business profile
Get Tiktok Business profile
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/tiktok-business/accounts/{accountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Account Id
Account Id
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 201,
"message": "Fetched Tiktok Business Account"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/tiktok-business/accounts/YOUR_accountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/tiktok-business/accounts/YOUR_accountId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/tiktok-business/accounts/YOUR_accountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Tiktok profile
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-tiktok-profile
Get Tiktok profile
Get Tiktok profile
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/tiktok/accounts/{accountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Account Id
Account Id
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Fetched Tiktok Account"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/tiktok/accounts/YOUR_accountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/tiktok/accounts/YOUR_accountId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/tiktok/accounts/YOUR_accountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Twitter profile
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-twitter-profile
!
\
\\As of December 4, 2024, X (formerly Twitter) is no longer supported. We apologise for any inconvenience.\\
\
\
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/twitter/accounts/{accountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Account Id
Account Id
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Fetched Twitter Account"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/twitter/accounts/YOUR_accountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/twitter/accounts/YOUR_accountId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/twitter/accounts/YOUR_accountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Upload Status
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-get-upload-status
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/{locationId}/csv
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
## Query parameters
User ID
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Fetched CSV Upload Status"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Set Accounts
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-set-accounts
```http theme={null}
POST https://services.leadconnectorhq.com/social-media-posting/{locationId}/set-accounts
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
## Body
Account Ids
File path
Entires Count. rowcCount must be between 1 and number of posts in CSV
Name of file
User ID
## Respuestas
Success or Failure
Status Code
Message
```json theme={null}
{
"success": true,
"statusCode": 201,
"message": "Accounts Set Successfully"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/set-accounts' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"accountIds": [
"aF3KhyL8JIuBwzK3m7Ly_iVrVJ2uoXNF0wzcBzgl5_12554616564525983496"
],
"filePath": "o6241QsiRwUIJHyjuhos/social-planner-import/a6d04a26-0401-4e52-8f48-dbb274050fab.csv",
"rowsCount": 1,
"fileName": "test.csv",
"approver": "o6241QsiRwUIJHyjuhos",
"userId": "sdfdsfdsfEWEsdfsdsW32dd"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/set-accounts', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"accountIds": ["aF3KhyL8JIuBwzK3m7Ly_iVrVJ2uoXNF0wzcBzgl5_12554616564525983496"], "filePath": "o6241QsiRwUIJHyjuhos/social-planner-import/a6d04a26-0401-4e52-8f48-dbb274050fab.csv", "rowsCount": 1, "fileName": "test.csv", "approver": "o6241QsiRwUIJHyjuhos", "userId": "sdfdsfdsfEWEsdfsdsW32dd"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/set-accounts',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"accountIds": ["aF3KhyL8JIuBwzK3m7Ly_iVrVJ2uoXNF0wzcBzgl5_12554616564525983496"], "filePath": "o6241QsiRwUIJHyjuhos/social-planner-import/a6d04a26-0401-4e52-8f48-dbb274050fab.csv", "rowsCount": 1, "fileName": "test.csv", "approver": "o6241QsiRwUIJHyjuhos", "userId": "sdfdsfdsfEWEsdfsdsW32dd"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'accountIds': ['aF3KhyL8JIuBwzK3m7Ly_iVrVJ2uoXNF0wzcBzgl5_12554616564525983496'], 'filePath': 'o6241QsiRwUIJHyjuhos/social-planner-import/a6d04a26-0401-4e52-8f48-dbb274050fab.csv', 'rowsCount': 1, 'fileName': 'test.csv', 'approver': 'o6241QsiRwUIJHyjuhos', 'userId': 'sdfdsfdsfEWEsdfsdsW32dd'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Set google business accounts
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-set-google-accounts
Set google business accounts
Set google business accounts
```http theme={null}
POST https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/google/locations/{accountId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Account Id
Account Id
## Body
Company ID
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 201,
"message": "Added Google Business Account"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/google/locations/YOUR_accountId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"location": {},
"account": {},
"companyId": "sdfdsfdsfEWEsdfsdsW32dd"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/google/locations/YOUR_accountId', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"location": {}, "account": {}, "companyId": "sdfdsfdsfEWEsdfsdsW32dd"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/social-media-posting/oauth/YOUR_locationId/google/locations/YOUR_accountId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"location": {}, "account": {}, "companyId": "sdfdsfdsfEWEsdfsdsW32dd"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'location': {}, 'account': {}, 'companyId': 'sdfdsfdsfEWEsdfsdsW32dd'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Start CSV Finalize
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-start-csv-finalize
```http theme={null}
PATCH https://services.leadconnectorhq.com/social-media-posting/{locationId}/csv/{id}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
CSV Id
## Body
User ID
## Respuestas
Success or Failure
Status Code
Message
```json theme={null}
{
"success": true,
"statusCode": 200,
"message": "Updated Successfully"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PATCH 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv/YOUR_id' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"userId": "sdfdsfdsfEWEsdfsdsW32dd"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv/YOUR_id', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"userId": "sdfdsfdsfEWEsdfsdsW32dd"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv/YOUR_id',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"userId": "sdfdsfdsfEWEsdfsdsW32dd"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'userId': 'sdfdsfdsfEWEsdfsdsW32dd'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Starts OAuth For Facebook Account
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-start-facebook-oauth
Open the API in a window with appropriate params and headers instead of using the Curl. User is navigated to Facebook login OAuth screen. On successful login, listen on window object for message where
Open the API in a window with appropriate params and headers instead of using the Curl. User is navigated to Facebook login OAuth screen. On successful login, listen on window object for message where event listener returns data in its callback function.
### Sample code to listen to event data:
window\.addEventListener('message',
function(e) \{
if (e.data && e.data.page === 'social\_media\_posting') \{
const \{ actionType, page, platform, placement, accountId, reconnectAccounts } = e.data
}
},
false)
### Event Data Response:
\{
actionType: string, Ex: "close"
page: string, Ex: "social-media-posting"
platform: string, Ex: "facebook"
placement: string, Ex: "placement"
accountId: string, Ex: "658a9b6833b91e0ecb8f3958"
reconnectAccounts: string\[]] Ex: \["658a9b6833b91e0ecb834acd", "efd2daa9b6833b91e0ecb8f3511"]
}
### The accountId retrieved from above data can be used to fetch Facebook account details using below API -
API: '/social-media-posting/oauth/facebook/accounts/:accountId'
Method: GET
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/oauth/facebook/start
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Account Id
User ID
Facebook Page
Reconnect boolean as string
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/facebook/start' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/facebook/start', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/oauth/facebook/start',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Starts OAuth For Google Account
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-start-google-oauth
Open the API in a window with appropriate params and headers instead of using the Curl. User is navigated to Google login OAuth screen. On successful login, listen on window object for message where e
Open the API in a window with appropriate params and headers instead of using the Curl. User is navigated to Google login OAuth screen. On successful login, listen on window object for message where event listener returns data in its callback function.
### Sample code to listen to event data:
window\.addEventListener('message',
function(e) \{
if (e.data && e.data.page === 'social\_media\_posting') \{
const \{ actionType, page, platform, placement, accountId, reconnectAccounts } = e.data
}
},
false)
### Event Data Response:
\{
actionType: string, Ex: "close"
page: string, Ex: "social-media-posting"
platform: string, Ex: "google"
placement: string, Ex: "placement"
accountId: string, Ex: "658a9b6833b91e0ecb8f3958"
reconnectAccounts: string\[]] Ex: \["658a9b6833b91e0ecb834acd", "efd2daa9b6833b91e0ecb8f3511"]
}
### The accountId retrieved from above data can be used to fetch Google account details using below API -
API: '/social-media-posting/oauth/google/accounts/:accountId'
Method: GET
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/oauth/google/start
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
User Id
Page
Reconnect
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/google/start' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/google/start', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/oauth/google/start',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Starts OAuth For Instagram Account
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-start-instagram-oauth
Open the API in a window with appropriate params and headers instead of using the Curl. User is navigated to Instagram login OAuth screen. On successful login, listen on window object for message wher
Open the API in a window with appropriate params and headers instead of using the Curl. User is navigated to Instagram login OAuth screen. On successful login, listen on window object for message where event listener returns data in its callback function.
### Sample code to listen to event data:
window\.addEventListener('message',
function(e) \{
if (e.data && e.data.page === 'social\_media\_posting') \{
const \{ actionType, page, platform, placement, accountId, reconnectAccounts } = e.data
}
},
false)
### Event Data Response:
\{
actionType: string, Ex: "close"
page: string, Ex: "social-media-posting"
platform: string, Ex: "instagram"
placement: string, Ex: "placement"
accountId: string, Ex: "658a9b6833b91e0ecb8f3958"
reconnectAccounts: string\[]] Ex: \["658a9b6833b91e0ecb834acd", "efd2daa9b6833b91e0ecb8f3511"]
}
### The accountId retrieved from above data can be used to fetch Instagram account details using below API -
API: '/social-media-posting/oauth/instagram/accounts/:accountId'
Method: GET
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/oauth/instagram/start
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
User Id
Page
Reconnect
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/instagram/start' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/instagram/start', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/oauth/instagram/start',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Starts OAuth For LinkedIn Account
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-start-linkedin-oauth
Open the API in a window with appropriate params and headers instead of using the Curl. User is navigated to LinkedIn login OAuth screen. On successful login, listen on window object for message where
Open the API in a window with appropriate params and headers instead of using the Curl. User is navigated to LinkedIn login OAuth screen. On successful login, listen on window object for message where event listener returns data in its callback function.
### Sample code to listen to event data:
window\.addEventListener('message',
function(e) \{
if (e.data && e.data.page === 'social\_media\_posting') \{
const \{ actionType, page, platform, placement, accountId, reconnectAccounts } = e.data
}
},
false)
### Event Data Response:
\{
actionType: string, Ex: "close"
page: string, Ex: "social-media-posting"
platform: string, Ex: "linkedin"
placement: string, Ex: "placement"
accountId: string, Ex: "658a9b6833b91e0ecb8f3958"
reconnectAccounts: string\[]] Ex: \["658a9b6833b91e0ecb834acd", "efd2daa9b6833b91e0ecb8f3511"]
}
### The accountId retrieved from above data can be used to fetch LinkedIn account details using below API -
API: '/social-media-posting/oauth/linkedin/accounts/:accountId'
Method: GET
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/oauth/linkedin/start
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
User Id
Page
Reconnect
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/linkedin/start' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/linkedin/start', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/oauth/linkedin/start',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Starts OAuth For Tiktok Business Account
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-start-tiktok-business-oauth
Open the API in a window with appropriate params and headers instead of using the Curl. User is navigated to Tiktok-Business login OAuth screen. On successful login, listen on window object for messag
Open the API in a window with appropriate params and headers instead of using the Curl. User is navigated to Tiktok-Business login OAuth screen. On successful login, listen on window object for message where event listener returns data in its callback function.
### Sample code to listen to event data:
window\.addEventListener('message',
function(e) \{
if (e.data && e.data.page === 'social\_media\_posting') \{
const \{ actionType, page, platform, placement, accountId, reconnectAccounts } = e.data
}
},
false)
### Event Data Response:
\{
actionType: string, Ex: "close"
page: string, Ex: "social-media-posting"
platform: string, Ex: "tiktok-business"
placement: string, Ex: "placement"
accountId: string, Ex: "658a9b6833b91e0ecb8f3958"
reconnectAccounts: string\[]] Ex: \["658a9b6833b91e0ecb834acd", "efd2daa9b6833b91e0ecb8f3511"]
}
### The accountId retrieved from above data can be used to fetch Tiktok-Business account details using below API -
API: '/social-media-posting/oauth/tiktok-business/accounts/:accountId'
Method: GET
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/oauth/tiktok-business/start
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
User Id
Page
Reconnect
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/tiktok-business/start' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/tiktok-business/start', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/oauth/tiktok-business/start',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Starts OAuth For Tiktok Account
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-start-tiktok-oauth
Open the API in a window with appropriate params and headers instead of using the Curl. User is navigated to Tiktok login OAuth screen. On successful login, listen on window object for message where e
Open the API in a window with appropriate params and headers instead of using the Curl. User is navigated to Tiktok login OAuth screen. On successful login, listen on window object for message where event listener returns data in its callback function.
### Sample code to listen to event data:
window\.addEventListener('message',
function(e) \{
if (e.data && e.data.page === 'social\_media\_posting') \{
const \{ actionType, page, platform, placement, accountId, reconnectAccounts } = e.data
}
},
false)
### Event Data Response:
\{
actionType: string, Ex: "close"
page: string, Ex: "social-media-posting"
platform: string, Ex: "tiktok"
placement: string, Ex: "placement"
accountId: string, Ex: "658a9b6833b91e0ecb8f3958"
reconnectAccounts: string\[]] Ex: \["658a9b6833b91e0ecb834acd", "efd2daa9b6833b91e0ecb8f3511"]
}
### The accountId retrieved from above data can be used to fetch Tiktok account details using below API -
API: '/social-media-posting/oauth/tiktok/accounts/:accountId'
Method: GET
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/oauth/tiktok/start
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
User Id
Page
Reconnect
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/tiktok/start' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/tiktok/start', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/oauth/tiktok/start',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Starts OAuth For Twitter Account
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-start-twitter-oauth
!
\
\\As of December 4, 2024, X (formerly Twitter) is no longer supported. We apologise for any inconvenience.\\
\
\
```http theme={null}
GET https://services.leadconnectorhq.com/social-media-posting/oauth/twitter/start
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
User Id
Page
Reconnect
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/twitter/start' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/twitter/start', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/social-media-posting/oauth/twitter/start',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Upload CSV
Source: https://developers.leadwaycrm.com/api-reference/social-planner/social-planner-upload-csv
```http theme={null}
POST https://services.leadconnectorhq.com/social-media-posting/{locationId}/csv
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Account Id
## Body
## Respuestas
Success or Failure
Status Code
Message
Requested Results
```json theme={null}
{
"success": true,
"statusCode": 201,
"message": "Uploaded CSV"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"file": "string"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"file": "string"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/social-media-posting/YOUR_locationId/csv',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"file": "string"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'file': 'string'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Shipping Carrier
Source: https://developers.leadwaycrm.com/api-reference/store/store-create-shipping-carrier
The "Create Shipping Carrier" API allows adding a new shipping carrier.
The "Create Shipping Carrier" API allows adding a new shipping carrier.
```http theme={null}
POST https://services.leadconnectorhq.com/store/shipping-carrier
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id or Agency Id
Posibles valores: 'account'
Name of the shipping carrier
The URL endpoint that GHL needs to retrieve shipping rates. This must be a public URL.
An array of available shipping carrier services
Name of the shipping carrier service
Value of the shipping carrier service
The seller can choose multiple services while creating shipping rates if this is true.
## Respuestas
Status of api action
Success message
Shipping carrier data
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/store/shipping-carrier' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "FedEx",
"callbackUrl": "https://example.com/get-shipping-rates",
"services": [
{
"name": "Priority Mail Express International",
"value": "PriorityMailExpressInternational"
}
],
"allowsMultipleServiceSelection": true
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-carrier', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "name": "FedEx", "callbackUrl": "https://example.com/get-shipping-rates", "services": [{"name": "Priority Mail Express International", "value": "PriorityMailExpressInternational"}], "allowsMultipleServiceSelection": true}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/store/shipping-carrier',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "name": "FedEx", "callbackUrl": "https://example.com/get-shipping-rates", "services": [{"name": "Priority Mail Express International", "value": "PriorityMailExpressInternational"}], "allowsMultipleServiceSelection": true},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'name': 'FedEx', 'callbackUrl': 'https://example.com/get-shipping-rates', 'services': [{'name': 'Priority Mail Express International', 'value': 'PriorityMailExpressInternational'}], 'allowsMultipleServiceSelection': true}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Shipping Rate
Source: https://developers.leadwaycrm.com/api-reference/store/store-create-shipping-rate
The "Create Shipping Rate" API allows adding a new shipping rate.
The "Create Shipping Rate" API allows adding a new shipping rate.
```http theme={null}
POST https://services.leadconnectorhq.com/store/shipping-zone/{shippingZoneId}/shipping-rate
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the item that needs to be returned
## Body
Account Id or Agency Id
Posibles valores: 'account'
Name of the shipping zone
Delivery description
The currency of the amount of the rate / handling fee
The amount of the shipping rate if it is normal rate (0 means free ). Fixed Handling fee if it is a carrier rate (it will add to the carrier rate).
Type of condition to provide the conditional pricing Posibles valores: 'none', 'price', 'weight'
Minimum condition for applying this price. set 0 or null if there is no minimum
Maximum condition for applying this price. set 0 or null if there is no maximum
is this a carrier rate
Shipping carrier id
Percentage of rate fee if it is a carrier rate.
An array of items
Name of the shipping carrier service
Value of the shipping carrier service
## Respuestas
Status of api action
Success message
Shipping zone data
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "North zone",
"description": "Ships next day",
"currency": "USD",
"amount": 99.99,
"conditionType": "price",
"minCondition": 99.99,
"maxCondition": 99.99,
"isCarrierRate": true,
"shippingCarrierId": "655b33a82209e60b6adb87a5",
"percentageOfRateFee": 10.99,
"shippingCarrierServices": [
{
"name": "Priority Mail Express International",
"value": "PriorityMailExpressInternational"
}
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "name": "North zone", "description": "Ships next day", "currency": "USD", "amount": 99.99, "conditionType": "price", "minCondition": 99.99, "maxCondition": 99.99, "isCarrierRate": true, "shippingCarrierId": "655b33a82209e60b6adb87a5", "percentageOfRateFee": 10.99, "shippingCarrierServices": [{"name": "Priority Mail Express International", "value": "PriorityMailExpressInternational"}]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "name": "North zone", "description": "Ships next day", "currency": "USD", "amount": 99.99, "conditionType": "price", "minCondition": 99.99, "maxCondition": 99.99, "isCarrierRate": true, "shippingCarrierId": "655b33a82209e60b6adb87a5", "percentageOfRateFee": 10.99, "shippingCarrierServices": [{"name": "Priority Mail Express International", "value": "PriorityMailExpressInternational"}]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'name': 'North zone', 'description': 'Ships next day', 'currency': 'USD', 'amount': 99.99, 'conditionType': 'price', 'minCondition': 99.99, 'maxCondition': 99.99, 'isCarrierRate': true, 'shippingCarrierId': '655b33a82209e60b6adb87a5', 'percentageOfRateFee': 10.99, 'shippingCarrierServices': [{'name': 'Priority Mail Express International', 'value': 'PriorityMailExpressInternational'}]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Shipping Zone
Source: https://developers.leadwaycrm.com/api-reference/store/store-create-shipping-zone
The "Create Shipping Zone" API allows adding a new shipping zone.
The "Create Shipping Zone" API allows adding a new shipping zone.
```http theme={null}
POST https://services.leadconnectorhq.com/store/shipping-zone
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id or Agency Id
Posibles valores: 'account'
Name of the shipping zone
List of countries that are available
Country code Posibles valores: \['US', 'CA', 'AF', 'AX', 'AL', 'DZ', 'AS', 'AD', 'AO', 'AI', 'AQ', 'AG', 'AR', 'AM', 'AW', 'AU', 'AT', 'AZ', 'BS', 'BH', 'BD', 'BB', 'BY', 'BE', 'BZ', 'BJ', 'BM', 'BT', 'BO', 'BA', 'BW', 'BV', 'BR', 'IO', 'BN', 'BG', 'BF', 'BI', 'KH', 'CM', 'CV', 'KY', 'CF', 'TD', 'CL', 'CN', 'CX', 'CC', 'CO', 'KM', 'CG', 'CD', 'CK', 'CR', 'CI', 'HR', 'CU', 'CY', 'CZ', 'DK', 'DJ', 'DM', 'DO', 'EC', 'EG', 'SV', 'GQ', 'ER', 'EE', 'ET', 'FK', 'FO', 'FJ', 'FI', 'FR', 'GF', 'PF', 'TF', 'GA', 'GM', 'GE', 'DE', 'GH', 'GI', 'GR', 'GL', 'GD', 'GP', 'GU', 'GT', 'GG', 'GN', 'GW', 'GY', 'HT', 'HM', 'VA', 'HN', 'HK', 'HU', 'IS', 'IN', 'ID', 'IR', 'IQ', 'IE', 'IM', 'IL', 'IT', 'JM', 'JP', 'JE', 'JO', 'KZ', 'KE', 'KI', 'KP', 'XK', 'KW', 'KG', 'LA', 'LV', 'LB', 'LS', 'LR', 'LY', 'LI', 'LT', 'LU', 'MO', 'MK', 'MG', 'MW', 'MY', 'MV', 'ML', 'MT', 'MH', 'MQ', 'MR', 'MU', 'YT', 'MX', 'FM', 'MD', 'MC', 'MN', 'ME', 'MS', 'MA', 'MZ', 'MM', 'NA', 'NR', 'NP', 'NL', 'AN', 'NC', 'NZ', 'NI', 'NE', 'NG', 'NU', 'NF', 'MP', 'NO', 'OM', 'PK', 'PW', 'PS', 'PA', 'PG', 'PY', 'PE', 'PH', 'PN', 'PL', 'PT', 'PR', 'QA', 'RE', 'RO', 'RU', 'RW', 'SH', 'KN', 'LC', 'MF', 'PM', 'VC', 'WS', 'SM', 'ST', 'SA', 'SN', 'RS', 'SC', 'SL', 'SG', 'SX', 'SK', 'SI', 'SB', 'SO', 'ZA', 'GS', 'KR', 'ES', 'LK', 'SD', 'SR', 'SJ', 'SZ', 'SE', 'CH', 'SY', 'TW', 'TJ', 'TZ', 'TH', 'TL', 'TG', 'TK', 'TO', 'TT', 'TN', 'TR', 'TM', 'TC', 'TV', 'UG', 'UA', 'AE', 'GB', 'UM', 'UY', 'UZ', 'VU', 'VE', 'VN', 'VG', 'VI', 'WF', 'EH', 'YE', 'ZM', 'ZW']
List of states that are available. If states is empty, then all states are available
State code Posibles valores: 'AL', 'AK', 'AS', 'AZ', 'AR', 'AA', 'AE', 'AP', 'CA', 'CO', 'CT', 'DE', 'DC', 'FM', 'FL', 'GA', 'GU', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MH', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'MP', 'OH', 'OK', 'OR', 'PW', 'PA', 'PR', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VI', 'VA', 'WA', 'WV', 'WI', 'WY', 'AB', 'BC', 'MB', 'NB', 'NL', 'NT', 'NS', 'NU', 'ON', 'PE', 'QC', 'SK', 'YT', 'BA', 'CT', 'CC', 'CH', 'CB', 'CN', 'ER', 'FO', 'JY', 'LP', 'LR', 'MZ', 'MN', 'NQ', 'RN', 'SA', 'SJ', 'SL', 'SC', 'SF', 'SE', 'TF', 'TU', 'ACT', 'NSW', 'NT', 'QLD', 'SA', 'TAS', 'VIC', 'WA', 'AC', 'AL', 'AM', 'AP', 'BA', 'CE', 'DF', 'ES', 'GO', 'MA', 'MG', 'MS', 'MT', 'PA', 'PB', 'PE', 'PI', 'PR', 'RJ', 'RN', 'RO', 'RR', 'RS', 'SC', 'SE', 'SP', 'TO', 'AI', 'AN', 'AP', 'AT', 'BI', 'CO', 'AR', 'LI', 'LL', 'LR', 'MA', 'ML', 'RM', 'TA', 'VS', 'NB', 'AMA', 'ANT', 'ARA', 'ATL', 'BOL', 'BOY', 'CAL', 'CAQ', 'CAS', 'CAU', 'CES', 'CHO', 'CUN', 'COR', 'GUA', 'GUV', 'HUI', 'LAG', 'MAG', 'MET', 'NAR', 'NSA', 'PUT', 'QUI', 'RIS', 'SAP', 'SAN', 'SUC', 'TOL', 'VAC', 'VAU', 'VID', 'CR-A', 'CR-C', 'CR-G', 'CR-H', 'CR-L', 'CR-P', 'CR-SJ', 'GT-16', 'GT-15', 'GT-04', 'GT-20', 'GT-02', 'GT-05', 'GT-01', 'GT-13', 'GT-18', 'GT-21', 'GT-22', 'GT-17', 'GT-09', 'GT-14', 'GT-11', 'GT-03', 'GT-12', 'GT-06', 'GT-07', 'GT-10', 'GT-08', 'GT-19', 'HK', 'KL', 'NT', 'AN', 'AP', 'AR', 'AS', 'BR', 'CH', 'CG', 'DN', 'DD', 'DL', 'GA', 'GJ', 'HR', 'HP', 'JK', 'JH', 'KA', 'KL', 'LA', 'LD', 'MP', 'MH', 'MN', 'ML', 'MZ', 'NL', 'OR', 'PY', 'PB', 'RJ', 'SK', 'TN', 'TS', 'TR', 'UP', 'UK', 'WB', 'CW', 'CN', 'CE', 'CO', 'DL', 'D', 'G', 'KY', 'KE', 'KK', 'LS', 'LM', 'LK', 'LD', 'LH', 'MO', 'MH', 'MN', 'OY', 'RN', 'SO', 'TA', 'WD', 'WH', 'WX', 'WW', 'AG', 'AL', 'AN', 'AO', 'AR', 'AP', 'AT', 'AV', 'BA', 'BT', 'BL', 'BN', 'BG', 'BI', 'BO', 'BZ', 'BS', 'BR', 'CA', 'CL', 'CB', 'CI', 'CE', 'CT', 'CZ', 'CH', 'CO', 'CS', 'CR', 'KR', 'CN', 'EN', 'FM', 'FE', 'FI', 'FG', 'FC', 'FR', 'GE', 'GO', 'GR', 'IM', 'IS', 'AQ', 'SP', 'LT', 'LE', 'LC', 'LI', 'LO', 'LU', 'MC', 'MN', 'MS', 'MT', 'VS', 'ME', 'MI', 'MO', 'MB', 'NA', 'NO', 'NU', 'OG', 'OT', 'OR', 'PD', 'PA', 'PR', 'PV', 'PG', 'PU', 'PE', 'PC', 'PI', 'PT', 'PN', 'PZ', 'PO', 'RG', 'RA', 'RC', 'RE', 'RI', 'RN', 'RM', 'RO', 'SA', 'SS', 'SV', 'SI', 'SR', 'SO', 'TA', 'TE', 'TR', 'TO', 'TP', 'TN', 'TV', 'TS', 'UD', 'VA', 'VE', 'VB', 'VC', 'VR', 'VV', 'VI', 'VT', 'JP-23', 'JP-05', 'JP-02', 'JP-12', 'JP-38', 'JP-18', 'JP-40', 'JP-07', 'JP-21', 'JP-10', 'JP-34', 'JP-01', 'JP-28', 'JP-08', 'JP-17', 'JP-03', 'JP-37', 'JP-46', 'JP-14', 'JP-39', 'JP-43', 'JP-26', 'JP-24', 'JP-04', 'JP-45', 'JP-20', 'JP-42', 'JP-29', 'JP-15', 'JP-44', 'JP-33', 'JP-47', 'JP-27', 'JP-41', 'JP-11', 'JP-25', 'JP-32', 'JP-22', 'JP-09', 'JP-36', 'JP-13', 'JP-31', 'JP-16', 'JP-30', 'JP-06', 'JP-35', 'JP-19', 'JHR', 'KDH', 'KTN', 'KUL', 'LBN', 'MLK', 'NSN', 'PHG', 'PNG', 'PRK', 'PLS', 'PJY', 'SBH', 'SWK', 'SGR', 'TRG', 'AGU', 'BCN', 'BCS', 'CAM', 'CHP', 'CHH', 'CMX', 'COA', 'COL', 'DUR', 'GUA', 'GRO', 'HID', 'JAL', 'MIC', 'MOR', 'MEX', 'NAY', 'NLE', 'OAX', 'PUE', 'QUE', 'ROO', 'SLP', 'SIN', 'SON', 'TAB', 'TAM', 'TLA', 'VER', 'YUC', 'ZAC', 'AUK', 'BOP', 'CAN', 'CIT', 'GIS', 'HKB', 'MWT', 'MBH', 'NSN', 'NTL', 'OTA', 'STL', 'TKI', 'TAS', 'WKO', 'WGN', 'WTC', 'JK', 'BA', 'GB', 'IS', 'KP', 'PB', 'SD', 'AMA', 'ANC', 'APU', 'ARE', 'AYA', 'CAJ', 'CAL', 'CUS', 'HUV', 'HUC', 'ICA', 'JUN', 'LAL', 'LAM', 'LIM', 'LOR', 'MDD', 'MOQ', 'PAS', 'PIU', 'PUN', 'SAM', 'TAC', 'TUM', 'UCA', 'PH-ABR', 'PH-AGN', 'PH-AGS', 'PH-AKL', 'PH-ALB', 'PH-ANT', 'PH-APA', 'PH-AUR', 'PH-BAS', 'PH-BAN', 'PH-BTN', 'PH-BTG', 'PH-BEN', 'PH-BIL', 'PH-BOH', 'PH-BUK', 'PH-BUL', 'PH-CAG', 'PH-CAN', 'PH-CAS', 'PH-CAM', 'PH-CAP', 'PH-CAT', 'PH-CAV', 'PH-CEB', 'PH-NCO', 'PH-DAO', 'PH-DAV', 'PH-DAS', 'PH-EAS', 'PH-GUI', 'PH-IFU', 'PH-ILN', 'PH-ILS', 'PH-ILI', 'PH-ISA', 'PH-KAL', 'PH-LUN', 'PH-LAG', 'PH-LAN', 'PH-LAS', 'PH-LEY', 'PH-MAG', 'PH-MAD', 'PH-MAS', 'PH-00', 'PH-MSC', 'PH-MSR', 'PH-MOU', 'PH-NEC', 'PH-NER', 'PH-NSA', 'PH-NUE', 'PH-NUV', 'PH-MDC', 'PH-MDR', 'PH-PLW', 'PH-PAM', 'PH-PAN', 'PH-QUE', 'PH-QUI', 'PH-RIZ', 'PH-ROM', 'PH-WSA', 'PH-SAR', 'PH-SIG', 'PH-SOR', 'PH-SCO', 'PH-SLE', 'PH-SUK', 'PH-SLU', 'PH-SUN', 'PH-SUR', 'PH-TAR', 'PH-TAW', 'PH-ZMB', 'PH-ZAN', 'PH-ZAS', 'PH-ZSI', 'PT-20', 'PT-01', 'PT-02', 'PT-03', 'PT-04', 'PT-05', 'PT-06', 'PT-07', 'PT-08', 'PT-09', 'PT-10', 'PT-11', 'PT-30', 'PT-12', 'PT-13', 'PT-14', 'PT-15', 'PT-16', 'PT-17', 'PT-18', 'AB', 'AR', 'AG', 'BC', 'BH', 'BN', 'BT', 'BR', 'BV', 'B', 'BZ', 'CL', 'CS', 'CJ', 'CT', 'CV', 'DB', 'DJ', 'GL', 'GR', 'GJ', 'HR', 'HD', 'IL', 'IS', 'IF', 'MM', 'MH', 'MS', 'NT', 'OT', 'PH', 'SJ', 'SM', 'SB', 'SV', 'TR', 'TM', 'TL', 'VL', 'VS', 'VN', 'KR-26', 'KR-43', 'KR-44', 'KR-27', 'KR-30', 'KR-42', 'KR-29', 'KR-47', 'KR-41', 'KR-48', 'KR-28', 'KR-49', 'KR-45', 'KR-46', 'KR-50', 'KR-11', 'KR-31', 'C', 'VI', 'AB', 'A', 'AL', 'O', 'AV', 'BA', 'PM', 'B', 'BU', 'CC', 'CA', 'S', 'CS', 'CE', 'CR', 'CO', 'CU', 'GI', 'GR', 'GU', 'SS', 'H', 'HU', 'J', 'LO', 'GC', 'LE', 'L', 'LU', 'M', 'MA', 'ML', 'MU', 'NA', 'OR', 'P', 'PO', 'SA', 'TF', 'SG', 'SE', 'SO', 'T', 'TE', 'TO', 'V', 'VA', 'BI', 'ZA', 'Z', 'AZ', 'AJ', 'DU', 'FU', 'RK', 'SH', 'UQ', 'BFP', 'ENG', 'NIR', 'SCT', 'WLS', 'AR', 'CA', 'CL', 'CO', 'DU', 'FS', 'FD', 'LA', 'MA', 'MO', 'PA', 'RN', 'RV', 'RO', 'SA', 'SJ', 'SO', 'TA', 'TT'
## Respuestas
Status of api action
Success message
Shipping zone data
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/store/shipping-zone' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "North zone",
"countries": [
{
"code": "US",
"states": [
{}
]
}
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-zone', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "name": "North zone", "countries": [{"code": "US", "states": [{}]}]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/store/shipping-zone',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "name": "North zone", "countries": [{"code": "US", "states": [{}]}]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'name': 'North zone', 'countries': [{'code': 'US', 'states': [{}]}]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create/Update Store Settings
Source: https://developers.leadwaycrm.com/api-reference/store/store-create-store-setting
Create or update store settings by altId and altType.
Create or update store settings by altId and altType.
```http theme={null}
POST https://services.leadconnectorhq.com/store/store-setting
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id or Agency Id
Posibles valores: 'account'
Shipping origin address
Store order notification email
Store order fulfillment notification email
## Respuestas
Status of api action
Success message
Shipping carrier data
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/store/store-setting' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/store-setting', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/store/store-setting',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete shipping carrier
Source: https://developers.leadwaycrm.com/api-reference/store/store-delete-shipping-carrier
Delete specific shipping carrier with Id :shippingCarrierId
Delete specific shipping carrier with Id :shippingCarrierId
```http theme={null}
DELETE https://services.leadconnectorhq.com/store/shipping-carrier/{shippingCarrierId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the shipping carrier that needs to be returned
## Query parameters
Account Id or Agency Id
## Respuestas
Status of api action
Success message
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/store/shipping-carrier/YOUR_shippingCarrierId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-carrier/YOUR_shippingCarrierId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/store/shipping-carrier/YOUR_shippingCarrierId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete shipping rate
Source: https://developers.leadwaycrm.com/api-reference/store/store-delete-shipping-rate
Delete specific shipping rate with Id :shippingRateId
Delete specific shipping rate with Id :shippingRateId
```http theme={null}
DELETE https://services.leadconnectorhq.com/store/shipping-zone/{shippingZoneId}/shipping-rate/{shippingRateId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the shipping zone
ID of the shipping rate that needs to be returned
## Query parameters
Account Id or Agency Id
## Respuestas
Status of api action
Success message
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate/YOUR_shippingRateId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate/YOUR_shippingRateId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate/YOUR_shippingRateId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete shipping zone
Source: https://developers.leadwaycrm.com/api-reference/store/store-delete-shipping-zone
Delete specific shipping zone with Id :shippingZoneId
Delete specific shipping zone with Id :shippingZoneId
```http theme={null}
DELETE https://services.leadconnectorhq.com/store/shipping-zone/{shippingZoneId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the item that needs to be returned
## Query parameters
Account Id or Agency Id
## Respuestas
Status of api action
Success message
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get available shipping rates
Source: https://developers.leadwaycrm.com/api-reference/store/store-get-available-shipping-zones
This return available shipping rates for country based on order amount
This return available shipping rates for country based on order amount
```http theme={null}
POST https://services.leadconnectorhq.com/store/shipping-zone/shipping-rates
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Account Id or Agency Id
Posibles valores: 'account'
Country code of the customer Posibles valores: 'US', 'CA', 'AF', 'AX', 'AL', 'DZ', 'AS', 'AD', 'AO', 'AI', 'AQ', 'AG', 'AR', 'AM', 'AW', 'AU', 'AT', 'AZ', 'BS', 'BH', 'BD', 'BB', 'BY', 'BE', 'BZ', 'BJ', 'BM', 'BT', 'BO', 'BA', 'BW', 'BV', 'BR', 'IO', 'BN', 'BG', 'BF', 'BI', 'KH', 'CM', 'CV', 'KY', 'CF', 'TD', 'CL', 'CN', 'CX', 'CC', 'CO', 'KM', 'CG', 'CD', 'CK', 'CR', 'CI', 'HR', 'CU', 'CY', 'CZ', 'DK', 'DJ', 'DM', 'DO', 'EC', 'EG', 'SV', 'GQ', 'ER', 'EE', 'ET', 'FK', 'FO', 'FJ', 'FI', 'FR', 'GF', 'PF', 'TF', 'GA', 'GM', 'GE', 'DE', 'GH', 'GI', 'GR', 'GL', 'GD', 'GP', 'GU', 'GT', 'GG', 'GN', 'GW', 'GY', 'HT', 'HM', 'VA', 'HN', 'HK', 'HU', 'IS', 'IN', 'ID', 'IR', 'IQ', 'IE', 'IM', 'IL', 'IT', 'JM', 'JP', 'JE', 'JO', 'KZ', 'KE', 'KI', 'KP', 'XK', 'KW', 'KG', 'LA', 'LV', 'LB', 'LS', 'LR', 'LY', 'LI', 'LT', 'LU', 'MO', 'MK', 'MG', 'MW', 'MY', 'MV', 'ML', 'MT', 'MH', 'MQ', 'MR', 'MU', 'YT', 'MX', 'FM', 'MD', 'MC', 'MN', 'ME', 'MS', 'MA', 'MZ', 'MM', 'NA', 'NR', 'NP', 'NL', 'AN', 'NC', 'NZ', 'NI', 'NE', 'NG', 'NU', 'NF', 'MP', 'NO', 'OM', 'PK', 'PW', 'PS', 'PA', 'PG', 'PY', 'PE', 'PH', 'PN', 'PL', 'PT', 'PR', 'QA', 'RE', 'RO', 'RU', 'RW', 'SH', 'KN', 'LC', 'MF', 'PM', 'VC', 'WS', 'SM', 'ST', 'SA', 'SN', 'RS', 'SC', 'SL', 'SG', 'SX', 'SK', 'SI', 'SB', 'SO', 'ZA', 'GS', 'KR', 'ES', 'LK', 'SD', 'SR', 'SJ', 'SZ', 'SE', 'CH', 'SY', 'TW', 'TJ', 'TZ', 'TH', 'TL', 'TG', 'TK', 'TO', 'TT', 'TN', 'TR', 'TM', 'TC', 'TV', 'UG', 'UA', 'AE', 'GB', 'UM', 'UY', 'UZ', 'VU', 'VE', 'VN', 'VG', 'VI', 'WF', 'EH', 'YE', 'ZM', 'ZW'
Address of the customer
it will not calculate the order amount form backend if it is true Posibles valores: 'AF', 'AX', 'AL', 'DZ', 'AS', 'AD', 'AO', 'AI', 'AQ', 'AG', 'AR', 'AM', 'AW', 'AU', 'AT', 'AZ', 'BS', 'BH', 'BD', 'BB', 'BY', 'BE', 'BZ', 'BJ', 'BM', 'BT', 'BO', 'BA', 'BW', 'BV', 'BR', 'IO', 'BN', 'BG', 'BF', 'BI', 'KH', 'CM', 'CA', 'CV', 'KY', 'CF', 'TD', 'CL', 'CN', 'CX', 'CC', 'CO', 'KM', 'CG', 'CD', 'CK', 'CR', 'CI', 'HR', 'CU', 'CY', 'CZ', 'DK', 'DJ', 'DM', 'DO', 'EC', 'EG', 'SV', 'GQ', 'ER', 'EE', 'ET', 'FK', 'FO', 'FJ', 'FI', 'FR', 'GF', 'PF', 'TF', 'GA', 'GM', 'GE', 'DE', 'GH', 'GI', 'GR', 'GL', 'GD', 'GP', 'GU', 'GT', 'GG', 'GN', 'GW', 'GY', 'HT', 'HM', 'VA', 'HN', 'HK', 'HU', 'IS', 'IN', 'ID', 'IR', 'IQ', 'IE', 'IM', 'IL', 'IT', 'JM', 'JP', 'JE', 'JO', 'KZ', 'KE', 'KI', 'KP', 'KR', 'XK', 'KW', 'KG', 'LA', 'LV', 'LB', 'LS', 'LR', 'LY', 'LI', 'LT', 'LU', 'MO', 'MK', 'MG', 'MW', 'MY', 'MV', 'ML', 'MT', 'MH', 'MQ', 'MR', 'MU', 'YT', 'MX', 'FM', 'MD', 'MC', 'MN', 'ME', 'MS', 'MA', 'MZ', 'MM', 'NA', 'NR', 'NP', 'NL', 'AN', 'NC', 'NZ', 'NI', 'NE', 'NG', 'NU', 'NF', 'MP', 'NO', 'OM', 'PK', 'PW', 'PS', 'PA', 'PG', 'PY', 'PE', 'PH', 'PN', 'PL', 'PT', 'PR', 'QA', 'RE', 'RO', 'RU', 'RW', 'SH', 'KN', 'LC', 'MF', 'PM', 'VC', 'WS', 'SM', 'ST', 'SA', 'SN', 'RS', 'SC', 'SL', 'SG', 'SX', 'SK', 'SI', 'SB', 'SO', 'ZA', 'GS', 'ES', 'LK', 'SD', 'SR', 'SJ', 'SZ', 'SE', 'CH', 'SY', 'TW', 'TJ', 'TZ', 'TH', 'TL', 'TG', 'TK', 'TO', 'TT', 'TN', 'TR', 'TM', 'TC', 'TV', 'UG', 'GB', 'UA', 'AE', 'US', 'UM', 'UY', 'UZ', 'VU', 'VE', 'VN', 'VG', 'VI', 'WF', 'EH', 'YE', 'ZM', 'ZW'
The amount of the price. ( min: 0.01 )
Flag to pass when the weight is already calculated and should not calculate again
Estimated weight of the order calculated from the order creation side in kg(s)
Source of the order
An array of price IDs and quantity
id of product
No of quantities
Coupon code
## Respuestas
Status of api action
Success message
Shipping rate data
Name of the shipping zone
Delivery description
The currency of the amount of the rate / handling fee
The amount of the shipping rate if it is normal rate (0 means free ). Fixed Handling fee if it is a carrier rate (it will add to the carrier rate).
is this a carrier rate
Shipping carrier id
Percentage of rate fee if it is a carrier rate.
An array of items
Name of the shipping carrier service
Value of the shipping carrier service
The unique identifier for the product.
The unique identifier for the shipping zone.
```json theme={null}
{
"status": true,
"message": "Successfully created",
"data": [
{
"name": "North zone",
"description": "Ships next day",
"currency": "USD",
"amount": 99.99,
"isCarrierRate": true,
"shippingCarrierId": "655b33a82209e60b6adb87a5",
"percentageOfRateFee": 10.99,
"shippingCarrierServices": [
{}
],
"_id": "655b33a82209e60b6adb87a5",
"shippingZoneId": "655b33a82209e60b6adb87a5"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/store/shipping-zone/shipping-rates' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"country": "US",
"amountAvailable": "US",
"totalOrderAmount": 99.99,
"weightAvailable": true,
"totalOrderWeight": 10,
"source": {
"type": "order",
"subType": "store"
},
"products": [
{
"id": "string",
"qty": 0
}
],
"couponCode": "TEST"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-zone/shipping-rates', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "country": "US", "amountAvailable": "US", "totalOrderAmount": 99.99, "weightAvailable": true, "totalOrderWeight": 10, "source": {"type": "order", "subType": "store"}, "products": [{"id": "string", "qty": 0}], "couponCode": "TEST"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/store/shipping-zone/shipping-rates',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "country": "US", "amountAvailable": "US", "totalOrderAmount": 99.99, "weightAvailable": true, "totalOrderWeight": 10, "source": {"type": "order", "subType": "store"}, "products": [{"id": "string", "qty": 0}], "couponCode": "TEST"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'country': 'US', 'amountAvailable': 'US', 'totalOrderAmount': 99.99, 'weightAvailable': true, 'totalOrderWeight': 10, 'source': {'type': 'order', 'subType': 'store'}, 'products': [{'id': 'string', 'qty': 0}], 'couponCode': 'TEST'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Shipping Carrier
Source: https://developers.leadwaycrm.com/api-reference/store/store-get-shipping-carriers
The "List Shipping Carrier" API allows to retrieve a paginated list of shipping carrier.
The "List Shipping Carrier" API allows to retrieve a paginated list of shipping carrier.
```http theme={null}
GET https://services.leadconnectorhq.com/store/shipping-carrier/{shippingCarrierId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the shipping carrier that needs to be returned
## Query parameters
Account Id or Agency Id
## Respuestas
Status of api action
Success message
Shipping carrier data
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/store/shipping-carrier/YOUR_shippingCarrierId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-carrier/YOUR_shippingCarrierId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/store/shipping-carrier/YOUR_shippingCarrierId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Shipping Rate
Source: https://developers.leadwaycrm.com/api-reference/store/store-get-shipping-rates
The "List Shipping Rate" API allows to retrieve a paginated list of shipping rate.
The "List Shipping Rate" API allows to retrieve a paginated list of shipping rate.
```http theme={null}
GET https://services.leadconnectorhq.com/store/shipping-zone/{shippingZoneId}/shipping-rate/{shippingRateId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the shipping zone
ID of the shipping rate that needs to be returned
## Query parameters
Account Id or Agency Id
## Respuestas
Status of api action
Success message
Shipping zone data
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate/YOUR_shippingRateId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate/YOUR_shippingRateId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate/YOUR_shippingRateId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Shipping Zone
Source: https://developers.leadwaycrm.com/api-reference/store/store-get-shipping-zones
The "List Shipping Zone" API allows to retrieve a paginated list of shipping zone.
The "List Shipping Zone" API allows to retrieve a paginated list of shipping zone.
```http theme={null}
GET https://services.leadconnectorhq.com/store/shipping-zone/{shippingZoneId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the item that needs to be returned
## Query parameters
Account Id or Agency Id
Include shipping rates array
## Respuestas
Status of api action
Success message
Shipping zone data
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Store Settings
Source: https://developers.leadwaycrm.com/api-reference/store/store-get-store-settings
Get store settings by altId and altType.
Get store settings by altId and altType.
```http theme={null}
GET https://services.leadconnectorhq.com/store/store-setting
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id or Agency Id
## Respuestas
Status of api action
Success message
Shipping carrier data
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/store/store-setting' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/store-setting', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/store/store-setting',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Shipping Carriers
Source: https://developers.leadwaycrm.com/api-reference/store/store-list-shipping-carriers
The "List Shipping Carrier" API allows to retrieve a list of shipping carrier.
The "List Shipping Carrier" API allows to retrieve a list of shipping carrier.
```http theme={null}
GET https://services.leadconnectorhq.com/store/shipping-carrier
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id or Agency Id
## Respuestas
Status of api action
Success message
An array of items
Account Id or Agency Id
Posibles valores: 'account'
Name of the shipping carrier
The URL endpoint that GHL needs to retrieve shipping rates. This must be a public URL.
An array of available shipping carrier services
Name of the shipping carrier service
Value of the shipping carrier service
The seller can choose multiple services while creating shipping rates if this is true.
The unique identifier for the product.
The unique identifier for the marketplace app.
created at
updated at
```json theme={null}
{
"status": true,
"message": "Successfully created",
"data": [
{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "FedEx",
"callbackUrl": "https://example.com/get-shipping-rates",
"services": [
{}
],
"allowsMultipleServiceSelection": true,
"_id": "655b33a82209e60b6adb87a5",
"marketplaceAppId": "655b33a82209e60b6adb87a5",
"createdAt": "2023-12-12T09:27:42.355Z",
"updatedAt": "2023-12-12T09:27:42.355Z"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/store/shipping-carrier' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-carrier', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/store/shipping-carrier',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Shipping Rates
Source: https://developers.leadwaycrm.com/api-reference/store/store-list-shipping-rates
The "List Shipping Rate" API allows to retrieve a list of shipping rate.
The "List Shipping Rate" API allows to retrieve a list of shipping rate.
```http theme={null}
GET https://services.leadconnectorhq.com/store/shipping-zone/{shippingZoneId}/shipping-rate
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the item that needs to be returned
## Query parameters
Account Id or Agency Id
The maximum number of items to be included in a single page of results
The starting index of the page, indicating the position from which the results should be retrieved.
## Respuestas
Total number of items
An array of items
Account Id or Agency Id
Posibles valores: 'account'
Name of the shipping zone
Delivery description
The currency of the amount of the rate / handling fee
The amount of the shipping rate if it is normal rate (0 means free ). Fixed Handling fee if it is a carrier rate (it will add to the carrier rate).
Type of condition to provide the conditional pricing Posibles valores: 'none', 'price', 'weight'
Minimum condition for applying this price. set 0 or null if there is no minimum
Maximum condition for applying this price. set 0 or null if there is no maximum
is this a carrier rate
Shipping carrier id
Percentage of rate fee if it is a carrier rate.
An array of items
Name of the shipping carrier service
Value of the shipping carrier service
The unique identifier for the product.
The unique identifier for the shipping zone.
created at
updated at
```json theme={null}
{
"total": 20,
"data": [
{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "North zone",
"description": "Ships next day",
"currency": "USD",
"amount": 99.99,
"conditionType": "price",
"minCondition": 99.99,
"maxCondition": 99.99,
"isCarrierRate": true,
"shippingCarrierId": "655b33a82209e60b6adb87a5",
"percentageOfRateFee": 10.99,
"shippingCarrierServices": [
{}
],
"_id": "655b33a82209e60b6adb87a5",
"shippingZoneId": "655b33a82209e60b6adb87a5",
"createdAt": "2023-12-12T09:27:42.355Z",
"updatedAt": "2023-12-12T09:27:42.355Z"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Shipping Zones
Source: https://developers.leadwaycrm.com/api-reference/store/store-list-shipping-zones
The "List Shipping Zone" API allows to retrieve a list of shipping zone.
The "List Shipping Zone" API allows to retrieve a list of shipping zone.
```http theme={null}
GET https://services.leadconnectorhq.com/store/shipping-zone
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id or Agency Id
The maximum number of items to be included in a single page of results
The starting index of the page, indicating the position from which the results should be retrieved.
Include shipping rates array
## Respuestas
Total number of items
An array of items
Account Id or Agency Id
Posibles valores: 'account'
Name of the shipping zone
List of countries that are available
Country code Posibles valores: \['US', 'CA', 'AF', 'AX', 'AL', 'DZ', 'AS', 'AD', 'AO', 'AI', 'AQ', 'AG', 'AR', 'AM', 'AW', 'AU', 'AT', 'AZ', 'BS', 'BH', 'BD', 'BB', 'BY', 'BE', 'BZ', 'BJ', 'BM', 'BT', 'BO', 'BA', 'BW', 'BV', 'BR', 'IO', 'BN', 'BG', 'BF', 'BI', 'KH', 'CM', 'CV', 'KY', 'CF', 'TD', 'CL', 'CN', 'CX', 'CC', 'CO', 'KM', 'CG', 'CD', 'CK', 'CR', 'CI', 'HR', 'CU', 'CY', 'CZ', 'DK', 'DJ', 'DM', 'DO', 'EC', 'EG', 'SV', 'GQ', 'ER', 'EE', 'ET', 'FK', 'FO', 'FJ', 'FI', 'FR', 'GF', 'PF', 'TF', 'GA', 'GM', 'GE', 'DE', 'GH', 'GI', 'GR', 'GL', 'GD', 'GP', 'GU', 'GT', 'GG', 'GN', 'GW', 'GY', 'HT', 'HM', 'VA', 'HN', 'HK', 'HU', 'IS', 'IN', 'ID', 'IR', 'IQ', 'IE', 'IM', 'IL', 'IT', 'JM', 'JP', 'JE', 'JO', 'KZ', 'KE', 'KI', 'KP', 'XK', 'KW', 'KG', 'LA', 'LV', 'LB', 'LS', 'LR', 'LY', 'LI', 'LT', 'LU', 'MO', 'MK', 'MG', 'MW', 'MY', 'MV', 'ML', 'MT', 'MH', 'MQ', 'MR', 'MU', 'YT', 'MX', 'FM', 'MD', 'MC', 'MN', 'ME', 'MS', 'MA', 'MZ', 'MM', 'NA', 'NR', 'NP', 'NL', 'AN', 'NC', 'NZ', 'NI', 'NE', 'NG', 'NU', 'NF', 'MP', 'NO', 'OM', 'PK', 'PW', 'PS', 'PA', 'PG', 'PY', 'PE', 'PH', 'PN', 'PL', 'PT', 'PR', 'QA', 'RE', 'RO', 'RU', 'RW', 'SH', 'KN', 'LC', 'MF', 'PM', 'VC', 'WS', 'SM', 'ST', 'SA', 'SN', 'RS', 'SC', 'SL', 'SG', 'SX', 'SK', 'SI', 'SB', 'SO', 'ZA', 'GS', 'KR', 'ES', 'LK', 'SD', 'SR', 'SJ', 'SZ', 'SE', 'CH', 'SY', 'TW', 'TJ', 'TZ', 'TH', 'TL', 'TG', 'TK', 'TO', 'TT', 'TN', 'TR', 'TM', 'TC', 'TV', 'UG', 'UA', 'AE', 'GB', 'UM', 'UY', 'UZ', 'VU', 'VE', 'VN', 'VG', 'VI', 'WF', 'EH', 'YE', 'ZM', 'ZW']
List of states that are available. If states is empty, then all states are available
State code Posibles valores: 'AL', 'AK', 'AS', 'AZ', 'AR', 'AA', 'AE', 'AP', 'CA', 'CO', 'CT', 'DE', 'DC', 'FM', 'FL', 'GA', 'GU', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MH', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'MP', 'OH', 'OK', 'OR', 'PW', 'PA', 'PR', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VI', 'VA', 'WA', 'WV', 'WI', 'WY', 'AB', 'BC', 'MB', 'NB', 'NL', 'NT', 'NS', 'NU', 'ON', 'PE', 'QC', 'SK', 'YT', 'BA', 'CT', 'CC', 'CH', 'CB', 'CN', 'ER', 'FO', 'JY', 'LP', 'LR', 'MZ', 'MN', 'NQ', 'RN', 'SA', 'SJ', 'SL', 'SC', 'SF', 'SE', 'TF', 'TU', 'ACT', 'NSW', 'NT', 'QLD', 'SA', 'TAS', 'VIC', 'WA', 'AC', 'AL', 'AM', 'AP', 'BA', 'CE', 'DF', 'ES', 'GO', 'MA', 'MG', 'MS', 'MT', 'PA', 'PB', 'PE', 'PI', 'PR', 'RJ', 'RN', 'RO', 'RR', 'RS', 'SC', 'SE', 'SP', 'TO', 'AI', 'AN', 'AP', 'AT', 'BI', 'CO', 'AR', 'LI', 'LL', 'LR', 'MA', 'ML', 'RM', 'TA', 'VS', 'NB', 'AMA', 'ANT', 'ARA', 'ATL', 'BOL', 'BOY', 'CAL', 'CAQ', 'CAS', 'CAU', 'CES', 'CHO', 'CUN', 'COR', 'GUA', 'GUV', 'HUI', 'LAG', 'MAG', 'MET', 'NAR', 'NSA', 'PUT', 'QUI', 'RIS', 'SAP', 'SAN', 'SUC', 'TOL', 'VAC', 'VAU', 'VID', 'CR-A', 'CR-C', 'CR-G', 'CR-H', 'CR-L', 'CR-P', 'CR-SJ', 'GT-16', 'GT-15', 'GT-04', 'GT-20', 'GT-02', 'GT-05', 'GT-01', 'GT-13', 'GT-18', 'GT-21', 'GT-22', 'GT-17', 'GT-09', 'GT-14', 'GT-11', 'GT-03', 'GT-12', 'GT-06', 'GT-07', 'GT-10', 'GT-08', 'GT-19', 'HK', 'KL', 'NT', 'AN', 'AP', 'AR', 'AS', 'BR', 'CH', 'CG', 'DN', 'DD', 'DL', 'GA', 'GJ', 'HR', 'HP', 'JK', 'JH', 'KA', 'KL', 'LA', 'LD', 'MP', 'MH', 'MN', 'ML', 'MZ', 'NL', 'OR', 'PY', 'PB', 'RJ', 'SK', 'TN', 'TS', 'TR', 'UP', 'UK', 'WB', 'CW', 'CN', 'CE', 'CO', 'DL', 'D', 'G', 'KY', 'KE', 'KK', 'LS', 'LM', 'LK', 'LD', 'LH', 'MO', 'MH', 'MN', 'OY', 'RN', 'SO', 'TA', 'WD', 'WH', 'WX', 'WW', 'AG', 'AL', 'AN', 'AO', 'AR', 'AP', 'AT', 'AV', 'BA', 'BT', 'BL', 'BN', 'BG', 'BI', 'BO', 'BZ', 'BS', 'BR', 'CA', 'CL', 'CB', 'CI', 'CE', 'CT', 'CZ', 'CH', 'CO', 'CS', 'CR', 'KR', 'CN', 'EN', 'FM', 'FE', 'FI', 'FG', 'FC', 'FR', 'GE', 'GO', 'GR', 'IM', 'IS', 'AQ', 'SP', 'LT', 'LE', 'LC', 'LI', 'LO', 'LU', 'MC', 'MN', 'MS', 'MT', 'VS', 'ME', 'MI', 'MO', 'MB', 'NA', 'NO', 'NU', 'OG', 'OT', 'OR', 'PD', 'PA', 'PR', 'PV', 'PG', 'PU', 'PE', 'PC', 'PI', 'PT', 'PN', 'PZ', 'PO', 'RG', 'RA', 'RC', 'RE', 'RI', 'RN', 'RM', 'RO', 'SA', 'SS', 'SV', 'SI', 'SR', 'SO', 'TA', 'TE', 'TR', 'TO', 'TP', 'TN', 'TV', 'TS', 'UD', 'VA', 'VE', 'VB', 'VC', 'VR', 'VV', 'VI', 'VT', 'JP-23', 'JP-05', 'JP-02', 'JP-12', 'JP-38', 'JP-18', 'JP-40', 'JP-07', 'JP-21', 'JP-10', 'JP-34', 'JP-01', 'JP-28', 'JP-08', 'JP-17', 'JP-03', 'JP-37', 'JP-46', 'JP-14', 'JP-39', 'JP-43', 'JP-26', 'JP-24', 'JP-04', 'JP-45', 'JP-20', 'JP-42', 'JP-29', 'JP-15', 'JP-44', 'JP-33', 'JP-47', 'JP-27', 'JP-41', 'JP-11', 'JP-25', 'JP-32', 'JP-22', 'JP-09', 'JP-36', 'JP-13', 'JP-31', 'JP-16', 'JP-30', 'JP-06', 'JP-35', 'JP-19', 'JHR', 'KDH', 'KTN', 'KUL', 'LBN', 'MLK', 'NSN', 'PHG', 'PNG', 'PRK', 'PLS', 'PJY', 'SBH', 'SWK', 'SGR', 'TRG', 'AGU', 'BCN', 'BCS', 'CAM', 'CHP', 'CHH', 'CMX', 'COA', 'COL', 'DUR', 'GUA', 'GRO', 'HID', 'JAL', 'MIC', 'MOR', 'MEX', 'NAY', 'NLE', 'OAX', 'PUE', 'QUE', 'ROO', 'SLP', 'SIN', 'SON', 'TAB', 'TAM', 'TLA', 'VER', 'YUC', 'ZAC', 'AUK', 'BOP', 'CAN', 'CIT', 'GIS', 'HKB', 'MWT', 'MBH', 'NSN', 'NTL', 'OTA', 'STL', 'TKI', 'TAS', 'WKO', 'WGN', 'WTC', 'JK', 'BA', 'GB', 'IS', 'KP', 'PB', 'SD', 'AMA', 'ANC', 'APU', 'ARE', 'AYA', 'CAJ', 'CAL', 'CUS', 'HUV', 'HUC', 'ICA', 'JUN', 'LAL', 'LAM', 'LIM', 'LOR', 'MDD', 'MOQ', 'PAS', 'PIU', 'PUN', 'SAM', 'TAC', 'TUM', 'UCA', 'PH-ABR', 'PH-AGN', 'PH-AGS', 'PH-AKL', 'PH-ALB', 'PH-ANT', 'PH-APA', 'PH-AUR', 'PH-BAS', 'PH-BAN', 'PH-BTN', 'PH-BTG', 'PH-BEN', 'PH-BIL', 'PH-BOH', 'PH-BUK', 'PH-BUL', 'PH-CAG', 'PH-CAN', 'PH-CAS', 'PH-CAM', 'PH-CAP', 'PH-CAT', 'PH-CAV', 'PH-CEB', 'PH-NCO', 'PH-DAO', 'PH-DAV', 'PH-DAS', 'PH-EAS', 'PH-GUI', 'PH-IFU', 'PH-ILN', 'PH-ILS', 'PH-ILI', 'PH-ISA', 'PH-KAL', 'PH-LUN', 'PH-LAG', 'PH-LAN', 'PH-LAS', 'PH-LEY', 'PH-MAG', 'PH-MAD', 'PH-MAS', 'PH-00', 'PH-MSC', 'PH-MSR', 'PH-MOU', 'PH-NEC', 'PH-NER', 'PH-NSA', 'PH-NUE', 'PH-NUV', 'PH-MDC', 'PH-MDR', 'PH-PLW', 'PH-PAM', 'PH-PAN', 'PH-QUE', 'PH-QUI', 'PH-RIZ', 'PH-ROM', 'PH-WSA', 'PH-SAR', 'PH-SIG', 'PH-SOR', 'PH-SCO', 'PH-SLE', 'PH-SUK', 'PH-SLU', 'PH-SUN', 'PH-SUR', 'PH-TAR', 'PH-TAW', 'PH-ZMB', 'PH-ZAN', 'PH-ZAS', 'PH-ZSI', 'PT-20', 'PT-01', 'PT-02', 'PT-03', 'PT-04', 'PT-05', 'PT-06', 'PT-07', 'PT-08', 'PT-09', 'PT-10', 'PT-11', 'PT-30', 'PT-12', 'PT-13', 'PT-14', 'PT-15', 'PT-16', 'PT-17', 'PT-18', 'AB', 'AR', 'AG', 'BC', 'BH', 'BN', 'BT', 'BR', 'BV', 'B', 'BZ', 'CL', 'CS', 'CJ', 'CT', 'CV', 'DB', 'DJ', 'GL', 'GR', 'GJ', 'HR', 'HD', 'IL', 'IS', 'IF', 'MM', 'MH', 'MS', 'NT', 'OT', 'PH', 'SJ', 'SM', 'SB', 'SV', 'TR', 'TM', 'TL', 'VL', 'VS', 'VN', 'KR-26', 'KR-43', 'KR-44', 'KR-27', 'KR-30', 'KR-42', 'KR-29', 'KR-47', 'KR-41', 'KR-48', 'KR-28', 'KR-49', 'KR-45', 'KR-46', 'KR-50', 'KR-11', 'KR-31', 'C', 'VI', 'AB', 'A', 'AL', 'O', 'AV', 'BA', 'PM', 'B', 'BU', 'CC', 'CA', 'S', 'CS', 'CE', 'CR', 'CO', 'CU', 'GI', 'GR', 'GU', 'SS', 'H', 'HU', 'J', 'LO', 'GC', 'LE', 'L', 'LU', 'M', 'MA', 'ML', 'MU', 'NA', 'OR', 'P', 'PO', 'SA', 'TF', 'SG', 'SE', 'SO', 'T', 'TE', 'TO', 'V', 'VA', 'BI', 'ZA', 'Z', 'AZ', 'AJ', 'DU', 'FU', 'RK', 'SH', 'UQ', 'BFP', 'ENG', 'NIR', 'SCT', 'WLS', 'AR', 'CA', 'CL', 'CO', 'DU', 'FS', 'FD', 'LA', 'MA', 'MO', 'PA', 'RN', 'RV', 'RO', 'SA', 'SJ', 'SO', 'TA', 'TT'
The unique identifier for the product.
Array of shipping rates under this shipping zone
Account Id or Agency Id
Posibles valores: 'account'
Name of the shipping zone
Delivery description
The currency of the amount of the rate / handling fee
The amount of the shipping rate if it is normal rate (0 means free ). Fixed Handling fee if it is a carrier rate (it will add to the carrier rate).
Type of condition to provide the conditional pricing Posibles valores: 'none', 'price', 'weight'
Minimum condition for applying this price. set 0 or null if there is no minimum
Maximum condition for applying this price. set 0 or null if there is no maximum
is this a carrier rate
Shipping carrier id
Percentage of rate fee if it is a carrier rate.
An array of items
Name of the shipping carrier service
Value of the shipping carrier service
The unique identifier for the product.
The unique identifier for the shipping zone.
created at
updated at
created at
updated at
```json theme={null}
{
"total": 20,
"data": [
{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "North zone",
"countries": [
{}
],
"_id": "655b33a82209e60b6adb87a5",
"shippingRates": [
{}
],
"createdAt": "2023-12-12T09:27:42.355Z",
"updatedAt": "2023-12-12T09:27:42.355Z"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/store/shipping-zone' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-zone', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/store/shipping-zone',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Shipping Carrier
Source: https://developers.leadwaycrm.com/api-reference/store/store-update-shipping-carrier
The "update Shipping Carrier" API allows update a shipping carrier to the system.
The "update Shipping Carrier" API allows update a shipping carrier to the system.
```http theme={null}
PUT https://services.leadconnectorhq.com/store/shipping-carrier/{shippingCarrierId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the shipping carrier that needs to be returned
## Body
Account Id or Agency Id
Posibles valores: 'account'
Name of the shipping carrier
The URL endpoint that GHL needs to retrieve shipping rates. This must be a public URL.
An array of available shipping carrier services
Name of the shipping carrier service
Value of the shipping carrier service
The seller can choose multiple services while creating shipping rates if this is true.
## Respuestas
Status of api action
Success message
Shipping carrier data
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/store/shipping-carrier/YOUR_shippingCarrierId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "FedEx",
"callbackUrl": "https://example.com/get-shipping-rates",
"services": [
{
"name": "Priority Mail Express International",
"value": "PriorityMailExpressInternational"
}
],
"allowsMultipleServiceSelection": true
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-carrier/YOUR_shippingCarrierId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "name": "FedEx", "callbackUrl": "https://example.com/get-shipping-rates", "services": [{"name": "Priority Mail Express International", "value": "PriorityMailExpressInternational"}], "allowsMultipleServiceSelection": true}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/store/shipping-carrier/YOUR_shippingCarrierId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "name": "FedEx", "callbackUrl": "https://example.com/get-shipping-rates", "services": [{"name": "Priority Mail Express International", "value": "PriorityMailExpressInternational"}], "allowsMultipleServiceSelection": true},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'name': 'FedEx', 'callbackUrl': 'https://example.com/get-shipping-rates', 'services': [{'name': 'Priority Mail Express International', 'value': 'PriorityMailExpressInternational'}], 'allowsMultipleServiceSelection': true}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Shipping Rate
Source: https://developers.leadwaycrm.com/api-reference/store/store-update-shipping-rate
The "update Shipping Rate" API allows update a shipping rate to the system.
The "update Shipping Rate" API allows update a shipping rate to the system.
```http theme={null}
PUT https://services.leadconnectorhq.com/store/shipping-zone/{shippingZoneId}/shipping-rate/{shippingRateId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the shipping zone
ID of the shipping rate that needs to be returned
## Body
Account Id or Agency Id
Posibles valores: 'account'
Name of the shipping zone
Delivery description
The currency of the amount of the rate / handling fee
The amount of the shipping rate if it is normal rate (0 means free ). Fixed Handling fee if it is a carrier rate (it will add to the carrier rate).
Type of condition to provide the conditional pricing Posibles valores: 'none', 'price', 'weight'
Minimum condition for applying this price. set 0 or null if there is no minimum
Maximum condition for applying this price. set 0 or null if there is no maximum
is this a carrier rate
Shipping carrier id
Percentage of rate fee if it is a carrier rate.
An array of items
Name of the shipping carrier service
Value of the shipping carrier service
## Respuestas
Status of api action
Success message
Shipping zone data
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate/YOUR_shippingRateId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "North zone",
"description": "Ships next day",
"currency": "USD",
"amount": 99.99,
"conditionType": "price",
"minCondition": 99.99,
"maxCondition": 99.99,
"isCarrierRate": true,
"shippingCarrierId": "655b33a82209e60b6adb87a5",
"percentageOfRateFee": 10.99,
"shippingCarrierServices": [
{
"name": "Priority Mail Express International",
"value": "PriorityMailExpressInternational"
}
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate/YOUR_shippingRateId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "name": "North zone", "description": "Ships next day", "currency": "USD", "amount": 99.99, "conditionType": "price", "minCondition": 99.99, "maxCondition": 99.99, "isCarrierRate": true, "shippingCarrierId": "655b33a82209e60b6adb87a5", "percentageOfRateFee": 10.99, "shippingCarrierServices": [{"name": "Priority Mail Express International", "value": "PriorityMailExpressInternational"}]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId/shipping-rate/YOUR_shippingRateId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "name": "North zone", "description": "Ships next day", "currency": "USD", "amount": 99.99, "conditionType": "price", "minCondition": 99.99, "maxCondition": 99.99, "isCarrierRate": true, "shippingCarrierId": "655b33a82209e60b6adb87a5", "percentageOfRateFee": 10.99, "shippingCarrierServices": [{"name": "Priority Mail Express International", "value": "PriorityMailExpressInternational"}]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'name': 'North zone', 'description': 'Ships next day', 'currency': 'USD', 'amount': 99.99, 'conditionType': 'price', 'minCondition': 99.99, 'maxCondition': 99.99, 'isCarrierRate': true, 'shippingCarrierId': '655b33a82209e60b6adb87a5', 'percentageOfRateFee': 10.99, 'shippingCarrierServices': [{'name': 'Priority Mail Express International', 'value': 'PriorityMailExpressInternational'}]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Shipping Zone
Source: https://developers.leadwaycrm.com/api-reference/store/store-update-shipping-zone
The "update Shipping Zone" API allows update a shipping zone to the system.
The "update Shipping Zone" API allows update a shipping zone to the system.
```http theme={null}
PUT https://services.leadconnectorhq.com/store/shipping-zone/{shippingZoneId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
ID of the item that needs to be returned
## Body
Account Id or Agency Id
Posibles valores: 'account'
Name of the shipping zone
List of countries that are available
Country code Posibles valores: \['US', 'CA', 'AF', 'AX', 'AL', 'DZ', 'AS', 'AD', 'AO', 'AI', 'AQ', 'AG', 'AR', 'AM', 'AW', 'AU', 'AT', 'AZ', 'BS', 'BH', 'BD', 'BB', 'BY', 'BE', 'BZ', 'BJ', 'BM', 'BT', 'BO', 'BA', 'BW', 'BV', 'BR', 'IO', 'BN', 'BG', 'BF', 'BI', 'KH', 'CM', 'CV', 'KY', 'CF', 'TD', 'CL', 'CN', 'CX', 'CC', 'CO', 'KM', 'CG', 'CD', 'CK', 'CR', 'CI', 'HR', 'CU', 'CY', 'CZ', 'DK', 'DJ', 'DM', 'DO', 'EC', 'EG', 'SV', 'GQ', 'ER', 'EE', 'ET', 'FK', 'FO', 'FJ', 'FI', 'FR', 'GF', 'PF', 'TF', 'GA', 'GM', 'GE', 'DE', 'GH', 'GI', 'GR', 'GL', 'GD', 'GP', 'GU', 'GT', 'GG', 'GN', 'GW', 'GY', 'HT', 'HM', 'VA', 'HN', 'HK', 'HU', 'IS', 'IN', 'ID', 'IR', 'IQ', 'IE', 'IM', 'IL', 'IT', 'JM', 'JP', 'JE', 'JO', 'KZ', 'KE', 'KI', 'KP', 'XK', 'KW', 'KG', 'LA', 'LV', 'LB', 'LS', 'LR', 'LY', 'LI', 'LT', 'LU', 'MO', 'MK', 'MG', 'MW', 'MY', 'MV', 'ML', 'MT', 'MH', 'MQ', 'MR', 'MU', 'YT', 'MX', 'FM', 'MD', 'MC', 'MN', 'ME', 'MS', 'MA', 'MZ', 'MM', 'NA', 'NR', 'NP', 'NL', 'AN', 'NC', 'NZ', 'NI', 'NE', 'NG', 'NU', 'NF', 'MP', 'NO', 'OM', 'PK', 'PW', 'PS', 'PA', 'PG', 'PY', 'PE', 'PH', 'PN', 'PL', 'PT', 'PR', 'QA', 'RE', 'RO', 'RU', 'RW', 'SH', 'KN', 'LC', 'MF', 'PM', 'VC', 'WS', 'SM', 'ST', 'SA', 'SN', 'RS', 'SC', 'SL', 'SG', 'SX', 'SK', 'SI', 'SB', 'SO', 'ZA', 'GS', 'KR', 'ES', 'LK', 'SD', 'SR', 'SJ', 'SZ', 'SE', 'CH', 'SY', 'TW', 'TJ', 'TZ', 'TH', 'TL', 'TG', 'TK', 'TO', 'TT', 'TN', 'TR', 'TM', 'TC', 'TV', 'UG', 'UA', 'AE', 'GB', 'UM', 'UY', 'UZ', 'VU', 'VE', 'VN', 'VG', 'VI', 'WF', 'EH', 'YE', 'ZM', 'ZW']
List of states that are available. If states is empty, then all states are available
State code Posibles valores: 'AL', 'AK', 'AS', 'AZ', 'AR', 'AA', 'AE', 'AP', 'CA', 'CO', 'CT', 'DE', 'DC', 'FM', 'FL', 'GA', 'GU', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MH', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'MP', 'OH', 'OK', 'OR', 'PW', 'PA', 'PR', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VI', 'VA', 'WA', 'WV', 'WI', 'WY', 'AB', 'BC', 'MB', 'NB', 'NL', 'NT', 'NS', 'NU', 'ON', 'PE', 'QC', 'SK', 'YT', 'BA', 'CT', 'CC', 'CH', 'CB', 'CN', 'ER', 'FO', 'JY', 'LP', 'LR', 'MZ', 'MN', 'NQ', 'RN', 'SA', 'SJ', 'SL', 'SC', 'SF', 'SE', 'TF', 'TU', 'ACT', 'NSW', 'NT', 'QLD', 'SA', 'TAS', 'VIC', 'WA', 'AC', 'AL', 'AM', 'AP', 'BA', 'CE', 'DF', 'ES', 'GO', 'MA', 'MG', 'MS', 'MT', 'PA', 'PB', 'PE', 'PI', 'PR', 'RJ', 'RN', 'RO', 'RR', 'RS', 'SC', 'SE', 'SP', 'TO', 'AI', 'AN', 'AP', 'AT', 'BI', 'CO', 'AR', 'LI', 'LL', 'LR', 'MA', 'ML', 'RM', 'TA', 'VS', 'NB', 'AMA', 'ANT', 'ARA', 'ATL', 'BOL', 'BOY', 'CAL', 'CAQ', 'CAS', 'CAU', 'CES', 'CHO', 'CUN', 'COR', 'GUA', 'GUV', 'HUI', 'LAG', 'MAG', 'MET', 'NAR', 'NSA', 'PUT', 'QUI', 'RIS', 'SAP', 'SAN', 'SUC', 'TOL', 'VAC', 'VAU', 'VID', 'CR-A', 'CR-C', 'CR-G', 'CR-H', 'CR-L', 'CR-P', 'CR-SJ', 'GT-16', 'GT-15', 'GT-04', 'GT-20', 'GT-02', 'GT-05', 'GT-01', 'GT-13', 'GT-18', 'GT-21', 'GT-22', 'GT-17', 'GT-09', 'GT-14', 'GT-11', 'GT-03', 'GT-12', 'GT-06', 'GT-07', 'GT-10', 'GT-08', 'GT-19', 'HK', 'KL', 'NT', 'AN', 'AP', 'AR', 'AS', 'BR', 'CH', 'CG', 'DN', 'DD', 'DL', 'GA', 'GJ', 'HR', 'HP', 'JK', 'JH', 'KA', 'KL', 'LA', 'LD', 'MP', 'MH', 'MN', 'ML', 'MZ', 'NL', 'OR', 'PY', 'PB', 'RJ', 'SK', 'TN', 'TS', 'TR', 'UP', 'UK', 'WB', 'CW', 'CN', 'CE', 'CO', 'DL', 'D', 'G', 'KY', 'KE', 'KK', 'LS', 'LM', 'LK', 'LD', 'LH', 'MO', 'MH', 'MN', 'OY', 'RN', 'SO', 'TA', 'WD', 'WH', 'WX', 'WW', 'AG', 'AL', 'AN', 'AO', 'AR', 'AP', 'AT', 'AV', 'BA', 'BT', 'BL', 'BN', 'BG', 'BI', 'BO', 'BZ', 'BS', 'BR', 'CA', 'CL', 'CB', 'CI', 'CE', 'CT', 'CZ', 'CH', 'CO', 'CS', 'CR', 'KR', 'CN', 'EN', 'FM', 'FE', 'FI', 'FG', 'FC', 'FR', 'GE', 'GO', 'GR', 'IM', 'IS', 'AQ', 'SP', 'LT', 'LE', 'LC', 'LI', 'LO', 'LU', 'MC', 'MN', 'MS', 'MT', 'VS', 'ME', 'MI', 'MO', 'MB', 'NA', 'NO', 'NU', 'OG', 'OT', 'OR', 'PD', 'PA', 'PR', 'PV', 'PG', 'PU', 'PE', 'PC', 'PI', 'PT', 'PN', 'PZ', 'PO', 'RG', 'RA', 'RC', 'RE', 'RI', 'RN', 'RM', 'RO', 'SA', 'SS', 'SV', 'SI', 'SR', 'SO', 'TA', 'TE', 'TR', 'TO', 'TP', 'TN', 'TV', 'TS', 'UD', 'VA', 'VE', 'VB', 'VC', 'VR', 'VV', 'VI', 'VT', 'JP-23', 'JP-05', 'JP-02', 'JP-12', 'JP-38', 'JP-18', 'JP-40', 'JP-07', 'JP-21', 'JP-10', 'JP-34', 'JP-01', 'JP-28', 'JP-08', 'JP-17', 'JP-03', 'JP-37', 'JP-46', 'JP-14', 'JP-39', 'JP-43', 'JP-26', 'JP-24', 'JP-04', 'JP-45', 'JP-20', 'JP-42', 'JP-29', 'JP-15', 'JP-44', 'JP-33', 'JP-47', 'JP-27', 'JP-41', 'JP-11', 'JP-25', 'JP-32', 'JP-22', 'JP-09', 'JP-36', 'JP-13', 'JP-31', 'JP-16', 'JP-30', 'JP-06', 'JP-35', 'JP-19', 'JHR', 'KDH', 'KTN', 'KUL', 'LBN', 'MLK', 'NSN', 'PHG', 'PNG', 'PRK', 'PLS', 'PJY', 'SBH', 'SWK', 'SGR', 'TRG', 'AGU', 'BCN', 'BCS', 'CAM', 'CHP', 'CHH', 'CMX', 'COA', 'COL', 'DUR', 'GUA', 'GRO', 'HID', 'JAL', 'MIC', 'MOR', 'MEX', 'NAY', 'NLE', 'OAX', 'PUE', 'QUE', 'ROO', 'SLP', 'SIN', 'SON', 'TAB', 'TAM', 'TLA', 'VER', 'YUC', 'ZAC', 'AUK', 'BOP', 'CAN', 'CIT', 'GIS', 'HKB', 'MWT', 'MBH', 'NSN', 'NTL', 'OTA', 'STL', 'TKI', 'TAS', 'WKO', 'WGN', 'WTC', 'JK', 'BA', 'GB', 'IS', 'KP', 'PB', 'SD', 'AMA', 'ANC', 'APU', 'ARE', 'AYA', 'CAJ', 'CAL', 'CUS', 'HUV', 'HUC', 'ICA', 'JUN', 'LAL', 'LAM', 'LIM', 'LOR', 'MDD', 'MOQ', 'PAS', 'PIU', 'PUN', 'SAM', 'TAC', 'TUM', 'UCA', 'PH-ABR', 'PH-AGN', 'PH-AGS', 'PH-AKL', 'PH-ALB', 'PH-ANT', 'PH-APA', 'PH-AUR', 'PH-BAS', 'PH-BAN', 'PH-BTN', 'PH-BTG', 'PH-BEN', 'PH-BIL', 'PH-BOH', 'PH-BUK', 'PH-BUL', 'PH-CAG', 'PH-CAN', 'PH-CAS', 'PH-CAM', 'PH-CAP', 'PH-CAT', 'PH-CAV', 'PH-CEB', 'PH-NCO', 'PH-DAO', 'PH-DAV', 'PH-DAS', 'PH-EAS', 'PH-GUI', 'PH-IFU', 'PH-ILN', 'PH-ILS', 'PH-ILI', 'PH-ISA', 'PH-KAL', 'PH-LUN', 'PH-LAG', 'PH-LAN', 'PH-LAS', 'PH-LEY', 'PH-MAG', 'PH-MAD', 'PH-MAS', 'PH-00', 'PH-MSC', 'PH-MSR', 'PH-MOU', 'PH-NEC', 'PH-NER', 'PH-NSA', 'PH-NUE', 'PH-NUV', 'PH-MDC', 'PH-MDR', 'PH-PLW', 'PH-PAM', 'PH-PAN', 'PH-QUE', 'PH-QUI', 'PH-RIZ', 'PH-ROM', 'PH-WSA', 'PH-SAR', 'PH-SIG', 'PH-SOR', 'PH-SCO', 'PH-SLE', 'PH-SUK', 'PH-SLU', 'PH-SUN', 'PH-SUR', 'PH-TAR', 'PH-TAW', 'PH-ZMB', 'PH-ZAN', 'PH-ZAS', 'PH-ZSI', 'PT-20', 'PT-01', 'PT-02', 'PT-03', 'PT-04', 'PT-05', 'PT-06', 'PT-07', 'PT-08', 'PT-09', 'PT-10', 'PT-11', 'PT-30', 'PT-12', 'PT-13', 'PT-14', 'PT-15', 'PT-16', 'PT-17', 'PT-18', 'AB', 'AR', 'AG', 'BC', 'BH', 'BN', 'BT', 'BR', 'BV', 'B', 'BZ', 'CL', 'CS', 'CJ', 'CT', 'CV', 'DB', 'DJ', 'GL', 'GR', 'GJ', 'HR', 'HD', 'IL', 'IS', 'IF', 'MM', 'MH', 'MS', 'NT', 'OT', 'PH', 'SJ', 'SM', 'SB', 'SV', 'TR', 'TM', 'TL', 'VL', 'VS', 'VN', 'KR-26', 'KR-43', 'KR-44', 'KR-27', 'KR-30', 'KR-42', 'KR-29', 'KR-47', 'KR-41', 'KR-48', 'KR-28', 'KR-49', 'KR-45', 'KR-46', 'KR-50', 'KR-11', 'KR-31', 'C', 'VI', 'AB', 'A', 'AL', 'O', 'AV', 'BA', 'PM', 'B', 'BU', 'CC', 'CA', 'S', 'CS', 'CE', 'CR', 'CO', 'CU', 'GI', 'GR', 'GU', 'SS', 'H', 'HU', 'J', 'LO', 'GC', 'LE', 'L', 'LU', 'M', 'MA', 'ML', 'MU', 'NA', 'OR', 'P', 'PO', 'SA', 'TF', 'SG', 'SE', 'SO', 'T', 'TE', 'TO', 'V', 'VA', 'BI', 'ZA', 'Z', 'AZ', 'AJ', 'DU', 'FU', 'RK', 'SH', 'UQ', 'BFP', 'ENG', 'NIR', 'SCT', 'WLS', 'AR', 'CA', 'CL', 'CO', 'DU', 'FS', 'FD', 'LA', 'MA', 'MO', 'PA', 'RN', 'RV', 'RO', 'SA', 'SJ', 'SO', 'TA', 'TT'
## Respuestas
Status of api action
Success message
Shipping zone data
```json theme={null}
{
"status": true,
"message": "Successfully created"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"name": "North zone",
"countries": [
{
"code": "US",
"states": [
{}
]
}
]
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "name": "North zone", "countries": [{"code": "US", "states": [{}]}]}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/store/shipping-zone/YOUR_shippingZoneId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "name": "North zone", "countries": [{"code": "US", "states": [{}]}]},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'name': 'North zone', 'countries': [{'code': 'US', 'states': [{}]}]}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Agent
Source: https://developers.leadwaycrm.com/api-reference/studio/studio-createagent
Creates a new agent with staging version. The agent will be created with an initial staging version that can later be promoted to production.
Creates a new agent with staging version. The agent will be created with an initial staging version that can later be promoted to production.
```http theme={null}
POST https://services.leadconnectorhq.com/agent-studio/agent
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
## Body
Account ID
Name of the agent
Description of the agent
Agency ID
Author ID
Author name
Author email
Status of the agent Posibles valores: 'active', 'inactive', 'archived'
Version data for the agent including nodes, edges, and configuration
Nodes array (deprecated, prefer using version.nodes)
Edges array (deprecated, prefer using version.edges)
## Respuestas
Success status
Response message
Created agent data with metadata
Created versions array (initial staging version)
```json theme={null}
{
"success": true,
"message": "Agent created successfully with staging version.",
"agent": {
"agentId": "p1q2r3s4t5u6v7w8x9y0z1a2",
"name": "Customer Support Agent",
"description": "AI agent specialized in handling customer inquiries and support tickets",
"locationId": "C2QujeCh8ZnC7al2InWR",
"agencyId": "gjL2sFNXJfJYa3d2OYSN",
"status": "active",
"authorId": "usr_abc123def456",
"folderId": "C2QujeCh8ZnC7al2InWR",
"folderName": null,
"createdAt": "2024-02-27T10:30:00.000Z",
"updatedAt": "2024-02-27T10:30:00.000Z"
},
"versions": [
{
"versionId": "v1a2b3c4d5e6f7g8h9i0",
"agentId": "p1q2r3s4t5u6v7w8x9y0z1a2",
"versionName": "Customer Support Agent v1",
"state": "staging",
"isPublished": false,
"version": 1,
"createdAt": "2024-02-27T10:30:00.000Z"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/agent-studio/agent' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "C2QujeCh8ZnC7al2InWR",
"name": "Customer Support Agent",
"description": "AI agent specialized in handling customer inquiries and support tickets",
"agencyId": "gjL2sFNXJfJYa3d2OYSN",
"authorId": "usr_abc123def456",
"authorName": "John Doe",
"authorEmail": "john@example.com",
"status": "active",
"version": {
"versionName": "Version 1",
"description": "Initial version",
"nodes": [],
"edges": [],
"uiNodes": [],
"uiEdges": [],
"globalVariables": [],
"inputVariables": [],
"runtimeVariables": [],
"scopes": []
},
"nodes": [],
"edges": []
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/agent-studio/agent', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "C2QujeCh8ZnC7al2InWR", "name": "Customer Support Agent", "description": "AI agent specialized in handling customer inquiries and support tickets", "agencyId": "gjL2sFNXJfJYa3d2OYSN", "authorId": "usr_abc123def456", "authorName": "John Doe", "authorEmail": "john@example.com", "status": "active", "version": {"versionName": "Version 1", "description": "Initial version", "nodes": [], "edges": [], "uiNodes": [], "uiEdges": [], "globalVariables": [], "inputVariables": [], "runtimeVariables": [], "scopes": []}, "nodes": [], "edges": []}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/agent-studio/agent',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "C2QujeCh8ZnC7al2InWR", "name": "Customer Support Agent", "description": "AI agent specialized in handling customer inquiries and support tickets", "agencyId": "gjL2sFNXJfJYa3d2OYSN", "authorId": "usr_abc123def456", "authorName": "John Doe", "authorEmail": "john@example.com", "status": "active", "version": {"versionName": "Version 1", "description": "Initial version", "nodes": [], "edges": [], "uiNodes": [], "uiEdges": [], "globalVariables": [], "inputVariables": [], "runtimeVariables": [], "scopes": []}, "nodes": [], "edges": []},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'C2QujeCh8ZnC7al2InWR', 'name': 'Customer Support Agent', 'description': 'AI agent specialized in handling customer inquiries and support tickets', 'agencyId': 'gjL2sFNXJfJYa3d2OYSN', 'authorId': 'usr_abc123def456', 'authorName': 'John Doe', 'authorEmail': 'john@example.com', 'status': 'active', 'version': {'versionName': 'Version 1', 'description': 'Initial version', 'nodes': [], 'edges': [], 'uiNodes': [], 'uiEdges': [], 'globalVariables': [], 'inputVariables': [], 'runtimeVariables': [], 'scopes': []}, 'nodes': [], 'edges': []}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Agent
Source: https://developers.leadwaycrm.com/api-reference/studio/studio-deleteagent
Deletes an agent and all its versions.
Deletes an agent and all its versions.
```http theme={null}
DELETE https://services.leadconnectorhq.com/agent-studio/agent/{agentId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Query parameters
## Respuestas
Success status
Response message
Deleted agent ID
```json theme={null}
{
"success": true,
"message": "Agent deleted successfully",
"agentId": "p1q2r3s4t5u6v7w8x9y0z1a2"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Execute Agent
Source: https://developers.leadwaycrm.com/api-reference/studio/studio-executeagent
Executes the specified agent and returns a non-streaming JSON response with the complete agent output. The agent must be in active status and belong to the specified account. locationId is required in
Executes the specified agent and returns a non-streaming JSON response with the complete agent output. The agent must be in active status and belong to the specified account. locationId is required in the request body.
**Session Management:**
* For the first message in a new session, do not include the `executionId` in the request payload.
* The API will return an `executionId` along with the agent response, which uniquely identifies this conversation session.
* To continue the conversation within the same session, include the `executionId` from the previous response in subsequent requests. This allows the agent to maintain conversation context and history across multiple interactions.
```http theme={null}
POST https://services.leadconnectorhq.com/agent-studio/agent/{agentId}/execute
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Query parameters
## Body
Message to send to the agent
Unique session identifier that maintains conversational context across multiple interactions within the same agent session. Omit this field for the first message in a new session. Include the executionId returned from the previous response to maintain context in subsequent messages.
Input variables to pass to the agent. These should match the input variables defined in the agent configuration.
Published version ID to execute. If not provided, the latest published production version will be used.
Attachments for the message
Type of attachment
URL of the image attachment
Account ID
Contact ID to associate with this execution. When provided, contact data will be hydrated and made available to the agent.
## Respuestas
Success status
Unique session identifier that maintains conversational context across multiple interactions within the same agent session. Use this ID in subsequent requests to continue the conversation.
Unique identifier for a single interaction cycle, consisting of one user input and the corresponding agent response. Each message exchange generates a new interactionId.
Agent response text
Response type
Expected input type for next interaction
When end node is added in the graph, this will be true if the agent reached the end node in the graph
Execution status
Whether flow was switched
Response attachments
Generated outputs
```json theme={null}
{
"success": true,
"executionId": "a1b2c3d4e5f6g7h8i9j0k1l2",
"interactionId": "m9n8o7p6q5r4s3t2u1v0w9x8",
"response": "I can help you with various tasks...",
"type": "text",
"nextExpectedInput": "text",
"goalCompletion": false,
"executionStatus": "completed",
"flowSwitch": false,
"attachments": [],
"generativeOutputs": []
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId/execute' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"message": "How can you help me with my marketing?",
"executionId": "a1b2c3d4e5f6g7h8i9j0k1l2",
"inputVariables": {
"customerName": "John Doe",
"orderNumber": "ORD-12345"
},
"versionId": "b2b1c1d2-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"attachments": [
{
"type": "image",
"imageUrl": "https://example.com/image.png"
}
],
"locationId": "C2QujeCh8ZnC7al2InWR",
"contactId": "cid_abc123def456"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId/execute', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"message": "How can you help me with my marketing?", "executionId": "a1b2c3d4e5f6g7h8i9j0k1l2", "inputVariables": {"customerName": "John Doe", "orderNumber": "ORD-12345"}, "versionId": "b2b1c1d2-3e4f-5a6b-7c8d-9e0f1a2b3c4d", "attachments": [{"type": "image", "imageUrl": "https://example.com/image.png"}], "locationId": "C2QujeCh8ZnC7al2InWR", "contactId": "cid_abc123def456"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId/execute',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"message": "How can you help me with my marketing?", "executionId": "a1b2c3d4e5f6g7h8i9j0k1l2", "inputVariables": {"customerName": "John Doe", "orderNumber": "ORD-12345"}, "versionId": "b2b1c1d2-3e4f-5a6b-7c8d-9e0f1a2b3c4d", "attachments": [{"type": "image", "imageUrl": "https://example.com/image.png"}], "locationId": "C2QujeCh8ZnC7al2InWR", "contactId": "cid_abc123def456"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'message': 'How can you help me with my marketing?', 'executionId': 'a1b2c3d4e5f6g7h8i9j0k1l2', 'inputVariables': {'customerName': 'John Doe', 'orderNumber': 'ORD-12345'}, 'versionId': 'b2b1c1d2-3e4f-5a6b-7c8d-9e0f1a2b3c4d', 'attachments': [{'type': 'image', 'imageUrl': 'https://example.com/image.png'}], 'locationId': 'C2QujeCh8ZnC7al2InWR', 'contactId': 'cid_abc123def456'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Execute Agent (Deprecated)
Source: https://developers.leadwaycrm.com/api-reference/studio/studio-executeagent-deprecated
**Deprecated endpoint - use POST /agent/:agentId/execute instead.** Executes the specified agent and returns a non-streaming JSON response with the complete agent output. The agent must be in active
**Deprecated endpoint - use POST /agent/:agentId/execute instead.**
Executes the specified agent and returns a non-streaming JSON response with the complete agent output. The agent must be in active status and belong to the specified account. locationId is required in the request body.
**Session Management:**
* For the first message in a new session, do not include the `executionId` in the request payload.
* The API will return an `executionId` along with the agent response, which uniquely identifies this conversation session.
* To continue the conversation within the same session, include the `executionId` from the previous response in subsequent requests.
```http theme={null}
POST https://services.leadconnectorhq.com/agent-studio/public-api/agents/{agentId}/execute
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Query parameters
## Body
Message to send to the agent
Unique session identifier that maintains conversational context across multiple interactions within the same agent session. Omit this field for the first message in a new session. Include the executionId returned from the previous response to maintain context in subsequent messages.
Input variables to pass to the agent. These should match the input variables defined in the agent configuration.
Published version ID to execute. If not provided, the latest published production version will be used.
Attachments for the message
Type of attachment
URL of the image attachment
Account ID
Contact ID to associate with this execution. When provided, contact data will be hydrated and made available to the agent.
## Respuestas
Success status
Unique session identifier that maintains conversational context across multiple interactions within the same agent session. Use this ID in subsequent requests to continue the conversation.
Unique identifier for a single interaction cycle, consisting of one user input and the corresponding agent response. Each message exchange generates a new interactionId.
Agent response text
Response type
Expected input type for next interaction
When end node is added in the graph, this will be true if the agent reached the end node in the graph
Execution status
Whether flow was switched
Response attachments
Generated outputs
```json theme={null}
{
"success": true,
"executionId": "a1b2c3d4e5f6g7h8i9j0k1l2",
"interactionId": "m9n8o7p6q5r4s3t2u1v0w9x8",
"response": "I can help you with various tasks...",
"type": "text",
"nextExpectedInput": "text",
"goalCompletion": false,
"executionStatus": "completed",
"flowSwitch": false,
"attachments": [],
"generativeOutputs": []
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/agent-studio/public-api/agents/YOUR_agentId/execute' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"message": "How can you help me with my marketing?",
"executionId": "a1b2c3d4e5f6g7h8i9j0k1l2",
"inputVariables": {
"customerName": "John Doe",
"orderNumber": "ORD-12345"
},
"versionId": "b2b1c1d2-3e4f-5a6b-7c8d-9e0f1a2b3c4d",
"attachments": [
{
"type": "image",
"imageUrl": "https://example.com/image.png"
}
],
"locationId": "C2QujeCh8ZnC7al2InWR",
"contactId": "cid_abc123def456"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/agent-studio/public-api/agents/YOUR_agentId/execute', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"message": "How can you help me with my marketing?", "executionId": "a1b2c3d4e5f6g7h8i9j0k1l2", "inputVariables": {"customerName": "John Doe", "orderNumber": "ORD-12345"}, "versionId": "b2b1c1d2-3e4f-5a6b-7c8d-9e0f1a2b3c4d", "attachments": [{"type": "image", "imageUrl": "https://example.com/image.png"}], "locationId": "C2QujeCh8ZnC7al2InWR", "contactId": "cid_abc123def456"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/agent-studio/public-api/agents/YOUR_agentId/execute',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"message": "How can you help me with my marketing?", "executionId": "a1b2c3d4e5f6g7h8i9j0k1l2", "inputVariables": {"customerName": "John Doe", "orderNumber": "ORD-12345"}, "versionId": "b2b1c1d2-3e4f-5a6b-7c8d-9e0f1a2b3c4d", "attachments": [{"type": "image", "imageUrl": "https://example.com/image.png"}], "locationId": "C2QujeCh8ZnC7al2InWR", "contactId": "cid_abc123def456"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'message': 'How can you help me with my marketing?', 'executionId': 'a1b2c3d4e5f6g7h8i9j0k1l2', 'inputVariables': {'customerName': 'John Doe', 'orderNumber': 'ORD-12345'}, 'versionId': 'b2b1c1d2-3e4f-5a6b-7c8d-9e0f1a2b3c4d', 'attachments': [{'type': 'image', 'imageUrl': 'https://example.com/image.png'}], 'locationId': 'C2QujeCh8ZnC7al2InWR', 'contactId': 'cid_abc123def456'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Agent
Source: https://developers.leadwaycrm.com/api-reference/studio/studio-getagentbyid
Gets a specific agent by its ID for the specified account with all its versions. Returns complete agent metadata and all non-deleted versions (draft, staging, production). locationId is required param
Gets a specific agent by its ID for the specified account with all its versions. Returns complete agent metadata and all non-deleted versions (draft, staging, production). locationId is required parameter. The agent must have active status.
```http theme={null}
GET https://services.leadconnectorhq.com/agent-studio/agent/{agentId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Query parameters
## Respuestas
Success status
Response message
Agent metadata with all active versions
Request trace ID for debugging
```json theme={null}
{
"success": true,
"message": "Agent retrieved successfully",
"agent": {
"id": "d6a6792d-0d50-4e8f-9c3b-ecd8096d0bdd",
"agentId": "AgfS2JXWsSN8aXb5c4d2",
"name": "Customer Support Agent",
"description": "AI agent for customer support",
"agencyId": "5DP4iH6HLkQsiKESj6rh",
"locationId": "C2QujeCh8ZnC7al2InWR",
"productSlug": "agent_studio",
"productId": "agent_studio",
"authorId": "usr_123",
"status": "active",
"folderId": "vEoIigWSAw1BQA9DEchD",
"folderName": "Default Agents",
"createdAt": "2026-03-06T10:37:01.013Z",
"updatedAt": "2026-03-06T10:37:01.014Z",
"deleted": false,
"productionVersion": {
"versionId": "Ver1K8sSF2nC7al5InWz",
"versionName": "Content Creation Agent v1",
"isPublished": true,
"inputVariables": [],
"updatedAt": "2026-03-02T06:53:40.570Z"
},
"versions": [
{
"id": "3f9d9ab7-5ca4-4e64-8472-eab9e77a0fe3",
"versionId": "Ver1K8sSF2nC7al5InWz",
"agentId": "AgfS2JXWsSN8aXb5c4d2",
"agencyId": "5DP4iH6HLkQsiKESj6rh",
"locationId": "C2QujeCh8ZnC7al2InWR",
"versionName": "v1",
"description": "AI agent for customer support",
"state": "staging",
"isPublished": false,
"scopes": [],
"nodes": [],
// truncado: 22 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Agent (Deprecated)
Source: https://developers.leadwaycrm.com/api-reference/studio/studio-getagentbyid-deprecated
**Deprecated endpoint - use GET /agent/:agentId instead.** Gets a specific agent by its ID for the specified account with all its versions. locationId is required parameter. The agent must have activ
**Deprecated endpoint - use GET /agent/:agentId instead.**
Gets a specific agent by its ID for the specified account with all its versions. locationId is required parameter. The agent must have active status.
```http theme={null}
GET https://services.leadconnectorhq.com/agent-studio/public-api/agents/{agentId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Query parameters
## Respuestas
Success status
Response message
Agent metadata with all active versions
Request trace ID for debugging
```json theme={null}
{
"success": true,
"message": "Agent retrieved successfully",
"agent": {
"id": "d6a6792d-0d50-4e8f-9c3b-ecd8096d0bdd",
"agentId": "AgfS2JXWsSN8aXb5c4d2",
"name": "Customer Support Agent",
"description": "AI agent for customer support",
"agencyId": "5DP4iH6HLkQsiKESj6rh",
"locationId": "C2QujeCh8ZnC7al2InWR",
"productSlug": "agent_studio",
"productId": "agent_studio",
"authorId": "usr_123",
"status": "active",
"folderId": "vEoIigWSAw1BQA9DEchD",
"folderName": "Default Agents",
"createdAt": "2026-03-06T10:37:01.013Z",
"updatedAt": "2026-03-06T10:37:01.014Z",
"deleted": false,
"productionVersion": {
"versionId": "Ver1K8sSF2nC7al5InWz",
"versionName": "Content Creation Agent v1",
"isPublished": true,
"inputVariables": [],
"updatedAt": "2026-03-02T06:53:40.570Z"
},
"versions": [
{
"id": "3f9d9ab7-5ca4-4e64-8472-eab9e77a0fe3",
"versionId": "Ver1K8sSF2nC7al5InWz",
"agentId": "AgfS2JXWsSN8aXb5c4d2",
"agencyId": "5DP4iH6HLkQsiKESj6rh",
"locationId": "C2QujeCh8ZnC7al2InWR",
"versionName": "v1",
"description": "AI agent for customer support",
"state": "staging",
"isPublished": false,
"scopes": [],
"nodes": [],
// truncado: 22 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/agent-studio/public-api/agents/YOUR_agentId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/agent-studio/public-api/agents/YOUR_agentId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/agent-studio/public-api/agents/YOUR_agentId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Agents
Source: https://developers.leadwaycrm.com/api-reference/studio/studio-getagents
Lists all active agents for the specified account. locationId is required parameter to ensure optimal performance. Supports pagination using limit and offset. Optionally filter by isPublished=true to
Lists all active agents for the specified account. locationId is required parameter to ensure optimal performance. Supports pagination using limit and offset. Optionally filter by isPublished=true to return only agents with a published production version.
```http theme={null}
GET https://services.leadconnectorhq.com/agent-studio/agent
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Optional filter to return only agents with a published production version
## Respuestas
Success status
Response message
List of agents with metadata
Agent ID
Agent name
Agent description
Account ID
Agent status (always "active")
Creation timestamp
Last update timestamp
Pagination metadata
Total number of agents
Number of agents per page
Starting position
Whether more agents exist
```json theme={null}
{
"success": true,
"message": "Agents retrieved successfully",
"agents": [
{
"agentId": "p1q2r3s4t5u6v7w8x9y0z1a2",
"name": "Marketing Assistant",
"description": "AI agent specialized in marketing strategy and content creation",
"locationId": "C2QujeCh8ZnC7al2InWR",
"status": "active",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-02-20T14:45:00.000Z"
},
{
"agentId": "b3c4d5e6f7g8h9i0j1k2l3m4",
"name": "Customer Support Bot",
"description": "AI agent for handling customer inquiries and support tickets",
"locationId": "C2QujeCh8ZnC7al2InWR",
"status": "active",
"createdAt": "2024-01-10T09:15:00.000Z",
"updatedAt": "2024-02-18T16:20:00.000Z"
}
],
"pagination": {
"total": 25,
"limit": 20,
"offset": 0,
"hasMore": true
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/agent-studio/agent' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/agent-studio/agent', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/agent-studio/agent',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Agents (Deprecated)
Source: https://developers.leadwaycrm.com/api-reference/studio/studio-getagents-deprecated
**Deprecated endpoint - use GET /agent instead.** Lists all active agents that have a published production version for the specified account. locationId is required parameter. Supports pagination usi
**Deprecated endpoint - use GET /agent instead.**
Lists all active agents that have a published production version for the specified account. locationId is required parameter. Supports pagination using limit and offset.
```http theme={null}
GET https://services.leadconnectorhq.com/agent-studio/public-api/agents
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
## Respuestas
Success status
Response message
List of agents with metadata
Agent ID
Agent name
Agent description
Account ID
Agent status (always "active")
Creation timestamp
Last update timestamp
Pagination metadata
Total number of agents
Number of agents per page
Starting position
Whether more agents exist
```json theme={null}
{
"success": true,
"message": "Agents retrieved successfully",
"agents": [
{
"agentId": "p1q2r3s4t5u6v7w8x9y0z1a2",
"name": "Marketing Assistant",
"description": "AI agent specialized in marketing strategy and content creation",
"locationId": "C2QujeCh8ZnC7al2InWR",
"status": "active",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-02-20T14:45:00.000Z"
},
{
"agentId": "b3c4d5e6f7g8h9i0j1k2l3m4",
"name": "Customer Support Bot",
"description": "AI agent for handling customer inquiries and support tickets",
"locationId": "C2QujeCh8ZnC7al2InWR",
"status": "active",
"createdAt": "2024-01-10T09:15:00.000Z",
"updatedAt": "2024-02-18T16:20:00.000Z"
}
],
"pagination": {
"total": 25,
"limit": 20,
"offset": 0,
"hasMore": true
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/agent-studio/public-api/agents' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/agent-studio/public-api/agents', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/agent-studio/public-api/agents',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Promote to Production
Source: https://developers.leadwaycrm.com/api-reference/studio/studio-promoteandpublish
Promotes a draft version to production.
Promotes a draft version to production.
```http theme={null}
POST https://services.leadconnectorhq.com/agent-studio/agent/versions/{versionId}/publish
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Query parameters
## Body
Account ID for authorization
User ID performing the promotion action
User name performing the promotion action
User email performing the promotion action
## Respuestas
Success status
Response message
Result data with production and new draft version details
```json theme={null}
{
"success": true,
"message": "Draft published to production successfully. New draft version created for future edits.",
"data": {
"productionVersion": {
"versionId": "v1a2b3c4d5e6f7g8h9i0",
"agentId": "p1q2r3s4t5u6v7w8x9y0z1a2",
"versionName": "Customer Support Agent v2",
"state": "prod",
"isPublished": true,
"version": 2,
"publishedAt": "2024-02-27T12:00:00.000Z",
"publishedBy": "usr_abc123def456",
"publishedByName": "John Doe",
"publishedByEmail": "john.doe@example.com"
},
"newDraftVersion": {
"versionId": "v2b3c4d5e6f7g8h9i0j1",
"agentId": "p1q2r3s4t5u6v7w8x9y0z1a2",
"versionName": "Customer Support Agent v3",
"state": "draft",
"isPublished": false,
"version": 3,
"createdAt": "2024-02-27T12:00:00.000Z"
}
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/agent-studio/agent/versions/YOUR_versionId/publish' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "C2QujeCh8ZnC7al2InWR",
"userId": "usr_abc123def456",
"userName": "John Doe",
"userEmail": "john.doe@example.com"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/agent-studio/agent/versions/YOUR_versionId/publish', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "C2QujeCh8ZnC7al2InWR", "userId": "usr_abc123def456", "userName": "John Doe", "userEmail": "john.doe@example.com"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/agent-studio/agent/versions/YOUR_versionId/publish',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "C2QujeCh8ZnC7al2InWR", "userId": "usr_abc123def456", "userName": "John Doe", "userEmail": "john.doe@example.com"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'C2QujeCh8ZnC7al2InWR', 'userId': 'usr_abc123def456', 'userName': 'John Doe', 'userEmail': 'john.doe@example.com'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Agent Metadata
Source: https://developers.leadwaycrm.com/api-reference/studio/studio-updateagentmetadata
Updates agent metadata such as name, description, and status.
Updates agent metadata such as name, description, and status.
```http theme={null}
PATCH https://services.leadconnectorhq.com/agent-studio/agent/{agentId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Query parameters
## Body
Account ID for authorization (cannot be updated)
Name of the agent
Description of the agent
Status of the agent Posibles valores: 'active', 'inactive', 'archived'
## Respuestas
Success status
Response message
Updated agent or version data
```json theme={null}
{
"success": true,
"message": "Agent updated successfully",
"data": {
"agentId": "p1q2r3s4t5u6v7w8x9y0z1a2",
"versionId": "v1a2b3c4d5e6f7g8h9i0",
"name": "Updated Customer Support Agent",
"description": "Updated AI agent with enhanced customer support capabilities",
"status": "active",
"updatedAt": "2024-02-27T11:45:00.000Z"
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X PATCH 'https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "C2QujeCh8ZnC7al2InWR",
"name": "Updated Customer Support Agent",
"description": "Updated AI agent with enhanced customer support capabilities",
"status": "active"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "C2QujeCh8ZnC7al2InWR", "name": "Updated Customer Support Agent", "description": "Updated AI agent with enhanced customer support capabilities", "status": "active"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/agent-studio/agent/YOUR_agentId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "C2QujeCh8ZnC7al2InWR", "name": "Updated Customer Support Agent", "description": "Updated AI agent with enhanced customer support capabilities", "status": "active"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'C2QujeCh8ZnC7al2InWR', 'name': 'Updated Customer Support Agent', 'description': 'Updated AI agent with enhanced customer support capabilities', 'status': 'active'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Agent
Source: https://developers.leadwaycrm.com/api-reference/studio/studio-updateagentversion
Updates a specific agent version by versionId. Supports updating nodes, edges, variables, and configuration.
Updates a specific agent version by versionId. Supports updating nodes, edges, variables, and configuration.
```http theme={null}
PATCH https://services.leadconnectorhq.com/agent-studio/agent/versions/{versionId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
## Query parameters
## Body
Account ID for authorization
Version name
Description of the version
Complete array of nodes for the agent workflow. Provide all nodes including unchanged ones.
Complete array of edges connecting the nodes. Provide all edges including unchanged ones.
Global variables accessible throughout the agent workflow
Input variables required from user at execution time
Runtime variables generated during agent execution
Global configuration including prompts and settings
User ID performing the update
User name performing the update
## Respuestas
Success status
Response message
Updated agent or version data
```json theme={null}
{
"success": true,
"message": "Agent updated successfully",
"data": {
"agentId": "p1q2r3s4t5u6v7w8x9y0z1a2",
"versionId": "v1a2b3c4d5e6f7g8h9i0",
"name": "Updated Customer Support Agent",
"description": "Updated AI agent with enhanced customer support capabilities",
"status": "active",
"updatedAt": "2024-02-27T11:45:00.000Z"
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{
"statusCode": 500,
"message": "Internal Server Error"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X PATCH 'https://services.leadconnectorhq.com/agent-studio/agent/versions/YOUR_versionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "C2QujeCh8ZnC7al2InWR",
"versionName": "Customer Support Agent v2",
"description": "Updated version with improved customer handling logic",
"nodes": [
{
"nodeId": "node_1",
"nodeName": "Start",
"type": "start",
"isStartNode": true
},
{
"nodeId": "node_2",
"nodeName": "LLM Node",
"type": "llm",
"nodeConfig": {
"prompt": "How can I help you?",
"llmProvider": "openai",
"llmModel": "gpt-4"
}
}
],
"edges": [
{
"startNode": "node_1",
"endNode": "node_2"
}
],
"globalVariables": [
{
"key": "apiKey",
"type": "string",
"value": "your-api-key"
}
],
"inputVariables": [
{
"key": "customerName",
"type": "string",
"description": "Customer name for personalization"
}
],
"runtimeVariables": [
{
"key": "sessionId",
"type": "string",
"description": "Current session identifier"
}
],
"globalConfig": {
"globalPrompt": {
"currentPrompt": "You are a helpful customer support assistant.",
"history": []
}
},
"userId": "usr_abc123def456",
"userName": "John Doe"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/agent-studio/agent/versions/YOUR_versionId', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "C2QujeCh8ZnC7al2InWR", "versionName": "Customer Support Agent v2", "description": "Updated version with improved customer handling logic", "nodes": [{"nodeId": "node_1", "nodeName": "Start", "type": "start", "isStartNode": true}, {"nodeId": "node_2", "nodeName": "LLM Node", "type": "llm", "nodeConfig": {"prompt": "How can I help you?", "llmProvider": "openai", "llmModel": "gpt-4"}}], "edges": [{"startNode": "node_1", "endNode": "node_2"}], "globalVariables": [{"key": "apiKey", "type": "string", "value": "your-api-key"}], "inputVariables": [{"key": "customerName", "type": "string", "description": "Customer name for personalization"}], "runtimeVariables": [{"key": "sessionId", "type": "string", "description": "Current session identifier"}], "globalConfig": {"globalPrompt": {"currentPrompt": "You are a helpful customer support assistant.", "history": []}}, "userId": "usr_abc123def456", "userName": "John Doe"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/agent-studio/agent/versions/YOUR_versionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "C2QujeCh8ZnC7al2InWR", "versionName": "Customer Support Agent v2", "description": "Updated version with improved customer handling logic", "nodes": [{"nodeId": "node_1", "nodeName": "Start", "type": "start", "isStartNode": true}, {"nodeId": "node_2", "nodeName": "LLM Node", "type": "llm", "nodeConfig": {"prompt": "How can I help you?", "llmProvider": "openai", "llmModel": "gpt-4"}}], "edges": [{"startNode": "node_1", "endNode": "node_2"}], "globalVariables": [{"key": "apiKey", "type": "string", "value": "your-api-key"}], "inputVariables": [{"key": "customerName", "type": "string", "description": "Customer name for personalization"}], "runtimeVariables": [{"key": "sessionId", "type": "string", "description": "Current session identifier"}], "globalConfig": {"globalPrompt": {"currentPrompt": "You are a helpful customer support assistant.", "history": []}}, "userId": "usr_abc123def456", "userName": "John Doe"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'C2QujeCh8ZnC7al2InWR', 'versionName': 'Customer Support Agent v2', 'description': 'Updated version with improved customer handling logic', 'nodes': [{'nodeId': 'node_1', 'nodeName': 'Start', 'type': 'start', 'isStartNode': true}, {'nodeId': 'node_2', 'nodeName': 'LLM Node', 'type': 'llm', 'nodeConfig': {'prompt': 'How can I help you?', 'llmProvider': 'openai', 'llmModel': 'gpt-4'}}], 'edges': [{'startNode': 'node_1', 'endNode': 'node_2'}], 'globalVariables': [{'key': 'apiKey', 'type': 'string', 'value': 'your-api-key'}], 'inputVariables': [{'key': 'customerName', 'type': 'string', 'description': 'Customer name for personalization'}], 'runtimeVariables': [{'key': 'sessionId', 'type': 'string', 'description': 'Current session identifier'}], 'globalConfig': {'globalPrompt': {'currentPrompt': 'You are a helpful customer support assistant.', 'history': []}}, 'userId': 'usr_abc123def456', 'userName': 'John Doe'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Surveys
Source: https://developers.leadwaycrm.com/api-reference/surveys/surveys-get-surveys
Get Surveys
Get Surveys
```http theme={null}
GET https://services.leadconnectorhq.com/surveys/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Limit Per Page records count. will allow maximum up to 50 and default will be 10
## Respuestas
Number of surveys
```json theme={null}
{
"surveys": [
{
"id": "I5GFa3d3cKjojpe4VVUx",
"name": "Survey 1",
"locationId": "ve9EPM428h8vShlRW1KT"
}
],
"total": 20
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/surveys/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/surveys/', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/surveys/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Surveys Submissions
Source: https://developers.leadwaycrm.com/api-reference/surveys/surveys-get-surveys-submissions
Get Surveys Submissions
Get Surveys Submissions
```http theme={null}
GET https://services.leadconnectorhq.com/surveys/submissions
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Page No. By default it will be 1
Limit Per Page records count. will allow maximum up to 100 and default will be 20
Filter submission by survey id
Filter by contactId, name, email or phone no.
Get submission by starting of this date. By default it will be same date of last month(YYYY-MM-DD).
Get submission by ending of this date. By default it will be current date(YYYY-MM-DD).
## Respuestas
```json theme={null}
{
"submissions": [
{
"id": "be759b9a-c3ec-4b29-ba07-fc3c89c77673",
"contactId": "9NkT25Vor1v4aQatFsv2",
"createdAt": "2020-11-01T18:02:21.000Z",
"surveyId": "jjusM6EOngDExnbo2DbU",
"name": "test",
"email": "test@test.com",
"others": {
"__submissions_other_field__": "john@deo.com",
"__custom_field_id__": "20",
"eventData": {},
"fieldsOriSequance": [
"full_name",
"first_name",
"last_name",
"phone",
"email"
]
}
}
],
"meta": {
"total": 1,
"currentPage": 1
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/surveys/submissions' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/surveys/submissions', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/surveys/submissions',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Link
Source: https://developers.leadwaycrm.com/api-reference/trigger-links/trigger-links-create-link
Create Link
Create Link
```http theme={null}
POST https://services.leadconnectorhq.com/links/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
## Respuestas
```json theme={null}
{
"link": {
"id": "n4AriwEnFrGh3tu08W0U",
"name": "first tag",
"redirectTo": "https://www.google.com/",
"fieldKey": "{{trigger_link.n4AriwEnFrGh3tu08W0U}}",
"locationId": "ve9EPM428h8vShlRW1KT"
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/links/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "ve9EPM428h8vShlRW1KT",
"name": "first tag",
"redirectTo": "https://www.google.com/"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/links/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "ve9EPM428h8vShlRW1KT", "name": "first tag", "redirectTo": "https://www.google.com/"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/links/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "ve9EPM428h8vShlRW1KT", "name": "first tag", "redirectTo": "https://www.google.com/"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 've9EPM428h8vShlRW1KT', 'name': 'first tag', 'redirectTo': 'https://www.google.com/'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Link
Source: https://developers.leadwaycrm.com/api-reference/trigger-links/trigger-links-delete-link
Delete Link
Delete Link
```http theme={null}
DELETE https://services.leadconnectorhq.com/links/{linkId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Link Id
## Respuestas
```json theme={null}
{
"succeded": true
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/links/YOUR_linkId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/links/YOUR_linkId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/links/YOUR_linkId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Link by ID
Source: https://developers.leadwaycrm.com/api-reference/trigger-links/trigger-links-get-link-by-id
Get a single link by its ID
Get a single link by its ID
```http theme={null}
GET https://services.leadconnectorhq.com/links/id/{linkId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Link Id
## Query parameters
Account Id
## Respuestas
```json theme={null}
{
"link": {
"id": "n4AriwEnFrGh3tu08W0U",
"name": "first tag",
"redirectTo": "https://www.google.com/",
"fieldKey": "{{trigger_link.n4AriwEnFrGh3tu08W0U}}",
"locationId": "ve9EPM428h8vShlRW1KT"
}
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/links/id/YOUR_linkId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/links/id/YOUR_linkId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/links/id/YOUR_linkId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Links
Source: https://developers.leadwaycrm.com/api-reference/trigger-links/trigger-links-get-links
Get Links
Get Links
```http theme={null}
GET https://services.leadconnectorhq.com/links/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
## Respuestas
```json theme={null}
{
"links": [
{
"id": "n4AriwEnFrGh3tu08W0U",
"name": "first tag",
"redirectTo": "https://www.google.com/",
"fieldKey": "{{trigger_link.n4AriwEnFrGh3tu08W0U}}",
"locationId": "ve9EPM428h8vShlRW1KT"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/links/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/links/', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/links/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Search Trigger Links
Source: https://developers.leadwaycrm.com/api-reference/trigger-links/trigger-links-search-trigger-links
Get list of links by searching
Get list of links by searching
```http theme={null}
GET https://services.leadconnectorhq.com/links/search
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account Id
Search query as a string
Numbers of query results to skip
Limit on number of search results
## Respuestas
```json theme={null}
{
"links": [
{
"id": "n4AriwEnFrGh3tu08W0U",
"name": "first tag",
"redirectTo": "https://www.google.com/",
"fieldKey": "{{trigger_link.n4AriwEnFrGh3tu08W0U}}",
"locationId": "ve9EPM428h8vShlRW1KT"
}
]
}
```
```json theme={null}
{
"statusCode": 400,
"message": "Bad Request"
}
```
```json theme={null}
{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/links/search' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/links/search', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/links/search',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Link
Source: https://developers.leadwaycrm.com/api-reference/trigger-links/trigger-links-update-link
Update Link
Update Link
```http theme={null}
PUT https://services.leadconnectorhq.com/links/{linkId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Link Id
## Body
## Respuestas
```json theme={null}
{
"link": {
"id": "n4AriwEnFrGh3tu08W0U",
"name": "first tag",
"redirectTo": "https://www.google.com/",
"fieldKey": "{{trigger_link.n4AriwEnFrGh3tu08W0U}}",
"locationId": "ve9EPM428h8vShlRW1KT"
}
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/links/YOUR_linkId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"name": "first tag",
"redirectTo": "https://www.google.com/"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/links/YOUR_linkId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"name": "first tag", "redirectTo": "https://www.google.com/"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/links/YOUR_linkId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"name": "first tag", "redirectTo": "https://www.google.com/"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'name': 'first tag', 'redirectTo': 'https://www.google.com/'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create User
Source: https://developers.leadwaycrm.com/api-reference/users/users-create-user
Create User
Create User
```http theme={null}
POST https://services.leadconnectorhq.com/users/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Scopes allowed for users. Only scopes that have been passed will be enabled. Note:- If passed empty all the scopes will be get disabled
Assigned Scopes allowed for users. Only scopes that have been passed will be enabled. If passed empty all the assigned scopes will be get disabled
Per-account inbound Twilio number in E.164 format, keyed by account id (Call and Voicemail Inbound Number for direct Twilio, not LC Phone). Replacement semantics: if you send twilioPhone in the request body, the stored map is replaced entirely with this object (not merged). Any account id omitted from the object is removed from the saved map. Omit the twilioPhone property entirely to leave existing numbers unchanged. Send an empty object \{} to clear all per-account numbers. To clear a single account only, set that account id to an empty string "".
Platform language preference for the user Posibles valores: 'en\_US', 'es', 'fr\_CA', 'fr\_FR', 'nl', 'de', 'pt\_PT', 'pt\_BR', 'it', 'sv', 'da', 'fi', 'no'
## Respuestas
Posibles valores: 'campaigns.readonly', 'campaigns.write', 'calendars.readonly', 'calendars/events.write', 'calendars/groups.write', 'calendars.write', 'contacts.write', 'contacts/bulkActions.write', 'workflows.readonly', 'workflows.write', 'triggers.write', 'funnels.write', 'forms.write', 'surveys.write', 'quizzes.write', 'websites.write', 'medias.write', 'medias.readonly', 'opportunities.write', 'opportunities/leadValue.readonly', 'opportunities/bulkActions.write', 'reporting/phone.readonly', 'reporting/adwords.readonly', 'reporting/facebookAds.readonly', 'reporting/attributions.readonly', 'prospecting/auditReport.write', 'reporting/reports.readonly', 'reporting/agent.readonly', 'reporting/reports.write', 'reporting/stats.export', 'payments.write', 'payments/records.write', 'payments/orders.readonly', 'payments/orders.export', 'payments/orders.import', 'payments/orders.collectPayment', 'payments/subscriptions.readonly', 'payments/subscriptions.write', 'payments/subscriptions.update', 'payments/subscriptions.export', 'payments/subscriptions.pauseResumeCancel', 'payments/subscriptions.sharePaymentMethod', 'payments/transactions.readonly', 'payments/transactions.export', 'payments/transactions.import', 'payments/transactions.refund', 'payments/transactions.viewReceipts', 'payments/taxesSettings.readonly', 'payments/settings.readonly', 'payments/taxesSettings.updateInclusiveExclusive', 'payments/taxesSettings.manageRates', 'payments/taxesSettings.configureAutomatic', 'products.readonly', 'products.write', 'products.delete', 'products.duplicate', 'products.bulkActions', 'payments/settings.write', 'payments/settings.configureReceipt', 'payments/settings.configureSubscription', 'invoices.write', 'invoices.readonly', 'invoices/schedule.readonly', 'invoices/schedule.write', 'invoices/template.readonly', 'invoices/template.write', 'reputation/review\.write', 'reputation/listing.write', 'reputation/reviewsAIAgents.write', 'reputation/gbp.write', 'conversations.write', 'conversations.readonly', 'conversations/message.readonly', 'conversations/message.write', 'contentAI.write', 'dashboard/stats.readonly', 'locations/tags.write', 'locations/tags.readonly', 'marketing.write', 'eliza.write', 'settings.write', 'socialplanner/post.write', 'socialplanner/account.readonly', 'socialplanner/account.write', 'socialplanner/category.readonly', 'socialplanner/category.write', 'socialplanner/csv.readonly', 'socialplanner/csv.write', 'socialplanner/group.write', 'socialplanner/hashtag.readonly', 'socialplanner/hashtag.write', 'socialplanner/oauth.readonly', 'socialplanner/oauth.write', 'socialplanner/post.readonly', 'socialplanner/recurring.readonly', 'socialplanner/recurring.write', 'socialplanner/review\.readonly', 'socialplanner/review\.write', 'socialplanner/rss.readonly', 'socialplanner/rss.write', 'socialplanner/search.readonly', 'socialplanner/setting.readonly', 'socialplanner/setting.write', 'socialplanner/stat.readonly', 'socialplanner/tag.readonly', 'socialplanner/tag.write', 'socialplanner/filters.readonly', 'socialplanner/medias.readonly', 'socialplanner/medias.write', 'socialplanner/watermarks.readonly', 'socialplanner/watermarks.write', 'socialplanner/metatag.readonly', 'socialplanner/facebook.readonly', 'socialplanner/linkedin.readonly', 'socialplanner/twitter.readonly', 'socialplanner/notification.readonly', 'socialplanner/notification.write', 'socialplanner/snapshot.readonly', 'socialplanner/snapshot.write', 'marketing/affiliate.write', 'blogs.write', 'membership.write', 'communities.write', 'gokollab.write', 'certificates.write', 'certificates.readonly', 'adPublishing.write', 'adPublishing.readonly', 'prospecting.write', 'prospecting.readonly', 'prospecting/reports.readonly', 'private-integration-account.readonly', 'private-integration-account.write', 'private-integration-company.readonly', 'private-integration-company.write', 'native-integrations.readonly', 'native-integrations.write', 'wordpress.write', 'wordpress.read', 'custom-menu-link.write', 'qrcodes.write', 'users/team-management.write', 'users/team-management.readonly', 'loginas.write', 'users-sso-login-management.write', 'users-sso-login-management.readonly', 'sso-config.write', 'snapshots/api.readonly', 'snapshots/api.create', 'snapshots/api.edit', 'snapshots/api.push', 'snapshots/api.refresh', 'snapshots/api.share', 'snapshots/api.delete', 'internaltools.account-transfer.write', 'internaltools.account-transfer.readonly', 'affiliateportal.write', 'affiliateportal.readonly', 'companies.write', 'internaltools.billing.write', 'internaltools.billing.readonly', 'internaltools.billing-common.readonly', 'internaltools.billing-common.write', 'voice-ai-agents.write', 'voice-ai-agents.readonly', 'voice-ai-common.readonly', 'voice-ai-common.write', 'voice-ai-agent-goals.readonly', 'voice-ai-agent-goals.write', 'voice-ai-dashboard.readonly', 'agency/launchpad.write', 'agency/launchpad.readonly', 'launchpad/account.write', 'launchpad/account.readonly', 'text-ai-agents.write', 'text-ai-agent-goals.readonly', 'text-ai-agent-goals.write', 'text-ai-agent-training.write', 'text-ai-agents-dashboard.readonly', 'accounts.create', 'accounts.delete', 'accounts.export.list', 'accounts.features-limits.manage', 'accounts.pause-resume', 'accounts.agency-accounts.manage', 'accounts.billing.manage', 'accounts.details.manage', 'audit-logs.readonly', 'audit-logs.export'
LC Phone Inbound Phone Numbers
Platform language preference for the user Posibles valores: 'en\_US', 'es', 'fr\_CA', 'fr\_FR', 'nl', 'de', 'pt\_PT', 'pt\_BR', 'it', 'sv', 'da', 'fi', 'no'
```json theme={null}
{
"id": "0IHuJvc2ofPAAA8GzTRi",
"name": "John Deo",
"firstName": "John",
"lastName": "Deo",
"email": "john@deo.com",
"phone": "+1 808-868-8888",
"extension": "",
"permissions": {
"campaignsEnabled": true,
"campaignsReadOnly": false,
"contactsEnabled": true,
"workflowsEnabled": true,
"workflowsReadOnly": true,
"triggersEnabled": true,
"funnelsEnabled": true,
"websitesEnabled": false,
"opportunitiesEnabled": true,
"dashboardStatsEnabled": true,
"bulkRequestsEnabled": true,
"appointmentsEnabled": true,
"reviewsEnabled": true,
"onlineListingsEnabled": true,
"phoneCallEnabled": true,
"conversationsEnabled": true,
"assignedDataOnly": false,
"adwordsReportingEnabled": false,
"membershipEnabled": false,
"facebookAdsReportingEnabled": false,
"attributionsReportingEnabled": false,
"settingsEnabled": true,
"tagsEnabled": true,
"leadValueEnabled": true,
"marketingEnabled": true,
"agentReportingEnabled": true,
"botService": false,
"socialPlanner": true,
"bloggingEnabled": true,
"invoiceEnabled": true,
// truncado: 23 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/users/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"companyId": "ve9EPM428h8vShlRW1KT",
"firstName": "John",
"lastName": "Deo",
"email": "john@deo.com",
"password": "*******",
"phone": "+18832327657",
"type": "account",
"role": "admin",
"locationIds": [
"C2QujeCh8ZnC7al2InWR"
],
"permissions": {
"campaignsEnabled": true,
"campaignsReadOnly": false,
"contactsEnabled": true,
"workflowsEnabled": true,
"workflowsReadOnly": true,
"triggersEnabled": true,
"funnelsEnabled": true,
"websitesEnabled": false,
"opportunitiesEnabled": true,
"dashboardStatsEnabled": true,
"bulkRequestsEnabled": true,
"appointmentsEnabled": true,
"reviewsEnabled": true,
"onlineListingsEnabled": true,
"phoneCallEnabled": true,
"conversationsEnabled": true,
"assignedDataOnly": false,
"adwordsReportingEnabled": false,
"membershipEnabled": false,
"facebookAdsReportingEnabled": false,
"attributionsReportingEnabled": false,
"settingsEnabled": true,
"tagsEnabled": true,
"leadValueEnabled": true,
"marketingEnabled": true,
"agentReportingEnabled": true,
"botService": false,
"socialPlanner": true,
"bloggingEnabled": true,
"invoiceEnabled": true,
"affiliateManagerEnabled": true,
"contentAiEnabled": true,
"refundsEnabled": true,
"recordPaymentEnabled": true,
"cancelSubscriptionEnabled": true,
"paymentsEnabled": true,
"communitiesEnabled": true,
"exportPaymentsEnabled": true
},
"scopes": [
"contacts.write",
"campaigns.readonly"
],
"scopesAssignedToOnly": [
"contacts.write",
"campaigns.readonly"
],
"profilePhoto": "https://img.png",
"twilioPhone": {
"C2QujeCh8ZnC7al2InWR": "+18832327657",
"M2QrtfVt8ZnC7cv2InDL": "+18832327657"
},
"platformLanguage": "en_US"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/users/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"companyId": "ve9EPM428h8vShlRW1KT", "firstName": "John", "lastName": "Deo", "email": "john@deo.com", "password": "*******", "phone": "+18832327657", "type": "account", "role": "admin", "locationIds": ["C2QujeCh8ZnC7al2InWR"], "permissions": {"campaignsEnabled": true, "campaignsReadOnly": false, "contactsEnabled": true, "workflowsEnabled": true, "workflowsReadOnly": true, "triggersEnabled": true, "funnelsEnabled": true, "websitesEnabled": false, "opportunitiesEnabled": true, "dashboardStatsEnabled": true, "bulkRequestsEnabled": true, "appointmentsEnabled": true, "reviewsEnabled": true, "onlineListingsEnabled": true, "phoneCallEnabled": true, "conversationsEnabled": true, "assignedDataOnly": false, "adwordsReportingEnabled": false, "membershipEnabled": false, "facebookAdsReportingEnabled": false, "attributionsReportingEnabled": false, "settingsEnabled": true, "tagsEnabled": true, "leadValueEnabled": true, "marketingEnabled": true, "agentReportingEnabled": true, "botService": false, "socialPlanner": true, "bloggingEnabled": true, "invoiceEnabled": true, "affiliateManagerEnabled": true, "contentAiEnabled": true, "refundsEnabled": true, "recordPaymentEnabled": true, "cancelSubscriptionEnabled": true, "paymentsEnabled": true, "communitiesEnabled": true, "exportPaymentsEnabled": true}, "scopes": ["contacts.write", "campaigns.readonly"], "scopesAssignedToOnly": ["contacts.write", "campaigns.readonly"], "profilePhoto": "https://img.png", "twilioPhone": {"C2QujeCh8ZnC7al2InWR": "+18832327657", "M2QrtfVt8ZnC7cv2InDL": "+18832327657"}, "platformLanguage": "en_US"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/users/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"companyId": "ve9EPM428h8vShlRW1KT", "firstName": "John", "lastName": "Deo", "email": "john@deo.com", "password": "*******", "phone": "+18832327657", "type": "account", "role": "admin", "locationIds": ["C2QujeCh8ZnC7al2InWR"], "permissions": {"campaignsEnabled": true, "campaignsReadOnly": false, "contactsEnabled": true, "workflowsEnabled": true, "workflowsReadOnly": true, "triggersEnabled": true, "funnelsEnabled": true, "websitesEnabled": false, "opportunitiesEnabled": true, "dashboardStatsEnabled": true, "bulkRequestsEnabled": true, "appointmentsEnabled": true, "reviewsEnabled": true, "onlineListingsEnabled": true, "phoneCallEnabled": true, "conversationsEnabled": true, "assignedDataOnly": false, "adwordsReportingEnabled": false, "membershipEnabled": false, "facebookAdsReportingEnabled": false, "attributionsReportingEnabled": false, "settingsEnabled": true, "tagsEnabled": true, "leadValueEnabled": true, "marketingEnabled": true, "agentReportingEnabled": true, "botService": false, "socialPlanner": true, "bloggingEnabled": true, "invoiceEnabled": true, "affiliateManagerEnabled": true, "contentAiEnabled": true, "refundsEnabled": true, "recordPaymentEnabled": true, "cancelSubscriptionEnabled": true, "paymentsEnabled": true, "communitiesEnabled": true, "exportPaymentsEnabled": true}, "scopes": ["contacts.write", "campaigns.readonly"], "scopesAssignedToOnly": ["contacts.write", "campaigns.readonly"], "profilePhoto": "https://img.png", "twilioPhone": {"C2QujeCh8ZnC7al2InWR": "+18832327657", "M2QrtfVt8ZnC7cv2InDL": "+18832327657"}, "platformLanguage": "en_US"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'companyId': 've9EPM428h8vShlRW1KT', 'firstName': 'John', 'lastName': 'Deo', 'email': 'john@deo.com', 'password': '*******', 'phone': '+18832327657', 'type': 'account', 'role': 'admin', 'locationIds': ['C2QujeCh8ZnC7al2InWR'], 'permissions': {'campaignsEnabled': true, 'campaignsReadOnly': false, 'contactsEnabled': true, 'workflowsEnabled': true, 'workflowsReadOnly': true, 'triggersEnabled': true, 'funnelsEnabled': true, 'websitesEnabled': false, 'opportunitiesEnabled': true, 'dashboardStatsEnabled': true, 'bulkRequestsEnabled': true, 'appointmentsEnabled': true, 'reviewsEnabled': true, 'onlineListingsEnabled': true, 'phoneCallEnabled': true, 'conversationsEnabled': true, 'assignedDataOnly': false, 'adwordsReportingEnabled': false, 'membershipEnabled': false, 'facebookAdsReportingEnabled': false, 'attributionsReportingEnabled': false, 'settingsEnabled': true, 'tagsEnabled': true, 'leadValueEnabled': true, 'marketingEnabled': true, 'agentReportingEnabled': true, 'botService': false, 'socialPlanner': true, 'bloggingEnabled': true, 'invoiceEnabled': true, 'affiliateManagerEnabled': true, 'contentAiEnabled': true, 'refundsEnabled': true, 'recordPaymentEnabled': true, 'cancelSubscriptionEnabled': true, 'paymentsEnabled': true, 'communitiesEnabled': true, 'exportPaymentsEnabled': true}, 'scopes': ['contacts.write', 'campaigns.readonly'], 'scopesAssignedToOnly': ['contacts.write', 'campaigns.readonly'], 'profilePhoto': 'https://img.png', 'twilioPhone': {'C2QujeCh8ZnC7al2InWR': '+18832327657', 'M2QrtfVt8ZnC7cv2InDL': '+18832327657'}, 'platformLanguage': 'en_US'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete User
Source: https://developers.leadwaycrm.com/api-reference/users/users-delete-user
Delete User
Delete User
```http theme={null}
DELETE https://services.leadconnectorhq.com/users/{userId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Respuestas
```json theme={null}
{
"succeded": true,
"message": "Queued deleting user with e-mail john@deo.com and name John Deo. Will take effect in a few minutes."
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/users/YOUR_userId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/users/YOUR_userId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/users/YOUR_userId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Filter Users by Email
Source: https://developers.leadwaycrm.com/api-reference/users/users-filter-users-by-email
Filter users by company ID, deleted status, and email array
Filter users by company ID, deleted status, and email array
```http theme={null}
POST https://services.leadconnectorhq.com/users/search/filter-by-email
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Company ID to filter users
Comma-separated list of email addresses to filter users
Filter deleted users
No of results to be skipped before returning the result
No of results to be limited before returning the result
Projection fields to return. Use "all" for all fields, or specify comma-separated field names. Default returns only id and email
## Respuestas
Posibles valores: 'campaigns.readonly', 'campaigns.write', 'calendars.readonly', 'calendars/events.write', 'calendars/groups.write', 'calendars.write', 'contacts.write', 'contacts/bulkActions.write', 'workflows.readonly', 'workflows.write', 'triggers.write', 'funnels.write', 'forms.write', 'surveys.write', 'quizzes.write', 'websites.write', 'medias.write', 'medias.readonly', 'opportunities.write', 'opportunities/leadValue.readonly', 'opportunities/bulkActions.write', 'reporting/phone.readonly', 'reporting/adwords.readonly', 'reporting/facebookAds.readonly', 'reporting/attributions.readonly', 'prospecting/auditReport.write', 'reporting/reports.readonly', 'reporting/agent.readonly', 'reporting/reports.write', 'reporting/stats.export', 'payments.write', 'payments/records.write', 'payments/orders.readonly', 'payments/orders.export', 'payments/orders.import', 'payments/orders.collectPayment', 'payments/subscriptions.readonly', 'payments/subscriptions.write', 'payments/subscriptions.update', 'payments/subscriptions.export', 'payments/subscriptions.pauseResumeCancel', 'payments/subscriptions.sharePaymentMethod', 'payments/transactions.readonly', 'payments/transactions.export', 'payments/transactions.import', 'payments/transactions.refund', 'payments/transactions.viewReceipts', 'payments/taxesSettings.readonly', 'payments/settings.readonly', 'payments/taxesSettings.updateInclusiveExclusive', 'payments/taxesSettings.manageRates', 'payments/taxesSettings.configureAutomatic', 'products.readonly', 'products.write', 'products.delete', 'products.duplicate', 'products.bulkActions', 'payments/settings.write', 'payments/settings.configureReceipt', 'payments/settings.configureSubscription', 'invoices.write', 'invoices.readonly', 'invoices/schedule.readonly', 'invoices/schedule.write', 'invoices/template.readonly', 'invoices/template.write', 'reputation/review\.write', 'reputation/listing.write', 'reputation/reviewsAIAgents.write', 'reputation/gbp.write', 'conversations.write', 'conversations.readonly', 'conversations/message.readonly', 'conversations/message.write', 'contentAI.write', 'dashboard/stats.readonly', 'locations/tags.write', 'locations/tags.readonly', 'marketing.write', 'eliza.write', 'settings.write', 'socialplanner/post.write', 'socialplanner/account.readonly', 'socialplanner/account.write', 'socialplanner/category.readonly', 'socialplanner/category.write', 'socialplanner/csv.readonly', 'socialplanner/csv.write', 'socialplanner/group.write', 'socialplanner/hashtag.readonly', 'socialplanner/hashtag.write', 'socialplanner/oauth.readonly', 'socialplanner/oauth.write', 'socialplanner/post.readonly', 'socialplanner/recurring.readonly', 'socialplanner/recurring.write', 'socialplanner/review\.readonly', 'socialplanner/review\.write', 'socialplanner/rss.readonly', 'socialplanner/rss.write', 'socialplanner/search.readonly', 'socialplanner/setting.readonly', 'socialplanner/setting.write', 'socialplanner/stat.readonly', 'socialplanner/tag.readonly', 'socialplanner/tag.write', 'socialplanner/filters.readonly', 'socialplanner/medias.readonly', 'socialplanner/medias.write', 'socialplanner/watermarks.readonly', 'socialplanner/watermarks.write', 'socialplanner/metatag.readonly', 'socialplanner/facebook.readonly', 'socialplanner/linkedin.readonly', 'socialplanner/twitter.readonly', 'socialplanner/notification.readonly', 'socialplanner/notification.write', 'socialplanner/snapshot.readonly', 'socialplanner/snapshot.write', 'marketing/affiliate.write', 'blogs.write', 'membership.write', 'communities.write', 'gokollab.write', 'certificates.write', 'certificates.readonly', 'adPublishing.write', 'adPublishing.readonly', 'prospecting.write', 'prospecting.readonly', 'prospecting/reports.readonly', 'private-integration-account.readonly', 'private-integration-account.write', 'private-integration-company.readonly', 'private-integration-company.write', 'native-integrations.readonly', 'native-integrations.write', 'wordpress.write', 'wordpress.read', 'custom-menu-link.write', 'qrcodes.write', 'users/team-management.write', 'users/team-management.readonly', 'loginas.write', 'users-sso-login-management.write', 'users-sso-login-management.readonly', 'sso-config.write', 'snapshots/api.readonly', 'snapshots/api.create', 'snapshots/api.edit', 'snapshots/api.push', 'snapshots/api.refresh', 'snapshots/api.share', 'snapshots/api.delete', 'internaltools.account-transfer.write', 'internaltools.account-transfer.readonly', 'affiliateportal.write', 'affiliateportal.readonly', 'companies.write', 'internaltools.billing.write', 'internaltools.billing.readonly', 'internaltools.billing-common.readonly', 'internaltools.billing-common.write', 'voice-ai-agents.write', 'voice-ai-agents.readonly', 'voice-ai-common.readonly', 'voice-ai-common.write', 'voice-ai-agent-goals.readonly', 'voice-ai-agent-goals.write', 'voice-ai-dashboard.readonly', 'agency/launchpad.write', 'agency/launchpad.readonly', 'launchpad/account.write', 'launchpad/account.readonly', 'text-ai-agents.write', 'text-ai-agent-goals.readonly', 'text-ai-agent-goals.write', 'text-ai-agent-training.write', 'text-ai-agents-dashboard.readonly', 'accounts.create', 'accounts.delete', 'accounts.export.list', 'accounts.features-limits.manage', 'accounts.pause-resume', 'accounts.agency-accounts.manage', 'accounts.billing.manage', 'accounts.details.manage', 'audit-logs.readonly', 'audit-logs.export'
LC Phone Inbound Phone Numbers
Platform language preference for the user Posibles valores: 'en\_US', 'es', 'fr\_CA', 'fr\_FR', 'nl', 'de', 'pt\_PT', 'pt\_BR', 'it', 'sv', 'da', 'fi', 'no'
```json theme={null}
{
"users": [
{
"id": "0IHuJvc2ofPAAA8GzTRi",
"name": "John Deo",
"firstName": "John",
"lastName": "Deo",
"email": "john@deo.com",
"phone": "+1 808-868-8888",
"extension": "",
"permissions": {
"campaignsEnabled": true,
"campaignsReadOnly": false,
"contactsEnabled": true,
"workflowsEnabled": true,
"workflowsReadOnly": true,
"triggersEnabled": true,
"funnelsEnabled": true,
"websitesEnabled": false,
"opportunitiesEnabled": true,
"dashboardStatsEnabled": true,
"bulkRequestsEnabled": true,
"appointmentsEnabled": true,
"reviewsEnabled": true,
"onlineListingsEnabled": true,
"phoneCallEnabled": true,
"conversationsEnabled": true,
"assignedDataOnly": false,
"adwordsReportingEnabled": false,
"membershipEnabled": false,
"facebookAdsReportingEnabled": false,
"attributionsReportingEnabled": false,
"settingsEnabled": true,
"tagsEnabled": true,
"leadValueEnabled": true,
"marketingEnabled": true,
"agentReportingEnabled": true,
"botService": false,
"socialPlanner": true,
// truncado: 29 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/users/search/filter-by-email' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"companyId": "5DP41231LkQsiKESj6rh",
"emails": "user1@example.com,user2@example.com",
"deleted": false,
"skip": "1",
"limit": "10",
"projection": "all"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/users/search/filter-by-email', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"companyId": "5DP41231LkQsiKESj6rh", "emails": "user1@example.com,user2@example.com", "deleted": false, "skip": "1", "limit": "10", "projection": "all"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/users/search/filter-by-email',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"companyId": "5DP41231LkQsiKESj6rh", "emails": "user1@example.com,user2@example.com", "deleted": false, "skip": "1", "limit": "10", "projection": "all"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'companyId': '5DP41231LkQsiKESj6rh', 'emails': 'user1@example.com,user2@example.com', 'deleted': false, 'skip': '1', 'limit': '10', 'projection': 'all'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get User
Source: https://developers.leadwaycrm.com/api-reference/users/users-get-user
Get User
Get User
```http theme={null}
GET https://services.leadconnectorhq.com/users/{userId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
User Id
## Respuestas
Posibles valores: 'campaigns.readonly', 'campaigns.write', 'calendars.readonly', 'calendars/events.write', 'calendars/groups.write', 'calendars.write', 'contacts.write', 'contacts/bulkActions.write', 'workflows.readonly', 'workflows.write', 'triggers.write', 'funnels.write', 'forms.write', 'surveys.write', 'quizzes.write', 'websites.write', 'medias.write', 'medias.readonly', 'opportunities.write', 'opportunities/leadValue.readonly', 'opportunities/bulkActions.write', 'reporting/phone.readonly', 'reporting/adwords.readonly', 'reporting/facebookAds.readonly', 'reporting/attributions.readonly', 'prospecting/auditReport.write', 'reporting/reports.readonly', 'reporting/agent.readonly', 'reporting/reports.write', 'reporting/stats.export', 'payments.write', 'payments/records.write', 'payments/orders.readonly', 'payments/orders.export', 'payments/orders.import', 'payments/orders.collectPayment', 'payments/subscriptions.readonly', 'payments/subscriptions.write', 'payments/subscriptions.update', 'payments/subscriptions.export', 'payments/subscriptions.pauseResumeCancel', 'payments/subscriptions.sharePaymentMethod', 'payments/transactions.readonly', 'payments/transactions.export', 'payments/transactions.import', 'payments/transactions.refund', 'payments/transactions.viewReceipts', 'payments/taxesSettings.readonly', 'payments/settings.readonly', 'payments/taxesSettings.updateInclusiveExclusive', 'payments/taxesSettings.manageRates', 'payments/taxesSettings.configureAutomatic', 'products.readonly', 'products.write', 'products.delete', 'products.duplicate', 'products.bulkActions', 'payments/settings.write', 'payments/settings.configureReceipt', 'payments/settings.configureSubscription', 'invoices.write', 'invoices.readonly', 'invoices/schedule.readonly', 'invoices/schedule.write', 'invoices/template.readonly', 'invoices/template.write', 'reputation/review\.write', 'reputation/listing.write', 'reputation/reviewsAIAgents.write', 'reputation/gbp.write', 'conversations.write', 'conversations.readonly', 'conversations/message.readonly', 'conversations/message.write', 'contentAI.write', 'dashboard/stats.readonly', 'locations/tags.write', 'locations/tags.readonly', 'marketing.write', 'eliza.write', 'settings.write', 'socialplanner/post.write', 'socialplanner/account.readonly', 'socialplanner/account.write', 'socialplanner/category.readonly', 'socialplanner/category.write', 'socialplanner/csv.readonly', 'socialplanner/csv.write', 'socialplanner/group.write', 'socialplanner/hashtag.readonly', 'socialplanner/hashtag.write', 'socialplanner/oauth.readonly', 'socialplanner/oauth.write', 'socialplanner/post.readonly', 'socialplanner/recurring.readonly', 'socialplanner/recurring.write', 'socialplanner/review\.readonly', 'socialplanner/review\.write', 'socialplanner/rss.readonly', 'socialplanner/rss.write', 'socialplanner/search.readonly', 'socialplanner/setting.readonly', 'socialplanner/setting.write', 'socialplanner/stat.readonly', 'socialplanner/tag.readonly', 'socialplanner/tag.write', 'socialplanner/filters.readonly', 'socialplanner/medias.readonly', 'socialplanner/medias.write', 'socialplanner/watermarks.readonly', 'socialplanner/watermarks.write', 'socialplanner/metatag.readonly', 'socialplanner/facebook.readonly', 'socialplanner/linkedin.readonly', 'socialplanner/twitter.readonly', 'socialplanner/notification.readonly', 'socialplanner/notification.write', 'socialplanner/snapshot.readonly', 'socialplanner/snapshot.write', 'marketing/affiliate.write', 'blogs.write', 'membership.write', 'communities.write', 'gokollab.write', 'certificates.write', 'certificates.readonly', 'adPublishing.write', 'adPublishing.readonly', 'prospecting.write', 'prospecting.readonly', 'prospecting/reports.readonly', 'private-integration-account.readonly', 'private-integration-account.write', 'private-integration-company.readonly', 'private-integration-company.write', 'native-integrations.readonly', 'native-integrations.write', 'wordpress.write', 'wordpress.read', 'custom-menu-link.write', 'qrcodes.write', 'users/team-management.write', 'users/team-management.readonly', 'loginas.write', 'users-sso-login-management.write', 'users-sso-login-management.readonly', 'sso-config.write', 'snapshots/api.readonly', 'snapshots/api.create', 'snapshots/api.edit', 'snapshots/api.push', 'snapshots/api.refresh', 'snapshots/api.share', 'snapshots/api.delete', 'internaltools.account-transfer.write', 'internaltools.account-transfer.readonly', 'affiliateportal.write', 'affiliateportal.readonly', 'companies.write', 'internaltools.billing.write', 'internaltools.billing.readonly', 'internaltools.billing-common.readonly', 'internaltools.billing-common.write', 'voice-ai-agents.write', 'voice-ai-agents.readonly', 'voice-ai-common.readonly', 'voice-ai-common.write', 'voice-ai-agent-goals.readonly', 'voice-ai-agent-goals.write', 'voice-ai-dashboard.readonly', 'agency/launchpad.write', 'agency/launchpad.readonly', 'launchpad/account.write', 'launchpad/account.readonly', 'text-ai-agents.write', 'text-ai-agent-goals.readonly', 'text-ai-agent-goals.write', 'text-ai-agent-training.write', 'text-ai-agents-dashboard.readonly', 'accounts.create', 'accounts.delete', 'accounts.export.list', 'accounts.features-limits.manage', 'accounts.pause-resume', 'accounts.agency-accounts.manage', 'accounts.billing.manage', 'accounts.details.manage', 'audit-logs.readonly', 'audit-logs.export'
LC Phone Inbound Phone Numbers
Platform language preference for the user Posibles valores: 'en\_US', 'es', 'fr\_CA', 'fr\_FR', 'nl', 'de', 'pt\_PT', 'pt\_BR', 'it', 'sv', 'da', 'fi', 'no'
```json theme={null}
{
"id": "0IHuJvc2ofPAAA8GzTRi",
"name": "John Deo",
"firstName": "John",
"lastName": "Deo",
"email": "john@deo.com",
"phone": "+1 808-868-8888",
"extension": "",
"permissions": {
"campaignsEnabled": true,
"campaignsReadOnly": false,
"contactsEnabled": true,
"workflowsEnabled": true,
"workflowsReadOnly": true,
"triggersEnabled": true,
"funnelsEnabled": true,
"websitesEnabled": false,
"opportunitiesEnabled": true,
"dashboardStatsEnabled": true,
"bulkRequestsEnabled": true,
"appointmentsEnabled": true,
"reviewsEnabled": true,
"onlineListingsEnabled": true,
"phoneCallEnabled": true,
"conversationsEnabled": true,
"assignedDataOnly": false,
"adwordsReportingEnabled": false,
"membershipEnabled": false,
"facebookAdsReportingEnabled": false,
"attributionsReportingEnabled": false,
"settingsEnabled": true,
"tagsEnabled": true,
"leadValueEnabled": true,
"marketingEnabled": true,
"agentReportingEnabled": true,
"botService": false,
"socialPlanner": true,
"bloggingEnabled": true,
"invoiceEnabled": true,
// truncado: 23 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/users/YOUR_userId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/users/YOUR_userId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/users/YOUR_userId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get User by Account
Source: https://developers.leadwaycrm.com/api-reference/users/users-get-user-by-account
Deprecated. Use `GET /users/search` instead. Pass `locationId` as a query parameter to filter results by account, along with the required `companyId` and other search filters as needed.
Deprecated. Use `GET /users/search` instead. Pass `locationId` as a query parameter to filter results by account, along with the required `companyId` and other search filters as needed.
```http theme={null}
GET https://services.leadconnectorhq.com/users/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
## Respuestas
Posibles valores: 'campaigns.readonly', 'campaigns.write', 'calendars.readonly', 'calendars/events.write', 'calendars/groups.write', 'calendars.write', 'contacts.write', 'contacts/bulkActions.write', 'workflows.readonly', 'workflows.write', 'triggers.write', 'funnels.write', 'forms.write', 'surveys.write', 'quizzes.write', 'websites.write', 'medias.write', 'medias.readonly', 'opportunities.write', 'opportunities/leadValue.readonly', 'opportunities/bulkActions.write', 'reporting/phone.readonly', 'reporting/adwords.readonly', 'reporting/facebookAds.readonly', 'reporting/attributions.readonly', 'prospecting/auditReport.write', 'reporting/reports.readonly', 'reporting/agent.readonly', 'reporting/reports.write', 'reporting/stats.export', 'payments.write', 'payments/records.write', 'payments/orders.readonly', 'payments/orders.export', 'payments/orders.import', 'payments/orders.collectPayment', 'payments/subscriptions.readonly', 'payments/subscriptions.write', 'payments/subscriptions.update', 'payments/subscriptions.export', 'payments/subscriptions.pauseResumeCancel', 'payments/subscriptions.sharePaymentMethod', 'payments/transactions.readonly', 'payments/transactions.export', 'payments/transactions.import', 'payments/transactions.refund', 'payments/transactions.viewReceipts', 'payments/taxesSettings.readonly', 'payments/settings.readonly', 'payments/taxesSettings.updateInclusiveExclusive', 'payments/taxesSettings.manageRates', 'payments/taxesSettings.configureAutomatic', 'products.readonly', 'products.write', 'products.delete', 'products.duplicate', 'products.bulkActions', 'payments/settings.write', 'payments/settings.configureReceipt', 'payments/settings.configureSubscription', 'invoices.write', 'invoices.readonly', 'invoices/schedule.readonly', 'invoices/schedule.write', 'invoices/template.readonly', 'invoices/template.write', 'reputation/review\.write', 'reputation/listing.write', 'reputation/reviewsAIAgents.write', 'reputation/gbp.write', 'conversations.write', 'conversations.readonly', 'conversations/message.readonly', 'conversations/message.write', 'contentAI.write', 'dashboard/stats.readonly', 'locations/tags.write', 'locations/tags.readonly', 'marketing.write', 'eliza.write', 'settings.write', 'socialplanner/post.write', 'socialplanner/account.readonly', 'socialplanner/account.write', 'socialplanner/category.readonly', 'socialplanner/category.write', 'socialplanner/csv.readonly', 'socialplanner/csv.write', 'socialplanner/group.write', 'socialplanner/hashtag.readonly', 'socialplanner/hashtag.write', 'socialplanner/oauth.readonly', 'socialplanner/oauth.write', 'socialplanner/post.readonly', 'socialplanner/recurring.readonly', 'socialplanner/recurring.write', 'socialplanner/review\.readonly', 'socialplanner/review\.write', 'socialplanner/rss.readonly', 'socialplanner/rss.write', 'socialplanner/search.readonly', 'socialplanner/setting.readonly', 'socialplanner/setting.write', 'socialplanner/stat.readonly', 'socialplanner/tag.readonly', 'socialplanner/tag.write', 'socialplanner/filters.readonly', 'socialplanner/medias.readonly', 'socialplanner/medias.write', 'socialplanner/watermarks.readonly', 'socialplanner/watermarks.write', 'socialplanner/metatag.readonly', 'socialplanner/facebook.readonly', 'socialplanner/linkedin.readonly', 'socialplanner/twitter.readonly', 'socialplanner/notification.readonly', 'socialplanner/notification.write', 'socialplanner/snapshot.readonly', 'socialplanner/snapshot.write', 'marketing/affiliate.write', 'blogs.write', 'membership.write', 'communities.write', 'gokollab.write', 'certificates.write', 'certificates.readonly', 'adPublishing.write', 'adPublishing.readonly', 'prospecting.write', 'prospecting.readonly', 'prospecting/reports.readonly', 'private-integration-account.readonly', 'private-integration-account.write', 'private-integration-company.readonly', 'private-integration-company.write', 'native-integrations.readonly', 'native-integrations.write', 'wordpress.write', 'wordpress.read', 'custom-menu-link.write', 'qrcodes.write', 'users/team-management.write', 'users/team-management.readonly', 'loginas.write', 'users-sso-login-management.write', 'users-sso-login-management.readonly', 'sso-config.write', 'snapshots/api.readonly', 'snapshots/api.create', 'snapshots/api.edit', 'snapshots/api.push', 'snapshots/api.refresh', 'snapshots/api.share', 'snapshots/api.delete', 'internaltools.account-transfer.write', 'internaltools.account-transfer.readonly', 'affiliateportal.write', 'affiliateportal.readonly', 'companies.write', 'internaltools.billing.write', 'internaltools.billing.readonly', 'internaltools.billing-common.readonly', 'internaltools.billing-common.write', 'voice-ai-agents.write', 'voice-ai-agents.readonly', 'voice-ai-common.readonly', 'voice-ai-common.write', 'voice-ai-agent-goals.readonly', 'voice-ai-agent-goals.write', 'voice-ai-dashboard.readonly', 'agency/launchpad.write', 'agency/launchpad.readonly', 'launchpad/account.write', 'launchpad/account.readonly', 'text-ai-agents.write', 'text-ai-agent-goals.readonly', 'text-ai-agent-goals.write', 'text-ai-agent-training.write', 'text-ai-agents-dashboard.readonly', 'accounts.create', 'accounts.delete', 'accounts.export.list', 'accounts.features-limits.manage', 'accounts.pause-resume', 'accounts.agency-accounts.manage', 'accounts.billing.manage', 'accounts.details.manage', 'audit-logs.readonly', 'audit-logs.export'
LC Phone Inbound Phone Numbers
Platform language preference for the user Posibles valores: 'en\_US', 'es', 'fr\_CA', 'fr\_FR', 'nl', 'de', 'pt\_PT', 'pt\_BR', 'it', 'sv', 'da', 'fi', 'no'
```json theme={null}
{
"users": [
{
"id": "0IHuJvc2ofPAAA8GzTRi",
"name": "John Deo",
"firstName": "John",
"lastName": "Deo",
"email": "john@deo.com",
"phone": "+1 808-868-8888",
"extension": "",
"permissions": {
"campaignsEnabled": true,
"campaignsReadOnly": false,
"contactsEnabled": true,
"workflowsEnabled": true,
"workflowsReadOnly": true,
"triggersEnabled": true,
"funnelsEnabled": true,
"websitesEnabled": false,
"opportunitiesEnabled": true,
"dashboardStatsEnabled": true,
"bulkRequestsEnabled": true,
"appointmentsEnabled": true,
"reviewsEnabled": true,
"onlineListingsEnabled": true,
"phoneCallEnabled": true,
"conversationsEnabled": true,
"assignedDataOnly": false,
"adwordsReportingEnabled": false,
"membershipEnabled": false,
"facebookAdsReportingEnabled": false,
"attributionsReportingEnabled": false,
"settingsEnabled": true,
"tagsEnabled": true,
"leadValueEnabled": true,
"marketingEnabled": true,
"agentReportingEnabled": true,
"botService": false,
"socialPlanner": true,
// truncado: 28 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/users/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/users/', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/users/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Search Users
Source: https://developers.leadwaycrm.com/api-reference/users/users-search-users
Search Users
Search Users
```http theme={null}
GET https://services.leadconnectorhq.com/users/search
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Company ID in which the search needs to be performed
The search term for the user is matched based on the user full name, email or phone
No of results to be skipped before returning the result
No of results to be limited before returning the result
Account ID in which the search needs to be performed
Type of the users to be filtered in the search
Role of the users to be filtered in the search
List of User IDs to be filtered in the search
The field on which sort is applied in which the results need to be sorted. Default is based on the first and last name
The direction in which the results need to be sorted
## Respuestas
Posibles valores: 'campaigns.readonly', 'campaigns.write', 'calendars.readonly', 'calendars/events.write', 'calendars/groups.write', 'calendars.write', 'contacts.write', 'contacts/bulkActions.write', 'workflows.readonly', 'workflows.write', 'triggers.write', 'funnels.write', 'forms.write', 'surveys.write', 'quizzes.write', 'websites.write', 'medias.write', 'medias.readonly', 'opportunities.write', 'opportunities/leadValue.readonly', 'opportunities/bulkActions.write', 'reporting/phone.readonly', 'reporting/adwords.readonly', 'reporting/facebookAds.readonly', 'reporting/attributions.readonly', 'prospecting/auditReport.write', 'reporting/reports.readonly', 'reporting/agent.readonly', 'reporting/reports.write', 'reporting/stats.export', 'payments.write', 'payments/records.write', 'payments/orders.readonly', 'payments/orders.export', 'payments/orders.import', 'payments/orders.collectPayment', 'payments/subscriptions.readonly', 'payments/subscriptions.write', 'payments/subscriptions.update', 'payments/subscriptions.export', 'payments/subscriptions.pauseResumeCancel', 'payments/subscriptions.sharePaymentMethod', 'payments/transactions.readonly', 'payments/transactions.export', 'payments/transactions.import', 'payments/transactions.refund', 'payments/transactions.viewReceipts', 'payments/taxesSettings.readonly', 'payments/settings.readonly', 'payments/taxesSettings.updateInclusiveExclusive', 'payments/taxesSettings.manageRates', 'payments/taxesSettings.configureAutomatic', 'products.readonly', 'products.write', 'products.delete', 'products.duplicate', 'products.bulkActions', 'payments/settings.write', 'payments/settings.configureReceipt', 'payments/settings.configureSubscription', 'invoices.write', 'invoices.readonly', 'invoices/schedule.readonly', 'invoices/schedule.write', 'invoices/template.readonly', 'invoices/template.write', 'reputation/review\.write', 'reputation/listing.write', 'reputation/reviewsAIAgents.write', 'reputation/gbp.write', 'conversations.write', 'conversations.readonly', 'conversations/message.readonly', 'conversations/message.write', 'contentAI.write', 'dashboard/stats.readonly', 'locations/tags.write', 'locations/tags.readonly', 'marketing.write', 'eliza.write', 'settings.write', 'socialplanner/post.write', 'socialplanner/account.readonly', 'socialplanner/account.write', 'socialplanner/category.readonly', 'socialplanner/category.write', 'socialplanner/csv.readonly', 'socialplanner/csv.write', 'socialplanner/group.write', 'socialplanner/hashtag.readonly', 'socialplanner/hashtag.write', 'socialplanner/oauth.readonly', 'socialplanner/oauth.write', 'socialplanner/post.readonly', 'socialplanner/recurring.readonly', 'socialplanner/recurring.write', 'socialplanner/review\.readonly', 'socialplanner/review\.write', 'socialplanner/rss.readonly', 'socialplanner/rss.write', 'socialplanner/search.readonly', 'socialplanner/setting.readonly', 'socialplanner/setting.write', 'socialplanner/stat.readonly', 'socialplanner/tag.readonly', 'socialplanner/tag.write', 'socialplanner/filters.readonly', 'socialplanner/medias.readonly', 'socialplanner/medias.write', 'socialplanner/watermarks.readonly', 'socialplanner/watermarks.write', 'socialplanner/metatag.readonly', 'socialplanner/facebook.readonly', 'socialplanner/linkedin.readonly', 'socialplanner/twitter.readonly', 'socialplanner/notification.readonly', 'socialplanner/notification.write', 'socialplanner/snapshot.readonly', 'socialplanner/snapshot.write', 'marketing/affiliate.write', 'blogs.write', 'membership.write', 'communities.write', 'gokollab.write', 'certificates.write', 'certificates.readonly', 'adPublishing.write', 'adPublishing.readonly', 'prospecting.write', 'prospecting.readonly', 'prospecting/reports.readonly', 'private-integration-account.readonly', 'private-integration-account.write', 'private-integration-company.readonly', 'private-integration-company.write', 'native-integrations.readonly', 'native-integrations.write', 'wordpress.write', 'wordpress.read', 'custom-menu-link.write', 'qrcodes.write', 'users/team-management.write', 'users/team-management.readonly', 'loginas.write', 'users-sso-login-management.write', 'users-sso-login-management.readonly', 'sso-config.write', 'snapshots/api.readonly', 'snapshots/api.create', 'snapshots/api.edit', 'snapshots/api.push', 'snapshots/api.refresh', 'snapshots/api.share', 'snapshots/api.delete', 'internaltools.account-transfer.write', 'internaltools.account-transfer.readonly', 'affiliateportal.write', 'affiliateportal.readonly', 'companies.write', 'internaltools.billing.write', 'internaltools.billing.readonly', 'internaltools.billing-common.readonly', 'internaltools.billing-common.write', 'voice-ai-agents.write', 'voice-ai-agents.readonly', 'voice-ai-common.readonly', 'voice-ai-common.write', 'voice-ai-agent-goals.readonly', 'voice-ai-agent-goals.write', 'voice-ai-dashboard.readonly', 'agency/launchpad.write', 'agency/launchpad.readonly', 'launchpad/account.write', 'launchpad/account.readonly', 'text-ai-agents.write', 'text-ai-agent-goals.readonly', 'text-ai-agent-goals.write', 'text-ai-agent-training.write', 'text-ai-agents-dashboard.readonly', 'accounts.create', 'accounts.delete', 'accounts.export.list', 'accounts.features-limits.manage', 'accounts.pause-resume', 'accounts.agency-accounts.manage', 'accounts.billing.manage', 'accounts.details.manage', 'audit-logs.readonly', 'audit-logs.export'
LC Phone Inbound Phone Numbers
Platform language preference for the user Posibles valores: 'en\_US', 'es', 'fr\_CA', 'fr\_FR', 'nl', 'de', 'pt\_PT', 'pt\_BR', 'it', 'sv', 'da', 'fi', 'no'
```json theme={null}
{
"users": [
{
"id": "0IHuJvc2ofPAAA8GzTRi",
"name": "John Deo",
"firstName": "John",
"lastName": "Deo",
"email": "john@deo.com",
"phone": "+1 808-868-8888",
"extension": "",
"permissions": {
"campaignsEnabled": true,
"campaignsReadOnly": false,
"contactsEnabled": true,
"workflowsEnabled": true,
"workflowsReadOnly": true,
"triggersEnabled": true,
"funnelsEnabled": true,
"websitesEnabled": false,
"opportunitiesEnabled": true,
"dashboardStatsEnabled": true,
"bulkRequestsEnabled": true,
"appointmentsEnabled": true,
"reviewsEnabled": true,
"onlineListingsEnabled": true,
"phoneCallEnabled": true,
"conversationsEnabled": true,
"assignedDataOnly": false,
"adwordsReportingEnabled": false,
"membershipEnabled": false,
"facebookAdsReportingEnabled": false,
"attributionsReportingEnabled": false,
"settingsEnabled": true,
"tagsEnabled": true,
"leadValueEnabled": true,
"marketingEnabled": true,
"agentReportingEnabled": true,
"botService": false,
"socialPlanner": true,
// truncado: 29 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/users/search' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/users/search', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/users/search',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Update User
Source: https://developers.leadwaycrm.com/api-reference/users/users-update-user
Update User
Update User
```http theme={null}
PUT https://services.leadconnectorhq.com/users/{userId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Email update is no longer supported due to security reasons.
Company/Agency Id. Required for Agency Level access
Scopes allowed for users. Only scopes that have been passed will be enabled. If passed empty all the scopes will be get disabled
Assigned Scopes allowed for users. Only scopes that have been passed will be enabled. If passed empty all the assigned scopes will be get disabled
Per-account inbound Twilio number in E.164 format, keyed by account id (Call and Voicemail Inbound Number for direct Twilio, not LC Phone). Replacement semantics: if you send twilioPhone in the request body, the stored map is replaced entirely with this object (not merged). Any account id omitted from the object is removed from the saved map. Omit the twilioPhone property entirely to leave existing numbers unchanged. Send an empty object \{} to clear all per-account numbers. To clear a single account only, set that account id to an empty string "".
Platform language preference for the user Posibles valores: 'en\_US', 'es', 'fr\_CA', 'fr\_FR', 'nl', 'de', 'pt\_PT', 'pt\_BR', 'it', 'sv', 'da', 'fi', 'no'
## Respuestas
Posibles valores: 'campaigns.readonly', 'campaigns.write', 'calendars.readonly', 'calendars/events.write', 'calendars/groups.write', 'calendars.write', 'contacts.write', 'contacts/bulkActions.write', 'workflows.readonly', 'workflows.write', 'triggers.write', 'funnels.write', 'forms.write', 'surveys.write', 'quizzes.write', 'websites.write', 'medias.write', 'medias.readonly', 'opportunities.write', 'opportunities/leadValue.readonly', 'opportunities/bulkActions.write', 'reporting/phone.readonly', 'reporting/adwords.readonly', 'reporting/facebookAds.readonly', 'reporting/attributions.readonly', 'prospecting/auditReport.write', 'reporting/reports.readonly', 'reporting/agent.readonly', 'reporting/reports.write', 'reporting/stats.export', 'payments.write', 'payments/records.write', 'payments/orders.readonly', 'payments/orders.export', 'payments/orders.import', 'payments/orders.collectPayment', 'payments/subscriptions.readonly', 'payments/subscriptions.write', 'payments/subscriptions.update', 'payments/subscriptions.export', 'payments/subscriptions.pauseResumeCancel', 'payments/subscriptions.sharePaymentMethod', 'payments/transactions.readonly', 'payments/transactions.export', 'payments/transactions.import', 'payments/transactions.refund', 'payments/transactions.viewReceipts', 'payments/taxesSettings.readonly', 'payments/settings.readonly', 'payments/taxesSettings.updateInclusiveExclusive', 'payments/taxesSettings.manageRates', 'payments/taxesSettings.configureAutomatic', 'products.readonly', 'products.write', 'products.delete', 'products.duplicate', 'products.bulkActions', 'payments/settings.write', 'payments/settings.configureReceipt', 'payments/settings.configureSubscription', 'invoices.write', 'invoices.readonly', 'invoices/schedule.readonly', 'invoices/schedule.write', 'invoices/template.readonly', 'invoices/template.write', 'reputation/review\.write', 'reputation/listing.write', 'reputation/reviewsAIAgents.write', 'reputation/gbp.write', 'conversations.write', 'conversations.readonly', 'conversations/message.readonly', 'conversations/message.write', 'contentAI.write', 'dashboard/stats.readonly', 'locations/tags.write', 'locations/tags.readonly', 'marketing.write', 'eliza.write', 'settings.write', 'socialplanner/post.write', 'socialplanner/account.readonly', 'socialplanner/account.write', 'socialplanner/category.readonly', 'socialplanner/category.write', 'socialplanner/csv.readonly', 'socialplanner/csv.write', 'socialplanner/group.write', 'socialplanner/hashtag.readonly', 'socialplanner/hashtag.write', 'socialplanner/oauth.readonly', 'socialplanner/oauth.write', 'socialplanner/post.readonly', 'socialplanner/recurring.readonly', 'socialplanner/recurring.write', 'socialplanner/review\.readonly', 'socialplanner/review\.write', 'socialplanner/rss.readonly', 'socialplanner/rss.write', 'socialplanner/search.readonly', 'socialplanner/setting.readonly', 'socialplanner/setting.write', 'socialplanner/stat.readonly', 'socialplanner/tag.readonly', 'socialplanner/tag.write', 'socialplanner/filters.readonly', 'socialplanner/medias.readonly', 'socialplanner/medias.write', 'socialplanner/watermarks.readonly', 'socialplanner/watermarks.write', 'socialplanner/metatag.readonly', 'socialplanner/facebook.readonly', 'socialplanner/linkedin.readonly', 'socialplanner/twitter.readonly', 'socialplanner/notification.readonly', 'socialplanner/notification.write', 'socialplanner/snapshot.readonly', 'socialplanner/snapshot.write', 'marketing/affiliate.write', 'blogs.write', 'membership.write', 'communities.write', 'gokollab.write', 'certificates.write', 'certificates.readonly', 'adPublishing.write', 'adPublishing.readonly', 'prospecting.write', 'prospecting.readonly', 'prospecting/reports.readonly', 'private-integration-account.readonly', 'private-integration-account.write', 'private-integration-company.readonly', 'private-integration-company.write', 'native-integrations.readonly', 'native-integrations.write', 'wordpress.write', 'wordpress.read', 'custom-menu-link.write', 'qrcodes.write', 'users/team-management.write', 'users/team-management.readonly', 'loginas.write', 'users-sso-login-management.write', 'users-sso-login-management.readonly', 'sso-config.write', 'snapshots/api.readonly', 'snapshots/api.create', 'snapshots/api.edit', 'snapshots/api.push', 'snapshots/api.refresh', 'snapshots/api.share', 'snapshots/api.delete', 'internaltools.account-transfer.write', 'internaltools.account-transfer.readonly', 'affiliateportal.write', 'affiliateportal.readonly', 'companies.write', 'internaltools.billing.write', 'internaltools.billing.readonly', 'internaltools.billing-common.readonly', 'internaltools.billing-common.write', 'voice-ai-agents.write', 'voice-ai-agents.readonly', 'voice-ai-common.readonly', 'voice-ai-common.write', 'voice-ai-agent-goals.readonly', 'voice-ai-agent-goals.write', 'voice-ai-dashboard.readonly', 'agency/launchpad.write', 'agency/launchpad.readonly', 'launchpad/account.write', 'launchpad/account.readonly', 'text-ai-agents.write', 'text-ai-agent-goals.readonly', 'text-ai-agent-goals.write', 'text-ai-agent-training.write', 'text-ai-agents-dashboard.readonly', 'accounts.create', 'accounts.delete', 'accounts.export.list', 'accounts.features-limits.manage', 'accounts.pause-resume', 'accounts.agency-accounts.manage', 'accounts.billing.manage', 'accounts.details.manage', 'audit-logs.readonly', 'audit-logs.export'
LC Phone Inbound Phone Numbers
Platform language preference for the user Posibles valores: 'en\_US', 'es', 'fr\_CA', 'fr\_FR', 'nl', 'de', 'pt\_PT', 'pt\_BR', 'it', 'sv', 'da', 'fi', 'no'
```json theme={null}
{
"id": "0IHuJvc2ofPAAA8GzTRi",
"name": "John Deo",
"firstName": "John",
"lastName": "Deo",
"email": "john@deo.com",
"phone": "+1 808-868-8888",
"extension": "",
"permissions": {
"campaignsEnabled": true,
"campaignsReadOnly": false,
"contactsEnabled": true,
"workflowsEnabled": true,
"workflowsReadOnly": true,
"triggersEnabled": true,
"funnelsEnabled": true,
"websitesEnabled": false,
"opportunitiesEnabled": true,
"dashboardStatsEnabled": true,
"bulkRequestsEnabled": true,
"appointmentsEnabled": true,
"reviewsEnabled": true,
"onlineListingsEnabled": true,
"phoneCallEnabled": true,
"conversationsEnabled": true,
"assignedDataOnly": false,
"adwordsReportingEnabled": false,
"membershipEnabled": false,
"facebookAdsReportingEnabled": false,
"attributionsReportingEnabled": false,
"settingsEnabled": true,
"tagsEnabled": true,
"leadValueEnabled": true,
"marketingEnabled": true,
"agentReportingEnabled": true,
"botService": false,
"socialPlanner": true,
"bloggingEnabled": true,
"invoiceEnabled": true,
// truncado: 23 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/users/YOUR_userId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"firstName": "John",
"lastName": "Deo",
"email": "john@deo.com",
"password": "*******",
"phone": "+18832327657",
"type": "account",
"role": "admin",
"companyId": "UAXssdawIWAWD",
"locationIds": [
"C2QujeCh8ZnC7al2InWR"
],
"permissions": {
"campaignsEnabled": true,
"campaignsReadOnly": false,
"contactsEnabled": true,
"workflowsEnabled": true,
"workflowsReadOnly": true,
"triggersEnabled": true,
"funnelsEnabled": true,
"websitesEnabled": false,
"opportunitiesEnabled": true,
"dashboardStatsEnabled": true,
"bulkRequestsEnabled": true,
"appointmentsEnabled": true,
"reviewsEnabled": true,
"onlineListingsEnabled": true,
"phoneCallEnabled": true,
"conversationsEnabled": true,
"assignedDataOnly": false,
"adwordsReportingEnabled": false,
"membershipEnabled": false,
"facebookAdsReportingEnabled": false,
"attributionsReportingEnabled": false,
"settingsEnabled": true,
"tagsEnabled": true,
"leadValueEnabled": true,
"marketingEnabled": true,
"agentReportingEnabled": true,
"botService": false,
"socialPlanner": true,
"bloggingEnabled": true,
"invoiceEnabled": true,
"affiliateManagerEnabled": true,
"contentAiEnabled": true,
"refundsEnabled": true,
"recordPaymentEnabled": true,
"cancelSubscriptionEnabled": true,
"paymentsEnabled": true,
"communitiesEnabled": true,
"exportPaymentsEnabled": true
},
"scopes": [
"contacts.write",
"campaigns.readonly"
],
"scopesAssignedToOnly": [
"contacts.write",
"campaigns.readonly"
],
"profilePhoto": "https://img.png",
"twilioPhone": {
"C2QujeCh8ZnC7al2InWR": "+18832327657",
"M2QrtfVt8ZnC7cv2InDL": "+18832327657"
},
"platformLanguage": "en_US"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/users/YOUR_userId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"firstName": "John", "lastName": "Deo", "email": "john@deo.com", "password": "*******", "phone": "+18832327657", "type": "account", "role": "admin", "companyId": "UAXssdawIWAWD", "locationIds": ["C2QujeCh8ZnC7al2InWR"], "permissions": {"campaignsEnabled": true, "campaignsReadOnly": false, "contactsEnabled": true, "workflowsEnabled": true, "workflowsReadOnly": true, "triggersEnabled": true, "funnelsEnabled": true, "websitesEnabled": false, "opportunitiesEnabled": true, "dashboardStatsEnabled": true, "bulkRequestsEnabled": true, "appointmentsEnabled": true, "reviewsEnabled": true, "onlineListingsEnabled": true, "phoneCallEnabled": true, "conversationsEnabled": true, "assignedDataOnly": false, "adwordsReportingEnabled": false, "membershipEnabled": false, "facebookAdsReportingEnabled": false, "attributionsReportingEnabled": false, "settingsEnabled": true, "tagsEnabled": true, "leadValueEnabled": true, "marketingEnabled": true, "agentReportingEnabled": true, "botService": false, "socialPlanner": true, "bloggingEnabled": true, "invoiceEnabled": true, "affiliateManagerEnabled": true, "contentAiEnabled": true, "refundsEnabled": true, "recordPaymentEnabled": true, "cancelSubscriptionEnabled": true, "paymentsEnabled": true, "communitiesEnabled": true, "exportPaymentsEnabled": true}, "scopes": ["contacts.write", "campaigns.readonly"], "scopesAssignedToOnly": ["contacts.write", "campaigns.readonly"], "profilePhoto": "https://img.png", "twilioPhone": {"C2QujeCh8ZnC7al2InWR": "+18832327657", "M2QrtfVt8ZnC7cv2InDL": "+18832327657"}, "platformLanguage": "en_US"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/users/YOUR_userId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"firstName": "John", "lastName": "Deo", "email": "john@deo.com", "password": "*******", "phone": "+18832327657", "type": "account", "role": "admin", "companyId": "UAXssdawIWAWD", "locationIds": ["C2QujeCh8ZnC7al2InWR"], "permissions": {"campaignsEnabled": true, "campaignsReadOnly": false, "contactsEnabled": true, "workflowsEnabled": true, "workflowsReadOnly": true, "triggersEnabled": true, "funnelsEnabled": true, "websitesEnabled": false, "opportunitiesEnabled": true, "dashboardStatsEnabled": true, "bulkRequestsEnabled": true, "appointmentsEnabled": true, "reviewsEnabled": true, "onlineListingsEnabled": true, "phoneCallEnabled": true, "conversationsEnabled": true, "assignedDataOnly": false, "adwordsReportingEnabled": false, "membershipEnabled": false, "facebookAdsReportingEnabled": false, "attributionsReportingEnabled": false, "settingsEnabled": true, "tagsEnabled": true, "leadValueEnabled": true, "marketingEnabled": true, "agentReportingEnabled": true, "botService": false, "socialPlanner": true, "bloggingEnabled": true, "invoiceEnabled": true, "affiliateManagerEnabled": true, "contentAiEnabled": true, "refundsEnabled": true, "recordPaymentEnabled": true, "cancelSubscriptionEnabled": true, "paymentsEnabled": true, "communitiesEnabled": true, "exportPaymentsEnabled": true}, "scopes": ["contacts.write", "campaigns.readonly"], "scopesAssignedToOnly": ["contacts.write", "campaigns.readonly"], "profilePhoto": "https://img.png", "twilioPhone": {"C2QujeCh8ZnC7al2InWR": "+18832327657", "M2QrtfVt8ZnC7cv2InDL": "+18832327657"}, "platformLanguage": "en_US"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'firstName': 'John', 'lastName': 'Deo', 'email': 'john@deo.com', 'password': '*******', 'phone': '+18832327657', 'type': 'account', 'role': 'admin', 'companyId': 'UAXssdawIWAWD', 'locationIds': ['C2QujeCh8ZnC7al2InWR'], 'permissions': {'campaignsEnabled': true, 'campaignsReadOnly': false, 'contactsEnabled': true, 'workflowsEnabled': true, 'workflowsReadOnly': true, 'triggersEnabled': true, 'funnelsEnabled': true, 'websitesEnabled': false, 'opportunitiesEnabled': true, 'dashboardStatsEnabled': true, 'bulkRequestsEnabled': true, 'appointmentsEnabled': true, 'reviewsEnabled': true, 'onlineListingsEnabled': true, 'phoneCallEnabled': true, 'conversationsEnabled': true, 'assignedDataOnly': false, 'adwordsReportingEnabled': false, 'membershipEnabled': false, 'facebookAdsReportingEnabled': false, 'attributionsReportingEnabled': false, 'settingsEnabled': true, 'tagsEnabled': true, 'leadValueEnabled': true, 'marketingEnabled': true, 'agentReportingEnabled': true, 'botService': false, 'socialPlanner': true, 'bloggingEnabled': true, 'invoiceEnabled': true, 'affiliateManagerEnabled': true, 'contentAiEnabled': true, 'refundsEnabled': true, 'recordPaymentEnabled': true, 'cancelSubscriptionEnabled': true, 'paymentsEnabled': true, 'communitiesEnabled': true, 'exportPaymentsEnabled': true}, 'scopes': ['contacts.write', 'campaigns.readonly'], 'scopesAssignedToOnly': ['contacts.write', 'campaigns.readonly'], 'profilePhoto': 'https://img.png', 'twilioPhone': {'C2QujeCh8ZnC7al2InWR': '+18832327657', 'M2QrtfVt8ZnC7cv2InDL': '+18832327657'}, 'platformLanguage': 'en_US'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Agent Action
Source: https://developers.leadwaycrm.com/api-reference/voice-ai/voice-ai-create-action
Create a new action for a voice AI agent. Actions define specific behaviors and capabilities for the agent during calls.
Create a new action for a voice AI agent. Actions define specific behaviors and capabilities for the agent during calls.
```http theme={null}
POST https://services.leadconnectorhq.com/voice-ai/actions
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Agent ID to attach the action to
Account ID
Type of action Posibles valores: 'CALL\_TRANSFER', 'DATA\_EXTRACTION', 'IN\_CALL\_DATA\_EXTRACTION', 'WORKFLOW\_TRIGGER', 'SMS', 'APPOINTMENT\_BOOKING', 'CUSTOM\_ACTION', 'KNOWLEDGE\_BASE'
Human-readable name for this action
Action parameters - structure varies by actionType
## Respuestas
Unique identifier for the created action
Type of action Posibles valores: 'CALL\_TRANSFER', 'DATA\_EXTRACTION', 'IN\_CALL\_DATA\_EXTRACTION', 'WORKFLOW\_TRIGGER', 'SMS', 'APPOINTMENT\_BOOKING', 'CUSTOM\_ACTION', 'KNOWLEDGE\_BASE'
Human-readable name for this action
Action parameters - structure varies by actionType
```json theme={null}
{
"id": "507f1f77bcf86cd799439011",
"actionType": "CALL_TRANSFER",
"name": "Transfer to Manager"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/voice-ai/actions' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"agentId": "507f1f77bcf86cd799439011",
"locationId": "507f1f77bcf86cd799439012",
"actionType": "CALL_TRANSFER",
"name": "Transfer to Manager"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/voice-ai/actions', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"agentId": "507f1f77bcf86cd799439011", "locationId": "507f1f77bcf86cd799439012", "actionType": "CALL_TRANSFER", "name": "Transfer to Manager"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/voice-ai/actions',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"agentId": "507f1f77bcf86cd799439011", "locationId": "507f1f77bcf86cd799439012", "actionType": "CALL_TRANSFER", "name": "Transfer to Manager"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'agentId': '507f1f77bcf86cd799439011', 'locationId': '507f1f77bcf86cd799439012', 'actionType': 'CALL_TRANSFER', 'name': 'Transfer to Manager'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Create Agent
Source: https://developers.leadwaycrm.com/api-reference/voice-ai/voice-ai-create-agent
Create a new voice AI agent configuration and settings
Create a new voice AI agent configuration and settings
```http theme={null}
POST https://services.leadconnectorhq.com/voice-ai/agents
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Body
Unique identifier for the account where this agent will operate
Display name for the voice AI agent, between 1-40 characters. Default: "My Agent \{random 3 digit number}"
Name of the business this agent represents. Default: Uses account name
Initial greeting spoken when the agent answers calls. Default: Auto generated
Custom instructions defining the agent's behavior and personality. Default: Basic prompt generated automatically
Identifier for the speech synthesis voice from available voice options. Default: Auto generated
Language code for the agent's speech and understanding. Default: "en-US" Posibles valores: 'en-US', 'pt-BR', 'es', 'fr', 'de', 'it', 'nl-NL', 'multi'
Tolerance level for caller response delays. Default: "high" Posibles valores: 'low', 'medium', 'high'
Maximum call duration in seconds, between 180-900 (3-15 minutes). Default: 300 seconds (5 minutes)
Enables automatic reminders when callers are silent. Default: true
Seconds to wait before sending idle reminders, between 1-20. Default: 8 seconds
Phone number for receiving inbound calls to this agent. Default: null
Identifier for the number pool managing phone number allocation. Default: null
Array of workflow IDs to trigger automatically when calls end. Default: \[]
Configuration for post-call email notifications to various recipients. Default: \[]
Time intervals defining when the agent accepts calls, organized by day of week. Default: \[] (available 24/7)
Day of the week for this working hours configuration (Monday=1 to Sunday=7) Posibles valores: 1, 2, 3, 4, 5, 6, 7
Array of time intervals when the agent is available on this day
Starting hour of the working interval in 24-hour format (0-23)
Ending hour of the working interval in 24-hour format (0-23)
Starting minute of the working interval (0-59)
Ending minute of the working interval (0-59)
IANA timezone identifier affecting working hours and scheduling. Default: Account timezone
Prevents this agent from being used as a fallback option. Default: false (Available as backup agent)
Language translation settings including enablement flag and target language code. Rules: (1) translation.enabled can only be true if the agent's language is not en-US; (2) when enabled, translation.language must be either the agent's language or en-US; (3) when enabled, translation.language is required.
## Respuestas
Unique identifier for the created agent
Unique identifier for the account where this agent operates
Display name of the voice AI agent
Name of the business this agent represents
Greeting message spoken when the agent answers calls
Custom instructions defining the agent's behavior
Identifier for the speech synthesis voice being used
Language code for the agent's speech and understanding
Current tolerance level for caller response delays
Maximum call duration in seconds, between 180-900
Indicates whether automatic idle reminders are enabled
Seconds to wait before sending idle reminders, between 1-20
Phone number for receiving inbound calls
Identifier for the number pool managing this agent's phone allocation
Array of workflow IDs triggered automatically when calls end
Current post-call notification settings including recipient configuration
Time intervals when the agent accepts calls, organized by day of week
Day of the week for this working hours configuration (Monday=1 to Sunday=7) Posibles valores: 1, 2, 3, 4, 5, 6, 7
Array of time intervals when the agent is available on this day
Starting hour of the working interval in 24-hour format (0-23)
Ending hour of the working interval in 24-hour format (0-23)
Starting minute of the working interval (0-59)
Ending minute of the working interval (0-59)
IANA timezone identifier for working hours and scheduling
Indicates whether this agent is excluded from backup scenarios
Current language translation settings including enablement status and target language
```json theme={null}
{
"id": "507f1f77bcf86cd799439011",
"locationId": "LOC123456789ABCDEF",
"agentName": "Customer Support Agent",
"businessName": "Acme Corporation",
"welcomeMessage": "Hello! Thank you for calling. How can I assist you today?",
"agentPrompt": "You are a helpful customer service representative.",
"voiceId": "507f1f77bcf86cd799439011",
"language": "en-US",
"patienceLevel": "medium",
"maxCallDuration": 600,
"sendUserIdleReminders": true,
"reminderAfterIdleTimeSeconds": 5,
"inboundNumber": "+1234567890",
"numberPoolId": "pool_507f1f77bcf86cd799439011",
"callEndWorkflowIds": [],
"agentWorkingHours": [],
"timezone": "America/New_York",
"isAgentAsBackupDisabled": false
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X POST 'https://services.leadconnectorhq.com/voice-ai/agents' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "LOC123456789ABCDEF",
"agentName": "Customer Support Agent",
"businessName": "Acme Corporation",
"welcomeMessage": "Hello! Thank you for calling Acme Corporation. How can I assist you today?",
"agentPrompt": "You are a helpful customer service representative. Always be polite and professional.",
"voiceId": "507f1f77bcf86cd799439011",
"language": "en-US",
"patienceLevel": "low",
"maxCallDuration": 600,
"sendUserIdleReminders": true,
"reminderAfterIdleTimeSeconds": 5,
"inboundNumber": "+1234567890",
"numberPoolId": "pool_507f1f77bcf86cd799439011",
"callEndWorkflowIds": [
"wf_507f1f77bcf86cd799439011",
"wf_507f1f77bcf86cd799439012"
],
"agentWorkingHours": [
{
"dayOfTheWeek": 1,
"intervals": [
{
"startHour": 9,
"startMinute": 0,
"endHour": 17,
"endMinute": 30
}
]
}
],
"timezone": "America/New_York",
"isAgentAsBackupDisabled": false
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/voice-ai/agents', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "LOC123456789ABCDEF", "agentName": "Customer Support Agent", "businessName": "Acme Corporation", "welcomeMessage": "Hello! Thank you for calling Acme Corporation. How can I assist you today?", "agentPrompt": "You are a helpful customer service representative. Always be polite and professional.", "voiceId": "507f1f77bcf86cd799439011", "language": "en-US", "patienceLevel": "low", "maxCallDuration": 600, "sendUserIdleReminders": true, "reminderAfterIdleTimeSeconds": 5, "inboundNumber": "+1234567890", "numberPoolId": "pool_507f1f77bcf86cd799439011", "callEndWorkflowIds": ["wf_507f1f77bcf86cd799439011", "wf_507f1f77bcf86cd799439012"], "agentWorkingHours": [{"dayOfTheWeek": 1, "intervals": [{"startHour": 9, "startMinute": 0, "endHour": 17, "endMinute": 30}]}], "timezone": "America/New_York", "isAgentAsBackupDisabled": false}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/voice-ai/agents',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "LOC123456789ABCDEF", "agentName": "Customer Support Agent", "businessName": "Acme Corporation", "welcomeMessage": "Hello! Thank you for calling Acme Corporation. How can I assist you today?", "agentPrompt": "You are a helpful customer service representative. Always be polite and professional.", "voiceId": "507f1f77bcf86cd799439011", "language": "en-US", "patienceLevel": "low", "maxCallDuration": 600, "sendUserIdleReminders": true, "reminderAfterIdleTimeSeconds": 5, "inboundNumber": "+1234567890", "numberPoolId": "pool_507f1f77bcf86cd799439011", "callEndWorkflowIds": ["wf_507f1f77bcf86cd799439011", "wf_507f1f77bcf86cd799439012"], "agentWorkingHours": [{"dayOfTheWeek": 1, "intervals": [{"startHour": 9, "startMinute": 0, "endHour": 17, "endMinute": 30}]}], "timezone": "America/New_York", "isAgentAsBackupDisabled": false},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'LOC123456789ABCDEF', 'agentName': 'Customer Support Agent', 'businessName': 'Acme Corporation', 'welcomeMessage': 'Hello! Thank you for calling Acme Corporation. How can I assist you today?', 'agentPrompt': 'You are a helpful customer service representative. Always be polite and professional.', 'voiceId': '507f1f77bcf86cd799439011', 'language': 'en-US', 'patienceLevel': 'low', 'maxCallDuration': 600, 'sendUserIdleReminders': true, 'reminderAfterIdleTimeSeconds': 5, 'inboundNumber': '+1234567890', 'numberPoolId': 'pool_507f1f77bcf86cd799439011', 'callEndWorkflowIds': ['wf_507f1f77bcf86cd799439011', 'wf_507f1f77bcf86cd799439012'], 'agentWorkingHours': [{'dayOfTheWeek': 1, 'intervals': [{'startHour': 9, 'startMinute': 0, 'endHour': 17, 'endMinute': 30}]}], 'timezone': 'America/New_York', 'isAgentAsBackupDisabled': false}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Agent Action
Source: https://developers.leadwaycrm.com/api-reference/voice-ai/voice-ai-delete-action
Delete an existing action from a voice AI agent. This permanently removes the action and its configuration.
Delete an existing action from a voice AI agent. This permanently removes the action and its configuration.
```http theme={null}
DELETE https://services.leadconnectorhq.com/voice-ai/actions/{actionId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Unique identifier for the action
## Query parameters
Account ID
Agent ID the action is attached to
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/voice-ai/actions/YOUR_actionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/voice-ai/actions/YOUR_actionId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/voice-ai/actions/YOUR_actionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Delete Agent
Source: https://developers.leadwaycrm.com/api-reference/voice-ai/voice-ai-delete-agent
Delete a voice AI agent and all its configurations
Delete a voice AI agent and all its configurations
```http theme={null}
DELETE https://services.leadconnectorhq.com/voice-ai/agents/{agentId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Unique agent identifier
## Query parameters
Account ID
## Respuestas
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X DELETE 'https://services.leadconnectorhq.com/voice-ai/agents/YOUR_agentId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/voice-ai/agents/YOUR_agentId', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'DELETE',
'https://services.leadconnectorhq.com/voice-ai/agents/YOUR_agentId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Agent Action
Source: https://developers.leadwaycrm.com/api-reference/voice-ai/voice-ai-get-action
Retrieve details of a specific action by its ID. Returns the action configuration including actionParameters.
Retrieve details of a specific action by its ID. Returns the action configuration including actionParameters.
```http theme={null}
GET https://services.leadconnectorhq.com/voice-ai/actions/{actionId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Unique identifier for the action
## Query parameters
Account ID
## Respuestas
Unique identifier for the action
Type of action Posibles valores: 'CALL\_TRANSFER', 'DATA\_EXTRACTION', 'IN\_CALL\_DATA\_EXTRACTION', 'WORKFLOW\_TRIGGER', 'SMS', 'APPOINTMENT\_BOOKING', 'CUSTOM\_ACTION', 'KNOWLEDGE\_BASE'
Human-readable name for this action
Action parameters - structure varies by actionType
```json theme={null}
{
"id": "507f1f77bcf86cd799439011",
"actionType": "CALL_TRANSFER",
"name": "Transfer to Manager"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/voice-ai/actions/YOUR_actionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/voice-ai/actions/YOUR_actionId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/voice-ai/actions/YOUR_actionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Agent
Source: https://developers.leadwaycrm.com/api-reference/voice-ai/voice-ai-get-agent
Retrieve detailed configuration and settings for a specific voice AI agent
Retrieve detailed configuration and settings for a specific voice AI agent
```http theme={null}
GET https://services.leadconnectorhq.com/voice-ai/agents/{agentId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Unique agent identifier
## Query parameters
Account ID
## Respuestas
Unique identifier for the created agent
Unique identifier for the account where this agent operates
Display name of the voice AI agent
Name of the business this agent represents
Greeting message spoken when the agent answers calls
Custom instructions defining the agent's behavior
Identifier for the speech synthesis voice being used
Language code for the agent's speech and understanding
Current tolerance level for caller response delays
Maximum call duration in seconds, between 180-900
Indicates whether automatic idle reminders are enabled
Seconds to wait before sending idle reminders, between 1-20
Phone number for receiving inbound calls
Identifier for the number pool managing this agent's phone allocation
Array of workflow IDs triggered automatically when calls end
Current post-call notification settings including recipient configuration
Time intervals when the agent accepts calls, organized by day of week
Day of the week for this working hours configuration (Monday=1 to Sunday=7) Posibles valores: 1, 2, 3, 4, 5, 6, 7
Array of time intervals when the agent is available on this day
Starting hour of the working interval in 24-hour format (0-23)
Ending hour of the working interval in 24-hour format (0-23)
Starting minute of the working interval (0-59)
Ending minute of the working interval (0-59)
IANA timezone identifier for working hours and scheduling
Indicates whether this agent is excluded from backup scenarios
Current language translation settings including enablement status and target language
Raw actions configured for this agent with complete actionParameters structure
Unique identifier for this action
Type of action Posibles valores: 'CALL\_TRANSFER', 'DATA\_EXTRACTION', 'IN\_CALL\_DATA\_EXTRACTION', 'WORKFLOW\_TRIGGER', 'SMS', 'APPOINTMENT\_BOOKING', 'CUSTOM\_ACTION', 'KNOWLEDGE\_BASE'
Human-readable name for this action
Action parameters - structure varies by actionType
```json theme={null}
{
"id": "507f1f77bcf86cd799439011",
"locationId": "LOC123456789ABCDEF",
"agentName": "Customer Support Agent",
"businessName": "Acme Corporation",
"welcomeMessage": "Hello! Thank you for calling. How can I assist you today?",
"agentPrompt": "You are a helpful customer service representative.",
"voiceId": "507f1f77bcf86cd799439011",
"language": "en-US",
"patienceLevel": "medium",
"maxCallDuration": 600,
"sendUserIdleReminders": true,
"reminderAfterIdleTimeSeconds": 5,
"inboundNumber": "+1234567890",
"numberPoolId": "pool_507f1f77bcf86cd799439011",
"callEndWorkflowIds": [],
"agentWorkingHours": [],
"timezone": "America/New_York",
"isAgentAsBackupDisabled": false,
"actions": [
{
"_id": "507f1f77bcf86cd799439011",
"actionType": "CALL_TRANSFER",
"name": "Transfer to Manager",
"actionParameters": {
"triggerPrompt": "When caller asks for manager",
"triggerMessage": "Let me transfer you",
"transferToType": "number",
"transferToValue": "+1234567890"
}
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/voice-ai/agents/YOUR_agentId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/voice-ai/agents/YOUR_agentId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/voice-ai/agents/YOUR_agentId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Agents
Source: https://developers.leadwaycrm.com/api-reference/voice-ai/voice-ai-get-agents
Retrieve a paginated list of agents for given account.
Retrieve a paginated list of agents for given account.
```http theme={null}
GET https://services.leadconnectorhq.com/voice-ai/agents
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Page number starting from 1
Number of items per page
Account ID
Query
## Respuestas
Total number of items
Page number starting from 1
Number of items per page
Unique identifier for the created agent
Unique identifier for the account where this agent operates
Display name of the voice AI agent
Name of the business this agent represents
Greeting message spoken when the agent answers calls
Custom instructions defining the agent's behavior
Identifier for the speech synthesis voice being used
Language code for the agent's speech and understanding
Current tolerance level for caller response delays
Maximum call duration in seconds, between 180-900
Indicates whether automatic idle reminders are enabled
Seconds to wait before sending idle reminders, between 1-20
Phone number for receiving inbound calls
Identifier for the number pool managing this agent's phone allocation
Array of workflow IDs triggered automatically when calls end
Current post-call notification settings including recipient configuration
Time intervals when the agent accepts calls, organized by day of week
Day of the week for this working hours configuration (Monday=1 to Sunday=7) Posibles valores: 1, 2, 3, 4, 5, 6, 7
Array of time intervals when the agent is available on this day
Starting hour of the working interval in 24-hour format (0-23)
Ending hour of the working interval in 24-hour format (0-23)
Starting minute of the working interval (0-59)
Ending minute of the working interval (0-59)
IANA timezone identifier for working hours and scheduling
Indicates whether this agent is excluded from backup scenarios
Current language translation settings including enablement status and target language
Raw actions configured for this agent with complete actionParameters structure
Unique identifier for this action
Type of action Posibles valores: 'CALL\_TRANSFER', 'DATA\_EXTRACTION', 'IN\_CALL\_DATA\_EXTRACTION', 'WORKFLOW\_TRIGGER', 'SMS', 'APPOINTMENT\_BOOKING', 'CUSTOM\_ACTION', 'KNOWLEDGE\_BASE'
Human-readable name for this action
Action parameters - structure varies by actionType
```json theme={null}
{
"total": 150,
"page": 2,
"pageSize": 10,
"agents": [
{
"id": "507f1f77bcf86cd799439011",
"locationId": "LOC123456789ABCDEF",
"agentName": "Customer Support Agent",
"businessName": "Acme Corporation",
"welcomeMessage": "Hello! Thank you for calling. How can I assist you today?",
"agentPrompt": "You are a helpful customer service representative.",
"voiceId": "507f1f77bcf86cd799439011",
"language": "en-US",
"patienceLevel": "medium",
"maxCallDuration": 600,
"sendUserIdleReminders": true,
"reminderAfterIdleTimeSeconds": 5,
"inboundNumber": "+1234567890",
"numberPoolId": "pool_507f1f77bcf86cd799439011",
"callEndWorkflowIds": [],
"agentWorkingHours": [],
"timezone": "America/New_York",
"isAgentAsBackupDisabled": false,
"actions": [
{
"_id": "507f1f77bcf86cd799439011",
"actionType": "CALL_TRANSFER",
"name": "Transfer to Manager",
"actionParameters": {
"triggerPrompt": "When caller asks for manager",
"triggerMessage": "Let me transfer you",
"transferToType": "number",
"transferToValue": "+1234567890"
}
}
]
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/voice-ai/agents' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/voice-ai/agents', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/voice-ai/agents',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# List Call Logs
Source: https://developers.leadwaycrm.com/api-reference/voice-ai/voice-ai-get-call-logs
Returns call logs for Voice AI agents scoped to a account. Supports filtering by agent, contact, call type, action types, and date range (interpreted in the provided IANA timezone). Also supports sort
Returns call logs for Voice AI agents scoped to a account. Supports filtering by agent, contact, call type, action types, and date range (interpreted in the provided IANA timezone). Also supports sorting and 1-based pagination.
```http theme={null}
GET https://services.leadconnectorhq.com/voice-ai/dashboard/call-logs
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
Account identifier. Filters results to this account.
Agent identifier. When provided, returns logs for this agent only.
Contact IDs (comma-separated) to filter by.
Call type filter.
Start date filter (Unix timestamp). Must be less than endDate. Both startDate and endDate must be provided together.
End date filter (Unix timestamp). Must be greater than startDate. Both startDate and endDate must be provided together.
Action type filter for call logs (comma-separated ACTION\_TYPE values)
Field to sort by. Defaults to newest if omitted.
Sort direction. Applies only when sortBy is provided.
Page number (1-based).
Page size (max 50).
## Respuestas
Total number of items
Page number starting from 1
Number of items per page
Array of call logs
Unique identifier for the call
Associated contact ID
Agent ID associated with the call
Whether the agent is deleted
Caller phone number
Timestamp when the call was created
Call duration in seconds
Whether this call was a trial call
Actions performed during the call. Note: The APPOINTMENT\_BOOKING action will only be visible in executedCallActions from Sep 9th 2025.
Action ID reference
Action type Posibles valores: 'CALL\_TRANSFER', 'DATA\_EXTRACTION', 'IN\_CALL\_DATA\_EXTRACTION', 'WORKFLOW\_TRIGGER', 'SMS', 'APPOINTMENT\_BOOKING', 'CUSTOM\_ACTION', 'KNOWLEDGE\_BASE'
Action name
Action parameters - structure varies by actionType
When the action was executed
When the trigger was received
Call summary
Call transcript
Transcript translation details
Dynamic data extracted from the call based on agent configuration
Message identifier associated with the call
```json theme={null}
{
"total": 150,
"page": 2,
"pageSize": 10,
"callLogs": [
{
"id": "507f1f77bcf86cd799439011",
"contactId": "507f1f77bcf86cd799439012",
"agentId": "507f1f77bcf86cd799439013",
"isAgentDeleted": false,
"fromNumber": "+1234567890",
"createdAt": "2024-01-15T10:30:00.000Z",
"duration": 180,
"trialCall": false,
"executedCallActions": [
{
"actionId": "507f1f77bcf86cd799439015",
"actionType": "CALL_TRANSFER",
"actionName": "Transfer to Manager",
"actionParameters": {
"transferToType": "number",
"transferToValue": "+12345678901",
"triggerMessage": "Let me transfer you to a manager right away",
"hearWhisperMessage": true
},
"executedAt": "2024-01-15T10:32:00.000Z",
"triggerReceivedAt": "2024-01-15T10:31:45.000Z"
},
{
"actionId": "507f1f77bcf86cd799439016",
"actionType": "SMS",
"actionName": "Send Confirmation SMS",
"actionParameters": {
"triggerPrompt": "When caller asks for booking confirmation",
"triggerMessage": "I'll send you a confirmation text",
"messageBody": "Your appointment is confirmed for tomorrow at 2 PM"
},
"executedAt": "2024-01-15T10:33:30.000Z",
"triggerReceivedAt": "2024-01-15T10:33:15.000Z"
// truncado: 131 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/voice-ai/dashboard/call-logs' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/voice-ai/dashboard/call-logs', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/voice-ai/dashboard/call-logs',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Call Log
Source: https://developers.leadwaycrm.com/api-reference/voice-ai/voice-ai-getcalllog
Returns a call log by callId.
Returns a call log by callId.
```http theme={null}
GET https://services.leadconnectorhq.com/voice-ai/dashboard/call-logs/{callId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Call ID
## Query parameters
Account ID
## Respuestas
Unique identifier for the call
Associated contact ID
Agent ID associated with the call
Whether the agent is deleted
Caller phone number
Timestamp when the call was created
Call duration in seconds
Whether this call was a trial call
Actions performed during the call. Note: The APPOINTMENT\_BOOKING action will only be visible in executedCallActions from Sep 9th 2025.
Action ID reference
Action type Posibles valores: 'CALL\_TRANSFER', 'DATA\_EXTRACTION', 'IN\_CALL\_DATA\_EXTRACTION', 'WORKFLOW\_TRIGGER', 'SMS', 'APPOINTMENT\_BOOKING', 'CUSTOM\_ACTION', 'KNOWLEDGE\_BASE'
Action name
Action parameters - structure varies by actionType
When the action was executed
When the trigger was received
Call summary
Call transcript
Transcript translation details
Dynamic data extracted from the call based on agent configuration
Message identifier associated with the call
```json theme={null}
{
"id": "507f1f77bcf86cd799439011",
"contactId": "507f1f77bcf86cd799439012",
"agentId": "507f1f77bcf86cd799439013",
"isAgentDeleted": false,
"fromNumber": "+1234567890",
"createdAt": "2024-01-15T10:30:00.000Z",
"duration": 180,
"trialCall": false,
"executedCallActions": [
{
"actionId": "507f1f77bcf86cd799439015",
"actionType": "CALL_TRANSFER",
"actionName": "Transfer to Manager",
"actionParameters": {
"transferToType": "number",
"transferToValue": "+12345678901",
"triggerMessage": "Let me transfer you to a manager right away",
"hearWhisperMessage": true
},
"executedAt": "2024-01-15T10:32:00.000Z",
"triggerReceivedAt": "2024-01-15T10:31:45.000Z"
},
{
"actionId": "507f1f77bcf86cd799439016",
"actionType": "SMS",
"actionName": "Send Confirmation SMS",
"actionParameters": {
"triggerPrompt": "When caller asks for booking confirmation",
"triggerMessage": "I'll send you a confirmation text",
"messageBody": "Your appointment is confirmed for tomorrow at 2 PM"
},
"executedAt": "2024-01-15T10:33:30.000Z",
"triggerReceivedAt": "2024-01-15T10:33:15.000Z"
},
{
"actionId": "507f1f77bcf86cd799439017",
"actionType": "DATA_EXTRACTION",
"actionName": "Extract Phone Number",
// truncado: 124 lineas mas
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/voice-ai/dashboard/call-logs/YOUR_callId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/voice-ai/dashboard/call-logs/YOUR_callId', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/voice-ai/dashboard/call-logs/YOUR_callId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Patch Agent
Source: https://developers.leadwaycrm.com/api-reference/voice-ai/voice-ai-patch-agent
Partially update an existing voice AI agent
Partially update an existing voice AI agent
```http theme={null}
PATCH https://services.leadconnectorhq.com/voice-ai/agents/{agentId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Unique agent identifier
## Query parameters
Account ID
## Body
Display name for the voice AI agent, between 1-40 characters. Default: "My Agent \{random 3 digit number}"
Name of the business this agent represents. Default: Uses account name
Initial greeting spoken when the agent answers calls. Default: Auto generated
Custom instructions defining the agent's behavior and personality. Default: Basic prompt generated automatically
Identifier for the speech synthesis voice from available voice options. Default: Auto generated
Language code for the agent's speech and understanding. Default: "en-US" Posibles valores: 'en-US', 'pt-BR', 'es', 'fr', 'de', 'it', 'nl-NL', 'multi'
Tolerance level for caller response delays. Default: "high" Posibles valores: 'low', 'medium', 'high'
Maximum call duration in seconds, between 180-900 (3-15 minutes). Default: 300 seconds (5 minutes)
Enables automatic reminders when callers are silent. Default: true
Seconds to wait before sending idle reminders, between 1-20. Default: 8 seconds
Phone number for receiving inbound calls to this agent. Default: null
Identifier for the number pool managing phone number allocation. Default: null
Array of workflow IDs to trigger automatically when calls end. Default: \[]
Configuration for post-call email notifications to various recipients. Default: \[]
Time intervals defining when the agent accepts calls, organized by day of week. Default: \[] (available 24/7)
Day of the week for this working hours configuration (Monday=1 to Sunday=7) Posibles valores: 1, 2, 3, 4, 5, 6, 7
Array of time intervals when the agent is available on this day
Starting hour of the working interval in 24-hour format (0-23)
Ending hour of the working interval in 24-hour format (0-23)
Starting minute of the working interval (0-59)
Ending minute of the working interval (0-59)
IANA timezone identifier affecting working hours and scheduling. Default: Account timezone
Prevents this agent from being used as a fallback option. Default: false (Available as backup agent)
Language translation settings including enablement flag and target language code. Rules: (1) translation.enabled can only be true if the agent's language is not en-US; (2) when enabled, translation.language must be either the agent's language or en-US; (3) when enabled, translation.language is required.
## Respuestas
Unique identifier for the created agent
Unique identifier for the account where this agent operates
Display name of the voice AI agent
Name of the business this agent represents
Greeting message spoken when the agent answers calls
Custom instructions defining the agent's behavior
Identifier for the speech synthesis voice being used
Language code for the agent's speech and understanding
Current tolerance level for caller response delays
Maximum call duration in seconds, between 180-900
Indicates whether automatic idle reminders are enabled
Seconds to wait before sending idle reminders, between 1-20
Phone number for receiving inbound calls
Identifier for the number pool managing this agent's phone allocation
Array of workflow IDs triggered automatically when calls end
Current post-call notification settings including recipient configuration
Time intervals when the agent accepts calls, organized by day of week
Day of the week for this working hours configuration (Monday=1 to Sunday=7) Posibles valores: 1, 2, 3, 4, 5, 6, 7
Array of time intervals when the agent is available on this day
Starting hour of the working interval in 24-hour format (0-23)
Ending hour of the working interval in 24-hour format (0-23)
Starting minute of the working interval (0-59)
Ending minute of the working interval (0-59)
IANA timezone identifier for working hours and scheduling
Indicates whether this agent is excluded from backup scenarios
Current language translation settings including enablement status and target language
```json theme={null}
{
"id": "507f1f77bcf86cd799439011",
"locationId": "LOC123456789ABCDEF",
"agentName": "Customer Support Agent",
"businessName": "Acme Corporation",
"welcomeMessage": "Hello! Thank you for calling. How can I assist you today?",
"agentPrompt": "You are a helpful customer service representative.",
"voiceId": "507f1f77bcf86cd799439011",
"language": "en-US",
"patienceLevel": "medium",
"maxCallDuration": 600,
"sendUserIdleReminders": true,
"reminderAfterIdleTimeSeconds": 5,
"inboundNumber": "+1234567890",
"numberPoolId": "pool_507f1f77bcf86cd799439011",
"callEndWorkflowIds": [],
"agentWorkingHours": [],
"timezone": "America/New_York",
"isAgentAsBackupDisabled": false
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PATCH 'https://services.leadconnectorhq.com/voice-ai/agents/YOUR_agentId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"agentName": "Customer Support Agent",
"businessName": "Acme Corporation",
"welcomeMessage": "Hello! Thank you for calling Acme Corporation. How can I assist you today?",
"agentPrompt": "You are a helpful customer service representative. Always be polite and professional.",
"voiceId": "507f1f77bcf86cd799439011",
"language": "en-US",
"patienceLevel": "low",
"maxCallDuration": 600,
"sendUserIdleReminders": true,
"reminderAfterIdleTimeSeconds": 5,
"inboundNumber": "+1234567890",
"numberPoolId": "pool_507f1f77bcf86cd799439011",
"callEndWorkflowIds": [
"wf_507f1f77bcf86cd799439011",
"wf_507f1f77bcf86cd799439012"
],
"agentWorkingHours": [
{
"dayOfTheWeek": 1,
"intervals": [
{
"startHour": 9,
"startMinute": 0,
"endHour": 17,
"endMinute": 30
}
]
}
],
"timezone": "America/New_York",
"isAgentAsBackupDisabled": false
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/voice-ai/agents/YOUR_agentId', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"agentName": "Customer Support Agent", "businessName": "Acme Corporation", "welcomeMessage": "Hello! Thank you for calling Acme Corporation. How can I assist you today?", "agentPrompt": "You are a helpful customer service representative. Always be polite and professional.", "voiceId": "507f1f77bcf86cd799439011", "language": "en-US", "patienceLevel": "low", "maxCallDuration": 600, "sendUserIdleReminders": true, "reminderAfterIdleTimeSeconds": 5, "inboundNumber": "+1234567890", "numberPoolId": "pool_507f1f77bcf86cd799439011", "callEndWorkflowIds": ["wf_507f1f77bcf86cd799439011", "wf_507f1f77bcf86cd799439012"], "agentWorkingHours": [{"dayOfTheWeek": 1, "intervals": [{"startHour": 9, "startMinute": 0, "endHour": 17, "endMinute": 30}]}], "timezone": "America/New_York", "isAgentAsBackupDisabled": false}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PATCH',
'https://services.leadconnectorhq.com/voice-ai/agents/YOUR_agentId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"agentName": "Customer Support Agent", "businessName": "Acme Corporation", "welcomeMessage": "Hello! Thank you for calling Acme Corporation. How can I assist you today?", "agentPrompt": "You are a helpful customer service representative. Always be polite and professional.", "voiceId": "507f1f77bcf86cd799439011", "language": "en-US", "patienceLevel": "low", "maxCallDuration": 600, "sendUserIdleReminders": true, "reminderAfterIdleTimeSeconds": 5, "inboundNumber": "+1234567890", "numberPoolId": "pool_507f1f77bcf86cd799439011", "callEndWorkflowIds": ["wf_507f1f77bcf86cd799439011", "wf_507f1f77bcf86cd799439012"], "agentWorkingHours": [{"dayOfTheWeek": 1, "intervals": [{"startHour": 9, "startMinute": 0, "endHour": 17, "endMinute": 30}]}], "timezone": "America/New_York", "isAgentAsBackupDisabled": false},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'agentName': 'Customer Support Agent', 'businessName': 'Acme Corporation', 'welcomeMessage': 'Hello! Thank you for calling Acme Corporation. How can I assist you today?', 'agentPrompt': 'You are a helpful customer service representative. Always be polite and professional.', 'voiceId': '507f1f77bcf86cd799439011', 'language': 'en-US', 'patienceLevel': 'low', 'maxCallDuration': 600, 'sendUserIdleReminders': true, 'reminderAfterIdleTimeSeconds': 5, 'inboundNumber': '+1234567890', 'numberPoolId': 'pool_507f1f77bcf86cd799439011', 'callEndWorkflowIds': ['wf_507f1f77bcf86cd799439011', 'wf_507f1f77bcf86cd799439012'], 'agentWorkingHours': [{'dayOfTheWeek': 1, 'intervals': [{'startHour': 9, 'startMinute': 0, 'endHour': 17, 'endMinute': 30}]}], 'timezone': 'America/New_York', 'isAgentAsBackupDisabled': false}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Update Agent Action
Source: https://developers.leadwaycrm.com/api-reference/voice-ai/voice-ai-update-action
Update an existing action for a voice AI agent. Modifies the behavior and configuration of an agent action.
Update an existing action for a voice AI agent. Modifies the behavior and configuration of an agent action.
```http theme={null}
PUT https://services.leadconnectorhq.com/voice-ai/actions/{actionId}
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Path parameters
Unique identifier for the action
## Body
Agent ID to attach the action to
Account ID
Type of action Posibles valores: 'CALL\_TRANSFER', 'DATA\_EXTRACTION', 'IN\_CALL\_DATA\_EXTRACTION', 'WORKFLOW\_TRIGGER', 'SMS', 'APPOINTMENT\_BOOKING', 'CUSTOM\_ACTION', 'KNOWLEDGE\_BASE'
Human-readable name for this action
Action parameters - structure varies by actionType
## Respuestas
Unique identifier for the created action
Type of action Posibles valores: 'CALL\_TRANSFER', 'DATA\_EXTRACTION', 'IN\_CALL\_DATA\_EXTRACTION', 'WORKFLOW\_TRIGGER', 'SMS', 'APPOINTMENT\_BOOKING', 'CUSTOM\_ACTION', 'KNOWLEDGE\_BASE'
Human-readable name for this action
Action parameters - structure varies by actionType
```json theme={null}
{
"id": "507f1f77bcf86cd799439011",
"actionType": "CALL_TRANSFER",
"name": "Transfer to Manager"
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X PUT 'https://services.leadconnectorhq.com/voice-ai/actions/YOUR_actionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"agentId": "507f1f77bcf86cd799439011",
"locationId": "507f1f77bcf86cd799439012",
"actionType": "CALL_TRANSFER",
"name": "Transfer to Manager"
}'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/voice-ai/actions/YOUR_actionId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"agentId": "507f1f77bcf86cd799439011", "locationId": "507f1f77bcf86cd799439012", "actionType": "CALL_TRANSFER", "name": "Transfer to Manager"}),
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/voice-ai/actions/YOUR_actionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"agentId": "507f1f77bcf86cd799439011", "locationId": "507f1f77bcf86cd799439012", "actionType": "CALL_TRANSFER", "name": "Transfer to Manager"},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'agentId': '507f1f77bcf86cd799439011', 'locationId': '507f1f77bcf86cd799439012', 'actionType': 'CALL_TRANSFER', 'name': 'Transfer to Manager'}),
]);
$data = json_decode(curl_exec($ch), true);
```
# Get Workflow
Source: https://developers.leadwaycrm.com/api-reference/workflows/workflows-get-workflow
Get Workflow
Get Workflow
```http theme={null}
GET https://services.leadconnectorhq.com/workflows/
```
## Autorización
Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
Versión de la API.
## Query parameters
## Respuestas
```json theme={null}
{
"workflows": [
{
"id": "78559bb3-b920-461e-b010-7b2a2816d2a9",
"name": "First Workflow",
"status": "draft",
"version": 2,
"createdAt": "2021-05-26T11:33:49.000Z",
"updatedAt": "2021-05-26T11:33:49.000Z",
"locationId": "eBG6WapS3v4ZqwA45MTxtYJ"
}
]
}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
```json theme={null}
{}
```
## Ejemplo
```bash cURL theme={null}
curl -X GET 'https://services.leadconnectorhq.com/workflows/' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28'
```
```javascript Node.js theme={null}
const response = await fetch('https://services.leadconnectorhq.com/workflows/', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
},
});
const data = await response.json();
```
```python Python theme={null}
import os, requests
response = requests.request(
'GET',
'https://services.leadconnectorhq.com/workflows/',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
},
)
data = response.json()
```
```php PHP theme={null}
true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
],
]);
$data = json_decode(curl_exec($ch), true);
```
# Autenticación
Source: https://developers.leadwaycrm.com/authentication
Cómo conseguir tu token, qué headers pide la API y cómo hacer tu primera petición.
La API de Leadway se autentica con un **Bearer token** personal que generas desde tu portal Leadway. El token concentra los permisos (scopes) que decides darle. No expira automáticamente, pero lo puedes revocar y reemplazar cuando quieras.
## Cómo conseguir tu token
Esta sección depende de la UI exacta del portal Leadway. Verifica la ruta antes de publicar.
1. Entra a tu portal Leadway en [https://app.leadwaycrm.com](https://app.leadwaycrm.com).
2. Abre **Settings → API** (TBD: confirmar la ruta exacta).
3. Da click en **Generate new token**.
4. Selecciona los scopes que necesite tu integración. Si no estás seguro, empieza con `contacts.readonly` para probar; siempre puedes generar tokens adicionales con más permisos después.
5. Copia el token. **Es lo único que verás una sola vez**, guárdalo en un gestor de secretos (1Password, AWS Secrets Manager, vault). Si lo pierdes, genera otro.
## Headers obligatorios
Toda llamada a la API debe incluir:
| Header | Valor | Notas |
| --------------- | ------------------- | -------------------------------------------------------------------------------------------------------------- |
| `Authorization` | `Bearer ` | El token que generaste arriba. |
| `Version` | `2021-07-28` | Versión de la API. Fija; no la cambies a menos que la documentación de un endpoint específico te indique otra. |
| `Accept` | `application/json` | Todas las respuestas son JSON. |
| `Content-Type` | `application/json` | Solo en `POST`, `PUT`, `PATCH`. |
## Base URL
```
https://services.leadconnectorhq.com
```
Todos los endpoints documentados se cuelgan de esta base. Por ejemplo, listar contactos es `GET https://services.leadconnectorhq.com/contacts/?locationId=`.
## Tu primera petición
Probemos un `GET /contacts/`:
```bash theme={null}
curl https://services.leadconnectorhq.com/contacts/?locationId= \
-H "Authorization: Bearer " \
-H "Version: 2021-07-28" \
-H "Accept: application/json"
```
```js theme={null}
const res = await fetch(
`https://services.leadconnectorhq.com/contacts/?locationId=${process.env.LEADWAY_ACCOUNT_ID}`,
{
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: "2021-07-28",
Accept: "application/json",
},
}
);
const data = await res.json();
console.log(data);
```
```python theme={null}
import os, requests
res = requests.get(
"https://services.leadconnectorhq.com/contacts/",
params={"locationId": os.environ["LEADWAY_ACCOUNT_ID"]},
headers={
"Authorization": f"Bearer {os.environ['LEADWAY_TOKEN']}",
"Version": "2021-07-28",
"Accept": "application/json",
},
)
print(res.json())
```
Respuesta esperada (truncada):
```json theme={null}
{
"contacts": [
{
"id": "ocQHyuzHvysMo5N5VsXc",
"locationId": "TU_ACCOUNT_ID",
"firstName": "...",
"email": "..."
}
],
"count": 1,
"meta": { "total": 1, "currentPage": 1, "nextPage": null, "prevPage": null }
}
```
El campo `locationId` que ves en la respuesta representa **tu cuenta**. Lo verás en cada respuesta de la API porque es el identificador wire-level de tu workspace.
## Rotar o revocar tu token
Si un token se filtra o ya no se usa, ve a **Settings → API** en el portal y dale click a **Revoke**. La revocación es inmediata: cualquier petición pendiente con ese token devuelve `401 Unauthorized`.
Recomendación: rota tokens cada 90 días, o cuando alguien con acceso deje el equipo.
## Errores comunes de auth
| Código | Causa | Cómo resolver |
| ----------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `401 Unauthorized` | Token inválido, revocado o ausente. | Verifica el header `Authorization`. Genera un token nuevo si lo perdiste. |
| `403 Forbidden` | El token es válido pero no tiene el scope requerido. | Mira la página del [scope](/scopes) del endpoint y genera un token nuevo con ese permiso. |
| `429 Too Many Requests` | Excediste el rate limit de tu cuenta. | Espera y reintenta. Si esto ocurre seguido, escribe a [soporte@leadwaycrm.com](mailto:soporte@leadwaycrm.com) para ajustar tu límite. |
# Changelog
Source: https://developers.leadwaycrm.com/changelog
Novedades del producto y de la API de Leadway.
Cambios recientes en la API de Leadway y en las herramientas para desarrolladores. Las entradas más recientes van primero.
## 15 de mayo de 2026
### Nuevo
Lanzamos el portal público de desarrolladores con guía de inicio, autenticación y referencia completa de la API REST.
* Guía [Empezar](/landing) con base URL, headers y un ejemplo `curl` listo para copiar.
* Guía de [Autenticación](/authentication) que explica cómo generar tu Bearer token desde el portal y qué headers exige la API en cada petición.
* Soporte oficial vía [soporte@leadwaycrm.com](mailto:soporte@leadwaycrm.com).
Para ti: ya puedes automatizar tu cuenta de Leadway sin esperar a integraciones intermedias. Generas un token, eliges scopes y empiezas a hacer llamadas.
Publicamos 507 endpoints documentados, cada uno con parámetros, ejemplos de petición y respuesta, y bloque "Try it" para probar en vivo.
La referencia cubre todas las áreas de la plataforma, entre ellas:
* [Contacts](/scopes/contacts), [Opportunities](/scopes/opportunities) y [Companies](/scopes/companies) para tu CRM.
* [Conversations](/scopes/conversations), [LC Email](/scopes/lc-email) y [Phone System](/scopes/phone-system) para mensajería y llamadas.
* [Calendars](/scopes/business-calendars), [Workflows](/scopes/workflows) y [Campaigns](/scopes/campaigns) para automatización.
* [Payments](/scopes/payments), [Invoice](/scopes/invoice), [Products](/scopes/products) y [Store](/scopes/store) para comercio.
* [Funnels](/scopes/funnels), [Blogs](/scopes/blogs), [Surveys](/scopes/surveys) y [Forms](/scopes/email-forms) para sitios y captación.
* [Voice AI](/scopes/voice-ai), [Conversation AI](/scopes/conversation-ai) y [AI Agent](/scopes/ai-agent) para flujos con IA.
* [Media Storage](/scopes/media-storage), [Custom Fields](/scopes/custom-fields), [Custom Menus](/scopes/custom-menus), [Users](/scopes/users) y más.
Para ti: si antes tenías que adivinar el shape de una respuesta o leer código de terceros, ahora tienes la fuente oficial con ejemplos por endpoint.
Publicamos un [catálogo de scopes](/scopes) navegable. Cada scope tiene su propia página con la lista de endpoints que habilita y los permisos `readonly` vs `write` disponibles.
Para ti: cuando generes un token, sabes exactamente qué scope pedir según lo que vayas a automatizar — sin permisos de más, sin sorpresas al hacer la primera llamada.
# Empieza a construir con la API de Leadway
Source: https://developers.leadwaycrm.com/landing
Automatiza tu cuenta de Leadway con scripts e integraciones. Misma plataforma, sin intermediarios.
Todo lo que necesitas para conectar tu cuenta de Leadway con tu CRM, herramientas internas o automatizaciones. Desde tu primera petición hasta producción.
Mintea un token, haz tu primer request, y entiende los headers que pide la API.
Navega el catálogo completo de scopes. Encuentra cuál pedirle a tu token según lo que vayas a automatizar.
## Qué es la API de Leadway
La API REST de Leadway expone toda tu cuenta. Contactos, oportunidades, calendarios, conversaciones, llamadas, pagos, sitios, blogs, formularios, productos: lo que veas en el portal lo puedes leer y escribir desde código.
La base URL es:
```
https://services.leadconnectorhq.com
```
Las llamadas se autentican con un Bearer token que generas desde tu portal Leadway. Cada token tiene un set de scopes asignado que define qué partes de tu cuenta puede tocar.
## Ejemplo rápido
```bash theme={null}
curl https://services.leadconnectorhq.com/contacts/?locationId= \
-H "Authorization: Bearer " \
-H "Version: 2021-07-28" \
-H "Accept: application/json"
```
`locationId` en la respuesta representa tu cuenta. Lo verás en cada endpoint que devuelva o reciba datos de tu cuenta.
## Soporte
Si te trabas, escríbenos a [soporte@leadwaycrm.com](mailto:soporte@leadwaycrm.com) o consulta el [help center](https://docs.leadwaycrm.com).
# Ad Manager
Source: https://developers.leadwaycrm.com/scopes/ad-manager
Campañas de anuncios de Facebook y Google conectadas a tu cuenta.
Campañas de anuncios de Facebook y Google conectadas a tu cuenta.
## Scopes
| Scope | Type | What it does |
| -------------------- | ------- | ---------------------------------------------------------------- |
| `adManager.readonly` | `read` | Leer reportes, campañas y métricas del Ad Manager de tu cuenta. |
| `adManager.write` | `write` | Crear, pausar y editar campañas de anuncios desde el Ad Manager. |
Estos scopes habilitan endpoints relacionados con Ad Manager bajo `/adManager/`.
# Affiliate Manager
Source: https://developers.leadwaycrm.com/scopes/affiliate-manager
Programa de afiliados, payouts y tracking de comisiones.
Programa de afiliados, payouts y tracking de comisiones.
## Scopes
| Scope | Type | What it does |
| --------------------------- | ------- | -------------------------------------------------------- |
| `affiliateManager.readonly` | `read` | Leer afiliados, sus enlaces, métricas y payouts. |
| `affiliateManager.write` | `write` | Crear afiliados, ajustar comisiones y registrar payouts. |
Estos scopes habilitan endpoints relacionados con Affiliate Manager bajo `/affiliateManager/`.
# AI Agent
Source: https://developers.leadwaycrm.com/scopes/ai-agent
Configuración y ejecución de agentes IA en tu cuenta.
Configuración y ejecución de agentes IA en tu cuenta.
## Scopes
| Scope | Type | What it does |
| ------------------ | ------- | ---------------------------------------------------------------- |
| `aiAgent.readonly` | `read` | Leer agentes IA, sus prompts, herramientas y configuración. |
| `aiAgent.write` | `write` | Crear y editar agentes IA, sus prompts, herramientas y triggers. |
Estos scopes habilitan endpoints relacionados con AI Agent bajo `/aiAgent/`.
# Associations
Source: https://developers.leadwaycrm.com/scopes/associations
Relaciones entre contactos, oportunidades y objetos personalizados.
Relaciones entre contactos, oportunidades y objetos personalizados.
## Scopes
| Scope | Type | What it does |
| ----------------------- | ------- | ----------------------------------------------------------------------------- |
| `associations.readonly` | `read` | Leer asociaciones entre recursos (contact↔opportunity, contact↔company, etc). |
| `associations.write` | `write` | Crear y eliminar asociaciones entre recursos. |
Estos scopes habilitan endpoints relacionados con Associations bajo `/associations/`.
# Blogs
Source: https://developers.leadwaycrm.com/scopes/blogs
Posts, categorías y autores del blog de tu cuenta.
Posts, categorías y autores del blog de tu cuenta.
## Scopes
| Scope | Type | What it does |
| ---------------- | ------- | -------------------------------------------------------------- |
| `blogs.readonly` | `read` | Leer posts, categorías y autores del blog. |
| `blogs.write` | `write` | Crear, publicar y editar posts, categorías y autores del blog. |
Estos scopes habilitan endpoints relacionados con Blogs bajo `/blogs/`.
# Brandboards
Source: https://developers.leadwaycrm.com/scopes/brandboards
Sistemas de marca de tu cuenta: colores, tipografía, logos.
Sistemas de marca de tu cuenta: colores, tipografía, logos.
## Scopes
| Scope | Type | What it does |
| ---------------------- | ------- | ---------------------------------------------------------------- |
| `brandboards.readonly` | `read` | Leer brandboards, tokens de color, tipografía y assets de marca. |
| `brandboards.write` | `write` | Crear y editar brandboards y sus tokens. |
Estos scopes habilitan endpoints relacionados con Brandboards bajo `/brandboards/`.
# Business Calendars
Source: https://developers.leadwaycrm.com/scopes/business-calendars
Calendarios, slots, citas y disponibilidad de tu cuenta.
Calendarios, slots, citas y disponibilidad de tu cuenta.
## Scopes
| Scope | Type | What it does |
| -------------------- | ------- | ----------------------------------------------------------------------------- |
| `calendars.readonly` | `read` | Leer calendarios, slots disponibles, citas y configuración de disponibilidad. |
| `calendars.write` | `write` | Crear y editar calendarios, citas y configuración de disponibilidad. |
Estos scopes habilitan endpoints relacionados con Business Calendars bajo `/calendars/`.
# Campaigns
Source: https://developers.leadwaycrm.com/scopes/campaigns
Campañas de email y SMS, listas de envío y métricas de entrega.
Campañas de email y SMS, listas de envío y métricas de entrega.
## Scopes
| Scope | Type | What it does |
| -------------------- | ------- | -------------------------------------------------- |
| `campaigns.readonly` | `read` | Leer campañas de email/SMS, sus envíos y métricas. |
| `campaigns.write` | `write` | Crear, pausar y editar campañas de email/SMS. |
Estos scopes habilitan endpoints relacionados con Campaigns bajo `/campaigns/`.
# Chat Widget
Source: https://developers.leadwaycrm.com/scopes/chat-widget
El widget de chat embebido en tus sitios y funnels.
El widget de chat embebido en tus sitios y funnels.
## Scopes
| Scope | Type | What it does |
| --------------------- | ------- | --------------------------------------------------------------------- |
| `chatWidget.readonly` | `read` | Leer la configuración, mensajes recibidos y branding del chat widget. |
| `chatWidget.write` | `write` | Editar la configuración, branding y comportamiento del chat widget. |
Estos scopes habilitan endpoints relacionados con Chat Widget bajo `/chatWidget/`.
# Companies
Source: https://developers.leadwaycrm.com/scopes/companies
Empresas a las que pertenecen tus contactos en tu CRM.
Empresas a las que pertenecen tus contactos en tu CRM.
## Scopes
| Scope | Type | What it does |
| -------------------- | ------- | ------------------------------------------------------------------- |
| `companies.readonly` | `read` | Leer empresas, sus contactos asociados y sus campos personalizados. |
| `companies.write` | `write` | Crear, actualizar y eliminar empresas en tu CRM. |
Estos scopes habilitan endpoints relacionados con Companies bajo `/companies/`.
# Contacts
Source: https://developers.leadwaycrm.com/scopes/contacts
Leer, crear, actualizar y eliminar contactos en tu cuenta.
Leer, crear, actualizar y eliminar contactos en tu cuenta.
## Scopes
| Scope | Type | What it does |
| ------------------- | ------- | ---------------------------------------------------------------- |
| `contacts.readonly` | `read` | Leer la lista de contactos y los detalles de cualquier contacto. |
| `contacts.write` | `write` | Crear, actualizar y eliminar contactos. |
Estos scopes habilitan endpoints relacionados con Contacts bajo `/contacts/`.
# Conversation AI
Source: https://developers.leadwaycrm.com/scopes/conversation-ai
Bots conversacionales y configuración de IA para hilos de mensajes.
Bots conversacionales y configuración de IA para hilos de mensajes.
## Scopes
| Scope | Type | What it does |
| ------------------------- | ------- | ------------------------------------------------------------------ |
| `conversationAi.readonly` | `read` | Leer bots de IA conversacional, sus prompts y reglas de respuesta. |
| `conversationAi.write` | `write` | Crear y editar bots conversacionales y sus reglas. |
Estos scopes habilitan endpoints relacionados con Conversation AI bajo `/conversationAi/`.
# Conversations
Source: https://developers.leadwaycrm.com/scopes/conversations
Hilos de mensajes a través de WhatsApp, SMS, email, Instagram y otros canales.
Hilos de mensajes a través de WhatsApp, SMS, email, Instagram y otros canales.
## Scopes
| Scope | Type | What it does |
| ------------------------ | ------- | ------------------------------------------------------------------------ |
| `conversations.readonly` | `read` | Leer conversaciones y mensajes a través de todos los canales conectados. |
| `conversations.write` | `write` | Enviar mensajes, marcar leídos y mover conversaciones entre carpetas. |
Estos scopes habilitan endpoints relacionados con Conversations bajo `/conversations/`.
# Courses
Source: https://developers.leadwaycrm.com/scopes/courses
Cursos, módulos, lecciones y matriculaciones.
Cursos, módulos, lecciones y matriculaciones.
## Scopes
| Scope | Type | What it does |
| ------------------ | ------- | ----------------------------------------------------------------- |
| `courses.readonly` | `read` | Leer cursos, módulos, lecciones y matriculaciones de estudiantes. |
| `courses.write` | `write` | Crear cursos, módulos, lecciones y matricular estudiantes. |
Estos scopes habilitan endpoints relacionados con Courses bajo `/courses/`.
# Custom Fields
Source: https://developers.leadwaycrm.com/scopes/custom-fields
Campos personalizados de contactos, oportunidades y otros recursos.
Campos personalizados de contactos, oportunidades y otros recursos.
## Scopes
| Scope | Type | What it does |
| ----------------------- | ------- | --------------------------------------------------------------- |
| `customFields.readonly` | `read` | Leer la definición de los campos personalizados y sus opciones. |
| `customFields.write` | `write` | Crear, editar y eliminar campos personalizados. |
Estos scopes habilitan endpoints relacionados con Custom Fields bajo `/customFields/`.
# Custom Menus
Source: https://developers.leadwaycrm.com/scopes/custom-menus
Menús personalizados en la barra lateral del portal.
Menús personalizados en la barra lateral del portal.
## Scopes
| Scope | Type | What it does |
| ---------------------- | ------- | ------------------------------------------------------- |
| `customMenus.readonly` | `read` | Leer los items del menú personalizado de tu cuenta. |
| `customMenus.write` | `write` | Crear, ordenar y eliminar items del menú personalizado. |
Estos scopes habilitan endpoints relacionados con Custom Menus bajo `/customMenus/`.
# Email Forms
Source: https://developers.leadwaycrm.com/scopes/email-forms
Formularios embebibles y sus envíos.
Formularios embebibles y sus envíos.
## Scopes
| Scope | Type | What it does |
| ---------------- | ------- | ------------------------------------------------------------------- |
| `forms.readonly` | `read` | Leer formularios y los envíos que han generado. |
| `forms.write` | `write` | Crear y editar formularios; ingestar envíos desde fuentes externas. |
Estos scopes habilitan endpoints relacionados con Email Forms bajo `/forms/`.
# Funnels
Source: https://developers.leadwaycrm.com/scopes/funnels
Funnels, páginas, secciones y sitios estáticos.
Funnels, páginas, secciones y sitios estáticos.
## Scopes
| Scope | Type | What it does |
| ------------------ | ------- | --------------------------------------------------- |
| `funnels.readonly` | `read` | Leer la estructura de funnels, páginas y secciones. |
| `funnels.write` | `write` | Crear y editar funnels, páginas y redirecciones. |
Estos scopes habilitan endpoints relacionados con Funnels bajo `/funnels/`.
# Scopes
Source: https://developers.leadwaycrm.com/scopes/index
El catálogo completo de permisos que puedes asignar a tu token.
Cada token que generas concentra un conjunto de **scopes**. Un scope es un permiso granular: define qué partes de tu cuenta puede leer o escribir el token.
Cuando una llamada falla con `403 Forbidden`, casi siempre es porque el token no tiene el scope que el endpoint exige. Ve a la categoría correspondiente para identificar qué scope agregarle a un token nuevo.
Los nombres de scope que aparecen abajo se pasan tal cual a la API. No los traduzcas ni los renombres en tu código.
Campañas de anuncios de Facebook y Google conectadas a tu cuenta.Programa de afiliados, payouts y tracking.Configuración y ejecución de agentes IA.Relaciones entre contactos, oportunidades y objetos personalizados.Posts, categorías y autores del blog de tu cuenta.Sistemas de marca: colores, tipografía, logos.Calendarios, slots, citas y disponibilidad.Campañas de email/SMS, listas de envío.El widget de chat embebido en tus sitios.Empresas a las que pertenecen tus contactos.Leer, crear, actualizar y eliminar contactos.Bots conversacionales y configuración de IA.Hilos de mensajes a través de WhatsApp, SMS, email, Instagram y otros canales.Cursos, módulos, lecciones y matriculaciones.Campos personalizados de contactos, oportunidades y otros recursos.Menús personalizados en la barra lateral del portal.Formularios embebibles y sus envíos.Funnels, páginas, secciones, sitios estáticos.Facturas, recibos y envíos a clientes.Artículos de ayuda agrupados en bases de conocimiento.Email transaccional y de marketing.Archivos, imágenes y carpetas del media library.Objetos personalizados (custom objects) y sus registros.Pipelines, etapas, oportunidades y movimientos.Pagos, órdenes, transacciones y configuración de Stripe.Números, llamadas, mensajería SMS, IVR.Catálogo de productos y precios.Propuestas comerciales y firmas electrónicas.Posts programados en redes sociales y cuentas conectadas.Tu tienda online, órdenes, descuentos.Studio: ediciones de video y audio.Encuestas embebibles y sus respuestas.Links que disparan workflows cuando alguien los abre.Usuarios de tu cuenta, sus roles y permisos.Agentes de voz IA, llamadas salientes y entrantes.Automatizaciones, triggers, acciones, ramas.
# Invoice
Source: https://developers.leadwaycrm.com/scopes/invoice
Facturas, recibos y envíos a clientes.
Facturas, recibos y envíos a clientes.
## Scopes
| Scope | Type | What it does |
| ------------------- | ------- | ---------------------------------------------------------------- |
| `invoices.readonly` | `read` | Leer facturas emitidas, sus líneas y su estado de cobro. |
| `invoices.write` | `write` | Crear, enviar y marcar como pagadas las facturas a tus clientes. |
Estos scopes habilitan endpoints relacionados con Invoice bajo `/invoices/`.
# Knowledge Base
Source: https://developers.leadwaycrm.com/scopes/knowledge-base
Artículos de ayuda agrupados en bases de conocimiento.
Artículos de ayuda agrupados en bases de conocimiento.
## Scopes
| Scope | Type | What it does |
| ------------------------ | ------- | --------------------------------------------------------- |
| `knowledgeBase.readonly` | `read` | Leer artículos y categorías de las bases de conocimiento. |
| `knowledgeBase.write` | `write` | Crear, publicar y editar artículos y categorías. |
Estos scopes habilitan endpoints relacionados con Knowledge Base bajo `/knowledgeBase/`.
# LC Email
Source: https://developers.leadwaycrm.com/scopes/lc-email
Email transaccional y de marketing enviado desde tu cuenta.
Email transaccional y de marketing enviado desde tu cuenta.
## Scopes
| Scope | Type | What it does |
| ---------------- | ------- | ---------------------------------------------------------- |
| `email.readonly` | `read` | Leer templates, schedules y estadísticas de email enviado. |
| `email.write` | `write` | Crear y enviar emails transaccionales y de marketing. |
Estos scopes habilitan endpoints relacionados con LC Email bajo `/email/`.
# Media Storage
Source: https://developers.leadwaycrm.com/scopes/media-storage
Archivos, imágenes y carpetas del media library.
Archivos, imágenes y carpetas del media library.
## Scopes
| Scope | Type | What it does |
| ----------------- | ------- | --------------------------------------------------- |
| `medias.readonly` | `read` | Leer archivos y carpetas del media library. |
| `medias.write` | `write` | Subir, mover y eliminar archivos del media library. |
Estos scopes habilitan endpoints relacionados con Media Storage bajo `/medias/`.
# Objects
Source: https://developers.leadwaycrm.com/scopes/objects
Objetos personalizados (custom objects) y sus registros.
Objetos personalizados (custom objects) y sus registros.
## Scopes
| Scope | Type | What it does |
| ------------------ | ------- | ---------------------------------------------------------------------------- |
| `objects.readonly` | `read` | Leer el esquema de objetos personalizados y los registros que contienen. |
| `objects.write` | `write` | Crear y editar el esquema de objetos personalizados, sus campos y registros. |
Estos scopes habilitan endpoints relacionados con Objects bajo `/objects/`.
# Opportunities
Source: https://developers.leadwaycrm.com/scopes/opportunities
Pipelines, etapas, oportunidades y movimientos entre etapas.
Pipelines, etapas, oportunidades y movimientos entre etapas.
## Scopes
| Scope | Type | What it does |
| ------------------------ | ------- | -------------------------------------------------------------- |
| `opportunities.readonly` | `read` | Leer pipelines, etapas y oportunidades. |
| `opportunities.write` | `write` | Crear oportunidades y moverlas entre etapas; editar pipelines. |
Estos scopes habilitan endpoints relacionados con Opportunities bajo `/opportunities/`.
# Payments
Source: https://developers.leadwaycrm.com/scopes/payments
Pagos, órdenes, transacciones y configuración de Stripe.
Pagos, órdenes, transacciones y configuración de Stripe.
## Scopes
| Scope | Type | What it does |
| ------------------- | ------- | ----------------------------------------------------------------------- |
| `payments.readonly` | `read` | Leer transacciones, órdenes y configuración de la integración de pagos. |
| `payments.write` | `write` | Crear órdenes, registrar pagos y modificar la configuración de pagos. |
Estos scopes habilitan endpoints relacionados con Payments bajo `/payments/`.
# Phone System
Source: https://developers.leadwaycrm.com/scopes/phone-system
Números, llamadas, mensajería SMS, IVR y grabaciones.
Números, llamadas, mensajería SMS, IVR y grabaciones.
## Scopes
| Scope | Type | What it does |
| ---------------- | ------- | ----------------------------------------------------------------------- |
| `phone.readonly` | `read` | Leer números de teléfono, historial de llamadas y configuración de IVR. |
| `phone.write` | `write` | Iniciar llamadas salientes, configurar números, editar el IVR. |
Estos scopes habilitan endpoints relacionados con Phone System bajo `/phone/`.
# Products
Source: https://developers.leadwaycrm.com/scopes/products
Catálogo de productos, precios y SKUs de tu cuenta.
Catálogo de productos, precios y SKUs de tu cuenta.
## Scopes
| Scope | Type | What it does |
| ------------------- | ------- | --------------------------------------------- |
| `products.readonly` | `read` | Leer productos, precios y SKUs. |
| `products.write` | `write` | Crear, editar y eliminar productos y precios. |
Estos scopes habilitan endpoints relacionados con Products bajo `/products/`.
# Proposals
Source: https://developers.leadwaycrm.com/scopes/proposals
Propuestas comerciales y firmas electrónicas.
Propuestas comerciales y firmas electrónicas.
## Scopes
| Scope | Type | What it does |
| -------------------- | ------- | ----------------------------------------------- |
| `proposals.readonly` | `read` | Leer propuestas, su estado y firmas. |
| `proposals.write` | `write` | Crear propuestas, enviarlas y registrar firmas. |
Estos scopes habilitan endpoints relacionados con Proposals bajo `/proposals/`.
# Social Planner
Source: https://developers.leadwaycrm.com/scopes/social-planner
Posts programados en redes sociales y cuentas conectadas.
Posts programados en redes sociales y cuentas conectadas.
## Scopes
| Scope | Type | What it does |
| ------------------------ | ------- | ------------------------------------------------------------------ |
| `socialPlanner.readonly` | `read` | Leer posts programados, calendarios de redes y cuentas conectadas. |
| `socialPlanner.write` | `write` | Programar, editar y eliminar posts en redes sociales. |
Estos scopes habilitan endpoints relacionados con Social Planner bajo `/socialPlanner/`.
# Store
Source: https://developers.leadwaycrm.com/scopes/store
Tu tienda online, órdenes, descuentos y configuración de checkout.
Tu tienda online, órdenes, descuentos y configuración de checkout.
## Scopes
| Scope | Type | What it does |
| ---------------- | ------- | ---------------------------------------------------------------- |
| `store.readonly` | `read` | Leer órdenes, descuentos y configuración de la tienda online. |
| `store.write` | `write` | Crear y editar órdenes, descuentos y configuración del checkout. |
Estos scopes habilitan endpoints relacionados con Store bajo `/store/`.
# Studio
Source: https://developers.leadwaycrm.com/scopes/studio
Ediciones de video y audio en Studio.
Ediciones de video y audio en Studio.
## Scopes
| Scope | Type | What it does |
| ----------------- | ------- | -------------------------------------------------------------- |
| `studio.readonly` | `read` | Leer proyectos, recursos y exports de Studio. |
| `studio.write` | `write` | Crear y editar proyectos de Studio, subir recursos y exportar. |
Estos scopes habilitan endpoints relacionados con Studio bajo `/studio/`.
# Surveys
Source: https://developers.leadwaycrm.com/scopes/surveys
Encuestas embebibles y sus respuestas.
Encuestas embebibles y sus respuestas.
## Scopes
| Scope | Type | What it does |
| ------------------ | ------- | --------------------------------------------------------------------- |
| `surveys.readonly` | `read` | Leer encuestas y las respuestas que han generado. |
| `surveys.write` | `write` | Crear y editar encuestas; ingestar respuestas desde fuentes externas. |
Estos scopes habilitan endpoints relacionados con Surveys bajo `/surveys/`.
# Trigger Links
Source: https://developers.leadwaycrm.com/scopes/trigger-links
Links que disparan workflows cuando alguien los abre.
Links que disparan workflows cuando alguien los abre.
## Scopes
| Scope | Type | What it does |
| ----------------------- | ------- | ------------------------------------------------------------- |
| `triggerLinks.readonly` | `read` | Leer los trigger links de tu cuenta y sus métricas de clicks. |
| `triggerLinks.write` | `write` | Crear y editar trigger links y los workflows que disparan. |
Estos scopes habilitan endpoints relacionados con Trigger Links bajo `/triggerLinks/`.
# Users
Source: https://developers.leadwaycrm.com/scopes/users
Usuarios de tu cuenta, sus roles y permisos.
Usuarios de tu cuenta, sus roles y permisos.
## Scopes
| Scope | Type | What it does |
| ---------------- | ------- | ------------------------------------------------- |
| `users.readonly` | `read` | Leer la lista de usuarios y sus permisos. |
| `users.write` | `write` | Invitar, editar y eliminar usuarios de tu cuenta. |
Estos scopes habilitan endpoints relacionados con Users bajo `/users/`.
# Voice AI
Source: https://developers.leadwaycrm.com/scopes/voice-ai
Agentes de voz IA, llamadas salientes y entrantes automatizadas.
Agentes de voz IA, llamadas salientes y entrantes automatizadas.
## Scopes
| Scope | Type | What it does |
| ------------------ | ------- | -------------------------------------------------------------------------- |
| `voiceAi.readonly` | `read` | Leer agentes de voz, sus prompts y el historial de llamadas que han hecho. |
| `voiceAi.write` | `write` | Crear y editar agentes de voz; iniciar llamadas salientes. |
Estos scopes habilitan endpoints relacionados con Voice AI bajo `/voiceAi/`.
# Workflows
Source: https://developers.leadwaycrm.com/scopes/workflows
Automatizaciones, triggers, acciones y ramas.
Automatizaciones, triggers, acciones y ramas.
## Scopes
| Scope | Type | What it does |
| -------------------- | ------ | ----------------------------------------------------- |
| `workflows.readonly` | `read` | Leer workflows, sus triggers, acciones y ejecuciones. |
Estos scopes habilitan endpoints relacionados con Workflows bajo `/workflows/`.