Partner Program API
Introduction
LiveChat Partner Program API allows you to build tools that will help you make a better use of your data. The API is 100% open, so it’s up to you what you create.
Status
GET /v2/partners/status
- check if the API is running
Response
200 - OK
- the API is up and running- everything else - the API has some issues
EXAMPLE REQUEST
curl -I https://api.livechatinc.com/v2/partners/status
Authorization
Each API request requires an authorization header to identify the Partner. Authorization is provided by a unique API token.
You can create your token in the API tokens section in Dashboard.
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
Postman Collection
You can find all the requests from the Partner Program API in Postman. In our collection, we use environment variables for the API token - remember to replace it with your own.
Account
- Get Profile
- Update Profile
- Get Stats
- Get Coupons
- Get Earnings
- Get Commission Report
- Get Partners Referred Earnings Report
- Get Billing
- Get Balance
- Get Commission Metric
- Update Billing
- Request Withdrawal
- Get Withdrawals
- Create API Token
- Get API Tokens
- Revoke API Token
Get Profile
GET /v2/partners
- get the profile info
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example on the right401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"partner_id": "xyz",
"login": "joe@email.com",
"first_name": "Joe",
"last_name": "Doe",
"contact_name": "Jane Doe",
"contact_email": "jane@email.com",
"solution_status": "accepted",
"properties": {
"sales_kit_popup_closed": true,
"pitch_deck_downloaded": true,
"tier2_popup_closed": true,
"payment_origin_popup_closed": true
// and more properties (used for showing popups in Partners App)
}
}
Update Profile
PUT /v2/partners
- update the profile info
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Body
first_name
- required - first namelast_name
- required - last namecontact_name
- required - contact namecontact_email
- required - contact emailsend_monthly_summary
-boolean
valuesend_reseller_weekly_summary
-boolean
valuesend_newsletter
-boolean
valuesend_notifications
-boolean
value
Response
204 - No Content
- success400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
Get Stats
GET /v2/partners/stats
- get the number of licenses for each product and partnership model
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example on the right401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/stats \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"affiliate": {
"livechat": {
"trials": 120,
"trials_cc": 38,
"paid": 41
},
"chatbot": {
"trials": 96,
"trials_cc": 52,
"paid": 34
},
"helpdesk": {
"trials": 21,
"trials_cc": 37,
"paid": 47
},
"partner_program": {
"partners_referred": 63,
"trials": 42,
"trials_cc": 24,
"paid": 37
}
},
"solution": {
"livechat": {
"trials": 12,
"trials_cc": 7,
"paid": 28
},
"chatbot": {
"trials": 51,
"trials_cc": 21,
"paid": 19
},
"helpdesk": {
"trials": 21,
"trials_cc": 37,
"paid": 47
}
}
}
Get Coupons
GET /v2/partners/coupons
- get the list of active coupons
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example on the right401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/coupons \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"result": [
{
"id": 1,
"label": "30% off first payment"
},
{
"id": 2,
"label": "$25 discount"
}
]
}
Get Earnings
GET /v2/partners/earnings
- get earnings (commission earned, balance, blocked and pending amount, and more)
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example on the right401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/earnings \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"balance": 2552,
"blocked": 0,
"commission_total": 16519.12,
"commission_last_30_days": 61.34,
"withdrawals": 0,
"pending": 13546,
"affiliate": {
"commission_total": 16098,
"commission_last_30_days": 0,
"livechat": {
"commission_total": 15942,
"commission_last_30_days": 0
},
"chatbot": {
"commission_total": 0,
"commission_last_30_days": 0
},
"partner_program": {
"commission_total": 156,
"commission_last_30_days": 0
}
},
"solution": {
"commission_total": 421.12,
"commission_last_30_days": 61.34,
"livechat": {
"discount": 45943.76,
"commission_total": 0,
"commission_last_30_days": 0
},
"chatbot": {
"discount": 0,
"commission_total": 421.12,
"commission_last_30_days": 61.34
}
}
}
Get Commission Report
GET /v2/partners/reports/commission
- get commission reports
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- required - get report from a given datedate_to
- required - get report up to a given datefilters
- filtersaggregation
- required - get report aggregated by a given timespan (one of:day
,week
,month
)
Note:
- Date format:
YYYY-MM-DDTHH:mm:ssZ
filters
is an array of objects, where each object has the following fields:field
- field name (one of:program
,product
)value
- field valueoperator
- operator (equals
)
- for example:
filters=[{"field": "prod", "value": "livechat", "operator": "equals"}]
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/reports/commission?date_from=2022-12-15T00:00:00Z&date_to=2023-02-14T23:59:59Z&aggregation=month&filters=[{"field":"product","value":"livechat","operator":"equals"}] \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"items": [
{
"date_range": {
"from": "2022-12-01 00:00:00",
"to": "2022-12-31 23:59:59"
},
"total": 6326.39
},
{
"date_range": {
"from": "2023-01-01 00:00:00",
"to": "2023-01-31 23:59:59"
},
"total": 4949.1
},
{
"date_range": {
"from": "2023-02-01 00:00:00",
"to": "2023-02-28 23:59:59"
},
"total": 7824.5
}
]
}
Get Partners Referred Earnings Report
GET /v2/partners/partners-referred/reports/commission
- get commission earned from referring partners
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- required - get report from a given datedate_to
- required - get report up to a given dateaggregation
- required - get report aggregated by a given timespan (one of:day
,week
,month
)product
- get report for a given product (one of:livechat
,chatbot
,helpdesk
,all
; default:all
)program
- get report for a given program (one of:affiliate
,solution
,all
; default:all
)
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see the example below400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/partners-referred/reports/commission?aggregation=month&date_from=2022-03-25T00:00:00Z&date_to=2022-05-04T00:00:00Z \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"items": [
{
"date_range": {
"from": "2022-03-01 00:00:00",
"to": "2022-03-31 23:59:59"
},
"total": 885.58
},
{
"date_range": {
"from": "2022-04-01 00:00:00",
"to": "2022-04-30 23:59:59"
},
"total": 347.94
},
{
"date_range": {
"from": "2022-05-01 00:00:00",
"to": "2022-05-31 23:59:59"
},
"total": 1413.69
}
]
}
Get Billing
GET /v2/partners/billing
- get billing information
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example on the right401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/billing \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"company": "Awesome Company",
"vat": "123",
"address": "Wall Street 123",
"city": "New York",
"zip_code": "10005",
"country": "US",
"paypal": "paypal@email.com",
"type": "business"
}
Get Balance
GET /v2/partners/balance
- get balance information
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example on the right401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/balance \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"pending": 21.00,
"withdrawn": 37.00,
"available": 362.00,
"total": "420.00",
}
Get Commission Metric
GET /v2/partners/metrics/commission
- get commission metric
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- get commission metric from a given datedate_to
- get commission metric up to a given dateproduct
- get commission metric for a given product (one of:livechat
,chatbot
,helpdesk
,all
; default:all
)program
- get commission metric for a given program (one of:solution
,affiliate
,all
; default:all
)
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/metrics/commission?date_from=2022-01-01T10:10:10Z&date_to=2022-12-01T10:10:10Z&product=livechat&program=solution \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"value": 1232.12
}
Update Billing
PUT /v2/partners/billing
- update billing information
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Body
type
- required -business
orindividual
company
- required - company name (if business) or full name (if individual)address
- requiredcity
- requiredcountry
- required - country code, one of thesepaypal
- required - PayPal login (email)zip_code
- ZIP / Postal codevat
- VATstate
- State
Response
204 - No Content
- success400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
Request Withdrawal
POST /v2/partners/withdrawals
- create a withdrawal request
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
201 - Created
- success, see example401 - Unauthorized
- a missing or incorrect authorization header403 - Forbidden
- not enough money to withdraw (min. \$50)409 - Conflict
- billing info not found; please, update billing
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/withdrawals \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"withdrawal_id": 2,
"request_timestamp": "2018-03-06 12:24:42",
"action_timestamp": "",
"status": "pending",
"amount": 1520,
"invoice_id": "2018/2/xyz",
"paypal": "joe@doe.com"
}
Get Withdrawals
GET /v2/partners/withdrawals
- get the list of withdrawals
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- get a report on withdrawals starting from a given datedate_to
- get a report on withdrawals ending on a given date
Note: Date format: YYYY-MM-DD
Response
200 - OK
- success, see the example on the right400 - Bad Request
- incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/withdrawals \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"result": [
{
"withdrawal_id": 2,
"request_timestamp": "2018-03-06 12:24:42",
"action_timestamp": "",
"status": "pending",
"amount": 1520,
"invoice_id": "2018/2/xyz",
"paypal": "joe@doe.com"
},
{
"withdrawal_id": 1,
"request_timestamp": "2018-02-02 11:43:37",
"action_timestamp": "2018-02-02 12:04:11",
"status": "paid",
"amount": 1063.3,
"invoice_id": "2018/1/xyz",
"paypal": "joe@doe.com"
}
]
}
Create API Token
POST /v2/partners/tokens
- create a new API token
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Body
label
- required - a custom label for the token (min. 3 characters)
Response
201 - Created
- success, see example400 - Bad Request
- incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header409 - Conflict
- the given label was already taken
EXAMPLE REQUEST
curl --request POST \
--data 'label=My first API token' \
--url https://api.livechatinc.com/v2/partners/tokens \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"id": 1,
"token": "secrettokengeneratedbyapi...",
"creation_timestamp": "2018-03-06 15:14:26",
"label": "My first API token"
}
Get API Tokens
GET /v2/partners/tokens
- get the list of active API tokens
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example on the right400 - Bad Request
- incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/tokens \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"result": [
{
"id": 2,
"token": "anothersecrettokengeneratedbyapi...",
"creation_timestamp": "2018-03-06 17:14:26",
"label": "Token for my service"
},
{
"id": 1,
"token": "secrettokengeneratedbyapi...",
"creation_timestamp": "2018-03-06 15:14:26",
"label": "My first API token"
}
]
}
Revoke API Token
DELETE /v2/partners/tokens/<id>
- a revoke API token
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<id>
- required - token ID
Response
204 - No Content
- success400 - Bad Request
- incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request DELETE \
--url https://api.livechatinc.com/v2/partners/tokens/1 \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
Affiliate Partner
- Create Campaign
- Search Campaigns
- Get Campaigns
- Disable Campaign
- Get Affiliate Licenses
- Get Performance Report
- Get Partners Referred
- Get Affiliate Links
- Get Trials Metrics
- Get Earnings Metrics
- Get Conversions Metrics
- Get Clicks Metrics
- Get Referred Partners Commission Metrics
- Get Trials Report
- Get Earnings Report
- Get Conversions Report
- Get Clicks Report
- Get Licenses By Status
- Get Campaigns Earnings Metric
- Get Campaigns Earnings Report
- Get Campaigns Summary
- Get Best Performing Campaigns Clicks Report
- Get Best Performing Campaigns Trials Report
- Get Best Performing Campaigns Conversions Report
- Get Best Performing Campaigns Earnings Report
- Get Best Performing Campaigns Clicks Metrics
- Get Best Performing Campaigns Trials Metrics
- Get Best Performing Campaigns Conversions Metrics
- Get Best Performing Campaigns Earnings Metrics
- Get Summary
Create Campaign
POST /v2/partners/affiliates/campaigns
- create a new campaign
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
product
- required - product (livechat
,chatbot
orpartner_program
itself)
Body
name
- required - campaign name (min. 5, max. 100 characters)link
- the URL of the product landing page (default: product homepage)trial_duration
- only for thelivechat
product - the number of days of a trial period (min. 14 - default, max. 30)coupon_id
- only for thelivechat
product - the ID of the coupon assigned to a Partner (a discount will be applied)
Response
201 - Created
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header403 - Forbidden
- not allowed to use the givencoupon_id
409 - Conflict
- campaign with the given name already exists
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns?product=livechat \
--data 'name=New campaign&link=https://www.livechat.com/features/&trial_duration=30&coupon_id=1' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"product": "livechat",
"name": "New campaign",
"slug": "pp_new-campaign",
"url": "https://www.livechat.com/features/?a=xyz&utm_campaign=pp_new-campaign",
"short_url": "https://lc.chat/abc",
"creation_timestamp": "2018-03-06 11:30:40"
"trial_duration": 30,
"discount": "$25 discount",
}
// Note - `slug` is a URL-friendly campaign name with `pp_` prefix
Search Campaigns
GET /v2/partners/affiliates/campaigns/search
- search for campaigns
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
page
- pagination page numberstate
- required - state (active
orarchived
)product
- product (one of:livechat
,chatbot
,helpdesk
,all
; default:all
)filters
- filters (see below)sort_by
- sort by (one of:creation_timestamp
)sort_order
- sort order (one of:desc
,asc
)
Note:
filters
is an array of objects, where each object has the following fields:field
- field name (one of:name
,product
)value
- field valueoperator
- operator (one of:equals
,contains
)
- for example:
filters=[{"field": "name", "value": "campaign-name-123", "operator": "equals"}]
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns/search?page=1&product=all&state=active&filters=[]&&sort_order=desc&sort_by=creation_timestamp \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"value": 123.00,
"results": [
{
"id": 123,
"name": "campaign-test-name",
"product": "chatbot",
"created_at": "2023-01-01 11:22:59",
"landing_page_url": "https://staging.chatbot.com/features",
"slug": "pp-campaign-test-name",
"is_default": false,
"region": "dal",
"offer": null
},
],
"total": 120, // represents total number of campaigns
"limit": 15, // represents number of campaigns per page
}
Get Campaigns
GET /v2/partners/affiliates/campaigns
- get campaigns
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
state
-active
(default) ordisabled
Response
200 - OK
- success, see the example on the right401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"result": [
{
"active": true,
"product": "livechat",
"name": "Hello World!",
"slug": "pp_hello-world",
"url": "https://www.livechat.com/pricing/?a=xyz&utm_campaign=pp_hello-world&utm_source=PP",
"short_url": "https://lc.chat/abc",
"creation_timestamp": "2018-03-06 23:42:19"
"trial_duration": 30,
"discount": "30% off first payment",
},
{
"active": true
"creation_timestamp": "2019-11-21 14:22:14",
"name": "Test Campaign",
"product": "chatbot",
"short_url:" "https://lc.chat/xyz",
"slug": "pp_test-campaign"
"trial_duration": 7,
"url": "https://chatbot.com/?a=xyzK&utm_campaign=pp_test-campaign&utm_source=PP"
}
]
}
// Note - `slug` is a URL-friendly campaign name with `pp_` prefix
Disable Campaign
DELETE /v2/partners/affiliates/campaigns/<campaign_id>
- disable a campaign
Path Parameters
<campaign_id>
- required - campaign ID
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
204 - No Content
- success400 - Bad Request
- incorrect parameter401 - Unauthorized
- a missing or incorrect authorization header403 - Forbidden
- the given campaign doesn't exist or was already disabled
EXAMPLE REQUEST
curl --request DELETE \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns/123 \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
Get Affiliate Licenses
GET /v2/partners/affiliates/licenses
- get the list of Affiliate licenses
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- get licenses created from a given datedate_to
- get licenses created up to a given date
Note: Date format: YYYY-MM-DD
Response
200 - OK
- success, see the example on the right400 - Bad Request
- incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/affiliates/licenses \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"result": [
{
"product": "livechat",
"creation_timestamp": "2019-10-25 14:55:57",
"end_timestamp": "2019-11-25 12:55:54",
"active": true,
"ql": true,
"cc_added": false,
"paid": false,
"commission_percent": 20,
"earnings": 0,
"blocked": false,
"campaign_name": "",
"utm_campaign": "",
"utm_medium": "",
"utm_content": "",
"utm_term": ""
},
{
"product": "chatbot",
"creation_timestamp": "2019-09-05 15:51:39",
"end_timestamp": "2019-10-05 13:51:39",
"active": true,
"ql": true,
"cc_added": true,
"paid": true,
"commission_percent": 20,
"earnings": 18.2,
"blocked": false,
"campaign_name": "",
"utm_campaign": "",
"utm_medium": "",
"utm_content": "",
"utm_term": ""
}
]
}
Get Performance Report
GET /v2/partners/affiliates/performance
- get Affiliate's performance report
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- get a report for licenses created from a given datedate_to
- get a report for licenses created up to a given date
Note: Date format: YYYY-MM-DD
Response
200 - OK
- success, see the example on the right400 - Bad Request
- incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/affiliates/performance \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"result": [
{
"product": "livechat",
"campaign_name": "Newsletter",
"utm_campaign": "pp_newsletter",
"utm_medium": "",
"utm_content": "",
"utm_term": "",
"clicks": 141,
"trials": 58,
"qls": 47,
"paid": 24,
"partners_referred": 0,
"commission": 7284.2
},
{
"product": "partner_program",
"campaign_name": "ad",
"utm_campaign": "pp_ad",
"utm_medium": "",
"utm_content": "",
"utm_term": "",
"clicks": 154,
"trials": 0,
"qls": 0,
"paid": 0,
"partners_referred": 123,
"commission": 3141
},
{
"product": "chatbot",
"campaign_name": "AI Campaign",
"utm_campaign": "pp_ai-campaign",
"utm_medium": "",
"utm_content": "",
"utm_term": "",
"clicks": 72,
"trials": 41,
"qls": 17,
"paid": 23,
"partners_referred": 0,
"commission": 1961.6
}
]
}
Get Partners Referred
GET /v2/partners/affiliates/partners-referred
- get the list of referred Partners
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example on the right401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/affiliates/partners-referred \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"result": [
{
"partner_id": "W-5ZzZyiR",
"creation_timestamp": "2019-08-21 10:02:44",
"active_trials": 10,
"active_trials_cc_added": 14,
"total_trials": 41,
"active_paid": 8,
"total_paid": 8,
"commission": 5124.2,
"campaign_name": "",
"utm_campaign": "",
"utm_medium": "",
"utm_content": "",
"utm_term": ""
},
{
"partner_id": "BqgFtQEmR",
"creation_timestamp": "2019-08-14 16:24:12",
"active_trials": 16,
"active_trials_cc_added": 4,
"total_trials": 51,
"active_paid": 19,
"total_paid": 20,
"commission": 6815,
"campaign_name": "My awesome campaign",
"utm_campaign": "pp_my_awesome_campaign",
"utm_medium": "",
"utm_content": "",
"utm_term": ""
}
]
}
Get Affiliate Links
GET /v2/partners/affiliates/links
- get affiliate links (long and short version) for default campaigns of each product
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/affiliates/links \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"livechat": {
"url": "https://www.livechat.com/?a=JXkcUIvMR&utm_source=PP",
"short_url": "https://lc.chat/pTQxp"
},
"chatbot": {
"url": "https://www.chatbot.com/?a=JXkcUIvMR&utm_source=PP",
"short_url": "https://lc.chat/Xm6qW"
},
"partner_program": {
"url": "https://partners.livechat.com/?a=JXkcUIvMR&utm_source=PP",
"short_url": "https://lc.chat/xzrKk"
}
}
Get Trials Metrics
GET /v2/partners/affiliates/metrics/trials
- get number of trials generated from Affiliate campaigns
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- get trials metrics from a given datedate_to
- get trials metrics up to a given date
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/metrics/trials?date_from=2022-01-01T10:10:10Z&date_to=2022-12-01T10:10:10Z \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"value": 99
}
Get Earnings Metrics
GET /v2/partners/affiliates/metrics/earnings
- get earnings generated from Affiliate campaigns
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- get earnings metrics from a given datedate_to
- get earnings metrics up to a given dateproduct
- optional - get earnings metrics for a given product (one of:livechat
,chatbot
,helpdesk
)
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/metrics/earnings?date_from=2022-01-01T10:10:10Z&date_to=2022-12-01T10:10:10Z&product=livechat \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"value": 123.45
}
Get Conversions Metrics
GET /v2/partners/affiliates/metrics/conversions
- get number of trials converted into paid licenses generated from Affiliate campaigns
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- get conversions metrics from a given datedate_to
- get conversions metrics up to a given date
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/metrics/conversions?date_from=2022-01-01T10:10:10Z&date_to=2022-12-01T10:10:10Z \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"value": 123
}
Get Clicks Metrics
GET /v2/partners/affiliates/metrics/clicks
- get clicks generated from Affiliate campaigns
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- get clicks metrics from a given datedate_to
- get clicks metrics up to a given date
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/metrics/clicks?date_from=2022-01-01T10:10:10Z&date_to=2022-12-01T10:10:10Z \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"value": 123
}
Get Referred Partners Commission Metrics
GET /v2/partners/partners-referred/metrics/commission
- get commission generated from referred partners activity
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- get commission metrics from a given datedate_to
- get commission metrics up to a given dateproduct
- get commission metric for a given product (one of:livechat
,chatbot
,partner_program
,all
; default:all
)program
- get commission metrics for a given program (one of:solution
,affiliate
,all
; default:all
)
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/partners-referred/metrics/commission?date_from=2022-01-01T10:10:10Z&date_to=2022-12-01T10:10:10Z&product=livechat&program=solution \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"value": 123.45
}
Get Trials Report
GET /v2/partners/affiliates/reports/trials
- get trials report for the Affiliate activity over time (up to last 12 months)
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- required - get report from a given datedate_to
- required - get report up to a given dateaggregation
- required - get report aggregated by a given timespan (one of:day
,week
,month
)product
- get report for a given product (one of:livechat
,chatbot
,helpdesk
,all
; default:all
)
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/reports/trials?date_from=2022-02-15T00:00:00Z&date_to=2023-02-14T23:59:59Z&aggregation=month&product=livechat \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"items": [
{
"date_range": {
"from": "2023-02-12 00:00:00",
"to": "2023-02-12 23:59:59"
},
"total": 3
},
{
"date_range": {
"from": "2023-02-13 00:00:00",
"to": "2023-02-13 23:59:59"
},
"total": 5
},
{
"date_range": {
"from": "2023-02-14 00:00:00",
"to": "2023-02-14 23:59:59"
},
"total": 0
}
]
}
Get Earnings Report
GET /v2/partners/affiliates/reports/earnings
- get earnings report for the Affiliate activity over time (up to last 12 months)
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- required - get report from a given datedate_to
- required - get report up to a given dateaggregation
- required - get report aggregated by a given timespan (one of:day
,week
,month
)product
- get report for a given product (one of:livechat
,chatbot
,helpdesk
,all
; default:all
)
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/reports/earnings?date_from=2022-12-15T00:00:00Z&date_to=2023-02-14T23:59:59Z&aggregation=month&product=livechat \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"items": [
{
"date_range": {
"from": "2022-12-01 00:00:00",
"to": "2022-12-31 23:59:59"
},
"total": 6326.39
},
{
"date_range": {
"from": "2023-01-01 00:00:00",
"to": "2023-01-31 23:59:59"
},
"total": 4949.1
},
{
"date_range": {
"from": "2023-02-01 00:00:00",
"to": "2023-02-28 23:59:59"
},
"total": 7824.5
}
]
}
Get Conversions Report
GET /v2/partners/affiliates/reports/conversions
- get conversions report for the Affiliate activity over time (up to last 12 months)
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- required - get report from a given datedate_to
- required - get report up to a given dateaggregation
- required - get report aggregated by a given timespan (one of:day
,week
,month
)product
- get report for a given product (one of:livechat
,chatbot
,helpdesk
,all
; default:all
)
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/reports/conversions?date_from=2023-01-21T00:00:00Z&date_to=2023-02-11T23:59:59Z&aggregation=week&product=chatbot \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"items": [
{
"date_range": {
"from": "2023-01-16 00:00:00",
"to": "2023-01-22 23:59:59"
},
"total": 6
},
{
"date_range": {
"from": "2023-01-23 00:00:00",
"to": "2023-01-29 23:59:59"
},
"total": 3
},
{
"date_range": {
"from": "2023-01-30 00:00:00",
"to": "2023-02-05 23:59:59"
},
"total": 0
},
{
"date_range": {
"from": "2023-02-06 00:00:00",
"to": "2023-02-12 23:59:59"
},
"total": 1
}
]
}
Get Clicks Report
GET /v2/partners/affiliates/reports/clicks
- get clicks report for the Affiliate activity over time (up to last 12 months)
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- required - get report from a given datedate_to
- required - get report up to a given dateaggregation
- required - get report aggregated by a given timespan (one of:day
,week
,month
)product
- get report for a given product (one of:livechat
,chatbot
,helpdesk
,all
; default:all
)
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/reports/clicks?date_from=2023-03-25T00:00:00Z&date_to=2023-03-26T23:59:59Z&aggregation=day&product=all \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"items": [
{
"date_range": {
"from": "2023-03-25 00:00:00",
"to": "2023-03-25 23:59:59"
},
"total": 0
},
{
"date_range": {
"from": "2023-03-26 00:00:00",
"to": "2023-03-26 23:59:59"
},
"total": 1
}
]
}
Get Licenses By Status
GET /v2/partners/partners/affiliates/licenses/<status>
- get affiliate licenses of a certain status
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<status>
- required - license status (trial
,paid
orexpired
)
Query Parameters
date_from
- required - get licenses from a given datedate_to
- required - get licenses up to a given datelimit
- get certain amount of licenses in response (min. 1 , max. 15 - default)next cursor
- cursor for fetching next batch of licenses
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/licenses/paid?date_from=2022-01-01&date_to=2022-12-01&limit=1 \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"results": [
{
"campaign": "",
"status": "paid",
"product": "livechat",
"commission": 10,
"earnings": 357.5,
"creation_timestamp": "2022-10-06 13:40:46",
"conversion_timestamp": "2022-10-20 13:41:55",
"expiration_timestamp": "2023-10-20 11:40:45"
}
],
"next_cursor": "MjAyMi0wOC0zMCAxMzowNjozNg=="
}
Get Campaigns Earnings Metric
GET /v2/partners/affiliates/campaigns/<campaign_id>/metrics/earnings
- get affiliate campaign earnings metric
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<campaign_id>
- required - campaign ID
Query Parameters
date_from
- get earnings metrics from a given datedate_to
- get earnings metrics up to a given datebilling_cycle
- required - billing cycle,monthly
orannual
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns/123/metrics/earnings?date_from=2022-01-01&date_to=2022-12-01&billing_cycle=annual \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"value": 37.21
}
Get Campaigns Earnings Report
GET /v2/partners/affiliates/campaigns/<campaign_id>/reports/earnings
- get affiliate campaign earnings report
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<campaign_id>
- required - campaign ID
Query Parameters
date_from
- get earnings metrics from a given datedate_to
- get earnings metrics up to a given datebilling_cycle
- required - billing cycle,monthly
orannual
aggregation
- required - get report aggregated by a given timespan (one of:day
,week
,month
)
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns/123/reports/earnings?date_from=2022-01-01&date_to=2022-12-01&billing_cycle=annua&aggregation=month \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"items": [
{
"date_range": {
"from": "2022-03-01 00:00:00",
"to": "2022-03-31 23:59:59"
},
"total": 12
},
{
"date_range": {
"from": "2022-04-01 00:00:00",
"to": "2022-04-30 23:59:59"
},
"total": 34
},
{
"date_range": {
"from": "2022-05-01 00:00:00",
"to": "2022-05-31 23:59:59"
},
"total": 56
}
]
}
Get Campaigns Summary
GET /v2/partners/affiliates/campaigns/<campaign_id>/summary
- get affiliate campaigns summary
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<campaign_id>
- required - campaign ID
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns/123/summary \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"click": 21,
"trial": 37,
"paid": 42,
"earnings": 3127.00
}
Get Best Performing Campaigns Clicks Report
GET /v2/partners/affiliates/campaigns/best-performing/reports/clicks
- get clicks report for a given number of Best Performing campaigns
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
limit
- number of campaigns to returndate_from
- get clicks report from a given datedate_to
- get clicks report up to a given date
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns/best-performing/reports/clicks?limit=2&date_from=2022-01-01T10:10:10Z&date_to=2022-12-01T10:10:10Z \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"items": [
{
"id": 123,
"name": "campaign_123",
"value": 300,
"product": "chatbot"
},
{
"id": 456,
"name": "campaign_456",
"value": 400,
"product": "livechat"
},
]
}
Get Best Performing Campaigns Trials Report
GET /v2/partners/affiliates/campaigns/best-performing/reports/trials
- get trials report for a given number of Best Performing campaigns
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
limit
- number of campaigns to returndate_from
- get trials report from a given datedate_to
- get trials report up to a given date
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns/best-performing/reports/trials?limit=2&date_from=2022-01-01T10:10:10Z&date_to=2022-12-01T10:10:10Z \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"items": [
{
"id": 123,
"name": "campaign_123",
"value": 300,
"product": "chatbot"
},
{
"id": 456,
"name": "campaign_456",
"value": 400,
"product": "livechat"
},
]
}
Get Best Performing Campaigns Conversions Report
GET /v2/partners/affiliates/campaigns/best-performing/reports/conversions
- get conversions report for a given number of Best Performing campaigns
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
limit
- number of campaigns to returndate_from
- get conversions report from a given datedate_to
- get conversions report up to a given date
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns/best-performing/reports/conversions?limit=2&date_from=2022-01-01T10:10:10Z&date_to=2022-12-01T10:10:10Z \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"items": [
{
"id": 123,
"name": "campaign_123",
"value": 300,
"product": "chatbot"
},
{
"id": 456,
"name": "campaign_456",
"value": 400,
"product": "livechat"
},
]
}
Get Best Performing Campaigns Earnings Report
GET /v2/partners/affiliates/campaigns/best-performing/reports/conversions
- get earnings report for a given number of Best Performing campaigns
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
limit
- number of campaigns to returndate_from
- get earnings report from a given datedate_to
- get earnings report up to a given date
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns/best-performing/reports/earnings?limit=2&date_from=2022-01-01T10:10:10Z&date_to=2022-12-01T10:10:10Z \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"items": [
{
"id": 123,
"name": "campaign_123",
"value": 300.10,
"product": "chatbot"
},
{
"id": 456,
"name": "campaign_456",
"value": 400.10,
"product": "livechat"
},
]
}
Get Best Performing Campaigns Clicks Metrics
GET /v2/partners/affiliates/campaigns/best-performing/metrics/clicks
- get summarized number of clicks generated from a given number of Best Performing campaigns
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
limit
- number of campaigns to returndate_from
- get clicks metrics from a given datedate_to
- get clicks metrics up to a given date
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns/best-performing/metrics/clicks?limit=2&date_from=2022-01-01T10:10:10Z&date_to=2022-12-01T10:10:10Z \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"value": 123
}
Get Best Performing Campaigns Trials Metrics
GET /v2/partners/affiliates/campaigns/best-performing/metrics/trials
- get summarized number of trials generated from a given number of Best Performing campaigns
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
limit
- number of campaigns to returndate_from
- get trials metrics from a given datedate_to
- get trials metrics up to a given date
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns/best-performing/metrics/trials?limit=2&date_from=2022-01-01T10:10:10Z&date_to=2022-12-01T10:10:10Z \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"value": 123
}
Get Best Performing Campaigns Conversions Metrics
GET /v2/partners/affiliates/campaigns/best-performing/metrics/conversions
- get summarized number of trials converted into paid licenses generated from a given number of Best Performing campaigns
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
limit
- number of campaigns to returndate_from
- get conversions metrics from a given datedate_to
- get conversions metrics up to a given date
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns/best-performing/metrics/conversions?limit=2&date_from=2022-01-01T10:10:10Z&date_to=2022-12-01T10:10:10Z \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"value": 123
}
Get Best Performing Campaigns Earnings Metrics
GET /v2/partners/affiliates/campaigns/best-performing/metrics/earnings
- get summarized earnings generated from a given number of Best Performing campaigns
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
limit
- number of campaigns to returndate_from
- get earnings metrics from a given datedate_to
- get earnings metrics up to a given date
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/campaigns/best-performing/metrics/earnings?limit=2&date_from=2022-01-01T10:10:10Z&date_to=2022-12-01T10:10:10Z \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"value": 123.00
}
Get Summary
GET /v2/partners/affiliates/summary
- get a number of trial affiliate licenses, paid affiliate licenses, and expired affiliate licenses
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see example401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/affiliates/summary \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"trials": 0,
"paid": 0,
"expired": 0
}
Solution Partner
- Create License
- Get Solution Licenses
- Get Solution Licenses by Status
- Get Solution Licenses Report
- Get Solution Licenses CSV Report
- Get License Details
- Update License Details
- Get License Operators
- Invite License Operators
- Get License's Invoices
- Get License's Invoice PDF
- Create Subscription
- Update Subscription
- Close Subscription
- Update License Billing
- Transfer License
- Get Recurly Token
- Get License Metrics
- Get Leads
- Get Lead Details
- Get Lead History
- Submit Lead
- Get Solution Summary
Create License
POST /v2/partners/solutions/licenses
- create a new license for a client
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
product
- required - product (livechat
orchatbot
)
Body
client_name
- required - client's full name (min. 5 characters)client_email
- required - client's email address- [only for
livechat
product]payment_origin
- required - who would manage subscription:client
orpartner
(you) purchase_order
- a custom parameter- [only for
livechat
product]data_center
- database location:dal
(USA) orfra
(EU) - [only for
livechat
product]trial_duration
- only for theclient
payment origin - the number of days of a trial period (min. 14 - default, max. 60) - [only for
livechat
product]coupon_id
- only for theclient
payment origin - the ID of the coupon assigned to a Partner (will apply a discount)
Response
201 - Created
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header403 - Forbidden
- not allowed to use the givencoupon_id
409 - Conflict
- the givenclient_email
already has a license for the specifiedproduct
{
"license": "123",
"product": "livechat",
"creation_timestamp": "2020-02-11 13:18:53",
"end_timestamp": "2020-02-25 13:18:53",
"client_name": "Joe Doe",
"client_email": "joe@example.com",
"cc_added": false,
"paid": false,
"payment_origin": "partner",
"status": "trial"
}
Get Solution Licenses
GET /v2/partners/solutions/licenses
- get the list of licenses
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- get a report for licenses created from a given datedate_to
- get a report for licenses created up to a given date
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see the example on the right400 - Bad Request
- incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/solutions/licenses \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"result": [
{
"license": "123",
"product": "livechat",
"client_name": "Joe Doe",
"client_email": "joe@example.com",
"creation_timestamp": "2023-02-14 12:39:40",
"end_timestamp": "2023-06-14 12:39:40",
"cc_added": false,
"paid": false,
"payment_origin": "partner",
"status": "trial"
},
{
"license": "789",
"product": "chatbot",
"client_name": "John Doe",
"client_email": "john@example.com",
"creation_timestamp": "2023-05-21 07:39:11",
"end_timestamp": "2024-05-21 07:39:11",
"cc_added": true,
"paid": true,
"payment_origin": "client",
"status": "paid"
}
]
}
Get Solution Licenses by Status
GET /v2/partners/solutions/licenses/<status>
- get the list of licenses by status
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<status>
- required - license status, one of:paid
,trial
,expired
Query Parameters
date_from
- required - get a report for licenses created from a given datedate_to
- required - get a report for licenses created up to a given datelimit
- the amount of licenses in response (min: 1, max: 15, default: 15)next_cursor
- a next page token received from the previous request's response
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see the example below400 - Bad Request
- incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/solutions/licenses/paid \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"results": [
{
"license_id": "123",
"status": "paid",
"product": "livechat",
"client_name": "Joe Doe",
"client_email": "joe@example.com",
"payment_origin": "partner",
"creation_timestamp": "2023-02-14 12:39:40",
"conversion_timestamp": "2023-03-01 07:51:11",
"expiration_timestamp": "2023-03-14 11:19:25"
},
{
"license_id": "456",
"status": "paid",
"product": "chatbot",
"client_name": "Joe Doe",
"client_email": "joe@example.com",
"payment_origin": "client",
"creation_timestamp": "2022-03-29 17:11:43",
"conversion_timestamp": "2022-04-11 05:10:00",
"expiration_timestamp": "2023-04-11 05:10:00"
}
],
"next_cursor": "MDAwMS0wMS0wMSAwMDowMDowMA=="
}
Get License Details
GET /v2/partners/solutions/licenses/<product>/<license_id>
- get the license details
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<product>
- required - product (livechat
orchatbot
)<license_id>
- required - license ID
Response
200 - OK
- success, see the example on the right400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header404 - Not Found
- license not found
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/solutions/licenses/livechat/123 \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"license": "123",
"client_name": "Joe Doe",
"client_email": "joe@example.com",
"purchase_order": "Test license",
"payment_origin": "partner",
"creation_timestamp": "2018-03-06 12:59:13",
"end_timestamp": "2018-04-05 11:59:12",
"conversations": 0,
"conversations_last_30_days": 0,
"cc_added": false,
"paid": false,
"ql": false,
"seats": 100,
"plan": "team",
"billing_cycle": "monthly",
"total_discount": 0,
"discount_percent": 20,
"total_commission": 0,
"commission_percent": 0,
"data_center": "dal",
"status": "expired",
"invited_agents": [
{
email: "jane@example.com"
}
]
}
Update License Details
PUT /v2/partners/solutions/licenses/<product>/<license_id>
- update the license details
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<product>
- required - product (livechat
orchatbot
)<license_id>
- required - license ID
Body
client_name
- client's full name (min. 5 characters)purchase_order
- a custom parameter
Response
204 - No Content
- success400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header404 - Not Found
- license not found
EXAMPLE REQUEST
curl --request PUT \
--url https://api.livechatinc.com/v2/solutions/licenses/livechat/123 \
--header 'Authorization: Bearer <YOUR_API_TOKEN>' \
--data 'client_name=Jane Doe'
Get License Operators
GET /v2/partners/solutions/licenses/<product>/<license_id>/operators
- get the list of a license's operators
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<product>
- required - product (livechat
orchatbot
)<license_id>
- required - license ID
Response
200 - OK
- success, see the example on the right400 - Bad Request
- missing or incorrectlicense_id
parameter401 - Unauthorized
- a missing or incorrect authorization header404 - Not Found
- license not found
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/solutions/licenses/livechat/123/operators \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"result": [
{
"login": "joe@doe.com",
"name": "Joe",
"permission": "owner"
},
{
"login": "jane@doe.com",
"name": "Jane",
"permission": "agent"
}
]
}
Invite License Operators
POST /v2/partners/solutions/licenses/<product>/<license_id>/operators
- invite operators to a license
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<product>
- required - product (livechat
orchatbot
)<license_id>
- required - license ID
Body
operators
- required - the list of the users you want to invite to the license.
Struct of user object:
email
- required - user emailrole
- required -administrator
oragent
(learn more about the roles)
Response
200 - OK
- success (could be partial, check thestatus_code
of each user in the response body), see the example on the right400 - Bad Request
- missing or incorrectlicense_id
parameter401 - Unauthorized
- a missing or incorrect authorization header403 - Forbidden
- Partner does not manage a subscription404 - Not Found
- license not found
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/solutions/licenses/livechat/123/operators \
--header 'Authorization: Bearer <YOUR_API_TOKEN>' \
--data '{
"operators": [
{
"email": "joe@example.com",
"role": "agent"
},
{
"email": "jane@example.com",
"role": "administrator"
}
]
}'
{
"result": [
{
"operator": "joe@example.com",
"status_code": 200 // all good, invitation was sent
},
{
"operator": "jane@example.com",
"status_code": 400 // email is already taken
}
]
}
Get License's Invoices
GET /v2/partners/solutions/licenses/<license_id>/invoices
- get invoices for a given license
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<license_id>
- required - license ID
Response
200 - OK
- success, see the example on the right400 - Bad Request
- missing or incorrectlicense_id
parameter401 - Unauthorized
- a missing or incorrect authorization header404 - Not Found
- license not found
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/solutions/licenses/321/invoices \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"result": [
{
"invoice_no": 123,
"date": "2018-03-03 09:38:33",
"plan": "team",
"seats": 10,
"billing_cycle": "monthly",
"amount": 312,
"status": "paid"
},
{
"invoice_no": 122,
"date": "2018-02-01 09:18:13",
"plan": "team",
"seats": 10,
"billing_cycle": "monthly",
"amount": 312,
"status": "paid"
}
]
}
Get License's Invoice PDF
GET /v2/partners/solutions/licenses/<license_id>/invoices/<invoice_no>
- get a PDF invoice
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<license_id>
- required - license ID<invoice_no>
- required - invoice number
Response
200 - OK
- PDF file (Content-Type: application/pdf
)400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header404 - Not Found
- license or invoice not found
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/solutions/licenses/321/invoices/123 \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
Create Subscription
POST /v2/partners/solutions/licenses/<product>/<license_id>/subscription
- create a new subscription for a license
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<product>
- required - product (livechat
orchatbot
)<license_id>
- required - license ID
Body
token
- required - Recurly token (get it here)plan
- required - sales plan, one of:starter
,team
,business
billing_cycle
- required - billing cycle,monthly
orannual
seats
- required - the number of seats
Response
201 - Created
- success400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header404 - Not Found
- license not found409 - Conflict
- subscription already exists
Update Subscription
PUT /v2/partners/solutions/licenses/<product>/<license_id>/subscription
- update a subscription for a license
Headers
<product>
- required - product (livechat
orchatbot
)Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<license_id>
- required - license ID
Body
plan
- required - sales plan, one of:starter
,team
,business
billing_cycle
- required - billing cycle:monthly
orannual
seats
- required - the number of seats
Response
204 - No Content
- success400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header404 - Not Found
- license not found409 - Conflict
- subscription doesn't exist
Close Subscription
DELETE /v2/partners/solutions/licenses/<product>/<license_id>/subscription
- close a subscription for a license
Headers
<product>
- required - product (livechat
orchatbot
)Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<license_id>
- required - license ID
Body
password
- required - your password in Partner Programexpire
-boolean
value (default:false
). When closing a subscription, your license will expire at the end of its billing cycle. To make your subscription expire immediately, set theexpire
param totrue
.
Response
204 - No Content
- success400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header403 - Forbidden
- password is incorrect404 - Not Found
- license not found
Update License Billing
PUT /v2/partners/solutions/licenses/<product>/<license_id>/billing
- update the subscription billing information for a license
Headers
<product>
- required - product (livechat
orchatbot
)Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<license_id>
- required - license ID
Body
token
- required - Recurly token (get it here)
Response
204 - No Content
- success400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header404 - Not Found
- license not found
Transfer License
POST /v2/partners/solutions/licenses/<product>/<license_id>/transfer
- transfer a license to the client
Headers
<product>
- required - product (livechat
orchatbot
)Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
<license_id>
- required - license ID
Body
new_owner
- required - the new owner's email (one of operators)password
- required - your password in Partner Program
Response
200 - OK
- success, see the example on the right400 - Bad Request
- missing or incorrect parameter401 - Unauthorized
- a missing or incorrect authorization header403 - Forbidden
- incorrect password or license type404 - Not Found
- license not found
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/solutions/licenses/transfer \
--data 'new_owner=joe@doe.com&password=mysecretpassword' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"license": "987",
"client_name": "Joe Doe",
"client_email": "joe@example.com",
"purchase_order": "Test license",
"payment_origin": "client",
"creation_timestamp": "2018-03-06 12:59:13",
"end_timestamp": "2019-04-05 11:59:12",
"conversations": 0,
"conversations_last_30_days": 0,
"cc_added": false,
"paid": true,
"recurrent": false,
"seats": 100,
"plan": "team",
"billing_cycle": "monthly",
"total_discount": 4148,
"discount_percent": 20,
"total_commission": 0,
"commission_percent": 0,
"expired": false,
"blocked": false,
"data_center": "dal"
}
Get Recurly Token
GET https://api.recurly.com/js/v1/token
- get the token from Recurly. The token is required when creating a new subscription or updating an existing one with the new billing info.
Parameters
key
- required - public key (ewr1-QCXZap10wOSm13fxI4u5Jt
)first_name
- required - first namelast_name
- required - last namenumber
- required - credit card numbermonth
- required - credit card expiration month (format:MM
)year
- required - credit card expiration year (format:YYYY
)verification_value
- required - CVV codeaddress1
- required - addresscity
- required - citystate
- required - statezip
- required - ZIP/Postal codecountry
- required - country code, one of these
Response
200 - OK
- success, see the example on the right- everything else - missing or incorrect parameters (please read the error message)
{
"id": "C12ibIjbXbqSAhKjxQWERTY"
}
Get License Metrics
GET /v2/partners/solutions/licenses/count
- get number of trials, paid licenses, and expired licenses from the Solution program.
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- get trials metrics from a given datedate_to
- get trials metrics up to a given date
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see example400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/solutions/licenses/count?date_from=2022-09-01&date_to=2023-08-31 \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"trials": 150,
"paid": 16,
"expired": 147
}
Get Solution Licenses Report
GET /v2/partners/solutions/reports/license
- get report for licenses by license status.
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
date_from
- required - get report from a given datedate_to
- required - get report up to a given dateaggregation
- required - get report aggregated by a given timespan (one of:day
,week
,month
)license_status
- get report for a given licenses status (one of:trial
,paid
,expired
)
Note: Date format: YYYY-MM-DDTHH:mm:ssZ
Response
200 - OK
- success, see the example below400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/solutions/reports/license?aggregation=month&date_from=2022-03-25T00:00:00Z&date_to=2022-05-04T00:00:00Z&license_status=paid \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"items": [
{
"date_range": {
"from": "2022-03-01 00:00:00",
"to": "2022-03-31 23:59:59"
},
"total": 12
},
{
"date_range": {
"from": "2022-04-01 00:00:00",
"to": "2022-04-30 23:59:59"
},
"total": 34
},
{
"date_range": {
"from": "2022-05-01 00:00:00",
"to": "2022-05-31 23:59:59"
},
"total": 56
}
]
}
Get Solution Licenses CSV Report
GET /v2/partners/solutions/licenses/search/csv
- get CSV report for licenses.
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Query Parameters
filters
- apply filters to narrow down the results (see below)
Note:
filters
is an array of objects, where each object has the following fields:field
- field name (one of:license_product
,license_status
,license_details
,license_created_at
,payment_origin
,credit_card
)operator
- operator (one of:equals
,contains
,exists
,greater_or_equal
,lesser_or_equal
)value
- field value
- for example:
filters=[{"field": "license_product", "operator": "equals", "value": "LiveChat"}, {"field": "credit_card", "operator": "exists", "value": "no"}]
Response
200 - OK
- success, returns the data in CSV format, see the example below400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/solutions/licenses/search/csv?filters=[{"field":"credit_card","value":"no","operator":"exists"},{"field":"payment_origin","value":"partner","operator":"equals"},{"field":"license_details","value":"Client Name","operator":"contains"},{"field":"license_created_at","value":"2023-11-01 00:00:00","operator":"greater_or_equal"}] \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
License ID,Managed by,Status,Client name,Client email,Client identifier,Created,Product,Credit card,Card problem,Commission level,Discount level,Total earnings,Total savings
ExampleLicenseID,partner,trial,Client Name,client@test.com,client-identifier,2024-01-22 08:53:53,HelpDesk,no,,0.00,20.00,0.00,0.00
Get Leads
GET /v2/partners/solutions/leads
- get partner leads
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example below400 - Bad Request
401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/solutions/leads \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"result": [
{
"lead_id": "123",
"company_name": "company-123",
"contact_email": "company-123@test.com",
"status": "new"
},
{
"lead_id": "456",
"company_name": "company-456",
"contact_email": "company-456@test.com",
"status": "new"
},
]
}
Get Lead Details
GET /v2/partners/solutions/leads/{leadID}
- get lead details
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
leadID
- lead ID
Response
200 - OK
- success, see the example below400 - Bad Request
401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/solutions/leads/123 \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"partner_id": "partner-id-123",
"external_lead_id": "123",
"status": "new",
"fee_amount": 0,
"company_name": "lead-company-name",
"contact_email": "contact@test.com",
"domain": "www.company-test-123.com",
"first_name": "name",
"last_name": "last name",
"region": "USA",
"job_title": "job title",
"phone_number": "123 456 789",
"description": "",
"updated_at": "2023-10-02 15:44:59"
}
Get Lead History
GET /v2/partners/solutions/leads/{leadID}/history
- get lead history
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Path Parameters
leadID
- lead ID
Response
200 - OK
- success, see the example below400 - Bad Request
401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
--url https://api.livechatinc.com/v2/partners/solutions/leads/123/history \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"result": [
{
"name": "lead_was_created",
"created_at": "2023-09-18 11:17:35"
}
]
}
Submit Lead
POST /v2/partners/solutions/leads
- submit lead
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Body
partner_name
- required - partner namepartner_email
- required - partner emailcompany_name
- required - lead company namecontact_email
- required - lead contact emaildomain
- required - domainfirst_name
- required - first namelast_name
- required - last nameregion
- regionjob_title
- job titlephone_number
- phone numberdescription
- descriptionsends_personal_introduction
-boolean
value, set totrue
to send personal introductionis_included_in_communication
-boolean
value, set totrue
to be included in communicationaccepts_requirements
- required -boolean
value, set totrue
to accept requirements
Response
200 - OK
- success, see the example below400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/solutions/leads \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"lead_id": "123"
}
Get Solution Summary
POST /v2/partners/solutions/summary
- get summary from Solution Program
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example below400 - Bad Request
- missing or incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request POST \
--url https://api.livechatinc.com/v2/partners/solutions/summary \
--header 'Authorization: Bearer <YOUR_API_TOKEN>'
{
"trials": "12"
"paid": "14"
"expired": "13"
"commission": "12.33"
"discount": "34.11"
}
Expert
- Upload Logo
- Create Expert Profile
- Get Expert Profile
- Update Expert Profile
- Get Comments
- Get Expert Stats
- Get Expert History
Upload Logo
POST /v2/partners/experts/profile/logo
- upload the Expert logo
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Body
.jpg
or.png
image, min. 350x350px, max. 1000x1000px - required
Response
200 - OK
- success, see the example on the right400 - Bad Request
- an incorrect file403 - Forbidden
- a missing or incorrect authorization token
{
"result": "https://cdn.example.com/expert-logo.png"
}
Create Expert Profile
POST /v2/partners/experts/profile
- create the Expert profile
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Body
company
- required - company name (min. 4 characters)phone
- required - phone numberdescription
- required - the description dispalyed in the profile details (min. 10 characters)short_description
- required - the description displayed in the Expert tile (min. 10 characters)country
- required - country code, one of thesewebsite
- required - website URLcategories
- required - an array of categories (codes); available categoriesprojects
- required - an array of projects (URLs)agents
- required if one of the categories isoutsourcing-customer-service
orlead-generation
- number of agents, accepted values:1-5
,6-15
,16-30
,31-50
,51+
languages
- required if one of the categories isoutsourcing-customer-service
orlead-generation
- an array of languages (codes); available languageshour_rate
- optional - minimum hourly rateproject_rate
- optional - minimum project ratefacebook
- optional - the URL to the Facebook pagetwitter
- optional - the URL to the Twitter pagelinkedin
- optional - the URL to the LinkedIn pagegoogleplus
- optional - the URL to the LinkedIn page
Response
201 - Created
400 - Bad Request
- incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header403 - Forbidden
- missing logo
Get Expert Profile
GET /v2/partners/experts/profile
- get the Expert profile details
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example on the right403 - Forbidden
- Partner is not an Expert401 - Unauthorized
- a missing or incorrect authorization header
{
"expert_id": "acme",
"status": "verified",
"company": "ACME",
"phone": "123456789",
"logo": "https://cdn.example.com/expert-logo.png",
"description": "long description goes here",
"short_description": "short description (visible in Marketplace tile)",
"agents": "5+",
"hour_rate": "50",
"project_rate": "500",
"country": "US",
"website": "https://partners.livechatinc.com",
"facebook": "",
"twitter": "https://twitter/LiveChatProgram",
"linkedin": "",
"googleplus": "",
"categories": [
"api-and-integrations",
"chat-customization",
"chat-strategy-consultancy"
],
"languages": ["EN", "ES", "PL"],
"projects": ["https://example.com"]
}
Update Expert Profile
PUT /v2/partners/experts/profile
- update the Expert profile details
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Body
company
- required - company name (min. 4 characters)phone
- required - phone numberdescription
- required - the description displayed in profile details (min. 10 characters)short_description
- required - the description displayed in Expert tile (min. 10 characters)country
- required - country code, one of thesewebsite
- required - website URLcategories
- required - array of categories (codes); available categoriesprojects
- required - array of projects (URLs)agents
- required if one of the categories isoutsourcing-customer-service
orlead-generation
- number of agents, accepted values:1-5
,6-15
,16-30
,31-50
,51+
languages
- required if one of the categories isoutsourcing-customer-service
orlead-generation
- an array of languages (codes); available languageshour_rate
- optional - minimum hourly rateproject_rate
- optional - minimum project ratefacebook
- optional - the URL to the Facebook pagetwitter
- optional - the URL to the Twitter pagelinkedin
- optional - the URL to the LinkedIn pagegoogleplus
- optional - the URL to the LinkedIn page
Response
204 - No Content
400 - Bad Request
- incorrect parameters401 - Unauthorized
- a missing or incorrect authorization header403 - Forbidden
- missing logo
Get Comments
GET /v2/partners/experts/comments
- get comments on the Expert profile
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example on the right401 - Unauthorized
- a missing or incorrect authorization header403 - Forbidden
- Partner is not an Expert
{
"result": [
{
"comment": "This Expert provides a valuable tool to any online business. Very impressed with the speed at which chats are answered and the professional yet personal touch with which they approach each chat.",
"author": "Joe",
"creation_timestamp": "2018-03-06 10:21:50",
"website": "https://example.com"
},
{
"comment": "Great company and great people. They have helped train the team and get the most out of the chat system. Inbounds have increased and process has improved. The product itself is very easy to use. A brilliant service end to end.",
"author": "Jane",
"creation_timestamp": "2018-02-22 13:32:28",
"website": ""
}
]
}
Get Expert Stats
GET /v2/partners/experts/stats
- get stats (Experts Marketplace position, number of comments and messages) for Expert profile
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example on the right401 - Unauthorized
- a missing or incorrect authorization header403 - Forbidden
- Partner is not an Expert
{
"position": 1,
"comments": 18,
"messages": 132
}
Get Expert History
GET /v2/partners/experts/history
- get historical stats for the Expert profile views (up to last 12 months)
Headers
Authorization
- required -Bearer <YOUR_API_TOKEN>
Response
200 - OK
- success, see the example on the right401 - Unauthorized
- a missing or incorrect authorization header403 - Forbidden
- Partner is not an Expert
{
"result": [
{
"date": "2018-03",
"profile_views": 123
},
{
"date": "2018-02",
"profile_views": 212
},
{
"date": "2018-01",
"profile_views": 286
}
]
}