OrderManagementApplication

GraphViz

Schema

The considered APS type (download) extends the Application APS type(s) and looks as follows:

{
  "name": "OrderManagementApplication",
  "id": "http://www.odin.com/billing/order-management/1.22",
  "apsVersion": "2.0",
  "implements": [
    "http://aps-standard.org/types/core/application/1.0",
    "http://odin.com/oa/types/approval-engine/client/1.0",
    "http://ingrammicro.com/cb/types/astrum/client"
  ],
  "access": {
    "public": false,
    "global": true
  },
  "operations": {
    "getPattern": {
      "path": "/correctionReasonValidation",
      "verb": "GET",
      "response": {
        "type": "CorrectionReasonValidationPatternInfo"
      },
      "errorResponse": {
        "type": "object"
      }
    },
    "getPatternWithLocale": {
      "path": "/correctionReasonValidation/{locale}",
      "verb": "GET",
      "response": {
        "type": "CorrectionReasonValidationInfo"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "locale": {
          "kind": "path",
          "type": "string"
        }
      }
    },
    "addReason": {
      "path": "/correctionReasonValidation",
      "verb": "POST",
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "newReasonRequest": {
          "kind": "body",
          "type": "CorrectionReasonValidationRequest"
        }
      }
    },
    "updateReason": {
      "path": "/correctionReasonValidation",
      "verb": "PUT",
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "updateReasonRequest": {
          "kind": "body",
          "type": "CorrectionReasonValidationRequest"
        }
      }
    },
    "deleteInvalidMessage": {
      "path": "/correctionReasonValidation/{locale}",
      "verb": "DELETE",
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "locale": {
          "kind": "path",
          "type": "string"
        }
      }
    },
    "deletePattern": {
      "path": "/correctionReasonValidation",
      "verb": "DELETE",
      "errorResponse": {
        "type": "object"
      }
    },
    "orderInfo": {
      "path": "/orders/{orderId}",
      "verb": "GET",
      "response": {
        "type": "OrderInfo"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "orderId": {
          "kind": "path",
          "type": "string"
        }
      }
    },
    "listOrders": {
      "path": "/orders",
      "verb": "GET",
      "response": {
        "type": "array",
        "items": {
          "type": "OrderInfo"
        }
      },
      "errorResponse": {
        "type": "object"
      }
    },
    "placeOrder": {
      "path": "/orders",
      "verb": "POST",
      "response": {
        "type": "object"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "orderRequest": {
          "kind": "body",
          "type": "OrderRequest"
        },
        "estimate": {
          "kind": "query",
          "type": "string"
        }
      }
    },
    "placeBillingOrders": {
      "path": "/orders/billing",
      "verb": "POST",
      "response": {
        "type": "object"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "ordersRequest": {
          "kind": "body",
          "type": "BillingOrdersRequest"
        }
      }
    },
    "estimateOrder": {
      "path": "/orders/estimate",
      "verb": "POST",
      "response": {
        "type": "OrderEstimationResult"
      },
      "errorResponse": {
        "type": "object"
      },
      "access": {
        "public": true
      },
      "parameters": {
        "orderRequest": {
          "kind": "body",
          "type": "OrderRequest"
        },
        "includeTaxes": {
          "kind": "query",
          "type": "boolean"
        }
      }
    },
    "estimateCosts": {
      "path": "/orders/estimateCosts",
      "verb": "POST",
      "response": {
        "type": "OrderEstimationResult"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "orderRequest": {
          "kind": "body",
          "type": "OrderRequest"
        },
        "includeTaxes": {
          "kind": "query",
          "type": "boolean"
        }
      }
    },
    "termsConditions": {
      "path": "/orders/termsconditions",
      "verb": "POST",
      "response": {
        "type": "array",
        "items": {
          "type": "TermCondition"
        }
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "orderRequest": {
          "kind": "body",
          "type": "OrderRequest"
        }
      }
    },
    "pushOrder": {
      "path": "/orders/{orderId}/push",
      "verb": "POST",
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "orderId": {
          "kind": "path",
          "type": "string"
        },
        "orderRequest": {
          "kind": "body",
          "type": "PushOrderRequest"
        }
      }
    },
    "reasonCodes": {
      "path": "/reasonCodes",
      "verb": "GET",
      "response": {
        "type": "array",
        "items": {
          "type": "ReasonCode"
        }
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "operationType": {
          "kind": "query",
          "type": "OperationType"
        }
      }
    },
    "getOrderEligibilityCheckStatus": {
      "path": "/orders/{orderId}/eligibilityCheckStatus",
      "verb": "GET",
      "response": {
        "type": "EligibilityCheckStatus"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "orderId": {
          "kind": "path",
          "type": "string"
        }
      }
    },
    "updateOrderEligibilityCheckStatus": {
      "path": "/orders/{orderId}/eligibilityCheckStatus",
      "verb": "PUT",
      "response": {
        "type": "EligibilityCheckStatus"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "orderId": {
          "kind": "path",
          "type": "string"
        },
        "newStatus": {
          "kind": "body",
          "type": "EligibilityCheckStatus"
        }
      }
    },
    "getLivenessprobe": {
      "path": "/livenessProbe",
      "verb": "GET",
      "response": {
        "type": "string"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "id": {
          "kind": "path",
          "type": "string"
        }
      }
    },
    "getReadinessprobe": {
      "path": "/readinessProbe",
      "verb": "GET",
      "response": {
        "type": "string"
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "id": {
          "kind": "path",
          "type": "string"
        }
      }
    },
    "getCorrections": {
      "path": "/corrections",
      "verb": "GET",
      "response": {
        "type": "array",
        "items": {
          "type": "Correction"
        }
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "detailIds": {
          "kind": "query",
          "type": "string"
        }
      }
    },
    "getCorrectionsAppliedToDetails": {
      "path": "/corrections/applied",
      "verb": "GET",
      "response": {
        "type": "array",
        "items": {
          "type": "Correction"
        }
      },
      "errorResponse": {
        "type": "object"
      },
      "parameters": {
        "detailIds": {
          "kind": "query",
          "type": "string"
        }
      }
    },
    "getActions": {
      "path": "/actions",
      "verb": "GET",
      "response": {
        "type": "array",
        "items": {
          "type": "ModuleAction"
        }
      },
      "errorResponse": {
        "type": "object"
      }
    },
    "processApprovalResponse": {
      "path": "/approvalResponse",
      "verb": "POST",
      "errorResponse": {
        "type": "object"
      }
    }
  },
  "structures": {
    "LocalizedCorrectionReasonMessage": {
      "type": "object",
      "properties": {
        "invalidMessage": {
          "type": "string"
        },
        "locale": {
          "type": "string"
        }
      }
    },
    "CorrectionReasonValidationPatternInfo": {
      "type": "object",
      "properties": {
        "pattern": {
          "type": "string"
        },
        "messages": {
          "type": "array",
          "items": {
            "type": "LocalizedCorrectionReasonMessage"
          }
        }
      }
    },
    "CorrectionReasonValidationInfo": {
      "type": "object",
      "properties": {
        "pattern": {
          "type": "string"
        },
        "invalidMessage": {
          "type": "string"
        }
      }
    },
    "CorrectionReasonValidationRequest": {
      "type": "object",
      "properties": {
        "pattern": {
          "type": "string"
        },
        "messages": {
          "type": "array",
          "items": {
            "type": "LocalizedCorrectionReasonMessage"
          }
        }
      }
    },
    "Currency": {
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "description": "Currency amount"
        },
        "code": {
          "type": "string",
          "description": "Currency ISO code"
        }
      }
    },
    "OrderStatus": {
      "type": "object"
    },
    "PaymentStatus": {
      "type": "object"
    },
    "ProvisioningStatus": {
      "type": "object"
    },
    "OrderSchedule": {
      "type": "object",
      "properties": {
        "type": {
          "type": "ScheduleType",
          "description": "Specifies the type of date for Order to be scheduled.",
          "required": true,
          "enum": [
            "RENEWAL",
            "BILLING"
          ]
        },
        "date": {
          "type": "string",
          "format": "date"
        }
      }
    },
    "ScheduleType": {
      "type": "object"
    },
    "Attribute": {
      "type": "object",
      "properties": {
        "attributeID": {
          "type": "string",
          "required": true
        },
        "value": {
          "type": "string",
          "required": true
        }
      }
    },
    "OrderDetailInfo": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Type of the order detail",
          "enum": [
            "UNKNOWN",
            "PLAN_SETUP",
            "PLAN_SETUP_REFUND",
            "PLAN_SWITCH_PLAN",
            "PLAN_RENEW",
            "PLAN_RENEW_REFUND",
            "PLAN_TRANSFER",
            "PLAN_TRANSFER_REFUND",
            "PLAN_RECURRING",
            "PLAN_RECURRING_REFUND",
            "RESOURCE_SETUP",
            "RESOURCE_SETUP_REFUND",
            "RESOURCE_SWITCH",
            "RESOURCE_RECURRING",
            "RESOURCE_RECURRING_REFUND",
            "RESOURCE_OVERUSE",
            "RESOURCE_DOWNGRADE",
            "DISCOUNT",
            "ADJUSTMENT",
            "CANCELLATION",
            "HANDLING_FEE",
            "NON_PROVISIONING_ITEM",
            "PAYMENT",
            "REFUND",
            "REFUND_ADJ",
            "BILL_PENALTY",
            "BILL_RECORD",
            "RESEL_PMNT",
            "DEPOSIT"
          ]
        },
        "planId": {
          "type": "string",
          "description": "APS ID of the service plan"
        },
        "period": {
          "type": "Period",
          "description": "Subscription period of the service plan"
        },
        "priceTerm": {
          "type": "Period",
          "description": "Price term period"
        },
        "resourceId": {
          "type": "string",
          "description": "APS ID of the resource if the order detail is bound with a resource or null otherwise"
        },
        "productId": {
          "type": "string",
          "description": "Product ID"
        },
        "MPN": {
          "type": "string",
          "description": "Manufacturer Part Number (MPN)"
        },
        "bssSubscriptionId": {
          "type": "string",
          "description": "BSS subscription UUID"
        },
        "orderItemId": {
          "type": "integer",
          "description": "Id of order item"
        },
        "duration": {
          "type": "Duration",
          "description": "Duration of the order detail the price is calculated for."
        },
        "description": {
          "type": "string",
          "description": "Localized description of the order detail."
        },
        "quantity": {
          "type": "number",
          "description": "Quantity of the ordered resources."
        },
        "lowerBound": {
          "type": "number",
          "description": "In a case when the Tiered or Volume pricing model is used, this is the lower limit of a tier."
        },
        "unitOfMeasure": {
          "type": "string",
          "description": "Unit of resource measurement if the oder detail is bound to a resource. In all other case, the unit is \u0027item\u0027."
        },
        "unitPrice": {
          "type": "Currency",
          "description": "Price per unit."
        },
        "salesUnitPrice": {
          "type": "Currency",
          "description": "Price per unit in sales currency."
        },
        "extendedPrice": {
          "type": "Currency",
          "description": "Total of the order detail calculated as unitPrice multiplied by quantity and multiplied by the duration."
        },
        "salesExtendedPrice": {
          "type": "Currency",
          "description": "Extended price in sales currency."
        },
        "discount": {
          "type": "DiscountInfo",
          "description": "Applied discount; can be null."
        },
        "salesDiscount": {
          "type": "DiscountInfo",
          "description": "Applied discount in sales currency; can be null."
        },
        "taxAmount": {
          "type": "Currency",
          "description": "Calculated tax containing those taxes that are included in the initial price (inclusive taxes) and those that will be added to the initial price (exclusive taxes)."
        },
        "salesTaxAmount": {
          "type": "Currency",
          "description": "Tax amount in sales currency."
        },
        "exclusiveTaxAmount": {
          "type": "Currency",
          "description": "Exclusive tax that will be added to the initial price."
        },
        "salesExclusiveTaxAmount": {
          "type": "Currency",
          "description": "Exclusive tax amount in sales currency."
        },
        "exchangeRate": {
          "type": "number",
          "description": "Exchange rate between account currency and sales currency. Used for calculating prices from sales prices etc."
        },
        "exchangeTime": {
          "type": "string",
          "description": "Date and time on which exchange rate were acquired.",
          "format": "date-time"
        },
        "startDate": {
          "type": "string",
          "description": "Start date",
          "format": "date"
        },
        "endDate": {
          "type": "string",
          "description": "End date",
          "format": "date"
        }
      }
    },
    "OrderDetailType": {
      "type": "object"
    },
    "Period": {
      "type": "object",
      "properties": {
        "unit": {
          "type": "string",
          "description": "Subscription period unit",
          "required": true,
          "enum": [
            "DAYS",
            "MONTHS",
            "YEARS"
          ]
        },
        "duration": {
          "type": "integer",
          "description": "Duration of subscription period",
          "required": true
        }
      }
    },
    "PeriodUnit": {
      "type": "object"
    },
    "Duration": {
      "type": "object",
      "properties": {
        "unit": {
          "type": "string",
          "description": "Period unit",
          "required": true,
          "enum": [
            "DAYS",
            "MONTHS",
            "YEARS"
          ]
        },
        "duration": {
          "type": "number",
          "description": "Duration of a period",
          "required": true
        }
      }
    },
    "DiscountInfo": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Specifies if the discount is a fixed sum or percent of the initial price",
          "enum": [
            "PERCENT, FIXED"
          ]
        },
        "value": {
          "type": "number",
          "description": "Discount value, either a fixed sum or percent of the initial price"
        },
        "amount": {
          "type": "number",
          "description": "Difference between the initial price and the discounted price"
        },
        "amountCode": {
          "type": "string",
          "description": "Discount amount currency ISO code"
        }
      }
    },
    "DiscountType": {
      "type": "object"
    },
    "OrderItemInfo": {
      "type": "object",
      "properties": {
        "orderItemId": {
          "type": "integer",
          "description": "Id of order item"
        },
        "parentOrderItemId": {
          "type": "integer",
          "description": "Id of parent order item"
        },
        "type": {
          "type": "string",
          "description": "Type of the order provisioning item, see {@link OrderItemType}",
          "enum": [
            "CREATE",
            "RENEW",
            "CANCEL",
            "UPGRADE",
            "CHANGE_PLAN_PERIOD",
            "TRANSFER",
            "STOP_SERVICE",
            "DESTROY_SERVICE",
            "ONE_TIME_FEE",
            "BILLING_SUBSCRIPTION",
            "VENDOR_RATED_DATA",
            "MIGRATION",
            "MOVE",
            "CORRECTION",
            "TRANSFER_SUBSCRIPTION",
            "TRANSFER_ACCOUNT"
          ]
        },
        "bssSubscriptionId": {
          "type": "string"
        },
        "bssSubscriptionInternalId": {
          "type": "integer"
        },
        "alignExpirationDate": {
          "type": "AlignExpirationDate"
        },
        "resources": {
          "type": "array",
          "items": {
            "type": "ResourceItemInfo"
          }
        },
        "targetSubscriptionInfo": {
          "type": "TargetSubscriptionInfo"
        }
      }
    },
    "OrderItemType": {
      "type": "object"
    },
    "AlignExpirationDate": {
      "type": "object",
      "properties": {
        "alignmentType": {
          "type": "string",
          "description": "Subscription expiration date alignment type",
          "required": true,
          "enum": [
            "CO_TERM_ON_SUBSCRIPTION",
            "CO_TERM_PARTIAL_UPGRADE",
            "MATCH_END_OF_CALENDAR_MONTH"
          ]
        },
        "subscriptionId": {
          "type": "string"
        }
      }
    },
    "ResourceItemInfo": {
      "type": "object",
      "properties": {
        "resourceId": {
          "type": "string",
          "required": true
        },
        "productId": {
          "type": "string",
          "description": "Product ID"
        },
        "MPN": {
          "type": "string",
          "description": "Manufacturer Part Number (MPN)"
        },
        "resourceInternalId": {
          "type": "integer",
          "required": true
        },
        "resourceName": {
          "type": "http://aps-standard.org/types/core/i18n/1.3#MLString",
          "description": "Resource name"
        },
        "toResourceId": {
          "type": "string",
          "required": true
        },
        "toProductId": {
          "type": "string",
          "description": "Switch to Product ID"
        },
        "toMPN": {
          "type": "string",
          "description": "Switch to Manufacturer Part Number (MPN)"
        },
        "toResourceInternalId": {
          "type": "integer",
          "required": true
        },
        "toResourceName": {
          "type": "http://aps-standard.org/types/core/i18n/1.3#MLString",
          "description": "Switch resource name"
        },
        "amount": {
          "type": "number",
          "required": true
        }
      }
    },
    "MLString": {
      "type": "object",
      "properties": {
        "ar_AE": {
          "type": "string",
          "description": "Arabic, Standard - United Arab Emirates"
        },
        "bg_BG": {
          "type": "string",
          "description": "Bulgarian - Bulgaria"
        },
        "cs_CZ": {
          "type": "string",
          "description": "Czech - Czech Republic"
        },
        "da_DK": {
          "type": "string",
          "description": "Danish - Denmark"
        },
        "de_DE": {
          "type": "string",
          "description": "German - Germany"
        },
        "el_GR": {
          "type": "string",
          "description": "Greek - Greece"
        },
        "en_US": {
          "type": "string",
          "description": "English - United States"
        },
        "es_ES": {
          "type": "string",
          "description": "Spanish - Spain"
        },
        "fr_FR": {
          "type": "string",
          "description": "French - France"
        },
        "he_IL": {
          "type": "string",
          "description": "Hebrew - Israel"
        },
        "hr_HR": {
          "type": "string",
          "description": "Croatian - Croatia"
        },
        "hu_HU": {
          "type": "string",
          "description": "Hungarian - Hungary"
        },
        "id_ID": {
          "type": "string",
          "description": "Indonesian - Indonesia"
        },
        "it_IT": {
          "type": "string",
          "description": "Italian - Italy"
        },
        "ja_JP": {
          "type": "string",
          "description": "Japanese - Japan"
        },
        "ko_KR": {
          "type": "string",
          "description": "Korean - Korea"
        },
        "kz_KZ": {
          "type": "string",
          "description": "Kazakh - Kazakhstan"
        },
        "nl_NL": {
          "type": "string",
          "description": "Dutch - The Netherlands"
        },
        "no_NO": {
          "type": "string",
          "description": "Norwegian - Norway"
        },
        "pl_PL": {
          "type": "string",
          "description": "Polish - Poland"
        },
        "pt_BR": {
          "type": "string",
          "description": "Portuguese - Brazil"
        },
        "pt_PT": {
          "type": "string",
          "description": "Portuguese - Portugal"
        },
        "ro_RO": {
          "type": "string",
          "description": "Romanian - Romania"
        },
        "ru_RU": {
          "type": "string",
          "description": "Russian - Russia"
        },
        "sv_SE": {
          "type": "string",
          "description": "Swedish - Sweden"
        },
        "th_TH": {
          "type": "string",
          "description": "Thai - Thailand"
        },
        "tr_TR": {
          "type": "string",
          "description": "Turkish - Turkey"
        },
        "zh_CN": {
          "type": "string",
          "description": "Chinese, Simplified - China"
        },
        "sl_SL": {
          "type": "string",
          "description": "Slovakian - Slovakia"
        },
        "sr_SR": {
          "type": "string",
          "description": "Serbian - Serbia"
        },
        "mk_MK": {
          "type": "string",
          "description": "Macedonian - Macedonia"
        },
        "xx_XA": {
          "type": "string",
          "description": "Reserved 1"
        },
        "xx_XB": {
          "type": "string",
          "description": "Reserved 2"
        },
        "xx_XC": {
          "type": "string",
          "description": "Reserved 3"
        },
        "xx_XD": {
          "type": "string",
          "description": "Reserved 4"
        },
        "xx_XE": {
          "type": "string",
          "description": "Reserved 5"
        },
        "xx_XF": {
          "type": "string",
          "description": "Reserved 6"
        },
        "xx_XG": {
          "type": "string",
          "description": "Reserved 7"
        }
      }
    },
    "TargetSubscriptionInfo": {
      "type": "object",
      "properties": {
        "bssSubscriptionId": {
          "type": "string"
        },
        "bssSubscriptionInternalId": {
          "type": "integer"
        },
        "coterming": {
          "type": "boolean"
        },
        "subscriptionType": {
          "type": "string",
          "description": "Target subscription type",
          "enum": [
            "NEW",
            "EXISTING"
          ]
        }
      }
    },
    "TargetSubscriptionType": {
      "type": "object"
    },
    "AccountType": {
      "type": "object"
    },
    "RelatedOrder": {
      "type": "object",
      "properties": {
        "internalId": {
          "type": "integer"
        },
        "buyerId": {
          "type": "string"
        },
        "sellerId": {
          "type": "string"
        },
        "total": {
          "type": "Currency"
        },
        "totals": {
          "type": "array",
          "items": {
            "type": "Currency"
          }
        },
        "details": {
          "type": "array",
          "items": {
            "type": "RelatedOrderDetail"
          }
        }
      }
    },
    "RelatedOrderDetail": {
      "type": "object",
      "properties": {
        "internalId": {
          "type": "integer"
        },
        "orderItemId": {
          "type": "integer"
        },
        "type": {
          "type": "string",
          "description": "Type of the order detail",
          "enum": [
            "UNKNOWN",
            "PLAN_SETUP",
            "PLAN_SETUP_REFUND",
            "PLAN_SWITCH_PLAN",
            "PLAN_RENEW",
            "PLAN_RENEW_REFUND",
            "PLAN_TRANSFER",
            "PLAN_TRANSFER_REFUND",
            "PLAN_RECURRING",
            "PLAN_RECURRING_REFUND",
            "RESOURCE_SETUP",
            "RESOURCE_SETUP_REFUND",
            "RESOURCE_SWITCH",
            "RESOURCE_RECURRING",
            "RESOURCE_RECURRING_REFUND",
            "RESOURCE_OVERUSE",
            "RESOURCE_DOWNGRADE",
            "DISCOUNT",
            "ADJUSTMENT",
            "CANCELLATION",
            "HANDLING_FEE",
            "NON_PROVISIONING_ITEM",
            "PAYMENT",
            "REFUND",
            "REFUND_ADJ",
            "BILL_PENALTY",
            "BILL_RECORD",
            "RESEL_PMNT",
            "DEPOSIT"
          ]
        },
        "bssSubscriptionId": {
          "type": "string"
        },
        "resourceId": {
          "type": "string"
        },
        "quantity": {
          "type": "number"
        },
        "unitOfMeasure": {
          "type": "string"
        },
        "lowerBound": {
          "type": "number"
        },
        "discount": {
          "type": "DiscountInfo"
        },
        "salesDiscount": {
          "type": "DiscountInfo",
          "description": "Discount in sales currency."
        },
        "unitPrice": {
          "type": "Currency"
        },
        "salesUnitPrice": {
          "type": "Currency",
          "description": "Price per unit for reseller transaction in sales currency."
        },
        "extendedPrice": {
          "type": "Currency"
        },
        "salesExtendedPrice": {
          "type": "Currency",
          "description": "Extended price in sales currency."
        },
        "taxAmount": {
          "type": "Currency"
        },
        "salesTaxAmount": {
          "type": "Currency",
          "description": "Tax amount in sales currency."
        },
        "exclusiveTaxAmount": {
          "type": "Currency"
        },
        "salesExclusiveTaxAmount": {
          "type": "Currency",
          "description": "Exclusive tax amount in sales currency."
        },
        "exchangeRate": {
          "type": "number",
          "description": "Exchange rate between account currency and sales currency. Used for calculating prices from sales prices etc."
        },
        "exchangeTime": {
          "type": "string",
          "description": "Date and time on which exchange rate were acquired.",
          "format": "date-time"
        },
        "startDate": {
          "type": "string",
          "description": "Start date",
          "format": "date"
        },
        "endDate": {
          "type": "string",
          "description": "End date",
          "format": "date"
        }
      }
    },
    "OrderInfo": {
      "type": "object",
      "properties": {
        "orderId": {
          "type": "string"
        },
        "internalId": {
          "type": "integer"
        },
        "orderNumber": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "total": {
          "type": "Currency"
        },
        "taxTotal": {
          "type": "Currency"
        },
        "exclusiveTaxTotal": {
          "type": "Currency"
        },
        "subTotal": {
          "type": "Currency"
        },
        "status": {
          "type": "string",
          "enum": [
            "NOT_STARTED",
            "IN_PROGRESS",
            "PROBLEM",
            "CANCELED",
            "COMPLETED"
          ]
        },
        "bssSubscriptions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "paymentStatus": {
          "type": "string",
          "enum": [
            "REQUIRED",
            "PROCESSING",
            "PROBLEM",
            "AVAILABLE",
            "CANCELED",
            "FINISHED"
          ]
        },
        "provisioningStatus": {
          "type": "string",
          "enum": [
            "NOT_STARTED",
            "IN_PROGRESS",
            "PROBLEM",
            "CANCELED",
            "COMPLETED"
          ]
        },
        "ofStatus": {
          "type": "string"
        },
        "isEstimated": {
          "type": "boolean"
        },
        "sellerId": {
          "type": "string"
        },
        "sellerInternalId": {
          "type": "integer"
        },
        "buyerId": {
          "type": "string"
        },
        "buyerInternalId": {
          "type": "integer"
        },
        "orderDate": {
          "type": "string",
          "format": "date"
        },
        "expirationDate": {
          "type": "string",
          "format": "date"
        },
        "creationTime": {
          "type": "string",
          "format": "date"
        },
        "rateTime": {
          "type": "string",
          "format": "date"
        },
        "provisioningTime": {
          "type": "string",
          "format": "date"
        },
        "schedule": {
          "type": "OrderSchedule"
        },
        "orderAttributes": {
          "type": "array",
          "items": {
            "type": "Attribute"
          }
        },
        "endCustomerAttributes": {
          "type": "array",
          "items": {
            "type": "Attribute"
          }
        },
        "details": {
          "type": "array",
          "items": {
            "type": "OrderDetailInfo"
          }
        },
        "orderItems": {
          "type": "array",
          "items": {
            "type": "OrderItemInfo"
          }
        },
        "endCustomerName": {
          "type": "string"
        },
        "endCustomerType": {
          "type": "string",
          "enum": [
            "PROVIDER",
            "RESELLER",
            "CUSTOMER"
          ]
        },
        "relatedOrders": {
          "type": "array",
          "items": {
            "type": "RelatedOrder"
          }
        },
        "description": {
          "type": "string"
        },
        "creator": {
          "type": "integer",
          "description": "End-user full-name who created an order (can be impersonated by original user)"
        },
        "originalUser": {
          "type": "integer",
          "description": "Initiator user full-name who created an order by themselves or impersonated another user on creation"
        },
        "creatorId": {
          "type": "integer",
          "description": "End-user id who created an order (can be impersonated by original user)"
        },
        "originalUserId": {
          "type": "integer",
          "description": "Initiator user id who created an order by themselves or impersonated another user on creation"
        },
        "sourceSystem": {
          "type": "string",
          "description": "Contains code of API-consumer system which initiated the creation order request"
        }
      }
    },
    "OrderType": {
      "type": "object"
    },
    "VendorBillingSetting": {
      "type": "object",
      "properties": {
        "subscriptionId": {
          "type": "string",
          "description": "Subscription ID"
        },
        "autoRenewal": {
          "type": "boolean",
          "description": "Subscription auto-renewal setting flag"
        },
        "billingPeriod": {
          "type": "BillingPeriod",
          "description": "Billing period"
        },
        "nextBillingDate": {
          "type": "string",
          "description": "Next billing date",
          "format": "date"
        },
        "expirationDate": {
          "type": "string",
          "description": "Subscription expiration date",
          "format": "date"
        },
        "renewalDate": {
          "type": "string",
          "description": "Subscription renewal date",
          "format": "date"
        },
        "requestedStartDate": {
          "type": "string",
          "description": "Requested start date",
          "format": "date"
        }
      }
    },
    "BillingPeriod": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Billing period type",
          "required": true,
          "enum": [
            "DATE",
            "MONTHS",
            "YEARS"
          ]
        },
        "duration": {
          "type": "integer",
          "description": "Duration of billing period",
          "required": true
        }
      }
    },
    "BillingPeriodType": {
      "type": "object"
    },
    "Margin": {
      "type": "object",
      "properties": {
        "planId": {
          "type": "string"
        },
        "period": {
          "type": "Period"
        },
        "subscriptionId": {
          "type": "string"
        },
        "priceModel": {
          "type": "string",
          "required": true,
          "enum": [
            "COS",
            "MSRP"
          ]
        },
        "resources": {
          "type": "array",
          "required": true,
          "items": {
            "type": "Resource"
          }
        }
      }
    },
    "PriceModel": {
      "type": "object"
    },
    "Resource": {
      "type": "object",
      "properties": {
        "resourceId": {
          "type": "string",
          "required": true
        },
        "totalRate": {
          "type": "Rate"
        },
        "rates": {
          "type": "array",
          "required": true,
          "items": {
            "type": "MarginRate"
          }
        }
      }
    },
    "Rate": {
      "type": "object",
      "properties": {
        "effective": {
          "type": "number"
        },
        "original": {
          "type": "number"
        }
      }
    },
    "MarginRate": {
      "type": "object",
      "properties": {
        "buyerId": {
          "type": "string",
          "required": true
        },
        "sellerId": {
          "type": "string",
          "required": true
        },
        "rate": {
          "type": "Rate"
        },
        "attributes": {
          "type": "array",
          "items": {
            "type": "MarginAttribute"
          }
        }
      }
    },
    "MarginAttribute": {
      "type": "object",
      "properties": {
        "attribute": {
          "type": "string",
          "required": true
        },
        "attributeValue": {
          "type": "string"
        },
        "totalMargin": {
          "type": "Rate"
        },
        "resellerMargin": {
          "type": "Rate"
        }
      }
    },
    "ExtendedCost": {
      "type": "object",
      "properties": {
        "resourceId": {
          "type": "string",
          "description": "Resource ID",
          "required": true
        },
        "cost": {
          "type": "Fee",
          "description": "Extended cost for the resource",
          "required": true
        }
      }
    },
    "Fee": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "required": true
        },
        "value": {
          "type": "number"
        },
        "type": {
          "type": "string",
          "enum": [
            "FLAT",
            "TIERED",
            "VOLUME_ORDER",
            "VOLUME_SUBSCRIPTION",
            "VOLUME_RESOURCE_AGGREGATED"
          ]
        },
        "tiers": {
          "type": "array",
          "items": {
            "type": "Tier"
          }
        }
      }
    },
    "FeeType": {
      "type": "object"
    },
    "Tier": {
      "type": "object",
      "properties": {
        "lowerLimit": {
          "type": "number",
          "required": true
        },
        "value": {
          "type": "number",
          "required": true
        }
      }
    },
    "VendorDiscountSettings": {
      "type": "object",
      "properties": {
        "sellerId": {
          "type": "String",
          "description": "Seller ID",
          "required": true
        },
        "buyerId": {
          "type": "String",
          "description": "Buyer ID",
          "required": true
        },
        "details": {
          "type": "array",
          "description": "Product level discount details to be applied on cost and price",
          "required": true,
          "items": {
            "type": "VendorDiscountDetail"
          }
        }
      }
    },
    "VendorDiscountDetail": {
      "type": "object",
      "properties": {
        "resourceId": {
          "type": "String",
          "description": "Seller ID",
          "required": true
        },
        "price": {
          "type": "VendorDiscount",
          "description": "Discount for resource price",
          "required": true
        }
      }
    },
    "VendorDiscount": {
      "type": "object",
      "properties": {
        "discountPercentage": {
          "type": "number",
          "description": "Discount Percentage"
        },
        "absDiscount": {
          "type": "number",
          "description": "Absolute Discount"
        },
        "discountedUnitPrice": {
          "type": "number",
          "description": "Effective Unit discount value"
        },
        "totalAbsDiscount": {
          "type": "TotalAbsDiscount",
          "description": "Effective Unit total discount value"
        },
        "effectiveStartDate": {
          "type": "string",
          "description": "Discount Effective start date"
        },
        "effectiveEndDate": {
          "type": "string",
          "description": "Discount Effective start date"
        },
        "validity": {
          "type": "VendorValidity"
        }
      }
    },
    "TotalAbsDiscount": {
      "type": "object",
      "properties": {
        "frequency": {
          "type": "string"
        },
        "value": {
          "type": "number"
        }
      }
    },
    "VendorValidity": {
      "type": "object",
      "properties": {
        "unit": {
          "type": "string"
        },
        "value": {
          "type": "integer"
        }
      }
    },
    "DealPrices": {
      "type": "object",
      "properties": {
        "plan": {
          "type": "Identifier",
          "required": true
        },
        "period": {
          "type": "Period",
          "required": true
        },
        "freezePrices": {
          "type": "boolean"
        },
        "agreements": {
          "type": "array",
          "required": true,
          "items": {
            "type": "Agreement"
          }
        }
      }
    },
    "Identifier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "required": true
        }
      }
    },
    "Agreement": {
      "type": "object",
      "properties": {
        "seller": {
          "type": "Identifier"
        },
        "buyer": {
          "type": "Identifier"
        },
        "price": {
          "type": "Fees"
        },
        "discounts": {
          "type": "array",
          "items": {
            "type": "DiscountFees"
          }
        }
      }
    },
    "Fees": {
      "type": "object",
      "properties": {
        "setup": {
          "type": "Fee"
        },
        "recurring": {
          "type": "Fee"
        },
        "transfer": {
          "type": "Fee"
        },
        "renewal": {
          "type": "Fee"
        },
        "priceTerm": {
          "type": "Period"
        },
        "resources": {
          "type": "array",
          "items": {
            "type": "ResourceFees"
          }
        }
      }
    },
    "ResourceFees": {
      "type": "object",
      "properties": {
        "resource": {
          "type": "Identifier",
          "required": true
        },
        "setup": {
          "type": "Fee"
        },
        "recurring": {
          "type": "Fee"
        },
        "overuse": {
          "type": "Fee"
        },
        "priceTerm": {
          "type": "Period"
        }
      }
    },
    "DiscountFees": {
      "type": "object",
      "properties": {
        "applicableTo": {
          "type": "array",
          "required": true,
          "items": {
            "type": "ApplicableTo"
          }
        }
      }
    },
    "ApplicableTo": {
      "type": "object"
    },
    "ProcessingMode": {
      "type": "object"
    },
    "OrderRequest": {
      "type": "object",
      "properties": {
        "type": {
          "type": "OrderType",
          "enum": [
            "SALES",
            "RENEWAL",
            "CANCELLATION",
            "CHANGE",
            "CORRECTING",
            "MIGRATION"
          ]
        },
        "sourceSystem": {
          "type": "string",
          "description": "Code of API-consumer system which initiated the creation order request"
        },
        "vendorBillingSettings": {
          "type": "array",
          "description": "Vendor-specific parameters for subscription(s)",
          "items": {
            "type": "VendorBillingSetting"
          }
        },
        "margins": {
          "type": "array",
          "items": {
            "type": "Margin"
          }
        },
        "vendorRatedExtendedCosts": {
          "type": "array",
          "items": {
            "type": "ExtendedCost"
          }
        },
        "vendorDiscounts": {
          "type": "array",
          "items": {
            "type": "VendorDiscountSettings"
          }
        },
        "dealPrices": {
          "type": "array",
          "items": {
            "type": "DealPrices"
          }
        },
        "processingMode": {
          "type": "string",
          "enum": [
            "DEFAULT",
            "MIGRATION"
          ]
        }
      }
    },
    "CorrectionDetailRequestDTO": {
      "type": "object",
      "properties": {
        "detailId": {
          "type": "integer",
          "description": "Detail to be corrected"
        },
        "correctionAmount": {
          "type": "number",
          "description": "Correction amount"
        }
      }
    },
    "APSOrderCorrectionRequest": {
      "type": "object",
      "properties": {
        "correctionReason": {
          "type": "string",
          "description": "Order to be corrected"
        },
        "paymentMethodID": {
          "type": "integer",
          "description": "PayTool to be used for refund"
        },
        "correctionDetails": {
          "type": "array",
          "description": "List of corrections for the order",
          "items": {
            "type": "CorrectionDetailRequestDTO"
          }
        }
      }
    },
    "CancellationOrderRequest": {
      "type": "object",
      "properties": {
        "subscriptionId": {
          "type": "string",
          "required": true
        },
        "paymentMethodId": {
          "type": "string"
        },
        "refundType": {
          "type": "string",
          "enum": [
            "CREDIT_MEMO",
            "REFUND"
          ]
        },
        "reasonId": {
          "type": "integer"
        },
        "comment": {
          "type": "string"
        },
        "attributes": {
          "type": "array",
          "items": {
            "type": "Attribute"
          }
        },
        "useAvailableCredit": {
          "type": "boolean"
        }
      }
    },
    "ResourceChange": {
      "type": "object",
      "properties": {
        "sourceResourceId": {
          "type": "string"
        },
        "targetResourceId": {
          "type": "string"
        },
        "resourceId": {
          "type": "string"
        },
        "amountChange": {
          "type": "number"
        },
        "amount": {
          "type": "number"
        }
      }
    },
    "SpecialPricing": {
      "type": "object",
      "properties": {
        "applicableTo": {
          "type": "array",
          "required": true,
          "items": {
            "type": "ApplicableTo"
          }
        },
        "prices": {
          "type": "SubscriptionPrices"
        },
        "costs": {
          "type": "SubscriptionCosts"
        },
        "resources": {
          "type": "array",
          "items": {
            "type": "ResourceRate"
          }
        }
      }
    },
    "SubscriptionPrices": {
      "type": "object",
      "properties": {
        "recurring": {
          "type": "number"
        },
        "renewal": {
          "type": "number"
        },
        "setup": {
          "type": "number"
        },
        "transfer": {
          "type": "number"
        },
        "recurringDiscountPercent": {
          "type": "number"
        },
        "renewalDiscountPercent": {
          "type": "number"
        },
        "setupDiscountPercent": {
          "type": "number"
        }
      }
    },
    "SubscriptionCosts": {
      "type": "object",
      "properties": {
        "recurring": {
          "type": "number"
        },
        "renewal": {
          "type": "number"
        },
        "setup": {
          "type": "number"
        },
        "transfer": {
          "type": "number"
        },
        "recurringDiscountPercent": {
          "type": "number"
        },
        "renewalDiscountPercent": {
          "type": "number"
        },
        "setupDiscountPercent": {
          "type": "number"
        }
      }
    },
    "ResourceRate": {
      "type": "object",
      "properties": {
        "resourceId": {
          "type": "string",
          "required": true
        },
        "prices": {
          "type": "ResourcePrices"
        },
        "costs": {
          "type": "ResourceCosts"
        }
      }
    },
    "ResourcePrices": {
      "type": "object",
      "properties": {
        "overuse": {
          "type": "number"
        },
        "overuseTiers": {
          "type": "array",
          "items": {
            "type": "Tier"
          }
        },
        "recurring": {
          "type": "number"
        },
        "recurringTiers": {
          "type": "array",
          "items": {
            "type": "Tier"
          }
        },
        "setup": {
          "type": "number"
        },
        "setupTiers": {
          "type": "array",
          "items": {
            "type": "Tier"
          }
        },
        "overuseDiscountPercent": {
          "type": "number"
        },
        "recurringDiscountPercent": {
          "type": "number"
        },
        "setupDiscountPercent": {
          "type": "number"
        }
      }
    },
    "ResourceCosts": {
      "type": "object",
      "properties": {
        "overuse": {
          "type": "number"
        },
        "overuseTiers": {
          "type": "array",
          "items": {
            "type": "Tier"
          }
        },
        "recurring": {
          "type": "number"
        },
        "recurringTiers": {
          "type": "array",
          "items": {
            "type": "Tier"
          }
        },
        "setup": {
          "type": "number"
        },
        "setupTiers": {
          "type": "array",
          "items": {
            "type": "Tier"
          }
        },
        "overuseDiscountPercent": {
          "type": "number"
        },
        "recurringDiscountPercent": {
          "type": "number"
        },
        "setupDiscountPercent": {
          "type": "number"
        }
      }
    },
    "SpecialProviderCosts": {
      "type": "object",
      "properties": {
        "resources": {
          "type": "array",
          "required": true,
          "items": {
            "type": "SpecialProviderResourceCost"
          }
        }
      }
    },
    "SpecialProviderResourceCost": {
      "type": "object",
      "properties": {
        "resourceId": {
          "type": "string",
          "required": true
        },
        "cost": {
          "type": "Currency",
          "required": true
        }
      }
    },
    "UpgradeStartType": {
      "type": "object"
    },
    "OrderPlacementType": {
      "type": "object"
    },
    "ChangeOrderRequest": {
      "type": "object",
      "properties": {
        "subscriptionId": {
          "type": "string",
          "required": true
        },
        "paymentMethodId": {
          "type": "string"
        },
        "resources": {
          "type": "array",
          "items": {
            "type": "ResourceChange"
          }
        },
        "planId": {
          "type": "string"
        },
        "period": {
          "type": "Period"
        },
        "attributes": {
          "type": "array",
          "items": {
            "type": "Attribute"
          }
        },
        "acceptedTerms": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "useAvailableCredit": {
          "type": "boolean"
        },
        "specialPricing": {
          "type": "SpecialPricing"
        },
        "providerCosts": {
          "type": "SpecialProviderCosts"
        },
        "schedule": {
          "type": "OrderSchedule"
        },
        "upgradeStartType": {
          "type": "string",
          "description": "Subscription billing period start type",
          "enum": [
            "FROM_DATE_OF_UPGRADE",
            "FROM_OLD_START_DATE"
          ]
        },
        "placementType": {
          "type": "string",
          "description": "Order placement type",
          "enum": [
            "MOVE"
          ]
        },
        "alignExpirationDate": {
          "type": "AlignExpirationDate"
        },
        "targetSubscriptionId": {
          "type": "string"
        }
      }
    },
    "MigrationSpecialCase": {
      "type": "object"
    },
    "VendorAlreadyAccountedTCV": {
      "type": "object",
      "properties": {
        "sellerId": {
          "type": "string"
        },
        "buyerId": {
          "type": "string"
        },
        "resources": {
          "type": "array",
          "items": {
            "type": "AlreadyAccountedTcvResource"
          }
        }
      }
    },
    "AlreadyAccountedTcvResource": {
      "type": "object",
      "properties": {
        "resourceId": {
          "type": "string"
        },
        "alreadyAccountedTcv": {
          "type": "number"
        },
        "code": {
          "type": "string"
        }
      }
    },
    "MigrationOrderRequest": {
      "type": "object",
      "properties": {
        "accountId": {
          "type": "string",
          "required": true
        },
        "planId": {
          "type": "string",
          "required": true
        },
        "period": {
          "type": "Period",
          "required": true
        },
        "startDate": {
          "type": "string",
          "required": true,
          "format": "date"
        },
        "periodStartDate": {
          "type": "string",
          "format": "date"
        },
        "expirationDate": {
          "type": "string",
          "required": true,
          "format": "date"
        },
        "migrationDate": {
          "type": "string",
          "required": true,
          "format": "date"
        },
        "migrationProgram": {
          "type": "string",
          "required": true
        },
        "migrationPriceLevel": {
          "type": "number"
        },
        "autorenewal": {
          "type": "boolean"
        },
        "specialCase": {
          "type": "string",
          "enum": [
            "NOT_SPECIFIED",
            "COTERMING",
            "PLAN_CHANGE"
          ]
        },
        "resources": {
          "type": "array",
          "items": {
            "type": "Resource"
          }
        },
        "acceptedTerms": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "acceptedTermsDate": {
          "type": "date"
        },
        "acceptedTermsUserId": {
          "type": "number"
        },
        "specialPricing": {
          "type": "SpecialPricing"
        },
        "providerCosts": {
          "type": "SpecialProviderCosts"
        },
        "dealPrices": {
          "type": "array",
          "items": {
            "type": "DealPrices"
          }
        },
        "attributes": {
          "type": "array",
          "items": {
            "type": "Attribute"
          }
        },
        "margins": {
          "type": "array",
          "items": {
            "type": "Margin"
          }
        },
        "vendorAlreadyAccountedTotalContractValue": {
          "type": "array",
          "items": {
            "type": "VendorAlreadyAccountedTCV"
          }
        }
      }
    },
    "RenewalOrderRequest": {
      "type": "object",
      "properties": {
        "subscriptionId": {
          "type": "string",
          "required": true
        },
        "paymentMethodId": {
          "type": "string"
        },
        "period": {
          "type": "Period"
        },
        "attributes": {
          "type": "array",
          "items": {
            "type": "Attribute"
          }
        },
        "acceptedTerms": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "useAvailableCredit": {
          "type": "boolean"
        },
        "margins": {
          "type": "array",
          "items": {
            "type": "Margin"
          }
        }
      }
    },
    "SalesOrderProduct": {
      "type": "object",
      "properties": {
        "planId": {
          "type": "string",
          "required": true
        },
        "period": {
          "type": "Period",
          "required": true
        },
        "alignExpirationDate": {
          "type": "AlignExpirationDate"
        },
        "resources": {
          "type": "array",
          "items": {
            "type": "Resource"
          }
        },
        "childProducts": {
          "type": "array",
          "items": {
            "type": "SalesOrderProduct"
          }
        }
      }
    },
    "SalesOrderRequest": {
      "type": "object",
      "properties": {
        "accountId": {
          "type": "string"
        },
        "vendorAccountId": {
          "type": "string"
        },
        "isSellerContext": {
          "type": "boolean"
        },
        "planId": {
          "type": "string"
        },
        "period": {
          "type": "Period"
        },
        "paymentMethodId": {
          "type": "string"
        },
        "acceptedTerms": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "promoCode": {
          "type": "string"
        },
        "useAvailableCredit": {
          "type": "boolean"
        },
        "skipPromoEligibilityCheck": {
          "type": "boolean"
        },
        "resources": {
          "type": "array",
          "items": {
            "type": "Resource"
          }
        },
        "attributes": {
          "type": "array",
          "items": {
            "type": "Attribute"
          }
        },
        "products": {
          "type": "array",
          "items": {
            "type": "SalesOrderProduct"
          }
        },
        "specialPricing": {
          "type": "SpecialPricing"
        },
        "providerCosts": {
          "type": "SpecialProviderCosts"
        }
      }
    },
    "BillingRequestInfo": {
      "type": "object",
      "properties": {
        "externalRequestId": {
          "type": "string",
          "required": true
        },
        "subscriptionUuid": {
          "type": "string",
          "required": true
        }
      }
    },
    "BillingOrdersRequest": {
      "type": "object",
      "properties": {
        "requests": {
          "type": "array",
          "items": {
            "type": "BillingRequestInfo"
          }
        }
      }
    },
    "PromoResult": {
      "type": "object"
    },
    "OrderDetailDTO": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Type of the order detail, see {@link OrderDetailType}",
          "enum": [
            "PLAN_SETUP",
            "PLAN_RECURRING",
            "PLAN_TRANSFER",
            "RESOURCE_SETUP",
            "RESOURCE_RECURRING",
            "DISCOUNT",
            "DEPOSIT"
          ]
        },
        "planId": {
          "type": "string",
          "description": "APS ID of the service plan"
        },
        "period": {
          "type": "Period",
          "description": "Subscription period of the service plan"
        },
        "resourceId": {
          "type": "string",
          "description": "APS ID of the resource if the order detail is bound with a resource or null otherwise"
        },
        "sku": {
          "type": "string",
          "description": "SKU"
        },
        "duration": {
          "type": "Duration",
          "description": "Duration of the order detail the price is calculated for"
        },
        "description": {
          "type": "string",
          "description": "Localized description of the order detail"
        },
        "quantity": {
          "type": "number",
          "description": "Quantity of the ordered resources"
        },
        "lowerBound": {
          "type": "number",
          "description": "In a case when the Tiered or Volume pricing model is used, this is the lower limit of a tier"
        },
        "unitOfMeasure": {
          "type": "string",
          "description": "Unit of resource measurement if the oder detail is bound to a resource. In all other case, the unit is \u0027item\u0027"
        },
        "unitPrice": {
          "type": "Currency",
          "description": "Price per unit"
        },
        "salesUnitPrice": {
          "type": "Currency",
          "description": "Price per unit in sales currency"
        },
        "extendedPrice": {
          "type": "Currency",
          "description": "Total of the order detail calculated as unitPrice multiplied by quantity and multiplied by the duration"
        },
        "salesExtendedPrice": {
          "type": "Currency",
          "description": "Extended price in sales currency"
        },
        "regularUnitPrice": {
          "type": "Currency",
          "description": "Full price per unit"
        },
        "salesRegularUnitPrice": {
          "type": "Currency",
          "description": "Full price per unit in sales currency"
        },
        "regularExtendedPrice": {
          "type": "Currency",
          "description": "Full total of the order detail calculated as unitPrice multiplied by quantity and multiplied by the duration"
        },
        "salesRegularExtendedPrice": {
          "type": "Currency",
          "description": "Full price in sales currency"
        },
        "discount": {
          "type": "DiscountReport",
          "description": "Report on the applied discount; can be null"
        },
        "salesDiscount": {
          "type": "DiscountReport",
          "description": "Report on the applied discount in sales currency; can be null"
        },
        "taxAmount": {
          "type": "Currency",
          "description": "Calculated tax containing those taxes that are included in the initial price (inclusive taxes) and those that will be added to the initial price (exclusive taxes)"
        },
        "salesTaxAmount": {
          "type": "Currency",
          "description": "Tax amount in sales currency"
        },
        "exclusiveTaxAmount": {
          "type": "Currency",
          "description": "Exclusive tax that will be added to the initial price"
        },
        "salesExclusiveTaxAmount": {
          "type": "Currency",
          "description": "Exclusive tax amount in sales currency"
        },
        "taxCalcError": {
          "type": "string",
          "description": "Error message returned in a case of tax calculation failure"
        },
        "exchangeRate": {
          "type": "number",
          "description": "Exchange rate between account currency and sales currency. Used for calculating prices from sales prices etc."
        },
        "exchangeTime": {
          "type": "string",
          "description": "Date and time on which exchange rate were acquired",
          "format": "date-time"
        },
        "startDate": {
          "type": "string",
          "description": "Start date",
          "format": "date"
        },
        "endDate": {
          "type": "string",
          "description": "End date",
          "format": "date"
        }
      }
    },
    "DiscountReport": {
      "type": "object",
      "properties": {
        "type": {
          "type": "DiscountType",
          "description": "Specifies if the discount is a fixed sum or percent of the initial price",
          "enum": [
            "PERCENT",
            "FIXED"
          ]
        },
        "value": {
          "type": "number",
          "description": "Discount value, either a fixed sum or percent of the initial price"
        },
        "amount": {
          "type": "number",
          "description": "Difference between the initial price and the discounted price"
        },
        "amountCode": {
          "type": "string",
          "description": "Discount amount currency ISO code"
        }
      }
    },
    "PromoEligibilityStatus": {
      "type": "object"
    },
    "SubscriptionTcvDetails": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "required": true
        },
        "internalId": {
          "type": "integer"
        },
        "plan": {
          "type": "TcvSubscriptionPlan"
        },
        "alignedExpirationDate": {
          "type": "string"
        },
        "tcvs": {
          "type": "array",
          "items": {
            "type": "TcvDetail"
          }
        }
      }
    },
    "TcvSubscriptionPlan": {
      "type": "object",
      "properties": {
        "period": {
          "type": "Period"
        }
      }
    },
    "TcvDetail": {
      "type": "object",
      "properties": {
        "buyer": {
          "type": "CompositeId"
        },
        "seller": {
          "type": "CompositeId"
        },
        "startDate": {
          "type": "string",
          "format": "date"
        },
        "endDate": {
          "type": "string",
          "format": "date"
        },
        "currency": {
          "type": "string"
        },
        "planPeriod": {
          "type": "TcvInfo"
        },
        "resources": {
          "type": "array",
          "items": {
            "type": "TcvResourceInfo"
          }
        }
      }
    },
    "CompositeId": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "required": true
        },
        "internalId": {
          "type": "integer"
        }
      }
    },
    "TcvInfo": {
      "type": "object",
      "properties": {
        "total": {
          "type": "string"
        },
        "discTotal": {
          "type": "string"
        },
        "effectiveTotal": {
          "type": "string"
        },
        "delta": {
          "type": "string"
        }
      }
    },
    "TcvResourceInfo": {
      "type": "object",
      "properties": {
        "resource": {
          "type": "ResourceInfo"
        }
      }
    },
    "ResourceInfo": {
      "type": "object",
      "properties": {
        "id": {
          "type": "TcvResourceInfoId"
        },
        "resourceName": {
          "type": "http://aps-standard.org/types/core/i18n/1.3#MLString",
          "description": "Resource name"
        }
      }
    },
    "TcvResourceInfoId": {
      "type": "object",
      "properties": {
        "mpn": {
          "type": "string"
        }
      }
    },
    "OrderEstimationResult": {
      "type": "object",
      "properties": {
        "promoResult": {
          "type": "PromoResult",
          "description": "Indicates the result of the attempt to apply the promotion.",
          "enum": [
            "APPLIED",
            "NOT_APPLICABLE",
            "ALREADY_APPLIED",
            "INVALID"
          ]
        },
        "total": {
          "type": "Currency",
          "description": "Estimated order total."
        },
        "subTotal": {
          "type": "Currency",
          "description": "Estimated order total without exclusive taxes."
        },
        "totalDiscount": {
          "type": "Currency",
          "description": "Estimated order total discount."
        },
        "taxTotal": {
          "type": "Currency",
          "description": "Estimated order tax total."
        },
        "exclusiveTaxTotal": {
          "type": "Currency",
          "description": "Estimated order exclusive tax total."
        },
        "details": {
          "type": "array",
          "description": "Array of the order details.",
          "items": {
            "type": "OrderDetailDTO"
          }
        },
        "startDate": {
          "type": "string",
          "format": "date"
        },
        "expirationDate": {
          "type": "string",
          "format": "date"
        },
        "lastBillingDate": {
          "type": "string",
          "format": "date"
        },
        "nextBillingDate": {
          "type": "string",
          "format": "date"
        },
        "promoEligibilityStatus": {
          "type": "PromoEligibilityStatus",
          "enum": [
            "ELIGIBLE",
            "NOT_ELIGIBLE"
          ]
        },
        "subscriptionsDetails": {
          "type": "array",
          "description": "Array of the subscriptions tcv.",
          "items": {
            "type": "SubscriptionTcvDetails"
          }
        }
      }
    },
    "TermCondition": {
      "type": "object",
      "properties": {
        "termId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "content": {
          "type": "string"
        }
      }
    },
    "PushOrderRequest": {
      "type": "object",
      "properties": {
        "ofStatus": {
          "type": "string",
          "pattern": "^[A-Z]{2}$"
        }
      }
    },
    "OperationType": {
      "type": "object"
    },
    "ReasonCode": {
      "type": "object",
      "properties": {
        "reasonId": {
          "type": "integer",
          "description": "Reason id"
        },
        "description": {
          "type": "http://aps-standard.org/types/core/i18n/1.3#MLString",
          "description": "Reason description"
        },
        "operationType": {
          "type": "string",
          "description": "Subscription operation type",
          "enum": [
            "START_SERVICE",
            "STOP_SERVICE",
            "CANCEL_BY_CUSTOMER",
            "CANCEL_BY_VENDOR",
            "ACCOUNT_CANCELLATION",
            "DESTROY_SERVICE",
            "RENEW_SERVICE",
            "RESTORE_SUBSCRIPTION",
            "SWITCH_PLAN",
            "AUTOMATIC_SYNCHRONIZATION",
            "SWITCH_PERIOD",
            "CHANGE_EXPIRATION_DATE",
            "UPGRADE_DOWNGRADE_RESOURCES",
            "SYNCHRONIZE_WITH_PLAN"
          ]
        }
      }
    },
    "EligibilityCheckStatus": {
      "type": "object",
      "properties": {
        "checkSkipped": {
          "type": "boolean",
          "description": "Shows whether eligibility check was skipped for Order."
        },
        "skipPossible": {
          "type": "boolean",
          "description": "Shows whether it is possible to skip eligibility check for Order."
        }
      }
    },
    "Correction": {
      "type": "object",
      "properties": {
        "correctionId": {
          "type": "integer"
        },
        "correctedCorrectionId": {
          "type": "integer"
        },
        "description": {
          "type": "string"
        },
        "documentType": {
          "type": "MLString"
        },
        "documentNumber": {
          "type": "string"
        },
        "originalExtendedPrice": {
          "type": "Currency"
        },
        "currentExtendedPrice": {
          "type": "Currency"
        },
        "originalTax": {
          "type": "Currency"
        },
        "currentTax": {
          "type": "Currency"
        },
        "originalTotal": {
          "type": "Currency"
        },
        "currentTotal": {
          "type": "Currency"
        },
        "correctionReason": {
          "type": "string"
        }
      }
    },
    "ModuleActionEntity": {
      "type": "object",
      "properties": {
        "fields": {
          "type": "array",
          "description": "The fields of an approvable entity",
          "items": {
            "type": "TypedProperty"
          }
        }
      }
    },
    "TypedProperty": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Internal name of the property that works as an internal ID"
        },
        "displayName": {
          "type": "string",
          "description": "Localized name displayed in the control panel when configuring a step in a workflow of the approval engine or processing a request for approval"
        },
        "displayHint": {
          "type": "string",
          "description": "An example of a localized hint for a property in UI"
        },
        "type": {
          "type": "string",
          "description": "The type of the field value to be approved. Strict list of values: \u0027number\u0027, \u0027currency\u0027, \u0027percentage\u0027 or \u0027string\u0027"
        },
        "isArray": {
          "type": "boolean",
          "description": "If true, the client can send several fields with the same name and value type for approval when calling the submitForApproval operation of the approval engine",
          "default": "false"
        },
        "isCriteria": {
          "type": "boolean",
          "description": "If true, the field can be used to configure an approval criteria in a workflow step.\n",
          "default": "true"
        }
      }
    },
    "ModuleAction": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name assigned to an action."
        },
        "entity": {
          "type": "ModuleActionEntity",
          "description": "Approvable entity consisting of approvable fields."
        }
      }
    }
  }
}

