Partner Program API

8 minutes reading time • last modified 12/05/2019

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.

API URL

https://api.livechatinc.com

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.

Run in Postman

Account

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 right
  • 401 - 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>'
EXAMPLE RESPONSE - 200
{
  "partner_id": "xyz",
  "login": "joe@email.com",
  "first_name": "Joe",
  "last_name": "Doe",
  "contact_name": "Jane Doe",
  "contact_email": "jane@email.com",
  "send_monthly_summary": true,
  "send_newsletter": true,
  "send_notifications": true,
  "send_reseller_weekly_summary": true,
  "affiliate": {
	"livechat": {
	  "url": "https://www.livechatinc.com/?a=xyz&utm_source=PP",
      "short_url": "https://lc.chat/zxc",
      "current_commission": {
        "percent": 20,
        "end_timestamp": ""
      }
	},
	"chatbot": {
	  "url": "https://www.chatbot.com/?a=xyz&utm_source=PP",
      "short_url": "https://lc.chat/zxcv",
      "current_commission": {
        "percent": 20,
        "end_timestamp": ""
      }
	},
	"partner_program": {
	  "url": "https://www.partners.livechatinc.com/?a=xyz&utm_source=PP",
      "short_url": "https://lc.chat/zxcvb",
      "current_commission": {
        "percent": 20,
        "end_timestamp": ""
      }
	}
  },
  "solution": {
    "current_discount": {
      "percent": 20,
      "end_timestamp": ""
    }
  },
  "expert": {
	"status": "verified",
    "marketplace_position": 1
  },
  "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 name
  • last_name - required - last name
  • contact_name - required - contact name
  • contact_email - required - contact email
  • send_monthly_summary - boolean value
  • send_reseller_weekly_summary - boolean value
  • send_newsletter - boolean value
  • send_notifications - boolean value
Response
  • 204 - No Content - success
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - 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 right
  • 401 - 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>'
EXAMPLE RESPONSE - 200
{
  "affiliate": {
    "livechat": {
	  "trials": 120,
	  "trials_cc": 38,
	  "paid": 41
	},
	"chatbot": {
	  "trials": 96,
	  "trials_cc": 52,
	  "paid": 34
	},
	"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
	}
  }
}

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 right
  • 401 - 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>'
EXAMPLE RESPONSE - 200
{
  "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 right
  • 401 - 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>'
EXAMPLE RESPONSE - 200
{
  "balance": 2552,
  "blocked": 0,
  "commission_total": 16098,
  "commission_last_30_days": 0,
  "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": 0,
    "commission_last_30_days": 0,
    "livechat": {
      "discount": 45943.76,
      "commission_total": 0,
      "commission_last_30_days": 0
    }
  }
}

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 right
  • 401 - 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>'
EXAMPLE RESPONSE - 200
{
  "company": "Awesome Company",
  "vat": "123",
  "address": "Wall Street 123",
  "city": "New York",
  "zip_code": "10005",
  "country": "US",
  "paypal": "paypal@email.com",
  "type": "business"
}

Update Billing

PUT /v2/partners/billing - update billing information

Headers
  • Authorization - required - Bearer <YOUR_API_TOKEN>
Body
  • type - required - business or individual
  • company - required - company name (if business) or full name (if individual)
  • address - required
  • city - required
  • country - required - country code, one of these
  • paypal - required - PayPal login (email)
  • zip_code - ZIP / Postal code
  • vat - VAT
