Skip to content

Manage Subscriptions

A subscription is created for an organization under a service. The subscription will contain one (1) product and, optionally addons. The subscription terms will be based on the product.

API Details

OrganizationServiceSubscriptions
OperationSwagger DescriptionMethodAPI
Create a subscriptionCreates subscription for organization custom servicePOST/api/resellers/{resellerId}/organizations/{organizationId}/services/{serviceId}/subscriptions
Retrieve all organizations subscriptionsReturns all organization custom service subscriptions, including cancelledGET/api/resellers/{resellerId}/organizations/{organizationId}/services/{serviceId}/subscriptions
Retrieve an organizations subscriptionReturns organization custom service subscriptionGET/api/resellers/{resellerId}/organizations/{organizationId}/services/{serviceId}/subscriptions/{subscriptionId}
Update an organization’s subscription detailsUpdate subscription for organization custom servicePUT/api/resellers/{resellerId}/organizations/{organizationId}/services/{serviceId}/subscriptions/{subscriptionId}
Delete an organization’s subscriptionCancels custom service subscription for organization.DELETE/api/resellers/{resellerId}/organizations/{organizationId}/services/{serviceId}/subscriptions/{subscriptionId}
Other
Retrieve available productsReturns all organization service productsGET/api/resellers/{resellerId}/organizations/{organizationId}/services/{serviceId}/products
Retrieve product addonsReturns all reseller service product addonsGET/api/resellers/{resellerId}/services/{serviceId}/products/{productId}/addons
Retrieve an organization’s subscription historyReturns organization subscription historyGET/api/resellers/{resellerId}/organizations/{organizationId}/services/{serviceId}/Subscriptions/history/{subscriptionId}

API Examples

Retrieve Products

Retrieve available products
End Point/api/resellers/{resellerId}/organizations/{organizationId}/services/{serviceId}/products
HTTP MethodGET
Request BodyN/A.
Successful Example Response200[ { "resellerId": "9230183c-6aeb-412f-9c7b-5a94d3cf82dc", "organizationId": "b8bc8c08-1062-40c3-8317-39f09dce6ab8", "serviceId": "8806367b-001a-4632-afb4-27a7fad7660c", "productId": "b5861376-08af-48c5-acbf-ef935b0d9c74", "name": "Google Workspace (pay as you go)", "description": "Add and delete users at any time. You will be billed at the end of the month for the actual number of accounts in service during the month.", "itemCode": "payg", "subscriptionPeriod": 1, "billingInterval": 1, "minimumQuantity": 1.00000000, "maximumQuantity": null, "trialPeriod": 0, "enforceTrial": false, "cost": "5.00", "price": "10.00", "currencyCode": "EUR", "customProperties": [ { "type": "textbox", "id": "entitlementId", "name": "Entitlement Id", "visible": false } ] } ]
Error Example Response404

Retrieve Products Add Ons

Retrieve available products addons
End Point/api/resellers/{resellerId}/services/{serviceId}/products/{productId}/addons
HTTP MethodGET
Request BodyN/A.
Successful Example Response200[ { "id": "9afb33df-9172-4709-b343-65f39d6bd8a3", "name": "Google Workspace Business Standard", "itemCode": "SkYiNEdAxQfMSL", "enableGrouping": true, "groupName": "payg", "price": "10.00", "cost": "5.00", "pricePer": 3 } ]
Error Example Response404

Create a Subscription

Create a Subscription
End Point/api/resellers/{resellerId}/organizations/{organizationId}/services/{serviceId}/subscriptions
HTTP MethodPOST
Request Body{ "name": "Google Workspace Subscription for Accounting Department", "productId": "b5861376-08af-48c5-acbf-ef935b0d9c74", "poNumber": "1234567", "isTrial": false, "hideFromBilling": false, "addons": [ { "id": "9afb33df-9172-4709-b343-65f39d6bd8a3" } ] }
Successful Example Response201
Error Example Response400{ "Name": [ "The Name field is required." ], "ProductId": [ "The ProductId field is required." ] } [ { "errorCode": 13, "errorName": "NotFound", "errorMessage": "The organization do not have this service. Please add the service to the organization before creating a subscription." } ]  

API Field Definitions

FieldDescription
name*The friendly name of the subscription.
productId*A unique identifier of an existing product under the service. Can be retrieved using /organizations/{organizationId}/services/{serviceId}/products
poNumberA Purchase Order (PO) number. This field is optional.
isTrialDetermines if the subscription should be hidden from billing report.
hideFromBillingDetermines if the subscription should be hidden from the billing report.
quantityAn integer that defines the number of licenses for the subscription.
customPropertiesDataCustom Properties Custom properties can be set when the subscription is created or updated if they have been defined
addonsAddons are required for the product.
Can be retrieved using /api/resellers/{resellerId}/services/{serviceId}/products/{productId}/addons