Platform
APIs & SDKs
Resources

...

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.

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
Copied!
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
Copied!
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
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 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
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/stats \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 right
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/coupons \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/earnings \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 date
  • date_to - required - get report up to a given date
  • filters - filters
  • aggregation - 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 value
    • operator - operator (equals)
  • for example: filters=[{"field": "prod", "value": "livechat", "operator": "equals"}]
Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 date
  • date_to - required - get report up to a given date
  • aggregation - 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 below
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 200
Copied!
{
    "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 right
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/billing \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 right
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/balance \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 date
  • date_to - get commission metric up to a given date
  • product - 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 example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 200
Copied!
{
  "value": 1232.12
}

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
  • state - State
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
Copied!
curl --request POST \
    --url https://api.livechatinc.com/v2/partners/withdrawals \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 201
Copied!
{
  "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
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/withdrawals \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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
Copied!
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
Copied!
{
  "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
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/tokens \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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
Copied!
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. 30)
  • 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
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
  "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 number
  • state - required - state (active or archived)
  • 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 value
    • operator - operator (one of: equals, contains)
  • for example: filters=[{"field": "name", "value": "campaign-name-123", "operator": "equals"}]
Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
    "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) or disabled
Response
  • 200 - OK - success, see the example on the right
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/affiliates/campaigns \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 - 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
Copied!
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 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
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/affiliates/licenses \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/affiliates/performance \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/affiliates/partners-referred \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 example
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/affiliates/links \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
    "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 date
  • date_to - get trials metrics up to a given date

Note: Date format: YYYY-MM-DDTHH:mm:ssZ

Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
  "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 date
  • date_to - get earnings metrics up to a given date
  • product - 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 example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
  "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 date
  • date_to - get conversions metrics up to a given date

Note: Date format: YYYY-MM-DDTHH:mm:ssZ

Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
  "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 date
  • date_to - get clicks metrics up to a given date

Note: Date format: YYYY-MM-DDTHH:mm:ssZ

Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
  "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 date
  • date_to - get commission metrics up to a given date
  • product - 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 example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 date
  • date_to - required - get report up to a given date
  • aggregation - 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 example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 date
  • date_to - required - get report up to a given date
  • aggregation - 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 example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 date
  • date_to - required - get report up to a given date
  • aggregation - 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 example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 date
  • date_to - required - get report up to a given date
  • aggregation - 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 example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 or expired)
Query Parameters
  • date_from - required - get licenses from a given date
  • date_to - required - get licenses up to a given date
  • limit - 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 example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 200
Copied!
{
    "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 date
  • date_to - get earnings metrics up to a given date
  • billing_cycle - required - billing cycle, monthly or annual
Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 200
Copied!
{
    "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 date
  • date_to - get earnings metrics up to a given date
  • billing_cycle - required - billing cycle, monthly or annual
  • aggregation - required - get report aggregated by a given timespan (one of: day, week, month)
Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 200
Copied!
{
    "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 example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
curl --request POST \
    --url https://api.livechatinc.com/v2/partners/affiliates/campaigns/123/summary \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
    "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 return
  • date_from - get clicks report from a given date
  • date_to - get clicks report up to a given date

Note: Date format: YYYY-MM-DDTHH:mm:ssZ

Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
    "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 return
  • date_from - get trials report from a given date
  • date_to - get trials report up to a given date

Note: Date format: YYYY-MM-DDTHH:mm:ssZ

Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
    "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 return
  • date_from - get conversions report from a given date
  • date_to - get conversions report up to a given date

Note: Date format: YYYY-MM-DDTHH:mm:ssZ

Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
    "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 return
  • date_from - get earnings report from a given date
  • date_to - get earnings report up to a given date

Note: Date format: YYYY-MM-DDTHH:mm:ssZ

Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
    "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 return
  • date_from - get clicks metrics from a given date
  • date_to - get clicks metrics up to a given date

Note: Date format: YYYY-MM-DDTHH:mm:ssZ

Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
    "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 return
  • date_from - get trials metrics from a given date
  • date_to - get trials metrics up to a given date

Note: Date format: YYYY-MM-DDTHH:mm:ssZ

Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
    "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 return
  • date_from - get conversions metrics from a given date
  • date_to - get conversions metrics up to a given date

Note: Date format: YYYY-MM-DDTHH:mm:ssZ

Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
    "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 return
  • date_from - get earnings metrics from a given date
  • date_to - get earnings metrics up to a given date

Note: Date format: YYYY-MM-DDTHH:mm:ssZ

Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
    "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 example
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
curl --request POST \
    --url https://api.livechatinc.com/v2/partners/affiliates/summary \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
    "trials": 0,
    "paid": 0,
    "expired": 0
}

Solution Partner

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 or chatbot)
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 or partner (you)
  • purchase_order - a custom parameter
  • [only for livechat product] data_center - database location: dal (USA) or fra (EU)
  • [only for livechat product] trial_duration - only for the client payment origin - the number of days of a trial period (min. 14 - default, max. 60)
  • [only for livechat product] 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 license for the specified product
EXAMPLE RESPONSE - 201
Copied!
{
  "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 date
  • date_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 right
  • 400 - Bad Request - incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/solutions/licenses \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 date
  • date_to - required - get a report for licenses created up to a given date
  • limit - 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 below
  • 400 - Bad Request - incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/solutions/licenses/paid \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 or chatbot)
  • <license_id> - required - license ID
Response
  • 200 - OK - success, see the example on the right
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 404 - Not Found - license not found
EXAMPLE REQUEST
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/solutions/licenses/livechat/123 \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 or chatbot)
  • <license_id> - required - license ID
Body
  • client_name - client's full name (min. 5 characters)
  • purchase_order - a custom parameter
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
EXAMPLE REQUEST
Copied!
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 or chatbot)
  • <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
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/solutions/licenses/livechat/123/operators \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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 or chatbot)
  • <license_id> - required - license ID