Response
  • 204 - No Content - success
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - 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 example
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 403 - 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>'
EXAMPLE RESPONSE - 201
{
  "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 date
  • date_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 right
  • 400 - Bad Request - incorrect parameters
  • 401 - 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>'
EXAMPLE RESPONSE - 200
{
  "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 example
  • 400 - Bad Request - incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 409 - 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>'
EXAMPLE RESPONSE - 201
{
  "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 right
  • 400 - Bad Request - incorrect parameters
  • 401 - 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>'
EXAMPLE RESPONSE - 200
{
  "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 - success
  • 400 - Bad Request - incorrect parameters
  • 401 - 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

POST /v2/partners/affiliates/campaigns - create a new campaign

Headers
  • Authorization - required - Bearer <YOUR_API_TOKEN>
Query Parameters
  • product - required - product (livechat, chatbot or partner_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 the livechat product - the number of days of a trial period (min. 14 - default, max. 60)
  • coupon_id - only for the livechat product - the ID of the coupon assigned to a Partner (a discount will be applied)
Response
  • 201 - Created - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 403 - Forbidden - not allowed to use the given coupon_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.livechatinc.com/features/&trial_duration=45&coupon_id=1' \
	--header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 201
{
  "product": "livechat",
  "name": "New campaign",
  "slug": "pp_new-campaign",
  "url": "https://www.livechatinc.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": 45,
  "discount": "$25 discount",
}

// Note - `slug` is a URL-friendly campaign name with `pp_` prefix

Get Campaigns

GET /v2/partners/affiliates/campaigns - get campaigns

Headers
  • Authorization - required - Bearer <YOUR_API_TOKEN>
Query Parameters
  • state - active (default) or disabled
Response
  • 200 - OK - success, see the example on the right
  • 401 - 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>'
EXAMPLE RESPONSE - 200
{
  "result": [
    {
	  "active": true,
	  "product": "livechat",
      "name": "Hello World!",
      "slug": "pp_hello-world",
      "url": "https://www.livechatinc.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 - disable a campaign

Query Parameters
  • product - required - product (livechat, chatbot or partner_program itself)
  • slug - required - campaign slug
Headers
  • Authorization - required - Bearer <YOUR_API_TOKEN>
Response
  • 204 - No Content - success
  • 400 - Bad Request - incorrect parameter
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 403 - 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?product=livechat&slug=pp_hello-world \
	--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 date
  • date_to - get licenses created up to a given date

Note: Date format: YYYY-MM-DD

Response
  • 200 - OK - success, see the example on the right
  • 400 - Bad Request - incorrect parameters
  • 401 - 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>'
EXAMPLE RESPONSE - 200
{
  "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 date
  • date_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 right
  • 400 - Bad Request - incorrect parameters
  • 401 - 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>'
EXAMPLE RESPONSE - 200
{
  "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 right
  • 401 - 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>'
EXAMPLE RESPONSE - 200
{
  "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 History

GET /v2/partners/affiliates/history - get historical stats for the Affiliate's activity (up to last 12 months)

Headers
  • Authorization - required - Bearer <YOUR_API_TOKEN>
Response
  • 200 - OK - success, see the example on the right
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
	--url https://api.livechatinc.com/v2/partners/affiliates/history \
	--header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
{
  "livechat": [
    {
      "date": "2019-10",
      "clicks": 414,
      "trials": 38,
      "paid": 12,
      "earnings": 2459.8
    },
    {
      "date": "2019-09",
      "clicks": 313,
      "trials": 27,
      "paid": 13,
      "earnings": 2971.1
    }
  ],
  "chatbot": [
    {
      "date": "2019-10",
      "clicks": 105,
      "trials": 12,
      "paid": 9,
      "earnings": 591.55
    },
    {
      "date": "2019-09",
      "clicks": 91,
      "trials": 8,
      "paid": 6,
      "earnings": 481.1
    }
  ],
  "partner_program": [
    {
      "date": "2019-10",
      "clicks": 10,
      "partners_referred": 2,
      "earnings": 78
    },
    {
      "date": "2019-09",
      "clicks": 16,
      "partners_referred": 4,
      "earnings": 314.8
    }
  ]
}

Solution Partner

Create License

POST /v2/partners/solutions/licenses - create a new license for a client

Headers
  • Authorization - required - Bearer <YOUR_API_TOKEN>
Body
  • client_name - required - client's full name
  • client_email - required - client's email address
  • payment_origin - required - who would manage subscription: client or partner (you)
  • data_center - database location: dal (USA) or fra (EU)
  • purchase_order - a custom parameter
  • trial_duration - only for the client payment origin - the number of days of a trial period (min. 14 - default, max. 60)
  • coupon_id - only for the client payment origin - the ID of the coupon assigned to a Partner (will apply a discount)
Response
  • 201 - Created - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 403 - Forbidden - not allowed to use the given coupon_id
  • 409 - Conflict - the given client_email already has a LiveChat license
EXAMPLE RESPONSE - 201
{
  "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,
  "recurrent": false,
  "seats": 100,
  "plan": "team",
  "billing_cycle": "monthly",
  "total_discount": 0,
  "discount_percent": 20,
  "total_commission": 0,
  "commission_percent": 0,
  "expired": false,
  "blocked": false,
  "data_center": "dal"
}

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 date
  • date_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 right
  • 400 - Bad Request - incorrect parameters
  • 401 - 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>'
EXAMPLE RESPONSE - 200
{
  "result": [
    {
      "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,
      "recurrent": false,
      "seats": 100,
      "plan": "team",
      "billing_cycle": "monthly",
      "total_discount": 0,
      "discount_percent": 20,
      "total_commission": 0,
      "commission_percent": 0,
      "expired": false,
      "blocked": false,
      "data_center": "dal"
    }
  ]
}

Get License Details

GET /v2/partners/solutions/licenses/<license_id> - get the license details

Headers
  • Authorization - required - Bearer <YOUR_API_TOKEN>
Path Parameters
  • <license_id> - required - license ID
Response
  • 200 - OK - success, see the example on the right
  • 400 - Bad Request - missing or incorrect license_id parameter
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 404 - Not Found - license not found
EXAMPLE REQUEST
curl --request GET \
	--url https://api.livechatinc.com/v2/partners/solutions/licenses/123 \
	--header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
{
  "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,
  "recurrent": false,
  "seats": 100,
  "plan": "team",
  "billing_cycle": "monthly",
  "total_discount": 0,
  "discount_percent": 20,
  "total_commission": 0,
  "commission_percent": 0,
  "expired": false,
  "blocked": false,
  "data_center": "dal"
}

Get License Operators

GET /v2/partners/solutions/licenses/<license_id>/operators - get the list of operators

Headers
  • Authorization - required - Bearer <YOUR_API_TOKEN>
Path Parameters
  • <license_id> - required - license ID
Response
  • 200 - OK - success, see the example on the right
  • 400 - Bad Request - missing or incorrect license_id parameter
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 404 - Not Found - license not found
EXAMPLE REQUEST
curl --request GET \
	--url https://api.livechatinc.com/v2/partners/solutions/licenses/123/operators \
	--header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
{
  "result": [
    {
      "login": "joe@doe.com",
	  "name": "Joe",
	  "permission": "owner"
	},
	{
      "login": "jane@doe.com",
	  "name": "Jane",
	  "permission": "agent"
	}
  ]
}

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 right
  • 400 - Bad Request - missing or incorrect license_id parameter
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 404 - 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>'
EXAMPLE RESPONSE - 200
{
  "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 parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 404 - 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>'

Get Solution History

GET /v2/partners/solutions/history - get historical stats for the Solution Partner's activity (up to last 12 months)

Headers
  • Authorization - required - Bearer <YOUR_API_TOKEN>
Response
  • 200 - OK - success, see the example on the right
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
curl --request GET \
	--url https://api.livechatinc.com/v2/partners/solutions/history \
	--header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
{
  "result": [
    {
      "date": "2018-03",
      "trials": 41,
      "paid": 27,
	  "commission": 3121.3
    },
    {
      "date": "2018-02",
      "trials": 35,
      "paid": 38
	  "commission": 4172.62
    },
    {
      "date": "2018-01",
      "trials": 29,
      "paid": 48
	  "commission": 6216.9
    }
  ]
}

Create Subscription

POST /v2/partners/solutions/licenses/<license_id>/subscription - create a new subscription

Headers
  • Authorization - required - Bearer <YOUR_API_TOKEN>
Path Parameters
  • <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 or annual
  • seats - required - the number of seats
Response
  • 201 - Created - success
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 404 - Not Found - license not found
  • 409 - Conflict - subscription already exists

Update Subscription

PUT /v2/partners/solutions/licenses/<license_id>/subscription - update a subscription

Headers
  • 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 or annual
  • seats - required - the number of seats
Response
  • 204 - No Content - success
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 404 - Not Found - license not found
  • 409 - Conflict - subscription doesn't exist

Close Subscription

DELETE /v2/partners/solutions/licenses/<license_id>/subscription - close a subscription

Headers
  • Authorization - required - Bearer <YOUR_API_TOKEN>
Path Parameters
  • <license_id> - required - license ID
Body
  • password - required - your password in Partner Program
  • expire - 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 the expire param to true.
Response
  • 204 - No Content - success
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 403 - Forbidden - password is incorrect
  • 404 - Not Found - license not found

Update License Billing

PUT /v2/partners/solutions/licenses/<license_id>/billing - update the subscription billing information

Headers
  • Authorization - required - Bearer <YOUR_API_TOKEN>
Path Parameters
  • <license_id> - required - license ID
Body
Response
  • 204 - No Content - success
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 404 - Not Found - license not found

Transfer License

POST /v2/partners/solutions/licenses/<license_id>/transfer - transfer a license to the client

Headers
  • 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 right
  • 400 - Bad Request - missing or incorrect parameter
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 403 - Forbidden - incorrect password or license type
  • 404 - 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>'
EXAMPLE RESPONSE - 200
{
  "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 name
  • last_name - required - last name
  • number - required - credit card number
  • month - required - credit card expiration month (format: MM)
  • year - required - credit card expiration year (format: YYYY)
  • verification_value - required - CVV code
  • address1 - required - address
  • city - required - city
  • state - required - state
  • zip - required - ZIP/Postal code
  • country - 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)
EXAMPLE RESPONSE - 200
{
  "id": "C12ibIjbXbqSAhKjxQWERTY"
}

Expert

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 right
  • 400 - Bad Request - an incorrect file
  • 403 - Forbidden - a missing or incorrect authorization token
EXAMPLE RESPONSE - 200
{
  "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 number
  • description - 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 these
  • website - required - website URL
  • categories - required - an array of categories (codes); available categories
  • projects - required - an array of projects (URLs)
  • agents - required if one of the categories is outsourcing-customer-service or lead-generation - number of agents, accepted values: 1-5, 6-15, 16-30, 31-50, 51+
  • languages - required if one of the categories is outsourcing-customer-service or lead-generation - an array of languages (codes); available languages
  • hour_rate - optional - minimum hourly rate
  • project_rate - optional - minimum project rate
  • facebook - optional - the URL to the Facebook page
  • twitter - optional - the URL to the Twitter page
  • linkedin - optional - the URL to the LinkedIn page
  • googleplus - optional - the URL to the LinkedIn page
Response
  • 201 - Created
  • 400 - Bad Request - incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 403 - 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 right
  • 403 - Forbidden - Partner is not an Expert
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE RESPONSE - 200
{
  "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 number
  • description - 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 these
  • website - required - website URL
  • categories - required - array of categories (codes); available categories
  • projects - required - array of projects (URLs)
  • agents - required if one of the categories is outsourcing-customer-service or lead-generation - number of agents, accepted values: 1-5, 6-15, 16-30, 31-50, 51+
  • languages - required if one of the categories is outsourcing-customer-service or lead-generation - an array of languages (codes); available languages
  • hour_rate - optional - minimum hourly rate
  • project_rate - optional - minimum project rate
  • facebook - optional - the URL to the Facebook page
  • twitter - optional - the URL to the Twitter page
  • linkedin - optional - the URL to the LinkedIn page
  • googleplus - optional - the URL to the LinkedIn page
Response
  • 204 - No Content
  • 400 - Bad Request - incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 403 - 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 right
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 403 - Forbidden - Partner is not an Expert
EXAMPLE RESPONSE - 200
{
  "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 right
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 403 - Forbidden - Partner is not an Expert
EXAMPLE RESPONSE - 200
{
  "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 right
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 403 - Forbidden - Partner is not an Expert
EXAMPLE RESPONSE - 200
{
  "result": [
    {
      "date": "2018-03",
      "profile_views": 123
    },
    {
      "date": "2018-02",
      "profile_views": 212
    },
    {
      "date": "2018-01",
      "profile_views": 286
    }
  ]
}