Skip to content

Commit 7e73f83

Browse files
authored
feat(docs): update client creation flow in PAPI
1 parent 44bacad commit 7e73f83

File tree

1 file changed

+152
-6
lines changed
  • src/pages/partner-program/partner-api

1 file changed

+152
-6
lines changed

src/pages/partner-program/partner-api/index.mdx

Lines changed: 152 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2991,6 +2991,9 @@ curl --request POST \
29912991

29922992
# Solution Partner
29932993

2994+
- [Create Organization](#create-organization)
2995+
- [Get Organization Licenses](#get-organization-licenses)
2996+
- [Get Organization Details](#get-organization-details)
29942997
- [Create License](#create-license)
29952998
- [Get Solution Licenses](#get-solution-licenses)
29962999
- [Get Solution Licenses by Status](#get-solution-licenses-by-status)
@@ -2999,8 +3002,8 @@ curl --request POST \
29993002
- [Get License Details](#get-license-details)
30003003
- [Update License Details](#update-license-details)
30013004
- [Invite License Operators](#invite-license-operators)
3002-
- [Get License's Invoices](#get-license-invoices)
3003-
- [Get License's Invoice PDF](#get-license-invoice-pdf)
3005+
- [Get License's Invoices](#get-licenses-invoices)
3006+
- [Get License's Invoice PDF](#get-licenses-invoice-pdf)
30043007
- [Create Subscription](#create-subscription)
30053008
- [Update Subscription](#update-subscription)
30063009
- [Close Subscription](#close-subscription)
@@ -3018,32 +3021,176 @@ curl --request POST \
30183021

30193022
<Text>
30203023

3024+
## Create Organization
3025+
3026+
`POST https://api.livechatinc.com/v2/partners/solutions/organizations` - create a new organization for a client
3027+
3028+
#### Headers
3029+
3030+
- `Authorization` - **required** - `Bearer <YOUR_API_TOKEN>`
3031+
3032+
#### Body
3033+
3034+
- `organization_name` - **required** - name of the client's organization
3035+
- `client_name` - **required** - client's full name
3036+
- `client_email` - **required** - organization owner email address
3037+
- `data_center` - database location: `us-south1` (USA) or `eu-west3` (EU)
3038+
- `identifier` - a custom organization identifier
3039+
3040+
#### Response
3041+
3042+
- `201 - Successful operation` - success
3043+
- `400 - Invalid data` - missing or incorrect parameters
3044+
- `403 - Access forbidden` - access forbidden
3045+
- `409 - Organization with owner on given email already exists` - organization with the given owner email already exists
3046+
3047+
</Text>
3048+
3049+
<CodeResponse title={'EXAMPLE RESPONSE - 201'}>
3050+
3051+
```json
3052+
{
3053+
"id": "66c29d75-909b-491b-a0bf-49f79f57e3d5"
3054+
}
3055+
```
3056+
3057+
</CodeResponse>
3058+
3059+
<Text>
3060+
3061+
## Get Organization Licenses
3062+
3063+
`GET https://api.livechatinc.com/v2/partners/solutions/organizations/<organization_id>/licenses` - get organization's licenses
3064+
3065+
#### Headers
3066+
3067+
- `Authorization` - **required** - `Bearer <YOUR_API_TOKEN>`
3068+
3069+
#### Path Parameters
3070+
3071+
- `organization_id` - **required** - organization UUID
3072+
3073+
#### Response
3074+
3075+
- `200 - Successful operation` - returns array of license objects
3076+
- `403 - Access forbidden` - access forbidden
3077+
3078+
</Text>
3079+
3080+
<CodeResponse title={'EXAMPLE RESPONSE - 200'}>
3081+
3082+
```json
3083+
{
3084+
"total": 1,
3085+
"limit": 15,
3086+
"results": [
3087+
{
3088+
"organization_id": "66c29d75-909b-491b-a0bf-49f79f57e3d5",
3089+
"organization_name": "Anna's Organizations",
3090+
"client_name": "Anna Nowak",
3091+
"client_email": "[email protected]",
3092+
"arr": 0,
3093+
"licenses": [
3094+
{
3095+
"external_license_id": "123456789",
3096+
"product": "livechat"
3097+
},
3098+
{
3099+
"external_license_id": "HD-123456789",
3100+
"product": "helpdesk"
3101+
},
3102+
{
3103+
"external_license_id": "123abc456def789",
3104+
"product": "chatbot"
3105+
}
3106+
]
3107+
}
3108+
]
3109+
}
3110+
```
3111+
3112+
</CodeResponse>
3113+
3114+
<Text>
3115+
3116+
## Get Organization Details
3117+
3118+
`GET https://api.livechatinc.com/v2/partners/solutions/organizations/<organization_id>` - get organization details
3119+
3120+
#### Headers
3121+
3122+
- `Authorization` - **required** - `Bearer <YOUR_API_TOKEN>`
3123+
3124+
#### Path Parameters
3125+
3126+
- `organization_id` - **required** - organization ID
3127+
3128+
#### Response
3129+
3130+
- `200 - Successful operation` - returns organization object
3131+
- `403 - Access forbidden` - access forbidden
3132+
- `404 - Organization owned by partner does not exist` - organization owned by partner does not exist
3133+
3134+
</Text>
3135+
3136+
<CodeResponse title={'EXAMPLE RESPONSE - 200'}>
3137+
3138+
```json
3139+
{
3140+
"organization_id": "66c29d75-909b-491b-a0bf-49f79f57e3d5",
3141+
"name": "Dunder Mifflin",
3142+
"data_center": "us-south1",
3143+
"products": [
3144+
{
3145+
"product": "ChatBot"
3146+
},
3147+
{
3148+
"product": "HelpDesk"
3149+
},
3150+
{
3151+
"product": "LiveChat"
3152+
}
3153+
],
3154+
"created_at": "2025-11-01T08:00:53Z"
3155+
}
3156+
```
3157+
3158+
</CodeResponse>
3159+
3160+
<Text>
3161+
30213162
## Create License
30223163

3023-
`POST https://api.livechatinc.com/v2/partners/solutions/licenses` - create a new license for a client
3164+
`POST https://api.livechatinc.com/v2/partners/solutions/organizations/<organization_id>/licenses` - create a new license inside an organization for a client
30243165

30253166
#### Headers
30263167

30273168
- `Authorization` - **required** - `Bearer <YOUR_API_TOKEN>`
30283169

3170+
#### Path Parameters
3171+
3172+
- `organization_id` - **required** - the organization ID of this client's organization
3173+
30293174
#### Query Parameters
30303175

30313176
- `product` - **required** - product (`livechat`, `chatbot`, or `helpdesk`)
30323177

30333178
#### Body
30343179

30353180
- `client_name` - **required** - client's full name (min. 5 characters)
3036-
- `client_email` - **required** - client's email address
3181+
- `client_email` - **required** - client's email address, must match the organization owner email
30373182
- `payment_origin` - **required** - who would manage subscription: `client` or `partner` (you)
3183+
- `trial_duration` - **required** - the number of days of a trial period (min. 14 - default, max. 30)
3184+
- `coupon_id` - a custom parameter
30383185
- `purchase_order` - a custom parameter
3039-
- `data_center` - database location: `dal` (USA) or `fra` (EU)
30403186

30413187
#### Response
30423188

30433189
- `201 - Created` - success, see example
30443190
- `400 - Bad Request` - missing or incorrect parameters
30453191
- `401 - Unauthorized` - a missing or incorrect authorization header
30463192
- `403 - Forbidden` - not allowed to use the given `coupon_id`
3193+
- `404 - Not Found` - organization owned by partner does not exist
30473194
- `409 - Conflict` - the given `client_email` already has a license for the specified `product`
30483195

30493196
</Text>
@@ -3073,7 +3220,6 @@ curl --request POST \
30733220

30743221
</Section>
30753222

3076-
30773223
<Section>
30783224

30793225
<Text>

0 commit comments

Comments
 (0)