The APS type is used to create a singleton APS resource exposing its operations for API calls. The call syntax depends on the operation. For example, a call of an operation that accepts input parameters both in the URL string and in the body looks as follows:

POST  /aps/2/services/order-manager/<operation-path>?<query-params>

{/*<body params>*/}

In the above call, the verb can be either GET, PUT, POST, or DELETE as specified in the definition of the operation.

Custom Operations

OPERATION

VERB

PATH

RETURNS

Description

getPattern

GET

/correctionReasonValidation

A pattern for correction reason validation.

Get information about a pattern for correction reason validation (with a validation regexp and a map of all pairs “locale -> invalidMessage”) for current vendor.

getPatternWithLocale

GET

/correctionReasonValidation/{locale}

A correction reason validation for specified locale.

Get information about correction reason validation for current vendor and specified locale.

addReason

POST

/correctionReasonValidation

Add a correction reason validation with specified params.

updateReason

PUT

/correctionReasonValidation

Update a correction reason validation with specified params.

deleteInvalidMessage

DELETE

/correctionReasonValidation/{locale}

Remove an invalid message for specified locale.

deletePattern

DELETE

/correctionReasonValidation

Remove a validation pattern for current vendor.

orderInfo

GET

/orders/{orderId}

Order info result.

Get information about order.

