Skip to content

Promotions and Discounts for Payment Integrators

This document focuses on the endpoints that needs to be called in the Pricing Service (PRS) to check for a promotions and discounts or enlist to one using a Promo Code. All endpoints documented are subject to change.

Search for Promotions and Discounts

Get all Promotions and Discounts according to search criteria

This request is used to get all Promotions and Discounts according to search criteria, with paging and filtering.

POST https://stage.pricing-service.dev.aex.systems/promotions/search

file_type_swagger GetPromoList

The payload can be modified as required to make the search more stringent or leanient, omitting properties that is not required to filter on. Note that enlistment will only happen on Promotions and Discounts that are in Active status.

A typical example of the payload is as follows:

Payload
{
  "collector_ids": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "promo_discount_status_ids": [
    0
  ],
  "promo_area_ids": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "promo_product_ids": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "promo_discount_date_range_start": {
    "selected": true,
    "filter_data_type_ui": "ActivationDate",
    "date_range_operator": "Before",
    "date_range_operator_id": 0,
    "date_start": "2025-01-27T08:43:41.317Z",
    "date_end": "2025-01-27T08:43:41.317Z",
    "display_filter_data_type": "string",
    "display_date_range_operator": "string"
  },
  "start_date": "2025-01-27T08:43:41.317Z",
  "end_date": "2025-01-27T08:43:41.317Z",
  "promo_period_length": 0,
  "promo_code": "123456",
  "service_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "page_number": 1,
  "page_size": 20
}

The response is as follows:

Example Response
{
  "items": [
    {
      "id": "49173726-6a04-4faf-8164-921078f992c7",
      "collector_id": "271be0cd-09cf-4472-8fdc-7e7cc0baa8c3",
      "promo_discount_type_id": 1,
      "promo_category_id": 16,
      "eligibility_filter_id": "c55189d2-6f8f-4338-ad6f-c081fa4d8938",
      "name": "Deleted - Test Promo Complex Filter ",
      "description": "This is Test Promo ",
      "line_item_message": "Promotional Discount",
      "promo_discount_status_id": 4,
      "published_date": null,
      "auto_enlist": true,
      "promo_code": "478855DE - 5B24YM",
      "gl_code": "74D78",
      "goal_or_marketing_message": "Promotional Discount",
      "start_date": "2025-01-17",
      "end_date": "2025-01-30",
      "service_usage_count": 0,
      "price_type_id": 2,
      "waive_activation_pro_rata": true,
      "adjustment_type_id": 3,
      "adjustment_value": 15,
      "period_length": 6,
      "category_query_type_id": 3,
      "collector_name": "HyperFiber Network",
      "status": "Deleted",
      "promo_discount_type_name": "Promotion",
      "promo_category_name": "Promotion - Set no of Months",
      "eligibility_filter_name": null,
      "price_type_name": "Monthly",
      "adjustment_type_name": "Percentage",
      "promo_status_class": null
    },
    {
      "id": "a030f438-3be6-4ac2-b8c4-03624e46479d",
      "collector_id": "271be0cd-09cf-4472-8fdc-7e7cc0baa8c3",
      "promo_discount_type_id": 2,
      "promo_category_id": 9,
      "eligibility_filter_id": "30c49d41-d344-45b2-8011-18db5cfa8fa4",
      "name": "Test Discount with Date Range",
      "description": "Negative date",
      "line_item_message": "Historic Discount",
      "promo_discount_status_id": 1,
      "published_date": "2025-01-27",
      "auto_enlist": true,
      "promo_code": "",
      "gl_code": "",
      "goal_or_marketing_message": "Historic Discount",
      "start_date": "2024-10-31",
      "end_date": "2024-11-30",
      "service_usage_count": 0,
      "price_type_id": 2,
      "waive_activation_pro_rata": false,
      "adjustment_type_id": 3,
      "adjustment_value": 10,
      "period_length": 0,
      "category_query_type_id": 1,
      "collector_name": "HyperFiber Network",
      "status": "Active",
      "promo_discount_type_name": "Discount",
      "promo_category_name": "Historic Discount",
      "eligibility_filter_name": null,
      "price_type_name": "Monthly",
      "adjustment_type_name": "Percentage",
      "promo_status_class": null
    }
  ],
  "page": 1,
  "count": 2,
  "total": 2
}

