Partner Billing
  • 08 Jul 2022
  • 41 Minutes to read
  • Dark
    Light

Partner Billing

  • Dark
    Light

Article Summary

Partner Billing API

Change VersionAPI VersionChange notesChange DateAuthor
1.0v12022-04-15Hardy, Cyrus

Summary

Site

You need the Manage Site permission to manage sites.

Site Object JSON format

Site Object

Site definition.

NameTypeRead-onlyMandatoryDescription
idintyesnoSite identifier.
partnerIdintyesnoPartner identifier.
platformIdintyesnoPlatform identifier.
companystringnonoCompany.
companySizestringnonoCompany size.
websitestringnonoWeb site.
phonestringnonoPhone.
faxstringnonoFax.
countryOrRegionstringnonoCountry or region.
stateOrProvincestringnonoState or province.
citystringnonoCity.
mailingAddressstringnonoMailing adress.
postalOrZipCodestringnonoPostal or zipcode.
firstNamestringnonoFirst name.
lastNamestringnonoLast name.
dateTimeFormatstringnonoDatetime format.
languageIdstringnonoLanguage identifier.
timeZonestringnonoTimezone.
statusstringnonoStatus.
subdomainstringnonoSubdomain.
customDomainstringnonoCustom domain.
industrystringnonoIndustry.
otherIndustryDescriptionstringnonoOther industry description.
tagIdsGuid[]nonoCollection of tags.
tagsTag[]nonoCollection of tags.
siteAgentsAgent[]nonoCollection of agents.
siteContractsSiteContract[]nonoCollection of site contracts.
siteExtraInfoSiteExtraInfononoExtra info of a site.
siteActivitySiteActivitynonoActivity of a site.
siteBillingConfigSiteBillingConfignonoBilling config of a site.
siteBillingActivitySiteBillingActivitynonoBilling activity of a site.
siteRegistrationSiteRegistrationnonoRegistration info of a site.
subscriptionsSubscription[]nonoCollection of subscriptions of a site.

Site Extra Info Object

SiteExtraInfo definition.

NameTypeRead-onlyMandatoryDescription
siteIdintyesyesSite identifier.
profitCenterIdGuidyesnoProfit center identifier.
deploymentTypestringnoyesDeployment type.
accountExecutiveGuidnonoExecutive user identifier.
accountManagerGuidnonoManager identifier.
isSandboxSiteboolnonoIs sandbox site.
isSpamboolnonoIs spam.

Site Activity Object

SiteActivity definition.

NameTypeRead-onlyMandatoryDescription
siteIdintyesyesSite identifier.
lastLoginTimeDateTimenonoLast login time.
isActiveboolnonoIs active.
livechatCustomerLastWebPageVisitTimeDateTimenoyesLive chat customer last web page visit time.
livechatCustomerLastWebPageUrlstringnonoLive chat customer last web page URL.

Site Billing Activity Object

SiteBillingActivity definition.

NameTypeRead-onlyMandatoryDescription
siteIdintyesyesSite identifier.
buyingStagestirngnonoBuying stage.

Site Registration Object

SiteRegistration definition.

NameTypeRead-onlyMandatoryDescription
siteIdintyesyesSite identifier.
registerEmailstirngnonoRegister email.
registerTimeDateTimenonoRegister time.

Tag Object

Tag definition.

NameTypeRead-onlyMandatoryDescription
idGuidyesnoTag identifier.
partnerIdintnoyesPartner identifier.
namestringnoyesTag name.

Agent Object

Agent definition.

NameTypeRead-onlyMandatoryDescription
idGuidyesnoAgent identifier.
siteIdintyesnoSite identifier.
emailstringnonoAgent email address.
displayNamestringnonoDisplay name.
firstNamestringnonoFirst name.
lastNamestringnonoLast name.
isAdminboolnonoIs admin.
isActiveboolnonoIs active.
createdTimeDateTimenonoCreated time.

Site Contract Object

SiteContract definition.

NameTypeRead-onlyMandatoryDescription
idGuidyesnoAgent identifier.
siteIdintyesnoSite identifier.
namestringnonoName.
descriptionstringnonoDescription.
startDateDateTimenonoStart time.
endDateDateTimenonoEnd time.
actionWhenContractEndsstringnonoAction when contract ends.
siteContractAttachmentsSiteContractAttachment[]nonoCollection of site contract attachments.

