In this document:
The considered APS type (download
)
extends the Resource APS type(s) and looks as follows:
{
"name": "DiscountManager",
"id": "http://com.odin.marketing/discountmanager/1.4",
"apsVersion": "2.0",
"implements": [
"http://aps-standard.org/types/core/resource/1.0"
],
"access": {
"global": true
},
"operations": {
"getProductGroupList": {
"path": "/productGroups",
"verb": "GET",
"response": {
"type": "array"
},
"errorResponse": {
"type": "object"
}
},
"createProductGroup": {
"path": "/productGroups",
"verb": "POST",
"response": {
"type": "ProductGroupDTO"
},
"errorResponse": {
"type": "object"
}
},
"cloneProductGroup": {
"path": "/productGroups/clone",
"verb": "POST",
"response": {
"type": "ProductGroupDTO"
},
"errorResponse": {
"type": "object"
}
},
"getProductGroup": {
"path": "/productGroups/{groupId}",
"verb": "GET",
"response": {
"type": "ProductGroupDTO"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"groupId": {
"kind": "path",
"type": "string"
}
}
},
"updateProductGroup": {
"path": "/productGroups",
"verb": "PUT",
"response": {
"type": "ProductGroupDTO"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"productGroup": {
"kind": "body",
"type": "ProductGroupDTO"
}
}
},
"updateProductGroupWithId": {
"path": "/productGroups/{groupId}",
"verb": "PUT",
"response": {
"type": "ProductGroupDTO"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"groupId": {
"kind": "path",
"type": "string"
},
"productGroup": {
"kind": "body",
"type": "ProductGroupDTO"
}
}
},
"deleteProductGroup": {
"path": "/productGroups/{groupId}",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"groupId": {
"kind": "path",
"type": "string"
}
}
},
"addPlansToGroup": {
"path": "/productGroups/{groupId}/plans",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"groupId": {
"kind": "path",
"type": "string"
},
"plans": {
"kind": "body",
"type": "array"
}
}
},
"addResourcesToGroup": {
"path": "/productGroups/{groupId}/resources",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"groupId": {
"kind": "path",
"type": "string"
},
"resources": {
"kind": "body",
"type": "array"
}
}
},
"addResourceRatesToGroup": {
"path": "/productGroups/{groupId}/resourceRates",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"groupId": {
"kind": "path",
"type": "string"
},
"resourceRates": {
"kind": "body",
"type": "array"
}
}
},
"getPlansFromGroup": {
"path": "/productGroups/{groupId}/plans",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "PlanDTO"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"groupId": {
"kind": "path",
"type": "string"
}
}
},
"getResourcesFromGroup": {
"path": "/productGroups/{groupId}/resources",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "ResourceDTO"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"groupId": {
"kind": "path",
"type": "string"
}
}
},
"getResourceRatesFromGroup": {
"path": "/productGroups/{groupId}/resourceRates",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "ResourceRateDTO"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"groupId": {
"kind": "path",
"type": "string"
}
}
},
"removePlansFromGroup": {
"path": "/productGroups/{groupId}/plans",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"groupId": {
"kind": "path",
"type": "string"
},
"planId": {
"kind": "query",
"type": "string"
}
}
},
"removeResourcesFromGroup": {
"path": "/productGroups/{groupId}/resources",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"groupId": {
"kind": "path",
"type": "string"
},
"resourceId": {
"kind": "query",
"type": "string"
}
}
},
"removeResourceRatesFromGroup": {
"path": "/productGroups/{groupId}/resourceRates",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"groupId": {
"kind": "path",
"type": "string"
},
"resourceId": {
"kind": "query",
"type": "string"
},
"planId": {
"kind": "query",
"type": "string"
}
}
},
"getDefaultPromoCodeTemplates": {
"path": "/oneTimePromoCodes/templates/default",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "string"
}
},
"errorResponse": {
"type": "object"
}
},
"getLatestPromoCodeTemplate": {
"path": "/oneTimePromoCodes/templates/latest",
"verb": "GET",
"response": {
"type": "StringResponse"
},
"errorResponse": {
"type": "object"
}
},
"updateLatestPromoCodeTemplate": {
"path": "/oneTimePromoCodes/templates/latest",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"template": {
"kind": "body",
"type": "string"
}
}
},
"getRandomPromoCodeForTemplate": {
"path": "/oneTimePromoCodes/random",
"verb": "GET",
"response": {
"type": "StringResponse"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"template": {
"kind": "query",
"type": "string"
}
}
},
"getDiscountList": {
"path": "/discounts",
"verb": "GET",
"response": {
"type": "array"
},
"errorResponse": {
"type": "object"
}
},
"createDiscount": {
"path": "/discounts",
"verb": "POST",
"response": {
"type": "DiscountDTO"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"discount": {
"kind": "body",
"type": "DiscountDTO"
}
}
},
"getDiscount": {
"path": "/discounts/{discountId}",
"verb": "GET",
"response": {
"type": "DiscountDTO"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
}
}
},
"updateDiscount": {
"path": "/discounts",
"verb": "PUT",
"response": {
"type": "DiscountDTO"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"discount": {
"kind": "body",
"type": "DiscountDTO"
}
}
},
"updateDiscountWithId": {
"path": "/discounts/{discountId}",
"verb": "PUT",
"response": {
"type": "DiscountDTO"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
},
"discount": {
"kind": "body",
"type": "DiscountDTO"
}
}
},
"deleteDiscount": {
"path": "/discounts/{discountId}",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
}
}
},
"addPromoCodes": {
"path": "/discounts/{discountId}/oneTimePromoCodes",
"verb": "POST",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
},
"promoCodesToAdd": {
"kind": "body",
"type": "array"
}
}
},
"generatePromoCodes": {
"path": "/discounts/{discountId}/oneTimePromoCodes/generate",
"verb": "POST",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
},
"generatePromoCodesRequest": {
"kind": "body",
"type": "GenerateOneTimePromoCodesRequestDTO"
}
}
},
"importPromoCodes": {
"path": "/discounts/{discountId}/oneTimePromoCodes/import",
"verb": "POST",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
}
}
},
"addAccounts": {
"path": "/discounts/{discountId}/accounts",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
},
"accounts": {
"kind": "body",
"type": "array"
}
}
},
"addCustomerClasses": {
"path": "/discounts/{discountId}/customerClasses",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
},
"classes": {
"kind": "body",
"type": "array"
}
}
},
"addPlansToDiscount": {
"path": "/discounts/{discountId}/plans",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
},
"plans": {
"kind": "body",
"type": "array"
}
}
},
"addResourcesToDiscount": {
"path": "/discounts/{discountId}/resources",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
},
"resources": {
"kind": "body",
"type": "array"
}
}
},
"addResourceRatesToDiscount": {
"path": "/discounts/{discountId}/resourceRates",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
},
"resourceRates": {
"kind": "body",
"type": "array"
}
}
},
"getPromoCodes": {
"path": "/discounts/{discountId}/oneTimePromoCodes",
"verb": "GET",
"response": {
"type": "array"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
}
}
},
"getAccounts": {
"path": "/discounts/{discountId}/accounts",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "AccountDTO"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
}
}
},
"getCustomerClasses": {
"path": "/discounts/{discountId}/customerClasses",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "CustomerClassDTO"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
}
}
},
"getPlansByDiscountId": {
"path": "/discounts/{discountId}/plans",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "PlanDTO"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
}
}
},
"getResourcesByDiscountId": {
"path": "/discounts/{discountId}/resources",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "ResourceDTO"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
}
}
},
"getResourceRatesByDiscountId": {
"path": "/discounts/{discountId}/resourceRates",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "ResourceRateDTO"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
}
}
},
"removePromoCode": {
"path": "/discounts/{discountId}/oneTimePromoCodes",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
},
"promoCode": {
"kind": "query",
"type": "string"
}
}
},
"removeAccounts": {
"path": "/discounts/{discountId}/accounts",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
},
"accountId": {
"kind": "query",
"type": "string"
}
}
},
"removeCustomerClasses": {
"path": "/discounts/{discountId}/customerClasses",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
},
"classId": {
"kind": "query",
"type": "string"
}
}
},
"removePlansFromDiscount": {
"path": "/discounts/{discountId}/plans",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
},
"planId": {
"kind": "query",
"type": "string"
}
}
},
"removeResourcesFromDiscount": {
"path": "/discounts/{discountId}/resources",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
},
"resourceId": {
"kind": "query",
"type": "string"
}
}
},
"removeResourceRatesFromDiscount": {
"path": "/discounts/{discountId}/resourceRates",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"discountId": {
"kind": "path",
"type": "string"
},
"resourceId": {
"kind": "query",
"type": "string"
},
"planId": {
"kind": "query",
"type": "string"
}
}
},
"getApplicableDiscounts": {
"path": "/applicableDiscounts",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "ApplicableDiscountDTO"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"accountId": {
"kind": "query",
"type": "string"
}
}
},
"getEnabledFeatures": {
"path": "/feature/enabledFeatures",
"verb": "GET",
"response": {
"type": "array"
},
"errorResponse": {
"type": "object"
}
},
"getPromotions": {
"path": "/promotions",
"verb": "GET",
"response": {
"type": "array"
},
"errorResponse": {
"type": "object"
}
},
"createPromotion": {
"path": "/promotions",
"verb": "POST",
"response": {
"type": "PromotionDTO"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"promotion": {
"kind": "body",
"type": "PromotionDTO"
}
}
},
"getPromotionById": {
"path": "/promotions/{promotionId}",
"verb": "GET",
"response": {
"type": "PromotionDTO"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
}
}
},
"updatePromotion": {
"path": "/promotions",
"verb": "PUT",
"response": {
"type": "PromotionDTO"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"promotion": {
"kind": "body",
"type": "PromotionDTO"
}
}
},
"updatePromotionWithId": {
"path": "/promotions/{promotionId}",
"verb": "PUT",
"response": {
"type": "PromotionDTO"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"promotion": {
"kind": "body",
"type": "PromotionDTO"
}
}
},
"deletePromotionById": {
"path": "/promotions/{promotionId}",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
}
}
},
"addPromoCodesToPromotion": {
"path": "/promotions/{promotionId}/oneTimePromoCodes",
"verb": "POST",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"promoCodesToAdd": {
"kind": "body",
"type": "array"
}
}
},
"generatePromoCodesForPromotion": {
"path": "/promotions/{promotionId}/oneTimePromoCodes/generate",
"verb": "POST",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"generatePromoCodesRequest": {
"kind": "body",
"type": "GenerateOneTimePromoCodesRequestDTO"
}
}
},
"importPromoCodesToPromotion": {
"path": "/promotions/{promotionId}/oneTimePromoCodes/import",
"verb": "POST",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
}
}
},
"addPlansToPromotion": {
"path": "/promotions/{promotionId}/plans",
"verb": "POST",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"promotedPlansToAdd": {
"kind": "body",
"type": "array"
}
}
},
"addParentPlansToPromotion": {
"path": "/promotions/{promotionId}/parentPlans",
"verb": "POST",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"promotedParentPlansToAdd": {
"kind": "body",
"type": "array"
}
}
},
"addResourcesToPromotion": {
"path": "/promotions/{promotionId}/resources",
"verb": "POST",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"promotedResourcesToAdd": {
"kind": "body",
"type": "array"
}
}
},
"getPromoCodesByPromotionId": {
"path": "/promotions/{promotionId}/oneTimePromoCodes",
"verb": "GET",
"response": {
"type": "array"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
}
}
},
"getPlansByPromotionId": {
"path": "/promotions/{promotionId}/plans",
"verb": "GET",
"response": {
"type": "array"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
}
}
},
"getParentPlansByPromotionId": {
"path": "/promotions/{promotionId}/parentPlans",
"verb": "GET",
"response": {
"type": "array"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
}
}
},
"getResourcesByPromotionId": {
"path": "/promotions/{promotionId}/resources",
"verb": "GET",
"response": {
"type": "array"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
}
}
},
"updatePlansInPromotion": {
"path": "/promotions/{promotionId}/plans",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"promotedPlansToUpdate": {
"kind": "body",
"type": "array"
}
}
},
"updateParentPlansInPromotion": {
"path": "/promotions/{promotionId}/parentPlans",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"promotedParentPlansToUpdate": {
"kind": "body",
"type": "array"
}
}
},
"updateResourcesInPromotion": {
"path": "/promotions/{promotionId}/resources",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"promotedResourcesToUpdate": {
"kind": "body",
"type": "array"
}
}
},
"removePromoCodeFromPromotion": {
"path": "/promotions/{promotionId}/oneTimePromoCodes",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"promoCode": {
"kind": "query",
"type": "string"
}
}
},
"removePlanFromPromotion": {
"path": "/promotions/{promotionId}/plans",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"planId": {
"kind": "query",
"type": "string"
}
}
},
"removeParentPlanFromPromotion": {
"path": "/promotions/{promotionId}/parentPlans",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"planId": {
"kind": "query",
"type": "string"
}
}
},
"removeResourceFromPromotion": {
"path": "/promotions/{promotionId}/resources",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"planId": {
"kind": "query",
"type": "string"
},
"resourceId": {
"kind": "query",
"type": "string"
}
}
}
},
"structures": {
"ProductGroupDTO": {
"type": "object",
"properties": {
"groupId": {
"type": "string"
},
"owner": {
"type": "string"
},
"name": {
"type": "string",
"required": true
},
"description": {
"type": "string"
}
}
},
"Period": {
"type": "object",
"properties": {
"unit": {
"type": "string",
"enum": [
"DAYS",
"MONTHS",
"YEARS"
]
},
"duration": {
"type": "integer"
}
}
},
"PlanDTO": {
"type": "object",
"properties": {
"planId": {
"type": "string",
"required": true
},
"period": {
"type": "Period"
}
}
},
"ResourceDTO": {
"type": "object",
"properties": {
"resourceId": {
"type": "string",
"required": true
}
}
},
"ResourceRateDTO": {
"type": "object",
"properties": {
"resourceId": {
"type": "string",
"required": true
},
"planId": {
"type": "string",
"required": true
},
"period": {
"type": "Period"
}
}
},
"StringResponse": {
"type": "object",
"properties": {
"value": {
"type": "string"
}
}
},
"DiscountDTO": {
"type": "object",
"properties": {
"discountId": {
"type": "string"
},
"name": {
"type": "string",
"required": true
},
"owner": {
"type": "string"
},
"type": {
"type": "string",
"required": true,
"default": "ACCOUNT_OR_CUSTOMER_CLASS",
"enum": [
"ACCOUNT_OR_CUSTOMER_CLASS",
"PROMO_CODE",
"ONE_TIME_PROMO_CODE"
]
},
"status": {
"type": "string",
"default": "INACTIVE",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"promoCodeMask": {
"type": "string"
},
"discountRate": {
"type": "number",
"required": true
},
"forAllPlans": {
"type": "boolean",
"default": "false"
},
"forAllResources": {
"type": "boolean",
"default": "false"
},
"priority": {
"type": "integer",
"default": "1"
},
"applicationRule": {
"type": "string",
"default": "SUCCESSIVE_DISCOUNT",
"enum": [
"SUCCESSIVE_DISCOUNT",
"ARITHMETIC_SUM"
]
},
"productGroupId": {
"type": "string"
}
}
},
"OneTimePromoCodeDTO": {
"type": "object",
"properties": {
"promoCode": {
"type": "string",
"required": true
},
"subscriptionId": {
"type": "string"
}
}
},
"AccountDTO": {
"type": "object",
"properties": {
"accountId": {
"type": "string",
"required": true
}
}
},
"CustomerClassDTO": {
"type": "object",
"properties": {
"classId": {
"type": "string"
}
}
},
"ApplicableDiscountDTO": {
"type": "object",
"properties": {
"plans": {
"type": "array",
"items": {
"type": "PlanDTO"
}
},
"resources": {
"type": "array",
"items": {
"type": "ResourceDTO"
}
}
}
},
"PromotionDTO": {
"type": "object",
"properties": {
"promotionId": {
"type": "string"
},
"name": {
"type": "string",
"required": true
},
"owner": {
"type": "string"
},
"targetType": {
"type": "string",
"enum": [
"CUSTOMER",
"RESELLER"
]
},
"type": {
"type": "string",
"enum": [
"GLOBAL",
"PARENT_PLAN",
"PROMO_CODE",
"ONE_TIME_PROMO_CODE"
]
},
"status": {
"type": "string",
"required": true,
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"promoCode": {
"type": "string"
},
"condition": {
"type": "string"
},
"availableFrom": {
"type": "date",
"format": "yyyy-MM-dd"
},
"availableUntil": {
"type": "date",
"format": "yyyy-MM-dd"
},
"applicableFrom": {
"type": "date",
"format": "yyyy-MM-dd"
},
"applicableUntil": {
"type": "date",
"format": "yyyy-MM-dd"
},
"applicableTo": {
"type": "array",
"required": true,
"enum": [
"SALES",
"RENEWAL",
"SWITCH_PLAN"
],
"items": {
"type": "string"
}
},
"subscriptionsLimit": {
"type": "integer"
},
"perCustomerLimit": {
"type": "integer"
}
}
},
"PromotedPlanDTO": {
"type": "object",
"properties": {
"planId": {
"type": "string",
"required": true
},
"period": {
"type": "Period"
},
"promotionPeriod": {
"type": "Period"
},
"limitPerParentSubscription": {
"type": "integer"
},
"setupFee": {
"type": "PromotionFeeDTO",
"required": true
},
"recurringFee": {
"type": "PromotionFeeDTO",
"required": true
},
"renewalFee": {
"type": "PromotionFeeDTO",
"required": true
},
"transferFee": {
"type": "PromotionFeeDTO",
"required": true
}
}
},
"PromotedParentPlanDTO": {
"type": "object",
"properties": {
"planId": {
"type": "string",
"required": true
},
"period": {
"type": "Period"
},
"limitPerSubscription": {
"type": "integer"
}
}
},
"PromotedResourceDTO": {
"type": "object",
"properties": {
"planId": {
"type": "string",
"required": true
},
"resourceId": {
"type": "string",
"required": true
},
"period": {
"type": "Period"
},
"setupFee": {
"type": "PromotionFeeDTO",
"required": true
},
"recurringFee": {
"type": "PromotionFeeDTO",
"required": true
},
"overuseFee": {
"type": "PromotionFeeDTO",
"required": true
}
}
}
}
}
OPERATION |
VERB |
PATH |
RETURNS |
Description |
---|---|---|---|---|
GET |
/productGroups |
List of ProductGroupDTO |
Get list of product groups.
Support RQL operators.
Accept HTTP header “APS-Actor-Scope” with possible values “OWN” or “FULL”.
|
|
POST |
/productGroups |
Created ProductGroupDTO. |
Creates a Product Group. |
|
POST |
/productGroups/clone |
Created ProductGroupDTO. |
Clones a Product Group. |
|
GET |
/productGroups/{groupId} |
Created ProductGroupDTO. |
Get a Product Group by Product Group Id. |
|
PUT |
/productGroups |
Updated ProductGroupDTO. |
Update a Product Group. |
|
PUT |
/productGroups/{groupId} |
Updated ProductGroupDTO. |
Update a Product Group with given Id. |
|
DELETE |
/productGroups/{groupId} |
Delete a Product Group with given Id. |
||
PUT |
/productGroups/{groupId}/plans |
Add list of plans to a Product Group. |
||
PUT |
/productGroups/{groupId}/resources |
Add list of resources to a Product Group. |
||
PUT |
/productGroups/{groupId}/resourceRates |
Add list of resource rates to a Product Group. |
||
GET |
/productGroups/{groupId}/plans |
List of PlanDTO |
Get list of plans for given Product Group. |
|
GET |
/productGroups/{groupId}/resources |
List of ResourceDTO |
Get list of resources for given Product Group. |
|
GET |
/productGroups/{groupId}/resourceRates |
List of ResourceRateDTO |
Get list of resource rates for given Product Group. |
|
DELETE |
/productGroups/{groupId}/plans |
Remove plan or plan period from given Product Group. |
||
DELETE |
/productGroups/{groupId}/resources |
Remove resource from given Product Group. |
||
DELETE |
/productGroups/{groupId}/resourceRates |
Remove resource rate from given Product Group. |
||
GET |
/oneTimePromoCodes/templates/default |
Default actual promo code templates for all users, or none if they don’t exist |
Get default promo code templates for all users <br> please, note, that there can be none, single or multiple such promo code templates |
|
GET |
/oneTimePromoCodes/templates/latest |
Latest actual promo code template or default template, if none is persisted |
Get latest promo code template for current user <br> please, note, that there can be none, single or multiple promo code templates for user |
|
PUT |
/oneTimePromoCodes/templates/latest |
Update latest promo code template for current user <br> please, note, that there can be none, single or multiple promo code templates for user |
||
GET |
/oneTimePromoCodes/random |
Generate one random sample promo code for specified template |
||
GET |
/discounts |
List of DiscountDTO. |
Get list of discounts.
Support RQL operators.
Accept HTTP header “APS-Actor-Scope” with possible values “OWN” or “FULL”.
|
|
POST |
/discounts |
Created DiscountDTO. |
Creates a discount. |
|
GET |
/discounts/{discountId} |
Created DiscountDTO. |
Get a discount by discount Id. |
|
PUT |
/discounts |
Updated DiscountDTO. |
Update a discount. |
|
PUT |
/discounts/{discountId} |
Updated DiscountDTO. |
Update a discount with given Id. |
|
DELETE |
/discounts/{discountId} |
Delete a discount with given Id. |
||
POST |
/discounts/{discountId}/oneTimePromoCodes |
Add one-time promo codes to specified discount <br> please, note, that some preliminary validation checks can be made, to preserve uniqueness of promo codes for user account |
||
POST |
/discounts/{discountId}/oneTimePromoCodes/generate |
Generate one-time promo codes from template and add them to specified discount <br> please, note, that some preliminary validation checks can be made, to preserve uniqueness of promo codes for user account |
||
POST |
/discounts/{discountId}/oneTimePromoCodes/import |
Parse multipart request containing file with list of one-time promo codes and add them to specified discount <br> please, note, that some preliminary validation checks can be made, to preserve uniqueness of promo codes for user account <br> text or csv files for importing should contain promo codes, separated by new line, comma and semicolon. Escape character is ‘’. <br> All leading and trailing spaces of promo codes will be truncated, all other symbols will be a part of promo codes. |
||
PUT |
/discounts/{discountId}/accounts |
Add list of accounts to a discount. |
||
PUT |
/discounts/{discountId}/customerClasses |
Add list of customer classes to a discount. |
||
PUT |
/discounts/{discountId}/plans |
Add list of plans to a discount. |
||
PUT |
/discounts/{discountId}/resources |
Add list of resources to a discount. |
||
PUT |
/discounts/{discountId}/resourceRates |
Add list of resource rates to a discount. |
||
GET |
/discounts/{discountId}/oneTimePromoCodes |
List of OneTimePromoCodeDTO |
Get all one-time promo codes assigned to specified discount |
|
GET |
/discounts/{discountId}/accounts |
List of AccountDTO |
Get list of accounts for given discount |
|
GET |
/discounts/{discountId}/customerClasses |
List of CustomerClassDTO |
Get list of customer classes for given discount |
|
GET |
/discounts/{discountId}/plans |
List of PlanDTO |
Get list of plans for given discount |
|
GET |
/discounts/{discountId}/resources |
List of ResourceDTO |
Get list of resources for given discount |
|
GET |
/discounts/{discountId}/resourceRates |
List of ResourceRateDTO |
Get list of resource rates for given discount |
|
DELETE |
/discounts/{discountId}/oneTimePromoCodes |
Remove promo code from specified discount <br> check if specified promo code exists and remove it from specified discount |
||
DELETE |
/discounts/{discountId}/accounts |
Remove account from given discount |
||
DELETE |
/discounts/{discountId}/customerClasses |
Remove customer class from given discount |
||
DELETE |
/discounts/{discountId}/plans |
Remove plan or plan period from given discount |
||
DELETE |
/discounts/{discountId}/resources |
Remove resource from given discount |
||
DELETE |
/discounts/{discountId}/resourceRates |
Remove resource rate from given discount |
||
GET |
/applicableDiscounts |
Get list of active discounts applicable for given account |
||
GET |
/feature/enabledFeatures |
|||
GET |
/promotions |
JpaResultWithTotal<PromotionDTO> |
GetPromotionList. |
|
POST |
/promotions |
PromotionDTO. |
CreatePromotion. |
|
GET |
/promotions/{promotionId} |
PromotionDTO. |
GetPromotion. |
|
PUT |
/promotions |
PromotionDTO. |
UpdatePromotion. |
|
PUT |
/promotions/{promotionId} |
PromotionDTO. |
UpdatePromotion. |
|
DELETE |
/promotions/{promotionId} |
DeletePromotion. |
||
POST |
/promotions/{promotionId}/oneTimePromoCodes |
Add one-time promo codes to specified promotion <br> please, note, that some preliminary validation checks can be made, to preserve uniqueness of promo codes for user account |
||
POST |
/promotions/{promotionId}/oneTimePromoCodes/generate |
Generate one-time promo codes from template and add them to specified promotion <br> please, note, that some preliminary validation checks can be made, to preserve uniqueness of promo codes for user account |
||
POST |
/promotions/{promotionId}/oneTimePromoCodes/import |
Parse multipart request containing file with list of one-time promo codes and add them to specified promotion <br> please, note, that some preliminary validation checks can be made, to preserve uniqueness of promo codes for user account <br> text or csv files for importing should contain promo codes, separated by new line, comma and semicolon. Escape character is ‘’. <br> All leading and trailing spaces of promo codes will be truncated, all other symbols will be a part of promo codes. |
||
POST |
/promotions/{promotionId}/plans |
AddPlansToPromotion. |
||
POST |
/promotions/{promotionId}/parentPlans |
AddParentPlansToPromotion. |
||
POST |
/promotions/{promotionId}/resources |
AddResourcesToPromotion. |
||
GET |
/promotions/{promotionId}/oneTimePromoCodes |
List of OneTimePromoCodeDTO |
Get all one-time promo codes assigned to specified promotion |
|
GET |
/promotions/{promotionId}/plans |
List<PlanDTO> |
GetPlansByPromotionId. |
|
GET |
/promotions/{promotionId}/parentPlans |
List<PlanDTO> |
GetParentPlansByPromotionId. |
|
GET |
/promotions/{promotionId}/resources |
List<ResourceDTO> |
GetResourcesByPromotionId. |
|
PUT |
/promotions/{promotionId}/plans |
UpdatePlansInPromotion. |
||
PUT |
/promotions/{promotionId}/parentPlans |
UpdateParentPlansInPromotion. |
||
PUT |
/promotions/{promotionId}/resources |
UpdateResourcesInPromotion. |
||
DELETE |
/promotions/{promotionId}/oneTimePromoCodes |
Remove promo code from specified promotion <br> check if specified promo code exists and remove it from specified promotion |
||
DELETE |
/promotions/{promotionId}/plans |
RemovePlanFromPromotion. |
||
DELETE |
/promotions/{promotionId}/parentPlans |
RemoveParentPlansFromPromotion. |
||
DELETE |
/promotions/{promotionId}/resources |
RemoveResourceFromPromotion. |
HTTP Request
GET /aps/2/resources/{aps-id}/productGroups
Description
Returns
List of ProductGroupDTO
HTTP Request
POST /aps/2/resources/{aps-id}/productGroups
Description
Creates a Product Group.
Returns
Created ProductGroupDTO.
HTTP Request
POST /aps/2/resources/{aps-id}/productGroups/clone
Description
Clones a Product Group.
Returns
Created ProductGroupDTO.
HTTP Request
GET /aps/2/resources/{aps-id}/productGroups/{groupId}
Description
Get a Product Group by Product Group Id.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
groupId |
String |
Product Group Id |
Returns
Created ProductGroupDTO.
HTTP Request
PUT /aps/2/resources/{aps-id}/productGroups
Description
Update a Product Group.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
productGroup |
Returns
Updated ProductGroupDTO.
HTTP Request
PUT /aps/2/resources/{aps-id}/productGroups/{groupId}
Description
Update a Product Group with given Id.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
groupId |
String |
Product Group Id |
productGroup |
Returns
Updated ProductGroupDTO.
HTTP Request
DELETE /aps/2/resources/{aps-id}/productGroups/{groupId}
Description
Delete a Product Group with given Id.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
groupId |
String |
Product Group Id |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/productGroups/{groupId}/plans
Description
Add list of plans to a Product Group.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
groupId |
String |
Product Group Id |
plans |
Array |
List of PlanDTO |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/productGroups/{groupId}/resources
Description
Add list of resources to a Product Group.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
groupId |
String |
Product Group Id |
resources |
Array |
List of ResourceDTO |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/productGroups/{groupId}/resourceRates
Description
Add list of resource rates to a Product Group.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
groupId |
String |
Product Group Id |
resourceRates |
Array |
List of ResourceRateDTO |
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/productGroups/{groupId}/plans
Description
Get list of plans for given Product Group.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
groupId |
String |
Product Group Id |
Returns
List of PlanDTO
HTTP Request
GET /aps/2/resources/{aps-id}/productGroups/{groupId}/resources
Description
Get list of resources for given Product Group.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
groupId |
String |
Product Group Id |
Returns
List of ResourceDTO
HTTP Request
GET /aps/2/resources/{aps-id}/productGroups/{groupId}/resourceRates
Description
Get list of resource rates for given Product Group.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
groupId |
String |
Product Group Id |
Returns
List of ResourceRateDTO
HTTP Request
DELETE /aps/2/resources/{aps-id}/productGroups/{groupId}/plans
Description
Remove plan or plan period from given Product Group.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
groupId |
String |
Product Group Id |
planId |
String |
Customer class Id |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/productGroups/{groupId}/resources
Description
Remove resource from given Product Group.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
groupId |
String |
Product Group Id |
resourceId |
String |
Resource Id |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/productGroups/{groupId}/resourceRates
Description
Remove resource rate from given Product Group.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
groupId |
String |
|
resourceId |
String |
|
planId |
String |
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/oneTimePromoCodes/templates/default
Description
Get default promo code templates for all users <br> please, note, that there can be none, single or multiple such promo code templates
Returns
Default actual promo code templates for all users, or none if they don’t exist
HTTP Request
GET /aps/2/resources/{aps-id}/oneTimePromoCodes/templates/latest
Description
Get latest promo code template for current user <br> please, note, that there can be none, single or multiple promo code templates for user
Returns
Latest actual promo code template or default template, if none is persisted
HTTP Request
PUT /aps/2/resources/{aps-id}/oneTimePromoCodes/templates/latest
Description
Update latest promo code template for current user <br> please, note, that there can be none, single or multiple promo code templates for user
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
template |
String |
Latest actual promo code template to be persisted |
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/oneTimePromoCodes/random
Description
Generate one random sample promo code for specified template
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
template |
String |
Promo code template |
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/discounts
Description
Returns
List of DiscountDTO.
HTTP Request
POST /aps/2/resources/{aps-id}/discounts
Description
Creates a discount.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discount |
Returns
Created DiscountDTO.
HTTP Request
GET /aps/2/resources/{aps-id}/discounts/{discountId}
Description
Get a discount by discount Id.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
Returns
Created DiscountDTO.
HTTP Request
PUT /aps/2/resources/{aps-id}/discounts
Description
Update a discount.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discount |
Returns
Updated DiscountDTO.
HTTP Request
PUT /aps/2/resources/{aps-id}/discounts/{discountId}
Description
Update a discount with given Id.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
discount |
Returns
Updated DiscountDTO.
HTTP Request
DELETE /aps/2/resources/{aps-id}/discounts/{discountId}
Description
Delete a discount with given Id.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
Returns
HTTP Request
POST /aps/2/resources/{aps-id}/discounts/{discountId}/oneTimePromoCodes
Description
Add one-time promo codes to specified discount <br> please, note, that some preliminary validation checks can be made, to preserve uniqueness of promo codes for user account
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount ID |
promoCodesToAdd |
Array |
List of String values for one-time promo codes |
Returns
HTTP Request
POST /aps/2/resources/{aps-id}/discounts/{discountId}/oneTimePromoCodes/generate
Description
Generate one-time promo codes from template and add them to specified discount <br> please, note, that some preliminary validation checks can be made, to preserve uniqueness of promo codes for user account
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Promotion D |
generatePromoCodesRequest |
GenerateOneTimePromoCodesRequestDTO |
Instance of GenerateOneTimePromoCodesRequestDTO, containing information about promo code template and number of promo codes that have to be generated with that template <br>rules of promo code template notation: <br> X = Uppercase letters (A - Z) <br> H = Hexadecimal digits (0 - 9, A - F) <br> 9 = Digits (0 - 9) <br> * = Uppercase letters or digits <br> = Escape character <br> for example: PROMO_CODE_XXX_***_HH\999 |
Returns
HTTP Request
POST /aps/2/resources/{aps-id}/discounts/{discountId}/oneTimePromoCodes/import
Description
Parse multipart request containing file with list of one-time promo codes and add them to specified discount <br> please, note, that some preliminary validation checks can be made, to preserve uniqueness of promo codes for user account <br> text or csv files for importing should contain promo codes, separated by new line, comma and semicolon. Escape character is ‘’. <br> All leading and trailing spaces of promo codes will be truncated, all other symbols will be a part of promo codes.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount ID |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/discounts/{discountId}/accounts
Description
Add list of accounts to a discount.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
accounts |
Array |
List of AccountDTO |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/discounts/{discountId}/customerClasses
Description
Add list of customer classes to a discount.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
classes |
Array |
List of CustomerClassDTO |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/discounts/{discountId}/plans
Description
Add list of plans to a discount.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
plans |
Array |
List of PlanDTO |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/discounts/{discountId}/resources
Description
Add list of resources to a discount.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
resources |
Array |
List of ResourceDTO |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/discounts/{discountId}/resourceRates
Description
Add list of resource rates to a discount.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
resourceRates |
Array |
List of ResourceRateDTO |
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/discounts/{discountId}/oneTimePromoCodes
Description
Get all one-time promo codes assigned to specified discount
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount ID |
Returns
List of OneTimePromoCodeDTO
HTTP Request
GET /aps/2/resources/{aps-id}/discounts/{discountId}/accounts
Description
Get list of accounts for given discount
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
Returns
List of AccountDTO
HTTP Request
GET /aps/2/resources/{aps-id}/discounts/{discountId}/customerClasses
Description
Get list of customer classes for given discount
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
Returns
List of CustomerClassDTO
HTTP Request
GET /aps/2/resources/{aps-id}/discounts/{discountId}/plans
Description
Get list of plans for given discount
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
Returns
List of PlanDTO
HTTP Request
GET /aps/2/resources/{aps-id}/discounts/{discountId}/resources
Description
Get list of resources for given discount
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
Returns
List of ResourceDTO
HTTP Request
GET /aps/2/resources/{aps-id}/discounts/{discountId}/resourceRates
Description
Get list of resource rates for given discount
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
Returns
List of ResourceRateDTO
HTTP Request
DELETE /aps/2/resources/{aps-id}/discounts/{discountId}/oneTimePromoCodes
Description
Remove promo code from specified discount <br> check if specified promo code exists and remove it from specified discount
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount ID |
promoCode |
String |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/discounts/{discountId}/accounts
Description
Remove account from given discount
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
accountId |
String |
Account Id |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/discounts/{discountId}/customerClasses
Description
Remove customer class from given discount
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
classId |
String |
Customer class Id |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/discounts/{discountId}/plans
Description
Remove plan or plan period from given discount
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
planId |
String |
Customer class Id |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/discounts/{discountId}/resources
Description
Remove resource from given discount
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
Discount Id |
resourceId |
String |
Resource Id |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/discounts/{discountId}/resourceRates
Description
Remove resource rate from given discount
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
discountId |
String |
|
resourceId |
String |
|
planId |
String |
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/applicableDiscounts
Description
Get list of active discounts applicable for given account
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
accountId |
String |
Account Id |
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/feature/enabledFeatures
Description
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/promotions
Description
GetPromotionList.
Returns
JpaResultWithTotal<PromotionDTO>
HTTP Request
POST /aps/2/resources/{aps-id}/promotions
Description
CreatePromotion.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotion |
Returns
PromotionDTO.
HTTP Request
GET /aps/2/resources/{aps-id}/promotions/{promotionId}
Description
GetPromotion.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Returns
PromotionDTO.
HTTP Request
PUT /aps/2/resources/{aps-id}/promotions
Description
UpdatePromotion.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotion |
Returns
PromotionDTO.
HTTP Request
PUT /aps/2/resources/{aps-id}/promotions/{promotionId}
Description
UpdatePromotion.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
promotion |
Returns
PromotionDTO.
HTTP Request
DELETE /aps/2/resources/{aps-id}/promotions/{promotionId}
Description
DeletePromotion.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Returns
HTTP Request
POST /aps/2/resources/{aps-id}/promotions/{promotionId}/oneTimePromoCodes
Description
Add one-time promo codes to specified promotion <br> please, note, that some preliminary validation checks can be made, to preserve uniqueness of promo codes for user account
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Promotion ID |
promoCodesToAdd |
Array |
List of String values for one-time promo codes |
Returns
HTTP Request
POST /aps/2/resources/{aps-id}/promotions/{promotionId}/oneTimePromoCodes/generate
Description
Generate one-time promo codes from template and add them to specified promotion <br> please, note, that some preliminary validation checks can be made, to preserve uniqueness of promo codes for user account
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Promotion D |
generatePromoCodesRequest |
GenerateOneTimePromoCodesRequestDTO |
Instance of GenerateOneTimePromoCodesRequestDTO, containing information about promo code template and number of promo codes that have to be generated with that template <br>rules of promo code template notation: <br> X = Uppercase letters (A - Z) <br> H = Hexadecimal digits (0 - 9, A - F) <br> 9 = Digits (0 - 9) <br> * = Uppercase letters or digits <br> = Escape character <br> for example: PROMO_CODE_XXX_***_HH\999 |
Returns
HTTP Request
POST /aps/2/resources/{aps-id}/promotions/{promotionId}/oneTimePromoCodes/import
Description
Parse multipart request containing file with list of one-time promo codes and add them to specified promotion <br> please, note, that some preliminary validation checks can be made, to preserve uniqueness of promo codes for user account <br> text or csv files for importing should contain promo codes, separated by new line, comma and semicolon. Escape character is ‘’. <br> All leading and trailing spaces of promo codes will be truncated, all other symbols will be a part of promo codes.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Promotion ID |
Returns
HTTP Request
POST /aps/2/resources/{aps-id}/promotions/{promotionId}/plans
Description
AddPlansToPromotion.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
promotedPlansToAdd |
Array |
Returns
HTTP Request
POST /aps/2/resources/{aps-id}/promotions/{promotionId}/parentPlans
Description
AddParentPlansToPromotion.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
promotedParentPlansToAdd |
Array |
Returns
HTTP Request
POST /aps/2/resources/{aps-id}/promotions/{promotionId}/resources
Description
AddResourcesToPromotion.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
promotedResourcesToAdd |
Array |
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/promotions/{promotionId}/oneTimePromoCodes
Description
Get all one-time promo codes assigned to specified promotion
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Promotion ID |
Returns
List of OneTimePromoCodeDTO
HTTP Request
GET /aps/2/resources/{aps-id}/promotions/{promotionId}/plans
Description
GetPlansByPromotionId.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Returns
List<PlanDTO>
HTTP Request
GET /aps/2/resources/{aps-id}/promotions/{promotionId}/parentPlans
Description
GetParentPlansByPromotionId.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Returns
List<PlanDTO>
HTTP Request
GET /aps/2/resources/{aps-id}/promotions/{promotionId}/resources
Description
GetResourcesByPromotionId.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Returns
List<ResourceDTO>
HTTP Request
PUT /aps/2/resources/{aps-id}/promotions/{promotionId}/plans
Description
UpdatePlansInPromotion.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
promotedPlansToUpdate |
Array |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/promotions/{promotionId}/parentPlans
Description
UpdateParentPlansInPromotion.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
promotedParentPlansToUpdate |
Array |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/promotions/{promotionId}/resources
Description
UpdateResourcesInPromotion.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
promotedResourcesToUpdate |
Array |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/promotions/{promotionId}/oneTimePromoCodes
Description
Remove promo code from specified promotion <br> check if specified promo code exists and remove it from specified promotion
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Promotion ID |
promoCode |
String |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/promotions/{promotionId}/plans
Description
RemovePlanFromPromotion.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
planId |
String |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/promotions/{promotionId}/parentPlans
Description
RemoveParentPlansFromPromotion.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
planId |
String |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/promotions/{promotionId}/resources
Description
RemoveResourceFromPromotion.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
planId |
String |
|
resourceId |
String |
Returns
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
groupId |
String |
Not Required |
||
owner |
String |
Not Required |
||
name |
String |
Required |
||
description |
String |
Not Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
unit |
Enum |
Not Required |
||
duration |
Integer |
Not Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
resourceId |
String |
Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
resourceId |
String |
Required |
||
planId |
String |
Required |
||
period |
Not Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
value |
String |
Not Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
discountId |
String |
Not Required |
||
name |
String |
Required |
||
owner |
String |
Not Required |
||
type |
Enum |
Required |
ACCOUNT_OR_CUSTOMER_CLASS |
|
status |
Enum |
Not Required |
INACTIVE |
|
promoCodeMask |
String |
Not Required |
||
discountRate |
Number |
Required |
||
forAllPlans |
Boolean |
Not Required |
false |
|
forAllResources |
Boolean |
Not Required |
false |
|
priority |
Integer |
Not Required |
1 |
|
applicationRule |
Enum |
Not Required |
SUCCESSIVE_DISCOUNT |
|
productGroupId |
String |
Not Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
promoCode |
String |
Required |
||
subscriptionId |
String |
Not Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
accountId |
String |
Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
classId |
String |
Not Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
plans |
Array of PlanDTO |
Not Required |
||
resources |
Array of ResourceDTO |
Not Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
promotionId |
String |
Not Required |
||
name |
String |
Required |
||
owner |
String |
Not Required |
||
targetType |
Enum |
Not Required |
||
type |
Enum |
Not Required |
||
status |
Enum |
Required |
||
promoCode |
String |
Not Required |
||
condition |
String |
Not Required |
||
availableFrom |
Date |
Not Required |
||
availableUntil |
Date |
Not Required |
||
applicableFrom |
Date |
Not Required |
||
applicableUntil |
Date |
Not Required |
||
applicableTo |
Array of String |
Required |
||
subscriptionsLimit |
Integer |
Not Required |
||
perCustomerLimit |
Integer |
Not Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
planId |
String |
Required |
||
period |
Not Required |
|||
promotionPeriod |
Not Required |
|||
limitPerParentSubscription |
Integer |
Not Required |
||
setupFee |
PromotionFeeDTO |
Required |
||
recurringFee |
PromotionFeeDTO |
Required |
||
renewalFee |
PromotionFeeDTO |
Required |
||
transferFee |
PromotionFeeDTO |
Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
planId |
String |
Required |
||
period |
Not Required |
|||
limitPerSubscription |
Integer |
Not Required |
Since the considered APS type contains custom operations, refer to Custom Operations for the general explanation of their structure and examples of operation calls.