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.0",
"apsVersion": "2.0",
"implements": [
"http://aps-standard.org/types/core/resource/1.0"
],
"access": {
"global": true
},
"operations": {
"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"
}
}
},
"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"
}
}
},
"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"
}
}
},
"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"
}
}
},
"getApplicableDiscounts": {
"path": "/applicableDiscounts",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "ApplicableDiscountDTO"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"accountId": {
"kind": "query",
"type": "string"
}
}
},
"getProductGroupList": {
"path": "/productGroups",
"verb": "GET",
"response": {
"type": "array"
},
"errorResponse": {
"type": "object"
}
},
"createProductGroup": {
"path": "/productGroups",
"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"
}
}
},
"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"
}
}
},
"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"
}
}
},
"getPromotionList": {
"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"
}
}
},
"getPromotion": {
"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"
}
}
},
"deletePromotion": {
"path": "/promotions/{promotionId}",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
}
}
},
"addPlansToPromotion": {
"path": "/promotions/{promotionId}/plans",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"plans": {
"kind": "body",
"type": "array"
}
}
},
"addParentPlansToPromotion": {
"path": "/promotions/{promotionId}/parentplans",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"plans": {
"kind": "body",
"type": "array"
}
}
},
"addResourcesToPromotion": {
"path": "/promotions/{promotionId}/resources",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"resources": {
"kind": "body",
"type": "array"
}
}
},
"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"
}
}
},
"removePlansFromPromotion": {
"path": "/promotions/{promotionId}/plans",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"planId": {
"kind": "query",
"type": "string"
}
}
},
"removeParentPlansFromPromotion": {
"path": "/promotions/{promotionId}/parentplans",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"planId": {
"kind": "query",
"type": "string"
}
}
},
"removeResourcesFromPromotion": {
"path": "/promotions/{promotionId}/resources",
"verb": "DELETE",
"errorResponse": {
"type": "object"
},
"parameters": {
"promotionId": {
"kind": "path",
"type": "string"
},
"resourceId": {
"kind": "query",
"type": "string"
}
}
}
},
"structures": {
"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"
}
}
},
"AccountDTO": {
"type": "object",
"properties": {
"accountId": {
"type": "string",
"required": true
}
}
},
"CustomerClassDTO": {
"type": "object",
"properties": {
"classId": {
"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
}
}
},
"ApplicableDiscountDTO": {
"type": "object",
"properties": {
"plans": {
"type": "array",
"items": {
"type": "PlanDTO"
}
},
"resources": {
"type": "array",
"items": {
"type": "ResourceDTO"
}
}
}
},
"ProductGroupDTO": {
"type": "object",
"properties": {
"groupId": {
"type": "string"
},
"owner": {
"type": "string"
},
"name": {
"type": "string",
"required": true
},
"description": {
"type": "string"
}
}
},
"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"
}
}
}
}
}
OPERATION |
VERB |
PATH |
RETURNS |
Description |
---|---|---|---|---|
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. |
||
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. |
||
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 |
|
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 |
||
GET |
/applicableDiscounts |
Get list of active discounts applicable for given account |
||
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. |
|
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. |
||
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 |
|
DELETE |
/productGroups/{groupId}/plans |
Remove plan or plan period from given Product Group |
||
DELETE |
/productGroups/{groupId}/resources |
Remove resource from given Product Group |
||
GET |
/promotions |
|||
POST |
/promotions |
|||
GET |
/promotions/{promotionId} |
|||
PUT |
/promotions |
|||
PUT |
/promotions/{promotionId} |
|||
DELETE |
/promotions/{promotionId} |
|||
PUT |
/promotions/{promotionId}/plans |
|||
PUT |
/promotions/{promotionId}/parentplans |
|||
PUT |
/promotions/{promotionId}/resources |
|||
GET |
/promotions/{promotionId}/plans |
|||
GET |
/promotions/{promotionId}/parentplans |
|||
GET |
/promotions/{promotionId}/resources |
|||
DELETE |
/promotions/{promotionId}/plans |
|||
DELETE |
/promotions/{promotionId}/parentplans |
|||
DELETE |
/promotions/{promotionId}/resources |
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
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
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
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
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}/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
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
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
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
POST /aps/2/resources/{aps-id}/promotions
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotion |
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/promotions/{promotionId}
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/promotions
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotion |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/promotions/{promotionId}
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
promotion |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/promotions/{promotionId}
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/promotions/{promotionId}/plans
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
plans |
Array |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/promotions/{promotionId}/parentplans
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
plans |
Array |
Returns
HTTP Request
PUT /aps/2/resources/{aps-id}/promotions/{promotionId}/resources
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
resources |
Array |
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/promotions/{promotionId}/plans
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/promotions/{promotionId}/parentplans
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Returns
HTTP Request
GET /aps/2/resources/{aps-id}/promotions/{promotionId}/resources
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/promotions/{promotionId}/plans
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
planId |
String |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/promotions/{promotionId}/parentplans
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
planId |
String |
Returns
HTTP Request
DELETE /aps/2/resources/{aps-id}/promotions/{promotionId}/resources
Description
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
promotionId |
String |
|
resourceId |
String |
Returns
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 |
---|---|---|---|---|
accountId |
String |
Required |
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
classId |
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 |
---|---|---|---|---|
plans |
Array of PlanDTO |
Not Required |
||
resources |
Array of ResourceDTO |
Not Required |
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 |
---|---|---|---|---|
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 |
Since the considered APS type contains custom operations, refer to Custom Operations for the general explanation of their structure and examples of operation calls.