Site Contract Attachment Object

SiteContractAttachment definition.

NameTypeRead-onlyMandatoryDescription
idGuidyesnoAgent identifier.
siteIdintyesnoSite identifier.
sitecontractIdGuidyesnoSite contract identifier.
namestringnonoName.
attachmentstringnonoAttachment URL.

Site Paged Model Object

SitePagedModel definition.

NameTypeRead-onlyMandatoryDescription
siteIdintyesnoSite identifier.
platformNamestringnonoPlatform name.
registerDateDateTimenonoRegister date.
lastActivityDateDateTimenonoLast activity date.
siteStatusstringnonoSite status.
profitCenterIdGuidnonoProfit center identifier.
profitCenterNamestringnonoProfit center name.
isActiveboolnonoIs active.
buyingStagestringnonoBuying stage.
accountExecutiveIdGuidnonoExecutive user identifier.
accountExecutiveNamestringnonoExecutive user name.
companystringnonoCompany.
countrystringnonoCountry or region.
ifHasSiteBillingProfileintnonoWether exist billing profile.
billingPeriodstringnonoBilling period.
billingStartDateDateTimenonoBilling start date.
nextBillingDateDateTimenonoNext billing date.
balancedecimalnonoBalance.
purchasedAgentsintnonoPurchased agents.
activeAgentsintnonoActive agents.
agentSiteAgent[]nonoThe collection of agents.
subscriptionstring[]nonoThe collection of subscriptions' name.

Site Agent Object

SiteAgent definition.

NameTypeRead-onlyMandatoryDescription
siteIdintyesnoSite identifier.
agentIdGuidnonoAgent identifier.
emailstringnonoAgent email address.
lastActivityDateDateTimenonoLast activity date.
displayNamestringnonoDisplay name.
isAdminboolnonoIs admin.

Site Endpoints

Get paged collection of sites

GET /api/billing/site/search

  • Parameters

Query Parameters

NameTypeRequiredDescription
siteIdintnoUnique identifier of a Site.
  • Response

    The response is paged collection of SitePagedModel 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

NameTypeRequiredDescription
idintnoUnique identifier of a Site.
  • Response

    The response is collection of Site 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

NameTypeRequiredDescription
idintnoUnique identifier of a Site.
  • Response

    The response is a Site 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.

Site Billing Config Object JSON format

Site Billing Config Object

SiteBillingConfig definition.

NameTypeRead-onlyMandatoryDescription
siteIdintegeryesnoSite identifier.
billingPeriodenumnoyesBilling period, value options include : monthly, quarterly, semi-annual, annual, ...
billingStartDateDateTimeyesnoThe first billing date.
nextBillingDateDateTimeyesnoThe next billing date.
balancedecimalyesnoAccount balance.
currencyIdstringnoyesCurrency identifier.
isPricingVisibleboolnonoIs the price displayed explicitly.
isSubscriptionChangeByCustomerAllowedboolnonoWether to allow customers to change their subscriptions.
isAgentsPurchasedInAdvanceboolnonoWether to allow customers to purchase agents by themselves.
purchasedAgentsintyesnoThe number of purchased agents.
isInvoiceVisibleToCustomerboolnonoWether to show invoice to customer.
isBillingEmailSentAutomaticallyboolnonoWether to send billing email to customers authmatically.
isBillingPopupAutomaticallyboolnonoWether to show billing popup to customers.
paymentTermstringnonoThe name of payment term.
paymentTermValuestringnoyesThe value of payment term.
currencyCurrencynoyesThe currency object.

Currency Object

Currency definition.

NameTypeRead-onlyMandatoryDescription
idstringnoyesCurrency identifier.
symbolstringnoyesCurrency symbol. $, €, £, ¥, ...
descriptionstringnonoCurrency description.

Site Endpoints

Get the list of site billing configs

GET /api/billing/siteBillingConfigs

  • Parameters

    No parameters

  • Response

    The response is collection of SiteBillingConfig 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

NameTypeRequiredDescription
siteIdintyesUnique identifier of the site.

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 structure.

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

