Margin management API
In this document:
The considered APS type (download
)
extends the Resource APS type(s) and looks as follows:
{
"name": "MarginManager",
"id": "http://com.odin.rating/margin-manager/1.0",
"apsVersion": "2.0",
"implements": [
"http://aps-standard.org/types/core/resource/1.0"
],
"access": {
"global": true
},
"operations": {
"checkMarginConfigurationAvailability": {
"path": "checkMarginConfigurationAvailability",
"verb": "GET",
"response": {
"type": "MarginConfigurationAvailability"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"planUUID": {
"kind": "query",
"type": "string"
},
"resaleAccountUUID": {
"kind": "query",
"type": "string"
}
}
},
"getMarginInfo": {
"path": "marginInfo",
"verb": "GET",
"response": {
"type": "MarginInfo"
},
"errorResponse": {
"type": "object"
},
"parameters": {
"planUUID": {
"kind": "query",
"type": "string"
},
"resaleAccountUUID": {
"kind": "query",
"type": "string"
}
}
}
},
"structures": {
"MarginConfigurationAvailability": {
"type": "object",
"properties": {
"available": {
"type": "boolean"
},
"reason": {
"type": "string"
}
}
},
"MarginRestrictions": {
"type": "object",
"properties": {
"canCreate": {
"type": "boolean"
},
"canSetPriceModel": {
"type": "boolean"
},
"canManageAttributes": {
"type": "boolean"
},
"canSetTotal": {
"type": "boolean"
}
}
},
"MarginInfo": {
"type": "object",
"properties": {
"restrictions": {
"type": "MarginRestrictions",
"required": true
},
"configuredPriceModel": {
"type": "string",
"enum": [
"COS",
"MSRP"
]
},
"margin": {
"type": "http://aps-standard.org/types/margin/1.0"
}
}
}
}
}
OPERATION |
VERB |
PATH |
RETURNS |
Description |
---|---|---|---|---|
GET |
/checkMarginConfigurationAvailability |
Checks whether margin or markup can be configured for service plan {@code planUUID} and account {@code resaleAccountUUID}. |
||
GET |
/marginInfo |
Returns information about margin or markup configuration for the service plan {@code planUUID} and account {@code resaleAccountUUID}. The returned information includes the list of restrictions and maximum values for the BSS resource margins or markups, which are based on margins or markups for this service plan and its place in the service plan chain. |
HTTP Request
GET /aps/2/resources/{aps-id}/marginInfo
Description
Returns information about margin or markup configuration for the service plan {@code planUUID} and account {@code resaleAccountUUID}. The returned information includes the list of restrictions and maximum values for the BSS resource margins or markups, which are based on margins or markups for this service plan and its place in the service plan chain.
Parameters
PARAMETER |
TYPE |
DESCRIPTION |
---|---|---|
planUUID |
String |
The APS ID of the service plan to get its margin or markup information. |
resaleAccountUUID |
String |
The APS ID of the account to check its margin or markup configuration information. If it is not configured, information about the default margin or markup configuration for the service plan {@code planUUID} is returned. |
Returns
Margin or markup restrictions based on margins or markups of the plan chain.
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
canCreate |
Boolean |
Not Required |
True if margin or markup does not exist. |
|
canSetPriceModel |
Boolean |
Not Required |
True if it is possible to select the price model. Applicable only to the first service plan in a service plan chain in case there is no Margin for this plan. |
|
canManageAttributes |
Boolean |
Not Required |
True if it is possible to manage margin attributes. Applicable only to the first service plan in a service plan chain. |
|
canSetTotal |
Boolean |
Not Required |
True if it is possible to set total margin. Applicable only to the first service plan in a service plan chain. |
Information about margin or markup configuration that includes the list of restrictions and maximum values for the BSS resource margins, which are based on margins or markups for this service plan and its place in the service plan chain.
NAME |
TYPE |
ATTRIBUTES |
DEFAULT |
DESCRIPTION |
---|---|---|---|---|
restrictions |
Required |
Restrictions. |
||
configuredPriceModel |
Enum |
Not Required |
The price model configured for the Margin resource of the first service plan in the service plan chain. <br> All Margin resources must have the same price model. <br> Null values are allowed only for the first service plan in the service plan chain, provided that the Margin resource was not created for this service plan. |
|
margin |
Not Required |
The Margin resource containing margins or markups for all resources of a service plan as well as all margins or markups for attributes. Each margin or markup of a BSS resource has its maximum value defined in the {code totalMargin} property. Depending on the place of the service plan in the service plan chain, this value can be different. |
Since the considered APS type contains custom operations, refer to Custom Operations for the general explanation of their structure and examples of operation calls.