---
title: "Partner Billing"
slug: "server-api-partner-billing"
updated: 2022-07-08T11:13:53Z
published: 2022-07-08T11:13:53Z
canonical: "developer.comm100.com/server-api-partner-billing"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://developer.comm100.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Partner Billing
## Partner Billing API
| Change Version | API Version | Change notes | Change Date | Author |
| --- | --- | --- | --- | --- |
| 1.0 | v1 | | 2022-04-15 | Hardy, Cyrus |
## Summary
- Billing
- [site](/docs/server-api-partner-billing#site)
- [site billing config](/docs/server-api-partner-billing#site-billing-config)
- [site billing profile](/docs/server-api-partner-billing#site-billing-profile)
- [subscription](/docs/server-api-partner-billing#subscription)
- [subscription product relation](/docs/server-api-partner-billing#subscription-product-relation)
- [subscription pricing model](/docs/server-api-partner-billing#subscription-pricing-model)
- [subscription feature limitation config](/docs/server-api-partner-billing#subscription-feature-limitation-config)
- [product](/docs/server-api-partner-billing#product)
- [product feature point](/docs/server-api-partner-billing#product-feature-point)
- [feature point item](/docs/server-api-partner-billing#feature-point-item)
- [invoice bill to](/docs/server-api-partner-billing#invoice-bill-to)
## Site
You need the `Manage Site` permission to manage sites.
- `GET /api/billing/site/search` - [Get paged collection of sites](/docs/server-api-partner-billing#get-paged-collection-of-sites)
- `GET /api/billing/sites` - [Get collection of sites](/docs/server-api-partner-billing#get-collection-of-sites)
- `GET /api/billing/sites/{id}` - [Get a site](/docs/server-api-partner-billing#get-a-site)
### Site Object JSON format
#### Site Object
`Site` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | int | yes | no | Site identifier. |
| `partnerId` | int | yes | no | Partner identifier. |
| `platformId` | int | yes | no | Platform identifier. |
| `company` | string | no | no | Company. |
| `companySize` | string | no | no | Company size. |
| `website` | string | no | no | Web site. |
| `phone` | string | no | no | Phone. |
| `fax` | string | no | no | Fax. |
| `countryOrRegion` | string | no | no | Country or region. |
| `stateOrProvince` | string | no | no | State or province. |
| `city` | string | no | no | City. |
| `mailingAddress` | string | no | no | Mailing adress. |
| `postalOrZipCode` | string | no | no | Postal or zipcode. |
| `firstName` | string | no | no | First name. |
| `lastName` | string | no | no | Last name. |
| `dateTimeFormat` | string | no | no | Datetime format. |
| `languageId` | string | no | no | Language identifier. |
| `timeZone` | string | no | no | Timezone. |
| `status` | string | no | no | Status. |
| `subdomain` | string | no | no | Subdomain. |
| `customDomain` | string | no | no | Custom domain. |
| `industry` | string | no | no | Industry. |
| `otherIndustryDescription` | string | no | no | Other industry description. |
| `tagIds` | Guid[] | no | no | Collection of tags. |
| `tags` | [`Tag`](/docs/server-api-partner-billing#tag-object)[] | no | no | Collection of tags. |
| `siteAgents` | [`Agent`](/docs/server-api-partner-billing#agent-object)[] | no | no | Collection of agents. |
| `siteContracts` | [`SiteContract`](/docs/server-api-partner-billing#site-contract-object)[] | no | no | Collection of site contracts. |
| `siteExtraInfo` | [`SiteExtraInfo`](/docs/server-api-partner-billing#site-extra-info-object) | no | no | Extra info of a site. |
| `siteActivity` | [`SiteActivity`](/docs/server-api-partner-billing#site-activity-object) | no | no | Activity of a site. |
| `siteBillingConfig` | [`SiteBillingConfig`](/docs/server-api-partner-billing#site-billing-config-object) | no | no | Billing config of a site. |
| `siteBillingActivity` | [`SiteBillingActivity`](/docs/server-api-partner-billing#site-billing-activity-object) | no | no | Billing activity of a site. |
| `siteRegistration` | [`SiteRegistration`](/docs/server-api-partner-billing#site-registration-object) | no | no | Registration info of a site. |
| `subscriptions` | [`Subscription`](/docs/server-api-partner-billing#subscription-object)[] | no | no | Collection of subscriptions of a site. |
#### Site Extra Info Object
`SiteExtraInfo` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `siteId` | int | yes | yes | Site identifier. |
| `profitCenterId` | Guid | yes | no | Profit center identifier. |
| `deploymentType` | string | no | yes | Deployment type. |
| `accountExecutive` | Guid | no | no | Executive user identifier. |
| `accountManager` | Guid | no | no | Manager identifier. |
| `isSandboxSite` | bool | no | no | Is sandbox site. |
| `isSpam` | bool | no | no | Is spam. |
#### Site Activity Object
`SiteActivity` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `siteId` | int | yes | yes | Site identifier. |
| `lastLoginTime` | DateTime | no | no | Last login time. |
| `isActive` | bool | no | no | Is active. |
| `livechatCustomerLastWebPageVisitTime` | DateTime | no | yes | Live chat customer last web page visit time. |
| `livechatCustomerLastWebPageUrl` | string | no | no | Live chat customer last web page URL. |
#### Site Billing Activity Object
`SiteBillingActivity` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `siteId` | int | yes | yes | Site identifier. |
| `buyingStage` | stirng | no | no | Buying stage. |
#### Site Registration Object
`SiteRegistration` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `siteId` | int | yes | yes | Site identifier. |
| `registerEmail` | stirng | no | no | Register email. |
| `registerTime` | DateTime | no | no | Register time. |
#### Tag Object
`Tag` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | yes | no | Tag identifier. |
| `partnerId` | int | no | yes | Partner identifier. |
| `name` | string | no | yes | Tag name. |
#### Agent Object
`Agent` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | yes | no | Agent identifier. |
| `siteId` | int | yes | no | Site identifier. |
| `email` | string | no | no | Agent email address. |
| `displayName` | string | no | no | Display name. |
| `firstName` | string | no | no | First name. |
| `lastName` | string | no | no | Last name. |
| `isAdmin` | bool | no | no | Is admin. |
| `isActive` | bool | no | no | Is active. |
| `createdTime` | DateTime | no | no | Created time. |
#### Site Contract Object
`SiteContract` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | yes | no | Agent identifier. |
| `siteId` | int | yes | no | Site identifier. |
| `name` | string | no | no | Name. |
| `description` | string | no | no | Description. |
| `startDate` | DateTime | no | no | Start time. |
| `endDate` | DateTime | no | no | End time. |
| `actionWhenContractEnds` | string | no | no | Action when contract ends. |
| `siteContractAttachments` | [`SiteContractAttachment`](/docs/server-api-partner-billing#site-contract-attachment-object)[] | no | no | Collection of site contract attachments. |
#### Site Contract Attachment Object
`SiteContractAttachment` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | yes | no | Agent identifier. |
| `siteId` | int | yes | no | Site identifier. |
| `sitecontractId` | Guid | yes | no | Site contract identifier. |
| `name` | string | no | no | Name. |
| `attachment` | string | no | no | Attachment URL. |
#### Site Paged Model Object
`SitePagedModel` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `siteId` | int | yes | no | Site identifier. |
| `platformName` | string | no | no | Platform name. |
| `registerDate` | DateTime | no | no | Register date. |
| `lastActivityDate` | DateTime | no | no | Last activity date. |
| `siteStatus` | string | no | no | Site status. |
| `profitCenterId` | Guid | no | no | Profit center identifier. |
| `profitCenterName` | string | no | no | Profit center name. |
| `isActive` | bool | no | no | Is active. |
| `buyingStage` | string | no | no | Buying stage. |
| `accountExecutiveId` | Guid | no | no | Executive user identifier. |
| `accountExecutiveName` | string | no | no | Executive user name. |
| `company` | string | no | no | Company. |
| `country` | string | no | no | Country or region. |
| `ifHasSiteBillingProfile` | int | no | no | Wether exist billing profile. |
| `billingPeriod` | string | no | no | Billing period. |
| `billingStartDate` | DateTime | no | no | Billing start date. |
| `nextBillingDate` | DateTime | no | no | Next billing date. |
| `balance` | decimal | no | no | Balance. |
| `purchasedAgents` | int | no | no | Purchased agents. |
| `activeAgents` | int | no | no | Active agents. |
| `agent` | [SiteAgent](/docs/server-api-partner-billing#site-agent-object)[] | no | no | The collection of agents. |
| `subscription` | string[] | no | no | The collection of subscriptions' name. |
#### Site Agent Object
`SiteAgent` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `siteId` | int | yes | no | Site identifier. |
| `agentId` | Guid | no | no | Agent identifier. |
| `email` | string | no | no | Agent email address. |
| `lastActivityDate` | DateTime | no | no | Last activity date. |
| `displayName` | string | no | no | Display name. |
| `isAdmin` | bool | no | no | Is admin. |
### Site Endpoints
#### Get paged collection of sites
`GET /api/billing/site/search`
- #### Parameters
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | no | Unique identifier of a `Site`. |
- #### Response
The response is paged collection of [SitePagedModel](/docs/server-api-partner-billing#site-paged-model-object) objects.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/site/search \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"pageIndex": 1,
"pageSize": 10,
"pageCount": 7,
"total": 67,
"items": [
{
"siteId": 10000,
"platformName": "internal",
"registerDate": "2021-03-31T06:05:15.28Z",
"lastActivityDate": "2022-04-07T08:58:28.9447384Z",
"siteStatus": "open",
"agent": [
{
"siteId": 10000,
"agentId": "1ce38293-786b-4452-90a0-54adb3d31204",
"email": "test1@internal.com",
"displayName": "test1 internal",
"isAdmin": true
}
],
"billingPeriod": "annually",
"billingStartDate": "2022-03-04T00:00:00Z",
"nextBillingDate": "2023-03-04T00:00:00Z",
"balance": 0.00,
"purchasedAgents": 5,
"activeAgents": 1,
"subscription": [
"Comm100 Omnichannel Business",
"Comm100 Bot Enterprise"
],
"profitCenterId": "02000000-0000-0000-0000-271000002710",
"profitCenterName": "Vancouver ENT CS",
"isActive": false,
"buyingStage": "paying",
"accountExecutiveId": "00000000-0000-0000-0000-000000000000",
"accountExecutiveName": "No Account Executive",
"company": "",
"country": "Bosnia and Herzegovina",
"ifHasSiteBillingProfile": 1
}
]
}
```
#### Get collection of sites
`GET /api/billing/sites`
- #### Parameters
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | int | no | Unique identifier of a `Site`. |
- #### Response
The response is collection of [Site](/docs/server-api-partner-billing#site-object) objects.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/sites \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": 10000,
"partnerId": 10000,
"platformId": 100,
"company": "",
"companySize": "",
"website": "",
"phone": "",
"fax": "",
"countryOrRegion": "Bosnia and Herzegovina",
"stateOrProvince": "",
"city": "",
"mailingAddress": "",
"postalOrZipCode": "",
"firstName": "test1",
"lastName": "internal",
"dateTimeFormat": "MM/DD/YYYY HH:mm:ss",
"languageId": "en",
"timeZone": "UTC-08",
"status": "open",
"subdomain": "",
"customDomain": "",
"industry": "Others",
"otherIndustryDescription": "",
"tagIds": [
"fe53fe17-bd77-42c7-8cc0-278422bd89d6"
],
"tags": [
{
"id": "fe53fe17-bd77-42c7-8cc0-278422bd89d6",
"partnerId": 10000,
"name": "Free Email Not Allowed"
}
],
"siteAgents": [
{
"id": "1ce38293-786b-4452-90a0-54adb3d31204",
"siteId": 10000,
"email": "test1@internal.com",
"displayName": "test1 internal",
"firstName": "test1",
"lastName": "internal",
"isAdmin": true,
"isActive": true,
"createdTime": "2022-02-17T06:44:51.3966667Z"
}
],
"siteContracts": [
{
"id": "8d33378a-5a12-49f4-aa2a-bcb2fddf5ab6",
"siteId": 100000001,
"name": "re",
"description": "1",
"startDate": "2022-02-03T08:21:19Z",
"endDate": "2022-02-16T08:21:20Z",
"actionWhenContractEnds": "stopService",
"siteContractAttachments": [
{
"id": "f7fe4f76-ecf9-4ed7-adb3-46187577744e",
"siteId": 100000001,
"sitecontractId": "8d33378a-5a12-49f4-aa2a-bcb2fddf5ab6",
"name": "desk.jpeg",
"attachment": "https://partner.comm100.io/api/billing/siteContractAttachments/f7fe4f76-ecf9-4ed7-adb3-46187577744e/attachment?siteId=10000&version=32b7b8b1af4bc663983f01100363da4a"
}
]
}
],
"siteExtraInfo": {
"siteId": 10000,
"profitCenterId": "02000000-0000-0000-0000-271000002710",
"deploymentType": "Shared",
"accountExecutive": "00000000-0000-0000-0000-000000000000",
"accountManager": "00000000-0000-0000-0000-000000000000",
"isSandboxSite": false,
"isSpam": false
},
"siteActivity": {
"siteId": 10000,
"lastLoginTime": "2022-04-07T08:58:28.9447384Z",
"isActive": false,
"livechatCustomerLastWebPageVisitTime": null,
"livechatCustomerLastWebPageUrl": ""
},
"siteBillingConfig": {
"siteId": 10000,
"billingPeriod": "annual",
"billingStartDate": "2022-03-04T00:00:00Z",
"nextBillingDate": "2023-03-04T00:00:00Z",
"balance": 0.00,
"currencyId": "USD",
"isPricingVisible": false,
"isSubscriptionChangeByCustomerAllowed": false,
"isAgentsPurchasedInAdvance": true,
"purchasedAgents": 5,
"isInvoiceVisibleToCustomer": false,
"isBillingEmailSentAutomatically": false,
"isBillingPopupAutomatically": false,
"paymentTerm": "net0",
"paymentTermValue": 0,
"currency": {
"id": "USD",
"symbol": "$",
"description": ""
}
},
"siteBillingActivity": {
"siteId": 10000,
"buyingStage": "paying"
},
"subscriptions": [
{
"id": "895a5d94-97e8-410f-8ff3-53d8038e908a",
"planId": 211,
"siteId": 10000,
"name": "Comm100 Omnichannel Business",
"isServicePlan": false,
"canBeCancelledByCustomer": false,
"createdTime": "2022-02-17T06:44:51.2766667Z",
"subscriptionPricingModels": [
{
"id": "35ed9d79-1a5c-418b-b8c1-77c63e7083d7",
"siteId": 10000,
"subscriptionId": "895a5d94-97e8-410f-8ff3-53d8038e908a",
"name": "Omnichannel business",
"pricingModel": "perAgent",
"freeQuantity": 0,
"maxQuantity": 500,
"unitType": "additionalTwitterAccount",
"volumeType": "botActionPerMonth",
"isServiceStoppedWhenBotActionsQuotaExceeded": false,
"purchasedQuantity": 0,
"purchasedOverageQuantity": 0,
"subscriptionPriceSegmentByAgents": [
{
"id": "e7796bab-7c5f-4ca7-a9b6-1ef97aeb6091",
"subscriptionPricingModelId": "35ed9d79-1a5c-418b-b8c1-77c63e7083d7",
"siteId": 10000,
"from": 1,
"to": 5,
"monthlyPrice": 89.00,
"quarterlyPrice": 267.00,
"semiAnnualPrice": 534.00,
"annualPrice": 979.00,
"monthlyPriceDiscount": 0.10,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00
}
],
"subscriptionPriceSegmentByVolumes": [
{
"id": "8a206344-4b07-4e3f-b736-aa6f1b922858",
"subscriptionPricingModelId": "add5cdab-9566-4140-f6c7-08da12bc6f77",
"siteId": 10000,
"quotaPerMonth": 10000,
"monthlyPrice": 0.00,
"quarterlyPrice": 0.00,
"semiAnnualPrice": 0.00,
"annualPrice": 0.00,
"isOverageQuotaAddedByCustomerAllowed": false,
"overageQuota": 2500,
"overageUnitPrice": 49.00,
"monthlyPriceDiscount": 0.00,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00,
"overageUnitPriceDiscount": 0.00
}
],
"subscriptionPriceWithFlatFee": {
"subscriptionPricingModelId": "68d961ca-865f-4557-f6c8-08da12bc6f77",
"siteId": 10000,
"monthlyPrice": 599.00,
"quarterlyPrice": 1198.00,
"semiAnnualPrice": 3594.00,
"annualPrice": 7188.00,
"monthlyPriceDiscount": 0.00,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00
}
}
]
}
],
"siteRegistration": {
"siteId": 10000,
"registerEmail": "test1@internal.com",
"registerTime": "2021-03-31T06:05:15.28Z"
}
}
]
```
#### Get a site
`GET /api/billing/sites/{id}`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | int | no | Unique identifier of a `Site`. |
- #### Response
The response is a [Site](/docs/server-api-partner-billing#site-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/sites/10000 \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": 10000,
"partnerId": 10000,
"platformId": 100,
"company": "",
"companySize": "",
"website": "",
"phone": "",
"fax": "",
"countryOrRegion": "Bosnia and Herzegovina",
"stateOrProvince": "",
"city": "",
"mailingAddress": "",
"postalOrZipCode": "",
"firstName": "test1",
"lastName": "internal",
"dateTimeFormat": "MM/DD/YYYY HH:mm:ss",
"languageId": "en",
"timeZone": "UTC-08",
"status": "open",
"subdomain": "",
"customDomain": "",
"industry": "Others",
"otherIndustryDescription": "",
"tagIds": [
"fe53fe17-bd77-42c7-8cc0-278422bd89d6"
],
"tags": [
{
"id": "fe53fe17-bd77-42c7-8cc0-278422bd89d6",
"partnerId": 10000,
"name": "Free Email Not Allowed"
}
],
"siteAgents": [
{
"id": "1ce38293-786b-4452-90a0-54adb3d31204",
"siteId": 10000,
"email": "test1@internal.com",
"displayName": "test1 internal",
"firstName": "test1",
"lastName": "internal",
"isAdmin": true,
"isActive": true,
"createdTime": "2022-02-17T06:44:51.3966667Z"
}
],
"siteContracts": [
{
"id": "8d33378a-5a12-49f4-aa2a-bcb2fddf5ab6",
"siteId": 100000001,
"name": "re",
"description": "1",
"startDate": "2022-02-03T08:21:19Z",
"endDate": "2022-02-16T08:21:20Z",
"actionWhenContractEnds": "stopService",
"siteContractAttachments": [
{
"id": "f7fe4f76-ecf9-4ed7-adb3-46187577744e",
"siteId": 100000001,
"sitecontractId": "8d33378a-5a12-49f4-aa2a-bcb2fddf5ab6",
"name": "desk.jpeg",
"attachment": "https://partner.comm100.io/api/billing/siteContractAttachments/f7fe4f76-ecf9-4ed7-adb3-46187577744e/attachment?siteId=10000&version=32b7b8b1af4bc663983f01100363da4a"
}
]
}
],
"siteExtraInfo": {
"siteId": 10000,
"profitCenterId": "02000000-0000-0000-0000-271000002710",
"deploymentType": "Shared",
"accountExecutive": "00000000-0000-0000-0000-000000000000",
"accountManager": "00000000-0000-0000-0000-000000000000",
"isSandboxSite": false,
"isSpam": false
},
"siteActivity": {
"siteId": 10000,
"lastLoginTime": "2022-04-07T08:58:28.9447384Z",
"isActive": false,
"livechatCustomerLastWebPageVisitTime": null,
"livechatCustomerLastWebPageUrl": ""
},
"siteBillingConfig": {
"siteId": 10000,
"billingPeriod": "annual",
"billingStartDate": "2022-03-04T00:00:00Z",
"nextBillingDate": "2023-03-04T00:00:00Z",
"balance": 0.00,
"currencyId": "USD",
"isPricingVisible": false,
"isSubscriptionChangeByCustomerAllowed": false,
"isAgentsPurchasedInAdvance": true,
"purchasedAgents": 5,
"isInvoiceVisibleToCustomer": false,
"isBillingEmailSentAutomatically": false,
"isBillingPopupAutomatically": false,
"paymentTerm": "net0",
"paymentTermValue": 0,
"currency": {
"id": "USD",
"symbol": "$",
"description": ""
}
},
"siteBillingActivity": {
"siteId": 10000,
"buyingStage": "paying"
},
"subscriptions": [
{
"id": "895a5d94-97e8-410f-8ff3-53d8038e908a",
"planId": 211,
"siteId": 10000,
"name": "Comm100 Omnichannel Business",
"isServicePlan": false,
"canBeCancelledByCustomer": false,
"createdTime": "2022-02-17T06:44:51.2766667Z",
"subscriptionPricingModels": [
{
"id": "35ed9d79-1a5c-418b-b8c1-77c63e7083d7",
"siteId": 10000,
"subscriptionId": "895a5d94-97e8-410f-8ff3-53d8038e908a",
"name": "Omnichannel business",
"pricingModel": "perAgent",
"freeQuantity": 0,
"maxQuantity": 500,
"unitType": "additionalTwitterAccount",
"volumeType": "botActionPerMonth",
"isServiceStoppedWhenBotActionsQuotaExceeded": false,
"purchasedQuantity": 0,
"purchasedOverageQuantity": 0,
"subscriptionPriceSegmentByAgents": [
{
"id": "e7796bab-7c5f-4ca7-a9b6-1ef97aeb6091",
"subscriptionPricingModelId": "35ed9d79-1a5c-418b-b8c1-77c63e7083d7",
"siteId": 10000,
"from": 1,
"to": 5,
"monthlyPrice": 89.00,
"quarterlyPrice": 267.00,
"semiAnnualPrice": 534.00,
"annualPrice": 979.00,
"monthlyPriceDiscount": 0.10,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00
}
],
"subscriptionPriceSegmentByVolumes": [
{
"id": "8a206344-4b07-4e3f-b736-aa6f1b922858",
"subscriptionPricingModelId": "add5cdab-9566-4140-f6c7-08da12bc6f77",
"siteId": 10000,
"quotaPerMonth": 10000,
"monthlyPrice": 0.00,
"quarterlyPrice": 0.00,
"semiAnnualPrice": 0.00,
"annualPrice": 0.00,
"isOverageQuotaAddedByCustomerAllowed": false,
"overageQuota": 2500,
"overageUnitPrice": 49.00,
"monthlyPriceDiscount": 0.00,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00,
"overageUnitPriceDiscount": 0.00
}
],
"subscriptionPriceWithFlatFee": {
"subscriptionPricingModelId": "68d961ca-865f-4557-f6c8-08da12bc6f77",
"siteId": 10000,
"monthlyPrice": 599.00,
"quarterlyPrice": 1198.00,
"semiAnnualPrice": 3594.00,
"annualPrice": 7188.00,
"monthlyPriceDiscount": 0.00,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00
}
}
]
}
],
"siteRegistration": {
"siteId": 10000,
"registerEmail": "test1@internal.com",
"registerTime": "2021-03-31T06:05:15.28Z"
}
}
```
## Site Billing Config
You need the `Manage Site` permission to manage site billing config.
- `GET /api/billing/siteBillingConfigs` - [Get the list of site billing configs](/docs/server-api-partner-billing#get-the-list-of-site-billing-configs)
- `GET /api/billing/siteBillingConfigs/{siteId}` - [Get billing config of a site](/docs/server-api-partner-billing#get-billing-config-of-a-site)
- `POST /api/billing/siteBillingConfigs` - [Create billing config of a site](/docs/server-api-partner-billing#create-billing-config-of-a-site)
- `PUT /api/billing/siteBillingConfigs/{siteId}` - [Update billing configs of a site](/docs/server-api-partner-billing#update-billing-config-of-a-site)
### Site Billing Config Object JSON format
#### Site Billing Config Object
`SiteBillingConfig` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `siteId` | integer | yes | no | Site identifier. |
| `billingPeriod` | enum | no | yes | Billing period, value options include : monthly, quarterly, semi-annual, annual, ... |
| `billingStartDate` | DateTime | yes | no | The first billing date. |
| `nextBillingDate` | DateTime | yes | no | The next billing date. |
| `balance` | decimal | yes | no | Account balance. |
| `currencyId` | string | no | yes | Currency identifier. |
| `isPricingVisible` | bool | no | no | Is the price displayed explicitly. |
| `isSubscriptionChangeByCustomerAllowed` | bool | no | no | Wether to allow customers to change their subscriptions. |
| `isAgentsPurchasedInAdvance` | bool | no | no | Wether to allow customers to purchase agents by themselves. |
| `purchasedAgents` | int | yes | no | The number of purchased agents. |
| `isInvoiceVisibleToCustomer` | bool | no | no | Wether to show invoice to customer. |
| `isBillingEmailSentAutomatically` | bool | no | no | Wether to send billing email to customers authmatically. |
| `isBillingPopupAutomatically` | bool | no | no | Wether to show billing popup to customers. |
| `paymentTerm` | string | no | no | The name of payment term. |
| `paymentTermValue` | string | no | yes | The value of payment term. |
| `currency` | [Currency](/docs/server-api-partner-billing#currency-object) | no | yes | The currency object. |
#### Currency Object
`Currency` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | string | no | yes | Currency identifier. |
| `symbol` | string | no | yes | Currency symbol. $, €, £, ¥, ... |
| `description` | string | no | no | Currency description. |
### Site Endpoints
#### Get the list of site billing configs
`GET /api/billing/siteBillingConfigs`
- #### Parameters
No parameters
- #### Response
The response is collection of [SiteBillingConfig](/docs/server-api-partner-billing#site-billing-config-object) objects.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/siteBillingConfigs \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"siteId": 10000,
"billingPeriod": "annual",
"billingStartDate": "2022-03-04T00:00:00Z",
"nextBillingDate": "2023-03-04T00:00:00Z",
"balance": 0.00,
"currencyId": "USD",
"isPricingVisible": false,
"isSubscriptionChangeByCustomerAllowed": false,
"isAgentsPurchasedInAdvance": true,
"purchasedAgents": 5,
"isInvoiceVisibleToCustomer": false,
"isBillingEmailSentAutomatically": false,
"isBillingPopupAutomatically": false,
"paymentTerm": "net0",
"paymentTermValue": 0,
"currency": {
"id": "USD",
"symbol": "$",
"description": ""
}
}
]
```
#### Get billing config of a site
`GET /api/billing/siteBillingConfigs/{siteId}`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | yes | Unique identifier of the site. |
- #### Response
The response is [SiteBillingConfig](/docs/server-api-partner-billing#site-billing-config-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/siteBillingConfigs/10000 \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"siteId": 10000,
"billingPeriod": "annual",
"billingStartDate": "2022-03-04T00:00:00Z",
"nextBillingDate": "2023-03-04T00:00:00Z",
"balance": 0.00,
"currencyId": "USD",
"isPricingVisible": false,
"isSubscriptionChangeByCustomerAllowed": false,
"isAgentsPurchasedInAdvance": true,
"purchasedAgents": 5,
"isInvoiceVisibleToCustomer": false,
"isBillingEmailSentAutomatically": false,
"isBillingPopupAutomatically": false,
"paymentTerm": "net0",
"paymentTermValue": 0,
"currency": {
"id": "USD",
"symbol": "$",
"description": ""
}
}
```
#### Create billing config of a site
`POST /api/billing/siteBillingConfigs`
- #### Parameters
Request body
The request body contains data with the [SiteBillingConfig](/docs/server-api-partner-billing#site-billing-config-object) structure.
- #### Response
The response is the [SiteBillingConfig](/docs/server-api-partner-billing#site-billing-config-object) Object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/siteBillingConfigs \
-H 'Content-Type: application/json' \
-X 'POST' \
-D '{
"siteId": 10000,
"billingPeriod": "annual",
"currencyId": "USD",
"isPricingVisible": false,
"isSubscriptionChangeByCustomerAllowed": false,
"isAgentsPurchasedInAdvance": true,
"isInvoiceVisibleToCustomer": false,
"isBillingEmailSentAutomatically": false,
"isBillingPopupAutomatically": false,
"paymentTerm": "net0",
"paymentTermValue": 0,
...,
}'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"siteId": 10000,
"billingPeriod": "annual",
"billingStartDate": "2022-03-04T00:00:00Z",
"nextBillingDate": "2023-03-04T00:00:00Z",
"balance": 0.00,
"currencyId": "USD",
"isPricingVisible": false,
"isSubscriptionChangeByCustomerAllowed": false,
"isAgentsPurchasedInAdvance": true,
"purchasedAgents": 5,
"isInvoiceVisibleToCustomer": false,
"isBillingEmailSentAutomatically": false,
"isBillingPopupAutomatically": false,
"paymentTerm": "net0",
"paymentTermValue": 0,
"currency": {
"id": "USD",
"symbol": "$",
"description": ""
}
}
```
#### Update billing config of a site
`PUT /api/billing/siteBillingConfigs/{siteId}`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | yes | Unique identifier of the site. |
Request body
The request body contains data with the [SiteBillingConfig](/docs/server-api-partner-billing#site-billing-config-object) structure.
- #### Response
The response is the [SiteBillingConfig](/docs/server-api-partner-billing#site-billing-config-object) Object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/siteBillingConfigs/10000 \
-H 'Content-Type: application/json' \
-X 'POST' \
-D '{
"siteId": 10000,
"billingPeriod": "annual",
"currencyId": "USD",
"isPricingVisible": false,
"isSubscriptionChangeByCustomerAllowed": false,
"isAgentsPurchasedInAdvance": true,
"isInvoiceVisibleToCustomer": false,
"isBillingEmailSentAutomatically": false,
"isBillingPopupAutomatically": false,
"paymentTerm": "net0",
"paymentTermValue": 0,
...,
}'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"siteId": 10000,
"billingPeriod": "annual",
"billingStartDate": "2022-03-04T00:00:00Z",
"nextBillingDate": "2023-03-04T00:00:00Z",
"balance": 0.00,
"currencyId": "USD",
"isPricingVisible": false,
"isSubscriptionChangeByCustomerAllowed": false,
"isAgentsPurchasedInAdvance": true,
"purchasedAgents": 5,
"isInvoiceVisibleToCustomer": false,
"isBillingEmailSentAutomatically": false,
"isBillingPopupAutomatically": false,
"paymentTerm": "net0",
"paymentTermValue": 0,
"currency": {
"id": "USD",
"symbol": "$",
"description": ""
}
}
```
## Site Billing Profile
You need the `Manage Site` permission to manage site billing profile.
- `GET /api/billing/siteBillingProfiles` - [Get a list of site billing profiles](/docs/server-api-partner-billing#get-collection-of-site-billing-profiles)
- `GET /api/billing/siteBillingProfiles/{siteId}` - [Get billing profile of a site](/docs/server-api-partner-billing#get-billing-profile-of-a-site)
- `POST /api/billing/siteBillingProfiles` - [Create billing profile of a site](/docs/server-api-partner-billing#create-billing-profile-of-a-site)
- `PUT /api/billing/siteBillingProfiles/{siteId}` - [Update billing profile of a site](/docs/server-api-partner-billing#update-billing-profile-of-a-site)
### Site Billing Profile Object JSON format
#### Site Billing Profile Object
`SiteBillingProfile` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `siteId` | integer | yes | no | Site identifier. |
| `firstName` | string | no | no | First name. |
| `lastName` | string | no | no | Last name. |
| `companyName` | string | no | no | Company name. |
| `email` | string | no | no | Email address. |
| `phone` | string | no | no | Phone number. |
| `fax` | string | no | no | Fax number. |
| `countryOrRegion` | string | no | no | Country or region. |
| `stateOrProvince` | string | no | no | State or province. |
| `city` | string | yes | no | City. |
| `mailingAddress` | string | no | no | Mailing address. |
| `postalOrZipCode` | string | no | no | Postal or zipcode. |
| `jobTitle` | string | no | no | Job title. |
| `billTo` | string | no | no | Bill to. |
| `isChargedAutomatically` | bool | no | no | Is charged automatically. |
| `isEPayment` | bool | no | no | Is EPayment. |
| `primaryPaymentTypeId` | string | no | no | Primary payment type. `Amex` |
| `primaryPayPalBillingAgreementId` | string | no | no | Primary paypal billing agreement. |
| `primaryPayPalEmail` | string | no | no | Primary paypal email. |
| `nameOnPrimaryCard` | string | no | no | Who is the primary card belonged. |
| `primaryCardNumber` | string | no | no | Primary card number. |
| `primaryCardCSCOrCVD` | string | no | no | The CSC or CVD of the primary card. |
| `primaryCardExpirationDate` | DateTime | no | no | The expiration date of the primary card. |
| `secondaryPaymentTypeId` | string | no | no | Secondary payment type. `Amex` |
| `secondaryPayPalBillingAgreementId` | string | no | no | Secondary paypal billing agreement. |
| `secondaryPayPalEmail` | string | no | no | Secondary paypal email. |
| `nameOnSecondaryCard` | string | no | no | Who is the secondary card belonged. |
| `secondaryCardNumber` | string | no | no | Secondary card number. |
| `secondaryCardCSCOrCVD` | string | no | no | The CSC or CVD of the secondary card. |
| `secondaryCardExpirationDate` | DateTime | no | no | The expiration date of the secondary card. |
| `nonEPaymentTypeId` | string | no | no | Non EPayment type. `Undefine` |
### Site Endpoints
#### Get sites' billing profiles
`GET /api/billing/siteBillingProfiles`
- #### Parameters
No parameters
- #### Response
The response is collection of [SiteBillingProfile](/docs/server-api-partner-billing#site-billing-profile-object) objects.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/siteBillingProfiles \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"siteId": 10000,
"firstName": "1",
"lastName": "1",
"companyName": "1",
"email": "1@1.com",
"phone": "13111111111",
"fax": "",
"countryOrRegion": "Afghanistan",
"stateOrProvince": "",
"city": "",
"mailingAddress": "1",
"postalOrZipCode": "",
"jobTitle": "",
"billTo": "1",
"isChargedAutomatically": true,
"isEPayment": true,
"primaryPaymentTypeId": "Amex",
"primaryPayPalBillingAgreementId": "",
"primaryPayPalEmail": "",
"nameOnPrimaryCard": "1",
"primaryCardNumber": "2222222222222",
"primaryCardCSCOrCVD": "123",
"primaryCardExpirationDate": "2024-12-01T00:00:00Z",
"secondaryPaymentTypeId": "Amex",
"secondaryPayPalBillingAgreementId": "",
"secondaryPayPalEmail": "",
"nameOnSecondaryCard": "2",
"secondaryCardNumber": "2222222222222",
"secondaryCardCSCOrCVD": "123",
"secondaryCardExpirationDate": "2024-12-01T00:00:00Z",
"nonEPaymentTypeId": "Undefine"
}
]
```
#### Get billing profile of a site
`GET /api/billing/siteBillingProfiles/{siteId}`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | yes | Unique identifier of the site. |
- #### Response
The response is [SiteBillingProfile](/docs/server-api-partner-billing#site-billing-profile-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/siteBillingProfiles/10000
-H 'Content-Type: application/json'
-X 'GET'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"siteId": 10000,
"firstName": "1",
"lastName": "1",
"companyName": "1",
"email": "1@1.com",
"phone": "13111111111",
"fax": "",
"countryOrRegion": "Afghanistan",
"stateOrProvince": "",
"city": "",
"mailingAddress": "1",
"postalOrZipCode": "",
"jobTitle": "",
"billTo": "1",
"isChargedAutomatically": true,
"isEPayment": true,
"primaryPaymentTypeId": "Amex",
"primaryPayPalBillingAgreementId": "",
"primaryPayPalEmail": "",
"nameOnPrimaryCard": "1",
"primaryCardNumber": "2222222222222",
"primaryCardCSCOrCVD": "123",
"primaryCardExpirationDate": "2024-12-01T00:00:00Z",
"secondaryPaymentTypeId": "Amex",
"secondaryPayPalBillingAgreementId": "",
"secondaryPayPalEmail": "",
"nameOnSecondaryCard": "2",
"secondaryCardNumber": "2222222222222",
"secondaryCardCSCOrCVD": "123",
"secondaryCardExpirationDate": "2024-12-01T00:00:00Z",
"nonEPaymentTypeId": "Undefine"
}
```
#### Create billing profile of a site
`POST /api/billing/siteBillingProfiles`
- #### Parameters
Request body
The request body contains data with the [SiteBillingProfile](/docs/server-api-partner-billing#site-billing-profile-object) structure.
- #### Response
The response is the [SiteBillingProfile](/docs/server-api-partner-billing#site-billing-profile-object) Object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/siteBillingProfiles \
-H 'Content-Type: application/json' \
-X 'POST' \
-D '{
"siteId": 10000,
"firstName": "1",
"lastName": "1",
"companyName": "1",
"email": "1@1.com",
"phone": "13111111111",
"fax": "",
"countryOrRegion": "Afghanistan",
"stateOrProvince": "",
"city": "",
"mailingAddress": "1",
"postalOrZipCode": "",
"jobTitle": "",
"billTo": "1",
"isChargedAutomatically": true,
"isEPayment": true,
"primaryPaymentTypeId": "Amex",
"primaryPayPalBillingAgreementId": "",
"primaryPayPalEmail": "",
"nameOnPrimaryCard": "1",
"primaryCardNumber": "2222222222222",
"primaryCardCSCOrCVD": "123",
"primaryCardExpirationDate": "2024-12-01T00:00:00Z",
"secondaryPaymentTypeId": "Amex",
"secondaryPayPalBillingAgreementId": "",
"secondaryPayPalEmail": "",
"nameOnSecondaryCard": "2",
"secondaryCardNumber": "2222222222222",
"secondaryCardCSCOrCVD": "123",
"secondaryCardExpirationDate": "2024-12-01T00:00:00Z",
"nonEPaymentTypeId": "Undefine"
...,
}'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"siteId": 10000,
"firstName": "1",
"lastName": "1",
"companyName": "1",
"email": "1@1.com",
"phone": "13111111111",
"fax": "",
"countryOrRegion": "Afghanistan",
"stateOrProvince": "",
"city": "",
"mailingAddress": "1",
"postalOrZipCode": "",
"jobTitle": "",
"billTo": "1",
"isChargedAutomatically": true,
"isEPayment": true,
"primaryPaymentTypeId": "Amex",
"primaryPayPalBillingAgreementId": "",
"primaryPayPalEmail": "",
"nameOnPrimaryCard": "1",
"primaryCardNumber": "2222222222222",
"primaryCardCSCOrCVD": "123",
"primaryCardExpirationDate": "2024-12-01T00:00:00Z",
"secondaryPaymentTypeId": "Amex",
"secondaryPayPalBillingAgreementId": "",
"secondaryPayPalEmail": "",
"nameOnSecondaryCard": "2",
"secondaryCardNumber": "2222222222222",
"secondaryCardCSCOrCVD": "123",
"secondaryCardExpirationDate": "2024-12-01T00:00:00Z",
"nonEPaymentTypeId": "Undefine"
}
```
#### Update billing profile of a site
`PUT /api/billing/siteBillingProfiles/{siteId}`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | yes | Unique identifier of the site. |
Request body
The request body contains data with the [SiteBillingProfile](/docs/server-api-partner-billing#site-billing-profile-object) structure.
- #### Response
The response is the [SiteBillingProfile](/docs/server-api-partner-billing#site-billing-profile-object) Object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/siteBillingProfiles/10000 \
-H "Content-Type: application/json" \
-X 'POST' \
-D '{
"siteId": 10000,
"firstName": "1",
"lastName": "1",
"companyName": "1",
"email": "1@1.com",
"phone": "13111111111",
"fax": "",
"countryOrRegion": "Afghanistan",
"stateOrProvince": "",
"city": "",
"mailingAddress": "1",
"postalOrZipCode": "",
"jobTitle": "",
"billTo": "1",
"isChargedAutomatically": true,
"isEPayment": true,
"primaryPaymentTypeId": "Amex",
"primaryPayPalBillingAgreementId": "",
"primaryPayPalEmail": "",
"nameOnPrimaryCard": "1",
"primaryCardNumber": "2222222222222",
"primaryCardCSCOrCVD": "123",
"primaryCardExpirationDate": "2024-12-01T00:00:00Z",
"secondaryPaymentTypeId": "Amex",
"secondaryPayPalBillingAgreementId": "",
"secondaryPayPalEmail": "",
"nameOnSecondaryCard": "2",
"secondaryCardNumber": "2222222222222",
"secondaryCardCSCOrCVD": "123",
"secondaryCardExpirationDate": "2024-12-01T00:00:00Z",
"nonEPaymentTypeId": "Undefine"
...,
}'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"siteId": 10000,
"firstName": "1",
"lastName": "1",
"companyName": "1",
"email": "1@1.com",
"phone": "13111111111",
"fax": "",
"countryOrRegion": "Afghanistan",
"stateOrProvince": "",
"city": "",
"mailingAddress": "1",
"postalOrZipCode": "",
"jobTitle": "",
"billTo": "1",
"isChargedAutomatically": true,
"isEPayment": true,
"primaryPaymentTypeId": "Amex",
"primaryPayPalBillingAgreementId": "",
"primaryPayPalEmail": "",
"nameOnPrimaryCard": "1",
"primaryCardNumber": "2222222222222",
"primaryCardCSCOrCVD": "123",
"primaryCardExpirationDate": "2024-12-01T00:00:00Z",
"secondaryPaymentTypeId": "Amex",
"secondaryPayPalBillingAgreementId": "",
"secondaryPayPalEmail": "",
"nameOnSecondaryCard": "2",
"secondaryCardNumber": "2222222222222",
"secondaryCardCSCOrCVD": "123",
"secondaryCardExpirationDate": "2024-12-01T00:00:00Z",
"nonEPaymentTypeId": "Undefine"
}
```
## Subscription
You need the `Manage Site` permission to manage `Site's` subscriptions.
- `GET /api/billing/subscriptions` - [Get collection of subscriptions](/docs/server-api-partner-billing#get-collection-of-subscriptions)
- `GET /api/billing/subscriptions/{id}` - [Get a subscription](/docs/server-api-partner-billing#get-a-subscription)
- `GET /api/billing/subscriptions/{id}` - [Update a subscription](/docs/server-api-partner-billing#update-a-subscription)
- `POST /api/billing/subscriptions:new` - [Add a subscription](/docs/server-api-partner-billing#add-a-subscription)
- `POST /api/billing/subscriptions:calculateNew` - [Preview adding a subscription](/docs/server-api-partner-billing#preview-adding-a-subscription)
- `POST /api/billing/subscriptions:changes` - [Change subscriptions](/docs/server-api-partner-billing#change-subscriptions)
- `POST /api/billing/subscriptions/{id}:cancel` - [Cancel a subscriptions](/docs/server-api-partner-billing#cancel-a-subscription)
- `POST /api/billing/subscriptions/{id}:calculateCancel` - [Preview cancelling a subscriptions](/docs/server-api-partner-billing#preview-cancelling-a-subscription)
- `POST /api/billing/subscriptions/{id}:switchPlan` - [Switch a subscription plan](/docs/server-api-partner-billing#preview-switching-a-subscription-plan)
- `POST /api/billing/subscriptions/{id}:calculateSwitchPlan` - [Preview switching a subscription plan](/docs/server-api-partner-billing#preview-switching-a-subscription-plan)
- `POST /api/billing/subscriptions/{id}/productFeaturePoints` - [Add product feature points to a subscription](/docs/server-api-partner-billing#add-product-feature-points-to-a-subscription)
### Subscription Object JSON format
#### Subscription Object
`Subscription` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | yes | no | Subscription identifier. |
| `planId` | int | no | no | Plan identifier. |
| `siteId` | int | no | no | Site identifier. |
| `name` | string | no | no | Subscription name. |
| `isServicePlan` | bool | no | no | Is service plan. |
| `canBeCancelledByCustomer` | bool | no | no | Wether to allow customers to cancal by themselfs. |
| `createdTime` | DateTime | yes | no | The time when created. |
| `subscriptionPricingModels` | [`SubscriptionPricingModel`](/docs/server-api-partner-billing#subscription-pricing-model-object) | no | no | Chatbot engine identifier. |
| `lineItems` | [`InvoiceLineItem`](/docs/server-api-partner-billing#invoice-line-item-object)[] | no | no | Invoice line items. |
#### Subscription Output Object
`SubscriptionOutput` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `srcAmount` | decimal | no | no | SRC amount. |
| `srcTax` | decimal | no | no | SRC tax. |
| `newAmount` | decimal | no | no | New amount. |
| `newTax` | decimal | no | no | New tax. |
| `chargeResult` | bool | no | no | Charge result. |
#### Subscription Change Dto Object
`SubscriptionChangeDto` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `actionType` | enum | no | no | Action type. Include `AddSubscription`(0), `SwitchSubscription`(1), `EditPricingModel`(2), `CancelSubscription`(3), `UpgradeSubscription`(4), `DowngradeSubscription`(5) |
| `srcSubscriptionId` | Guid | no | no | Source subscription identifier. |
| `subscription` | [`SubscriptionDto`](/docs/server-api-partner-billing#subscription-dto-object) | no | no | Subscription info. |
#### Subscription Dto Object
`SubscriptionDto` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | no | no | Subscription identifier. |
| `planId` | int | no | yes | Plan identifier. |
| `siteId` | int | no | no | Site identifier. |
| `name` | int | no | yes | Name. |
| `isServicePlan` | bool | no | yes | Is service plan. |
| `canBeCancelledByCustomer` | bool | no | yes | Wether to allow customers to cancel by themselves. |
| `subscriptionPricingModels` | [`SubscriptionPricingModelDto`](/docs/server-api-partner-billing#subscription-pricing-model-dto)[] | no | yes | Wether to allow customers to cancel by themselves. |
#### Subscription Pricing Model Dto Object
`SubscriptionPricingModelDto` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | no | no | Identifier. |
| `subscriptionId` | Guid | no | no | Subscription identifier. |
| `siteId` | int | no | no | Site identifier. |
| `name` | int | no | yes | Name. |
| `pricingModel` | string | no | no | Pricing model. |
| `freeQuantity` | int | no | no | Free quantity. |
| `maxQuantity` | int | no | no | Max quantity. |
| `unitType` | string | no | no | Unit type. |
| `volumeType` | string | no | no | Volume type. |
| `isServiceStoppedWhenBotActionsQuotaExceeded` | bool | no | no | Is service stopped when bot actions quota exceeded. |
| `purchasedQuantity` | int | no | no | Purchased quantity. |
| `purchasedOverageUnit` | int | no | no | Purchased overage unit. |
| `purchasedOverageQuantity` | int | no | no | Purchased overage quantity. |
| `isDeleted` | bool | no | no | Is deleted. |
| `subscriptionPriceSegmentByAgents` | [`SubscriptionPriceSegmentByAgentDto`](/docs/server-api-partner-billing#subscription-price-segment-by-agent-dto-object)[] | no | no | Collection of suscription price segment by agents. |
| `subscriptionPriceSegmentByVolumes` | [`SubscriptionPriceSegmentByVolumeDto`](/docs/server-api-partner-billing#subscription-price-segment-by-volume-dto-object)[] | no | no | Collection of suscription price segment by volumes. |
| `subscriptionPriceByUnit` | [`SubscriptionPriceByUnitDto`](/docs/server-api-partner-billing#subscription-price-by-unit-dto-object) | no | no | Suscription price by unit. |
| `subscriptionPriceWithFlatFee` | [`SubscriptionPriceWithFlatFeeDto`](/docs/server-api-partner-billing#subscription-price-with-flat-fee-dto-object) | no | no | Suscription price with flat fee. |
#### Subscription Price Segment By Agent Dto Object
`SubscriptionPriceSegmentByAgentDto` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | yes | no | Subscription price segment by agent identifier. |
| `siteId` | int | no | no | Site identifier. |
| `subscriptionPricingModelId` | Guid | yes | no | Subscription pricing model identifier. |
| `from` | int | no | no | The minimum quantity of agents. |
| `to` | int | no | no | The maximum quantity of agents. |
| `monthlyPrice` | decimal | no | no | Monthly price. |
| `quarterlyPrice` | decimal | no | no | Quarterly price. |
| `semiAnnualPrice` | decimal | no | no | Semi annual price. |
| `annualPrice` | decimal | no | no | Annual price. |
| `monthlyPriceDiscount` | decimal | no | no | Monthly price discount. |
| `quarterlyPriceDiscount` | decimal | no | no | Quarterly price discount. |
| `semiAnnualPriceDiscount` | decimal | no | no | Semi annual price discount. |
| `annualPriceDiscount` | decimal | no | no | Annual price discount. |
#### Subscription Price Segment By Volume Dto Object
`SubscriptionPriceSegmentByVolumnDto` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | yes | no | Subscription price segment by agent identifier. |
| `siteId` | int | no | no | Site identifier. |
| `subscriptionPricingModelId` | Guid | yes | no | Subscription pricing model identifier. |
| `quotaPerMonth` | int | no | no | Monthly quota. |
| `monthlyPrice` | decimal | no | no | Monthly price. |
| `quarterlyPrice` | decimal | no | no | Quarterly price. |
| `semiAnnualPrice` | decimal | no | no | Semi annual price. |
| `annualPrice` | decimal | no | no | Annual price. |
| `monthlyPriceDiscount` | decimal | no | no | Monthly price discount. |
| `quarterlyPriceDiscount` | decimal | no | no | Quarterly price discount. |
| `semiAnnualPriceDiscount` | decimal | no | no | Semi annual price discount. |
| `annualPriceDiscount` | decimal | no | no | Annual price discount. |
| `isOverageQuotaAddedByCustomerAllowed` | bool | no | no | Wether to allow customers to add overage quota by themselfs. |
| `overageQuota` | int | no | no | Monthly quota. |
| `overageUnitPrice` | decimal | no | no | Overage unit price. |
| `overageUnitPriceDiscount` | decimal | no | no | Overage unit price discount. |
| `isSelected` | bool | no | no | Is selected. |
#### Subscription Price By Unit Dto Object
`SubscriptionPriceByUnitDto` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `siteId` | int | no | no | Site identifier. |
| `subscriptionPricingModelId` | Guid | yes | no | Subscription pricing model identifier. |
| `oneTimeFee` | decimal | no | no | One-off fee. |
| `monthlyPrice` | decimal | no | no | Monthly price. |
| `quarterlyPrice` | decimal | no | no | Quarterly price. |
| `semiAnnualPrice` | decimal | no | no | Semi annual price. |
| `annualPrice` | decimal | no | no | Annual price. |
| `oneTimeFeeDiscount` | decimal | no | no | One-off fee discount. |
| `monthlyPriceDiscount` | decimal | no | no | Monthly price discount. |
| `quarterlyPriceDiscount` | decimal | no | no | Quarterly price discount. |
| `semiAnnualPriceDiscount` | decimal | no | no | Semi annual price discount. |
| `annualPriceDiscount` | decimal | no | no | Annual price discount. |
#### Subscription Price With Flat Fee Dto Object
`SubscriptionPriceWithFlatFeeDto` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `siteId` | int | no | no | Site identifier. |
| `subscriptionPricingModelId` | Guid | yes | no | Subscription pricing model identifier. |
| `monthlyPrice` | decimal | no | no | Monthly price. |
| `quarterlyPrice` | decimal | no | no | Quarterly price. |
| `semiAnnualPrice` | decimal | no | no | Semi annual price. |
| `annualPrice` | decimal | no | no | Annual price. |
| `monthlyPriceDiscount` | decimal | no | no | Monthly price discount. |
| `quarterlyPriceDiscount` | decimal | no | no | Quarterly price discount. |
| `semiAnnualPriceDiscount` | decimal | no | no | Semi annual price discount. |
| `annualPriceDiscount` | decimal | no | no | Annual price discount. |
#### Subscriptions Change Output Object
`SubscriptionsChangeOutput` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `amount` | decimal | no | no | Amount. |
| `tax` | decimal | no | no | Tax. |
| `invoiceId` | Guid | no | no | Invoice identifier. |
#### Invoice Line Item Object
`InvoiceLineItem` definition
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | no | no | Invoice line item identifier. |
| `invoiceId` | Guid | no | no | Invoice identifier. |
| `siteId` | int | no | no | Site identifier. |
| `subscriptionPricingModelId` | Guid | yes | no | Subscription pricing model identifier. |
| `profitCenterId` | Guid | yes | no | Profit center identifier. |
| `name` | string | no | no | Invoice line item name. |
| `unitPrice` | decimal | no | no | Unit price. |
| `unitPriceToRound` | decimal | no | no | Unit price to round. |
| `unitPriceToRoundWithUnit` | string | no | no | Unit price to round with unit. |
| `unit` | string | no | no | Unit. |
| `quantity` | int | no | no | Quantity. |
| `discount` | decimal | no | no | Discount. |
| `discountToRound` | string | no | no | Discount to round. |
| `discountRate` | string | no | no | Discount rate. |
| `serviceStartDate` | DateTime | no | yes | Service start date. |
| `serviceEndDate` | DateTime | no | yes | Service end date. |
| `months` | string | no | no | Months. |
| `licenseTerm` | string | no | no | License term. |
| `order` | int | no | no | Order. |
| `type` | string | no | no | Type. |
| `amount` | decimal | no | no | Amount. |
| `amountToRound` | string | no | no | Amount to round. |
| `taxTotal` | decimal | no | no | Tax total. |
| `tax` | decimal | no | no | Tax. |
| `taxToRound` | string | no | no | Tax to round. |
| `lineTotal` | decimal | no | no | Line total. |
| `lineTotalToRound` | string | no | no | Line total to round. |
| `lineTotalWithDiscountToRound` | string | no | no | Line total with discount to round. |
| `cancelledInvoiceLineItemId` | Guid | no | no | Cancelled invoice line item related. |
| `paidAmount` | decimal | no | no | Paid amount. |
| `amountUsdToPay` | decimal | no | no | Amount USD to pay. |
| `amountUsdToRefund` | decimal | no | no | Amount USD to refund. |
| `serviceDays` | int | no | no | Service days. |
### Subscription Endpoints
#### Get collection of subscriptions
`GET /api/billing/subscriptions`
- #### Parameters
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | no | Unique identifier of a `Site`. |
- #### Response
The response is collection of [Subscription](/docs/server-api-partner-billing#subscription-object) objects.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/subscriptions \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "895a5d94-97e8-410f-8ff3-53d8038e908a",
"planId": 211,
"siteId": 10000,
"name": "Comm100 Omnichannel Business",
"isServicePlan": false,
"canBeCancelledByCustomer": false,
"createdTime": "2022-02-17T06:44:51.2766667Z",,
"isShowUpgrade": false,
"isOneTimeFeePlan": false,
"isShowCancel": false
"subscriptionPricingModels": [
{
"id": "35ed9d79-1a5c-418b-b8c1-77c63e7083d7",
"siteId": 10000,
"subscriptionId": "895a5d94-97e8-410f-8ff3-53d8038e908a",
"name": "Omnichannel business",
"pricingModel": "perAgent",
"freeQuantity": 0,
"maxQuantity": 500,
"unitType": "additionalTwitterAccount",
"volumeType": "botActionPerMonth",
"isServiceStoppedWhenBotActionsQuotaExceeded": false,
"purchasedQuantity": 0,
"purchasedOverageQuantity": 0,
"subscriptionPriceSegmentByAgents": [
{
"id": "e7796bab-7c5f-4ca7-a9b6-1ef97aeb6091",
"subscriptionPricingModelId": "35ed9d79-1a5c-418b-b8c1-77c63e7083d7",
"siteId": 10000,
"from": 1,
"to": 5,
"monthlyPrice": 89.00,
"quarterlyPrice": 267.00,
"semiAnnualPrice": 534.00,
"annualPrice": 979.00,
"monthlyPriceDiscount": 0.10,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00
}
],
"subscriptionPriceSegmentByVolumes": [
{
"id": "8a206344-4b07-4e3f-b736-aa6f1b922858",
"subscriptionPricingModelId": "add5cdab-9566-4140-f6c7-08da12bc6f77",
"siteId": 10000,
"quotaPerMonth": 10000,
"monthlyPrice": 0.00,
"quarterlyPrice": 0.00,
"semiAnnualPrice": 0.00,
"annualPrice": 0.00,
"isOverageQuotaAddedByCustomerAllowed": false,
"overageQuota": 2500,
"overageUnitPrice": 49.00,
"monthlyPriceDiscount": 0.00,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00,
"overageUnitPriceDiscount": 0.00,
"isSelected": true
}
],
"subscriptionPriceWithFlatFee": {
"subscriptionPricingModelId": "68d961ca-865f-4557-f6c8-08da12bc6f77",
"siteId": 10000,
"monthlyPrice": 599.00,
"quarterlyPrice": 1198.00,
"semiAnnualPrice": 3594.00,
"annualPrice": 7188.00,
"monthlyPriceDiscount": 0.00,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00
}
}
],
"lineItems": [
{
"id": "00000000-0000-0000-0000-000000000000",
"invoiceId": "00000000-0000-0000-0000-000000000000",
"subscriptionPricingModelId": "35ed9d79-1a5c-418b-b8c1-77c63e7083d7",
"profitCenterId": "02000000-0000-0000-0000-271000002710",
"siteId": 0,
"name": "Comm100 Omnichannel Business - Omnichannel business",
"unitPrice": 979.00,
"unitPriceToRound": "979.00",
"unitPriceToRoundWithUnit": "979.00/Year",
"unit": "Year",
"quantity": 5,
"discount": 0.0000,
"discountToRound": "0.00",
"discountRate": "",
"serviceStartDate": "2022-04-15T00:00:00Z",
"serviceEndDate": "2023-04-14T00:00:00Z",
"months": "12 Months",
"licenseTerm": "12 Months
(2022/04/15-2023/04/14)",
"order": 0,
"type": "changeSiteBillingPeriod",
"isDeleted": false,
"invoiceLineItemTaxs": [],
"amount": 4895.0000,
"amountToRound": "4,895.00",
"taxTotal": 0.0,
"tax": 0.0,
"taxToRound": "0.00",
"lineTotal": 4895.0000,
"lineTotalToRound": "4,895.00",
"lineTotalWithDiscountToRound": "4,895.00",
"cancelledInvoiceLineItemId": "00000000-0000-0000-0000-000000000000",
"paidAmount": 0.0,
"amountUsdToPay": 0.0,
"amountUsdToRefund": 0.0,
"serviceDays": 365
}
]
}
]
```
#### Get a subscription
`GET /api/billing/subscriptions/{id}`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | Guid | yes | Unique identifier of the subscription. |
- #### Response
The response is [Subscription](/docs/server-api-partner-billing#subscription-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/subscriptions/895a5d94-97e8-410f-8ff3-53d8038e908a \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "895a5d94-97e8-410f-8ff3-53d8038e908a",
"planId": 211,
"siteId": 10000,
"name": "Comm100 Omnichannel Business",
"isServicePlan": false,
"canBeCancelledByCustomer": false,
"createdTime": "2022-02-17T06:44:51.2766667Z",,
"isShowUpgrade": false,
"isOneTimeFeePlan": false,
"isShowCancel": false
"subscriptionPricingModels": [
{
"id": "35ed9d79-1a5c-418b-b8c1-77c63e7083d7",
"siteId": 10000,
"subscriptionId": "895a5d94-97e8-410f-8ff3-53d8038e908a",
"name": "Omnichannel business",
"pricingModel": "perAgent",
"freeQuantity": 0,
"maxQuantity": 500,
"unitType": "additionalTwitterAccount",
"volumeType": "botActionPerMonth",
"isServiceStoppedWhenBotActionsQuotaExceeded": false,
"purchasedQuantity": 0,
"purchasedOverageQuantity": 0,
"subscriptionPriceSegmentByAgents": [
{
"id": "e7796bab-7c5f-4ca7-a9b6-1ef97aeb6091",
"subscriptionPricingModelId": "35ed9d79-1a5c-418b-b8c1-77c63e7083d7",
"siteId": 10000,
"from": 1,
"to": 5,
"monthlyPrice": 89.00,
"quarterlyPrice": 267.00,
"semiAnnualPrice": 534.00,
"annualPrice": 979.00,
"monthlyPriceDiscount": 0.10,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00
}
],
"subscriptionPriceSegmentByVolumes": [
{
"id": "8a206344-4b07-4e3f-b736-aa6f1b922858",
"subscriptionPricingModelId": "add5cdab-9566-4140-f6c7-08da12bc6f77",
"siteId": 10000,
"quotaPerMonth": 10000,
"monthlyPrice": 0.00,
"quarterlyPrice": 0.00,
"semiAnnualPrice": 0.00,
"annualPrice": 0.00,
"isOverageQuotaAddedByCustomerAllowed": false,
"overageQuota": 2500,
"overageUnitPrice": 49.00,
"monthlyPriceDiscount": 0.00,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00,
"overageUnitPriceDiscount": 0.00,
"isSelected": true
}
],
"subscriptionPriceWithFlatFee": {
"subscriptionPricingModelId": "68d961ca-865f-4557-f6c8-08da12bc6f77",
"siteId": 10000,
"monthlyPrice": 599.00,
"quarterlyPrice": 1198.00,
"semiAnnualPrice": 3594.00,
"annualPrice": 7188.00,
"monthlyPriceDiscount": 0.00,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00
}
}
],
"lineItems": [
{
"id": "00000000-0000-0000-0000-000000000000",
"invoiceId": "00000000-0000-0000-0000-000000000000",
"subscriptionPricingModelId": "35ed9d79-1a5c-418b-b8c1-77c63e7083d7",
"profitCenterId": "02000000-0000-0000-0000-271000002710",
"siteId": 0,
"name": "Comm100 Omnichannel Business - Omnichannel business",
"unitPrice": 979.00,
"unitPriceToRound": "979.00",
"unitPriceToRoundWithUnit": "979.00/Year",
"unit": "Year",
"quantity": 5,
"discount": 0.0000,
"discountToRound": "0.00",
"discountRate": "",
"serviceStartDate": "2022-04-15T00:00:00Z",
"serviceEndDate": "2023-04-14T00:00:00Z",
"months": "12 Months",
"licenseTerm": "12 Months
(2022/04/15-2023/04/14)",
"order": 0,
"type": "changeSiteBillingPeriod",
"isDeleted": false,
"invoiceLineItemTaxs": [],
"amount": 4895.0000,
"amountToRound": "4,895.00",
"taxTotal": 0.0,
"tax": 0.0,
"taxToRound": "0.00",
"lineTotal": 4895.0000,
"lineTotalToRound": "4,895.00",
"lineTotalWithDiscountToRound": "4,895.00",
"cancelledInvoiceLineItemId": "00000000-0000-0000-0000-000000000000",
"paidAmount": 0.0,
"amountUsdToPay": 0.0,
"amountUsdToRefund": 0.0,
"serviceDays": 365
}
]
}
```
#### Update a subscription
`PUT /api/billing/subscriptions/{id}`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | Guid | yes | Unique identifier of the subscription. |
Request body
The request body contains data with the [Subscription](/docs/server-api-partner-billing#subscription-object) structure.
- #### Response
The response is [Subscription](/docs/server-api-partner-billing#subscription-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/subscriptions/895a5d94-97e8-410f-8ff3-53d8038e908a \
-H 'Content-Type: application/json' \
-X 'PUT' \
-D '{
"name": "Comm100 Omnichannel Business",
"isServicePlan": false,
"canBeCancelledByCustomer": false,
"isShowUpgrade": false,
"isOneTimeFeePlan": false,
"isShowCancel": false,
...
}'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "895a5d94-97e8-410f-8ff3-53d8038e908a",
"planId": 211,
"siteId": 10000,
"name": "Comm100 Omnichannel Business",
"isServicePlan": false,
"canBeCancelledByCustomer": false,
"createdTime": "2022-02-17T06:44:51.2766667Z",
"isShowUpgrade": false,
"isOneTimeFeePlan": false,
"isShowCancel": false
"subscriptionPricingModels": [
{
"id": "35ed9d79-1a5c-418b-b8c1-77c63e7083d7",
"siteId": 10000,
"subscriptionId": "895a5d94-97e8-410f-8ff3-53d8038e908a",
"name": "Omnichannel business",
"pricingModel": "perAgent",
"freeQuantity": 0,
"maxQuantity": 500,
"unitType": "additionalTwitterAccount",
"volumeType": "botActionPerMonth",
"isServiceStoppedWhenBotActionsQuotaExceeded": false,
"purchasedQuantity": 0,
"purchasedOverageQuantity": 0,
"subscriptionPriceSegmentByAgents": [
{
"id": "e7796bab-7c5f-4ca7-a9b6-1ef97aeb6091",
"subscriptionPricingModelId": "35ed9d79-1a5c-418b-b8c1-77c63e7083d7",
"siteId": 10000,
"from": 1,
"to": 5,
"monthlyPrice": 89.00,
"quarterlyPrice": 267.00,
"semiAnnualPrice": 534.00,
"annualPrice": 979.00,
"monthlyPriceDiscount": 0.10,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00
}
],
"subscriptionPriceSegmentByVolumes": [
{
"id": "8a206344-4b07-4e3f-b736-aa6f1b922858",
"subscriptionPricingModelId": "add5cdab-9566-4140-f6c7-08da12bc6f77",
"siteId": 10000,
"quotaPerMonth": 10000,
"monthlyPrice": 0.00,
"quarterlyPrice": 0.00,
"semiAnnualPrice": 0.00,
"annualPrice": 0.00,
"isOverageQuotaAddedByCustomerAllowed": false,
"overageQuota": 2500,
"overageUnitPrice": 49.00,
"monthlyPriceDiscount": 0.00,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00,
"overageUnitPriceDiscount": 0.00,
"isSelected": true
}
],
"subscriptionPriceWithFlatFee": {
"subscriptionPricingModelId": "68d961ca-865f-4557-f6c8-08da12bc6f77",
"siteId": 10000,
"monthlyPrice": 599.00,
"quarterlyPrice": 1198.00,
"semiAnnualPrice": 3594.00,
"annualPrice": 7188.00,
"monthlyPriceDiscount": 0.00,
"quarterlyPriceDiscount": 0.00,
"semiAnnualPriceDiscount": 0.00,
"annualPriceDiscount": 0.00
}
}
],
"lineItems": [
{
"id": "00000000-0000-0000-0000-000000000000",
"invoiceId": "00000000-0000-0000-0000-000000000000",
"subscriptionPricingModelId": "35ed9d79-1a5c-418b-b8c1-77c63e7083d7",
"profitCenterId": "02000000-0000-0000-0000-271000002710",
"siteId": 0,
"name": "Comm100 Omnichannel Business - Omnichannel business",
"unitPrice": 979.00,
"unitPriceToRound": "979.00",
"unitPriceToRoundWithUnit": "979.00/Year",
"unit": "Year",
"quantity": 5,
"discount": 0.0000,
"discountToRound": "0.00",
"discountRate": "",
"serviceStartDate": "2022-04-15T00:00:00Z",
"serviceEndDate": "2023-04-14T00:00:00Z",
"months": "12 Months",
"licenseTerm": "12 Months
(2022/04/15-2023/04/14)",
"order": 0,
"type": "changeSiteBillingPeriod",
"isDeleted": false,
"invoiceLineItemTaxs": [],
"amount": 4895.0000,
"amountToRound": "4,895.00",
"taxTotal": 0.0,
"tax": 0.0,
"taxToRound": "0.00",
"lineTotal": 4895.0000,
"lineTotalToRound": "4,895.00",
"lineTotalWithDiscountToRound": "4,895.00",
"cancelledInvoiceLineItemId": "00000000-0000-0000-0000-000000000000",
"paidAmount": 0.0,
"amountUsdToPay": 0.0,
"amountUsdToRefund": 0.0,
"serviceDays": 365
}
]
}
```
#### Add a subscription
`POST /api/billing/subscriptions:new`
- #### Parameters
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | yes | Unique identifier of the Site. |
| `agentId` | Guid | yes | Unique identifier of the Agent. |
Body Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `billingPeriod` | int | no | Billing period. |
| `planId` | int | yes | Plan identifier. |
| `overageQuota` | int | no | Overage quota. |
| `overageQuotaUnit` | int | no | Overage quota unit. |
| `purchasedQuantityByUnit` | int | no | Purchased quantity by unit. |
| `selectedVolumeId` | Guid | no | Selected volume identifier. |
| `name` | string | yes | Name. |
- #### Response
The response is [SubscriptionOutput](/docs/server-api-partner-billing#subscription-output-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/subscriptions:new \
-H 'Content-Type: application/json' \
-X 'POST' \
-D '{"billingPeriod": 0, "planId": 10, "overageQuota": 1, "overageQuotaUnit": 1, "purchasedQuantityByUnit": 1, "selectedVolumeId": "895a5d94-97e8-410f-8ff3-53d8038e908a", "name": "name"}'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"srcAmount": 211.11,
"srcTax": 1.00,
"newAmount": 3.33,
"newTax": 1.00,
"chargeResult": true
}
```
#### Preview adding a subscription
`POST /api/billing/subscriptions:calculateNew`
- #### Parameters
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | yes | Unique identifier of the Site. |
| `agentId` | Guid | yes | Unique identifier of the Agent. |
Body Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `billingPeriod` | int | no | Billing period. |
| `planId` | int | yes | Plan identifier. |
| `overageQuota` | int | no | Overage quota. |
| `overageQuotaUnit` | int | no | Overage quota unit. |
| `purchasedQuantityByUnit` | int | no | Purchased quantity by unit. |
| `selectedVolumeId` | Guid | no | Selected volume identifier. |
| `name` | string | yes | Name. |
- #### Response
The response is [SubscriptionOutput](/docs/server-api-partner-billing#subscription-output-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/subscriptions:calculateNew \
-H 'Content-Type: application/json' \
-X 'POST' \
-D '{"billingPeriod": 0, "planId": 10, "overageQuota": 1, "overageQuotaUnit": 1, "purchasedQuantityByUnit": 1, "selectedVolumeId": "895a5d94-97e8-410f-8ff3-53d8038e908a", "name": "name"}'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"srcAmount": 211.11,
"srcTax": 1.00,
"newAmount": 3.33,
"newTax": 1.00,
"chargeResult": true
}
```
#### Change subscriptions
`POST /api/billing/subscriptions:changes`
- #### Parameters
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | yes | Unique identifier of the Site. |
Body Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ifCreateInvoice` | bool | yes | If create invoice. |
| `isDraft` | bool | yes | Is draft. |
| `purchasedAgents` | int | no | Purchased agents. |
| `subscriptionChangeDtos` | [`SubscriptionChangeDto`](/docs/server-api-partner-billing#subscription-change-dto-object)[] | no | Collection of subscription dtos. |
- #### Response
The response is [SubscriptionsChangeOutput](/docs/server-api-partner-billing#subscriptions-change-output-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/subscriptions:new \
-H 'Content-Type: application/json' \
-X 'POST' \
-D '{"ifCreateInvoice": true, "isDraft": false, "purchasedAgents": 1, "subscriptionChangeDtos": []}'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"amount": 211.11,
"tax": 1.00,
"invoiceId": "d95a5d94-97e8-410f-8ff3-53d8038e908a"
}
```
#### Preview changing subscriptions
`POST /api/billing/subscriptions:calculateChanges`
- #### Parameters
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | yes | Unique identifier of the Site. |
Body Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ifCreateInvoice` | bool | yes | If create invoice. |
| `isDraft` | bool | yes | Is draft. |
| `purchasedAgents` | int | no | Purchased agents. |
| `subscriptionChangeDtos` | [`SubscriptionChangeDto`](/docs/server-api-partner-billing#subscription-change-dto-object)[] | no | Collection of subscription dtos. |
- #### Response
The response is [SubscriptionsChangeOutput](/docs/server-api-partner-billing#subscriptions-change-output-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/subscriptions:calculateNew
-H 'Content-Type: application/json'
-X 'POST'
-D '{"ifCreateInvoice": false, "isDraft": false, "purchasedAgents": 1, "subscriptionChangeDtos": []}'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"amount": 211.11,
"tax": 1.00,
"invoiceId": "00000000-0000-0000-0000-000000000000"
}
```
#### Cancel a subscription
`POST /api/billing/subscriptions:calculateChanges`
- #### Parameters
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | yes | Unique identifier of the Site. |
Body Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ifCreateInvoice` | bool | yes | If create invoice. |
| `isDraft` | bool | yes | Is draft. |
| `purchasedAgents` | int | no | Purchased agents. |
| `subscriptionChangeDtos` | [`SubscriptionChangeDto`](/docs/server-api-partner-billing#subscription-change-dto-object)[] | no | Collection of subscription dtos. |
- #### Response
The response is [SubscriptionOutput](/docs/server-api-partner-billing#subscription-output-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/subscriptions/895a5d94-97e8-410f-8ff3-53d8038e908a:cancel \
-H 'Content-Type: application/json' \
-X 'POST' \
-D '{"ifCreateInvoice": false, "isDraft": false, "purchasedAgents": 1, "subscriptionChangeDtos": []}'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"amount": 211.11,
"tax": 1.00,
"invoiceId": "00000000-0000-0000-0000-000000000000"
}
```
#### Preview cancelling a subscription
`POST /api/billing/subscriptions/{id}:calculateCancel`
- #### Parameters
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | yes | Unique identifier of the Site. |
| `agentId` | Guid | yes | Unique identifier of the Agent. |
Body Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `cancelReason` | string | no | Cancel reason. |
| `comment` | string | yes | Comment. |
- #### Response
The response is [SubscriptionOutput](/docs/server-api-partner-billing#subscription-output-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/subscriptions/895a5d94-97e8-410f-8ff3-53d8038e908a:calculateCancel \
-H 'Content-Type: application/json' \
-X 'POST' \
-D '{"cancelReason": "reason", "comment": "comment"}'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"srcAmount": 211.11,
"srcTax": 1.00,
"newAmount": 3.33,
"newTax": 1.00,
"chargeResult": true
}
```
#### Switch a subscription plan
`POST /api/billing/subscriptions/{id}:switchPlan`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | int | yes | Unique identifier of the `Subscription`. |
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | yes | Unique identifier of the Site. |
| `agentId` | Guid | yes | Unique identifier of the Agent. |
Body Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `billingPeriod` | int | no | Billing period. |
| `planId` | int | yes | Plan identifier. |
| `overageQuota` | int | no | Overage quota. |
| `overageQuotaUnit` | int | no | Overage quota unit. |
| `purchasedQuantityByUnit` | int | no | Purchased quantity by unit. |
| `selectedVolumeId` | Guid | no | Selected volume identifier. |
| `name` | string | yes | Name. |
- #### Response
The response is [SubscriptionOutput](/docs/server-api-partner-billing#subscription-output-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/subscriptions/{id}:switchPlan \
-H 'Content-Type: application/json' \
-X 'POST' \
-D '{"billingPeriod": 0, "planId": 10, "overageQuota": 1, "overageQuotaUnit": 1, "purchasedQuantityByUnit": 1, "selectedVolumeId": "895a5d94-97e8-410f-8ff3-53d8038e908a", "name": "name"}'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"srcAmount": 211.11,
"srcTax": 1.00,
"newAmount": 3.33,
"newTax": 1.00,
"chargeResult": true
}
```
#### Preview switching a subscription plan
`POST /api/billing/subscriptions/{id}:calculateSwitchPlan`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | int | yes | Unique identifier of the `Subscription`. |
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | yes | Unique identifier of the Site. |
| `agentId` | Guid | yes | Unique identifier of the Agent. |
Body Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `billingPeriod` | int | no | Billing period. |
| `planId` | int | yes | Plan identifier. |
| `overageQuota` | int | no | Overage quota. |
| `overageQuotaUnit` | int | no | Overage quota unit. |
| `purchasedQuantityByUnit` | int | no | Purchased quantity by unit. |
| `selectedVolumeId` | Guid | no | Selected volume identifier. |
| `name` | string | yes | Name. |
- #### Response
The response is [SubscriptionOutput](/docs/server-api-partner-billing#subscription-output-object) object.
- #### Example
Using curl
```
curl -H "Content-Type: application/json" -X POST https://partner.comm100.io/api/billing/subscriptions/895a5d94-97e8-410f-8ff3-53d8038e908a:calculateSwitchPlan -D '{"billingPeriod": 0, "planId": 10, "overageQuota": 1, "overageQuotaUnit": 1, "purchasedQuantityByUnit": 1, "selectedVolumeId": "895a5d94-97e8-410f-8ff3-53d8038e908a", "name": "name"}'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"srcAmount": 211.11,
"srcTax": 1.00,
"newAmount": 3.33,
"newTax": 1.00,
"chargeResult": true
}
```
#### Add product feature points to a subscription
`POST /api/billing/subscriptions/{id}/productFeaturePoints`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | int | yes | Unique identifier of the `Subscription`. |
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | yes | Unique identifier of the Site. |
Body Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `productId` | string | yes | Product identifier. |
| `featurePointItems` | string[] | yes | Collection of feature point items. |
- #### Response
No response.
- #### Example
Using curl
```
curl -H "Content-Type: application/json" -X POST https://partner.comm100.io/api/billing/subscriptions/895a5d94-97e8-410f-8ff3-53d8038e908a/productFeaturePoints -D '{"productId": "AdditionalTwitterAccount", "featurePointItems": ["AgentAssist"]}'
```
Response
```
HTTP/1.1 200 OK
```
## Subscription Product Relation
You need the `Manage Feature` permission to manage subscription product relation.
- `GET /api/billing/subscriptionProductRelations` - [Get collection of subscription product relations](/docs/server-api-partner-billing#get-collection-of-subscription-product-relations)
### Subscription Product Relation Object JSON format
#### Subscription Product Relation Object
`SubscriptionProductRelation` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | yes | no | Identifier. |
| `subscriptionId` | Guid | no | yes | Subscription identifier. |
| `productId` | string | no | yes | Product identifier. |
| `siteId` | int | no | no | Site identifier. |
| `subscriptionProductFeaturePointRelations` | [SubscriptionProductFeaturePointRelation](/docs/server-api-partner-billing#subscription-product-feature-point-relation-object)[] | no | no | The collection of subscription product feature point relations. |
#### Subscription Product Feature Point Relation Object
`SubscriptionProductFeaturePointRelation` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | yes | no | Identifier. |
| `subscriptionProductRelationId` | Guid | no | yes | Subscription product relation id identifier. |
| `featurePointItemId` | string | no | yes | Feature point item identifier. |
| `siteId` | int | no | no | Site identifier. |
### Subscription Product Relation Endpoints
#### Get collection of product feature points
`GET /api/billing/subscriptionProductRelations`
- #### Parameters
No parameters
- #### Response
The response is collection of [SubscriptionProductRelation](/docs/server-api-partner-billing#subscription-product-relation-object) objects.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/subscriptionProductRelations \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "3fb06039-d671-4c5c-9414-2ca085efb6f8",
"subscriptionId": "895a5d94-97e8-410f-8ff3-53d8038e908a",
"productId": "LiveChat",
"siteId": 10000,
"subscriptionProductFeaturePointRelations": [
{
"id": "b14bfbd0-9c78-4130-bc00-04260bcd4df1",
"subscriptionProductRelationId": "3fb06039-d671-4c5c-9414-2ca085efb6f8",
"featurePointItemId": "Integrations",
"siteId": 10000
}
]
}
]
```
## Subscription Pricing Model
You need the `Manage Feature` permission to manage subscription product relation.
- `GET /api/billing/subscriptionPricingModels`
### Subscription Pricing Model Object JSON format
#### Subscription Pricing Model Object
`SubscriptionPricingModel` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | yes | no | Subscription pricing model identifier. |
| `siteId` | int | no | no | Site identifier. |
| `subscriptionId` | Guid | yes | no | Subscription identifier. |
| `name` | string | no | no | Subscription pricing model name. |
| `pricingModel` | string | no | no | Pricing model. |
| `freeQuantity` | int | no | no | Free quantity of agents. |
| `maxQuantity` | int | no | no | Max quantity of agents. |
| `unitType` | string | no | no | Unit type. |
| `volumeType` | string | no | no | Volume type. |
| `isServiceStoppedWhenBotActionsQuotaExceeded` | bool | no | no | Wether the service will be stopped when bot actions quota exceeded. |
| `purchasedQuantity` | int | no | no | Purchased quantity of volume. |
| `purchasedOverageQuantity` | int | no | no | Purchased overage quantity of volume. |
| `isShowUpgrade` | bool | no | no | Wether to show upgrade button. |
| `isOneTimeFeePlan` | bool | no | no | Is one-off fee plan. |
| `isShowCancel` | bool | no | no | Wether to show cancel button. |
| `subscriptionPriceSegmentByAgents` | [`SubscriptionPriceSegmentByAgent`](/docs/server-api-partner-billing#subscription-price-segment-by-agent-object)[] | no | no | Subscription price segment by agents. |
| `subscriptionPriceSegmentByVolumes` | [`SubscriptionPriceSegmentByVolume`](/docs/server-api-partner-billing#subscription-price-segment-by-volume-object)[] | no | no | Subscription price segment by volumes. |
| `subscriptionPriceWithFlatFee` | [`SubscriptionPriceWithFlatFee`](/docs/server-api-partner-billing#subscription-price-with-flat-fee-object) | no | no | Subscription price with flat fee. |
#### Subscription Price Segment By Agent Object
`SubscriptionPriceSegmentByAgent` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | yes | no | Subscription price segment by agent identifier. |
| `siteId` | int | no | no | Site identifier. |
| `subscriptionPricingModelId` | Guid | yes | no | Subscription pricing model identifier. |
| `from` | int | no | no | The minimum quantity of agents. |
| `to` | int | no | no | The maximum quantity of agents. |
| `monthlyPrice` | decimal | no | no | Monthly price. |
| `quarterlyPrice` | decimal | no | no | Quarterly price. |
| `semiAnnualPrice` | decimal | no | no | Semi annual price. |
| `annualPrice` | decimal | no | no | Annual price. |
| `monthlyPriceDiscount` | decimal | no | no | Monthly price discount. |
| `quarterlyPriceDiscount` | decimal | no | no | Quarterly price discount. |
| `semiAnnualPriceDiscount` | decimal | no | no | Semi annual price discount. |
| `annualPriceDiscount` | decimal | no | no | Annual price discount. |
#### Subscription Price Segment By Volume Object
`SubscriptionPriceSegmentByVolumn` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | Guid | yes | no | Subscription price segment by agent identifier. |
| `siteId` | int | no | no | Site identifier. |
| `subscriptionPricingModelId` | Guid | yes | no | Subscription pricing model identifier. |
| `quotaPerMonth` | int | no | no | Monthly quota. |
| `monthlyPrice` | decimal | no | no | Monthly price. |
| `quarterlyPrice` | decimal | no | no | Quarterly price. |
| `semiAnnualPrice` | decimal | no | no | Semi annual price. |
| `annualPrice` | decimal | no | no | Annual price. |
| `monthlyPriceDiscount` | decimal | no | no | Monthly price discount. |
| `quarterlyPriceDiscount` | decimal | no | no | Quarterly price discount. |
| `semiAnnualPriceDiscount` | decimal | no | no | Semi annual price discount. |
| `annualPriceDiscount` | decimal | no | no | Annual price discount. |
| `isOverageQuotaAddedByCustomerAllowed` | bool | no | no | Wether to allow customers to add overage quota by themselfs. |
| `overageQuota` | int | no | no | Monthly quota. |
| `overageUnitPrice` | decimal | no | no | Overage unit price. |
| `overageUnitPriceDiscount` | decimal | no | no | Overage unit price discount. |
| `isSelected` | bool | no | no | Is selected. |
#### Subscription Price With Flat Fee Object
`SubscriptionPriceWithFlatFee` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `siteId` | int | no | no | Site identifier. |
| `subscriptionPricingModelId` | Guid | yes | no | Subscription pricing model identifier. |
| `monthlyPrice` | decimal | no | no | Monthly price. |
| `quarterlyPrice` | decimal | no | no | Quarterly price. |
| `semiAnnualPrice` | decimal | no | no | Semi annual price. |
| `annualPrice` | decimal | no | no | Annual price. |
| `monthlyPriceDiscount` | decimal | no | no | Monthly price discount. |
| `quarterlyPriceDiscount` | decimal | no | no | Quarterly price discount. |
| `semiAnnualPriceDiscount` | decimal | no | no | Semi annual price discount. |
| `annualPriceDiscount` | decimal | no | no | Annual price discount. |
### Subscription Pricing Model Endpoints
#### Get collection of subscription pricing models
`GET /api/billing/subscriptionPricingModels`
- #### Parameters
No parameters
- #### Response
The response is collection of [SubscriptionPricingModel](/docs/server-api-partner-billing#subscription-pricing-model-object) objects.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/subscriptionPricingModels \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "3fb06039-d671-4c5c-9414-2ca085efb6f8",
"subscriptionId": "895a5d94-97e8-410f-8ff3-53d8038e908a",
"productId": "LiveChat",
"siteId": 10000,
"subscriptionProductFeaturePointRelations": [
{
"id": "b14bfbd0-9c78-4130-bc00-04260bcd4df1",
"subscriptionProductRelationId": "3fb06039-d671-4c5c-9414-2ca085efb6f8",
"featurePointItemId": "Integrations",
"siteId": 10000
}
]
}
]
```
## Subscription Feature Limitation Config
You need the `Manage Feature` permission to manage subscription feature limitation config.
- `GET /api/billing/subscriptionFeatureLimitationConfigs` - [Get collection of subscription feature limitation configs](/docs/server-api-partner-billing#get-collection-of-subscription-feature-limitation-configs)
- `GET /api/billing/subscriptionFeatureLimitationConfigs/{subscriptionId}` - [Get collection of subscription feature limitation configs](/docs/server-api-partner-billing#get-collection-of-subscription-feature-limitation-configs)
### Subscription Feature Limitation Config Object JSON format
#### Subscription Feature Limitation Config Object
`SubscriptionFeatureLimitationConfig` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `subscriptionId` | Guid | no | yes | Subscription identifier. |
| `siteId` | int | no | no | Site identifier. |
| `monthsOfHistoryCanBeAccessed` | int | no | no | Months of history can be accessed. |
| `monthsOfHistoryCanBeAccessedBeyondFreemium` | int | no | no | Months of history can be accessed beyond freemium. |
| `monthsOfHistoryBeingStored` | int | no | no | Months of history being stored. |
| `monthsOfHistoryBeingStoredBeyondFreemium` | int | no | no | Months of history being stored beyond freemium. |
### Subscription Feature Limitation Config Endpoints
#### Get collection of subscription feature limitation configs
`GET /api/billing/subscriptionFeatureLimitationConfigs`
- #### Parameters
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | int | no | Unique identifier of a `Site`. |
- #### Response
The response is collection of [SubscriptionFeatureLimitationConfig](/docs/server-api-partner-billing#subscription-feature-limitation-config-object) objects.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/subscriptionFeatureLimitationConfigs \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"subscriptionId": "895a5d94-97e8-410f-8ff3-53d8038e908a",
"siteId": 10000,
"monthsOfHistoryCanBeAccessed": 0,
"monthsOfHistoryCanBeAccessedBeyondFreemium": 0,
"monthsOfHistoryBeingStored": 0,
"monthsOfHistoryBeingStoredBeyondFreemium": 0
}
]
```
#### Get a subscription feature limitation config
`GET /api/billing/subscriptionFeatureLimitationConfigs/{subscriptionId}`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `subscriptionId` | Guid | yes | Unique identifier of a `Subscription`. |
- #### Response
The response is a [SubscriptionFeatureLimitationConfig](/docs/server-api-partner-billing#subscription-feature-limitation-config-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/subscriptionFeatureLimitationConfigs/895a5d94-97e8-410f-8ff3-53d8038e908a \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"subscriptionId": "895a5d94-97e8-410f-8ff3-53d8038e908a",
"siteId": 10000,
"monthsOfHistoryCanBeAccessed": 0,
"monthsOfHistoryCanBeAccessedBeyondFreemium": 0,
"monthsOfHistoryBeingStored": 0,
"monthsOfHistoryBeingStoredBeyondFreemium": 0
}
```
## Product
You need the `Manage Product` permission to manage product.
- `GET /api/billing/products` - [Get collection of products](/docs/server-api-partner-billing#get-collection-of-products)
- `GET /api/billing/products/{id}` - [Get a product](/docs/server-api-partner-billing#get-a-product)
### Product Object JSON format
#### Product Object
`Product` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | string | yes | no | Product identifier. |
| `moduleId` | string | no | yes | Module identifier. |
| `name` | string | no | yes | Product name. |
| `description` | string | no | yes | Product description. |
### Product Endpoints
#### Get collection of products
`GET /api/billing/products`
- #### Parameters
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | no | Unique identifier of a `Product`. |
- #### Response
The response is collection of [Product](/docs/server-api-partner-billing#product-object) objects.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/products \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "AdditionalTwitterAccount",
"moduleId": "Ticketing",
"name": "Additional Twitter Account",
"description": ""
}
]
```
#### Get a product
`GET /api/billing/products/{id}`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | Guid | yes | Unique identifier of a `Product`. |
- #### Response
The response is a [Product](/docs/server-api-partner-billing#product-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/products/AdditionalTwitterAccount \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "AdditionalTwitterAccount",
"moduleId": "Ticketing",
"name": "Additional Twitter Account",
"description": ""
}
```
## Product
You need the `Manage Product` permission to manage product.
- `GET /api/billing/products` - [Get collection of products](/docs/server-api-partner-billing#get-collection-of-products)
- `GET /api/billing/products/{id}` - [Get a product](/docs/server-api-partner-billing#get-a-product)
### Product Object JSON format
#### Product Object
`Product` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | string | yes | no | Product identifier. |
| `moduleId` | string | no | yes | Module identifier. |
| `name` | string | no | yes | Product name. |
| `description` | string | no | yes | Product description. |
### Product Endpoints
#### Get collection of products
`GET /api/billing/products`
- #### Parameters
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | no | Unique identifier of a `Product`. |
- #### Response
The response is collection of [Product](/docs/server-api-partner-billing#product-object) objects.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/products \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "AdditionalTwitterAccount",
"moduleId": "Ticketing",
"name": "Additional Twitter Account",
"description": ""
}
]
```
#### Get a product
`GET /api/billing/products/{id}`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | Guid | yes | Unique identifier of a `Product`. |
- #### Response
The response is a [Product](/docs/server-api-partner-billing#product-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/products/AdditionalTwitterAccount \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "AdditionalTwitterAccount",
"moduleId": "Ticketing",
"name": "Additional Twitter Account",
"description": ""
}
```
## Product Feature Point
You need the `Manage Feature` permission to manage product feature point.
- `GET /api/global/productFeaturePoint` - [Get collection of product feature points](/docs/server-api-partner-billing#get-collection-of-product-feature-points)
### Product Feature Point Object JSON format
#### Product Feature Point Object
`ProductFeaturePoint` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | string | yes | no | Feature point identifier. |
| `moduleId` | string | no | no | Module identifier. |
| `name` | string | no | no | Feature point item name. |
| `description` | string | no | no | Feature point item description. |
| `featurePointItems` | [FeaturePointItem](/docs/server-api-partner-billing#feature-point-item)[] | no | no | The collection of feature point items. |
### Product Feature Point Endpoints
#### Get collection of product feature points
`GET /api/global/productFeaturePoint`
- #### Parameters
No parameters
- #### Response
The response is collection of [ProductFeaturePoint](/docs/server-api-partner-billing#product-feature-point-object) objects.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/global/productFeaturePoint \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"errorCode": 0,
"errorMessage": "",
"data":[
{
"id": "Chatbot",
"moduleId": "Bot",
"name": "Chatbot",
"description": "",
"featurePointItems": [
{
"id": "ChatBot",
"productId": "Chatbot",
"name": "Chatbot",
"description": "",
"parentId": "",
"category": "default",
"chatbotEngineId": "00000000-0000-0000-0000-000000000000"
}
]
}
]
}
```
## Feature Point Item
You need the `Manage Feature` permission to manage feature point item.
- `GET /api/global/featurePointItems` - [Get a list of site billing profiles](/docs/server-api-partner-billing#get-collection-of-site-billing-profiles)
- `GET /api/billing/featurePointItems/{siteId}` - [Get billing profile of a site](/docs/server-api-partner-billing#get-billing-profile-of-a-site)
### Feature Point Item Object JSON format
#### Feature Point Item Object
`FeaturePointItem` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `id` | string | yes | no | Feature point item identifier. |
| `productId` | string | no | no | Product identifier. |
| `name` | string | no | no | Feature point item name. |
| `description` | string | no | no | Feature point item description. |
| `parentId` | string | no | no | Parent feature point item identifier. |
| `category` | string | no | no | Feature point category. |
| `chatbotEngineId` | Guid | no | no | Chatbot engine identifier. |
### Feature Point Item Endpoints
#### Get collection of feature point items
`GET /api/global/featurePointItems`
- #### Parameters
No parameters
- #### Response
The response is collection of [FeaturePointItem](/docs/server-api-partner-billing#feature-point-item-object) objects.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/global/featurePointItems \
-H 'Content-Type: application/json' \
-X 'GET'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "Mention",
"productId": "Ticketing",
"name": "@mention",
"description": "",
"parentId": "",
"category": "default",
"chatbotEngineId": "00000000-0000-0000-0000-000000000000"
}
]
```
#### Get a feature point item
`GET /api/global/featurePointItems/{id}`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Unique identifier of the feature point item. |
- #### Response
The response is [FeaturePointItem](/docs/server-api-partner-billing#feature-point-item-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/global/featurePointItems/Mention \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": "Mention",
"productId": "Ticketing",
"name": "@mention",
"description": "",
"parentId": "",
"category": "default",
"chatbotEngineId": "00000000-0000-0000-0000-000000000000"
}
```
## Invoice Bill To
You need the `Manage Invoice` permission to manage invoice bill to.
- `GET /api/billing/invoiceBillTos` - [Get paged collection of invoice bill tos](/docs/server-api-partner-billing#get-collection-of-invoice-bill-tos)
- `GET /api/billing/invoiceBillTos/{invoiceId}` - [Get a invoice bill to](/docs/server-api-partner-billing#get-a-invoice-bill-to)
### Invoice Bill To Object JSON format
#### Invoice Bill To Object
`InvoiceBillTo` definition.
| Name | Type | Read-only | Mandatory | Description |
| --- | --- | --- | --- | --- |
| `invoiceId` | Guid | no | no | Invoice identifier. |
| `siteId` | int | no | no | Site identifier. |
| `firstName` | string | no | yes | First name. |
| `lastName` | string | no | yes | Last name. |
| `companyName` | string | no | yes | Company name. |
| `email` | string | no | yes | Email address. |
| `phone` | string | no | yes | Phone number. |
| `countryOrRegion` | string | no | yes | Country or region. |
| `stateOrProvince` | string | no | yes | State or province. |
| `city` | string | no | yes | City. |
| `mailingAddress` | string | no | yes | Mailing address. |
| `jobTitle` | string | no | yes | Job title. |
| `billTo` | string | no | yes | Bill to. |
### Invoice Bill To Endpoints
#### Get paged collection of invoice bill tos
`GET /api/billing/invoiceBillTos`
- #### Parameters
Query Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `siteId` | string | no | Unique identifier of a `Site`. |
- #### Response
The response is paged collection of [InvoiceBillTo](/docs/server-api-partner-billing#invoice-bill-to-object) objects.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/invoiceBillTos
-H 'Content-Type: application/json'
-X 'GET'
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"invoiceBillTos": [
{
"invoiceId": "27493bc9-9eb5-4bb3-2b95-08d9fc1fda3a",
"siteId": 10000,
"firstName": "1",
"lastName": "1",
"companyName": "1",
"email": "1@1.com",
"phone": "13111111111",
"countryOrRegion": "Afghanistan",
"stateOrProvince": "",
"city": "",
"mailingAddress": "1",
"jobTitle": "",
"billTo": "1"
}
],
"nextPage": null,
"previousPage": null,
"total": 4
}
```
#### Get a invoice bill to
`GET /api/billing/invoiceBillTos/{invoiceId}`
- #### Parameters
Path Parameters
| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `invoiceId` | Guid | no | Unique identifier of a `Invoice`. |
- #### Response
The response a [InvoiceBillTo](/docs/server-api-partner-billing#invoice-bill-to-object) object.
- #### Example
Using curl
```
curl https://partner.comm100.io/api/billing/invoiceBillTos/27493bc9-9eb5-4bb3-2b95-08d9fc1fda3a \
-H 'Content-Type: application/json' \
-X 'GET' \
```
Response
```
HTTP/1.1 200 OK
Content-Type: application/json
{
"invoiceId": "27493bc9-9eb5-4bb3-2b95-08d9fc1fda3a",
"siteId": 10000,
"firstName": "1",
"lastName": "1",
"companyName": "1",
"email": "1@1.com",
"phone": "13111111111",
"countryOrRegion": "Afghanistan",
"stateOrProvince": "",
"city": "",
"mailingAddress": "1",
"jobTitle": "",
"billTo": "1"
}
```