NameTypeRequiredDescription
siteIdintyesUnique identifier of the site.

Request body

The request body contains data with the SiteBillingConfig structure.

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.

Site Billing Profile Object JSON format

Site Billing Profile Object

SiteBillingProfile definition.

NameTypeRead-onlyMandatoryDescription
siteIdintegeryesnoSite identifier.
firstNamestringnonoFirst name.
lastNamestringnonoLast name.
companyNamestringnonoCompany name.
emailstringnonoEmail address.
phonestringnonoPhone number.
faxstringnonoFax number.
countryOrRegionstringnonoCountry or region.
stateOrProvincestringnonoState or province.
citystringyesnoCity.
mailingAddressstringnonoMailing address.
postalOrZipCodestringnonoPostal or zipcode.
jobTitlestringnonoJob title.
billTostringnonoBill to.
isChargedAutomaticallyboolnonoIs charged automatically.
isEPaymentboolnonoIs EPayment.
primaryPaymentTypeIdstringnonoPrimary payment type. Amex
primaryPayPalBillingAgreementIdstringnonoPrimary paypal billing agreement.
primaryPayPalEmailstringnonoPrimary paypal email.
nameOnPrimaryCardstringnonoWho is the primary card belonged.
primaryCardNumberstringnonoPrimary card number.
primaryCardCSCOrCVDstringnonoThe CSC or CVD of the primary card.
primaryCardExpirationDateDateTimenonoThe expiration date of the primary card.
secondaryPaymentTypeIdstringnonoSecondary payment type. Amex
secondaryPayPalBillingAgreementIdstringnonoSecondary paypal billing agreement.
secondaryPayPalEmailstringnonoSecondary paypal email.
nameOnSecondaryCardstringnonoWho is the secondary card belonged.
secondaryCardNumberstringnonoSecondary card number.
secondaryCardCSCOrCVDstringnonoThe CSC or CVD of the secondary card.
secondaryCardExpirationDateDateTimenonoThe expiration date of the secondary card.
nonEPaymentTypeIdstringnonoNon EPayment type. Undefine

Site Endpoints

Get sites' billing profiles

GET /api/billing/siteBillingProfiles

  • Parameters

    No parameters

  • Response

    The response is collection of SiteBillingProfile 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

NameTypeRequiredDescription
siteIdintyesUnique identifier of the site.

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 structure.

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

NameTypeRequiredDescription
siteIdintyesUnique identifier of the site.

Request body

The request body contains data with the SiteBillingProfile structure.

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.

Subscription Object JSON format

Subscription Object

Subscription definition.

NameTypeRead-onlyMandatoryDescription
idGuidyesnoSubscription identifier.
planIdintnonoPlan identifier.
siteIdintnonoSite identifier.
namestringnonoSubscription name.
isServicePlanboolnonoIs service plan.
canBeCancelledByCustomerboolnonoWether to allow customers to cancal by themselfs.
createdTimeDateTimeyesnoThe time when created.
subscriptionPricingModelsSubscriptionPricingModelnonoChatbot engine identifier.
lineItemsInvoiceLineItem[]nonoInvoice line items.

Subscription Output Object

SubscriptionOutput definition.

NameTypeRead-onlyMandatoryDescription
srcAmountdecimalnonoSRC amount.
srcTaxdecimalnonoSRC tax.
newAmountdecimalnonoNew amount.
newTaxdecimalnonoNew tax.
chargeResultboolnonoCharge result.

Subscription Change Dto Object

SubscriptionChangeDto definition.

NameTypeRead-onlyMandatoryDescription
actionTypeenumnonoAction type. Include AddSubscription(0), SwitchSubscription(1), EditPricingModel(2), CancelSubscription(3), UpgradeSubscription(4), DowngradeSubscription(5)
srcSubscriptionIdGuidnonoSource subscription identifier.
subscriptionSubscriptionDtononoSubscription info.

Subscription Dto Object

SubscriptionDto definition.

NameTypeRead-onlyMandatoryDescription
idGuidnonoSubscription identifier.
planIdintnoyesPlan identifier.
siteIdintnonoSite identifier.
nameintnoyesName.
isServicePlanboolnoyesIs service plan.
canBeCancelledByCustomerboolnoyesWether to allow customers to cancel by themselves.
subscriptionPricingModelsSubscriptionPricingModelDto[]noyesWether to allow customers to cancel by themselves.