Important information and definitions regarding search criteria

Promotion/Discount start and end dates define the period when enlistment can happen, even if the promotion or discount will be applied to a future purchase.

Promotion/Discount publish date refers to when the Promotion/Discount was made active.

To filter on the Promotion/Discount status, use the following values: Active = 1, PublishedFutureDated = 2, Draft = 3, Deleted = 4, Expired = 5

PromoReductionTypeIds: Promotion = 1, Discount = 2

PromoServiceStatusIds: NotSet = 0, ExpressionOfInterest = 1, Active = 2, PendingIspApplication = 3, PendingInstallation = 4, PendingIspActivation = 5, ActivationInProgress = 6, Expiring = 7, Expired = 8, CancellationInProgress = 9, Cancelled = 10, IspChanged = 11, IspChangePending = 12, ProductChanged = 13, ProductChangePending = 14, Rejected = 15, Suspended = 16, Deleted = 17

PromoBillingStatusIds: UpToDate = 0, InArrears = 1, NotApplicable = 2

PageNumber and PageSize are used for paging, with PageSize being the number of items to return per page.

Enlist in a Promotion or Discount

When a service is eligible to takepart in a Promotion or Discount, it must enlist to it before its benefit will be applied to its pricing. Enlistment will happen in two ways, dependent on how the Promotion or Discount is setup: 1. Auto Enlistment: The Promotion or Discount is setup to automatically enlist all services that are eligible. 2. Enlistment by PromoCode: The Promotion or Discount is setup to require a Promo Code to be entered before the service can enlist.

This endpoint will enlist the service to the Promotion or Discount by providing the ServiceId and PromoCode. Response will contain the Service object and the Promo Discount object.

POST https://stage.pricing-service.dev.aex.systems/promotions/enlist-by-promo-code

file_type_swagger EnlistPromoByPromoCode

A typical example of the payload is as follows:

Payload
1
2
3
4
5
{
  "collector_id": "271be0cd-09cf-4472-8fdc-7e7cc0baa8c3",
  "service_id": "2a7a29ca-b0cb-471b-80b5-5c703edebbd9",
  "promo_code": "123456"
}

The response is as follows:

Example Response
{
  "service": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "collector_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "product_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "area_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "last_known_status_id": 0,
    "application_date": "2025-01-27T12:35:19.194Z",
    "effective_date": "2025-01-27T12:35:19.194Z",
    "cancellation_date": "2025-01-27T12:35:19.194Z",
    "in_arrears": true,
    "period_end_date": "2025-01-27T12:35:19.194Z",
    "suspension_date": "2025-01-27T12:35:19.194Z"
  },
  "promo_discount": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "collector_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "promo_discount_type_id": 0,
    "promotion_discount_category_id": 0,
    "name": "string",
    "description": "string",
    "line_item_message": "string",
    "promo_discount_status_id": 0,
    "published_date": "string",
    "auto_enlist": true,
    "promo_code": "string",
    "gl_code": "string",
    "goal_or_marketing_message": "string",
    "start_date": "string",
    "end_date": "string",
    "promo_does_not_expire": true,
    "benefit_count": 0,
    "price_type_id": 0,
    "waive_activation_pro_rata": true,
    "adjustment_type_id": 0,
    "value": 0,
    "raw_json_binary": "string",
    "eligibility_filter_service": [
      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    ],
    "eligibility_filter_area": [
      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    ],
    "eligibility_filter_product": [
      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    ],
    "eligibility_filter_billing_status": {
      "period_end_start_date": "2025-01-27T12:35:19.194Z",
      "period_end_end_date": "2025-01-27T12:35:19.194Z",
      "period_end_date_operation_type": "Before",
      "period_end_date_operation_id": 0,
      "suspension_start_date": "2025-01-27T12:35:19.194Z",
      "suspension_end_date": "2025-01-27T12:35:19.194Z",
      "suspension_end_date_operation_type": "Before",
      "suspension_date_operation_id": 0,
      "in_arrears": true
    },
    "eligibility_filter_service_criteria": {
      "application_start_date": "2025-01-27T12:35:19.194Z",
      "application_end_date": "2025-01-27T12:35:19.194Z",
      "application_date_operation_type": "Before",
      "application_date_operation_id": 0,
      "activation_start_date": "2025-01-27T12:35:19.194Z",
      "activation_end_date": "2025-01-27T12:35:19.194Z",
      "activation_date_operation_type": "Before",
      "activation_date_operation_id": 0,
      "cancellation_start_date": "2025-01-27T12:35:19.194Z",
      "cancellation_end_date": "2025-01-27T12:35:19.194Z",
      "cancellation_date_operation_type": "Before",
      "cancellation_date_operation_id": 0
    }
  }
}