listOrders

GET

/orders

List of orders.

Get list of orders.
Supported RQL operators: ge, in, le, like.

placeOrder

POST

/orders

Placed order result.

Creates an order of a given type.

placeBillingOrders

POST

/orders/billing

Placed orders result.

Creates a billing orders

estimateOrder

POST

/orders/estimate

Detailed order estimation OrderEstimationResult.

Estimates an order of a given type.
Sales, Change, Renewal and Cancellation orders are supported.

estimateCosts

POST

/orders/estimateCosts

Detailed order estimation OrderEstimationResult.

Estimates reseller’s transactions for an order of a given type.
Sales, Change, Renewal and Cancellation orders are supported.

termsConditions

POST

/orders/termsconditions

A list of Terms & Conditions.

Get a list of Terms & Conditions that should be accepted by end-customer.
Sales, Change and Renewal orders are supported.

pushOrder

POST

/orders/{orderId}/push

HTTP Status u201c200 OKu201d.

Push an order to a given order status.

reasonCodes

GET

/reasonCodes

List of reasons.

Get subscription reason codes.

getOrderEligibilityCheckStatus

GET

/orders/{orderId}/eligibilityCheckStatus

updateOrderEligibilityCheckStatus

PUT

/orders/{orderId}/eligibilityCheckStatus

getLivenessprobe

GET

/livenessProbe

getReadinessprobe

GET

/readinessProbe

getCorrections

GET

/corrections

Detail corrections

Get all corrections for selected sales order details

getCorrectionsAppliedToDetails

GET

/corrections/applied

Corrections with detail’s original and new prices

Get corrections result: original sales detail with applied corrections on it

getActions

GET

/actions

List of actions and entities.

Get list of actions and entities these actions are performed with that require approval.

processApprovalResponse

POST

/approvalResponse

Process response from Approval Engine.

getPattern

HTTP Request

GET /aps/2/services/order-manager/correctionReasonValidation

Description

Get information about a pattern for correction reason validation (with a validation regexp and a map of all pairs “locale -> invalidMessage”) for current vendor.

Returns

A pattern for correction reason validation.

getPatternWithLocale

HTTP Request

GET /aps/2/services/order-manager/correctionReasonValidation/{locale}

Description

Get information about correction reason validation for current vendor and specified locale.

Parameters

PARAMETER

TYPE

DESCRIPTION

locale

String

A locale.

Returns

A correction reason validation for specified locale.

addReason

HTTP Request

POST /aps/2/services/order-manager/correctionReasonValidation

Description

Add a correction reason validation with specified params.

Parameters

PARAMETER

TYPE

DESCRIPTION

newReasonRequest

CorrectionReasonValidationRequest

A request with params for new correction reason.

Returns

updateReason

HTTP Request

PUT /aps/2/services/order-manager/correctionReasonValidation

Description

Update a correction reason validation with specified params.

Parameters

PARAMETER

TYPE

DESCRIPTION

updateReasonRequest

CorrectionReasonValidationRequest

A request with params to be updated in the correction reason.

Returns

deleteInvalidMessage

HTTP Request

DELETE /aps/2/services/order-manager/correctionReasonValidation/{locale}

Description

Remove an invalid message for specified locale.

Parameters

PARAMETER

TYPE

DESCRIPTION

locale

String

Locale name.

Returns

deletePattern

HTTP Request

DELETE /aps/2/services/order-manager/correctionReasonValidation

Description

Remove a validation pattern for current vendor.

Returns

orderInfo

HTTP Request

GET /aps/2/services/order-manager/orders/{orderId}

Description

Get information about order.

Parameters

PARAMETER

TYPE

DESCRIPTION

orderId

String

Order UUID.

Returns

Order info result.

listOrders

HTTP Request

GET /aps/2/services/order-manager/orders

Description

Get list of orders.
Supported RQL operators: ge, in, le, like.

Returns

List of orders.

placeOrder

HTTP Request

POST /aps/2/services/order-manager/orders

Description

Creates an order of a given type.

Parameters

PARAMETER

TYPE

DESCRIPTION

orderRequest

OrderRequest

Order request.

estimate

String

Order estimation param. If set, order will not be created, and will be just calculated.

Returns

Placed order result.

placeBillingOrders

HTTP Request

POST /aps/2/services/order-manager/orders/billing

Description

Creates a billing orders

Parameters

PARAMETER

TYPE

DESCRIPTION

ordersRequest

BillingOrdersRequest

Orders request.

Returns

Placed orders result.

estimateOrder

HTTP Request

POST /aps/2/services/order-manager/orders/estimate

Description

Estimates an order of a given type.
Sales, Change, Renewal and Cancellation orders are supported.

Parameters

PARAMETER

TYPE

DESCRIPTION

orderRequest

OrderRequest

Order request.

includeTaxes

Boolean

Boolean flag whether estimate order with taxes.

Returns

Detailed order estimation OrderEstimationResult.

estimateCosts

HTTP Request

POST /aps/2/services/order-manager/orders/estimateCosts

Description

Estimates reseller’s transactions for an order of a given type.
Sales, Change, Renewal and Cancellation orders are supported.

Parameters

PARAMETER

TYPE

DESCRIPTION

orderRequest

OrderRequest

Order request.

includeTaxes

Boolean

Boolean flag whether estimate order with taxes.

Returns

Detailed order estimation OrderEstimationResult.

termsConditions

HTTP Request

POST /aps/2/services/order-manager/orders/termsconditions

Description

Get a list of Terms & Conditions that should be accepted by end-customer.
Sales, Change and Renewal orders are supported.

Parameters

PARAMETER

TYPE

DESCRIPTION

orderRequest

OrderRequest

Order request.

Returns

A list of Terms & Conditions.

pushOrder

HTTP Request

POST /aps/2/services/order-manager/orders/{orderId}/push

Description

Push an order to a given order status.

Parameters

PARAMETER

TYPE

DESCRIPTION

orderId

String

Order UUID.

orderRequest

PushOrderRequest

Order request.

Returns

HTTP Status u201c200 OKu201d.

reasonCodes

HTTP Request

GET /aps/2/services/order-manager/reasonCodes

Description

Get subscription reason codes.

Parameters

PARAMETER

TYPE

DESCRIPTION

operationType

OperationType

Subscription operation type, optional.

Returns

List of reasons.

getOrderEligibilityCheckStatus

HTTP Request

GET /aps/2/services/order-manager/orders/{orderId}/eligibilityCheckStatus

Description

Parameters

PARAMETER

TYPE

DESCRIPTION

orderId

String

Returns

updateOrderEligibilityCheckStatus

HTTP Request

PUT /aps/2/services/order-manager/orders/{orderId}/eligibilityCheckStatus

Description

Parameters

PARAMETER

TYPE

DESCRIPTION

orderId

String

newStatus

EligibilityCheckStatus

Returns

getLivenessprobe

HTTP Request

GET /aps/2/services/order-manager/livenessProbe

Description

Parameters

PARAMETER

TYPE

DESCRIPTION

id

String

Returns

getReadinessprobe

HTTP Request

GET /aps/2/services/order-manager/readinessProbe

Description

Parameters

PARAMETER

TYPE

DESCRIPTION

id

String

Returns

getCorrections

HTTP Request

GET /aps/2/services/order-manager/corrections

Description

Get all corrections for selected sales order details

Parameters

PARAMETER

TYPE

DESCRIPTION

detailIds

String

Original Sales Order detail IDs: comma-separated integer without spaces

Returns

Detail corrections

getCorrectionsAppliedToDetails

HTTP Request

GET /aps/2/services/order-manager/corrections/applied

Description

Get corrections result: original sales detail with applied corrections on it

Parameters

PARAMETER

TYPE

DESCRIPTION

detailIds

String

Original Sales Order detail IDs: comma-separated integer without spaces

Returns

Corrections with detail’s original and new prices

getActions

HTTP Request

GET /aps/2/services/order-manager/actions

Description

Get list of actions and entities these actions are performed with that require approval.

Returns

List of actions and entities.

processApprovalResponse

HTTP Request

POST /aps/2/services/order-manager/approvalResponse

Description

Process response from Approval Engine.

Returns

Structures

LocalizedCorrectionReasonMessage

This APS structure represents a localized invalid message for a correction reason validation process. This message is shown if a reason entered by a user is invalid, and it is specific for given locale.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

invalidMessage

String

Not Required

An invalid message which is displayed if a user entered a correction reason which is not complies with a pattern (the pattern is specified in CorrectionReasonValidationRequest)

locale

String

Not Required

A locale for which an invalid message is displayed. Locale string complies with the Java local rules. It may be in three forms, e.g.: “en”, “en_US”, “en_US_SiliconValley”

CorrectionReasonValidationPatternInfo

A correction reason validation info about a pattern (with a map of all pairs “locale -> invalidMessage”) for given vendor and language, returned by a rest endpoint.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

pattern

String

Not Required

A validation pattern (a regular expression) against which a correction reason entered by a user should be validated.

messages

Array of LocalizedCorrectionReasonMessage

Not Required

A list of invalid messages one of which, according to user’s locale, is displayed if a user entered a correction reason which is not complies with given pattern.

CorrectionReasonValidationInfo

A correction reason validation info for given vendor and language, returned by a rest endpoint.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

pattern

String

Not Required

A validation pattern (a regular expression) against which a correction reason entered by a user should be validated.

invalidMessage

String

Not Required

An invalid message which is displayed if a user entered a correction reason which is not complies with given pattern.

CorrectionReasonValidationRequest

A request for creating a correction reason validation info with given params.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

pattern

String

Not Required

A validation pattern (a regular expression) against which a correction reason entered by a user should be validated.

messages

Array of LocalizedCorrectionReasonMessage

Not Required

A list of invalid messages with specified locales, one of which (according to user’s locale) is displayed if a user entered a correction reason which is not complies with given pattern.

Currency

Currency with ISO code and amount.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

value

Number

Not Required

Currency amount.

code

String

Not Required

Currency ISO code.

OrderStatus

Order status type:
NOT_STARTED - Order not started.
IN_PROGRESS - Order in progress.
PROBLEM - Order has problem.
CANCELED - Order canceled.
COMPLETED - Order completed.
UNKNOWN - Order status is unknown.

PaymentStatus

Payment status type:
REQUIRED - Payment is required.
PROCESSING - Payment is in processing.
PROBLEM - There is a problem.
AVAILABLE - Payment is available.
CANCELED - Payment is cancelled.
FINISHED - Payment is finished.
UNKNOWN - Payment status is unknown.

ProvisioningStatus

Provisioning status type:
NOT_STARTED - Order provisioning is not started.
IN_PROGRESS - Order provisioning is in progress.
PROBLEM - Order provisioning has finished with a problem.
CANCELED - Order provisioning is canceled.
SCHEDULED - Order provisioning is scheduled. Check order schedule for the exact date.
COMPLETED - Order provisioning has completed.
UNKNOWN - Order provisioning statis is unknown.