Subscription Pricing Model Dto Object

SubscriptionPricingModelDto definition.

NameTypeRead-onlyMandatoryDescription
idGuidnonoIdentifier.
subscriptionIdGuidnonoSubscription identifier.
siteIdintnonoSite identifier.
nameintnoyesName.
pricingModelstringnonoPricing model.
freeQuantityintnonoFree quantity.
maxQuantityintnonoMax quantity.
unitTypestringnonoUnit type.
volumeTypestringnonoVolume type.
isServiceStoppedWhenBotActionsQuotaExceededboolnonoIs service stopped when bot actions quota exceeded.
purchasedQuantityintnonoPurchased quantity.
purchasedOverageUnitintnonoPurchased overage unit.
purchasedOverageQuantityintnonoPurchased overage quantity.
isDeletedboolnonoIs deleted.
subscriptionPriceSegmentByAgentsSubscriptionPriceSegmentByAgentDto[]nonoCollection of suscription price segment by agents.
subscriptionPriceSegmentByVolumesSubscriptionPriceSegmentByVolumeDto[]nonoCollection of suscription price segment by volumes.
subscriptionPriceByUnitSubscriptionPriceByUnitDtononoSuscription price by unit.
subscriptionPriceWithFlatFeeSubscriptionPriceWithFlatFeeDtononoSuscription price with flat fee.

Subscription Price Segment By Agent Dto Object

SubscriptionPriceSegmentByAgentDto definition.

NameTypeRead-onlyMandatoryDescription
idGuidyesnoSubscription price segment by agent identifier.
siteIdintnonoSite identifier.
subscriptionPricingModelIdGuidyesnoSubscription pricing model identifier.
fromintnonoThe minimum quantity of agents.
tointnonoThe maximum quantity of agents.
monthlyPricedecimalnonoMonthly price.
quarterlyPricedecimalnonoQuarterly price.
semiAnnualPricedecimalnonoSemi annual price.
annualPricedecimalnonoAnnual price.
monthlyPriceDiscountdecimalnonoMonthly price discount.
quarterlyPriceDiscountdecimalnonoQuarterly price discount.
semiAnnualPriceDiscountdecimalnonoSemi annual price discount.
annualPriceDiscountdecimalnonoAnnual price discount.

Subscription Price Segment By Volume Dto Object

SubscriptionPriceSegmentByVolumnDto definition.

NameTypeRead-onlyMandatoryDescription
idGuidyesnoSubscription price segment by agent identifier.
siteIdintnonoSite identifier.
subscriptionPricingModelIdGuidyesnoSubscription pricing model identifier.
quotaPerMonthintnonoMonthly quota.
monthlyPricedecimalnonoMonthly price.
quarterlyPricedecimalnonoQuarterly price.
semiAnnualPricedecimalnonoSemi annual price.
annualPricedecimalnonoAnnual price.
monthlyPriceDiscountdecimalnonoMonthly price discount.
quarterlyPriceDiscountdecimalnonoQuarterly price discount.
semiAnnualPriceDiscountdecimalnonoSemi annual price discount.
annualPriceDiscountdecimalnonoAnnual price discount.
isOverageQuotaAddedByCustomerAllowedboolnonoWether to allow customers to add overage quota by themselfs.
overageQuotaintnonoMonthly quota.
overageUnitPricedecimalnonoOverage unit price.
overageUnitPriceDiscountdecimalnonoOverage unit price discount.
isSelectedboolnonoIs selected.

Subscription Price By Unit Dto Object

SubscriptionPriceByUnitDto definition.

NameTypeRead-onlyMandatoryDescription
siteIdintnonoSite identifier.
subscriptionPricingModelIdGuidyesnoSubscription pricing model identifier.
oneTimeFeedecimalnonoOne-off fee.
monthlyPricedecimalnonoMonthly price.
quarterlyPricedecimalnonoQuarterly price.
semiAnnualPricedecimalnonoSemi annual price.
annualPricedecimalnonoAnnual price.
oneTimeFeeDiscountdecimalnonoOne-off fee discount.
monthlyPriceDiscountdecimalnonoMonthly price discount.
quarterlyPriceDiscountdecimalnonoQuarterly price discount.
semiAnnualPriceDiscountdecimalnonoSemi annual price discount.
annualPriceDiscountdecimalnonoAnnual price discount.