Get all Promotions and Discounts associated with a Service

This endpoint will retrieve all the Promotions and Discounts that the service enlisted to by providing the ServiceId. Response will contain a colletion of Promotions and Discounts.

GET https://stage.pricing-service.dev.aex.systems/promotions?serviceId={service_id}

file_type_swagger GetPromoDiscountDetailsByService

A typical example of the response is as follows:

Example Response
[
  {
    "promo_discount_service_id": "ba834c5c-1729-4bf1-bc38-991ba5c7558d",
    "promo_discount_id": "688f7085-a5a7-4475-a4b6-ee48e6971af0",
    "service_id": "2a7a29ca-b0cb-471b-80b5-5c703edebbd9",
    "enlistment_date": "2025-01-24T13:52:43.332733+00:00",
    "exhausted": false,
    "exhaustion_date": null,
    "applicable_months": [],
    "id": "ba834c5c-1729-4bf1-bc38-991ba5c7558d",
    "collector_id": "271be0cd-09cf-4472-8fdc-7e7cc0baa8c3",
    "promo_discount_type_id": 0,
    "promotion_discount_category_id": 0,
    "name": null,
    "description": null,
    "line_item_message": null,
    "promo_discount_status_id": 0,
    "published_date": null,
    "auto_enlist": false,
    "promo_code": null,
    "gl_code": null,
    "goal_or_marketing_message": null,
    "start_date": "0001-01-01",
    "end_date": null,
    "promo_does_not_expire": false,
    "benefit_count": null,
    "price_type_id": 0,
    "waive_activation_pro_rata": false,
    "adjustment_type_id": null,
    "value": null,
    "raw_json_binary": null,
    "eligibility_filter_service": null,
    "eligibility_filter_area": null,
    "eligibility_filter_product": null,
    "eligibility_filter_billing_status": {
      "period_end_start_date": null,
      "period_end_end_date": null,
      "period_end_date_operation_type": null,
      "period_end_date_operation_id": 0,
      "suspension_start_date": null,
      "suspension_end_date": null,
      "suspension_end_date_operation_type": null,
      "suspension_date_operation_id": 0,
      "in_arrears": null
    },
    "eligibility_filter_service_criteria": {
      "application_start_date": null,
      "application_end_date": null,
      "application_date_operation_type": null,
      "application_date_operation_id": 0,
      "activation_start_date": null,
      "activation_end_date": null,
      "activation_date_operation_type": null,
      "activation_date_operation_id": 0,
      "cancellation_start_date": null,
      "cancellation_end_date": null,
      "cancellation_date_operation_type": null,
      "cancellation_date_operation_id": 0
    }
  }
]