OrderSchedule

Represents how to schedule an Order for future.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

type

ScheduleType

Required

Specifies the type of date for Order to be scheduled.

date

String

Not Required

Specifies the exact date when Order is scheduled.

ScheduleType

Type of Order Schedule:
RENEWAL - Order will be scheduled on Subscription renewal date.

Attribute

This type represents billing attributes.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

attributeID

String

Required

Identifier of the attribute.

value

String

Required

Value of the attribute.

OrderDetailInfo

Represent detailed information of an order.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

type

Enum

Not Required

Type of the order detail. See OrderDetailType.
Type of the order detail:
UNKNOWN - any order detail.
PLAN_SETUP - plan setup fee.
PLAN_SETUP_REFUND - plan setup Refund.
PLAN_SWITCH_PLAN - plan switch.
PLAN_RENEW - plan renew.
PLAN_RENEW_REFUND - plan renew refund.
PLAN_TRANSFER - plan transfer fee.
PLAN_TRANSFER_REFUND - plan transfer refund.
PLAN_RECURRING - plan recurring fee.
PLAN_RECURRING_REFUND - plan recurring refund.
RESOURCE_SETUP - resource setup fee.
RESOURCE_SETUP_REFUND - resource setup refund.
RESOURCE_SWITCH - resource switch.
RESOURCE_RECURRING - resource recurring fee.
RESOURCE_RECURRING_REFUND - resource recurring refund.
RESOURCE_OVERUSE - resource overuse.
RESOURCE_DOWNGRADE - resource downgrade.
DISCOUNT - discount.
ADJUSTMENT - adjustment.
CANCELLATION - cancellation.
HANDLING_FEE - handling fee.
NON_PROVISIONING_ITEM - non provisioning item.
PAYMENT - payment.
REFUND - refund.
REFUND_ADJ - refund adjustment.
BILL_PENALTY - billing penalty.
BILL_RECORD - billing record.
RESEL_PMNT - reseller payment.
DEPOSIT - deposit.

planId

String

Not Required

APS ID of the service plan.

period

Period

Not Required

Subscription period of the service plan. See Period.

priceTerm

Period

Not Required

Price terms period. See Period.

resourceId

String

Not Required

APS ID of the resource if the order detail is bound with a resource or null otherwise.

productId

String

Not Required

Product ID.

MPN

String

Not Required

Manufacturer Part Number (MPN).

bssSubscriptionId

String

Not Required

BSS subscription UUID.

orderItemId

Integer

Not Required

Id of order item.

duration

Duration

Not Required

Duration of the order detail the price is calculated for. See Duration.

description

String

Not Required

Localized description of the order detail.

quantity

Number

Not Required

Quantity of the ordered resources.

lowerBound

Number

Not Required

In a case when the Tiered or Volume pricing model is used, this is the lower limit of a tier.

unitOfMeasure

String

Not Required

Unit of resource measurement if the oder detail is bound to a resource. In all other case, the unit is item.

unitPrice

Currency

Not Required

Price per unit. See Currency.

salesUnitPrice

Currency

Not Required

Price per unit in sales currency.

extendedPrice

Currency

Not Required

Total of the order detail calculated as unitPrice multiplied by quantity and multiplied by the duration. See Currency.

salesExtendedPrice

Currency

Not Required

Extended price in sales currency.

discount

DiscountInfo

Not Required

Applied discount; can be null. See DiscountInfo.

salesDiscount

DiscountInfo

Not Required

Applied discount in sales currency; can be null.

taxAmount

Currency

Not Required

Calculated tax containing those taxes that are included in the initial price (inclusive taxes) and those that will be added to the initial price (exclusive taxes). See Currency.

salesTaxAmount

Currency

Not Required

Tax amount in sales currency.

exclusiveTaxAmount

Currency

Not Required

Exclusive tax that will be added to the initial price. See Currency.

salesExclusiveTaxAmount

Currency

Not Required

Exclusive tax amount in sales currency.

exchangeRate

Number

Not Required

Exchange rate between account currency and sales currency. Used for calculating prices from sales prices etc.

exchangeTime

String

Not Required

Date and time on which exchange rate were acquired.

startDate

String

Not Required

Start date

endDate

String

Not Required

End date

OrderDetailType

Type of the order detail:
UNKNOWN - any order detail.
PLAN_SETUP - plan setup fee.
PLAN_SETUP_REFUND - plan setup Refund.
PLAN_SWITCH_PLAN - plan switch.
PLAN_RENEW - plan renew.
PLAN_RENEW_REFUND - plan renew refund.
PLAN_TRANSFER - plan transfer fee.
PLAN_TRANSFER_REFUND - plan transfer refund.
PLAN_RECURRING - plan recurring fee.
PLAN_RECURRING_REFUND - plan recurring refund.
RESOURCE_SETUP - resource setup fee.
RESOURCE_SETUP_REFUND - resource setup refund.
RESOURCE_SWITCH - resource switch.
RESOURCE_RECURRING - resource recurring fee.
RESOURCE_RECURRING_REFUND - resource recurring refund.
RESOURCE_OVERUSE - resource overuse.
RESOURCE_DOWNGRADE - resource downgrade.
DISCOUNT - discount.
ADJUSTMENT - adjustment.
CANCELLATION - cancellation.
HANDLING_FEE - handling fee.
NON_PROVISIONING_ITEM - non provisioning item.
PAYMENT - payment.
REFUND - refund.
REFUND_ADJ - refund adjustment.
BILL_PENALTY - billing penalty.
BILL_RECORD - billing record.
RESEL_PMNT - reseller payment.
DEPOSIT - deposit.

Period

Subscription period duration and type structure.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

unit

Enum

Required

Subscription period unit, see PeriodUnit.

duration

Integer

Required

Duration of subscription period.

PeriodUnit

Subscription period unit type:
DAYS - Periodically on Statement Day.
MONTHS - Fixed Number of Months.
YEARS - Fixed Number of Years.

Duration

Duration of a period.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

unit

Enum

Required

Period unit, see PeriodUnit.
Subscription period unit type:
DAYS - Periodically on Statement Day.
MONTHS - Fixed Number of Months.
YEARS - Fixed Number of Years.

duration

Number

Required

Duration of a period.

DiscountInfo

Represents the applied discount.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

type

Enum

Not Required

Specifies if the discount is a fixed sum or percent of the initial price. See DiscountType.
Specifies if the discount is a fixed sum or percent of the initial price:
PERCENT - discount is a percent of the initial price.
FIXED - discount is a fixed sum.

value

Number

Not Required

Discount value, either a fixed sum or percent of the initial price.

amount

Number

Not Required

Difference between the initial price and the discounted price.

amountCode

String

Not Required

Amount currency ISO code

DiscountType

Specifies if the discount is a fixed sum or percent of the initial price:
PERCENT - discount is a percent of the initial price.
FIXED - discount is a fixed sum.

OrderItemInfo

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

orderItemId

Integer

Not Required

Order item identifier.

parentOrderItemId

Integer

Not Required

Parent order item identifier.

type

Enum

Not Required

Order item type. See OrderItemType.
Type of the order item:
CREATE - new subscription.
RENEW - subscription renewal.
CANCEL - subscription cancellation.
UPGRADE - resource upgrade.
CHANGE_PLAN_PERIOD - change plan period for subscription.
TRANSFER - service transfer.
STOP_SERVICE - stop service.
DESTROY_SERVICE - destroy service.
ONE_TIME_FEE - one-time fee.
BILLING_SUBSCRIPTION - subscription recurring.
VENDOR_RATED_DATA - vendor rated data.
MOVE - subscription partial upgrade.
CORRECTION - correction. TRANSFER_SUBSCRIPTION - transfer subscription order. TRANSFER_ACCOUNT - transfer account.

bssSubscriptionId

String

Not Required

BSS subscription APS UUID.

bssSubscriptionInternalId

Integer

Not Required

BSS subscription internal identifier.

alignExpirationDate

AlignExpirationDate

Not Required

Applied alignment of subscription expiration date options.

resources

Array of ResourceItemInfo

Not Required

Billing resources related to the order item. See ResourceItemInfo

targetSubscriptionInfo

TargetSubscriptionInfo

Not Required

Target subscription from partial upgrade.

OrderItemType

Type of the order item:
CREATE - new subscription.
RENEW - subscription renewal.
CANCEL - subscription cancellation.
UPGRADE - resource upgrade.
CHANGE_PLAN_PERIOD - change plan period for subscription.
TRANSFER - service transfer.
STOP_SERVICE - stop service.
DESTROY_SERVICE - destroy service.
ONE_TIME_FEE - one-time fee.
BILLING_SUBSCRIPTION - subscription recurring.
VENDOR_RATED_DATA - vendor rated data.
MOVE - subscription partial upgrade.
CORRECTION - correction. TRANSFER_SUBSCRIPTION - transfer subscription order. TRANSFER_ACCOUNT - transfer account.

AlignExpirationDate

Options for aligning of expiration date for subscription. Expiration date could be earlier if plan supports co-terming options.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

alignmentType

Enum

Required

Subscription expiration date alignment type, see AlignExpirationDateType.
Types for aligning of expiration date for subscription. See AlignExpirationDate

subscriptionId

String

Not Required