Subscription Price With Flat Fee Dto Object

SubscriptionPriceWithFlatFeeDto definition.

NameTypeRead-onlyMandatoryDescription
siteIdintnonoSite identifier.
subscriptionPricingModelIdGuidyesnoSubscription pricing model identifier.
monthlyPricedecimalnonoMonthly price.
quarterlyPricedecimalnonoQuarterly price.
semiAnnualPricedecimalnonoSemi annual price.
annualPricedecimalnonoAnnual price.
monthlyPriceDiscountdecimalnonoMonthly price discount.
quarterlyPriceDiscountdecimalnonoQuarterly price discount.
semiAnnualPriceDiscountdecimalnonoSemi annual price discount.
annualPriceDiscountdecimalnonoAnnual price discount.

Subscriptions Change Output Object

SubscriptionsChangeOutput definition.

NameTypeRead-onlyMandatoryDescription
amountdecimalnonoAmount.
taxdecimalnonoTax.
invoiceIdGuidnonoInvoice identifier.

Invoice Line Item Object

InvoiceLineItem definition

NameTypeRead-onlyMandatoryDescription
idGuidnonoInvoice line item identifier.
invoiceIdGuidnonoInvoice identifier.
siteIdintnonoSite identifier.
subscriptionPricingModelIdGuidyesnoSubscription pricing model identifier.
profitCenterIdGuidyesnoProfit center identifier.
namestringnonoInvoice line item name.
unitPricedecimalnonoUnit price.
unitPriceToRounddecimalnonoUnit price to round.
unitPriceToRoundWithUnitstringnonoUnit price to round with unit.
unitstringnonoUnit.
quantityintnonoQuantity.
discountdecimalnonoDiscount.
discountToRoundstringnonoDiscount to round.
discountRatestringnonoDiscount rate.
serviceStartDateDateTimenoyesService start date.
serviceEndDateDateTimenoyesService end date.
monthsstringnonoMonths.
licenseTermstringnonoLicense term.
orderintnonoOrder.
typestringnonoType.
amountdecimalnonoAmount.
amountToRoundstringnonoAmount to round.
taxTotaldecimalnonoTax total.
taxdecimalnonoTax.
taxToRoundstringnonoTax to round.
lineTotaldecimalnonoLine total.
lineTotalToRoundstringnonoLine total to round.
lineTotalWithDiscountToRoundstringnonoLine total with discount to round.
cancelledInvoiceLineItemIdGuidnonoCancelled invoice line item related.
paidAmountdecimalnonoPaid amount.
amountUsdToPaydecimalnonoAmount USD to pay.
amountUsdToRefunddecimalnonoAmount USD to refund.
serviceDaysintnonoService days.

Subscription Endpoints

Get collection of subscriptions

GET /api/billing/subscriptions

  • Parameters

Query Parameters

NameTypeRequiredDescription
siteIdintnoUnique identifier of a Site.
  • Response

    The response is collection of Subscription 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<br><span>(2022/04/15-2023/04/14)</span>",
                "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

NameTypeRequiredDescription
idGuidyesUnique identifier of the subscription.

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<br><span>(2022/04/15-2023/04/14)</span>",
            "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

NameTypeRequiredDescription
idGuidyesUnique identifier of the subscription.

Request body

The request body contains data with the Subscription structure.

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<br><span>(2022/04/15-2023/04/14)</span>",
            "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

NameTypeRequiredDescription
siteIdintyesUnique identifier of the Site.
agentIdGuidyesUnique identifier of the Agent.

Body Parameters

NameTypeRequiredDescription
billingPeriodintnoBilling period.
planIdintyesPlan identifier.
overageQuotaintnoOverage quota.
overageQuotaUnitintnoOverage quota unit.
purchasedQuantityByUnitintnoPurchased quantity by unit.
selectedVolumeIdGuidnoSelected volume identifier.
namestringyesName.

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