Body
  • operators - required - the list of the users you want to invite to the license.

Struct of user object:

Response
  • 200 - OK - success (could be partial, check the status_code of each user in the response body), see the example on the right
  • 400 - Bad Request - missing or incorrect license_id parameter
  • 401 - Unauthorized - a missing or incorrect authorization header
  • 403 - Forbidden - Partner does not manage a subscription
  • 404 - Not Found - license not found
EXAMPLE REQUEST
Copied!
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"
            }
        ]
    }'
EXAMPLE RESPONSE - 200
Copied!
{
    "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 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
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/solutions/licenses/321/invoices \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
  "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
Copied!
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 or chatbot)
  • <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/<product>/<license_id>/subscription - update a subscription for a license

Headers
  • <product> - required - product (livechat or chatbot)
  • 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/<product>/<license_id>/subscription - close a subscription for a license

Headers
  • <product> - required - product (livechat or chatbot)
  • 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/<product>/<license_id>/billing - update the subscription billing information for a license

Headers
  • <product> - required - product (livechat or chatbot)
  • 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/<product>/<license_id>/transfer - transfer a license to the client

Headers
  • <product> - required - product (livechat or chatbot)
  • 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
Copied!
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
Copied!
{
  "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
Copied!
{
  "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 date
  • date_to - get trials metrics up to a given date

Note: Date format: YYYY-MM-DDTHH:mm:ssZ

Response
  • 200 - OK - success, see example
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 201
Copied!
{
    "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 date
  • date_to - required - get report up to a given date
  • aggregation - 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 below
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 200
Copied!
{
    "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 below
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
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>'
EXAMPLE RESPONSE - 200
Copied!
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 below
  • 400 - Bad Request
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/solutions/leads \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
    "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 below
  • 400 - Bad Request
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/solutions/leads/123 \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
    "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 below
  • 400 - Bad Request
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
curl --request GET \
    --url https://api.livechatinc.com/v2/partners/solutions/leads/123/history \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
    "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 name
  • partner_email - required - partner email
  • company_name - required - lead company name
  • contact_email - required - lead contact email
  • domain - required - domain
  • first_name - required - first name
  • last_name - required - last name
  • region - region
  • job_title - job title
  • phone_number - phone number
  • description - description
  • sends_personal_introduction - boolean value, set to true to send personal introduction
  • is_included_in_communication - boolean value, set to true to be included in communication
  • accepts_requirements - required - boolean value, set to true to accept requirements
Response
  • 200 - OK - success, see the example below
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
curl --request POST \
    --url https://api.livechatinc.com/v2/partners/solutions/leads \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
    "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 below
  • 400 - Bad Request - missing or incorrect parameters
  • 401 - Unauthorized - a missing or incorrect authorization header
EXAMPLE REQUEST
Copied!
curl --request POST \
    --url https://api.livechatinc.com/v2/partners/solutions/summary \
    --header 'Authorization: Bearer <YOUR_API_TOKEN>'
EXAMPLE RESPONSE - 200
Copied!
{
    "trials": "12"
    "paid": "14"
    "expired": "13"
    "commission": "12.33"
    "discount": "34.11"
}

Expert

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 right
  • 400 - Bad Request - an incorrect file
  • 403 - Forbidden - a missing or incorrect authorization token
EXAMPLE RESPONSE - 200
Copied!
{
  "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
Copied!
{
  "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
Copied!
{
  "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
Copied!
{
  "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
Copied!
{
  "result": [
    {
      "date": "2018-03",
      "profile_views": 123
    },
    {
      "date": "2018-02",
      "profile_views": 212
    },
    {
      "date": "2018-01",
      "profile_views": 286
    }
  ]
}

...

Join the community
Get in direct contact with us through Discord.
Follow us
Follow our insightful tweets and interact with our content.
Contribute
See something that's wrong or unclear? Submit a pull request.
Contact us
Want to share feedback? Reach us at: developers@text.com