Subscription for co-terming. Applicable only for {@link AlignExpirationDateType#CO_TERM_ON_SUBSCRIPTION} and {@link AlignExpirationDateType#CO_TERM_PARTIAL_UPGRADE}.

ResourceItemInfo

Detailed information about resource in order item.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

resourceId

String

Required

Resource APS UUID.

productId

String

Not Required

Product ID.

MPN

String

Not Required

Manufacturer Part Number.

resourceInternalId

Integer

Required

Resource internal identifier.

resourceName

I18n

Not Required

Resource name.

toResourceId

String

Required

New resource (after switching) APS UUID.

toProductId

String

Not Required

New resource (after switching) Product ID.

toMPN

String

Not Required

New resource (after switching) Manufacturer Part Number.

toResourceInternalId

Integer

Required

New resource (after switching) internal identifier.

toResourceName

I18n

Not Required

New resource (after switching) name.

amount

Number

Required

Exact amount of resources in order item.

MLString

Multi-Lang String structure

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

ar_AE

String

Not Required

Arabic, Standard - United Arab Emirates.

bg_BG

String

Not Required

Bulgarian - Bulgaria.

cs_CZ

String

Not Required

Czech - Czech Republic.

da_DK

String

Not Required

Danish - Denmark.

de_DE

String

Not Required

German - Germany.

el_GR

String

Not Required

Greek - Greece.

en_US

String

Not Required

English - United States.

es_ES

String

Not Required

Spanish - Spain.

fr_FR

String

Not Required

French - France.

he_IL

String

Not Required

Hebrew - Israel.

hr_HR

String

Not Required

Croatian - Croatia.

hu_HU

String

Not Required

Hungarian - Hungary.

id_ID

String

Not Required

Indonesian - Indonesia.

it_IT

String

Not Required

Italian - Italy.

ja_JP

String

Not Required

Japanese - Japan.

ko_KR

String

Not Required

Korean - Korea.

kz_KZ

String

Not Required

Kazakh - Kazakhstan.

nl_NL

String

Not Required

Dutch - The Netherlands.

no_NO

String

Not Required

Norwegian - Norway.

pl_PL

String

Not Required

Polish - Poland.

pt_BR

String

Not Required

Portuguese - Brazil.

pt_PT

String

Not Required

Portuguese - Portugal.

ro_RO

String

Not Required

Romanian - Romania.

ru_RU

String

Not Required

Russian - Russia.

sv_SE

String

Not Required

Swedish - Sweden.

th_TH

String

Not Required

Thai - Thailand.

tr_TR

String

Not Required

Turkish - Turkey.

zh_CN

String

Not Required

Chinese, Simplified - China.

sl_SL

String

Not Required

Slovakian - Slovakia.

sr_SR

String

Not Required

Serbian - Serbia.

mk_MK

String

Not Required

Macedonian - Macedonia.

xx_XA

String

Not Required

Reserved 1.

xx_XB

String

Not Required

Reserved 2.

xx_XC

String

Not Required

Reserved 3.

xx_XD

String

Not Required

Reserved 4.

xx_XE

String

Not Required

Reserved 5.

xx_XF

String

Not Required

Reserved 6.

xx_XG

String

Not Required

Reserved 7.

TargetSubscriptionInfo

Detailed information about target subscription in partial upgrade.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

bssSubscriptionId

String

Not Required

BSS subscription APS UUID.

bssSubscriptionInternalId

Integer

Not Required

BSS subscription internal identifier.

coterming

Boolean

Not Required

Coterming identifier.

subscriptionType

Enum

Not Required

Subscription type.
Indicates the type of target subscription. NEW - Indicates that a target subscription is new.
EXISTING - Indicates that a target subscription already exist.

TargetSubscriptionType

Indicates the type of target subscription. NEW - Indicates that a target subscription is new.
EXISTING - Indicates that a target subscription already exist.

AccountType

Account type:
PROVIDER - Provider account.
RESELLER - Reseller account.
CLIENT - Customer account.

RelatedOrder

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

internalId

Integer

Not Required

Unique record Id of ResellerTransGroup table.

buyerId

String

Not Required

Seller account towards customer of a given order.

sellerId

String

Not Required

Account of the reseller’s vendor (for the accounts-chain

total

Currency

Not Required

Total value including all tax. See Currency

totals

Array of Currency

Not Required

Return list of totals for each currency See Currency

details

Array of RelatedOrderDetail

Not Required

Reseller transaction details. See RelatedOrderDetail

RelatedOrderDetail

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

internalId

Integer

Not Required

Unique record Id of ResellerTrans table.

orderItemId

Integer

Not Required

Unique record Id of OItem table.

type

Enum

Not Required

Type of the detail. See OrderDetailType
Type of the order detail:
UNKNOWN - any order detail.
PLAN_SETUP - plan setup fee.
PLAN_SETUP_REFUND - plan setup Refund.
PLAN_SWITCH_PLAN - plan switch.
PLAN_RENEW - plan renew.
PLAN_RENEW_REFUND - plan renew refund.
PLAN_TRANSFER - plan transfer fee.
PLAN_TRANSFER_REFUND - plan transfer refund.
PLAN_RECURRING - plan recurring fee.
PLAN_RECURRING_REFUND - plan recurring refund.
RESOURCE_SETUP - resource setup fee.
RESOURCE_SETUP_REFUND - resource setup refund.
RESOURCE_SWITCH - resource switch.
RESOURCE_RECURRING - resource recurring fee.
RESOURCE_RECURRING_REFUND - resource recurring refund.
RESOURCE_OVERUSE - resource overuse.
RESOURCE_DOWNGRADE - resource downgrade.
DISCOUNT - discount.
ADJUSTMENT - adjustment.
CANCELLATION - cancellation.
HANDLING_FEE - handling fee.
NON_PROVISIONING_ITEM - non provisioning item.
PAYMENT - payment.
REFUND - refund.
REFUND_ADJ - refund adjustment.
BILL_PENALTY - billing penalty.
BILL_RECORD - billing record.
RESEL_PMNT - reseller payment.
DEPOSIT - deposit.

bssSubscriptionId

String

Not Required

UUID of the subscription.

resourceId

String

Not Required

UUID of the resource.

quantity

Number

Not Required

Quantity ordered units for this detail.

unitOfMeasure

String

Not Required

Unit of resource measurement if the detail is bound to a resource. In all other case, the unit is ‘item’.

lowerBound

Number

Not Required

Lower limit of the tier.

discount

DiscountInfo

Not Required

Contains information about discount for the unit of the reseller trans. See DiscountInfo.

salesDiscount

DiscountInfo

Not Required

Discount in sales currency.

unitPrice

Currency

Not Required

Price per unit for reseller transaction. See Currency.

salesUnitPrice

Currency

Not Required

Price per unit for reseller transaction in sales currency.

extendedPrice

Currency

Not Required

Total of the reseller transaction calculated as unitPrice multiplied by quantity and multiplied by the duration. See Currency.

salesExtendedPrice

Currency

Not Required

Extended price in sales currency.

taxAmount

Currency

Not Required

Calculated tax containing those taxes that are included in the initial price (inclusive taxes) and those that will be added to the initial price (exclusive taxes). See Currency.

salesTaxAmount

Currency

Not Required

Tax amount in sales currency.

exclusiveTaxAmount

Currency

Not Required

Exclusive tax that will be added to the initial price. See Currency.

salesExclusiveTaxAmount

Currency

Not Required

Exclusive tax amount in sales currency.

exchangeRate

Number

Not Required

Exchange rate between account currency and sales currency. Used for calculating prices from sales prices etc.

exchangeTime

String

Not Required

Date and time on which exchange rate were acquired.

startDate

String

Not Required

Start date

endDate

String

Not Required

End date

OrderInfo

Information about order

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

orderId

String

Not Required

Order identifier for APS - UUID.

internalId

Integer

Not Required

Order PBA integer identifier.

orderNumber

String

Not Required

Order number.

type

String

Not Required

Order type.

total

Currency

Not Required

Order total sum. See Currency.

taxTotal

Currency

Not Required

Order tax sum. See Currency.

exclusiveTaxTotal

Currency

Not Required

Order sum of taxes which are excluded from price. See Currency.

subTotal

Currency

Not Required

Order sum without all taxes: total - taxTotal. See Currency.

status

Enum

Not Required

Order status. See OrderStatus.
Order status type:
NOT_STARTED - Order not started.
IN_PROGRESS - Order in progress.
PROBLEM - Order has problem.
CANCELED - Order canceled.
COMPLETED - Order completed.
UNKNOWN - Order status is unknown.

bssSubscriptions

Array of String

Not Required

BSS subscriptions identifiers list related to the order.

paymentStatus

Enum

Not Required

Order status of payments. See PaymentStatus.
Payment status type:
REQUIRED - Payment is required.
PROCESSING - Payment is in processing.
PROBLEM - There is a problem.
AVAILABLE - Payment is available.
CANCELED - Payment is cancelled.
FINISHED - Payment is finished.
UNKNOWN - Payment status is unknown.

provisioningStatus

Enum

Not Required

Order status of provisioning. See ProvisioningStatus.
Provisioning status type:
NOT_STARTED - Order provisioning is not started.
IN_PROGRESS - Order provisioning is in progress.
PROBLEM - Order provisioning has finished with a problem.
CANCELED - Order provisioning is canceled.
SCHEDULED - Order provisioning is scheduled. Check order schedule for the exact date.
COMPLETED - Order provisioning has completed.
UNKNOWN - Order provisioning statis is unknown.

ofStatus

String

Not Required

Order flow status.

isEstimated

Boolean

Not Required

sellerId

String

Not Required

Seller account APS oss id (UUID).

sellerInternalId

Integer

Not Required

Seller account internal Id

buyerId

String

Not Required

Buyer account APS oss id (UUID).

buyerInternalId

Integer

Not Required

Buyer account internal Id

orderDate

String

Not Required

Order date.

expirationDate

String

Not Required

Order expiration date.

creationTime

String

Not Required

Order creation time.

rateTime

String

Not Required

Rating time

provisioningTime

String

Not Required

Time of completing the provisioning

schedule

OrderSchedule

Not Required

Order schedule properties. See OrderSchedule

orderAttributes

Array of Attribute

Not Required

Order attributes. See Attribute.

endCustomerAttributes

Array of Attribute

Not Required

Order customer attributes. See Attribute.

details

Array of OrderDetailInfo

Not Required

Order details. See OrderDetailInfo.

orderItems

Array of OrderItemInfo

Not Required

Order items. See OrderItemInfo.

endCustomerName

String

Not Required

Name of order customer.

endCustomerType

Enum

Not Required

Type of order customer. See AccountType.
Account type:
PROVIDER - Provider account.
RESELLER - Reseller account.
CLIENT - Customer account.

relatedOrders

Array of RelatedOrder

Not Required

Reseller transactions

description

String

Not Required

Order description.

creator

Integer

Not Required

End-user full-name who created an order (can be impersonated by original user)

originalUser

Integer

Not Required

Initiator user full-name who created an order by themselves or impersonated another user on creation

creatorId

Integer

Not Required

End-user id who created an order (can be impersonated by original user)

originalUserId

Integer

Not Required

Initiator user id who created an order by themselves or impersonated another user on creation

sourceSystem

String

Not Required

Contains code of API-consumer system which initiated the creation order request

OrderType

Type of the order:
SALES - sales order.
RENEWAL - renewal order.
CANCELLATION - cancellation order.
CHANGE - upgrade or downgrade a resource or change a service plan or plan period order.
CORRECTING - correcting order.
MIGRATION - migration order.

VendorBillingSetting

Vendor setting.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

subscriptionId

String

Not Required

autoRenewal

Boolean

Not Required

billingPeriod

BillingPeriod

Not Required

nextBillingDate

String

Not Required

expirationDate

String

Not Required

renewalDate

String

Not Required

requestedStartDate

String

Not Required

BillingPeriod

Billing period structure.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

type

Enum

Required

duration

Integer

Required

BillingPeriodType

Billing period unit type: DATE - Periodically on Statement Day. MONTHS - Fixed Number of Months. YEARS - Fixed Number of Years.

Margin

Margins and markups (depending on the usage data rating used) that will be applied to a corresponding subscription. To set up correspondence between resources, plan ID and period specified for a margin object must be the same as the ones defined for the product within the same order request. In renewal and change orders, subscription ID can be specified instead.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

planId

String

Not Required

Plan ID. Must be the same as specified for the products in the order.

period

Period

Not Required

Period. Must be the same as for the products in the order.

subscriptionId

String

Not Required

Subscription ID. This is an optional parameter that can be used as an alternative to plan and period IDs for change and renewal orders.

priceModel

Enum

Required

Pricing model * COS - Cost rated * MSRP - Price rated
There are two available usage data rating models: - COS: Cost Rated, when the imported usage data is rated based on the vendor’s price for the provider (or provider cost) and the markup percentages configured below - MSRP: Price Rated, when the imported usage data is rated based on the vendor’s list price for the customer and the margin percentages configured below

resources

Array of Resource

Required

A list of resources, for which margin or markup rates are specified.

PriceModel

There are two available usage data rating models: - COS: Cost Rated, when the imported usage data is rated based on the vendor’s price for the provider (or provider cost) and the markup percentages configured below - MSRP: Price Rated, when the imported usage data is rated based on the vendor’s list price for the customer and the margin percentages configured below

Resource

Detailed information about resource amount.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

resourceId

String

Required

Billing resource APS uuid.

totalRate

Rate

Not Required

rates

Array of MarginRate

Required

Rate

Rate. The margin or markup rate that will be applied to the specified product with the specified seller and buyer.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

effective

Number

Not Required

The rate that will be applied to the specified product with the specified buyer and seller.

original

Number

Not Required

(Optional) A rate value to store for history and audit. For example, this can be the current default margin or markup rate that is used by default for this product.

MarginRate

Margin or markup rate. A rate is configured for a particular reseller chain level between seller and buyer.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

buyerId

String

Required

Buyer account ID.

sellerId

String

Required

Seller account ID.

rate

Rate

Not Required

Rate. The margin or markup rate that will be applied to the specified product with the specified seller and buyer.

attributes

Array of MarginAttribute

Not Required

Attributes of the resource.

MarginAttribute

Margin attribute.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

attribute

String

Required

attributeValue

String

Not Required

totalMargin

Rate

Not Required

resellerMargin

Rate

Not Required

ExtendedCost

Extended cost (quantity * value * duration) for a particular resource. Provided in case of externally rated subscriptions (like cisco)

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

resourceId

String

Required

cost

Fee

Required

Fee

Fee with ISO code, amount, type and tiers.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

code

String

Required

Currency ISO code.

value

Number

Not Required

Fee amount.

type

Enum

Not Required

Fee type. An empty value is treated as flat. See FeeType.

tiers

Array of Tier

Not Required

List of tier. See Tier.

FeeType

Pricing model:
FLAT - flat price.
TIERED - tiered pricing at subscription level.
VOLUME_ORDER - volume pricing at order level.
VOLUME_SUBSCRIPTION - volume pricing at subscription level.
VOLUME_RESOURCE_AGGREGATED - Multi-resource volume pricing at order and subscription levels.

Tier

Tiers for special pricing structure. Added in order to extend outdated API SpecialPricing. For newer solutions please, use DealPrices

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

lowerLimit

Number

Required

Lower limit of the tier.

value

Number

Required

VendorDiscountSettings

Vendor discount settings structure (per resource).

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

sellerId

String

Required

buyerId

String

Required

details

Array of VendorDiscountDetail

Required

VendorDiscountDetail

Vendor discount detail structure

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

resourceId

String

Required

price

VendorDiscount

Required

VendorDiscount

Vendor discount structure

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

discountPercentage

Number

Not Required

absDiscount

Number

Not Required

discountedUnitPrice

Number

Not Required

totalAbsDiscount

TotalAbsDiscount

Not Required

effectiveStartDate

String

Not Required

effectiveEndDate

String

Not Required

validity

VendorValidity

Not Required

TotalAbsDiscount

Vendor specific discount structure (for Cisco TCV calculations)

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

frequency

String

Not Required

value

Number

Not Required

VendorValidity

Vendor Validity structure. For externally rated subscriptions, participates in TCV calculations

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

unit

String

Not Required

value

Integer

Not Required

DealPrices

Set of all prices for a deal.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

plan

Identifier

Required

Plan identifier. See Identifier.

period

Period

Required

Subscription period. See Period.

freezePrices

Boolean

Not Required

Whether to freeze list price to not reset it on renew.

agreements

Array of Agreement

Required

Set of all prices between each account of the deal. See Agreement.

Identifier

Object identifier.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

id

String

Required

Agreement

Agreement of prices between each account of the deal.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

seller

Identifier

Not Required

Account that sells. Cost agreement has no seller. See Identifier.

buyer

Identifier

Not Required

Account that buys. In an anonymous context, the buyer is empty. See Identifier.

price

Fees

Not Required

Prices of subscription period and each resource. See Fees.

discounts

Array of DiscountFees

Not Required

Discount prices of subscription period and each resource. See DiscountFees.

Fees

List of fees.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

setup

Fee

Not Required

Setup fee. See Fee.

recurring

Fee

Not Required

Recurring fee. See Fee.

transfer

Fee

Not Required

Transfer fee. See Fee.

renewal

Fee

Not Required

Renewal fee. See Fee.

priceTerm

Period

Not Required

Price term. See Period.

resources

Array of ResourceFees

Not Required

List of resources fees. See ResourceFees.

ResourceFees

Fees for resource.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

resource

Identifier

Required

Resource Identifier. See Identifier.

setup

Fee

Not Required

Setup fee. See Fee.

recurring

Fee

Not Required

Recurring fee. See Fee.

overuse

Fee

Not Required

Overuse fee. See Fee.

priceTerm

Period

Not Required

Price term. See Period.

DiscountFees

List of discounts.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

applicableTo

Array of ApplicableTo

Required

Special pricing applicability. See ApplicableTo.

ApplicableTo

Applicability:
SALES - Applicable to Sales.
RENEWAL - Applicable to Renewal.
SWITCH_PLAN - Applicable to Switch plan.

ProcessingMode

Processing mode: MIGRATION - Used to indicate it is a subscriptions migration to SaaS process

OrderRequest

Order request is used as a parent class of all order request types.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

type

OrderType

Not Required

sourceSystem

String

Not Required

vendorBillingSettings

Array of VendorBillingSetting

Not Required

margins

Array of Margin

Not Required

vendorRatedExtendedCosts

Array of ExtendedCost

Not Required

vendorDiscounts

Array of VendorDiscountSettings

Not Required

dealPrices

Array of DealPrices

Not Required

Prices for order. See DealPrices.

processingMode

Enum

Not Required

CorrectionDetailRequestDTO

Correction order detail request APS structure.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

detailId

Integer

Not Required

Id of Order detail to be corrected.

correctionAmount

Number

Not Required

Correction amount of order detail.

APSOrderCorrectionRequest

Order correction request APS structure.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

correctionReason

String

Not Required

Displays a reason of order correction.

paymentMethodID

Integer

Not Required

PayTool to be used for refund.

correctionDetails

Array of CorrectionDetailRequestDTO

Not Required

List of corrections for the order. See CorrectionDetailRequestDTO.

CancellationOrderRequest

Cancel order request

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

subscriptionId

String

Required

APSSubscription APS uuid to cancel

paymentMethodId

String

Not Required

Identifier of the payment method

refundType

Enum

Not Required

Type of the refund, see RefundType
Host provisioning status:
CREDIT_MEMO - refund to account
REFUND - refund by specified payment method

reasonId

Integer

Not Required

Identifier of the cancellation reason code

comment

String

Not Required

Comment for the cancellation reason

attributes

Array of Attribute

Not Required

Optional parameter, to specify additional attributes

useAvailableCredit

Boolean

Not Required

Use available credit balance to pay order.

ResourceChange

Detailed information about resource and amount

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

sourceResourceId

String

Not Required

In the case of a switch, the source resource from the plan we are switching from

targetResourceId

String

Not Required

In the case of a switch, the target resource from the plan we are switching to

resourceId

String

Not Required

amountChange

Number

Not Required

Additional amount of specified resource

amount

Number

Not Required

Total required amount of specified resource

SpecialPricing

This APS structure describes special pricing for ordering products.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

applicableTo

Array of ApplicableTo

Required

Special pricing applicability. See ApplicableTo.

prices

SubscriptionPrices

Not Required

costs

SubscriptionCosts

Not Required

resources

Array of ResourceRate

Not Required

SubscriptionPrices

Subscription prices structure.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

recurring

Number

Not Required

Recurring fee.

renewal

Number

Not Required

Renewal fee.

setup

Number

Not Required

Setup fee.

transfer

Number

Not Required

Transfer fee.

recurringDiscountPercent

Number

Not Required

Recurring Margin (percents)

renewalDiscountPercent

Number

Not Required

Renewal Margin (percents)

setupDiscountPercent

Number

Not Required

Setup Margin (percents)

SubscriptionCosts

Subscription costs structure.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

recurring

Number

Not Required

Recurring Fee.

renewal

Number

Not Required

Renewal Fee.

setup

Number

Not Required

Setup Fee.

transfer

Number

Not Required

Transfer Fee.

recurringDiscountPercent

Number

Not Required

Recurring Margin (percents)

renewalDiscountPercent

Number

Not Required

Renewal Margin (percents)

setupDiscountPercent

Number

Not Required

Setup Margin (percents)

ResourceRate

Resource rate structure.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

resourceId

String

Required

Id of resource.

prices

ResourcePrices

Not Required

Resource prices. See ResourcePrices.

costs

ResourceCosts

Not Required

Resource costs. See ResourceCosts.

ResourcePrices

Price details of a resource APS structure.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

overuse

Number

Not Required

Overuse Fee.

overuseTiers

Array of Tier

Not Required

Overuse Fee tiers.

recurring

Number

Not Required

Recurring Fee.

recurringTiers

Array of Tier

Not Required

Recurring Fee tiers.

setup

Number

Not Required

Setup Fee.

setupTiers

Array of Tier

Not Required

Setup Fee tiers.

overuseDiscountPercent

Number

Not Required

Overuse Margin (percents)

recurringDiscountPercent

Number

Not Required

Recurring Margin (percents)

setupDiscountPercent

Number

Not Required

Setup Margin (percents)

ResourceCosts

Resource costs.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

overuse

Number

Not Required

Overuse Fee.

overuseTiers

Array of Tier

Not Required

Overuse Fee tiers.

recurring

Number

Not Required

Recurring Fee.

recurringTiers

Array of Tier

Not Required

Recurring Fee tiers.

setup

Number

Not Required

Setup Fee.

setupTiers

Array of Tier

Not Required

Setup Fee tiers.

overuseDiscountPercent

Number

Not Required

Overuse Margin (percents)

recurringDiscountPercent

Number

Not Required

Recurring Margin (percents)

setupDiscountPercent

Number

Not Required

Setup Margin (percents)

SpecialProviderCosts

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

resources

Array of SpecialProviderResourceCost

Required

SpecialProviderResourceCost

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

resourceId

String

Required

This method returns resource UUID.

cost

Currency

Required

This method returns Special Provider Resource Cost.

UpgradeStartType

Upgrade Start Type indicates whether the subscription period
will start from the date of upgrade or from current subscription start date:
would be counted from the date of upgrade or from the subscription start date:
FROM_OLD_START_DATE - From the subscription start date.
FROM_DATE_OF_UPGRADE - From the date of upgrade.

OrderPlacementType

Indicates the type of order. MOVE - Indicates that a partial upgrade will be applied.

ChangeOrderRequest

Change order request

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

subscriptionId

String

Required

Subscription to change, APS UUID

paymentMethodId

String

Not Required

Identifier of the payment method

resources

Array of ResourceChange

Not Required

List of resources to change

planId

String

Not Required

ServicePlan APS uuid to switch.

period

Period

Not Required

Plan period to switch.

attributes

Array of Attribute

Not Required

Optional parameter, to specify additional attributes.

acceptedTerms

Array of String

Not Required

Accepted Terms & Conditions

useAvailableCredit

Boolean

Not Required

Use available credit balance to pay order.

specialPricing

SpecialPricing

Not Required

Special pricing and costs for subscription. See SpecialPricing

providerCosts

SpecialProviderCosts

Not Required

Special provider cost for each resource. See SpecialProviderCosts

schedule

OrderSchedule

Not Required

Represents date, when Order needs to be applied.

upgradeStartType

Enum

Not Required

Indicates, whether the new subscription period starts from the “Date of Upgrade” or “Start Date of Current Subscription”

placementType

Enum

Not Required

alignExpirationDate

AlignExpirationDate

Not Required

Applied alignment of subscription expiration date options.

targetSubscriptionId

String

Not Required

Indicates the identifier of target subscription.

MigrationSpecialCase

Migration Special Case:
NOT_SPECIFIED - Migration order brings regular subscription. COTERMING - Migration order brings co-termed subscription. PLAN_CHANGE - Migration order brings subscription that had plan change.

VendorAlreadyAccountedTCV

DTO of already accounted total contract value resource with account id.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

sellerId

String

Not Required

buyerId

String

Not Required

resources

Array of AlreadyAccountedTcvResource

Not Required

AlreadyAccountedTcvResource

DTO of already accounted total contract value resource.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

resourceId

String

Not Required

alreadyAccountedTcv

Number

Not Required

code

String

Not Required

MigrationOrderRequest

Migration order request

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

accountId

String

Required

Account UUID for which the order is placed

planId

String

Required

Plan UUID on which the subscription is created

period

Period

Required

Plan period for subscription

startDate

String

Required

Start date for subscription

periodStartDate

String

Not Required

Date when the latest period of external subscription started.

expirationDate

String

Required

Expiration date for subscription

migrationDate

String

Required

Migration date for subscription

migrationProgram

String

Required

Migration program for subscription

migrationPriceLevel

Number

Not Required

autorenewal

Boolean

Not Required

Autorenewal flag for subscription

specialCase

Enum

Not Required

Indicates if migration order brings subscription with special history.
Migration Special Case:
NOT_SPECIFIED - Migration order brings regular subscription. COTERMING - Migration order brings co-termed subscription. PLAN_CHANGE - Migration order brings subscription that had plan change.

resources

Array of Resource

Not Required

Optional parameter, to specify resource amount to buy

acceptedTerms

Array of String

Not Required

acceptedTermsDate

Date

Not Required

acceptedTermsUserId

Number

Not Required

specialPricing

SpecialPricing

Not Required

Special pricing and costs for subscription. See SpecialPricing

providerCosts

SpecialProviderCosts

Not Required

Special provider cost for each resource. See SpecialProviderCosts

dealPrices

Array of DealPrices

Not Required

Prices for order. See DealPrices.

attributes

Array of Attribute

Not Required

Optional parameter, to specify additional attributes.

margins

Array of Margin

Not Required

Custom margin for subscription. See Margin

vendorAlreadyAccountedTotalContractValue

Array of VendorAlreadyAccountedTCV

Not Required

RenewalOrderRequest

Renew order request

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

subscriptionId

String

Required

Subscription identifier to renew for.

paymentMethodId

String

Not Required

Identifier of the payment method

period

Period

Not Required

Subscription period to renew for.

attributes

Array of Attribute

Not Required

Optional parameter, to specify additional attributes.

acceptedTerms

Array of String

Not Required

Accepted Terms & Conditions

useAvailableCredit

Boolean

Not Required

Use available credit balance to pay order.

margins

Array of Margin

Not Required

Custom margin for subscription.

SalesOrderProduct

Service plan with resources and parameters.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

planId

String

Required

UUID of plan.

period

Period

Required

Plan period. See Period.

alignExpirationDate

AlignExpirationDate

Not Required

Alignment of subscription expiration date options.

resources

Array of Resource

Not Required

childProducts

Array of SalesOrderProduct

Not Required

SalesOrderRequest

Sales order request

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

accountId

String

Not Required

Account UUID for which the order is placed

vendorAccountId

String

Not Required

Vendor account UUID for which the order is placed

isSellerContext

Boolean

Not Required

planId

String

Not Required

Plan UUID on which the subscription is created

period

Period

Not Required

Plan period for subscription

paymentMethodId

String

Not Required

Identifier of the payment method

acceptedTerms

Array of String

Not Required

Accepted Terms & Conditions

promoCode

String

Not Required

Promo code for subscription

useAvailableCredit

Boolean

Not Required

Use available credit balance to pay order.

skipPromoEligibilityCheck

Boolean

Not Required

Skip eligibility check

resources

Array of Resource

Not Required

Optional parameter, to specify resource amount to buy

attributes

Array of Attribute

Not Required

Optional parameter, to specify additional attributes.

products

Array of SalesOrderProduct

Not Required

List of products to buy

specialPricing

SpecialPricing

Not Required

Special pricing for order

providerCosts

SpecialProviderCosts

Not Required

This method gets Provider’s Costs.

BillingRequestInfo

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

externalRequestId

String

Required

Composite external unique request identifier

subscriptionUuid

String

Required

Subscription APS UUID

BillingOrdersRequest

Request holder class for billing order type.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

requests

Array of BillingRequestInfo

Not Required

List of requests for billing of subscriptions

PromoResult

Result of the promotion or discount application:
APPLIED - Discount/promotion is found by promo-code, and order is discounted.
NOT_APPLICABLE - Discount/promotion is found by promo-code, but not applicable to a given order.
ALREADY_APPLIED - The provided one-time promo-code is already applied to different order.
INVALID - The provided promo-code is not valid, we were unable to find a discount/promotion using it.

OrderDetailDTO

Order Detail information.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

type

Enum

Not Required

Type of the order detail, see OrderDetailType.
Type of the order detail:
UNKNOWN - any order detail.
PLAN_SETUP - plan setup fee.
PLAN_SETUP_REFUND - plan setup Refund.
PLAN_SWITCH_PLAN - plan switch.
PLAN_RENEW - plan renew.
PLAN_RENEW_REFUND - plan renew refund.
PLAN_TRANSFER - plan transfer fee.
PLAN_TRANSFER_REFUND - plan transfer refund.
PLAN_RECURRING - plan recurring fee.
PLAN_RECURRING_REFUND - plan recurring refund.
RESOURCE_SETUP - resource setup fee.
RESOURCE_SETUP_REFUND - resource setup refund.
RESOURCE_SWITCH - resource switch.
RESOURCE_RECURRING - resource recurring fee.
RESOURCE_RECURRING_REFUND - resource recurring refund.
RESOURCE_OVERUSE - resource overuse.
RESOURCE_DOWNGRADE - resource downgrade.
DISCOUNT - discount.
ADJUSTMENT - adjustment.
CANCELLATION - cancellation.
HANDLING_FEE - handling fee.
NON_PROVISIONING_ITEM - non provisioning item.
PAYMENT - payment.
REFUND - refund.
REFUND_ADJ - refund adjustment.
BILL_PENALTY - billing penalty.
BILL_RECORD - billing record.
RESEL_PMNT - reseller payment.
DEPOSIT - deposit.

planId

String

Not Required

APS ID of the service plan.

period

Period

Not Required

Subscription period of the service plan.

resourceId

String

Not Required

APS ID of the resource if the order detail is bound with a resource or null otherwise.

sku

String

Not Required

SKU..

duration

Duration

Not Required

Duration of the order detail the price is calculated for.

description

String

Not Required

Localized description of the order detail.

quantity

Number

Not Required

Quantity of the ordered resources.

lowerBound

Number

Not Required

In a case when the Tiered or Volume pricing model is used, this is the lower limit of a tier.

unitOfMeasure

String

Not Required

Unit of resource measurement if the oder detail is bound to a resource. In all other case, the unit is item.

unitPrice

Currency

Not Required

Price per unit.

salesUnitPrice

Currency

Not Required

Price per unit in sales currency

extendedPrice

Currency

Not Required

Total of the order detail calculated as unitPrice multiplied by quantity and multiplied by the duration.

salesExtendedPrice

Currency

Not Required

Extended price in sales currency

regularUnitPrice

Currency

Not Required

Regular Price per unit.

salesRegularUnitPrice

Currency

Not Required

Full price per unit in sales currency

regularExtendedPrice

Currency

Not Required

Full Total of the order detail calculated as unitPrice multiplied by quantity and multiplied by the duration.

salesRegularExtendedPrice

Currency

Not Required

Full price in sales currency

discount

DiscountReport

Not Required

Report on the applied discount; can be null.

salesDiscount

DiscountReport

Not Required

Report on the applied discount in sales currency; can be null

taxAmount

Currency

Not Required

Calculated tax containing those taxes that are included in the initial price (inclusive taxes) and those that will be added to the initial price (exclusive taxes).

salesTaxAmount

Currency

Not Required

Tax amount in sales currency

exclusiveTaxAmount

Currency

Not Required

Exclusive tax that will be added to the initial price.

salesExclusiveTaxAmount

Currency

Not Required

Exclusive tax amount in sales currency

taxCalcError

String

Not Required

Error message returned in a case of tax calculation failure.

exchangeRate

Number

Not Required

Exchange rate between account currency and sales currency. Used for calculating prices from sales prices etc.

exchangeTime

String

Not Required

Date and time on which exchange rate were acquired

startDate

String

Not Required

Detail start date

endDate

String

Not Required

Detail end date

DiscountReport

This structure contain information about discount.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

type

DiscountType

Not Required

Specifies if the discount is a fixed sum or percent of the initial price, see DiscountType.

value

Number

Not Required

Discount value, either a fixed sum or percent of the initial price.

amount

Number

Not Required

Difference between the initial price and the discounted price.

amountCode

String

Not Required

PromoEligibilityStatus

Promotion eligibility status:
ELIGIBLE - Promotion has been applied.
NOT_ELIGIBLE - Promotion has not been applied.

SubscriptionTcvDetails

The subscription Total contract value details.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

id

String

Required

internalId

Integer

Not Required

plan

TcvSubscriptionPlan

Not Required

alignedExpirationDate

String

Not Required

tcvs

Array of TcvDetail

Not Required

TcvSubscriptionPlan

The TCV subscription plan for which the total contract values are calculated.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

period

Period

Not Required

TcvDetail

The total contract values for the subscription period and costs for the billing period for one level of the vendors chain

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

buyer

CompositeId

Not Required

seller

CompositeId

Not Required

startDate

String

Not Required

endDate

String

Not Required

currency

String

Not Required

planPeriod

TcvInfo

Not Required

resources

Array of TcvResourceInfo

Not Required

CompositeId

The structure that defines the composite identifier for the object.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

id

String

Required

The APS UUID of the object.

internalId

Integer

Not Required

The internal Id of the object.

TcvInfo

The general TCV information

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

total

String

Not Required

discTotal

String

Not Required

effectiveTotal

String

Not Required

delta

String

Not Required

TcvResourceInfo

The TCV and costs for the resource for the corresponding level

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

resource

ResourceInfo

Not Required

ResourceInfo

General resource information

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

id

TcvResourceInfoId

Not Required

resourceName

I18n

Not Required

TcvResourceInfoId

The TCV resource identifier with mpn.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

mpn

String

Not Required

OrderEstimationResult

Order estimation result.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

promoResult

PromoResult

Not Required

Indicates the result of the attempt to apply the promotion, see PromoResult.

total

Currency

Not Required

Estimated order total.

subTotal

Currency

Not Required

Estimated order total without exclusive taxes.

totalDiscount

Currency

Not Required

Estimated order total discount.

taxTotal

Currency

Not Required

Estimated order tax total.

exclusiveTaxTotal

Currency

Not Required

Estimated order exclusive tax total.

details

Array of OrderDetailDTO

Not Required

Array of the order details.

startDate

String

Not Required

Start date of the migrated subscription.

expirationDate

String

Not Required

Expiration date of the migrated subscription.

lastBillingDate

String

Not Required

Last billing date of the migrated subscription.

nextBillingDate

String

Not Required

Next billing date of the migrated subscription.

promoEligibilityStatus

PromoEligibilityStatus

Not Required

Promotion eligibility status. See PromoEligibilityStatus.

subscriptionsDetails

Array of SubscriptionTcvDetails

Not Required

Array of the subscriptions tcv.

TermCondition

Terms and Conditions.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

termId

String

Not Required

Identifier of the condition.

name

String

Not Required

Name of the condition.

content

String

Not Required

Full text of the condition that user should accept.

PushOrderRequest

Request for the order to transition to the specified status.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

ofStatus

String

Not Required

Order flow status.

OperationType

Subscription operation types:
START_SERVICE - Start Service.
STOP_SERVICE - Stop Service .
CANCEL_BY_CUSTOMER - Cancel by Customer.
CANCEL_BY_VENDOR - Cancel by Vendor.
ACCOUNT_CANCELLATION - Account Cancellation.
DESTROY_SERVICE - Destroy Service.
RENEW_SERVICE - Renew Service.
RESTORE_SUBSCRIPTION - Restore Subscription.
SWITCH_PLAN - Switch Service Plan.
AUTOMATIC_SYNCHRONIZATION - Automatic Synchronization.
SWITCH_PERIOD - Switch Period.
CHANGE_EXPIRATION_DATE - Change Expiration Date.
UPGRADE_DOWNGRADE_RESOURCES - Upgrade/Downgrade Resources.
SYNCHRONIZE_WITH_PLAN - Synchronize with Plan.

ReasonCode

Subscription Reason Code.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

reasonId

Integer

Not Required

Identifier of the subscription reason.

description

I18n

Not Required

Description of the subscription reason.

operationType

Enum

Not Required

OperationType of the subscription reason, see OperationType.
Subscription operation types:
START_SERVICE - Start Service.
STOP_SERVICE - Stop Service .
CANCEL_BY_CUSTOMER - Cancel by Customer.
CANCEL_BY_VENDOR - Cancel by Vendor.
ACCOUNT_CANCELLATION - Account Cancellation.
DESTROY_SERVICE - Destroy Service.
RENEW_SERVICE - Renew Service.
RESTORE_SUBSCRIPTION - Restore Subscription.
SWITCH_PLAN - Switch Service Plan.
AUTOMATIC_SYNCHRONIZATION - Automatic Synchronization.
SWITCH_PERIOD - Switch Period.
CHANGE_EXPIRATION_DATE - Change Expiration Date.
UPGRADE_DOWNGRADE_RESOURCES - Upgrade/Downgrade Resources.
SYNCHRONIZE_WITH_PLAN - Synchronize with Plan.

EligibilityCheckStatus

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

checkSkipped

Boolean

Not Required

Shows whether eligibility check was skipped for Order.

skipPossible

Boolean

Not Required

Shows whether it is possible to skip eligibility check for Order.

Correction

DTO of order detail’s correction. It may contain representation of correcting detail or correction’s result: all corrections applied to original detail.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

correctionId

Integer

Not Required

Correction ID (ID of correcting detail)

correctedCorrectionId

Integer

Not Required

Corrected detail id

description

String

Not Required

Description.

documentType

MLString

Not Required

Document type

documentNumber

String

Not Required

Document number

originalExtendedPrice

Currency

Not Required

Original extended price / extended price change amount

currentExtendedPrice

Currency

Not Required

Current extended price

originalTax

Currency

Not Required

Original taxes / taxes change amount

currentTax

Currency

Not Required

Current taxes

originalTotal

Currency

Not Required

Original total / total change amount

currentTotal

Currency

Not Required

Current total

correctionReason

String

Not Required

Correction reason

ModuleActionEntity

The structure combines several TypedProperty fields in a response returned by the getActions operation. It presents an approvable entity inside an approvable action.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

fields

Array of TypedProperty

Not Required

The fields of an approvable entity.

TypedProperty

The structure of an approvable field inside an action entity. If its isCriteria property is true, the field can be used to configure an approval criteria in a workflow step.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

name

String

Not Required

Internal name of the property that works as an internal ID.

displayName

String

Not Required

Localized name displayed in the control panel when configuring a step in a workflow of the approval engine or processing a request for approval.

displayHint

String

Not Required

type

String

Not Required

The type of the field value to be approved. Strict list of values: ‘number’, ‘currency’, ‘percentage’ or ‘string’.

isArray

Boolean

Not Required

false

isCriteria

Boolean

Not Required

true

ModuleAction

The structure of an approvable action that is an element of an array returned by the getActions operation. The provider can configure an approval workflow for every such action.

NAME

TYPE

ATTRIBUTES

DEFAULT

DESCRIPTION

name

String

Not Required

The name assigned to an action.

entity

ModuleActionEntity

Not Required

Approvable entity consisting of approvable fields.

Examples

Below, you will find the most often used operations on orders. For more demos on using the order management service by external systems, refer to Manage Orders.

Get All Orders

An external management system can get a list of orders by calling the listOrders custom operation:

GET /aps/2/services/order-manager/orders

The response contains a list of orders:

HTTP/1.1 200 OK

[
   {
      "orderId": "18131926-c152-4652-8a29-3fe076929f4b",
      "internalId": 1000024,
      "orderNumber": "SO000014",
      "type": "SO",
      "total": 308.0,
      "taxTotal": 0.0,
      "exclusiveTaxTotal": 0.0,
      "subTotal": 308.0,
      "status": "COMPLETED",
      "paymentStatus": "FINISHED",
      "provisioningStatus": "COMPLETED",
      "ofStatus": "CP",
      "sellerId": "c0d43087-da72-472a-a176-84a34608979f",
      "buyerId": "d7dd06ef-20a0-41f5-b89f-768ef373ae44",
      "orderDate": "2019-04-04T21:00:00Z",
      "expirationDate": "2019-04-07T21:00:00Z",
      "creationTime": "2019-04-05T13:22:14Z"
      "orderAttributes": [],
      "accountAttributes": [],
      "endCustomerName": "John Smith",
      "endCustomerType": "CUSTOMER"
   },
   { // Another order
   }
]

Similar to other requests for a collection of resources, by default, the returned Content-Range header contains the total number of found orders in accordance with the pagination rules. This calculation requires a substantial amount of time when the orders number several million. To turn off this calculation, send the HTTP header APS-Skip-Content-Range.

Get Filtered Orders

To select the list of orders by certain criteria, the listOrders operation provides custom filters similar to Resource Query Language. In this case, a request can look as follows:

GET /aps/2/services/order-manager/orders?in({property},{value}),select({linkToResources}),ge(creationDate,{fromDate}),le(creationDate,{toDate}),like(number,*000001),limit({from},{to})

The following functions can be used:

  • in verifies whether a property is in the specified list, for example, request only sales orders and billing orders:

    in(type,(SO,BO))
    

    The following properties are allowed in the function:

    • resellerId is the APS ID of a reseller that provides the ordered services.

    • customerId is the APS ID of a customer that placed the order.

    • type is an order type as specified by the OrderRequest structure of the APS type.

    • orderId is an order UUID.

    • orderNumber is the string ID assigned by the platform to an order, for example, “SO000004”.

    • provisioningStatus is an order provisioning status as enum.

    • paymentStatus is the payment status of an order as enum.

  • like verifies whether a property matches a wildcard mask that uses the wildcard symbols * and ?. Currently, the function is applicable to the orderNumber property only, for example:

    like(number,*00001)
    
  • select requires details about a linked resource. Currently, the only link that can be specified is subscription, that is select(subscription).

  • ge and le (respectively “Greater or Equal” and “Lower or Equal”) functions are applicable to the data-time properties to select the orders in a certain date-time interval, for example, request the orders created between the specified data-time:

    ge(creationTime,2018-04-26T16:00:00Z),le(creationTime,2018-04-26T18:00:00Z)
    
  • limit fetches orders in a range of numbers, for example, fetch up to 9 orders starting from position 0:

    limit(0,9)
    

Get Order Details

To get the full JSON representation of an order, a request must specify the order APS ID in the URL as in the following example:

GET /aps/2/services/order-manager/orders/18131926-c152-4652-8a29-3fe076929f4b

If successful, the response looks similar to the following:

HTTP/1.1 200 OK

{
   "orderId": "18131926-c152-4652-8a29-3fe076929f4b",
   "internalId": 1000002,
   "orderNumber": "SO000001",
   "type": "SO",
   "total": {
      "value": 308.0,
      "code": "USD"
   },
   "taxTotal": {
      "value": 0.0,
      "code": "USD"
   },
   "exclusiveTaxTotal": {
      "value": 0.0,
      "code": "USD"
   },
   "subTotal": {
      "value": 308.0,
      "code": "USD"
   },
   "status": "COMPLETED",
   "subscriptions": [
      "4c867c87-fbf7-49e8-9f7e-0d06e8f7a003"
   ],
   "bssSubscriptions": [
      "456808a0-b5a6-4092-ab67-b77e33743a07"
   ],
   "paymentStatus": "FINISHED",
   "provisioningStatus": "COMPLETED",
   "ofStatus": "CP",
   "sellerId": "8265e3d7-cdf5-4acc-8ca4-267268a79aae",
   "buyerId": "9d086478-d00b-40c2-86df-7bc9b862e667",
   "orderDate": "2019-02-26",
   "expirationDate": "2019-03-01",
   "creationTime": "2019-02-26T10:01:17Z",
   "orderAttributes": [],
   "endCustomerAttributes": [
      {
         "attributeID": "external_id",
         "value": "Smith-123"
      }
    ],
   "details": [
      {
         "type": "RESOURCE_RECURRING",
         "planId": "67216414-6490-4588-bef9-7f6acf5e6a63",
         "period": {
            "unit": "YEARS",
            "duration": 1
         },
         "resourceId": "6cc3ccc6-0571-4c16-8e41-3916e1136284",
         "duration": {
            "unit": "MONTHS",
            "duration": 1.0
         },
         "description": "Disk Space Recurring",
         "quantity": 90.0,
         "lowerBound": 0.0,
         "unitOfMeasure": "GB",
         "unitPrice": {
            "value": 1.0,
            "code": "USD"
         },
         "extendedPrice": {
            "value": 90.0,
            "code": "USD"
         }
         "discount": {
            "type": "PERCENT",
            "value": 0.0,
            "amount": 0.0
         },
         "taxAmount": {
            "value": 0.0,
            "code": "USD"
         }
         "exclusiveTaxAmount": {
            "value": 0.0,
            "code": "USD"
         }
      },
      {
         "type": "PLAN_RECURRING",
         "planId": "67216414-6490-4588-bef9-7f6acf5e6a63",
         "period": {
            "unit": "YEARS",
            "duration": 1
         },
         "duration": {
            "unit": "MONTHS",
            "duration": 1.0
         },
         "description": "VIP Maintenance and Support Recurring",
         "quantity": 1.0,
         "unitOfMeasure": "item",
         "unitPrice": {
            "value": 199.0,
            "code": "USD"
         }
         "extendedPrice": {
            "value": 199.0,
            "code": "USD"
         }
         "discount": {
            "type": "PERCENT",
            "value": 0.0,
            "amount": 0.0
         },
            "taxAmount": {
               "value": 0.0,
               "code": "USD"
            }
            "exclusiveTaxAmount": {
               "value": 0.0,
               "code": "USD"
            }
         },
         {
            "type": "PLAN_SETUP",
            "planId": "67216414-6490-4588-bef9-7f6acf5e6a63",
            "period": {
               "unit": "YEARS",
               "duration": 1
            },
         "description": "VIP Maintenance and Support Setup",
         "quantity": 1.0,
         "unitOfMeasure": "item",
         "unitPrice": {
            "value": 19.0,
            "code": "USD"
         }
         "extendedPrice": {
            "value": 19.0,
            "code": "USD"
         }
         "discount": {
            "type": "PERCENT",
            "value": 0.0,
            "amount": 0.0
         },
         "taxAmount": {
            "value": 0.0,
            "code": "USD"
         }
         "exclusiveTaxAmount": {
            "value" 0.0,
            "code": "USD"
         }
      }
   ],
   "endCustomerName": "John Smith",
   "endCustomerType": "CUSTOMER"
}

Get Terms and Conditions of Service Plans

Since usually service plans are accompanied with certain terms and conditions that must be accepted by a customer, a requester can get the contents of those terms and conditions before subscribing that customer to the service plans. The request must contain APS IDs of the service plans and the customer as in the following example:

POST /aps/2/services/order-manager/orders/termsconditions

{
   "type": "SALES",
   "accountId": "3fef9702-b2ad-419a-9924-a56882e5f06c",
   "products": [
      {
         "planId": "ebf17799-6a39-4133-ab9c-0afa40dcd6ae",
         "period": {
               "unit": "MONTHS",
               "duration": 1
         }
      }
   ]
}

If there are terms and conditions bound to the requested service plans, the platform returns a list of elements containing the IDs and the contents of those terms and conditions:

[
   {
      "termId": "1",
      "name": "Terms and Conditions",
      "content": "<h1>Cloud SaaS</h1>\r\n<h2>Introduction</h2>\r\n
            Lorem ipsum ut porttitor sagittis.\r\n
            <h2>Intellectual Properties</h2>\r\n
            Convallis interdum porttitor ante hendrerit.\r\n
            <h2>Restrictions</h2>\r\n
            Ac auctor duis curae magna."
   }
]

Place Sales Orders

The following example illustrates how to subscribe a specified customer to a list of specified service plans and demonstrates a request for an extended amount of a resource:

POST /aps/2/services/order-manager/orders

{
   "type": "SALES",
   "accountId" : "3fef9702-b2ad-419a-9924-a56882e5f06c",
   "promoCode": "123",
   "paymentMethodId": "3",
   "products" : [{
         "planId" : "ae0e6e84-0d37-4b17-8f6c-5709633529ab",
         "period" : {
            "unit" : "MONTHS",
            "duration" : 1
         },
         "resources" : [{
            "resourceId" : "1c3ab0be-3160-45a1-a9b4-7824f74673ff",
            "amount" : 40
         }],
         "parameters": [
            {
               "aps": {
               "type": "http://aps-standard.org/samples/vpsdemo/management/1.0"
            },
               "client": "1st APS, inc.",
               "mail": "jsmith@aps.test"
            }
         ],
         "childProducts": [
            { // Another service plan - upsell
            }
         ]
      },
      { // Another service plan
      }
   ],
   "attributes": [
      {
         "attributeID": "comments",
         "value": "Requested by the ERP system."
      }
   ],
   "acceptedTerms": [
      "1"
   ],
   "dealPrices" : { // See the "Set Special Prices in a Sales Order" section for details
   }
}

Place Renewal Orders

To renew a subscription, an external management system must call the placeOrder custom operation as in the following example:

POST /aps/2/services/order-manager/orders

{
   "type": "RENEWAL",
   "subscriptionId": "456808a0-b5a6-4092-ab67-b77e33743a07",
   "paymentMethodId": "11",
   "period": {
      "unit": "MONTHS",
      "duration": 1
   },
   "attributes": [
      {
         "attributeID": "comments",
         "value": "Requested by the ERP system."
      }
   ]
}

Change a Subscription Period

The platform allows you to switch a subscription from its current service plan to another one or to another subscription period within the current service plan. An external management system calls the placeOrder custom operation to start the switching process:

POST /aps/2/services/order-manager/orders

{
   "type": "CHANGE",
   "subscriptionId": "456808a0-b5a6-4092-ab67-b77e33743a07",
   "planId": "ae0e6e84-0d37-4b17-8f6c-5709633529ab",
   "paymentMethodId": "11",
   "period": {
      "unit": "MONTHS",
      "duration": 3
   },
   "parameters": [
      {
         "aps": {
            "type": "http://aps-standard.org/samples/vpsdemo/management/1.0"
         },
         "client": "1st APS, inc.",
         "mail": "jsmith@aps.test"
      }
   ],
   "attributes": [
      {
         "attributeID": "comments",
         "value": "Requested by the ERP system."
      }
   ]
}

When placing a change order that switches a subscription from one service plan to another or from one subscription period to another within the same service plan, you can use the upgradeStartType parameter to specify which start date is set for the new subscription period of that subscription: the start date of the old subscription period (FROM_OLD_START_DATE) or the date this change order is placed (FROM_DATE_OF_UPGRADE). If you do not use this parameter, the start date is set depending on your billing configuration.

Example:

POST /aps/2/services/order-manager/orders

{
   "type": "CHANGE",
   "subscriptionId": "1f8538a3-8679-449e-a9b9-f249ae496df3",
   "planId": "ae48fbb2-76f1-4dc9-9241-3b8420b0fa9e",
   "period": {
      "unit": "MONTHS",
      "duration": 3
   },
   "upgradeStartType": "FROM_OLD_START_DATE"
}

Change Resource Limits

To buy an additional amount of resources within a subscription, an external management system calls the placeOrder custom operation as in the following example:

POST /aps/2/services/order-manager/orders

{
   "type": "CHANGE",
   "subscriptionId": "4c867c87-fbf7-49e8-9f7e-0d06e8f7a003",
   "paymentMethodId": "11",
   "resources": [
      {
         "resourceId": "bf8ea705-3f2b-4f3c-b445-a11ec100da82",
         "amount": 10
      }
   ],
   "changeParameters": [
      {
         "aps": {
            "type": "http://vendor.example.com/app/dropboxbusiness/team"
         },
         "deal_id": "new_deal_id_value",
      }
   ],
   "attributes": [
      {
         "attributeID": "comments",
         "value": "Requested by the ERP system."
      }
   ]
}

Schedule Subscription Changes

It is possible to post a change order and delay its processing till subscription renewal or till the next billing date.

Schedule Subscription Changes for Renewal

To place change orders that will update the subscription when it is renewed (specifically, on the subscription expiration date), an external system must call the placeOrder custom operation with the scheduled parameter as in the following example:

POST /aps/2/services/order-manager/orders

 {
   "type": "CHANGE",
   "schedule": {
     "type": "RENEWAL"
   },
   "planId": "4496a692-455f-475b-a4eb-0b82dfc85339",
   "period": {
     "duration": 2,
     "unit": "MONTHS"
   },
   "subscriptionId": "53c7737a-3bd8-40cc-91c6-5c9894511b6c",

   "resources": [
     {
       "resourceId": "fefcec44-5d0b-4e3e-87a2-d352b450960d",
       "amount": 4
     }
   ]
 }

When viewing the information about a scheduled order, you can see the date that the changes in that order will come into effect. Additionally, before that date, the order flow status of such order will be AS (Activation Scheduled). See the example below:

GET /aps/2/services/order-manager/orders/18131926-c152-4652-8a29-3fe076929f4b

HTTP/1.1 200 OK

{
   "orderId": "18131926-c152-4652-8a29-3fe077329f4b",
   "internalId": 1000002,
   "orderNumber": "SO000001",
   ...
   "status": "AS",
   ...
   "type": "CH",
   ...
   "schedule": {
      "type": "RENEWAL",
      "date": "2024-01-01"
   },
   ...
}

To cancel a scheduled order before the scheduled date, an external management system must change its status from AS to OC as in the example below:

POST /aps/2/services/order-manager/orders/4449abb3-f760-4bd8-98cc-c8e36352c3a7/push

{
   "ofStatus": "OC"
}

Schedule Subscription Changes for Billing Date

To schedule subscription changes, for example, to change its billing period on the next billing date, an external management system must call the placeOrder custom operation as in the following example:

POST /aps/2/services/order-manager/orders

 {
   "type": "CHANGE",
   "schedule": {
     "type": "BILLING"
   },
   "planId": "eb5a72d2-86e6-4666-99c3-a93d0a462601",
   "period": {
     "duration": 1,
     "unit": "YEARS"
   },
   "subscriptionId": "4c0e8c95-dc6b-4437-9609-f35fa8acba18",
   "resources": [
     {
       "sourceResourceId": "df20eda4-f6c0-44dc-8af3-ec2c30f3813a",
       "amount": 3,
       "targetResourceId": "df20eda4-f6c0-44dc-8af3-ec2c30f3813a"
     }
   ],
   "accountId": "fa1ca864-1233-42b0-b5fa-f723e5ab2969"
 }

Cancel Subscriptions

To cancel a subscription, an external management system must call the placeOrder custom operation as in the following example:

POST /aps/2/services/order-manager/orders

{
   "type": "CANCELLATION",
   "subscriptionId": "456808a0-b5a6-4092-ab67-b77e33743a07",
   "refundType": "CREDIT_MEMO",
   "attributes": [
      {
         "attributeID": "comments",
         "value": "Requested by the ERP system."
      }
   ]
}

Placing Migration Order

To migrate a subscription from another system and add it to the platform, an external management system calls the placeOrder custom operation as in the following example:

{
  "migrationProgram": "prorate_migration_billing_period",
  "startDate": "2027-12-02",
  "dealPrices": [
    {
      "agreements": [
        {
          "buyer": {
            "id": "ae274083-220f-4fc5-937f-8ff771711278"
          },
          "price": {
            "resources": [
              {
                "recurring": {
                  "code": "USD",
                  "value": 20
                },
                "resource": {
                  "id": "84ecf4ef-ee94-4bc0-b3cc-130e524aaa4d"
                }
              }
            ]
          }
        },
        {
          "buyer": {
            "id": "4c32efa4-c0a3-491a-b82c-8b77923dac0e"
          },
          "price": {
            "resources": [
              {
                "recurring": {
                  "code": "USD",
                  "value": 20.1
                },
                "resource": {
                  "id": "84ecf4ef-ee94-4bc0-b3cc-130e524aaa4d"
                }
              }
            ]
          },
          "seller": {
            "id": "ae274083-220f-4fc5-937f-8ff771711278"
          }
        },
        {
          "buyer": {
            "id": "bc93c277-cf5f-49c1-9a6c-28a0d7f5a53e"
          },
          "price": {
            "resources": [
              {
                "recurring": {
                  "code": "USD",
                  "value": 20.2
                },
                "resource": {
                  "id": "84ecf4ef-ee94-4bc0-b3cc-130e524aaa4d"
                }
              }
            ]
          },
          "seller": {
            "id": "4c32efa4-c0a3-491a-b82c-8b77923dac0e"
          }
        }
      ],
      "freezePrices": false,
      "plan": {
        "id": "a57750d9-0712-4398-9b82-a3f5f57dbeec"
      },
      "period": {
        "duration": 1,
        "unit": "YEARS"
      }
    }
  ],
  "expirationDate": "2028-12-02",
  "migrationDate": "2028-03-04",
  "planId": "a57750d9-0712-4398-9b82-a3f5f57dbeec",
  "type": "MIGRATION",
  "period": {
    "duration": 1,
    "unit": "YEARS"
  },
  "resources": [
    {
      "resourceId": "84ecf4ef-ee94-4bc0-b3cc-130e524aaa4d",
      "amount": 3
    }
  ],
  "accountId": "bc93c277-cf5f-49c1-9a6c-28a0d7f5a53e",
  "acceptedTerms": [10, 11],
  "acceptedTermsDate": "2019.02.10T15:02:00Z",
  "acceptedTermsUserId": 1000009
}

Note

You cannot specify specialPricing when placing a migration order. Instead, you can use dealPrices.

Estimate Order Fees

Estimating Order for Existing Customer

The estimation operation takes into account the discounts, promos, and taxes valid for a specified customer. This operation will exclude the tax calculation if you add the includeTaxes=false input query parameter.

POST /aps/2/services/order-manager/orders/estimate

{
   "type": "SALES",
   "accountId" : "00b60056-8b0a-4981-8ca4-d114346cd652",
   "promoCode" : "123",
   "products" : [{
      "planId" : "6b64da9a-f8e6-4cbd-8aef-de304a27b627",
      "period" : {
         "unit" : "MONTHS",
         "duration" : 1
      },
      "resources" : [{
         "resourceId" : "2f8905f8-4302-49d7-ab7f-65c9036addf0",
         "amount" : 20
      }]
   }]
}

The response looks like this:

HTTP/1.1 200 OK

  {
      "details": [
          {
              "description": "Cloud VPSes Setup",
              "duration": {
                  "duration": 0.06,
                  "unit": "MONTHS"
              },
              "endDate": "2024-03-04",
              "exclusiveTaxAmount": {
                  "code": "USD",
                  "value": 0.0
              },
              "extendedPrice": {
                  "code": "USD",
                  "value": 3.6
              },
              "lowerBound": 0.0,
              "period": {
                  "duration": 1,
                  "unit": "YEARS"
              },
              "planId": "b835901f-6336-49cc-84ce-26293a7f5786",
              "quantity": 3.0,
              "regularExtendedPrice": {
                  "code": "USD",
                  "value": 3.6
              },
              "regularUnitPrice": {
                  "code": "USD",
                  "value": 20.0
              },
              "resourceId": "b6cd3882-d92d-4cf7-a936-6888e4fed543",
              "startDate": "2024-03-03",
              "taxAmount": {
                  "code": "USD",
                  "value": 0.0
              },
              "type": "RESOURCE_RECURRING",
              "unitOfMeasure": "KB",
              "unitPrice": {
                  "code": "USD",
                  "value": 20.0
              }
          },
          {
              "description": "Cloud VPSes Recurring",
              "duration": {
                  "duration": 0.06,
                  "unit": "MONTHS"
              },
              "endDate": "2024-03-04",
              "exclusiveTaxAmount": {
                  "code": "USD",
                  "value": 0.0
              },
              "extendedPrice": {
                  "code": "USD",
                  "value": 0.63
              },
              "lowerBound": 0.0,
              "period": {
                  "duration": 1,
                  "unit": "YEARS"
              },
              "planId": "b835901f-6336-49cc-84ce-26293a7f5786",
              "quantity": 1.0,
              "regularExtendedPrice": {
                  "code": "USD",
                  "value": 0.63
              },
              "regularUnitPrice": {
                  "code": "USD",
                  "value": 10.5
              },
              "startDate": "2024-03-03",
              "taxAmount": {
                  "code": "USD",
                  "value": 0.0
              },
              "type": "PLAN_RECURRING",
              "unitOfMeasure": "item",
              "unitPrice": {
                  "code": "USD",
                  "value": 10.5
              }
          }
      ],
      "exclusiveTaxTotal": {
          "code": "USD",
          "value": 0.0
      },
      "promoEligibilityStatus": "ELIGIBLE",
      "subscriptionsDetails": [
          {
              "alignedExpirationDate": "2025-03-03",
              "plan": {
                  "id": "b835901f-6336-49cc-84ce-26293a7f5786",
                  "internalId": 24,
                  "period": {
                      "duration": 1,
                      "unit": "YEARS"
                  }
              },
              "tcvs": [
                  {
                      "buyer": {
                          "id": "6fdacb8e-835b-48a4-bb47-f75defe831ed",
                          "internalId": 1000003
                      },
                      "currency": "USD",
                      "discTotal": "0.0",
                      "effectiveTotal": "846.0",
                      "endDate": "2025-03-03",
                      "planPeriod": {
                          "discTotal": "0.0",
                          "effectiveTotal": "126.0",
                          "total": "126.0"
                      },
                      "resources": [
                          {
                              "discTotal": "0.0",
                              "effectiveTotal": "720.0",
                              "resource": {
                                  "id": {
                                      "id": "b6cd3882-d92d-4cf7-a936-6888e4fed543",
                                      "internalId": 1000021,
                                      "mpn": "aca0c06c-890d-4abb-83cf-bc519a2565e5"
                                  },
                                  "resourceName": {
                                      "en_US": "Diskspace"
                                  }
                              },
                              "total": "720.0"
                          }
                      ],
                      "seller": {
                          "id": "b303f6c5-d2d8-4e2e-b1d8-16fffa9d3207",
                          "internalId": 1000002
                      },
                      "startDate": "2024-03-03",
                      "total": "846.0"
                  },
                  {
                      "buyer": {
                          "id": "b303f6c5-d2d8-4e2e-b1d8-16fffa9d3207",
                          "internalId": 1000002
                      },
                      "currency": "USD",
                      "discTotal": "0.0",
                      "effectiveTotal": "666.0",
                      "endDate": "2025-03-03",
                      "planPeriod": {
                          "discTotal": "0.0",
                          "effectiveTotal": "126.0",
                          "total": "126.0"
                      },
                      "resources": [
                          {
                              "discTotal": "0.0",
                              "effectiveTotal": "540.0",
                              "resource": {
                                  "id": {
                                      "id": "b6cd3882-d92d-4cf7-a936-6888e4fed543",
                                      "internalId": 1000021,
                                      "mpn": "aca0c06c-890d-4abb-83cf-bc519a2565e5"
                                  },
                                  "resourceName": {
                                      "en_US": "Diskspace"
                                  }
                              },
                              "total": "540.0"
                          }
                      ],
                      "seller": {
                          "id": "87358bc2-d937-4bf9-b7ad-df6a9e0a244f",
                          "internalId": 1000001
                      },
                      "startDate": "2024-03-03",
                      "total": "666.0"
                  }
              ]
          }
      ],
      "subTotal": {
          "code": "USD",
          "value": 4.23
      },
      "taxTotal": {
          "code": "USD",
          "value": 0.0
      },
      "total": {
          "code": "USD",
          "value": 4.23
      },
      "totalDiscount": {
          "code": "USD",
          "value": 0.0
      }
  }

Note

If an order is placed for the service plan with sales currency configured, the response will include additional fields to display values in the sales currency and the information about that currency, and the exchange rate: salesTaxAmount, salesExclusiveTaxAmount, salesDiscount, amountCode, salesExtendedPrice, exchangeRate, salesUnitPrice.

Estimating Order for Reseller’s New Customer

It is possible to estimate an order without specifying customer, as shown in the example below. Using the isSellerContext attribute, you can indicate whether to estimate an order for the reseller performing the operation, or for a potential customer. isSellerContext = true is for estimating an order for a new direct customer of the reseller, while isSellerContext = false is for estimating the order for the reseller placing the request.

POST /aps/2/services/order-manager/orders/estimate

{
   "type": "SALES",
   "isSellerContext": true,
   "promoCode" : "123",
   "products" : [{
      "planId" : "6b64da9a-f8e6-4cbd-8aef-de304a27b627",
      "period" : {
         "unit" : "MONTHS",
         "duration" : 1
      },
      "resources" : [{
         "resourceId" : "2f8905f8-4302-49d7-ab7f-65c9036addf0",
         "amount" : 20
      }]
   }]
}

The response looks like this:

HTTP/1.1 200 OK


{
   "promoEligibilityStatus":"ELIGIBLE",
   "totalDiscount":{
      "code":"USD",
      "value":0.0
   },
   "details":[
      {
         "unitOfMeasure":"KB",
         "lowerBound":0.0,
         "description":"Diskspace Setup",
         "resourceId":"7a506a90-0c95-4458-b8bc-e208f49fc921",
         "planId":"5777e2b1-a7b9-4360-a659-c0039c3f4864",
         "period":{
            "duration":1,
            "unit":"YEARS"
         },
         "unitPrice":{
            "code":"USD",
            "value":10.0
         },
         "exclusiveTaxAmount":{
            "code":"USD",
            "value":0.0
         },
         "extendedPrice":{
            "code":"USD",
            "value":100.0
         },
         "type":"RESOURCE_SETUP",
         "taxAmount":{
            "code":"USD",
            "value":0.0
         },
         "quantity":10.0
      },
      {
         "startDate":"2023-12-07",
         "unitOfMeasure":"KB",
         "lowerBound":0.0,
         "endDate":"2024-01-06",
         "description":"Diskspace Recurr from 2023-12-07 through 2024-01-06",
         "resourceId":"7a506a90-0c95-4458-b8bc-e208f49fc921",
         "planId":"5777e2b1-a7b9-4360-a659-c0039c3f4864",
         "period":{
            "duration":1,
            "unit":"YEARS"
         },
         "unitPrice":{
            "code":"USD",
            "value":30.0
         },
         "exclusiveTaxAmount":{
            "code":"USD",
            "value":0.0
         },
         "duration":{
            "duration":1.0,
            "unit":"MONTHS"
         },
         "extendedPrice":{
            "code":"USD",
            "value":300.0
         },
         "type":"RESOURCE_RECURRING",
         "taxAmount":{
            "code":"USD",
            "value":0.0
         },
         "quantity":10.0
      }
   ],
   "subscriptionsDetails":[

   ],
   "total":{
      "code":"USD",
      "value":400.0
   },
   "subTotal":{
      "code":"USD",
      "value":400.0
   },
   "exclusiveTaxTotal":{
      "code":"USD",
      "value":0.0
   },
   "taxTotal":{
      "code":"USD",
      "value":0.0
   }
}

Estimating Order for New Indirect Customer

To estimate an order for a new customer that will not be a direct customer of the account performing the operation, it is required to specify isSellerContext=true together with the ID of the reseller whose customer it will be. See the example below:

POST /aps/2/services/order-manager/orders/estimate

{
    "type": "SALES",
    "isSellerContext": true,
    "products": [
        {
            "period": {
                "duration": 1,
                "unit": "YEARS"
            },
            "planId": "5777e2b1-a7b9-4360-a659-c0039c3f4864",
            "resources": [
                {
                    "amount": 10,
                    "resourceId": "7a506a90-0c95-4458-b8bc-e208f49fc921"
                }
            ]
        }
    ],
    "vendorAccountId": "94d3fee9-967d-4595-b7a5-e6b931cb85b0"
}

The response looks like this:

HTTP/1.1 200 OK

{
   "promoEligibilityStatus":"ELIGIBLE",
   "totalDiscount":{
      "code":"USD",
      "value":0.0
   },
   "details":[
      {
         "unitOfMeasure":"KB",
         "lowerBound":0.0,
         "description":"Diskspace Setup",
         "resourceId":"7a506a90-0c95-4458-b8bc-e208f49fc921",
         "planId":"5777e2b1-a7b9-4360-a659-c0039c3f4864",
         "period":{
            "duration":1,
            "unit":"YEARS"
         },
         "unitPrice":{
            "code":"USD",
            "value":10.0
         },
         "exclusiveTaxAmount":{
            "code":"USD",
            "value":0.0
         },
         "extendedPrice":{
            "code":"USD",
            "value":100.0
         },
         "type":"RESOURCE_SETUP",
         "taxAmount":{
            "code":"USD",
            "value":0.0
         },
         "quantity":10.0
      },
      {
         "startDate":"2023-12-07",
         "unitOfMeasure":"KB",
         "lowerBound":0.0,
         "endDate":"2024-01-06",
         "description":"Diskspace Recurr from 2023-12-07 through 2024-01-06",
         "resourceId":"7a506a90-0c95-4458-b8bc-e208f49fc921",
         "planId":"5777e2b1-a7b9-4360-a659-c0039c3f4864",
         "period":{
            "duration":1,
            "unit":"YEARS"
         },
         "unitPrice":{
            "code":"USD",
            "value":30.0
         },
         "exclusiveTaxAmount":{
            "code":"USD",
            "value":0.0
         },
         "duration":{
            "duration":1.0,
            "unit":"MONTHS"
         },
         "extendedPrice":{
            "code":"USD",
            "value":300.0
         },
         "type":"RESOURCE_RECURRING",
         "taxAmount":{
            "code":"USD",
            "value":0.0
         },
         "quantity":10.0
      }
   ],
   "subscriptionsDetails":[

   ],
   "total":{
      "code":"USD",
      "value":400.0
   },
   "subTotal":{
      "code":"USD",
      "value":400.0
   },
   "exclusiveTaxTotal":{
      "code":"USD",
      "value":0.0
   },
   "taxTotal":{
      "code":"USD",
      "value":0.0
   }
}

Set Prices, Special Prices, and Provider Costs

When placing or estimating a sales or change order, use the dealPrices attribute to specify fees, regular prices, special prices, and provider costs. This attribute replaces specialPricing and specialProviderCost attributes, which were deprecated.

Set Prices

In the following example, an external system sends an estimation request on behalf of the provider for a sales order containing prices for a reseller’s customer. These prices will not reset after subscription renewal, because the freeze_price parameter is set to yes:

POST /aps/2/services/order-manager/orders/estimate

{
  "type": "SALES",
  "accountId": "00b60056-8b0a-4981-8ca4-d114346cd652",
  "promoCode": "123",
  "products": [
    {
      "planId": "6b64da9a-f8e6-4cbd-8aef-de304a27b627",
      "period": {
        "unit": "MONTHS",
        "duration": 1
      },
      "resources": [
        {
          "resourceId": "2f8905f8-4302-49d7-ab7f-65c9036addf0",
          "amount": 20
        }
      ]
    }
  ],
  "dealPrice": [
    {
      "plan": {
        "id": "6b64da9a-f8e6-4cbd-8aef-de304a27b627",
        "internalId": 1000024
      },
      "period": {
        "unit": "MONTHS",
        "duration": 1
      },
      "freeze_price": "yes",
      "agreements": [
        {
          "seller": {
            "id": "5e4d79cf-ef84-43b7-8ef3-8fa0d23aba18",
            "internalId": 1000005
          },
          "buyer": {
            "id": "97da6107-e48f-4aec-918c-be6a6bbc5918",
            "internalId": 1000031
          },
          "price": {
            "setup": {
              "currency": "USD",
              "value": 10
            },
            "recurring": {
              "currency": "USD",
              "value": 0
            },
            "renewal": {
              "currency": "USD",
              "value": 0
            },
            "cancellation": {
              "currency": "USD",
              "value": 0
            },
            "resources": [
              {
                "resource": {
                  "id": "aps_uuid",
                  "internalId": 23
                },
                "setup": {
                  "type": "tiered",
                  "currency": "USD",
                  "value": 5,
                  "tiers": [
                    {
                      "lowerLimit": 0,
                      "value": 25
                    }
                  ]
                },
                "recurring": {
                  "type": "flat",
                  "currency": "USD",
                  "value": 5,
                  "tiers": [
                    {
                      "lowerLimit": 0,
                      "value": 25
                    }
                  ]
                },
                "overuse": {
                  "type": "volume",
                  "currency": "USD",
                  "value": 10
                }
              }
            ]
          }
        },
        {
          "buyer": {
            "id": "97da6107-e48f-4aec-918c-be6a6bbc5918",
            "internalId": 1000003
          },
          "price": {
            "resources": [
              {
                "resource": {
                  "id": "aps_uuid",
                  "internalId": 23
                },
                "recurring": {
                  "currency": "USD",
                  "value": 8
                }
              }
            ]
          }
        }
      ]
    }
  ]
}

Set Special Prices in a Sales Order

In the following example, an external system sends an estimation request on behalf of the provider for a sales order containing special prices for a reseller’s customer:

POST /aps/2/services/order-manager/orders/estimate

{
  "type": "SALES",
  "accountId": "00b60056-8b0a-4981-8ca4-d114346cd652",
  "promoCode": "123",
  "products": [
    {
      "planId": "6b64da9a-f8e6-4cbd-8aef-de304a27b627",
      "period": {
        "unit": "MONTHS",
        "duration": 1
      },
      "resources": [
        {
          "resourceId": "2f8905f8-4302-49d7-ab7f-65c9036addf0",
          "amount": 20
        }
      ]
    }
  ],
  "dealPrice": [
    {
      "plan": {
        "id": "6b64da9a-f8e6-4cbd-8aef-de304a27b627",
        "internalId": 1000024
      },
      "period": {
        "unit": "MONTHS",
        "duration": 1
      },
      "freeze_price": "no",
      "agreements": [
        {
          "seller": {
            "id": "5e4d79cf-ef84-43b7-8ef3-8fa0d23aba18",
            "internalId": 1000005
          },
          "buyer": {
            "id": "97da6107-e48f-4aec-918c-be6a6bbc5918",
            "internalId": 1000031
          },
          "price": {
            "setup": {
              "currency": "USD",
              "value": 10
            },
            "recurring": {
              "currency": "USD",
              "value": 0
            },
            "renewal": {
              "currency": "USD",
              "value": 0
            },
            "cancellation": {
              "currency": "USD",
              "value": 0
            },
            "resources": [
              {
                "resource": {
                  "id": "aps_uuid",
                  "internalId": 23
                },
                "setup": {
                  "type": "tiered",
                  "currency": "USD",
                  "value": 5,
                  "tiers": [
                    {
                      "lowerLimit": 0,
                      "value": 25
                    }
                  ]
                },
                "recurring": {
                  "type": "flat",
                  "currency": "USD",
                  "value": 5,
                  "tiers": [
                    {
                      "lowerLimit": 0,
                      "value": 25
                    }
                  ]
                },
                "overuse": {
                  "type": "volume",
                  "currency": "USD",
                  "value": 10
                }
              }
            ]
          },
          "discounts": {
            "applicableTo": [
              "SALES",
              "RENEWAL",
              "SWITCH_PLAN",
            ],
            "setup": {
              "currency": "USD",
              "value": 5
            },
            "recurring": {
              "currency": "USD",
              "value": 0
            },
            "renewal": {
              "currency": "USD",
              "value": 0
            },
            "cancellation": {
              "currency": "USD",
              "value": 10
            },
            "resources": [
              {
                "resource": {
                  "id": "aps_uuid",
                  "internalId": 23
                },
                "setup": {
                  "currency": "USD",
                  "value": 5
                },
                "recurring": {
                  "currency": "USD",
                  "value": 5
                },
                "overuse": {
                  "currency": "USD",
                  "value": 5
                }
              }
            ]
          }
        }
      ]
    }
  ]
}

The RENEWAL value in the applicableTo property requires all special recurring and resource usage prices to be applied to the first subscription period and every new subscription period that will start after the subscription renewal action. Otherwise, special prices are valid during the first period only.

The response looks as follows:

HTTP/1.1 200 OK

{
   "promoResult": "APPLIED",
   "total": 16.45,
   "subTotal": 14.95,
   "taxTotal": 1.5,
   "exclusiveTaxTotal": 1.5,
   "details": [
      {
         "type": "PLAN_SETUP",
         "planId": "6b64da9a-f8e6-4cbd-8aef-de304a27b627",
         "period": {
            "unit": "MONTHS",
            "duration": 1
         },
         "description": "Cloud VPSes Setup",
         "quantity": 1.0,
         "lowerBound": 0.0,
         "unitOfMeasure": "item",
         "unitPrice": 1.2,
         "extendedPrice": 1.2,
         "discount": {
            "type": "FIXED",
            "value": 1.2,
            "amount": 0.8
         },
         "taxAmount": 0.12,
         "exclusiveTaxAmount": 0.12
      },
      {
         "type": "PLAN_RECURRING",
         "planId": "6b64da9a-f8e6-4cbd-8aef-de304a27b627",
         "period": {
            "unit": "MONTHS",
            "duration": 1
         },
         "duration": {
            "unit": "MONTHS",
            "duration": 1.0
         },
         "description": "Cloud VPSes Recurring",
         "quantity": 1.0,
         "lowerBound": 0.0,
         "unitOfMeasure": "item",
         "unitPrice": 4.25,
         "extendedPrice": 4.25,
         "taxAmount": 0.43,
         "exclusiveTaxAmount": 0.43
      },
      {
         "type": "RESOURCE_RECURRING",
         "planId": "6b64da9a-f8e6-4cbd-8aef-de304a27b627",
         "period": {
            "unit": "MONTHS",
            "duration": 1
         },
         "resourceId": "2f8905f8-4302-49d7-ab7f-65c9036addf0",
         "duration": {
            "unit": "MONTHS",
            "duration": 1.0
         },
         "description": "null Recurring",
         "quantity": 19.0,
         "lowerBound": 0.0,
         "unitOfMeasure": "unit",
         "unitPrice": 0.5,
         "extendedPrice": 9.5,
         "discount": {
            "type": "FIXED",
            "value": 0.5,
            "amount": 9.5
         },
         "taxAmount": 0.95,
         "exclusiveTaxAmount": 0.95
      }
   ]
}

Once the order estimation fulfills the requesting system, the latter can place a sales order with the same configuration, that is:

POST /aps/2/services/order-manager/orders

{
   "type": "SALES",
   "accountId" : "00b60056-8b0a-4981-8ca4-d114346cd652",
   "promoCode" : "123",
   "products" : [{
      "planId" : "6b64da9a-f8e6-4cbd-8aef-de304a27b627",
      "period" : {
         "unit" : "MONTHS",
         "duration" : 1
      },
      "resources" : [{
         "resourceId" : "2f8905f8-4302-49d7-ab7f-65c9036addf0",
         "amount" : 20
      }]
   }],
   "specialPricing": {
      "applicableTo" : [ "RENEWAL" ],
      "products": [
         {
            "planId": "6b64da9a-f8e6-4cbd-8aef-de304a27b627",
            "period": {
               "unit": "MONTHS",
               "duration": 1
            },
            "prices": {
               "setup": 1.2
            },
            "costs": {
               "setup": 1.0,
               "recurring": 14.0
            },
            "resources": [
               {
                  "resourceId": "2f8905f8-4302-49d7-ab7f-65c9036addf0",
                  "prices": {
                     "recurring": 0.5
                  },
                  "costs": {
                     "recurring": 0.3
                  }
               }
            ]
         }
      ]
   }
}

The response contains the ID of the created order.

Another example is for a sales order with special price set for a product with multi-resource volume pricing model:

POST /aps/2/services/order-manager/orders

 {
   "products": [
     {
       "planId": "ba3e50f1-5cb6-4af7-81e7-f6559d3f8d23",
       "period": {
         "duration": 1,
         "unit": "MONTHS"
       },
       "resources": [
         {
           "resourceId": "db84733f-ba3f-4726-8b4c-46d532d3e9b8",
           "amount": 9
         }
       ]
     }
   ],
   "type": "SALES",
   "dealPrices": [
     {
       "freezePrices": false,
       "period": {
         "duration": 1,
         "unit": "MONTHS"
       },
       "agreements": [
         {
           "buyer": {
             "id": "a5ccce1a-329c-474f-8c35-685324c473ec"
           },
           "price": {
             "resources": [
               {
                 "resource": {
                   "id": "db84733f-ba3f-4726-8b4c-46d532d3e9b8"
                 },
                 "recurring": {
                   "code": "USD",
                   "value": 5
                 }
               }
             ]
           }
         },
         {
           "buyer": {
             "id": "aca321f2-2fa7-41f3-a4f5-0642d4a85d9a"
           },
           "price": {
             "resources": [
               {
                 "resource": {
                   "id": "db84733f-ba3f-4726-8b4c-46d532d3e9b8"
                 },
                 "recurring": {
                   "code": "USD",
                   "value": 10
                 }
               }
             ]
           },
           "seller": {
             "id": "a5ccce1a-329c-474f-8c35-685324c473ec"
           }
         },
         {
           "buyer": {
             "id": "baeb89e0-b6bc-400a-bb08-f7367f43c9e2"
           },
           "discounts": [
             {
               "applicableTo": [
                 "RENEWAL"
               ],
               "resources": [
                 {
                   "resource": {
                     "id": "db84733f-ba3f-4726-8b4c-46d532d3e9b8"
                   },
                   "recurring": {
                     "tiers": [
                       {
                         "lowerLimit": 5,
                         "value": 14.4
                       },
                       {
                         "lowerLimit": 10,
                         "value": 14.3
                       }
                     ],
                     "code": "USD",
                     "type": "VOLUME_RESOURCE_AGGREGATED",
                     "value": 14.5
                   }
                 }
               ]
             }
           ],
           "seller": {
             "id": "aca321f2-2fa7-41f3-a4f5-0642d4a85d9a"
           }
         }
       ],
       "plan": {
         "id": "ba3e50f1-5cb6-4af7-81e7-f6559d3f8d23"
       }
     }
   ],
   "accountId": "baeb89e0-b6bc-400a-bb08-f7367f43c9e2"
 }

Setting Special Price as a Discount Percent for the Original Price

In the following example, an external system sends an estimation request on behalf of the provider for a sales order containing special prices for a reseller’s customer specified as a discount percent for the original price:

POST /aps/2/services/order-manager/orders/estimate

 {
     "type": "SALES",
     "accountId": "02c233f2-a209-47cd-8859-e3e1e585d575",
     "products": [
         {
             "period": {
                 "duration": 1,
                 "unit": "MONTHS"
             },
             "planId": "dfce9099-f5df-4d06-bc2c-fff7dc896682",
             "resources": [
                 {
                     "amount": 5,
                     "resourceId": "27253ead-8af2-4e14-a8d6-61cef535baa6"
                 }
             ]
         }
     ],
     "specialPricing": {
         "applicableTo": [
             "SALES",
             "RENEWAL",
             "SWITCH_PLAN"
         ],
         "products": [
             {
                 "period": {
                     "duration": 1,
                     "unit": "MONTHS"
                 },
                 "planId": "dfce9099-f5df-4d06-bc2c-fff7dc896682",
                 "prices": {
                 },
                 "resources": [
                     {
                         "prices": {
                             "setupDiscountPercent": 20
                         },
                         "resourceId": "27253ead-8af2-4e14-a8d6-61cef535baa6"
                     }
                 ]
             }
         ]
     }
 }

Note

This can only be done using the specialPricing structure and cannot be used for dealPrices.

Set Special Prices in a Change Order

In the following example, an external system sends an estimation request on behalf of the provider for a change order containing special prices:

POST /aps/2/services/order-manager/orders/estimate

 {
     "type": "CHANGE",
     "subscriptionId": "1a5acf0b-fcff-4843-8fd1-42d544174e79",
     "dealPrices": [
         {
             "agreements": [
                 {
                     "buyer": {
                         "id": "e1dc1e4e-c19a-4ba8-8663-5244b1fc695a"
                     },
                     "price": {
                         "resources": [
                             {
                                 "recurring": {
                                     "code": "USD",
                                     "value": 20.0
                                 },
                                 "resource": {
                                     "id": "8c11aa6f-01ff-49c5-9f64-45b3a1c21ea8"
                                 }
                             },
                             {
                                 "recurring": {
                                     "code": "USD",
                                     "value": 25.0
                                 },
                                 "resource": {
                                     "id": "0a845f3b-b065-4eb4-ad89-e4d556967290"
                                 }
                             }
                         ]
                     }
                 },
                 {
                     "buyer": {
                         "id": "f5a40c91-0d4b-4057-aa4b-a45d9ddcd52b"
                     },
                     "price": {
                         "resources": [
                             {
                                 "recurring": {
                                     "code": "USD",
                                     "value": 20.1
                                 },
                                 "resource": {
                                     "id": "8c11aa6f-01ff-49c5-9f64-45b3a1c21ea8"
                                 }
                             },
                             {
                                 "recurring": {
                                     "code": "USD",
                                     "value": 25.1
                                 },
                                 "resource": {
                                     "id": "0a845f3b-b065-4eb4-ad89-e4d556967290"
                                 }
                             }
                         ]
                     },
                     "seller": {
                         "id": "e1dc1e4e-c19a-4ba8-8663-5244b1fc695a"
                     }
                 },
                 {
                     "buyer": {
                         "id": "4522a118-a873-4101-b503-2bdc469a2215"
                     },
                     "discounts": [
                         {
                             "applicableTo": [
                                 "SALES",
                                 "RENEWAL",
                                 "SWITCH_PLAN"
                             ],
                             "resources": [
                                 {
                                     "recurring": {
                                         "code": "USD",
                                         "tiers": [
                                             {
                                                 "lowerLimit": 5,
                                                 "value": 7.0
                                             },
                                             {
                                                 "lowerLimit": 10,
                                                 "value": 5.0
                                             }
                                         ],
                                         "type": "VOLUME_RESOURCE_AGGREGATED",
                                         "value": 20.3
                                     },
                                     "resource": {
                                         "id": "8c11aa6f-01ff-49c5-9f64-45b3a1c21ea8"
                                     }
                                 },
                                 {
                                     "recurring": {
                                         "code": "USD",
                                         "value": 25.3
                                     },
                                     "resource": {
                                         "id": "0a845f3b-b065-4eb4-ad89-e4d556967290"
                                     }
                                 }
                             ]
                         }
                     ],
                     "seller": {
                         "id": "f5a40c91-0d4b-4057-aa4b-a45d9ddcd52b"
                     }
                 }
             ],
             "freezePrices": false,
             "period": {
                 "duration": 1,
                 "unit": "MONTHS"
             },
             "plan": {
                 "id": "368aaf32-5213-43b5-adfa-5b03dec09282"
             }
         }
     ],
     "period": {
         "duration": 1,
         "unit": "MONTHS"
     },
     "resources": [
         {
             "amount": 7,
             "resourceId": "8c11aa6f-01ff-49c5-9f64-45b3a1c21ea8"
         },
         {
             "amount": 7,
             "resourceId": "0a845f3b-b065-4eb4-ad89-e4d556967290"
         }
     ]
 }

Specify Provider Costs

When the provider has an agreement with a service vendor on a discount for a certain service, the agreed price can be registered in the platform by adding the providerCosts structure to a sales orders request. A typical scenario looks as follows:

  • A resale chain consists of: Service Vendor > Provider > L1 Reseller (operating unit) > L2 Reseller > Customer.

  • The provider and the service vendor agree on a product special price, which we call providerCosts.

  • The provider resells the product with a discount, for example, using specialPricing through resale channels.

  • The provider uses UX1 with the L1 reseller credentials to find the provider cost in the respective subscriptions where it was applied.

  • The provider uses the L1 reseller credentials to find the provider costs in RDE reports requested through API. Refer to Reporting and Data Export for examples on using RDE by resellers.

Note

To use this structure, the following prerequisites must be met:

  1. The Rating Engine extension must be installed.

2. The privilege Application Order Management: Allow to place orders with spot provider costs must be enabled for the user authenticated in the corresponding API call. For security configuration, open the OSS provider control panel, navigate to System > Settings, and then follow the Security link.

  1. A service plan to be purchased must contain resource rates with a configured MPN (Manufacturer Product Number).

4. The price must be set only for resource rates and contain only one component for each resource; this is usually a recurring fee.

In combination with special prices, a request with providerCosts looks as follows:

POST /aps/2/services/order-manager/orders

{
  "type": "SALES",
  "accountId": "00b60056-8b0a-4981-8ca4-d114346cd652",
  "promoCode": "123",
  "products": [
    {
      "planId": "6b64da9a-f8e6-4cbd-8aef-de304a27b627",
      "period": {
        "unit": "MONTHS",
        "duration": 1
      },
      "resources": [
        {
          "resourceId": "2f8905f8-4302-49d7-ab7f-65c9036addf0",
          "amount": 20
        }
      ]
    }
  ],
  "dealPrice": [
    {
      "plan": {
        "id": "6b64da9a-f8e6-4cbd-8aef-de304a27b627",
        "internalId": 1000024
      },
      "period": {
        "unit": "MONTHS",
        "duration": 1
      },
      "freeze_price": "no",
      "agreements": [
        {
          "seller": {
            "id": "5e4d79cf-ef84-43b7-8ef3-8fa0d23aba18",
            "internalId": 1000005
          },
          "buyer": {
            "id": "97da6107-e48f-4aec-918c-be6a6bbc5918",
            "internalId": 1000031
          },
          "discounts": {
            "applicableTo": [
              "SALES",
              "RENEWAL",
              "SWITCH_PLAN",
            ],
            "resources": [
              {
                "resource": {
                  "id": "aps_uuid",
                  "internalId": 23
                },
                "setup": {
                  "currency": "USD",
                  "value": 0
                },
                "recurring": {
                  "currency": "USD",
                  "value": 9
                },
              }
            ]
          }
        },
        {
          "buyer": {
            "id": "97da6107-e48f-4aec-918c-be6a6bbc5918",
            "internalId": 1000003
          },
          "discounts": {
            "applicableTo": [
              "SALES"
            ],
            "resources": [
              {
                "resource": {
                  "id": "aps_uuid",
                  "internalId": 23
                },
                "recurring": {
                  "currency": "USD",
                  "value": 7
                }
              }
            ]
          }
        }
      ]
    }
  ]
}

The response contains the ID of the created order. When completed, this order sets the following costs and prices:

  • The vendor price, which is the provider cost, is $7.0.

  • The provider price, which is the reseller (L2) cost, is $8.0.

  • The reseller price for the customer is $9.0.

There is a limitation on using the providerCosts structure in the API.

Ordering Service Plans with Required Terms and Conditions

When a service plan or resource rates in it require customers to accept terms and conditions, an order for this plan will be in the IN_PROGRESS status and the provisioning process will not start until the customer accepts those terms and conditions.

In BSS, Terms and Conditions are special objects:

../../../../../_images/orders-tnc-config.png

Depending on the Acceptance property, the Terms and Conditions are required for sales orders (if the acceptance is for the first purchase) or for any orders (if the acceptance is for every purchase).

Terms and Conditions are bound to service plans where they are required:

../../../../../_images/orders-tnc-plans.png

When you place an order, the response will be the same as demonstrated earlier, but the order status will be IN_PROGRESS as in the following example:

{
  "orderId": "611ea03e-cff7-4020-9b60-add9bde9a37f",
  "internalId": 1000007,
  "orderNumber": "SO000002",
  "type": "SO",
  "total": {
    "value": 0.0,
    "code": "USD"
  },
  "taxTotal": {
    "value": 0.0,
    "code": "USD"
  },
  "exclusiveTaxTotal": {
    "value": 0.0,
    "code": "USD"
  },
  "subTotal": {
    "value": 0.0,
    "code": "USD"
  },
  "status": "IN_PROGRESS",
  "subscriptions": [],
  "bssSubscriptions": [
    "25e0af34-d91b-4d42-bafa-0a7bae0af919"
  ],
  "paymentStatus": "REQUIRED",
  "provisioningStatus": "NOT_STARTED",
  "ofStatus": "TA",
  "isEstimated": true,
  "sellerId": "2a78fb85-8027-401c-896e-8e733d92c532",
  "sellerInternalId": 1,
  "buyerId": "598a0e22-a70a-4a6c-9dcc-9313af635108",
  "buyerInternalId": 1000003,
  "orderDate": "2020-07-14",
  "expirationDate": "2020-07-17",
  "creationTime": "2020-07-14T09:37:40Z",
  "orderAttributes": [],
  "endCustomerAttributes": [],
  "details": [],
  "orderItems": [
    {
      "orderItemId": 5,
      "type": "CREATE",
      "bssSubscriptionId": "25e0af34-d91b-4d42-bafa-0a7bae0af919",
      "bssSubscriptionInternalId": 1000005,
      "resources": []
    }
  ],
  "endCustomerName": "John Smith",
  "endCustomerType": "CLIENT",
  "relatedOrders": [],
  "description": "Order for the \"SP1\" Plan for 1 Year(s). "
}

In the BSS control panel, the order looks as follows:

../../../../../_images/orders-wait-acceptance.png

Co-terming Subscriptions

Subscription’s expiration date can be co-termed with the expiration date of another subscription, when placing a sales or a change order.

Co-terming a New Subscription to an Existing Subscription

To align expiration date of a purchased subscription with another subscription’s, place a sales order similar to this one:

POST /aps/2/services/order-manager/orders

 {
     "type": "SALES",
     "accountId": "9e8c8d70-4d32-49ab-bd76-bd4ada7ea393",
     "products": [
         {
             "alignExpirationDate": {
                 "alignmentType": "CO_TERM_ON_SUBSCRIPTION",
                 "subscriptionId": "feca58f4-8545-4338-813a-397357e58d2a"
             },
             "period": {
                 "duration": 1,
                 "unit": "YEARS"
             },
             "planId": "fb22c741-7723-4681-a066-a0a689644d9f",
             "resources": [
                 {
                     "amount": 3,
                     "resourceId": "a821566c-31b6-405f-8fd0-2911fb2a9e5b"
                 }
             ]
         }
     ]
 }

Co-terming a New Subscription to Calendar Month End

To align expiration date of a purchased subscription with the calendar month end, place a sales order similar to this one:

POST /aps/2/services/order-manager/orders

 {
     "type": "SALES",
     "accountId": "8118f74d-4e15-477c-8b5e-5aadea85f97f",
     "products": [
         {
             "alignExpirationDate": {
                 "alignmentType": "MATCH_END_OF_CALENDAR_MONTH"
             },
             "period": {
                 "duration": 1,
                 "unit": "YEARS"
             },
             "planId": "070d114e-7468-4f27-8c79-69b1bbc2619c",
             "resources": [
                 {
                     "amount": 3,
                     "resourceId": "6cb64eae-3534-4683-9227-599a17747579"
                 }
             ]
         }
     ]
 }

Co-terming an Existing Subscription on Renewal

To align expiration date of an existing subscription with another subscription’s, place a change order similar to this one:

POST /aps/2/services/order-manager/orders

 {
     "type": "CHANGE",
     "subscriptionId": "6292db73-c14f-4c76-a6ef-11dde5313b18",
     "planId": "606ef80c-0368-482d-988d-114115138114",
     "alignExpirationDate": {
         "alignmentType": "CO_TERM_ON_SUBSCRIPTION",
         "subscriptionId": "feca58f4-8545-4338-813a-397357e58d2a"
     },
     "period": {
         "duration": 1,
         "unit": "MONTHS"
     },

     "resources": [
         {
             "amount": 3.0,
             "resourceId": "8325bbb6-ff51-4f14-8e5b-f11d9bb0fb5b"
         }
     ],
     "schedule": {
         "type": "RENEWAL"
     }
 }

Keeping Resource Amount When Switching to Plan with Different Resource

When you switch a subscription to another plan that has a different resource, the amount between the old and new resource can be transferred after the switch. This can be done using a request similar to the following:

POST /aps/2/services/order-manager/orders

 {
     "type": "CHANGE",
     "subscriptionId": "cd7c13f8-f6af-46b8-9c55-70aae8929abb",
     "period": {
         "duration": 1,
         "unit": "MONTHS"
     },
     "planId": "00296f3a-1ac9-446b-8e5f-e58b3cee90b1",
     "resources": [
         {
             "amount": 10.0,
             "targetResourceId": "7b6790b2-f061-489b-9525-43857bd16f21"
         }
     ]
 }

Transferring Resources to Another Subscription (Partial Upgrade)

It is possible to transfer a specific amount of a resource from an existing subscription to another one by downgrading it and moving the downgraded resource amount to another subscription. This can be done using a request similar to the following:

POST /aps/2/services/order-manager/orders

 {
     "type": "CHANGE",
     "period": {
         "duration": 1,
         "unit": "YEARS"
     },
     "placementType": "MOVE",
     "planId": "b92157fd-a0f6-4f85-976d-a60a4d6814ea",
     "resources": [
         {
             "amount": 3,
             "sourceResourceId": "b4b1fa22-9624-4437-9d39-924aaa75937a",
             "targetResourceId": "1a9c5755-989c-4af9-a803-e808ca1a55f5"
         }
     ],
     "subscriptionId": "1d922ccc-8cfd-4aaa-860a-06b372704a33",
     "targetSubscriptionId": "622e0201-7855-4790-bc57-85ced6442a58"
 }

Getting Order Metrics

It is possible to get statistics on the orders that exist in the system that you can use for analysis or troubleshooting. To place this request, you need to identify order management application identifier, which you can get as shown below:

GET /aps/2/services/order-manager

You will get a response similar to the following:

HTTP/1.1 200 OK

  {
      "aps": {
          "schema": "/aps/2/types/240",
          "package": {
              "id": "76cf42bf-839d-49a1-9325-98a1008ea6ea",
              "href": "/aps/2/packages/76cf42bf-839d-49a1-9325-98a1008ea6ea"
          },
          "modified": "2023-08-24T09:19:37Z",
          "id": "414fba59-8c39-462b-a0ec-67cbd36a20f6",
          "type": "http://www.odin.com/billing/order-management/1.22",
          "status": "aps:ready",
          "revision": 9
      }
  }

Use the id value from the response in a request to get order statistics, which should be similar to the following:

POST /aps/2/resources/414fba59-8c39-462b-a0ec-67cbd36a20f6/business-metrics

A response similar to the following will be displayed:

HTTP/1.1 200 OK

  {
      "content": {
          "totalOrderCount": 1783,
          "ordersByType": [
              {
                  "type": "RN",
                  "count": 6,
                  "inLastYearCount": 6
              },
              {
                  "type": "CF",
                  "count": 3,
                  "inLastYearCount": 3
              },
              {
                  "type": "ZB",
                  "count": 1348,
                  "inLastYearCount": 1348
              },
              {
                  "type": "SO",
                  "count": 116,
                  "inLastYearCount": 116
              },
              {
                  "type": "CH",
                  "count": 25,
                  "inLastYearCount": 25,
                  "actionTypes": {
                      "switchPlanPeriod": 8,
                      "upsizeDownsize": 14,
                      "corrections": 0,
                      "partialUpgrade": 3,
                      "partialUpgradeNew": 0,
                      "partialUpgradeExisting": 3,
                      "scheduled": 1,
                      "scheduledOnBillingDate": 0,
                      "scheduledOnRenewalDate": 1
                  }
              },
              {
                  "type": "PR",
                  "count": 143,
                  "inLastYearCount": 143
              },
              {
                  "type": "PO",
                  "count": 100,
                  "inLastYearCount": 100
              },
              {
                  "type": "BO",
                  "count": 42,
                  "inLastYearCount": 42
              }
          ],
          "resourceMappingAppliedCount": 0,
          "resourceMappingNotAppliedCount": 0,
          "ordersByStatus": [
              {
                  "type": "BO",
                  "status": "CP",
                  "count": 12
              },
              {
                  "type": "BO",
                  "status": "WP",
                  "count": 30
              },
              {
                  "type": "CF",
                  "status": "CL",
                  "count": 1
              },
              {
                  "type": "CF",
                  "status": "CP",
                  "count": 2
              },
              {
                  "type": "CH",
                  "status": "CL",
                  "count": 6,
                  "actionTypes": {
                      "switchPlanPeriod": 2,
                      "upsizeDownsize": 2,
                      "corrections": 0,
                      "partialUpgrade": 2,
                      "partialUpgradeNew": 0,
                      "partialUpgradeExisting": 2,
                      "scheduled": 1,
                      "scheduledOnBillingDate": 0,
                      "scheduledOnRenewalDate": 1
                  }
              },
              {
                  "type": "CH",
                  "status": "CP",
                  "count": 4,
                  "actionTypes": {
                      "switchPlanPeriod": 0,
                      "upsizeDownsize": 4,
                      "corrections": 0,
                      "partialUpgrade": 0,
                      "partialUpgradeNew": 0,
                      "partialUpgradeExisting": 0,
                      "scheduled": 0,
                      "scheduledOnBillingDate": 0,
                      "scheduledOnRenewalDate": 0
                  }
              },
              {
                  "type": "CH",
                  "status": "PF",
                  "count": 8,
                  "actionTypes": {
                      "switchPlanPeriod": 2,
                      "upsizeDownsize": 5,
                      "corrections": 0,
                      "partialUpgrade": 1,
                      "partialUpgradeNew": 0,
                      "partialUpgradeExisting": 1,
                      "scheduled": 0,
                      "scheduledOnBillingDate": 0,
                      "scheduledOnRenewalDate": 0
                  }
              },
              {
                  "type": "CH",
                  "status": "VF",
                  "count": 7,
                  "actionTypes": {
                      "switchPlanPeriod": 4,
                      "upsizeDownsize": 3,
                      "corrections": 0,
                      "partialUpgrade": 0,
                      "partialUpgradeNew": 0,
                      "partialUpgradeExisting": 0,
                      "scheduled": 0,
                      "scheduledOnBillingDate": 0,
                      "scheduledOnRenewalDate": 0
                  }
              },
              {
                  "type": "PO",
                  "status": "CC",
                  "count": 8
              },
              {
                  "type": "PO",
                  "status": "CP",
                  "count": 81
              },
              {
                  "type": "PO",
                  "status": "WP",
                  "count": 11
              },
              {
                  "type": "PR",
                  "status": "CL",
                  "count": 10
              },
              {
                  "type": "PR",
                  "status": "CP",
                  "count": 101
              },
              {
                  "type": "PR",
                  "status": "LO",
                  "count": 2
              },
              {
                  "type": "PR",
                  "status": "PF",
                  "count": 23
              },
              {
                  "type": "PR",
                  "status": "VF",
                  "count": 7
              },
              {
                  "type": "RN",
                  "status": "CP",
                  "count": 6
              },
              {
                  "type": "SO",
                  "status": "CL",
                  "count": 8
              },
              {
                  "type": "SO",
                  "status": "CP",
                  "count": 84
              },
              {
                  "type": "SO",
                  "status": "LO",
                  "count": 2
              },
              {
                  "type": "SO",
                  "status": "PF",
                  "count": 15
              },
              {
                  "type": "SO",
                  "status": "WP",
                  "count": 6
              },
              {
                  "type": "SO",
                  "status": "WZ",
                  "count": 1
              },
              {
                  "type": "ZB",
                  "status": "CP",
                  "count": 1348
              }
          ],
          "cancellationOrders": {
              "totalNonChargeOrders": 0,
              "nonChargeOrdersInLastYear": 0,
              "totalChargeOrders": 3,
              "chargeOrdersInLastYear": 3
          },
          "autoRenewSwitch": {
              "createdOrdersCount": 0,
              "creationFailedOrdersCount": 0
          },
          "orderCountBySystem": [
              {
                  "type": "BO",
                  "system": "SCHEDULER",
                  "orderCount": 42
              },
              {
                  "type": "CF",
                  "system": "UX1",
                  "orderCount": 3
              },
              {
                  "type": "CH",
                  "system": "UX1",
                  "orderCount": 25
              },
              {
                  "type": "PO",
                  "orderCount": 100
              },
              {
                  "type": "PR",
                  "orderCount": 143
              },
              {
                  "type": "RN",
                  "system": "CP",
                  "orderCount": 2
              },
              {
                  "type": "RN",
                  "system": "SCHEDULER",
                  "orderCount": 2
              },
              {
                  "type": "RN",
                  "system": "UX1",
                  "orderCount": 2
              },
              {
                  "type": "SO",
                  "system": "CP",
                  "orderCount": 6
              },
              {
                  "type": "SO",
                  "system": "UX1",
                  "orderCount": 78
              },
              {
                  "type": "SO",
                  "orderCount": 32
              },
              {
                  "type": "ZB",
                  "system": "SCHEDULER",
                  "orderCount": 1348
              }
          ],
          "impersonatedOrderCount": [
              {
                  "type": "CF",
                  "count": 3
              },
              {
                  "type": "CH",
                  "count": 22
              },
              {
                  "type": "RN",
                  "count": 2
              },
              {
                  "type": "SO",
                  "count": 71
              }
          ]
      },
      "version": "1.1.0"
  }

Placing a Cancellation Order Ignoring Cancellation and Refund Policies

You can place a cancellation order so that cancellation and refund policies are ignored. This can be useful, for example, when a subscription is migrated. Below is the example of a request that places such an order:

POST /aps/2/services/order-manager/orders

 {
     "type": "CANCELLATION",
     "processingMode": "MIGRATION",
     "subscriptionId": "158cf651-ceb9-44b2-9e0a-1c082147f1ae"
 }

If you want the policies to be ignored, you need to specify "processingMode": "MIGRATION". If not specified, the policies will be applied.

Note

To be able to place such an order, the user placing the order must have the Application Order Management: Allow to use migration processing mode OSS privilege assigned.

Limitations

Parameters

You can use the parameters properties only when placing sales orders. No other order types accept them.

Special Pricing

  • Special pricing only works when placing or estimating sales orders. It does not work with other order types.

  • If special pricing is used in a request, it must contain the applicableTo property (even if it is an empty array).

  • The order management API does not accept an empty specialPricing structure. If you are not going to use special prices, do not pass an empty specialPricing structure.

Special pricing functions similar to promotions, which is why its applicableTo property is a list of order types similar to the one used in a promotion. For API calls, among the possible list of values (SALES, RENEWAL, and CHANGE), the only one that affects the final prices is RENEWAL. This works as follows:

  • Special prices are valid for the first subscription period (until the subscription is renewed automatically or manually) regardless of the applicableTo value. The latter can be an empty array.

  • When RENEWAL is specified in the the applicableTo array, the special prices are valid for all subscription periods.

For a sales order estimation, use the empty applicableTo array, as this operation estimates only the first subscription period.

Provider Costs

Provider costs only work when placing or estimating sales orders. It does not work with other order types.