NameTypeRequiredDescription
siteIdintyesUnique identifier of the Site.
agentIdGuidyesUnique identifier of the Agent.

Body Parameters

NameTypeRequiredDescription
billingPeriodintnoBilling period.
planIdintyesPlan identifier.
overageQuotaintnoOverage quota.
overageQuotaUnitintnoOverage quota unit.
purchasedQuantityByUnitintnoPurchased quantity by unit.
selectedVolumeIdGuidnoSelected volume identifier.
namestringyesName.

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

NameTypeRequiredDescription
siteIdintyesUnique identifier of the Site.

Body Parameters

NameTypeRequiredDescription
ifCreateInvoiceboolyesIf create invoice.
isDraftboolyesIs draft.
purchasedAgentsintnoPurchased agents.
subscriptionChangeDtosSubscriptionChangeDto[]noCollection of subscription dtos.

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

NameTypeRequiredDescription
siteIdintyesUnique identifier of the Site.

Body Parameters

NameTypeRequiredDescription
ifCreateInvoiceboolyesIf create invoice.
isDraftboolyesIs draft.
purchasedAgentsintnoPurchased agents.
subscriptionChangeDtosSubscriptionChangeDto[]noCollection of subscription dtos.

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

NameTypeRequiredDescription
siteIdintyesUnique identifier of the Site.

Body Parameters

NameTypeRequiredDescription
ifCreateInvoiceboolyesIf create invoice.
isDraftboolyesIs draft.
purchasedAgentsintnoPurchased agents.
subscriptionChangeDtosSubscriptionChangeDto[]noCollection of subscription dtos.

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

NameTypeRequiredDescription
siteIdintyesUnique identifier of the Site.
agentIdGuidyesUnique identifier of the Agent.

Body Parameters

NameTypeRequiredDescription
cancelReasonstringnoCancel reason.
commentstringyesComment.

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

NameTypeRequiredDescription
idintyesUnique identifier of the Subscription.

Query Parameters

NameTypeRequiredDescription
siteIdintyesUnique identifier of the Site.
agentIdGuidyesUnique identifier of the Agent.

Body Parameters

NameTypeRequiredDescription
billingPeriodintnoBilling period.
planIdintyesPlan identifier.
overageQuotaintnoOverage quota.
overageQuotaUnitintnoOverage quota unit.
purchasedQuantityByUnitintnoPurchased quantity by unit.
selectedVolumeIdGuidnoSelected volume identifier.
namestringyesName.

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

NameTypeRequiredDescription
idintyesUnique identifier of the Subscription.

Query Parameters

NameTypeRequiredDescription
siteIdintyesUnique identifier of the Site.
agentIdGuidyesUnique identifier of the Agent.

Body Parameters

NameTypeRequiredDescription
billingPeriodintnoBilling period.
planIdintyesPlan identifier.
overageQuotaintnoOverage quota.
overageQuotaUnitintnoOverage quota unit.
purchasedQuantityByUnitintnoPurchased quantity by unit.
selectedVolumeIdGuidnoSelected volume identifier.
namestringyesName.

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

NameTypeRequiredDescription
idintyesUnique identifier of the Subscription.

Query Parameters

NameTypeRequiredDescription
siteIdintyesUnique identifier of the Site.

Body Parameters

NameTypeRequiredDescription
productIdstringyesProduct identifier.
featurePointItemsstring[]yesCollection 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.

Subscription Product Relation Object JSON format

Subscription Product Relation Object

SubscriptionProductRelation definition.

NameTypeRead-onlyMandatoryDescription
idGuidyesnoIdentifier.
subscriptionIdGuidnoyesSubscription identifier.
productIdstringnoyesProduct identifier.
siteIdintnonoSite identifier.
subscriptionProductFeaturePointRelationsSubscriptionProductFeaturePointRelation[]nonoThe collection of subscription product feature point relations.

Subscription Product Feature Point Relation Object

SubscriptionProductFeaturePointRelation definition.

NameTypeRead-onlyMandatoryDescription
idGuidyesnoIdentifier.
subscriptionProductRelationIdGuidnoyesSubscription product relation id identifier.
featurePointItemIdstringnoyesFeature point item identifier.
siteIdintnonoSite identifier.

