Get Promotions Applied to Cart

Return a list of promotions applied to a specified cart.

GET /v2/cpq/carts/{cart_ID}

Remote Method

getPromotionsAppliedToCart

REST Handlers

  • REST endpoint: APIPromotionsCartsCpqV2.cls

  • Implementation: CpqAppliedPromotionsCartsActionV2.cls

Apex Remote Service

CpqAppHandler

Apex Remote Input Map

{
  methodName:getPromotionsAppliedToCart
  cartId:80146000000iwCx,
  pagesize:10,
  fields:"Id,Name",
  includePenalties:true,
  filters:vlocity_cmt__AppliesTo__c:Account_Contract,
  commitmentDateFilter:2020-04-05T07:00:00.000Z,
  appliedPromoStatusFilter:Expired
}

Package

Communication (vlocity_cmt)

API Parameters and Response Format

For API parameter names and descriptions, see Cart-Based API Swagger Reference.

Resource Information

Response Format JSON
Resource URL /services/apexrest/{namespace}/v2/cpq/carts/{cart_ID}/promotions?subaction=getPromotionsAppliedToCart

Example Request

GET /services/apexrest/vlocity_cmt/v2/cpq/carts/801360000000oQ9/promotions

Example Response

{
  "totalSize": 1,
  "messages": [],
  "records": [
    {
      "messages": [],
      "actions": {
        "deleteappliedpromoitems": {
          "rest": {
            "params": {},
            "method": "DELETE",
            "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801f40000008UlxAAE/promotions?id=a2Lf4000000TvFmEAK"
          },
          "remote": {
            "params": {
              "id": "a2Lf4000000TvFmEAK",
              "cartId": "801f40000008UlxAAE",
              "methodName": "deleteAppliedPromoItems"
            }
          },
          "client": {
            "params": {}
          }
        },
        "getpromodetails": {
          "rest": {
            "params": {},
            "method": "GET",
            "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801f40000008UlxAAE/promotions?id=a2Lf4000000TvFmEAK&subaction=getPromotionsAppliedToCart&includePenalties=true"
          },
          "remote": {
            "params": {
              "includePenalties": true,
              "subaction": "getPromotionsAppliedToCart",
              "id": "a2Lf4000000TvFmEAK",
              "cartId": "801f40000008UlxAAE",
              "methodName": "getPromotionsAppliedToCart"
            }
          },
          "client": {
            "params": {}
          }
        }
      },
      "displaySequence": -1,
      "Id": {
        "value": "a2Lf4000000TvFmEAK",
        "previousValue": null,
        "originalValue": null,
        "messages": [],
        "label": "Record ID",
        "hidden": true,
        "fieldName": "Id",
        "editable": false,
        "dataType": "ID",
        "actions": {}
      },
      "vlocity_cmt__BillingAccountId__c": {
        "value": "001f40000093uqMAAQ",
        "previousValue": null,
        "originalValue": null,
        "messages": [],
        "label": "Account",
        "hidden": true,
        "fieldName": "vlocity_cmt__BillingAccountId__c",
        "editable": true,
        "dataType": "REFERENCE",
        "actions": {}
      },
      "vlocity_cmt__Action__c": {
        "value": "Change",
        "previousValue": null,
        "originalValue": null,
        "messages": [],
        "label": "Action",
        "hidden": true,
        "fieldName": "vlocity_cmt__Action__c",
        "editable": true,
        "dataType": "PICKLIST",
        "actions": {}
      },
      "vlocity_cmt__PromotionId__c": {
        "value": "a2ff4000000cHPMAA2",
        "previousValue": null,
        "originalValue": null,
        "messages": [],
        "label": "Promotion",
        "hidden": true,
        "fieldName": "vlocity_cmt__PromotionId__c",
        "editable": true,
        "dataType": "REFERENCE",
        "actions": {}
      },
      "vlocity_cmt__Sequence__c": {
        "value": null,
        "previousValue": null,
        "originalValue": null,
        "messages": [],
        "label": "Sequence",
        "hidden": true,
        "fieldName": "vlocity_cmt__Sequence__c",
        "editable": true,
        "dataType": "DOUBLE",
        "actions": {}
      },
      "vlocity_cmt__FulfilmentStatus__c": {
        "value": null,
        "previousValue": null,
        "originalValue": null,
        "messages": [],
        "label": "Fulfilment Status",
        "hidden": true,
        "fieldName": "vlocity_cmt__FulfilmentStatus__c",
        "editable": true,
        "dataType": "PICKLIST",
        "actions": {}
      },
      "vlocity_cmt__ReasonForCancellation__c": {
        "value": null,
        "previousValue": null,
        "originalValue": null,
        "messages": [],
        "label": "Reason for Cancellation",
        "hidden": true,
        "fieldName": "vlocity_cmt__ReasonForCancellation__c",
        "editable": true,
        "dataType": "STRING",
        "actions": {}
      },
      "vlocity_cmt__RequestDate__c": {
        "value": null,
        "previousValue": null,
        "originalValue": null,
        "messages": [],
        "label": "Request Date",
        "hidden": true,
        "fieldName": "vlocity_cmt__RequestDate__c",
        "editable": true,
        "dataType": "DATETIME",
        "actions": {}
      },
      "vlocity_cmt__SubAction__c": {
        "value": null,
        "previousValue": null,
        "originalValue": null,
        "messages": [],
        "label": "Sub Action",
        "hidden": true,
        "fieldName": "vlocity_cmt__SubAction__c",
        "editable": true,
        "dataType": "PICKLIST",
        "actions": {}
      },
      "vlocity_cmt__CommitmentStartDate__c": {
        "value": null,
        "previousValue": null,
        "originalValue": null,
        "messages": [],
        "label": "Commitment Start Date",
        "hidden": true,
        "fieldName": "vlocity_cmt__CommitmentStartDate__c",
        "editable": true,
        "dataType": "DATETIME",
        "actions": {}
      },
      "vlocity_cmt__CommitmentEndDate__c": {
        "value": null,
        "previousValue": null,
        "originalValue": null,
        "messages": [],
        "label": "Commitment End Date",
        "hidden": true,
        "fieldName": "vlocity_cmt__CommitmentEndDate__c",
        "editable": true,
        "dataType": "DATETIME",
        "actions": {}
      },
      "vlocity_cmt__PricingStartDate__c": {
        "value": null,
        "previousValue": null,
        "originalValue": null,
        "messages": [],
        "label": "Benefit Start Date",
        "hidden": true,
        "fieldName": "vlocity_cmt__PricingStartDate__c",
        "editable": true,
        "dataType": "DATETIME",
        "actions": {}
      },
      "vlocity_cmt__PricingEndDate__c": {
        "value": null,
        "previousValue": null,
        "originalValue": null,
        "messages": [],
        "label": "Benefit End Date",
        "hidden": true,
        "fieldName": "vlocity_cmt__PricingEndDate__c",
        "editable": true,
        "dataType": "DATETIME",
        "actions": {}
      },
      "vlocity_cmt__AppliesTo__c": {
        "value": null,
        "previousValue": null,
        "originalValue": null,
        "messages": [],
        "label": "Applies To",
        "hidden": true,
        "fieldName": "vlocity_cmt__AppliesTo__c",
        "editable": true,
        "dataType": "PICKLIST",
        "actions": {}
      },
      "Name": "BundleJul19Promo",
      "Description": "BundleJul19Promo",
      "OrderRequestDate": "2019-11-13"
    }
  ]
}