Subscription Product Relation Endpoints

Get collection of product feature points

GET /api/billing/subscriptionProductRelations

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.

NameTypeRead-onlyMandatoryDescription
idGuidyesnoSubscription pricing model identifier.
siteIdintnonoSite identifier.
subscriptionIdGuidyesnoSubscription identifier.
namestringnonoSubscription pricing model name.
pricingModelstringnonoPricing model.
freeQuantityintnonoFree quantity of agents.
maxQuantityintnonoMax quantity of agents.
unitTypestringnonoUnit type.
volumeTypestringnonoVolume type.
isServiceStoppedWhenBotActionsQuotaExceededboolnonoWether the service will be stopped when bot actions quota exceeded.
purchasedQuantityintnonoPurchased quantity of volume.
purchasedOverageQuantityintnonoPurchased overage quantity of volume.
isShowUpgradeboolnonoWether to show upgrade button.
isOneTimeFeePlanboolnonoIs one-off fee plan.
isShowCancelboolnonoWether to show cancel button.
subscriptionPriceSegmentByAgentsSubscriptionPriceSegmentByAgent[]nonoSubscription price segment by agents.
subscriptionPriceSegmentByVolumesSubscriptionPriceSegmentByVolume[]nonoSubscription price segment by volumes.
subscriptionPriceWithFlatFeeSubscriptionPriceWithFlatFeenonoSubscription price with flat fee.

Subscription Price Segment By Agent Object

SubscriptionPriceSegmentByAgent definition.

NameTypeRead-onlyMandatoryDescription
idGuidyesnoSubscription price segment by agent identifier.
siteIdintnonoSite identifier.
subscriptionPricingModelIdGuidyesnoSubscription pricing model identifier.
fromintnonoThe minimum quantity of agents.
tointnonoThe maximum quantity of agents.
monthlyPricedecimalnonoMonthly price.
quarterlyPricedecimalnonoQuarterly price.
semiAnnualPricedecimalnonoSemi annual price.
annualPricedecimalnonoAnnual price.
monthlyPriceDiscountdecimalnonoMonthly price discount.
quarterlyPriceDiscountdecimalnonoQuarterly price discount.
semiAnnualPriceDiscountdecimalnonoSemi annual price discount.
annualPriceDiscountdecimalnonoAnnual price discount.

Subscription Price Segment By Volume Object

SubscriptionPriceSegmentByVolumn definition.

NameTypeRead-onlyMandatoryDescription
idGuidyesnoSubscription price segment by agent identifier.
siteIdintnonoSite identifier.
subscriptionPricingModelIdGuidyesnoSubscription pricing model identifier.
quotaPerMonthintnonoMonthly quota.
monthlyPricedecimalnonoMonthly price.
quarterlyPricedecimalnonoQuarterly price.
semiAnnualPricedecimalnonoSemi annual price.
annualPricedecimalnonoAnnual price.
monthlyPriceDiscountdecimalnonoMonthly price discount.
quarterlyPriceDiscountdecimalnonoQuarterly price discount.
semiAnnualPriceDiscountdecimalnonoSemi annual price discount.
annualPriceDiscountdecimalnonoAnnual price discount.
isOverageQuotaAddedByCustomerAllowedboolnonoWether to allow customers to add overage quota by themselfs.
overageQuotaintnonoMonthly quota.
overageUnitPricedecimalnonoOverage unit price.
overageUnitPriceDiscountdecimalnonoOverage unit price discount.
isSelectedboolnonoIs selected.

Subscription Price With Flat Fee Object

SubscriptionPriceWithFlatFee definition.

NameTypeRead-onlyMandatoryDescription
siteIdintnonoSite identifier.
subscriptionPricingModelIdGuidyesnoSubscription pricing model identifier.
monthlyPricedecimalnonoMonthly price.
quarterlyPricedecimalnonoQuarterly price.
semiAnnualPricedecimalnonoSemi annual price.
annualPricedecimalnonoAnnual price.
monthlyPriceDiscountdecimalnonoMonthly price discount.
quarterlyPriceDiscountdecimalnonoQuarterly price discount.
semiAnnualPriceDiscountdecimalnonoSemi annual price discount.
annualPriceDiscountdecimalnonoAnnual price discount.

Subscription Pricing Model Endpoints

Get collection of subscription pricing models

GET /api/billing/subscriptionPricingModels

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.

Subscription Feature Limitation Config Object JSON format

Subscription Feature Limitation Config Object

SubscriptionFeatureLimitationConfig definition.

NameTypeRead-onlyMandatoryDescription
subscriptionIdGuidnoyesSubscription identifier.
siteIdintnonoSite identifier.
monthsOfHistoryCanBeAccessedintnonoMonths of history can be accessed.
monthsOfHistoryCanBeAccessedBeyondFreemiumintnonoMonths of history can be accessed beyond freemium.
monthsOfHistoryBeingStoredintnonoMonths of history being stored.
monthsOfHistoryBeingStoredBeyondFreemiumintnonoMonths 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

NameTypeRequiredDescription
siteIdintnoUnique identifier of a Site.

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

NameTypeRequiredDescription
subscriptionIdGuidyesUnique identifier of a Subscription.

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.

Product Object JSON format

Product Object

Product definition.

NameTypeRead-onlyMandatoryDescription
idstringyesnoProduct identifier.
moduleIdstringnoyesModule identifier.
namestringnoyesProduct name.
descriptionstringnoyesProduct description.

Product Endpoints

Get collection of products

GET /api/billing/products

  • Parameters

Query Parameters

NameTypeRequiredDescription
idstringnoUnique identifier of a Product.
  • Response

    The response is collection of Product 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

NameTypeRequiredDescription
idGuidyesUnique identifier of a Product.
  • Response

    The response is a Product 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.

Product Object JSON format

Product Object

Product definition.

NameTypeRead-onlyMandatoryDescription
idstringyesnoProduct identifier.
moduleIdstringnoyesModule identifier.
namestringnoyesProduct name.
descriptionstringnoyesProduct description.

Product Endpoints

Get collection of products

GET /api/billing/products

  • Parameters

Query Parameters

NameTypeRequiredDescription
idstringnoUnique identifier of a Product.
  • Response

    The response is collection of Product 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

NameTypeRequiredDescription
idGuidyesUnique identifier of a Product.
  • Response

    The response is a Product 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.

Product Feature Point Object JSON format

Product Feature Point Object

ProductFeaturePoint definition.

NameTypeRead-onlyMandatoryDescription
idstringyesnoFeature point identifier.
moduleIdstringnonoModule identifier.
namestringnonoFeature point item name.
descriptionstringnonoFeature point item description.
featurePointItemsFeaturePointItem[]nonoThe 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 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.

Feature Point Item Object JSON format

Feature Point Item Object

FeaturePointItem definition.

NameTypeRead-onlyMandatoryDescription
idstringyesnoFeature point item identifier.
productIdstringnonoProduct identifier.
namestringnonoFeature point item name.
descriptionstringnonoFeature point item description.
parentIdstringnonoParent feature point item identifier.
categorystringnonoFeature point category.
chatbotEngineIdGuidnonoChatbot 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 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

NameTypeRequiredDescription
idstringyesUnique identifier of the feature point item.

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.

Invoice Bill To Object JSON format

Invoice Bill To Object

InvoiceBillTo definition.

NameTypeRead-onlyMandatoryDescription
invoiceIdGuidnonoInvoice identifier.
siteIdintnonoSite identifier.
firstNamestringnoyesFirst name.
lastNamestringnoyesLast name.
companyNamestringnoyesCompany name.
emailstringnoyesEmail address.
phonestringnoyesPhone number.
countryOrRegionstringnoyesCountry or region.
stateOrProvincestringnoyesState or province.
citystringnoyesCity.
mailingAddressstringnoyesMailing address.
jobTitlestringnoyesJob title.
billTostringnoyesBill to.

Invoice Bill To Endpoints

Get paged collection of invoice bill tos

GET /api/billing/invoiceBillTos

  • Parameters

Query Parameters

NameTypeRequiredDescription
siteIdstringnoUnique identifier of a Site.
  • Response

    The response is paged collection of InvoiceBillTo 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

NameTypeRequiredDescription
invoiceIdGuidnoUnique identifier of a Invoice.

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"
}

Was this article helpful?