# developer Consumer Goods Cloud Integration Service API (industries-core) - Full Documentation # Get Started with Integration Service API Explore API endpoints to access Consumer Goods Cloud Trade Promotion Management (TPM) features and run it as a transactional system. ## Health Check Check the API version of Consumer Goods Cloud Trade Promotion Management (TPM). - [Return the current API version](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Return%2Bthe%2Bcurrent%2BAPI%2Bversion) ## Manage Explicit Transactions Manage explicit transactions for multi-message operations. - [Register a transaction ID](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Register%2Ba%2Btransaction%2BID) - [Get a List of Transactions for a Time Period](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Register%2Ba%2Btransaction%2BID) - [Delete a transaction including messages](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Ba%2Btransaction%2Bincluding%2Bmessages) - [Register a transaction ID to handle volumes promotion](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Register%2Ba%2Btransaction%2BID%2Bto%2Bhandle%2Bvolumes%2Bpromotion) ## Manage Templates for Measures Manage templates for measures including volumes, actuals, prices, or discounts. - [Configure condition measures](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Configure%2Bcondition%2Bmeasures) - [Get a list of configured measure templates](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Ba%2Blist%2Bof%2Bconfigured%2Bmeasure%2Btemplates) - [Get a list of configured volume measure templates](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Ba%2Blist%2Bof%2Bconfigured%2Bvolume%2Bmeasure%2Btemplates) - [Configure volume measures (Weekly or Daily)](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Configure%2Bvolume%2Bmeasures%2B(Weekly%2Bor%2BDaily)) ## Send, Retrieve, or Delete Volumes or Baselines Manage volumes and promotion or tactic data. - [Send volumes of type integer by date on weekly basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2Bvolumes%2Bof%2Btype%2Binteger%2Bby%2Bdate%2Bon%2Ba%2Bweekly%2Bbasis) - [Send volumes of type integer by date on daily basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2Bvolumes%2Bof%2Btype%2Binteger%2Bby%2Bdate%2Bon%2Ba%2Bdaily%2Bbasis) - [Send volumes of type integer by week on a weekly basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2Bvolumes%2Bof%2Btype%2Binteger%2Bby%2Bweek%2Bon%2Ba%2Bweekly%2Bbasis) - [Send volumes of type decimal on a weekly basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2Bvolumes%2Bof%2Btype%2Bdecimal%2Bon%2Ba%2Bweekly%2Bbasis) - [Send volumes of type decimal on a weekly basis with start date](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2Bvolumes%2Bof%2Btype%2Bdecimal%2Bon%2Ba%2Bweekly%2Bbasis%2Bwith%2Bstart%2Bdate) - [Send volumes of type decimal on a weekly basis with year and week](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2Bvolumes%2Bof%2Btype%2Bdecimal%2Bon%2Ba%2Bweekly%2Bbasis%2Bwith%2Byear%2Band%2Bweek) - [Get volumes on weekly basis for a specified date](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bvolumes%2Bon%2Ba%2Bweekly%2Bbasis%2Bfor%2Ba%2Bspecified%2Bdate) - [Get volumes for a specified Date](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bvolumes%2Bfor%2Ba%2Bspecified%2BDate) - [Get volumes for a week of the year](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bvolumes%2Bfor%2Ba%2Bweek%2Bof%2Bthe%2Byear) - [Delete volumes of type integer for a year ending before the specified date](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Bvolumes%2Bof%2Btype%2Binteger%2Bfor%2Byears%2Bending%2Bbefore%2Bthe%2Bspecified%2Bdate) - [Delete volumes of type decimal for a year ending before the specified date](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Bvolumes%2Bof%2Btype%2Bdecimal%2Bfor%2Byears%2Bending%2Bbefore%2Bthe%2Bspecified%2Bdate) - [Delete volumes of type decimal on weekly basis that span the given time range](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Bvolumes%2Bof%2Btype%2Bdecimal%2Bon%2Ba%2Bweekly%2Bbasis%2Bthat%2Bspan%2Bthe%2Bgiven%2Btime%2Brange) - [Delete volumes of type integer on weekly basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Bvolumes%2Bof%2Btype%2Binteger%2Bon%2Ba%2Bweekly%2Bbasis) - [Delete volume information before one month of the specified date](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Bvolume%2Binformation%2Bbefore%2Bone%2Bmonth%2Bof%2Bthe%2Bspecified%2Bdate) - [Delete volumes of type decimal older than the specified date](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Bvolumes%2Bof%2Btype%2Bdecimal%2Bolder%2Bthan%2Bthe%2Bspecified%2Bdate) - [Delete volumes of type decimal on daily basis that span the given time range](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis/v55.0?meta=Delete%2Bvolumes%2Bof%2Btype%2Bdecimal%2Bon%2Bdaily%2Bbasis%2Bthat%2Bspan%2Bthe%2Bgiven%2Btime%2Brange) - [Delete volumes of type integer on daily basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Bvolumes%2Bof%2Btype%2Binteger%2Bon%2Ba%2Bdaily%2Bbasis) - [Send Promotion or Tactic Specific Actuals (volumes) on weekly level with type decimal values for a registered transaction](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2BPromotion%2Bor%2BTactic%2BSpecific%2BActuals%2B(volumes)%2Bon%2Bweekly%2Blevel%2Bwith%2Btype%2Bdecimal%2Bvalues%2Bfor%2Ba%2Bregistered%2Btransaction) - [Get Promotion or Tactic Specific Actuals (volumes) on a weekly basis for a specified date](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2BPromotion%2Bor%2BTactic%2BSpecific%2BActuals%2B(volumes)%2Bon%2Ba%2Bweekly%2Bbasis%2Bfor%2Ba%2Bspecified%2Bdate) - [Get Promotion or Tactic Specific Actuals (volumes) for a specified date](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2BPromotion%2Bor%2BTactic%2BSpecific%2BActuals%2B(volumes)%2Bfor%2Ba%2Bspecified%2Bdate) - [Get Promotion Actuals on a Weekly Basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2BPromotion%2BActuals%2Bon%2Ba%2BWeekly%2BBasis) - [Get Promotion Actuals on a Daily Basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2BPromotion%2BActuals%2Bon%2Ba%2BDaily%2BBasis) - [Delete Promotion or Tactic Actual Data on a Daily Basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2BPromotion%2Bor%2BTactic%2BActual%2BData%2Bon%2Ba%2BDaily%2BBasis) - [Get Promotion or Tactic Specific Actuals (volumes) for a week of the year](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2BPromotion%2Bor%2BTactic%2BSpecific%2BActuals%2B(volumes)%2Bfor%2Ba%2Bweek%2Bof%2Bthe%2Byear) - [Delete Promotion or Tactic Specific Actuals (volumes) on daily basis older than the specified date](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2BPromotion%2Bor%2BTactic%2BSpecific%2BActuals%2B(volumes)%2Bon%2Bdaily%2Bbasis%2Bolder%2Bthan%2Bthe%2Bspecified%2Bdate) - [Delete Promotion or Tactic Actual Data in Bulk on a Daily Basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2BPromotion%2Bor%2BTactic%2BActual%2BData%2Bin%2BBulk%2Bon%2Ba%2BDaily%2BBasis) - [Delete Promotion or Tactic Specific Actuals (volumes) on a weekly basis for a year ending before the given date](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2BPromotion%2Bor%2BTactic%2BSpecific%2BActuals%2B(volumes)%2Bon%2Ba%2Bweekly%2Bbasis%2Bfor%2Ba%2Byear%2Bending%2Bbefore%2Bthe%2Bgiven%2Bdate) - [Delete Promotion or Tactic Actual Data on a Weekly Basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2BPromotion%2Bor%2BTactic%2BActual%2BData%2Bon%2Ba%2BWeekly%2BBasis) - [Delete Promotion or Tactic Actual Data in Bulk on a Weekly Basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2BPromotion%2Bor%2BTactic%2BActual%2BData%2Bin%2BBulk%2Bon%2Ba%2BWeekly%2BBasis) - [Send Promotion or Tactic Specific Actuals (volumes) of type decimal on a weekly basis for a registered transaction](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2BPromotion%2Bor%2BTactic%2BSpecific%2BActuals%2B(volumes)%2Bof%2Btype%2Bdecimal%2Bon%2Ba%2Bweekly%2Bbasis%2Bfor%2Ba%2Bregistered%2Btransaction) - [Send Promotion or Tactic Specific Actuals (volumes) of type decimal on a daily basis for a registered transaction](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2BPromotion%2Bor%2BTactic%2BSpecific%2BActuals%2B(volumes)%2Bof%2Btype%2Bdecimal%2Bon%2Ba%2Bdaily%2Bbasis%2Bfor%2Ba%2Bregistered%2Btransaction) ## Manages Measures Manage measures for conditions like prices, discounts, and costs. - [Send product prices for a registered transaction](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2Bproduct%2Bprices%2Bfor%2Ba%2Bregistered%2Btransaction) - [Send product discounts for a registered transaction](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2Bproduct%2Bdiscounts%2Bfor%2Ba%2Bregistered%2Btransaction) - [Send account discounts for a registered transaction](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2Baccount%2Bdiscounts%2Bfor%2Ba%2Bregistered%2Btransaction) - [Send account costs for a registered transaction](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2Baccount%2Bcosts%2Bfor%2Ba%2Bregistered%2Btransaction) - [Send account or products prices for a registered transaction](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2Baccount%2Bor%2Bproducts%2Bprices%2Bfor%2Ba%2Bregistered%2Btransaction) - [Send account or products costs for a registered transaction](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2Baccount%2Bor%2Bproducts%2Bcosts%2Bfor%2Ba%2Bregistered%2Btransaction) - [Get accounts product measures for a measure type](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Baccounts%2Bproduct%2Bmeasures%2Bfor%2Ba%2Bmeasure%2Btype) - [Delete measures for products per accounts based on measure type](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Bmeasures%2Bfor%2Bproducts%2Bper%2Baccounts%2Bbased%2Bon%2Bmeasure%2Btype) - [Delete conditions in bulk mode for accounts products](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Bconditions%2Bin%2Bbulk%2Bmode%2Bfor%2Baccountsproducts) - [Delete conditions in bulk mode for account measures](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Bconditions%2Bin%2Bbulk%2Bmode%2Bfor%2Baccount%2Bmeasures) - [Delete conditions in bulk mode for product measures](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Bconditions%2Bin%2Bbulk%2Bmode%2Bfor%2Bproduct%2Bmeasures) - [Request account measures for a measure](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Request%2Baccount%2Bmeasures%2Bfor%2Ba%2Bmeasure) - [Delete measures for accounts based on measure type](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Bmeasures%2Bfor%2Baccounts%2Bbased%2Bon%2Bmeasure%2Btype) - [Request product measures for a measure type](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Request%2Bproduct%2Bmeasures%2Bfor%2Ba%2Bmeasure%2Btype) - [Delete measures for products based on measure type](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Bmeasures%2Bfor%2Bproducts%2Bbased%2Bon%2Bmeasure%2Btype) - [Request data for a selected account and year](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Request%2Bdata%2Bfor%2Ba%2Bselected%2Baccount%2Band%2Byear) - [Request data for a selected account and year](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Request%2Bdata%2Bfor%2Ba%2Bselected%2Baccount%2Band%2Byear) ## Retrieve Account Plans That Have Changed Retrieve the list of changed account plans based on date and time - [Get the account plans that have changed since the specified date and time](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bthe%2Baccount%2Bplans%2Bthat%2Bhave%2Bchanged%2Bsince%2Bthe%2Bspecified%2Bdate%2Band%2Btime) - [Get the account plans that have changed since compared with the send list of account plans, year, and ETAGs](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bthe%2Baccount%2Bplans%2Bwhich%2Bhave%2Bchanged%2Bsince%2Bcompared%2Bwith%2Bthe%2Bsend%2Blist%2Bof%2Baccountplans%2C%2Byear%2Band%2BETAGs) ## Retrieve or Compare Manual Inputs for an Account Plan Retrieve the manual inputs recorded in a session for an account plan or its comparison between two sessions. - [Get Manual Inputs for an Account Plan](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2BManual%2BInputs%2Bfor%2Ban%2BAccount%2BPlan) - [Get Comparison of Manual Inputs for an Account Plan](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2BComparison%2Bof%2BManual%2BInputs%2Bfor%2Ban%2BAccount%2BPlan) ## Retrieve Available Promotions Retrieve available promotions that are processed within Consumer Goods Cloud Processing Engine. - [Get available promotions within a sales org](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bavailable%2Bpromotions%2Bwithin%2Ba%2Bsales%2Borg) - [Get promotions that have changed since the specified date and time](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bpromotions%2Bthat%2Bhave%2Bchanged%2Bsince%2Bthe%2Bspecified%2Bdate%2Band%2Btime) - [Get promotions that have changed since compared with the send list of promotions and ETAGs](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bpromotions%2Bthat%2Bhave%2Bchanged%2Bsince%2Bcompared%2Bwith%2Bthe%2Bsend%2Blist%2Bof%2Bpromotions%2Band%2BETAGs) - [Get data for a single promotion and promotion level KPIs using pagination](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bdata%2Bfor%2Ba%2Bsingle%2Bpromotion%2Band%2Bpromotion%2Blevel%2BKPIS%2Busing%2Bpagination) - [Get data for a single promotion](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bdata%2Bfor%2Ba%2Bsingle%2Bpromotion) - [Get the total values for KPIs over all products for all periods spanning the promotion runtime](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bthe%2Btotal%2Bvalues%2Bfor%2BKPIs%2Bover%2Ball%2Bproducts%2Bfor%2Ball%2Bperiods%2Bspanning%2Bthe%2Bpromotion%2Bruntime) - [Get available tactics for a specified promotion](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bavailable%2Btactics%2Bfor%2Ba%2Bspecified%2Bpromotion) - [Get data for a specified promotion tactic](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bdata%2Bfor%2Ba%2Bspecified%2Bpromotion%2Btactic) - [Get aggregated data for a specified promotion tactic](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Baggregated%2Bdata%2Bfor%2Ba%2Bspecified%2Bpromotion%2Btactic) - [Get a list of products that created at least one writeback](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Ba%2Blist%2Bof%2Bproducts%2Bthat%2Bcreated%2Bat%2Bleast%2Bone%2Bwriteback) ## Retrieve Available Accounts Retrieve available accounts and transfer them into the internal structures of the Consumer Goods Cloud Processing services. - [Get accounts available and successfully transferred into Consumer Goods Cloud Processing services internal structures](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Baccounts%2Bavailable%2Band%2Bsuccessfully%2Btransferred%2Binto%2BCGCloud%2BProcessing%2Bservices%2Binternal%2Bstructures) - [Get products available and successfully transferred into Consumer Goods Cloud Processing services internal structures](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bproducts%2Bavailable%2Band%2Bsuccessfully%2Btransferred%2Binto%2BCGCloud%2BProcessing%2Bservices%2Binternal%2Bstructures) - [Analyze internal data structures for integer values on weekly basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Analyze%2Binternal%2Bdatastructures%2Bfor%2Binteger%2Bvalues%2Bon%2Ba%2Bweekly%2Bbasis) - [Analyze internal data structures for decimal values on weekly basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Analyze%2Binternal%2Bdatastructures%2Bfor%2Bdecimal%2Bvalues%2Bon%2Ba%2Bweekly%2Bbasis) - [Analyze internal data structures for integer values on daily basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Analyze%2Binternal%2Bdata%2Bstructures%2Bfor%2Binteger%2Bvalues%2Bon%2Ba%2Bdaily%2Bbasis) - [Analyze internal data structures for decimal values on daily basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Analyze%2Binternal%2Bdata%2Bstructures%2Bfor%2Bdecimal%2Bvalues%2Bon%2Ba%2Bdaily%2Bbasis) - [Analyze internal data structures of type decimal on weekly basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Analyze%2Binternal%2Bdata%2Bstructures%2Bof%2Btype%2Bdecimal%2Bon%2Ba%2Bweekly%2Bbasis) - [Analyze internal data structures of type decimal on daily basis](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Analyze%2Binternal%2Bdata%2Bstructures%2Bof%2Btype%2Bdecimal%2Bon%2Ba%2Bdaily%2Bbasis) - [Get a list of all dependencies for a specified account](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Ba%2Blist%2Bof%2Ball%2Bdependencies%2Bfor%2Ba%2Bspecified%2Baccount) ## Manage Users and Privileges Manage users and privileges including audit logging. - [Get all registered users](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Ball%2Bregistered%2Busers) - [Add a user](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Add%2Ba%2Buser) - [Update an existing user](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Update%2Ba%2Buser) - [Delete a specified user](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Delete%2Ba%2Buser) - [Get user history](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Buser%2Bhistory) ## Manage File Requests - [Export CSV files](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Export%2BCSV%2Bfiles) ## Retrieve Payments Get payment details within Consumer Goods Cloud Processing Engine. - [Get data for a single payment by payment ID](/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bdata%2Bfor%2Ba%2Bsingle%2Bpayment%2Bby%2Bpayment%2Bid) ## Related Documentation - [TPM Service APIs](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/cgcloud_tpm_service_introduction.htm) - [TPM Engine Workflows](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/SP9-Workflow_Steps_Design.htm) - [TPM Promotion Creation Workflow](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/promotion_creation_workflow.htm) - [TPM User Interface Customization](https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/tpm_ui_customization.htm) Integration Service API # Integration Service API Consumer Goods Cloud Trade Promotion Management (TPM) provides a number of Integration APIs to help clients get CG Cloud TPM up and running. Integration APIs are used to integrate data from external systems to the Consumer Goods Cloud TPM. See [Get Started with Integrated Service API.](https://developer.salesforce.com/docs/industries/rcgps-integration-service/guide/guide.html) **Limits and Quotas** The API request limitations are 200 requests per second or 4000 requests per minute. Upto version 57.0, the Consumer Goods Cloud integration APIs were versioned as either v1 or v2, in the format: **curl /api/v1/templates/measures** From version 58.0 onwards, the Consumer Goods Cloud APIs are available in the standard Salesforce API format: **curl /api/v68.0/templates/measures?salesorg=0001** The above URL contains an additional salesorg parameter, and hence a few API contracts have changed. Organizations that follow non-Hyperforce-based permissions will not be able to support the v1 and v2 versions of the Consumer Goods Cloud APIs. APIs will raise a timeout after 120s seconds of processing. Ensure to reduce the response and load using strict filters. Always implement a fallback in case of an HTTP timeout in projects with mixed load scenarios. **Note:** You can access the CGCloud processing services integration URL from the processing services pairing app page in your Salesforce org. **Version:** v68.0 ## Servers * `https://cgcloud_processing_services_integration` Protocols: https. ## Security * `oauth_2_0` (oauth2) CGCloud is using Salesforce OAuth 2.0 for authenticating all api requests. The token is validated using login.safesforce.com/services/oauth2/userinfo and test.safesforce.com/services/oauth2/userinfo The user on Salesforce side that is used to generate the token should be part of the org connected to CGCloud Processing Engine. * OAuth flow accessCode (authorizationUrl: https://yourdomain.my.salesforce.com/services/oauth2/authorize, tokenUrl: https://yourdomain.my.salesforce.com/services/oauth2/tokenken) * Scope \*: ## Tags ### Health Check Perform health check. ### Transaction Management Manage explicit transactions for multi-messages operations. ### Templates Management API to manage templates for measures including volumes, actuals, prices, or discounts. Measure must be properly configured before sending using the template API. All measures must be aligned with Salesforce customizations. ### Volumes Management API to send, get, or delete volumes or baselines. Measure templates must be registered in advance using the template API. ### Condition Management Manages measures for conditions like prices, discounts, and costs. Different APIs cover relations to account and products. ### Accountplan Management APIs supporting account plans. ### Promotion Management Request all available promotion processed within CGCloud Processing Engine. ### Support Management API supporting analysis and trouble shooting. These APIs are not approved for production automation. They are subject of change without notice. ### User Management Manages users and privileges including audit logging. ### Export Management Manage file requests. ### Payment Management Request payment details within CGCloud Processing Engine. ## Operations ### GET Return the current API version `GET /api` Operation ID: `Return the current API version`. Tags: Health Check. Return the current version of the API. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "message": "Welcome to Consumer Goods Cloud Processing Services!", "version": "v68.0" } ``` ### GET Get a List of Transactions for a Time Period `GET /api/v68.0/transaction` Operation ID: `Get a List of Transactions for a Time Period`. Tags: Transaction Management. Security: oauth\_2\_0. For proactive monitoring, use the Rejection Log API to get a list of transactions registered to the Consumer Goods processing services during a period. This generated log provides visibility on the transactions that happened within the period, including their success or failure status. **Permission Role**: Transaction register **Limits**: 50,000 transactions **Note**: The list of transactions retrieved from this API request includes all the transactions available in the organization. #### Parameters * `datetimefrom` (query, string, required) Enter a date and it must be 7 days or less from the day when the API request is being sent. The API fetches the transactions created after this date. * `datetimethru` (query, integer) Enter a date. The API fetches the transactions created before this date. The value cannot be a future date. * `state` (query, integer) Enter one or more states of transaction. When entering multiple values, use the format ?state=INITIAL,PROCESSING. The API fetches the transactions that are currently in the state mentioned as a query parameter. The supported values are INITIAL, RECEIVED, PROCESSING, COMMITTED, REJECTED, and FAILED. #### Responses * **200** The API request is successful. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` [ { "id": 123, "transaction": "trax1", "state": "COMMITTED", "datetime_created": "2024-06-09T07:50:21Z", "datetime_processed": "2024-06-09T07:53:25Z", "date_committed": "2024-02-08T07:24:29Z" }, { "id": 124, "transaction": "trax2", "state": "INITIAL", "datetime_created": "2024-06-09T08:45:15Z", "datetime_processed": "2024-06-09T11:83:19Z", "date_committed": "" } ] ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Register a transaction ID to bundle multiple messages being sent for one transaction `POST /api/v68.0/transaction` Operation ID: `Register a transaction ID`. Tags: Transaction Management. Security: oauth\_2\_0. Register a transaction ID to bundle multiple messages being sent for one transaction. The transaction ID must be unique for the user. **Permission Role:** Transaction register #### Parameters * `transaction` (query, string, required) Transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. * `messages` (query, integer, required) Number of messages planned to send for a transaction. All messages must be received to complete the transaction and start processing. * `records` (query, integer) Number of records planned to send overall messages. * `shortdescription` (query, string) A short description of the transaction. * `completemode` (query, boolean) The flag controls if the existing records are to be replaced by the new records. For certain POST APIs, for example, /condition/products, /condition/accounts, and condition/accountsProducts, the flag controls if existing records are to be replaced with the new records. This is a parameter that is configured while registering the transaction. It can be disabled or enabled at the transaction level. All of the API calls that are part of the transaction would continue to follow the behavior set at the transaction level. #### Responses * **201** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "rcg_transaction": 1201 } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get status for a specified transaction ID `GET /api/v68.0/transaction/{id}` Operation ID: `Get status for a transaction ID`. Tags: Transaction Management. Security: oauth\_2\_0. Retrieve status for a specified transaction ID. Rejected accounts or products are limited to a maximum of 100 keys. **Permission Role:** Transaction register #### Parameters * `id` (path, string, required) Transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` [ { "state": "INITIAL", "date_created": "2020-03-23 12:55:37", "date_processed": "", "messages_registered": 1, "messages_received": 0, "details": {} }, { "state": "RECEIVED", "date_created": "2020-03-23 12:59:42", "date_processed": "", "messages_registered": 1, "messages_received": 1, "details": {} }, { "state": "PROCESSING", "date_created": "2020-03-23 12:59:42", "date_processed": "", "messages_registered": 1, "messages_received": 1, "details": {} }, { "state": "FAILED", "date_created": "2020-03-23 13:10:51", "date_processed": "2020-03-23 13:11:08", "messages_registered": 0, "messages_received": 0, "details": {} }, { "state": "REJECTED", "date_created": "2020-03-23 12:57:42", "date_processed": "2020-03-23 12:57:55", "messages_registered": 1, "messages_received": 1, "details": { "duplicated_records": [ { "acc": "External_Account_Id_1", "prd": "External_Product_Id_1", "datefrom": "2020-03-02", "datethru": "2021-02-28", "count": 2 } ] } }, { "state": "COMMITTED", "date_created": "2020-03-23 12:58:34", "date_processed": "2020-03-23 12:58:53", "messages_registered": 1, "messages_received": 1, "details": { "rows_processed": 1, "rejected": { "unknown_products": [ { "prd": "External_Product_Id_1" } ] } } } ] ``` * **400** The API request is not successful. Review the path parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete a specified transaction including messages `DELETE /api/v68.0/transaction/{id}` Operation ID: `Delete a transaction including messages`. Tags: Transaction Management. Security: oauth\_2\_0. Delete a specified transaction including messages. Only transactions in the state INITIAL,COMMITTED,REJECTED, or FAILED can be deleted. Transactions in state RECEIVED or PROCESSING can't be deleted, while they are in the scheduled queue. **Warning:** The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Transaction register #### Parameters * `id` (path, string, required) Transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Responses * **200** Successfully deleted. * **400** The API request is not successful. Review the path parameter. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Register a transaction ID to handle volumes promotion. `POST /api/v68.0/transaction/volumespromotions/overwrite` Operation ID: `Register a transaction ID to handle volumes promotion`. Tags: Transaction Management. Security: oauth\_2\_0. Register a transaction ID to bundle multiple messages being sent for a single transaction. The transaction ID must be unique for the user. With this transaction, you can delete and load volume promotion-related data in one database transaction with COMMIT and ROLLBACK handling. **Permission Role:** Transaction register #### Parameters * `transaction` (query, string, required) Transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. * `messages` (query, integer, required) Number of messages planned to send for a transaction. All messages must be received to complete the transaction and start processing. * `records` (query, integer) Number of records planned to send overall messages. * `shortdescription` (query, string) A short description of the transaction. #### Request body (required) Media type: `application/json`. Schema: `object`. * `measure` (_string_, required) Minimum length: 1. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `deletion` (_array of object_, required) Minimum items: 1. Maximum items: 1000. * `prd` (_string_) Minimum length: 1. Maximum length: 255. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `prm` (_string_, required) Minimum length: 1. Maximum length: 30. Pattern: ^\[a-zA-Z0-9\_-\]+$. _Example_ ``` { "measure": "WD", "deletion": [ { "prm": "a2ZXJ000000017C2AQ", "prd": "External_Product_Id_1" }, { "prm": "a2ZXJ000000017C2AQ", "prd": "External_Product_Id_2" } ] } ``` #### Responses * **201** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "rcg_transaction": 1201 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Get status for a list of transaction IDs. `POST /api/v68.0/transaction/status` Operation ID: `Get status for transaction IDs` . Tags: Transaction Management. Security: oauth\_2\_0. Retrieve status for a list of transaction IDs. The limit is 1000 IDs. **Permission Role:** Transaction register #### Request body (required) Media type: `application/json`. Schema: `array of object`. Array of `object`. Minimum items: 1. Maximum items: 1000. * `txid` (_string_) Enter the transaction ID. Minimum length: 1. Maximum length: 20. _Example_ ``` [ { "txid": "5235235342" }, { "txid": "3253425324345" } ] ``` #### Responses * **201** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` [ { "txid": "5235235342", "state": "COMMITTED", "date_processed": "2017-11-20 13:20:42", "date_created": "2017-11-20 13:20:39", "no_messages_received": 0, "no_messages": 0, "details": { "deleted": 2, "params": { "measure": "COGS" } } }, { "txid": "3253425324345", "state": "INITIAL", "date_processed": "", "date_created": "2017-11-20 13:51:02", "no_messages_received": 0, "no_messages": 1, "details": {} } ] ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get a list of configured measure templates `GET /api/v68.0/templates/measures` Operation ID: `Get a list of configured measure templates`. Tags: Templates Management. Security: oauth\_2\_0. Retrieve a list of configured measure templates. **Permission Role:** Measure templates read #### Parameters * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "measures": [ { "code": "a02", "productmeasure": true, "accountmeasure": false, "accountproductmeasure": false, "internal": false }, { "code": "b002", "productmeasure": false, "accountmeasure": true, "accountproductmeasure": false, "internal": false }, { "code": "COGS", "productmeasure": true, "accountmeasure": true, "accountproductmeasure": false, "internal": false } ] } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Configure condition measures `POST /api/v68.0/templates/measures` Operation ID: `Configure condition measures`. Tags: Templates Management. Security: oauth\_2\_0. Configure condition measures like prices, discounts, products, accounts, or products and accounts. Condition measures can be used to validate and process the information. Defined target tables for the particular measure code are productmeasure, accountmeasure, accountproductmeasure needs set to true/false. The purpose of that is to control the flow for the measure code, to avoid writing data into the wrong table. . Ensure to complete this prior to sending measures using condition APIs. This has to be aligned with measure customizations within the Salesforce org. **This overrides all existing condition measures**. The code is case-sensitive. **Permission Role:** Measure templates write #### Request body (required) Media type: `application/json`. Schema: `object`. * `measures` (_array of object_, required) * `code` (_string_) Minimum length: 1. Maximum length: 4. * `productmeasure` (_boolean_) * `accountmeasure` (_boolean_) * `accountproductmeasure` (_boolean_) * `internal` (_boolean_) * `salesorg` (_string_, required) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. _Example_ ``` { "measures": [ { "code": "a02", "productmeasure": true, "accountmeasure": false, "accountproductmeasure": false, "internal": false }, { "code": "b002", "productmeasure": false, "accountmeasure": true, "accountproductmeasure": false, "internal": false }, { "code": "COGS", "productmeasure": true, "accountmeasure": true, "accountproductmeasure": false, "internal": false } ], "salesorg": "CL03" } ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Rows received: 3" } ``` * **400** The API request is not successful. Review the input parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get a list of configured volume measure templates `GET /api/v68.0/templates/volumemeasures` Operation ID: `Get a list of configured volume measure templates`. Tags: Templates Management. Security: oauth\_2\_0. Retrieve a list of configured volume measure templates. The measures can be weekly (W) or daily (D). The measure format can be integer (I) or decimal (D). The measure code is case-sensitive. **Permission Role:** Volume templates read #### Parameters * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "volumemeasures": [ { "code": "a01", "mode": "W", "format": "I" }, { "code": "b01", "mode": "D", "format": "D" }, { "code": "b002", "mode": "W", "format": "I" } ] } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Configure volume measures | Weekly or daily measure (W, D) `POST /api/v68.0/templates/volumemeasures` Operation ID: `Configure volume measures (Weekly or Daily)`. Tags: Templates Management. Security: oauth\_2\_0. Configure volume using weekly (W) or daily measurements (D). The format can be integer (I) or decimal (D). Ensure to complete this prior to sending measures using condition APIs. This has to be aligned with measure customizations within the Salesforce org. **This overrides all existing condition measures**. The code is case-sensitive. **Permission Role:** Volume templates write #### Request body (required) Media type: `application/json`. Schema: `object`. * `volumemeasures` (_array of object_, required) * `code` (_string_) Minimum length: 1. Maximum length: 4. * `mode` (_string_) Allowed values: `W`, `D`. Minimum length: 1. Maximum length: 1. * `format` (_string_) Allowed values: `I`, `D`. Minimum length: 1. Maximum length: 1. * `salesorg` (_string_, required) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. _Example_ ``` { "volumemeasures": [ { "code": "a01", "mode": "W", "format": "I" }, { "code": "b01", "mode": "D", "format": "D" }, { "code": "b002", "mode": "W", "format": "I" } ], "salesorg": "CL03" } ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Rows received: 3" } ``` * **400** If the same code is sent twice in the payload system will reject it. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "duplicate measure type", "code": 128 } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Send volumes on a weekly basis with type integer values for a registered transaction by date `POST /api/v68.0/volumes/weeks/date/integer` Operation ID: `Send volumes of type integer by date on a weekly basis`. Tags: Volumes Management. Security: oauth\_2\_0. Send volumes on a weekly basis with type integer values for a registered transaction by date. Start date: The date of the volume to be assigned to the right period ([https://tools.ietf.org/html/rfc3339#section-5.6](https://tools.ietf.org/html/rfc3339#section-5.6)). Type: The template ID for the volumes. All messages send for a transaction must contain the same template type. Payload limit to 30 MB. "type" and "salesorg" must be the same in all messages belonging to a transaction ID. **Permission Role:** Volumes write **Data Source Table Name:** Weekly Measure Int #### Parameters * `transaction` (query, string, required) Transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_, required) * `salesorg` (_string_, required) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `volumes` (_array of object_, required) * `startdate` (_string (date)_, required) * `rows` (_array of object_, required) * `prd` (_string_, required) Minimum length: 1. Maximum length: 255. * `acc` (_string_, required) Minimum length: 1. Maximum length: 255. * `value` (_number_, required) Minimum: -2147483647. Maximum: 2147483647. _Example_ ``` { "type": "b002", "salesorg": "CL03", "volumes": [ { "startdate": "2016-01-01", "rows": [ { "prd": "External_Product_Id_2", "acc": "External_Account_Id_1", "value": 1 }, { "prd": "External_Product_Id_3", "acc": "External_Account_Id_2", "value": 2 } ] }, { "startdate": "2016-01-08", "rows": [ { "prd": "External_Product_Id_4", "acc": "External_Account_Id_3", "value": 3 }, { "prd": "External_Product_Id_5", "acc": "External_Account_Id_4", "value": 4 }, { "prd": "External_Product_Id_6", "acc": "External_Account_Id_5", "value": 5 } ] } ] } ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Blocks received: 2", "messageid": 515 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Send volumes on daily basis with type integer values for a registered transaction by date `POST /api/v68.0/volumes/daily/date/integer` Operation ID: `Send volumes of type integer by date on a daily basis`. Tags: Volumes Management. Security: oauth\_2\_0. Send volumes on daily basis with type integer values for a registered transaction by date. Start date: The date of the volume to be assigned to the right date ([https://tools.ietf.org/html/rfc3339#section-5.6](https://tools.ietf.org/html/rfc3339#section-5.6)). Type: The template ID for the volumes. All messages send for a transaction must contain the same template type. Payload limit to 30 MB. "type" must be the same in all messages belonging to a transaction ID. **Permission Role:** Volumes write **Data Source Table Name:** Daily Measure Int #### Parameters * `transaction` (query, string, required) Transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_, required) * `salesorg` (_string_, required) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `volumes` (_array of object_, required) * `startdate` (_string (date)_, required) * `rows` (_array of object_, required) * `prd` (_string_, required) Minimum length: 1. Maximum length: 255. * `acc` (_string_, required) Minimum length: 1. Maximum length: 255. * `value` (_number_, required) Minimum: -2147483647. Maximum: 2147483647. _Example_ ``` { "type": "b002", "salesorg": "CL03", "volumes": [ { "startdate": "2016-01-01", "rows": [ { "prd": "External_Product_Id_2", "acc": "External_Account_Id_1", "value": 1 }, { "prd": "External_Product_Id_3", "acc": "External_Account_Id_2", "value": 2 } ] }, { "startdate": "2016-01-08", "rows": [ { "prd": "External_Product_Id_4", "acc": "External_Account_Id_3", "value": 3 }, { "prd": "External_Product_Id_5", "acc": "External_Account_Id_4", "value": 4 }, { "prd": "External_Product_Id_6", "acc": "External_Account_Id_5", "value": 5 } ] } ] } ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Blocks received: 2", "messageid": 515 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Send volumes on week level with type integer values for a registered transaction by week `POST /api/v68.0/volumes/weeks/week/integer` Operation ID: `Send volumes of type integer by week on a weekly basis`. Tags: Volumes Management. Security: oauth\_2\_0. Send volumes on week level with type integer values for a registered transaction by week. Year and week must be specified. Type: The template ID for the volumes. All messages send for a transaction must contain the same template type. Payload limit 30 MB. "type" and "salesorg" must be the same in all messages belonging to a transaction ID. **Permission Role:** Volumes write **Data Source Table Name:** Weekly Measure Int #### Parameters * `transaction` (query, string, required) Transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_, required) * `salesorg` (_string_, required) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `volumes` (_array of object_, required) * `year` (_number_, required) Minimum: 1800. Maximum: 9999. * `week` (_number_, required) Minimum: 1. Maximum: 54. * `rows` (_array of object_, required) * `prd` (_string_, required) Minimum length: 1. Maximum length: 255. * `acc` (_string_, required) Minimum length: 1. Maximum length: 255. * `value` (_number_, required) Minimum: -2147483647. Maximum: 2147483647. _Example_ ``` { "type": "b002", "salesorg": "CL03", "volumes": [ { "year": 2016, "week": 45, "rows": [ { "prd": "External_Product_Id_2", "acc": "External_Account_Id_1", "value": 1 }, { "prd": "External_Product_Id_3", "acc": "External_Account_Id_2", "value": 2 } ] }, { "year": 2016, "week": 46, "rows": [ { "prd": "External_Product_Id_4", "acc": "External_Account_Id_3", "value": 3 }, { "prd": "External_Product_Id_5", "acc": "External_Account_Id_4", "value": 4 }, { "prd": "External_Product_Id_6", "acc": "External_Account_Id_5", "value": 5 } ] } ] } ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Blocks received: 2", "messageid": 515 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Send volumes on a weekly basis with type decimal values for a registered transaction `POST /api/v68.0/volumes/weeks/date/decimal` Operation ID: `Send volumes of type decimal on a weekly basis`. Tags: Volumes Management. Security: oauth\_2\_0. Send volumes on a weekly basis with type decimal values for a registered transaction. Start date: The date of the volumes to be assigned to the right period (htts://tools.ietf.org/html/rfc3339#section-5.6). Type: The template ID for the volumes. All messages sent for a transaction must contain the same template type. Payload limit to 30 MB. The max value accepted is 2147483673 and rounded of to the 7 place. "type" and "salesorg" must be the same in all messages belonging to a transaction ID. **Permission Role:** Volumes write **Data Source Table Name:** Weekly Measure Real #### Parameters * `transaction` (query, string, required) Transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_, required) * `salesorg` (_string_, required) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `volumes` (_array of object_, required) * `startdate` (_string (date)_, required) * `rows` (_array of object_, required) * `prd` (_string_, required) Pattern: ^\[a-zA-Z0-9\_-\]+$. * `acc` (_string_, required) Pattern: ^\[a-zA-Z0-9\_-\]+$. * `value` (_number_, required) Minimum: -2147483647. Maximum: 2147483647. _Example_ ``` { "type": "b002", "salesorg": "CL03", "volumes": [ { "startdate": "2016-01-01", "rows": [ { "prd": "External_Product_Id_2", "acc": "External_Account_Id_1", "value": 1.23 }, { "prd": "External_Product_Id_3", "acc": "External_Account_Id_2", "value": 2.45 } ] }, { "startdate": "2016-01-08", "rows": [ { "prd": "External_Product_Id_4", "acc": "External_Account_Id_3", "value": 3.882 }, { "prd": "External_Product_Id_5", "acc": "External_Account_Id_4", "value": 4.12 }, { "prd": "External_Product_Id_6", "acc": "External_Account_Id_5", "value": 5 } ] } ] } ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Blocks received: 2", "messageid": 515 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** Bad request token, not validated by Salesforce token validation. * **403** Not authorized, missing privilege for user. ### POST Send volumes of type decimal on a weekly basis with a start date for a registered transaction `POST /api/v68.0/volumes/daily/date/decimal` Operation ID: `Send volumes of type decimal on a weekly basis with start date`. Tags: Volumes Management. Security: oauth\_2\_0. Send volumes of type decimal on a weekly basis with a start date for a registered transaction. Start date: The date of the volumes to be assigned to the right period (htts://tools.ietf.org/html/rfc3339#section-5.6). Type: The template ID for the volumes. All messages sent for a transaction must contain the same template type. Payload limit to 30 MB. The maximum number for values that can be represented accurately using double precision is -9007199254740992 or 9007199254740992. A value exceeding the maximum number will be automatically be rounded or cut off. You are responsible for handling such a huge number on your side to avoid rounding and cutting off. **Permission Role:** Volumes write **Data Source Table Name:** Daily Measure Real #### Parameters * `transaction` (query, string, required) Transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_, required) * `salesorg` (_string_, required) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `volumes` (_array of object_, required) * `startdate` (_string (date)_, required) * `rows` (_array of object_, required) * `prd` (_string_, required) Pattern: ^\[a-zA-Z0-9\_-\]+$. * `acc` (_string_, required) Pattern: ^\[a-zA-Z0-9\_-\]+$. * `value` (_number_, required) Minimum: -9007199254740992. Maximum: 9007199254740992. _Example_ ``` { "type": "b002", "salesorg": "CL03", "volumes": [ { "startdate": "2016-01-01", "rows": [ { "prd": "External_Product_Id_2", "acc": "External_Account_Id_1", "value": 1.23 }, { "prd": "External_Product_Id_3", "acc": "External_Account_Id_2", "value": 2.45 } ] }, { "startdate": "2016-01-08", "rows": [ { "prd": "External_Product_Id_4", "acc": "External_Account_Id_3", "value": 3.882 }, { "prd": "External_Product_Id_5", "acc": "External_Account_Id_4", "value": 4.12 }, { "prd": "External_Product_Id_6", "acc": "External_Account_Id_5", "value": 5 } ] } ] } ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Blocks received: 2", "messageid": 515 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** Bad request token, not validated by Salesforce token validation. * **403** Not authorized, missing privilege for the user. ### POST Send volumes of type decimal on a weekly basis with year and week for a registered transaction `POST /api/v68.0/volumes/weeks/week/decimal` Operation ID: `Send volumes of type decimal on a weekly basis with year and week`. Tags: Volumes Management. Security: oauth\_2\_0. Send volumes of type decimal on a weekly basis with year and week for a registered transaction. Year and week must be specified. Type: The template ID for the volumes. All messages send for a transaction must contain the same template type. Payload limit 30 MB. The max value accepted is 2147483673. **Permission Role:** Volumes write **Data Source Table Name:** Weekly Measure Real #### Parameters * `transaction` (query, string, required) Transaction ID specified by the sending system.Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_, required) * `salesorg` (_string_, required) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `volumes` (_array of object_, required) * `year` (_number_, required) * `week` (_number_, required) * `rows` (_array of object_, required) * `prd` (_string_, required) Pattern: ^\[a-zA-Z0-9\_-\]+$. * `acc` (_string_, required) Pattern: ^\[a-zA-Z0-9\_-\]+$. * `value` (_number_, required) Minimum: -2147483647. Maximum: 2147483647. _Example_ ``` { "type": "b002", "salesorg": "CL03", "volumes": [ { "year": 2016, "week": 45, "rows": [ { "prd": "External_Product_Id_2", "acc": "External_Account_Id_1", "value": 1.23 }, { "prd": "External_Product_Id_3", "acc": "External_Account_Id_2", "value": 2.11 } ] }, { "year": 2016, "week": 46, "rows": [ { "prd": "External_Product_Id_4", "acc": "External_Account_Id_3", "value": 3.45 }, { "prd": "External_Product_Id_5", "acc": "External_Account_Id_4", "value": 4.69 }, { "prd": "External_Product_Id_6", "acc": "External_Account_Id_5", "value": 5.23 } ] } ] } ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Blocks received: 2", "messageid": 515 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** Bad request token, not validated by Salesforce token validation. * **403** The message type is different from the previous messages (103), or the message type isn't registered or valid for a measure (105). ### GET Get volumes on a weekly basis for a specified date `GET /api/v68.0/volumes/weeks/{measure}/{date}` Operation ID: `Get volumes on a weekly basis for a specified date`. Tags: Volumes Management. Security: oauth\_2\_0. Retrieve volumes on a weekly basis for a specified date. Both the measure code and the measure template configuration together determine whether the result will be served by the integer or decimal store. The API uses pagination and returns only a limited number of rows (500000). **Permission Role:** Volumes read **Data Source Table Name depend on measure code definition:** Weekly Measure Int or Weekly Measure Real. Measure codes cannot be re-used for different read-types. #### Parameters * `pagesize` (query, integer) Pagination parameter records per page. The default value is 10000 Default: `10000`. Minimum: 1000. Maximum: 50000. * `keepalive` (query, integer) Pagination parameter how long the requested pages are alive in minutes. The default value is ten minutes. Default: `10`. Minimum: 5. Maximum: 60. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `account` (query, string) Filter for the selected external account ID. Minimum length: 1. Maximum length: 255. * `product` (query, string) Filter for the selected external product ID Minimum length: 1. Maximum length: 255. * `measure` (path, string, required) Measure code as registered with the template api. Minimum length: 1. Maximum length: 4. * `date` (path, string (date), required) A date within the week the data is requested for. Format yyyy-mm-dd #### Responses * **200** Successful request. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "value": { "meta": { "page": 0, "keepalive": 10, "pagesize": 1000, "page_count": 10, "this_page_count": 1000, "total": 9990, "request_id": "b0dbe87b-b781-5f64-4106-aed29c1fbf6a", "originalurl": "/api/conditions/products/COGS?showmeta=true", "links": { "First": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=0", "Last": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=9", "Next": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=1" }, "Week": 1 }, "measures": [ { "acc": "External_Account_Id_6", "prd": "External_Product_Id_7", "value": 5 }, { "acc": "External_Account_Id_6", "prd": "External_Product_Id_7", "value": 5 } ] } } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get volumes for a specified date `GET /api/v68.0/volumes/daily/{measure}/{date}` Operation ID: `Get volumes for a specified Date`. Tags: Volumes Management. Security: oauth\_2\_0. Retrieve volumes for a specified date. Both the measure code and the measure template configuration together determine whether a decimal or integer store serves the results. The API uses pagination. For more information, see URI parameters. The API only returns a limited number of rows (500000). **Permission Role:** Volumes read **Data Source Table Name depend on measure code definition:** Daily Measure Int or Daily Measure Real. Measure codes cannot be re-used for different read-types. #### Parameters * `pagesize` (query, integer) Pagination parameter, records per page. The default value is 10000 Default: `10000`. Minimum: 1000. Maximum: 50000. * `keepalive` (query, integer) Pagination parameter how long the requested pages are alive in minutes. The default value is ten minutes. Default: `10`. Minimum: 5. Maximum: 60. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `showmeta` (query, boolean) Show the pagination meta header within the response. * `account` (query, string) Filter for the selected external account ID. Minimum length: 1. Maximum length: 255. * `product` (query, string) Filter for the selected external product ID. Minimum length: 1. Maximum length: 255. * `measure` (path, string, required) Measure code as registered with the template api. Minimum length: 1. Maximum length: 4. * `date` (path, string (date), required) Date the data is requested for. Format yyyy-mm-dd #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "value": { "meta": { "page": 0, "keepalive": 10, "pagesize": 1000, "page_count": 10, "this_page_count": 1000, "total": 9990, "request_id": "b0dbe87b-b781-5f64-4106-aed29c1fbf6a", "originalurl": "/api/conditions/products/COGS?showmeta=true", "links": { "first": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=0", "last": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=9", "next": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=1" }, "date": "2016-01-31" }, "measures": [ { "acc": "External_Account_Id_6", "prd": "External_Product_Id_7", "value": 5 }, { "acc": "External_Account_Id_6", "prd": "External_Product_Id_7", "value": 5 } ] } } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get volumes for a week of the year `GET /api/v68.0/volumes/weeks/{measure}/{year}/{week}` Operation ID: `Get volumes for a week of the year`. Tags: Volumes Management. Security: oauth\_2\_0. Retrieve volumes for a week of the year. Both the measure code and the measure template configuration determine whether a decimal or integer store serves the results. The API uses pagination. For more information, see URI parameters. The API only returns a limited number of rows (500000). **Permission Role:** Volumes read **Data Source Table Name depend on measure code definition:** Weekly Measure Int or Weekly Measure Real. Measure codes cannot be re-used for different read-types. #### Parameters * `pagesize` (query, integer) Pagination parameter records per page. The default value is 10000 Default: `10000`. Minimum: 1000. Maximum: 50000. * `keepalive` (query, integer) Pagination parameter how long the requested pages are alive in minutes. The default value is ten minutes. Default: `10`. Minimum: 5. Maximum: 60. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `account` (query, string) Filter for the selected external account ID. Minimum length: 1. Maximum length: 255. * `product` (query, string) Filter for the selected external product ID. Minimum length: 1. Maximum length: 255. * `measure` (path, string, required) Measure code as registered with the template api. Minimum length: 1. Maximum length: 4. * `year` (path, string, required) Year in the fomat YYYY. Minimum length: 4. Maximum length: 4. * `week` (path, integer, required) Week of the year 1-52 Minimum: 1. Maximum: 52. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "value": { "meta": { "page": 0, "keepalive": 10, "pagesize": 1000, "page_count": 10, "this_page_count": 1000, "total": 9990, "request_id": "b0dbe87b-b781-5f64-4106-aed29c1fbf6a", "originalurl": "/api/conditions/products/COGS?showmeta=true", "links": { "first": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=0", "last": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=9", "next": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=1" }, "week": 1 }, "measures": [ { "acc": "External_Account_Id_6", "prd": "External_Product_Id_7", "value": 5 }, { "acc": "External_Account_Id_6", "prd": "External_Product_Id_7", "value": 5 } ] } } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete volumes of type integer for years ending before the specified date `DELETE /api/v68.0/volumes/weeks/integer/{date}` Operation ID: `Delete volumes of type integer for years ending before the specified date`. Tags: Volumes Management. Security: oauth\_2\_0. Delete volumes of type integer for years ending before the specified date. The API is for reorganization and cleanup processes. The processing is asynchronous and results in the creation of a new transaction with the given ID. Example for weekly deletion: If you have data on 2026 for week 1 till 52 and before like 2025..., 2024... and on DELETE API you provide 2026-12-31. All data less than 2026 will be deleted, like 2025..., 2024..., data for 2026 with all weeks are not deleted. If you like to delete them, you need to provide a date, in this case one day in advance like 2027-01-02 to hit all previous weeks records for the year 2026 **Warning:** The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Volumes delete **Data Source Table Name:** Weekly Measure Int. #### Parameters * `transaction` (query, string, required) Transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_". Request state of delete using the transaction API. | A transaction record is created with the given ID. Minimum length: 1. Maximum length: 20. * `date` (path, string (date), required) Volume data prior to this date is deleted (Period must be outside that date). * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "rcg_transaction": 65456 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete volumes of type decimal for years ending before the specified date `DELETE /api/v68.0/volumes/weeks/decimal/{date}` Operation ID: `Delete volumes of type decimal for years ending before the specified date`. Tags: Volumes Management. Security: oauth\_2\_0. Delete volumes of type decimal for years ending before the specified date. The API is for reorganization and cleanup processes. The processing is asynchronous and results in the creation of a new transaction with the given ID. Example for weekly deletion: If you have data on 2026 for week 1 till 52 and before like 2025..., 2024... and on DELETE API you provide 2026-12-31. All data less than 2026 will be deleted, like 2025..., 2024..., data for 2026 with all weeks are not deleted. If you like to delete them, you need to provide a date, in this case one day in advance like 2027-01-02 to hit all previous weeks records for the year 2026 **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Volumes delete **Data Source Table Name:** Weekly Measure Real. #### Parameters * `transaction` (query, string, required) Transaction ID specified by the sending system. Request state of delete using the transaction API. | A transaction record is created with the given ID. Minimum length: 1. Maximum length: 20. * `date` (path, string (date), required) Volume data for years ending before the specified date is deleted. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "rcg_transaction": 6655 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete real volumes with specific conditions on a weekly basis that span the given time range `DELETE /api/v68.0/volumes/remove/weeks/decimal/{measure}` Operation ID: `Delete volumes of type decimal on a weekly basis that span the given time range`. Tags: Volumes Management. Security: oauth\_2\_0. Delete real volumes with specific conditions that span the given time range. **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Volumes delete **Data Source Table Name:** Weekly Measure Real. #### Parameters * `measure` (path, string, required) Measure code as registered with the template API. Minimum length: 1. Maximum length: 4. * `datefrom` (query, string (date), required) The start date from which you want to delete volumes of type decimal on a weekly basis. * `datethru` (query, string (date), required) The end date until which you want to delete volumes of type decimal on a weekly basis. * `transaction` (query, string) Transaction ID specified by the sending system. The transaction API can be used to check the status of a delete transaction. | Based on the given transaction ID, an implicit transaction is created. If no transaction is provided, the system creates a transaction. Minimum length: 1. Maximum length: 20. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Request body (required) Media type: `application/json`. Schema: `array of object`. Array of `object`. Minimum items: 1. Maximum items: 100. * `acc` (_string_, required) Minimum length: 1. Maximum length: 255. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `prd` (_string_) Minimum length: 1. Maximum length: 255. Pattern: ^\[a-zA-Z0-9\_-\]+$. _Example_ ``` [ { "acc": "External_Account_Id_1", "prd": "External_Product_Id_1" }, { "acc": "External_Account_Id_5" } ] ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "txid": "TX000000000000000123" } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete volumes of type integer on a weekly basis `DELETE /api/v68.0/volumes/remove/weeks/integer/{measure}` Operation ID: `Delete volumes of type integer on a weekly basis`. Tags: Volumes Management. Security: oauth\_2\_0. Delete volumes of type integer with specific conditions on a weekly basis that span the given time range. **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Volumes delete **Data Source Table Name:** Weekly Measure Int. #### Parameters * `measure` (path, string, required) Measure code as registered with the template API. Minimum length: 1. Maximum length: 4. * `datefrom` (query, string (date), required) The start date from which you want to delete volumes of type decimal on a weekly basis. * `datethru` (query, string (date), required) The end date until which you want to delete volumes of type decimal on a weekly basis. * `transaction` (query, string) Transaction ID specified by the sending system. The transaction API can be used to check the status of a delete transaction. | Based on the given transaction ID, an implicit transaction is created. If no transaction is provided, the system creates a transaction. Minimum length: 1. Maximum length: 20. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Request body (required) Media type: `application/json`. Schema: `array of object`. Array of `object`. Minimum items: 1. Maximum items: 100. * `acc` (_string_, required) Minimum length: 1. Maximum length: 255. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `prd` (_string_) Minimum length: 1. Maximum length: 255. Pattern: ^\[a-zA-Z0-9\_-\]+$. _Example_ ``` [ { "acc": "External_Account_Id_1", "prd": "External_Product_Id_1" }, { "acc": "External_Account_Id_5" } ] ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "txid": "TX000000000000000123" } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete volume information before one month of the specified date `DELETE /api/v68.0/volumes/daily/integer/{date}` Operation ID: `Delete volume information before one month of the specified date`. Tags: Volumes Management. Security: oauth\_2\_0. Delete volume information before one month of the specified date. The API is for reorganization and cleanup processes. The processing is async and creates a transaction with the given transaction ID. Example for Daily deletion: If you have data on 2026-12-31 and before like 2026-10-10, 2025..., 2024... and on DELETE API you provide 2026-12-31. All data till month of nov 2026 (from the beginning of time) will be deleted. Data for 1-Dec-26 on wards if exists, will be unaffected. If you like to delete them, you need to provide a date, in this case one month in advance 2027-01-01. **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Volumes delete **Data Source Table Name:** Daily Measure Int. #### Parameters * `transaction` (query, string, required) Transaction ID specified by the sending system. The transaction API can be used to check the status of a deleted transaction. | Based on the given transaction ID, an implicit transaction is created. If no transaction is provided, the system creates a transaction. Minimum length: 1. Maximum length: 20. * `date` (path, string (date), required) Volumes before the month of the specified date is deleted. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "rcg_transaction": 65456 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete volumes of type decimal older than the specified date `DELETE /api/v68.0/volumes/daily/decimal/{date}` Operation ID: `Delete volumes of type decimal older than the specified date`. Tags: Volumes Management. Security: oauth\_2\_0. Delete volumes of type decimal older than the specified date. The processing is async and creates a transaction with the given transaction ID. Example for Daily deletion: If you have data on 2026-12-31 and before like 2026-10-10, 2025..., 2024... and on DELETE API you provide 2026-12-31. All data till month of nov 2026 (from the beginning of time) will be deleted. Data for 1-Dec-26 on wards if exists, will be unaffected. If you like to delete them, you need to provide a date, in this case one month in advance 2027-01-01. **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Volumes delete **Data Source Table Name:** Daily Measure Real. #### Parameters * `transaction` (query, string, required) Transaction ID specified by the sending system. The transaction API can be used to check the status of a deleted transaction. | Based on the given transaction ID, an implicit transaction is created. Minimum length: 1. Maximum length: 20. * `date` (path, string (date), required) The date until which you want to delete the volumes of type decimal data. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "rcg_transaction": 6655 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete volumes of type decimal with specific conditions on a daily basis that span the given time range `DELETE /api/v68.0/volumes/remove/daily/decimal/{measure}` Operation ID: `Delete volumes of type decimal on a daily basis that span the given time range`. Tags: Volumes Management. Security: oauth\_2\_0. Delete volumes of type decimal with specific conditions on a daily basis that span the given time range. **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Volumes delete **Data Source Table Name:** Daily Measure Real. #### Parameters * `measure` (path, string, required) Measure code as registered with the template API. Minimum length: 1. Maximum length: 4. * `datefrom` (query, string (date), required) The start date from which you want to delete volumes of type decimal on a daily basis. * `datethru` (query, string (date), required) The end date until which you want to delete volumes of type decimal on a daily basis. * `transaction` (query, string) Transaction ID specified by the sending system. The transaction ID can be used to request the delete request status using the transaction API. | A transaction is created for the given the transaction ID. If no transaction is provided, the system creates a transaction. Minimum length: 1. Maximum length: 20. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Request body (required) Media type: `application/json`. Schema: `array of object`. Array of `object`. Minimum items: 1. Maximum items: 100. * `acc` (_string_, required) Minimum length: 1. Maximum length: 255. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `prd` (_string_) Minimum length: 1. Maximum length: 255. Pattern: ^\[a-zA-Z0-9\_-\]+$. _Example_ ``` [ { "acc": "External_Account_Id_1", "prd": "External_Product_Id_1" }, { "acc": "External_Account_Id_5" } ] ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "txid": "TX000000000000000123" } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete volumes of type integer on a daily basis `DELETE /api/v68.0/volumes/remove/daily/integer/{measure}` Operation ID: `Delete volumes of type integer on a daily basis`. Tags: Volumes Management. Security: oauth\_2\_0. Delete volumes of type integer with specific conditions on a daily basis that span the given time range. **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Volumes delete **Data Source Table Name:** Daily Measure Int. #### Parameters * `measure` (path, string, required) Measure code as registered with the template API. Minimum length: 1. Maximum length: 4. * `datefrom` (query, string (date), required) The start date from which you want to delete volumes of type decimal on a daily basis. * `datethru` (query, string (date), required) The end date until which you want to delete volumes of type decimal on a daily basis. * `transaction` (query, string) Transaction ID specified by the sending system. The transaction API can be used to check the status of a deleted transaction. | Based on the given transaction ID, an implicit transaction is created. If no transaction is provided, the system creates a transaction. Minimum length: 1. Maximum length: 20. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Request body (required) Media type: `application/json`. Schema: `array of object`. Array of `object`. Minimum items: 1. Maximum items: 100. * `acc` (_string_, required) Minimum length: 1. Maximum length: 255. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `prd` (_string_) Minimum length: 1. Maximum length: 255. Pattern: ^\[a-zA-Z0-9\_-\]+$. _Example_ ``` [ { "acc": "External_Account_Id_1", "prd": "External_Product_Id_1" }, { "acc": "External_Account_Id_5" } ] ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "txid": "TX000000000000000123" } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get Promotion or Tactic Specific Actuals (volumes) on a weekly basis for a specified date `GET /api/v68.0/volumes/promotions/weeks/{measure}/{date}` Operation ID: `Get Promotion or Tactic Specific Actuals (volumes) on a weekly basis for a specified date`. Tags: Volumes Management. Security: oauth\_2\_0. Retrieve Promotion or Tactic Specific Actuals (volumes) on a weekly basis for a specified date. Both measure code and measure template configuration determine whether the result will be served by the integer or decimal store. The API uses pagination. For more information, see URI parameters. The API only returns a limited number of rows (500000). **Permission Role:** Volumes read **Data Source Table Name:** Promotion Tactic Weekly Measure Real. #### Parameters * `pagesize` (query, integer) Pagination parameter records per page. The default value is 10000. Default: `10000`. Minimum: 1000. Maximum: 50000. * `promotion` (query, string) Filter for a selected SF Promotion ID. Minimum length: 1. Maximum length: 18. * `keepalive` (query, integer) Specifies how long the requested pages are available in minutes. The default value is ten minutes. Default: `10`. Minimum: 5. Maximum: 60. * `salesorg` (query, string, required) Salesforce Org that is used to determine the correct periods (weeks and years) and the first day of each week and the first week of the year. The default value is usually 1 and 1. This controls how the data is assigned to weeks in the result and how it is read on the CGCloud cloud processing side. Minimum length: 4. Maximum length: 4. * `account` (query, string) Filter for the selected external account ID. Minimum length: 1. Maximum length: 255. * `tactic` (query, string) Filter for a selected Salesforce Tactic ID. Minimum length: 1. Maximum length: 18. * `product` (query, string) Filter for the selected external product ID. Minimum length: 1. Maximum length: 255. * `measure` (path, string, required) Measure code as registered with the template API. Minimum length: 1. Maximum length: 4. * `date` (path, string (date), required) A date within the week for which the data is requested. The valid format is yyyy-mm-dd #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "value": { "measures": [ { "value": 12.11, "acc": "External_Account_Id_2", "prd": "External_Product_Id_2", "prm": "a2ZXJ000000017C2AQ", "tac": "a3CXJ00000031fH2AQ" }, { "value": 55.55, "acc": "External_Account_Id_2", "prd": "External_Product_Id_3", "prm": "a2ZXJ000000017C2AQ", "tac": "TAC00500001" } ] } } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get Promotion or Tactic Specific Actuals (volumes) for a specified date `GET /api/v68.0/volumes/promotions/daily/{measure}/{date}` Operation ID: `Get Promotion or Tactic Specific Actuals (volumes) for a specified date`. Tags: Volumes Management. Security: oauth\_2\_0. Get Promotion or Tactic Specific Actuals (volumes) for a specified date. The measure code with the measure template configuration, determines whether the results are displayed in decimal or integer format. The API uses pagination. The API uses pagination. For more information, see URI parameters. The API only returns a limited number of rows (500000). **Permission Role:** Volumes read **Data Source Table Name:** Promotion Tactic Daily Measure Real #### Parameters * `pagesize` (query, integer) The number of records to display on each page. The default value is 10000 Default: `10000`. Minimum: 1000. Maximum: 50000. * `promotion` (query, string) The promotion ID from Salesforce. Minimum length: 1. Maximum length: 18. * `keepalive` (query, integer) Specify how long requested pages can be active in minutes. The default value is ten minutes. Default: `10`. Minimum: 5. Maximum: 60. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. The default is usually 1 and 1. This controls how the data is assigned to weeks in the result and how it is read on the CGCloud cloud processing side. Minimum length: 4. Maximum length: 4. * `account` (query, string) The account ID. Minimum length: 1. Maximum length: 255. * `tactic` (query, string) The tactic ID from Salesforce. Minimum length: 1. Maximum length: 18. * `product` (query, string) The product ID. Minimum length: 1. Maximum length: 255. * `measure` (path, string, required) The measure code that is registered with the template API. Minimum length: 1. Maximum length: 4. * `date` (path, string (date), required) The date for which the data is requested. The valid format is yyyy-mm-dd. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "value": { "measures": [ { "value": 12.11, "acc": "External_Account_Id_2", "prd": "External_Product_Id_2", "prm": "a2ZXJ000000017C2AQ", "tac": "a3CXJ00000031fH2AQ" }, { "value": 55.55, "acc": "External_Account_Id_2", "prd": "External_Product_Id_3", "prm": "a2ZXJ000000017C2AQ", "tac": "TAC00500001" } ] } } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get Promotion Actuals on a Weekly Basis `GET /api/v68.0/volumes/promotions/weekly/{measure}` Operation ID: `Get Promotion Actuals on a Weekly Basis`. Tags: Volumes Management. Security: oauth\_2\_0. This API fetches the promotion actuals on a weekly basis based on the parameters datefrom and datethru. These parameters filter the data for a time period. To further narrow down the response from this GET request, use additional filters to fetch the actual data. Actual data, for example, shipment data or consumption data from 3rd party providers such as point-of-sale systems, can be loaded to conduct post-event analysis on a promotion. **Permission Role:** Volumes read **Data Source Table Name:** promotiontacticweeklymeasurereal **Limits:** An API request can fetch upto 500,000 records of promotion actual data for each day. For example, if the API request mentions the time period of 10 days, then the response body would include 5,000,000 records. If the number of records per day is more than 500,000, then use filters to get best results. #### Parameters * `salesorg` (query, string, required) Enter the Sales Org ID. Minimum length: 4. Maximum length: 4. * `account` (query, string) Enter the External ID of the account. You can find this value in the Account page under Identification section. Minimum length: 1. Maximum length: 255. * `product` (query, string, required) Enter Consumer Goods External Product ID of the product. You can find this value in the Product page under Identification section. Minimum length: 1. Maximum length: 255. * `promotion` (query, string) The promotion ID from Salesforce. Minimum length: 18. Maximum length: 18. * `tactic` (query, string) Enter the tactic ID. See [Get Available Tactics for a Specified Promotion](https://developer.salesforce.com/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bavailable%2Btactics%2Bfor%2Ba%2Bspecified%2Bpromotion) to find the tactic ID. Minimum length: 1. Maximum length: 18. * `datefrom` (query, string (date), required) Enter the start date in YYYY-MM-DD format to fetch the promotion actuals data. The date entered as a query parameter is also included. * `datethru` (query, string (date), required) Enter the end date in YYYY-MM-DD format to fetch the promotion actuals data. The date entered as a query parameter is also included. * `id` (query, integer, required) Enter the ID of the records that have to be filtered. * `request_id` (query, integer, required) Enter a request ID to retrieve a specific page. This field must be used along with page. * `page` (query, integer, required) Enter the page number to retrieve a specific page. This field must be used along with request\_id. * `showmeta` (query, integer, required) Set this to true to show the metadata of measures. * `measure` (path, string, required) Enter the measure code of the KPI. The length of the measure code should be 4 characters. Minimum length: 4. Maximum length: 4. #### Responses * **200** The API request is successful. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "source": "promotiontacticweeklymeasure", "measurecode": "POSV", "measures": [ { "year": 2024, "week": 2, "datefrom": "2024-01-07", "datethru": "2024-01-14", "rows": [ { "prd": "External_Product_Id_1", "acc": "External_Account_Id_1", "prm": "a2ZXJ000000017C2AQ", "tac": "a3CXJ00000031fH2AQ", "id": "1", "value": 99 } ] }, { "year": 2024, "week": 3, "datefrom": "2024-01-15", "datethru": "2024-01-22", "rows": [ { "prd": "External_Product_Id_1", "acc": "External_Account_Id_1", "prm": "a2ZXJ000000017C2AQ", "tac": "a3CXJ00000031fH2AY", "id": "1", "value": 99 } ] } ], "meta": { "page": 0, "keepalive": 10, "pagesize": 1000, "page_count": 10, "this_page_count": 1000, "total": 9990, "total_records": 500000, "request_id": "b0dbe87b-b781-5f64-4106-aed29c1fbf6a", "originalurl": "/api/conditions/products/COGS?showmeta=true", "links": { "First": "/api/volumes/promotions/weekly/POSV?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=0", "Last": "/api/volumes/promotions/weekly/POSV?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=9", "Next": "/api/volumes/promotions/weekly/POSV?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=1" } } } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get Promotion Actuals on a Daily Basis `GET /api/v68.0/volumes/promotions/daily/{measure}` Operation ID: `Get Promotion Actuals on a Daily Basis`. Tags: Volumes Management. Security: oauth\_2\_0. Get Promotion Actuals on a Daily Basis **Permission Role:** Volumes read **Data Source Table Name:** promotiontacticdailymeasurereal **Limits:** An API request can fetch upto 500,000 records of promotion actuals data for each day. For example, if the API request mentions the time period of 10 days, then the response body would include 5,000,000 records. If the number of records per day is more than 500,000, then use filters to get best results. #### Parameters * `salesorg` (query, string, required) Enter the Sales Org ID. Minimum length: 4. Maximum length: 4. * `product` (query, string) Enter Consumer Goods External Product ID of the product. You can find this value in the Product page under Identification section. Minimum length: 1. Maximum length: 255. * `account` (query, string) Enter the External ID of the account. You can find this value in the Account page under Identification section. Minimum length: 1. Maximum length: 255. * `promotion` (query, string) The promotion ID from Salesforce. Minimum length: 18. Maximum length: 18. * `tactic` (query, string) Enter the tactic ID. See [Get Available Tactics for a Specified Promotion](https://developer.salesforce.com/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bavailable%2Btactics%2Bfor%2Ba%2Bspecified%2Bpromotion) to find the tactic ID. Minimum length: 1. Maximum length: 18. * `measure` (path, string, required) Enter the measure code of the KPI. The length of the measure code should be 4 characters. Minimum length: 4. Maximum length: 4. * `datefrom` (query, string (date)) Enter the start date in YYYY-MM-DD format to fetch the promotion actuals data. The date entered as a query parameter is also included. * `datethru` (query, string (date)) Enter the end date in YYYY-MM-DD format to fetch the promotion actuals data. The date entered as a query parameter is also included. * `id` (query, integer) Enter the ID of the records that have to be filtered. * `request_id` (query, integer) Enter a request ID to retrieve a specific page. This field must be used along with page. * `page` (query, integer) Enter the page number to retrieve a specific page. This field must be used along with request\_id. * `showmeta` (query, integer) Set this to true to show the metadata of measures. #### Responses * **200** The API request is successful. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "source": "promotiontacticdailymeasure", "measurecode": "POSV", "measures": [ { "date": "2024-12-10", "rows": [ { "prd": "External_Product_Id_1", "acc": "External_Account_Id_1", "prm": "a2ZXJ000000017C2AQ", "tac": "a3CXJ00000031fH2AQ", "id": "1", "value": 99 } ] }, { "date": "2024-12-11", "rows": [ { "prd": "External_Product_Id_1", "acc": "External_Account_Id_1", "prm": "a2ZXJ000000017C2AQ", "tac": "a3CXJ00000031fH2AY", "id": "1", "value": 99 } ] } ], "meta": { "page": 0, "keepalive": 10, "pagesize": 1000, "page_count": 10, "this_page_count": 1000, "total": 9990, "total_records": 400, "request_id": "b0dbe87b-b781-5f64-4106-aed29c1fbf6a", "originalurl": "/api/conditions/products/COGS?showmeta=true", "links": { "First": "/api/volumes/promotions/daily/POSV?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=0", "Last": "/api/volumes/promotions/daily/POSV?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=9", "Next": "/api/volumes/promotions/daily/POSV?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=1" } } } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete Promotion or Tactic Actual Data on a Daily Basis `DELETE /api/v68.0/volumes/promotions/daily/{measure}` Operation ID: `Delete Promotion or Tactic Actual Data on a Daily Basis`. Tags: Volumes Management. Security: oauth\_2\_0. Delete promotion and tactic actual data related to a measure code and salesorg at daily levels. The actual data is filtered through only query parameters such as product, promotion, and tactic that are provided in the API endpoint URL and it is deleted only for a single day. These parameters can be used individually or can be combined. If no parameters are provided, then the actual data related to the measure and the salesorg that are provided as query parameters is deleted. Before deleting the data, send an API request to get promotion actuals. This can serve as a backup of the promotion actuals that will be deleted. When the API request is sent, a transaction is registered with the transaction number mentioned as a query parameter. **Promotion and tactic identifiers:** The `promotion` and `tactic` query parameters accept either an 18-character Salesforce record ID or an External ID when you filter which actuals to remove. **Note:** You can use both ID formats in the same API call. When a promotion or tactic identifier exists as a Salesforce ID on one record and as an external ID on a different record, the system prioritizes the Salesforce ID match. This ensures the correct promotion or tactic is associated with the imported data. **Warning:** The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Volumes delete **Data Source Table Name:** Promotion Tactic Daily Measure Real **Combinations of Query Parameters** This API deletes actual data based on the query parameters provided in the API endpoint URL. Refer to the following combinations below: **Promotion and Product** The actual data retrieved after filtering it based on the promotion ID and the product ID mentioned in the query parameter is deleted. For example, /api/v68.0/volumes/promotions/daily/POSV?salesorg=0001&transaction=trans2&product=Ranch\_Dressing&promotion=a2YTC0000003wag2AA **Promotion and Tactic** The actual data retrieved after filtering it based on the promotion ID and the tactic ID mentioned in the query parameter is deleted. For example, /api/v68.0/volumes/promotions/daily/POSV??salesorg=0001&transaction=trans3&promotion=a2YTC0000003wan2AA&tactic=a3BTC0000003Mwm2AE **ID** The actual data retrieved after filtering it based on the record ID mentioned in the query parameter is deleted. For example, /api/v68.0/volumes/promotions/daily/POSV?salesorg=0001&transaction=trans13&id=23 **Promotion** The actual data retrieved after filtering it based on the promotion ID mentioned in the query parameter is deleted. For example, /api/v68.0/volumes/promotions/daily/POSV?salesorg=0001&transaction=trans2&promotion=a2YTC0000003wbc2AA **Product** The actual data retrieved after filtering it based on the product ID mentioned in the query parameter is deleted. For example, /api/v68.0/volumes/promotions/daily/POSV?salesorg=0001&transaction=trans4&product=Full\_Cream\_Big **Measure and Salesorg** The actual data retrieved after filtering it based on the measure code and the salesorg mentioned in the query parameter is deleted because there are no other query parameters such as product, promotion, or tactic to filter the actual data. For example, /api/v68.0/volumes/promotions/daily/POSV?salesorg=0001&transaction=trans2 #### Parameters * `measure` (path, string, required) Enter the measure code of the KPI. The length of the measure code should be 4 characters. Minimum length: 4. Maximum length: 4. * `salesorg` (query, string, required) Enter the Sales Org ID. Minimum length: 4. Maximum length: 4. * `transaction` (query, string, required) Enter a transaction ID. A transaction is registered when added as a query parameter. Minimum length: 1. Maximum length: 20. * `id` (query, string, required) Enter the record ID. The actual data associated with this record ID will be deleted. * `promotion` (query, string) Enter the promotion identifier. Values can be either the 18-character Salesforce record ID or the promotion's External ID. Minimum length: 1. Maximum length: 255. * `tactic` (query, string) Enter the tactic identifier. Values can be either the 18-character Salesforce record ID or the tactic's External ID. See [Get Available Tactics for a Specified Promotion](https://developer.salesforce.com/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bavailable%2Btactics%2Bfor%2Ba%2Bspecified%2Bpromotion) to find the tactic ID. Minimum length: 1. Maximum length: 255. * `product` (query, string, required) Enter Consumer Goods External Product ID of the product. You can find this value in the Product page under Identification section. Minimum length: 1. Maximum length: 255. #### Responses * **200** The API request is successful. Use the transaction ID to verify the status of this API request through the GET Transaction API. If the transaction state is COMMITTED, then the records are deleted successfully. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "txid": "trans11" } ``` * **400** The API request is not successful. Review the path and query parameters. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get Promotion or Tactic Specific Actuals (volumes) for a week of the year `GET /api/v68.0/volumes/promotions/weeks/{measure}/{year}/{week}` Operation ID: `Get Promotion or Tactic Specific Actuals (volumes) for a week of the year`. Tags: Volumes Management. Security: oauth\_2\_0. Retrieve Promotion or Tactic Specific Actuals (volumes) for a week of the year. The measure code with the measure template configuration, determines whether the results are displayed in decimal or integer format. The API uses pagination. The API uses pagination. For more information, see URI parameters. The API only returns a limited number of rows (500000). **Permission Role:** Volumes read **Data Source Table Name:** Promotion Tactic Weekly Measure Real #### Parameters * `pagesize` (query, integer) The pagination parameter to specify the number of records to display on each page. The default value is 10,000 records per page. Default: `10000`. Minimum: 1000. Maximum: 50000. * `promotion` (query, string) The ID of the Salesforce promotion record Minimum length: 1. Maximum length: 18. * `keepalive` (query, integer) Specify how long requested pages can be active in minutes. The default value is ten minutes. Default: `10`. Minimum: 5. Maximum: 60. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. Minimum length: 4. Maximum length: 4. * `account` (query, string) The account ID. Minimum length: 1. Maximum length: 255. * `tactic` (query, string) The tactic ID from Salesforce. Minimum length: 1. Maximum length: 18. * `product` (query, string) The product ID. Minimum length: 1. Maximum length: 255. * `measure` (path, string, required) The measure code as registered with the template API. Minimum length: 1. Maximum length: 4. * `year` (path, string, required) The yYear in the fomat YYYY. Minimum length: 4. Maximum length: 4. * `week` (path, integer, required) The week of the year. The week number ranges from 1 to 52. Minimum: 1. Maximum: 52. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "value": { "measures": [ { "value": 12.11, "acc": "External_Account_Id_2", "prd": "External_Product_Id_2", "prm": "a2ZXJ000000017C2AQ", "tac": "a3CXJ00000031fH2AQ" }, { "value": 55.55, "acc": "External_Account_Id_2", "prd": "External_Product_Id_3", "prm": "a2ZXJ000000017C2AQ", "tac": "a3CXJ00000031fH2AY" } ] } } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete Promotion or Tactic Specific Actuals (volumes) on a daily basis older than the specified date `DELETE /api/v68.0/volumes/promotions/daily/decimal/{date}` Operation ID: `Delete Promotion or Tactic Specific Actuals (volumes) on daily basis older than the specified date`. Tags: Volumes Management. Security: oauth\_2\_0. Delete Promotion and Tactic Specific Actuals (volumes) on a daily basis that are older than the specified date. The processing is async, and it implicitly creates a transaction with the given ID. Example for Daily deletion: If you have data on 2026-12-31 and before like 2026-10-10, 2025..., 2024... and on DELETE API you provide 2026-12-31. All data till month of nov 2026 (from the beginning of time) will be deleted. Data for 1-Dec-26 on wards if exists, will be unaffected. If you like to delete them, you need to provide a date, in this case one month in advance 2027-01-01. **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Volumes delete **Data Source Table Name:** Promotion Tactic Daily Measure Real #### Parameters * `transaction` (query, string, required) The transaction ID specified by the sending system. The transaction API can be used to check the status of a deleted transaction. | Based on the given transaction ID, an implicit transaction is created. Minimum length: 1. Maximum length: 20. * `date` (path, string (date), required) The date until which you want to delete the volumes on a daily basis. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "rcg_transaction": 6655 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete Promotion or Tactic Actual Data in Bulk on a Daily Basis `DELETE /api/v68.0/volumes/promotions/daily/bulk/{measure}` Operation ID: `Delete Promotion or Tactic Actual Data in Bulk on a Daily Basis`. Tags: Volumes Management. Security: oauth\_2\_0. Cleanup promotion and tactic actual data related to a measure code and salesorg at daily levels. The actual data is filtered through parameters such as product, promotion, and tactic that are provided in the request body and it is deleted for a set of days. These parameters can be used individually or can be combined in the request body. For example, the request body can include only a promotion ID to delete the actual data related to it. Similarly, a combination of a promotion ID and a tactic ID in the request body filters the actual data and then deletes it. If no parameters are provided in the payload, the actual data related to the measure and the salesorg that are provided as query parameters is deleted. Before deleting the data, send an API request to get promotion actuals. This can serve as a backup of the promotion actuals that will be deleted. When the API request is sent, a transaction is registered with the transaction number mentioned as a query parameter. **Promotion and tactic identifiers:** In each request body object, the `promotion` and `tactic` fields accept either an 18-character Salesforce record ID or an External ID when you filter which actuals to remove. **Note:** You can use both ID formats in the same API call. When a promotion or tactic identifier exists as a Salesforce ID on one record and as an external ID on a different record, the system prioritizes the Salesforce ID match. This ensures the correct promotion or tactic is associated with the imported data. **Warning:** The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Volumes delete **Data Source Table Name:** Promotion Tactic Daily Measure Real #### Parameters * `measure` (path, string, required) Enter the measure code of the KPI. The length of the measure code should be 4 characters. Minimum length: 4. Maximum length: 4. * `salesorg` (query, string, required) Enter the Sales Org ID. Minimum length: 4. Maximum length: 4. * `transaction` (query, string, required) Enter a transaction ID. A transaction is registered when added as a query parameter. Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `array of object`. Array of `object`. * `id` (_string_) Enter the record ID. The actual data associated with this record ID will be deleted. * `promotion` (_string_) Enter the promotion identifier. Values can be either the 18-character Salesforce record ID (for example, 'a2ZXJ000000017C2AQ') or the promotion's External ID. Minimum length: 1. Maximum length: 255. * `tactic` (_string_) Enter the tactic identifier. Values can be either the 18-character Salesforce record ID (for example, 'a3CXJ00000031e32AA') or the tactic's External ID. See [Get Available Tactics for a Specified Promotion](https://developer.salesforce.com/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bavailable%2Btactics%2Bfor%2Ba%2Bspecified%2Bpromotion) to find the tactic ID. Minimum length: 1. Maximum length: 255. * `product` (_string_) Enter Consumer Goods External Product ID of the product. You can find this value in the Product page under Identification section. Minimum length: 1. Maximum length: 255. _Example_ ``` [ { "id": "3475" }, { "promotion": "a2ZXJ000000017C2AQ", "tactic": "a3CXJ00000031e32AA" }, { "promotion": "PRM_EXTERNAL_001", "tactic": "TAC_EXTERNAL_001" }, { "product": "External_Product_Id_1" } ] ``` #### Responses * **200** The API request is successful. Use the transaction ID to verify the status of this API request through the GET Transaction API. If the transaction state is COMMITTED, then the records are deleted successfully. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "txid": "trans11" } ``` * **400** The API request is not successful. Review the query parameters. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete Promotion or Tactic Specific Actuals (volumes) on a weekly basis for a year ending before the given date `DELETE /api/v68.0/volumes/promotions/weeks/decimal/{date}` Operation ID: `Delete Promotion or Tactic Specific Actuals (volumes) on a weekly basis for a year ending before the given date`. Tags: Volumes Management. Security: oauth\_2\_0. Delete Promotion and Tactic Specific Actuals (volumes) on a weekly basis for a year ending before the given date. The API is used for reorganization and cleanup processes. The processing is async, and it implicitly creates a transaction with the given ID. Example for weekly deletion: If you have data on 2026 for week 1 till 52 and before like 2025..., 2024... and on DELETE API you provide 2026-12-31. All data less than 2026 will be deleted, like 2025..., 2024..., data for 2026 with all weeks are not deleted. If you like to delete them, you need to provide a date, in this case one day in advance like 2027-01-02 to hit all previous weeks records for the year 2026 **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Volumes delete **Data Source Table Name:** Promotion Tactic Weekly Measure Real #### Parameters * `transaction` (query, string, required) The transaction ID specified by the sending system. The transaction API can be used to check the status of a deleted transaction. | Based on the given transaction ID, an implicit transaction is created. Minimum length: 1. Maximum length: 20. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. The default value is usually 1 and 1. This controls how the data is assigned to weeks in the result and how it is read on the CGCloud cloud processing side. Minimum length: 4. Maximum length: 4. * `date` (path, string (date), required) Promotion or Tactic Specific Actuals (volumes) prior to that date are deleted if they are older than the corresponding year. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "rcg_transaction": 6655 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete Promotion or Tactic Actual Data on a Weekly Basis `DELETE /api/v68.0/volumes/promotions/week/{measure}` Operation ID: `Delete Promotion or Tactic Actual Data on a Weekly Basis`. Tags: Volumes Management. Security: oauth\_2\_0. Delete promotion and tactic actual data related to a measure code and salesorg at weekly levels. The actual data is filtered through only query parameters such as product, promotion, and tactic that are provided in the API endpoint URL and it is deleted only for a single week. These parameters can be used individually or can be combined. If no parameters are provided, then the actual data related to the measure and the salesorg that are provided as query parameters is deleted. Before deleting the data, send an API request to get promotion actuals. This can serve as a backup of the promotion actuals that will be deleted. When the API request is sent, a transaction is registered with the transaction number mentioned as a query parameter. **Promotion and tactic identifiers:** The `promotion` and `tactic` query parameters accept either an 18-character Salesforce record ID or an External ID when you filter which actuals to remove. **Note:** You can use both ID formats in the same API call. When a promotion or tactic identifier exists as a Salesforce ID on one record and as an external ID on a different record, the system prioritizes the Salesforce ID match. This ensures the correct promotion or tactic is associated with the imported data. **Warning:** The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Volumes delete **Data Source Table Name:** Promotion Tactic Weekly Measure Real **Combinations of Query Parameters** This API deletes actual data based on the query parameters provided in the API endpoint URL. Refer to the following combinations below: **Promotion and Product** The actual data retrieved after filtering it based on the promotion ID and the product ID mentioned in the query parameter is deleted. For example, /api/v68.0/volumes/promotions/daily/POSV?salesorg=0001&transaction=trans2&product=Ranch\_Dressing&promotion=a2YTC0000003wag2AA **Promotion and Tactic** The actual data retrieved after filtering it based on the promotion ID and the tactic ID mentioned in the query parameter is deleted. For example, /api/v68.0/volumes/promotions/daily/POSV??salesorg=0001&transaction=trans3&promotion=a2YTC0000003wan2AA&tactic=a3BTC0000003Mwm2AE **ID** The actual data retrieved after filtering it based on the record ID mentioned in the query parameter is deleted. For example, /api/v68.0/volumes/promotions/daily/POSV?salesorg=0001&transaction=trans13&id=23 **Promotion** The actual data retrieved after filtering it based on the promotion ID mentioned in the query parameter is deleted. For example, /api/v68.0/volumes/promotions/daily/POSV?salesorg=0001&transaction=trans2&promotion=a2YTC0000003wbc2AA **Product** The actual data retrieved after filtering it based on the product ID mentioned in the query parameter is deleted. For example, /api/v68.0/volumes/promotions/daily/POSV?salesorg=0001&transaction=trans4&product=Full\_Cream\_Big **Measure and Salesorg** The actual data retrieved after filtering it based on the measure code and the salesorg mentioned in the query parameter is deleted because there are no other query parameters such as product, promotion, or tactic to filter the actual data. For example, /api/v68.0/volumes/promotions/daily/POSV?salesorg=0001&transaction=trans2 #### Parameters * `measure` (path, string, required) Enter the measure code of the KPI. The length of the measure code should be 4 characters. Minimum length: 4. Maximum length: 4. * `salesorg` (query, string, required) Enter the Sales Org ID. Minimum length: 4. Maximum length: 4. * `transaction` (query, string, required) Enter a transaction ID. A transaction is registered when added as a query parameter. Minimum length: 1. Maximum length: 20. * `id` (query, string, required) Enter the record ID. The actual data associated with this record ID will be deleted. * `promotion` (query, string) Enter the promotion identifier. Values can be either the 18-character Salesforce record ID or the promotion's External ID. Minimum length: 1. Maximum length: 255. * `tactic` (query, string) Enter the tactic identifier. Values can be either the 18-character Salesforce record ID or the tactic's External ID. See [Get Available Tactics for a Specified Promotion](https://developer.salesforce.com/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bavailable%2Btactics%2Bfor%2Ba%2Bspecified%2Bpromotion) to find the tactic ID. Minimum length: 1. Maximum length: 255. * `product` (query, string, required) Enter Consumer Goods External Product ID of the product. You can find this value in the Product page under Identification section. Minimum length: 1. Maximum length: 255. #### Responses * **200** The API request is successful. Use the transaction ID to verify the status of this API request through the GET Transaction API. If the transaction state is COMMITTED, then the records are updated successfully. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "txid": "trans11" } ``` * **400** The API request is not successful. Review the query parameters. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete Promotion or Tactic Actual Data in Bulk on a Weekly Basis `DELETE /api/v68.0/volumes/promotions/week/bulk/{measure}` Operation ID: `Delete Promotion or Tactic Actual Data in Bulk on a Weekly Basis`. Tags: Volumes Management. Security: oauth\_2\_0. Cleanup promotion and tactic actual data related to a measure code and salesorg at weekly levels. The actual data is filtered through parameters such as product, promotion, and tactic that are provided in the request body and it is deleted for a set of weeks. These parameters can be used individually or can be combined in the request body. For example, the request body can include only promotion ID to delete the actual data related to it. Similarly, a combination of a promotion ID and a tactic ID in the request body filters the actual data and then deletes it. If no parameters are provided in the payload, the actual data related to the measure and the salesorg that are provided as query parameters is deleted. Before deleting the data, send an API request to get promotion actuals. This can serve as a backup of the promotion actuals that will be deleted. When the API request is sent, a transaction is registered with the transaction number mentioned as a query parameter. **Promotion and tactic identifiers:** In each request body object, the `promotion` and `tactic` fields accept either an 18-character Salesforce record ID or an External ID when you filter which actuals to remove. **Note:** You can use both ID formats in the same API call. When a promotion or tactic identifier exists as a Salesforce ID on one record and as an external ID on a different record, the system prioritizes the Salesforce ID match. This ensures the correct promotion or tactic is associated with the imported data. **Warning:** The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Volumes delete **Data Source Table Name:** Promotion Tactic Weekly Measure Real **Limits** 10,000 items or combinations in the request body. #### Parameters * `measure` (path, string, required) Enter the measure code of the KPI. The length of the measure code should be 4 characters. Minimum length: 4. Maximum length: 4. * `salesorg` (query, string, required) Enter the Sales Org ID. Minimum length: 4. Maximum length: 4. * `transaction` (query, string, required) Enter a transaction ID. A transaction is registered when added as a query parameter. Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `array of object`. Array of `object`. * `id` (_string_) Enter the record ID. The actual data associated with this record ID will be deleted. * `promotion` (_string_) Enter the promotion identifier. Values can be either the 18-character Salesforce record ID (for example, 'a2ZXJ000000017C2AQ') or the promotion's External ID. Minimum length: 1. Maximum length: 255. * `tactic` (_string_) Enter the tactic identifier. Values can be either the 18-character Salesforce record ID (for example, 'a3CXJ00000031e32AA') or the tactic's External ID. See [Get Available Tactics for a Specified Promotion](https://developer.salesforce.com/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bavailable%2Btactics%2Bfor%2Ba%2Bspecified%2Bpromotion) to find the tactic ID. Minimum length: 1. Maximum length: 255. * `product` (_string_) Enter Consumer Goods External Product ID of the product. You can find this value in the Product page under Identification section. Minimum length: 1. Maximum length: 255. _Example_ ``` [ { "id": "3475" }, { "promotion": "a2ZXJ000000017C2AQ", "tactic": "a3CXJ00000031e32AA" }, { "promotion": "PRM_EXTERNAL_001", "tactic": "TAC_EXTERNAL_001" }, { "product": "External_Product_Id_1" } ] ``` #### Responses * **200** The API request is successful. Use the transaction ID to verify the status of this API request through the GET Transaction API. If the transaction state is COMMITTED, then the records are deleted successfully. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "txid": "trans11" } ``` * **400** The API request is not successful. Review the query parameters. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Send Promotion or Tactic Specific Actuals (volumes) of type decimal on a weekly basis for a registered transaction `POST /api/v68.0/volumes/promotions/weeks/date/decimal` Operation ID: `Send Promotion or Tactic Specific Actuals (volumes) of type decimal on a weekly basis for a registered transaction`. Tags: Volumes Management. Security: oauth\_2\_0. Send a new actual value, update the old actual value, or change the existing actual value to null for a measure on a weekly basis. After the actual values are added or updated, they can be compared against the planned values to determine a promotion or tactic’s performance. Actual values can also be updated on a daily basis. See [Send Promotion or Tactic Specific Actuals (volumes) of type decimal on a daily basis for a registered transaction](https://developer.salesforce.com/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2BPromotion%2Bor%2BTactic%2BSpecific%2BActuals%2B\(volumes\)%2Bof%2Btype%2Bdecimal%2Bon%2Ba%2Bdaily%2Bbasis%2Bfor%2Ba%2Bregistered%2Btransaction). As a prerequisite, a transaction should be registered and added as a query parameter. For more information, see [Register a Transaction ID](https://developer.salesforce.com/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Register%2Ba%2Btransaction%2BID). **Promotion and tactic identifiers:** In each volume row, the `prm` (promotion) and `tac` (tactic) fields accept either an 18-character Salesforce record ID or an External ID. **Note:** You can use both ID formats in the same API call. When a promotion or tactic identifier exists as a Salesforce ID on one record and as an external ID on a different record, the system prioritizes the Salesforce ID match. This ensures the correct promotion or tactic is associated with the imported data. **Permission Role:** Volumes write **Data Source Table Name:** Promotion Tactic Weekly Measure Real #### Parameters * `transaction` (query, string, required) Transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_, required) Enter the measure code of the KPI that requires an update. The length of the measure code should be 4 characters. * `salesorg` (_string_, required) Enter the Sales Org ID. The length of the Sales Org ID should be 4 characters. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `volumes` (_array of object_, required) * `startdate` (_string (date)_, required) Enter the date in YYYY-MM-DD format for which the promotion or tactic value has to be updated. * `rows` (_array of object_, required) * `prd` (_string_) Enter Consumer Goods External Product ID of the product. You can find this value in the Product page under Identification section. Minimum length: 1. Maximum length: 255. * `acc` (_string_) Enter the External ID of the account. You can find this value in the Account page under Identification section. Minimum length: 1. Maximum length: 255. * `prm` (_string_) Enter the promotion identifier. Values can be either the 18-character Salesforce record ID (for example, 'a2ZXJ000000017C2AQ') or the promotion's External ID. Minimum length: 1. Maximum length: 255. * `tac` (_string_) Enter the tactic identifier. Values can be either the 18-character Salesforce record ID (for example, 'a3CXJ00000031cq2AA') or the tactic's External ID. Optional when you send promotion-level data only. Minimum length: 1. Maximum length: 255. _Example_ ``` { "type": "b002", "salesorg": "CL03", "volumes": [ { "startdate": "2016-01-01", "rows": [ { "prd": "External_Product_Id_2", "acc": "External_Account_Id_1", "prm": "a2ZXJ000000017E2AQ", "tac": "a3CXJ00000031cq2AA", "value": null }, { "prd": "External_Product_Id_3", "acc": "External_Account_Id_2", "prm": "PRM_EXTERNAL_001", "tac": "TAC_EXTERNAL_001", "value": 2.45 }, { "prd": "External_Product_Id_3", "acc": "External_Account_Id_2", "prm": "a2ZXJ000000017M2AQ", "tac": "a3CXJ00000031cV2AQ", "value": 2.45 } ] }, { "startdate": "2016-01-08", "rows": [ { "prd": "External_Product_Id_4", "acc": "External_Account_Id_3", "prm": "a2ZXJ000000014o2AA", "tac": "a3CXJ00000031ff2AA", "value": 3.882 }, { "prd": "External_Product_Id_5", "acc": "External_Account_Id_4", "prm": "PRM_EXTERNAL_002", "tac": "TAC_EXTERNAL_002", "value": 4.12 }, { "prd": "External_Product_Id_8", "acc": "External_Account_Id_7", "prm": "a2ZXJ000000014f2AA", "tac": "a3CXJ00000031ff2AA", "value": 5 } ] } ] } ``` #### Responses * **200** The API request is successful. Use the transaction ID to verify the status of this API request through the [GET Transaction API](https://developer.salesforce.com/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bstatus%2Bfor%2Ba%2Btransaction%2BID). If the transaction state is **COMMITTED**, then the records are updated successfully. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Blocks received: 2", "messageid": 515 } ``` * **400** The API request is not successful. Review the payload and the transaction ID. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Send Promotion or Tactic Specific Actuals (volumes) of type decimal on a daily basis for a registered transaction `POST /api/v68.0/volumes/promotions/daily/date/decimal` Operation ID: `Send Promotion or Tactic Specific Actuals (volumes) of type decimal on a daily basis for a registered transaction`. Tags: Volumes Management. Security: oauth\_2\_0. Send a new actual value, update the old actual value, or change the existing actual value to null for a measure on a daily basis. After the actual values are added or updated, they can be compared against the planned values to determine a promotion or tactic’s performance. Actual values can also be updated on a weekly basis. See [Send Promotion or Tactic Specific Actuals (volumes) of type decimal on a weekly basis for a registered transaction](https://developer.salesforce.com/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2BPromotion%2Bor%2BTactic%2BSpecific%2BActuals%2B\(volumes\)%2Bof%2Btype%2Bdecimal%2Bon%2Ba%2Bweekly%2Bbasis%2Bfor%2Ba%2Bregistered%2Btransaction). As a prerequisite, a transaction should be registered and added as a query parameter. For more information, see [Register a Transaction ID](https://developer.salesforce.com/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Register%2Ba%2Btransaction%2BID). **Promotion and tactic identifiers:** In each volume row, the `prm` (promotion) and `tac` (tactic) fields accept either an 18-character Salesforce record ID or an External ID. **Note:** You can use both ID formats in the same API call. When a promotion or tactic identifier exists as a Salesforce ID on one record and as an external ID on a different record, the system prioritizes the Salesforce ID match. This ensures the correct promotion or tactic is associated with the imported data. **Permission Role:** Volumes write **Data Source Table Name:** Promotion Tactic Daily Measure Real #### Parameters * `transaction` (query, string, required) The transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_, required) Enter the measure code of the KPI that requires an update. The length of the measure code should be 4 characters. * `salesorg` (_string_, required) Enter the Sales Org ID. The length of the Sales Org ID should be 4 characters. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `volumes` (_array of object_, required) * `startdate` (_string (date)_, required) Enter the date in YYYY-MM-DD format for which the promotion or tactic value has to be updated. * `rows` (_array of object_, required) * `prd` (_string_) Enter Consumer Goods External Product ID of the product. You can find this value in the Product page under Identification section. Minimum length: 1. Maximum length: 255. * `acc` (_string_) Enter the External ID of the account. You can find this value in the Account page under Identification section. Minimum length: 1. Maximum length: 255. * `prm` (_string_) Enter the promotion identifier. Values can be either the 18-character Salesforce record ID (for example, 'a2ZXJ000000017C2AQ') or the promotion's External ID. Minimum length: 1. Maximum length: 255. * `tac` (_string_) Enter the tactic identifier. Values can be either the 18-character Salesforce record ID (for example, 'a3CXJ00000031cq2AA') or the tactic's External ID. Optional when you send promotion-level data only. Minimum length: 1. Maximum length: 255. _Example_ ``` { "type": "b002", "salesorg": "CL03", "volumes": [ { "startdate": "2016-01-01", "rows": [ { "prd": "External_Product_Id_2", "acc": "External_Account_Id_1", "prm": "a2ZXJ000000017E2AQ", "tac": "a3CXJ00000031cq2AA", "value": null }, { "prd": "External_Product_Id_3", "acc": "External_Account_Id_2", "prm": "PRM_EXTERNAL_001", "tac": "TAC_EXTERNAL_001", "value": 2.45 }, { "prd": "External_Product_Id_3", "acc": "External_Account_Id_2", "prm": "a2ZXJ000000017M2AQ", "tac": "a3CXJ00000031cV2AQ", "value": 2.45 } ] }, { "startdate": "2016-01-08", "rows": [ { "prd": "External_Product_Id_4", "acc": "External_Account_Id_3", "prm": "a2ZXJ000000014o2AA", "tac": "a3CXJ00000031ff2AA", "value": 3.882 }, { "prd": "External_Product_Id_5", "acc": "External_Account_Id_4", "prm": "PRM_EXTERNAL_002", "tac": "TAC_EXTERNAL_002", "value": 4.12 }, { "prd": "External_Product_Id_8", "acc": "External_Account_Id_7", "prm": "a2ZXJ000000014f2AA", "tac": "a3CXJ00000031ff2AA", "value": 5 } ] } ] } ``` #### Responses * **200** The API request is successful. Use the transaction ID to verify the status of this API request through the [GET Transaction API](https://developer.salesforce.com/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Get%2Bstatus%2Bfor%2Ba%2Btransaction%2BID). If the transaction state is **COMMITTED**, then the records are updated successfully. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Blocks received: 2", "messageid": 515 } ``` * **400** The API request is not successful. Review the payload and the transaction ID. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Send Promotion or Tactic Specific Actuals (volumes) on weekly level with type decimal values for a registered transaction `POST /api/v68.0/volumes/promotions/weeks/week/decimal` Operation ID: `Send Promotion or Tactic Specific Actuals (volumes) on weekly level with type decimal values for a registered transaction`. Tags: Volumes Management. Security: oauth\_2\_0. Send a new actual value, update the old actual value, or change the existing actual value to null for a measure. This API updates the measure based on the year and week value provided in the input payload. For example, you can use this API to update a measure for the year 2015 and week number 42. After the actual values are added or updated, they can be compared against the planned values to determine a promotion or tactic’s performance. Actual values can also be updated on a daily or weekly basis. See [Send Promotion or Tactic Specific Actuals (volumes) of type decimal on a daily basis for a registered transaction](https://developer.salesforce.com/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2BPromotion%2Bor%2BTactic%2BSpecific%2BActuals%2B\(volumes\)%2Bof%2Btype%2Bdecimal%2Bon%2Ba%2Bdaily%2Bbasis%2Bfor%2Ba%2Bregistered%2Btransaction) and [Send Promotion or Tactic Specific Actuals (volumes) of type decimal on a weekly basis for a registered transaction](https://developer.salesforce.com/docs/industries/rcgps-integration-service/references/rcgintsrvc-apis?meta=Send%2BPromotion%2Bor%2BTactic%2BSpecific%2BActuals%2B\(volumes\)%2Bof%2Btype%2Bdecimal%2Bon%2Ba%2Bweekly%2Bbasis%2Bfor%2Ba%2Bregistered%2Btransaction). **Promotion and tactic identifiers:** In each volume row, the `prm` (promotion) and `tac` (tactic) fields accept either an 18-character Salesforce record ID or an External ID. **Note:** You can use both ID formats in the same API call. When a promotion or tactic identifier exists as a Salesforce ID on one record and as an external ID on a different record, the system prioritizes the Salesforce ID match. This ensures the correct promotion or tactic is associated with the imported data. **Permission Role:** Volumes write **Data Source Table Name:** Promotion Tactic Weekly Measure Real. #### Parameters * `transaction` (query, string, required) Transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_, required) Enter the measure code of the KPI that requires an update. The length of the measure code should be 4 characters. * `salesorg` (_string_, required) Enter the Sales Org ID. The length of the Sales Org ID should be 4 characters. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `volumes` (_array of object_, required) * `year` (_number_, required) Enter the year for which the measure is required to be updated. * `week` (_number_, required) Enter the week number for which the measure is required to be updated. * `rows` (_array of object_, required) * `prd` (_string_) Enter Consumer Goods External Product ID of the product. You can find this value in the Product page under Identification section. Minimum length: 1. Maximum length: 255. * `acc` (_string_) Enter the External ID of the account. You can find this value in the Account page under Identification section. Minimum length: 1. Maximum length: 255. * `prm` (_string_) Enter the promotion identifier. Values can be either the 18-character Salesforce record ID (for example, 'a2ZXJ000000017C2AQ') or the promotion's External ID. Minimum length: 1. Maximum length: 255. * `tac` (_string_) Enter the tactic identifier. Values can be either the 18-character Salesforce record ID (for example, 'a3CXJ00000031cq2AA') or the tactic's External ID. Optional when you send promotion-level data only. Minimum length: 1. Maximum length: 255. _Example_ ``` { "type": "b002", "salesorg": "CL03", "volumes": [ { "year": 2016, "week": 45, "rows": [ { "prd": "External_Product_Id_2", "acc": "External_Account_Id_1", "prm": "a2ZXJ000000017C2AQ", "tac": "a3CXJ00000031e32AA", "value": null }, { "prd": "External_Product_Id_3", "acc": "External_Account_Id_2", "prm": "PRM_EXTERNAL_001", "tac": "TAC_EXTERNAL_001", "value": 2.45 }, { "prd": "External_Product_Id_3", "acc": "External_Account_Id_2", "prm": "a2ZXJ000000014D2AQ", "tac": "a3CXJ00000031e32AA", "value": 2.11 } ] }, { "year": 2016, "week": 46, "rows": [ { "prd": "External_Product_Id_4", "acc": "External_Account_Id_3", "prm": "a2ZXJ000000014f2AA", "tac": "a3CXJ00000031eb2AA", "value": 3.45 }, { "prd": "External_Product_Id_5", "acc": "External_Account_Id_4", "prm": "PRM_EXTERNAL_003", "tac": "TAC_EXTERNAL_003", "value": 4.69 }, { "prd": "External_Product_Id_8", "acc": "External_Account_Id_7", "prm": "a2ZXJ000000014f2AA", "value": 5.23 } ] } ] } ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Blocks received: 2", "messageid": 515 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Send product prices for a registered transaction `POST /api/v68.0/conditions/products/prices` Operation ID: `Send product prices for a registered transaction`. Tags: Condition Management. Security: oauth\_2\_0. Send product prices for a registered transaction. The type within the JSON payload must be a registered measure for product measures. If no datefrom or datethru is specified, the default are 1800-01-01 and 9999-12-31. Mixed mode without dates and dates is not supported. Only systems that do not support timebound values can use without date. Date from and date through according to ([https://tools.ietf.org/html/rfc3339#section-5.6](https://tools.ietf.org/html/rfc3339#section-5.6)). The API supports a complete mode given with the transaction, deleting all product conditions for products existing in the transaction. **Permission Role:** Conditions write **Data Source Table Name:** Product Measure #### Parameters * `transaction` (query, string, required) The transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_) * `salesorg` (_string_, required) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `prices` (_array of object_) * `prd` (_string_) Pattern: ^\[a-zA-Z0-9\_-\]+$. * `value` (_number_) Minimum: -2147483647. Maximum: 2147483647. * `datefrom` (_string (date)_) * `datethru` (_string (date)_) _Example_ ``` { "type": "COGS", "salesorg": "0001", "prices": [ { "prd": "External_Product_Id_9", "value": 5, "datefrom": "2016-01-01", "datethru": "2017-01-01" }, { "prd": "External_Product_Id_9", "value": 5, "datefrom": "2016-01-01", "datethru": "2017-01-01" }, { "prd": "External_Product_Id_9", "value": 75, "datefrom": "2016-01-01", "datethru": "2017-01-01" } ] } ``` #### Responses * **201** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Rows received: 3", "messageid": 515 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Send product discounts for a registered transaction `POST /api/v68.0/conditions/products/discounts` Operation ID: `Send product discounts for a registered transaction`. Tags: Condition Management. Security: oauth\_2\_0. Send product discounts for a registered transaction. The type within the JSON payload must be a registered measure for product measures. If no datefrom or datethru is specified, the default are 1800-01-01 and 9999-12-31. Mixed mode without dates and dates is not supported. Only systems that do not support timebound values can use without date. The API supports a complete mode, which deletes all account or product conditions for existing products in the transaction. | Date from and date thru according to ([https://tools.ietf.org/html/rfc3339#section-5.6](https://tools.ietf.org/html/rfc3339#section-5.6)). **Permission Role:** Conditions write **Data Source Table Name:** Product Measure #### Parameters * `transaction` (query, string, required) The transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_) * `salesorg` (_string_, required) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `discounts` (_array of object_) * `prd` (_string_) Pattern: ^\[a-zA-Z0-9\_-\]+$. * `value` (_number_) Minimum: 0. Maximum: 100. * `datefrom` (_string (date)_) * `datethru` (_string (date)_) _Example_ ``` { "type": "COGS", "salesorg": "0001", "discounts": [ { "prd": "External_Product_Id_9", "value": 5, "datefrom": "2016-01-01", "datethru": "2017-01-01" }, { "prd": "External_Product_Id_9", "value": 5, "datefrom": "2016-01-01", "datethru": "2017-01-01" }, { "prd": "External_Product_Id_9", "value": 75, "datefrom": "2016-01-01", "datethru": "2017-01-01" } ] } ``` #### Responses * **201** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Rows received: 3", "messageid": 515 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Send account discounts for a registered transaction `POST /api/v68.0/conditions/accounts/discounts` Operation ID: `Send account discounts for a registered transaction`. Tags: Condition Management. Security: oauth\_2\_0. Send account discounts for a registered transaction. The type within the JSON payload must be a registered measure for product measures. If no datefrom or datethru is specified, the default are 1800-01-01 and 9999-12-31. Mixed mode without dates and dates is not supported. Only systems that do not support timebound values can use without date. The API supports a complete mode, which deletes all account or product conditions for existing account in the transaction.| Date from and date thru according to ([https://tools.ietf.org/html/rfc3339#section-5.6](https://tools.ietf.org/html/rfc3339#section-5.6)). **Permission Role:** Conditions write **Data Source Table Name:** Account Measure #### Parameters * `transaction` (query, string, required) The transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_) * `salesorg` (_string_, required) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `discounts` (_array of object_) * `acc` (_string_) Pattern: ^\[a-zA-Z0-9\_-\]+$. * `value` (_number_) Minimum: 0. Maximum: 100. * `datefrom` (_string (date)_) * `datethru` (_string (date)_) _Example_ ``` { "type": "COGS", "salesorg": "0001", "discounts": [ { "acc": "External_Account_Id_8", "value": 5, "datefrom": "2016-01-01", "datethru": "2017-01-01" }, { "acc": "External_Account_Id_9", "value": 5, "datefrom": "2016-01-01", "datethru": "2017-01-01" }, { "acc": "External_Account_Id_10", "value": 75, "datefrom": "2016-01-01", "datethru": "2017-01-01" } ] } ``` #### Responses * **201** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Rows received: 3", "messageid": 515 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Send account costs for a registered transaction `POST /api/v68.0/conditions/accounts/costs` Operation ID: `Send account costs for a registered transaction`. Tags: Condition Management. Security: oauth\_2\_0. Send account costs for a registered transaction. The type within JSON payload must be a registered measure for account measures. If no datefrom or datethru is specified, the default are 1800-01-01 and 9999-12-31. Mixed mode without dates and dates is not supported. Only systems that do not support timebound values can use without date. The API supports a complete mode, which deletes all account or product conditions for existing account in the transaction.| Date from and date thru according to ([https://tools.ietf.org/html/rfc3339#section-5.6](https://tools.ietf.org/html/rfc3339#section-5.6)). **Permission Role:** Conditions write **Data Source Table Name:** Account Measure #### Parameters * `transaction` (query, string, required) The transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_) * `salesorg` (_string_, required) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `costs` (_array of object_) * `acc` (_string_) Pattern: ^\[a-zA-Z0-9\_-\]+$. * `value` (_number_) Minimum: -2147483647. Maximum: 2147483647. * `datefrom` (_string (date)_) * `datethru` (_string (date)_) _Example_ ``` { "type": "COGS", "salesorg": "0001", "costs": [ { "acc": "External_Account_Id_8", "value": 5.1, "datefrom": "2016-01-01", "datethru": "2017-01-01" }, { "acc": "External_Account_Id_9", "value": 5.23, "datefrom": "2016-01-01", "datethru": "2017-01-01" }, { "acc": "External_Account_Id_10", "value": 75.11, "datefrom": "2016-01-01", "datethru": "2017-01-01" } ] } ``` #### Responses * **201** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Rows received: 3", "messageid": 515 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Send account or products prices for a registered transaction `POST /api/v68.0/conditions/accountsproducts/prices` Operation ID: `Send account or products prices for a registered transaction`. Tags: Condition Management. Security: oauth\_2\_0. Send account and products prices for a registered transaction. The type within the JSON payload must be a registered measure for account or product measures. If no datefrom or datethru is specified, the default are 1800-01-01 and 9999-12-31. Mixed mode without dates and dates is not supported. Only systems that do not support timebound values can use without date. The API supports a complete mode, which deletes all account or product conditions for existing account or products in the transaction.| Date from and date thru according to ([https://tools.ietf.org/html/rfc3339#section-5.6](https://tools.ietf.org/html/rfc3339#section-5.6)). **Permission Role:** Conditions write **Data Source Table Name:** Account Product Measure #### Parameters * `transaction` (query, string, required) The transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_) * `salesorg` (_string_, required) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `prices` (_array of object_) * `prd` (_string_) Pattern: ^\[a-zA-Z0-9\_-\]+$. * `acc` (_string_) Pattern: ^\[a-zA-Z0-9\_-\]+$. * `value` (_number_) Minimum: -2147483647. Maximum: 2147483647. * `datefrom` (_string (date)_) * `datethru` (_string (date)_) _Example_ ``` { "type": "COGS", "salesorg": "0001", "prices": [ { "acc": "External_Account_Id_8", "prd": "External_Product_Id_10", "value": 5.1, "datefrom": "2016-01-01", "datethru": "2017-01-01" }, { "acc": "External_Account_Id_9", "prd": "External_Product_Id_11", "value": 5.23, "datefrom": "2016-01-01", "datethru": "2017-01-01" }, { "acc": "External_Account_Id_10", "prd": "External_Product_Id_12", "value": 75.11, "datefrom": "2016-01-01", "datethru": "2017-01-01" } ] } ``` #### Responses * **201** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Rows received: 3", "messageid": 515 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Send account or products costs for a registered transaction `POST /api/v68.0/conditions/accountsproducts/costs` Operation ID: `Send account or products costs for a registered transaction`. Tags: Condition Management. Security: oauth\_2\_0. Send account and products costs for a registered transaction. The type within the JSON payload must be a registered measure for product measures. If no datefrom or datethru is specified, the default are 1800-01-01 and 9999-12-31. Mixed mode without dates and dates is not supported. Only systems that do not support timebound values can use without date. The API supports a complete mode, which deletes all account or product conditions for existing account or products in the transaction.| Date from and date thru according to ([https://tools.ietf.org/html/rfc3339#section-5.6](https://tools.ietf.org/html/rfc3339#section-5.6)). **Permission Role:** Conditions write **Data Source Table Name:** Account Product Measure #### Parameters * `transaction` (query, string, required) The transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 20. #### Request body (required) Media type: `application/json`. Schema: `object`. * `type` (_string_) * `salesorg` (_string_, required) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `costs` (_array of object_) * `prd` (_string_) Pattern: ^\[a-zA-Z0-9\_-\]+$. * `acc` (_string_) Pattern: ^\[a-zA-Z0-9\_-\]+$. * `value` (_number_) Minimum: -2147483647. Maximum: 2147483647. * `datefrom` (_string (date)_) * `datethru` (_string (date)_) _Example_ ``` { "type": "COGS", "salesorg": "0001", "costs": [ { "acc": "External_Account_Id_8", "prd": "External_Product_Id_10", "value": 5.1, "datefrom": "2016-01-01", "datethru": "2017-01-01" }, { "acc": "External_Account_Id_9", "prd": "External_Product_Id_11", "value": 5.23, "datefrom": "2016-01-01", "datethru": "2017-01-01" }, { "acc": "External_Account_Id_10", "prd": "External_Product_Id_12", "value": 75.11, "datefrom": "2016-01-01", "datethru": "2017-01-01" } ] } ``` #### Responses * **201** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "result": "Rows received: 3", "messageid": 515 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get accounts product measures for a measure type `GET /api/v68.0/conditions/accountsproducts/{measure}` Operation ID: `Get accounts product measures for a measure type`. Tags: Condition Management. Security: oauth\_2\_0. Retrieve product measures for a measure type. The API uses pagination. For more information, see URI parameters. The API only returns a limited number of rows (500000). **Permission Role:** Conditions read **Data Source Table Name:** Account Product Measure #### Parameters * `pagesize` (query, integer) The pagination parameter that specifies the number of records to display on each page. The default value is 10,000 records per page. Default: `10000`. Minimum: 1000. Maximum: 50000. * `considerpromotions` (query, boolean) Indicates whether promotion and tactic measures are also selected. Promotion and tactic ID return null for non-promotional conditions. Default: `false`. * `showmeta` (query, boolean) Show the pagination meta header within the response. Default: `false`. * `keepalive` (query, integer) Specify how long requested pages can be active in minutes. Default: `10`. Minimum: 5. Maximum: 60. * `account` (query, string) The ID of an account record. Minimum length: 1. Maximum length: 255. * `today` (query, string) Without a value, measures for the current date are received. * `salesorg` (query, string, required) The name of the sales organization. Minimum length: 4. Maximum length: 4. * `product` (query, string) Optional. A filter for only selecting values for a single product ID or multiple product IDs. Multiple product IDs are specified in a comma-separated format with no spaces between them. Product IDs are limited to 30. Minimum length: 1. Maximum length: 999. * `measure` (path, string, required) The measure code that must be configured for the use of account products. Minimum length: 1. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "value": { "typical": { "meta": { "page": 0, "keepalive": 10, "pagesize": 1000, "page_count": 10, "this_page_count": 1000, "total": 9990, "request_id": "b0dbe87b-b781-5f64-4106-aed29c1fbf6a", "originalurl": "/api/conditions/accountsproducts/COGS?showmeta=true", "links": { "First": "/api/conditions/accountsproducts/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=0", "Last": "/api/conditions/accountsproducts/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=9", "Next": "/api/conditions/accountsproducts/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=1" } }, "measures": [ { "acc": "External_Account_Id_6", "prd": "External_Product_Id_7", "value": 5, "datefrom": "2016-09-22", "datethru": "2015-09-28" }, { "acc": "External_Account_Id_6", "prd": "External_Product_Id_7", "value": 5, "datefrom": "2016-09-22", "datethru": "2015-09-28" } ] }, "considerpromotion_true": { "meta": { "page": 0, "keepalive": 10, "pagesize": 1000, "page_count": 10, "this_page_count": 1000, "total": 9990, "request_id": "b0dbe87b-b781-5f64-4106-aed29c1fbf6a", "originalurl": "/api/conditions/accountsproducts/COGS?showmeta=true", "links": { "First": "/api/conditions/accountsproducts/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=0", "Last": "/api/conditions/accountsproducts/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=9", "Next": "/api/conditions/accountsproducts/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=1" } }, "measures": [ { "acc": "External_Account_Id_6", "prd": "External_Product_Id_7", "prm": "PRM9838097673292876", "tac": "TCT9838097673292876", "value": 5, "datefrom": "2016-09-22", "datethru": "2015-09-28" }, { "acc": "External_Account_Id_6", "prd": "External_Product_Id_7", "prm": null, "tac": null, "value": 5, "datefrom": "2016-09-22", "datethru": "2015-09-28" } ] } } } ``` * **400** Code = 105 Measure is not registered or not valid for use. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete measures for products per accounts based on measure type `DELETE /api/v68.0/conditions/accountsproducts/{measure}` Operation ID: `Delete measures for products per accounts based on measure type`. Tags: Condition Management. Security: oauth\_2\_0. Delete measures for products per accounts based on measure type. Based on the given transaction ID, an implicit transaction is created; the status of the delete transaction can be checked using the transaction API. The API is used for process reorganization and cleanup. **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Conditions delete **Data Source Table Name:** Account Product Measure #### Parameters * `deletefromeq` (query, string (date)) Only conditions containing the exact datefrom are deleted. This can't be used in conjunction with datefrom or datethru parameters. Conditions from the past must not be deleted to avoid system inconsistency with previously calculated promotions. * `datefrom` (query, string (date)) Only conditions that are no longer valid at that point in time are deleted. The date has to be in the future. This can't be used alongside with datethru. * `datethru` (query, string (date)) Only conditions that are valid before that date are deleted. This can't be used alongside with datefrom. * `considerpromotions` (query, boolean) Indicates whether conditions related to promotions are deleted (true) or not (false). Default: `false`. * `account` (query, string) Only the conditions for the specified account are affected. Minimum length: 1. Maximum length: 255. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `transaction` (query, string, required) The transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 4. * `product` (query, string) Only the conditions for the specified product are affected. Minimum length: 1. Maximum length: 255. * `measure` (path, string, required) The measure code that must be configured for the use of account products. Minimum length: 1. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "rcg_transaction": 512 } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete conditions in bulk mode for accountsproducts `DELETE /api/v68.0/conditions/accountsproducts` Operation ID: `Delete conditions in bulk mode for accountsproducts`. Tags: Condition Management. Security: oauth\_2\_0. Delete conditions in bulk mode for accountproducts. The transaction API can be used to check the status of a deleted transaction. A maximum of 1000 possible combinations are supported. **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Conditions delete **Data Source Table Name:** Account Product Measure #### Parameters * `transaction` (query, string, required) The transaction ID specified by the sending system. Based on the given transaction ID, an implicit transaction is created. Minimum length: 1. Maximum length: 20. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Request body (required) Media type: `application/json`. Schema: `array of object`. Array of `object`. Minimum items: 1. Maximum items: 1000. * `measure` (_string_, required) Minimum length: 1. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `acc` (_string_) Minimum length: 1. Maximum length: 255. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `prd` (_string_) Minimum length: 1. Maximum length: 255. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `datefrom` (_string (date)_) * `datethru` (_string (date)_) * `deletefromeq` (_string (date)_) * `salesorg` (_string_) Minimum length: 4. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `considerpromotions` (_boolean_) _Example_ ``` [ { "measure": "COGS", "acc": "External_Account_Id_1", "prd": "External_Product_Id_1" }, { "measure": "COGS", "acc": "External_Account_Id_1", "prd": "External_Product_Id_5" }, { "measure": "COGS", "prd": "External_Product_Id_2" }, { "measure": "COGS", "acc": "External_Account_Id_1" }, { "measure": "COGS", "acc": "External_Account_Id_1", "prd": "External_Product_Id_6", "datefrom": "2019-01-01" } ] ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "rcg_transaction": 512 } ``` * **400** The API request is not successful. Review the query and input parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete conditions in bulk mode for account measures `DELETE /api/v68.0/conditions/accounts` Operation ID: `Delete conditions in bulk mode for account measures`. Tags: Condition Management. Security: oauth\_2\_0. Delete conditions in bulk mode for account measures. The transaction API can be used to check the status of a delete transaction. A maximum of 1000 possible combinations are supported. **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Conditions delete **Data Source Table Name:** Account Measure #### Parameters * `transaction` (query, string, required) The transaction ID specified by the sending system. Based on the given transaction ID, an implicit transaction is created. Minimum length: 1. Maximum length: 20. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Request body (required) Media type: `application/json`. Schema: `array of object`. Array of `object`. Minimum items: 1. Maximum items: 1000. * `measure` (_string_, required) Minimum length: 1. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `acc` (_string_) Minimum length: 1. Maximum length: 255. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `datefrom` (_string (date)_) * `datethru` (_string (date)_) * `deletefromeq` (_string (date)_) _Example_ ``` [ { "measure": "COGS", "acc": "External_Account_Id_1" }, { "measure": "COGS", "acc": "External_Account_Id_1" }, { "measure": "COGS", "acc": "External_Account_Id_1" }, { "measure": "COGS", "acc": "External_Account_Id_1", "datefrom": "2019-01-01" } ] ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "rcg_transaction": 512 } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete conditions in bulk mode for product measures `DELETE /api/v68.0/conditions/products` Operation ID: `Delete conditions in bulk mode for product measures`. Tags: Condition Management. Security: oauth\_2\_0. Delete conditions in bulk mode for product measures. The transaction API can be used to check the status of a delete transaction. A maximum of 1000 possible combinations are supported. **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Conditions delete **Data Source Table Name:** Product Measure #### Parameters * `transaction` (query, string, required) The transaction ID specified by the sending system. Based on the given transaction ID, an implicit transaction is created. Minimum length: 1. Maximum length: 20. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Request body (required) Media type: `application/json`. Schema: `array of object`. Array of `object`. Minimum items: 1. Maximum items: 1000. * `measure` (_string_, required) Minimum length: 1. Maximum length: 4. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `prd` (_string_) Minimum length: 1. Maximum length: 255. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `datefrom` (_string (date)_) * `datethru` (_string (date)_) * `deletefromeq` (_string (date)_) _Example_ ``` [ { "measure": "COGS", "prd": "External_Product_Id_1" }, { "measure": "COGS", "prd": "External_Product_Id_1" }, { "measure": "COGS", "prd": "External_Product_Id_1" }, { "measure": "COGS", "prd": "External_Product_Id_1", "datefrom": "2019-01-01" } ] ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "rcg_transaction": 512 } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Request account measures for a measure `GET /api/v68.0/conditions/accounts/{measure}` Operation ID: `Request account measures for a measure`. Tags: Condition Management. Security: oauth\_2\_0. Retrieve account measures for a measure type. The API uses pagination. For more information, see URI parameters. The API only returns a limited number of rows (500000). **Permission Role:** Conditions read **Data Source Table Name:** Account Measure #### Parameters * `pagesize` (query, integer) The number of records to display on each page. Default: `10000`. Minimum: 1000. Maximum: 50000. * `showmeta` (query, boolean) Show the pagination meta header within the response. Default: `false`. * `keepalive` (query, integer) Specify how long requested pages can be active (in minutes). Default: `10`. Minimum: 5. Maximum: 60. * `account` (query, string) The ID of an account record. Minimum length: 1. Maximum length: 255. * `today` (query, string) Without a value, measures for the current date are received. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. Default is usually 1 and 1. This controls how the data is assigned to weeks in the result and how it is read on the CGCloud cloud processing side. Minimum length: 4. Maximum length: 4. * `measure` (path, string, required) The measure code that must be configured for the use of account products. Minimum length: 1. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "value": { "meta": { "page": 0, "keepalive": 10, "pagesize": 1000, "page_count": 10, "this_page_count": 1000, "total": 9990, "request_id": "b0dbe87b-b781-5f64-4106-aed29c1fbf6a", "originalurl": "/api/conditions/products/COGS?showmeta=true", "links": { "First": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=0", "Last": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=9", "Next": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=1" } }, "measures": [ { "acc": "External_Account_Id_6", "value": 5, "datefrom": "2016-09-22", "datethru": "2015-09-28" }, { "acc": "External_Account_Id_6", "value": 5, "datefrom": "2016-09-22", "datethru": "2015-09-28" } ] } } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete measures for accounts based on measure type `DELETE /api/v68.0/conditions/accounts/{measure}` Operation ID: `Delete measures for accounts based on measure type`. Tags: Condition Management. Security: oauth\_2\_0. Delete measures for accounts based on measure type. Based on the given transaction ID, an implicit transaction is created; the status of the delete transaction can be checked using the transaction API. The API is used for process reorganization and cleanup. **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Conditions delete **Data Source Table Name:** Account Measure #### Parameters * `deletefromeq` (query, string (date)) Only conditions containing the exact datefrom are deleted. This can't be used in conjunction with datefrom or datethru parameters. Conditions from the past must not be deleted to avoid system inconsistency with previously calculated promotions. * `datefrom` (query, string (date)) Only conditions that are no longer valid at that point in time are deleted. The date has to be in the future. This can't be used with datethru. * `datethru` (query, string (date)) Only conditions that are valid before that date are deleted. This can't be used with datefrom. * `account` (query, string) Only the conditions for the specified product are affected. Minimum length: 1. Maximum length: 255. * `transaction` (query, string, required) The transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 4. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. Default is usually 1 and 1. This controls how the data is assigned to weeks in the result and how it is read on the CGCloud cloud processing side. Minimum length: 4. Maximum length: 4. * `measure` (path, string, required) The measure code that must be configured for the use of account products. Minimum length: 1. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "rcg_transaction": 512 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Request product measures for a measure type `GET /api/v68.0/conditions/products/{measure}` Operation ID: `Request product measures for a measure type`. Tags: Condition Management. Security: oauth\_2\_0. Retrieve product measures for a measure type. The API uses pagination. For more information, see URI parameters. The API only returns a limited number of rows (500000). **Permission Role:** Conditions read **Data Source Table Name:** Product Measure #### Parameters * `pagesize` (query, integer) The number of records to display on each page. Default: `10000`. Minimum: 1000. Maximum: 50000. * `showmeta` (query, boolean) Show the pagination meta header within the response. Default: `false`. * `keepalive` (query, integer) Specify how long requested pages can be active, in minutes. Default: `10`. Minimum: 5. Maximum: 60. * `today` (query, string) Without a value, measures for the current date are received. * `product` (query, string) Optional. A filter to only select values for a single product ID or multiple product IDs. Multiple product IDs should be specified in comma-separated format, with no spaces. There is a limit of 30 product IDs. Minimum length: 1. Maximum length: 999. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. The default value is usually 1 and 1. This controls how the data is assigned to weeks in the result and how it is read on the CGCloud cloud processing side. Minimum length: 4. Maximum length: 4. * `measure` (path, string, required) The measure code that must be configured for the use of account products. Minimum length: 1. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "value": { "meta": { "page": 0, "keepalive": 10, "pagesize": 1000, "page_count": 10, "this_page_count": 1000, "total": 9990, "request_id": "b0dbe87b-b781-5f64-4106-aed29c1fbf6a", "originalurl": "/api/conditions/products/COGS?showmeta=true", "links": { "First": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=0", "Last": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=9", "Next": "/api/conditions/products/COGS?showmeta=true&request_id=b0dbe87b-b781-5f64-4106-aed29c1fbf6a&page=1" } }, "measures": [ { "prd": "External_Product_Id_13", "value": 5, "datefrom": "2016-09-22", "datethru": "2015-09-28" }, { "prd": "External_Product_Id_13", "value": 5, "datefrom": "2016-09-22", "datethru": "2015-09-28" } ] } } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### DELETE Delete measures for products based on measure type `DELETE /api/v68.0/conditions/products/{measure}` Operation ID: `Delete measures for products based on measure type`. Tags: Condition Management. Security: oauth\_2\_0. Delete measures for products based on measure type. Based on the given transaction ID, an implicit transaction is created; the status of the delete transaction can be checked using the transaction API. The API is used for process reorganization and cleanup. **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** Conditions delete **Data Source Table Name:** Product Measure #### Parameters * `deletefromeq` (query, string (date)) Only conditions containing the exact datefrom are deleted. This can't be used in conjunction with datefrom or datethru parameters. Conditions from the past must not be deleted to avoid system inconsistency with previously calculated promotions. * `datefrom` (query, string (date)) Only conditions that are no longer valid at that point in time are deleted. The date has to be in the future. This can't be used alongside with datethru. * `datethru` (query, string (date)) Only conditions that are valid before that date are deleted. This can't be used alongside with datefrom. * `transaction` (query, string, required) The transaction ID specified by the sending system. Characters allowed a-z, A-Z, 0-9, ", "-","\_" Minimum length: 1. Maximum length: 4. * `product` (query, string) Only the conditions for the specified product are affected. Minimum length: 1. Maximum length: 255. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `measure` (path, string, required) The measure code that must be configured for the use of account products. Minimum length: 1. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "rcg_transaction": 512 } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Request data with values as list for a selected account and year `GET /api/v68.0/accountplans/{accountid}/year/{year}/list` Operation ID: `Request data with values as list for a selected account and year`. Tags: Accountplan Management. Security: oauth\_2\_0. Request data with values as list for a selected account and year. The API returns KPIs for both products and non-products. On a custom calendar, pass timeblock=customperiod to retrieve custom-period measures. **Permission Role:** Accountplans read #### Parameters * `measure` (query, string) Optional. A filter to only select values for the single or multiple measure codes. Multiple measure codes are passed in comma separated format, without spaces in between. Limited to 60 measure codes. Minimum length: 1. Maximum length: 299. * `timeblock` (query, string) Controls whether weekly, monthly, or custom measures are returned. This is not an aggregation; the value must match how the measure is stored in the TPM engine. The accepted values are week (default), month, and customperiod. For a standard calendar, use week or month. For a custom calendar, use customperiod or month, because a custom-calendar org doesn't populate the weekly measure bucket and week returns zeros. Any other value returns an HTTP 400 error. For example, GET /api/v68.0/accountplans/{accountid}/year/{year}/list?salesorg=&timeblock=customperiod. Allowed values: `week`, `month`, `customperiod`. Default: `week`. * `pagesize` (query, integer) The number of records to display on each page. Default: `10000`. Minimum: 1000. Maximum: 50000. * `showmeta` (query, boolean) Show the pagination meta header within the response. Default: `false`. * `keepalive` (query, integer) Specify how long requested pages can be active, in minutes. Default: `10`. Minimum: 5. Maximum: 60. * `productlevel` (query, string) Optional. A filter to only select values for the specified productlevel. For example, "brand". Minimum length: 1. Maximum length: 20. * `salesorg` (query, string, required) The name of the sales organization. Only one value is supported. Minimum length: 4. Maximum length: 4. * `accountid` (path, string, required) An external ID of an account object from Salesforce. Maximum length: 255. * `year` (path, string, required) The four-digit value of a year. For example, 2015 or 2017. Minimum length: 4. Maximum length: 4. * `If-Match` (header, string) A pre-condition for only sending and calculating results when the accountplan has not changed. #### Responses * **200** Headers: * `ETag` (string) A hash representing the most recent change in any KPI. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "value": { "measures": [ { "measurecode": "M020", "prd": "External_Product_Id_1", "value": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52 ] } ] } } ``` * **400** The API request is not successful. Review the path & query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Request data for a selected account and year `GET /api/v68.0/accountplans/{accountid}/year/{year}` Operation ID: `Request data for a selected account and year`. Tags: Accountplan Management. Security: oauth\_2\_0. Request data for the specified account and year. The API returns KPIs for both products and non-products. On a custom calendar, pass timeblock=customperiod to retrieve custom-period measures. **Permission Role:** Accountplans read #### Parameters * `measure` (query, string) Optional. A filter to only select values for the single or multiple measure codes. Multiple measure codes are passed in comma separated format, without spaces in between. Limited to 60 measure codes. Minimum length: 1. Maximum length: 299. * `timeblock` (query, string) Controls whether weekly, monthly, or custom measures are returned. This is not an aggregation; the value must match how the measure is stored in the TPM engine. The accepted values are week (default), month, and customperiod. For a standard calendar, use week or month. For a custom calendar, use customperiod or month, because a custom-calendar org doesn't populate the weekly measure bucket and week returns zeros. Any other value returns an HTTP 400 error. For example, GET /api/v68.0/accountplans/{accountid}/year/{year}?salesorg=&timeblock=customperiod. Allowed values: `week`, `month`, `customperiod`. Default: `week`. * `pagesize` (query, integer) The number of records to display on each page. Default: `10000`. Minimum: 1000. Maximum: 50000. * `showmeta` (query, boolean) Show the pagination meta header within the response. Default: `false`. * `keepalive` (query, integer) Specify how long requested pages can be active, in minutes. Default: `10`. Minimum: 5. Maximum: 60. * `productlevel` (query, string) Optional. A filter to only select values for the specified productlevel. For example, "brand". Minimum length: 1. Maximum length: 20. * `salesorg` (query, string, required) The name of the sales organization. Only one value is supported. Minimum length: 4. Maximum length: 4. * `accountid` (path, string, required) An external ID of an account object from Salesforce. Maximum length: 255. * `year` (path, string, required) The four-digit value of a year. For example, 2015 or 2017. Minimum length: 4. Maximum length: 4. * `If-Match` (header, string) A pre-condition for only sending and calculating results when the accountplan has not changed. #### Responses * **200** Headers: * `ETag` (string) A hash representing the most recent change in any KPI. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "measures": [ { "prd": "External_Product_Id_14", "datefrom": "2023-01-01", "datethru": "2023-01-01", "measurecode": "AAGR", "value": 31846.82 }, { "prd": "External_Product_Id_14", "datefrom": "2023-01-02", "datethru": "2023-01-08", "measurecode": "AAGR", "value": 300040.87 } ] } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Get a list of account plans that have changed since the specified date and time `POST /api/v68.0/accountplans/changed/{datetime}` Operation ID: `Get the account plans that have changed since the specified date and time`. Tags: Accountplan Management. Security: oauth\_2\_0. Retrieve a list of account plans that have changed since the specified date and time. **Permission Role:** Accountplans read #### Parameters * `datetime` (path, string, required) The date and time of the most recent changes. Valid format is YYYY-MM-DD HH:MI:SS. For example, 2017-07-17 10:12:06. Minimum length: 19. Maximum length: 19. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` [ { "acc": "External_Account_Id_1", "year": 2016 }, { "acc": "External_Account_Id_2", "year": 2016 } ] ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Get a list of account plans which have changed since compared with the send list of accountplans, year and ETAGs `POST /api/v68.0/accountplans/changed` Operation ID: `Get the account plans which have changed since compared with the send list of accountplans, year and ETAGs`. Tags: Accountplan Management. Security: oauth\_2\_0. Retrieve a list of account plans that have changed since the send list of account plans, years, and ETAGs. **Permission Role:** Accountplans read #### Parameters * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Request body (required) Media type: `application/json`. Schema: `array of object`. Array of `object`. Minimum items: 1. * `acc` (_string_, required) Minimum length: 1. Maximum length: 255. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `year` (_number_, required) * `etag` (_string_, required) Minimum length: 0. Maximum length: 64. Pattern: ^$|^\[a-zA-Z0-9\_-\]+$. _Example_ ``` [ { "acc": "External_Account_Id_1", "year": 2016, "etag": "b8ece36410ca57accfca490015d8294dfd7fedc3f9b5ea140396bf358491075i" }, { "acc": "External_Account_Id_1", "year": 2015, "etag": "" } ] ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` [ { "acc": "External_Account_Id_1", "year": 2016, "etag": "b8ece36410ca57accfca490015d8294dfd7fedc3f9b5ea140396bf358491075b" }, { "acc": "External_Account_Id_1", "year": 2015, "etag": "ca78bb41c18216169fec5f74223117ddc8b5143d9a0cc0191b9116052efd2505" } ] ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get Manual Inputs for an Account Plan `GET /api/v68.0/accountplans/{accountplanid}/categories/{accountplancategoryid}/manualinputs/{sessionid}` Operation ID: `Get Manual Inputs for an Account Plan`. Tags: Accountplan Management. Security: oauth\_2\_0. Retrieve the manual inputs recorded in a session for an account plan. **Permission Role:** Accountplans\_read **Resource Example:** https:///api/v68.0/accountplans/a482B000000L0A7JAK/categories/a0579000000LvOdAAK/manualinputs/2f39ff09-d169-6a42-d715-614574ce3e67 #### Parameters * `accountplanid` (path, string, required) Salesforce ID of the account plan. * `accountplancategoryid` (path, string, required) Salesforce ID of the account plan category. * `sessionid` (path, string, required) Session ID of the account plan category to retrieve manual inputs for the desired session. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `pagesize` (query, integer) Pagination parameter to show the specified records per page. The default value is 10000. Default: `10000`. Minimum: 1000. Maximum: 50000. * `showmeta` (query, boolean) Show the pagination meta header within the payload. The default value is false. Default: `false`. * `keepalive` (query, integer) Specifies how long requested pages are active in minutes. The default value is 10 minutes. Default: `10`. Minimum: 5. Maximum: 60. #### Responses * **200** The API request is successful. **Properties** manualinputversion: The value can either be 1 or 2. If it’s 1, then the manual inputs were added at weekly or total level. If it’s 2, then the manual inputs were added at weekly, monthly, quarterly, or total level. manualinputs: It is an array of manual inputs provided for the account plan mentioned in the API request. productid: External ID of the product for which the manual inputs were recorded. measure: The measure code of a KPI. period: The period value denotes whether the manual inputs were recorded at weekly, monthly, quarterly, or total levels. The values can be 1, 2, or null. If it’s 1, then the manual inputs were added at weekly or total level. If it’s 2, then the manual inputs were added at weekly, monthly, quarterly, or total level. If it’s null, then he manual inputs were added at total level. value: The manual input recorded for the account plan mentioned in the API request. obsolete: Denotes whether the manual input that was recorded is obsolete or not. Its value can either be true or false. obsoletereason: The value can be either 1 or 2. If it’s 1, then one dimension node of the path was removed. For example, the value will be 1 if a product is not in the scope of the promotion. If it’s 2, then the value was overridden by another entry. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "meta": { "page": 0, "keepalive": 10, "pagesize": 10000, "page_count": 1, "this_page_count": 3, "total": 3, "request_id": "d9fcc02b-7ec9-8b75-b83a-028e05d1f04c", "originalurl": "/api/v68.0/accountplans/a07TC000000X2ceYAC/categories/a04TC0000002yZZYAY/manualinputs/c73d807a-2a30-36e2-5ce5-aabbe5fc0619?showmeta=true&pagesize=10000", "links": { "first": "/api/v68.0/accountplans/a07TC000000X2ceYAC/categories/a04TC0000002yZZYAY/manualinputs/c73d807a-2a30-36e2-5ce5-aabbe5fc0619?showmeta=true&pagesize=10000&request_id=d9fcc02b-7ec9-8b75-b83a-028e05d1f04c&page=0", "last": "/api/v68.0/accountplans/a07TC000000X2ceYAC/categories/a04TC0000002yZZYAY/manualinputs/c73d807a-2a30-36e2-5ce5-aabbe5fc0619?showmeta=true&pagesize=10000&request_id=d9fcc02b-7ec9-8b75-b83a-028e05d1f04c&page=0" } }, "manualinputversion": 1, "manualinputs": [ { "measure": "SROP", "period": null, "value": 100, "obsolete": false }, { "measure": "SROP", "period": { "periodnumber": 1, "datefrom": "2024-01-01T00:00:00.000Z", "datethru": "2024-01-07T00:00:00.000Z", "calendaryear": 2024, "week": 1 }, "value": 50, "obsolete": false }, { "measure": "SROP", "productid": "Chocolate", "period": null, "value": 200, "obsolete": false } ] } ``` * **400** The API request is not successful. Review the payload and the Account Plan ID. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "Invalid Accountplan Id format", "code": 176 } ``` * **403** The API request is not authorized or may need sufficient user privileges. * **404** Manual inputs were not found for the parameters accountplanid, accountplancategoryid, and sessionid. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "details": "Manual inputs not found for the following params: {\"accountplanid\":\"a07TC000000X2ceYAC\",\"accountplancategoryid\":\"a04TC0000002yZZYAY\",\"sessionid\":\"c73d807a-2a30-36e2-5ce5-aabbe5fc0618\"}" } ``` ### GET Get Comparison of Manual Inputs for an Account Plan `GET /api/v68.0/accountplans/{accountplanid}/categories/{accountplancategoryid}/manualinputs/{sessionid}/compare/{compareToSessionId}` Operation ID: `Get Comparison of Manual Inputs for an Account Plan`. Tags: Accountplan Management. Security: oauth\_2\_0. Retrieve the comparison of manual inputs recorded in between two sessions for an account plan. \*\*Permission Role: Accountplans\_read **Resource Example:** https:///api/v68.0/accountplans/a482B000000L0A7JAK/categories/a0579000000LvOdAAK/manualinputs/2f39ff09-d169-6a42-d715-614574ce3e67/compare/6e54aa04-q237-6a42-d715-523484br9p23 #### Parameters * `accountplanid` (path, string, required) Salesforce ID of the account plan. * `accountplancategoryid` (path, string, required) Salesforce ID of the account plan category. * `sessionid` (path, string, required) Session ID of the account plan category to retrieve manual inputs for the desired session. * `compareToSessionId` (path, string, required) Session ID of the Account Plan Category that includes previous manual inputs. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `pagesize` (query, integer) Pagination parameter to show the specified records per page. The default value is 10000. Default: `10000`. Minimum: 1000. Maximum: 50000. * `showmeta` (query, boolean) Show the pagination meta header within the payload. The default value is false. Default: `false`. * `keepalive` (query, integer) Specifies how long requested pages are active in minutes. The default value is 10 minutes. Default: `10`. Minimum: 5. Maximum: 60. #### Responses * **200** The API request is successful. **Properties** manualinputversion: The value can either be 1 or 2. If it’s 1, then the manual inputs were added at weekly or total level. If it’s 2, then the manual inputs were added at weekly, monthly, quarterly, or total level. manualinputs: It is an array of manual inputs provided for the account plan mentioned in the API request. productid: External ID of the product for which the manual inputs were recorded. measure: The measure code of a KPI. period: The period value denotes whether the manual inputs were recorded at weekly, monthly, quarterly, or total levels. The values can be 1, 2, or null. If it’s 1, then the manual inputs were added at weekly or total level. If it’s 2, then the manual inputs were added at weekly, monthly, quarterly, or total level. If it’s null, then he manual inputs were added at total level. value: The manual input recorded for the account plan mentioned in the API request. obsolete: Denotes whether the manual input that was recorded is obsolete or not. Its value can either be true or false. obsoletereason: The value can be either 1 or 2. If it’s 1, then one dimension node of the path was removed. For example, the value will be 1 if a product is not in the scope of the promotion. If it’s 2, then the value was overridden by another entry. operation: There are three types of operations. Add: Earlier, there was no value available and later, a manual input was added. Update: Earlier, there was a value available and later, a manual input was added to update the value. Obsolete: Earlier, there was a value available and later, it became obsolete due to a manual input update at a different level. For example, if the value is available at weekly level but later a manual input was added at monthly or total levels, then the weekly level value becomes obsolete. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "meta": { "page": 0, "keepalive": 10, "pagesize": 1000, "page_count": 1, "this_page_count": 2, "total": 2, "request_id": "b41d8d62-2351-7164-dc95-ec64d62581ea", "originalurl": "/api/v68.0/accountplans/a07TC000000X2ceYAC/categories/a04TC0000002yZZYAY/manualinputs/c73d807a-2a30-36e2-5ce5-aabbe5fc0619/compare/21da88be-642b-f7af-70d8-331e1c197818?showmeta=true&pagesize=1000", "links": { "first": "/api/v68.0/accountplans/a07TC000000X2ceYAC/categories/a04TC0000002yZZYAY/manualinputs/c73d807a-2a30-36e2-5ce5-aabbe5fc0619/compare/21da88be-642b-f7af-70d8-331e1c197818?showmeta=true&pagesize=1000&request_id=b41d8d62-2351-7164-dc95-ec64d62581ea&page=0", "last": "/api/v68.0/accountplans/a07TC000000X2ceYAC/categories/a04TC0000002yZZYAY/manualinputs/c73d807a-2a30-36e2-5ce5-aabbe5fc0619/compare/21da88be-642b-f7af-70d8-331e1c197818?showmeta=true&pagesize=1000&request_id=b41d8d62-2351-7164-dc95-ec64d62581ea&page=0" } }, "manualinputversion": 1, "manualinputs": [ { "measure": "SROP", "productid": "Chocolate", "period": { "periodnumber": 2, "datefrom": "2024-01-08T00:00:00.000Z", "datethru": "2024-01-14T00:00:00.000Z", "calendaryear": 2024, "week": 2 }, "value": 30, "obsolete": true, "obsoletereason": 2, "operation": "Obsolete" }, { "measure": "SROP", "productid": "Chocolate", "period": null, "value": 200, "obsolete": false, "operation": "Add" }, { "measure": "SROP", "period": { "periodnumber": 1, "datefrom": "2024-07-01T00:00:00.000Z", "datethru": "2024-07-06T00:00:00.000Z", "calendaryear": 2024, "week": 1 }, "value": null, "obsolete": false, "operation": "Update", "previousvalue": 1000 } ] } ``` * **400** The API request is not successful. Review the payload and the Account Plan ID. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "Invalid Accountplan Id format", "code": 176 } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** Manual inputs were not found for the parameters accountplanid, accountplancategoryid, and sessionid. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "details": "Manual inputs not found for the following params: {\"accountplanid\":\"a07TC000000X2ceYAC\",\"accountplancategoryid\":\"a04TC0000002yZZYAY\",\"sessionid\":\"c73d807a-2a30-36e2-5ce5-aabbe5fc0618\"}" } ``` ### GET Get available promotions within a sales org `GET /api/v68.0/promotions` Operation ID: `Get available promotions within a sales org`. Tags: Promotion Management. Security: oauth\_2\_0. This API fetches the list of promotions within a salesorg that are available in a specific time period. If the list is long, then use query parameters as filters to get the promotions data. **Permission Role:** Promotions read **Limits:** 500,000 promotions **Note** Pagination is supported with new query parameters through the optional query responseformat=object. #### Parameters * `salesorg` (query, string, required) Enter the Sales Org ID. Minimum length: 4. Maximum length: 4. * `responseformat` (query, string) This API supports pagination with additional parameters only when responseformat=object. By default, it is an array. Allowed values: `array`, `object`. Default: `array`. * `datefrom` (query, string (date)) Enter the date from when the promotions are starting. The promotions can either start on the specified date or later. This field can be used only when responseformat=object. * `datethru` (query, string (date)) Enter the date when the promotions are ending. The promotions can either end on the specified date or before it. This field can be used only when responseformat=object. * `phase` (query, string) Enter the phase to get the promotions only in the specified phase. For example, enter Committed as a value to get the list of promotions that are in the Committed phase. The value for this field is case-sensitive. To enter multiple values, use comma-separated format. A few sample values are ForApproval, Committed, Planning, and Cancelled. This field can be used only when responseformat=object. Minimum length: 1. Maximum length: 255. * `pagesize` (query, integer) Enter a numeric value to define the number of KPIs required per page. By default, the value is set to 10,000. Default: `10000`. Minimum: 1000. Maximum: 50000. * `showmeta` (query, boolean) Indicates whether you need additional information such as page, pagecount, and total number of KPIs (true) or not (false). This field can be used only when responseformat=object. Default: `false`. #### Responses * **200** The API request is successful. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "meta": { "page": 0, "keepalive": 10, "pagesize": 10000, "page_count": 1, "this_page_count": 153, "total": 153, "request_id": "583fdc40-af2d-ba4a-5380-4f80c06f783b", "originalurl": "/api/v68.0/promotions?salesorg=0001&showmeta=true", "links": { "first": "/api/v68.0/promotions?salesorg=0001&showmeta=true&request_id=583fdc40-af2d-ba4a-5380-4f80c06f783b&page=0", "last": "/api/v68.0/promotions?salesorg=0001&showmeta=true&request_id=583fdc40-af2d-ba4a-5380-4f80c06f783b&page=0" } }, "measures": [ { "prm": "a2YTC0000001vmZ2AQ", "lastcalculationdate": "2023-05-23 10:45:33", "phase": "Committed", "datefrom": "2022-06-27", "datethru": "2022-08-27" }, { "prm": "a2YTC0000001vmC2AQ", "lastcalculationdate": "2023-07-26 13:59:42", "phase": "ForApproval", "datefrom": "2022-09-12", "datethru": "2022-10-09" } ] } ``` * **400** The API request is not successful. There were multiple query validations. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Get a list of promotions that have changed since the specified date and time `POST /api/v68.0/promotions/changed/{datetime}` Operation ID: `Get promotions that have changed since the specified date and time`. Tags: Promotion Management. Security: oauth\_2\_0. Retrieve a list of promotions that have changed since the specified date and time. With using the optional query parameter datethru, you are able to request a promotion list for a certain time frame (datefrom until datethru). For example, X >= {datetime} and X <= datethru. **Permission Role:** Promotions read #### Parameters * `datethru` (query, string) Date and time of the last change. Valid format is YYYY-MM-DD HH:MI:SS. For example, 2020-06-19 17:47:44. Minimum length: 19. Maximum length: 19. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `datetime` (path, string, required) Date and time of the last change. Valid format is YYYY-MM-DD HH:MI:SS. For example, 2020-06-19 17:47:45. Minimum length: 19. Maximum length: 19. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` [ { "prm": "a2b2X00000Aaq2nQAB", "datechanged": "2020-06-19 17:47:44" }, { "prm": "a2b2X00000Aaq1mQAB", "datechanged": "2020-06-19 17:47:45" } ] ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### POST Get a list of promotions that have changed since compared with the send list of promotions and ETAGs `POST /api/v68.0/promotions/changed` Operation ID: `Get promotions that have changed since compared with the send list of promotions and ETAGs`. Tags: Promotion Management. Security: oauth\_2\_0. Retrieve a list of promotions that have changed since compared with the send list of promotions and ETAGs. **Permission Role:** Promotions read #### Parameters * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. #### Request body (required) Media type: `application/json`. Schema: `array of object`. Array of `object`. Minimum items: 1. * `prm` (_string_, required) Minimum length: 1. Maximum length: 30. Pattern: ^\[a-zA-Z0-9\_-\]+$. * `etag` (_string_, required) Minimum length: 0. Maximum length: 64. Pattern: ^$|^\[a-zA-Z0-9\_-\]+$. _Example_ ``` [ { "prm": "a2ZXJ000000017C2AQ", "etag": "b8ece36410ca57accfca490015d8294dfd7fedc3f9b5ea140396bf358491075i" }, { "prm": "a2ZXJ000000017C2AQ", "etag": "d4ece36410ca57accfca490015d8294dfd7fedc3f9b5ea140396bf35849107d" } ] ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` [ { "prm": "a2ZXJ000000017C2AQ", "etag": "b8ece36410ca57accfca490015d8294dfd7fedc3f9b5ea140396bf358491075b" }, { "prm": "a2ZXJ000000017C2AQ", "etag": "ca78bb41c18216169fec5f74223117ddc8b5143d9a0cc0191b9116052efd2505" } ] ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get data for a single promotion and promotion level KPIS using pagination `GET /api/v68.0/promotions/{promotionid}/aggregation` Operation ID: `Get data for a single promotion and promotion level KPIS using pagination`. Tags: Promotion Management. Security: oauth\_2\_0. Retrieve data for a single promotion and promotion level KPIS using pagination. Total value for a measure and product for measures on promotion level. On a custom calendar, pass timeblock=customperiod to retrieve custom-period measures. **Note:** To get correct aggregation for ratio-based KPIs, such as Weighted Distribution, use the promotions/{promotionId}/aggregation API. **Permission Role:** Promotions read #### Parameters * `measure` (query, string) An optional filter to select only values for a single or multiple measure codes. Multiple measure codes are passed comma separated without spaces in between. Limited to 60 measure codes. Minimum length: 1. Maximum length: 299. * `timeblock` (query, string) Controls whether weekly, monthly, or custom measures are returned. This is not an aggregation; the value must match how the measure is stored in the TPM engine. The accepted values are week (default), month, and customperiod. For a standard calendar, use week or month. For a custom calendar, use customperiod or month, because a custom-calendar org doesn't populate the weekly measure bucket and week returns zeros. Any other value returns an HTTP 400 error. Allowed values: `week`, `month`, `customperiod`. Default: `week`. * `pagesize` (query, integer) Pagination parameter to show the specified records per page. Default: `10000`. Minimum: 1000. Maximum: 50000. * `showmeta` (query, boolean) Show the pagination meta header within the response. Default: `false`. * `keepalive` (query, integer) Specifies how long requested pages are alive in minutes. Default: `10`. Minimum: 5. Maximum: 60. * `productlevel` (query, string) An optional filter that allows you to select only values for a specific product level. For example, "brand". Minimum length: 1. Maximum length: 20. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `promotionid` (path, string, required) Salesforce ID of the promotion (Promotion\_\_c.Id). #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "value": { "measures": [ { "prd": "External_Product_Id_15", "measurecode": "COGS", "value": 72.9277 }, { "prd": "External_Product_Id_16", "measurecode": "COGS", "value": 459.659 } ] } } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** Promotion not found. ### GET Get data for a single promotion `GET /api/v68.0/promotions/{promotionid}/all/list` Operation ID: `Get data for a single promotion`. Tags: Promotion Management. Security: oauth\_2\_0. Retrieve details for a specified promotion ID. Promotion and tactic level KPIS using pagination. Return proudct and none product-related KPIs. On a custom calendar, pass timeblock=customperiod to retrieve custom-period measures. **Permission Role:** Promotions read #### Parameters * `measure` (query, string) An optional filter to select only values for a single or multiple measure codes. Multiple measure codes are passed comma separated without spaces in between. Limited to 60 measure codes. Minimum length: 1. Maximum length: 299. * `timeblock` (query, string) Controls if weekly, monthly, or custom measures are returned. This is not an aggregation. For using calendar weeks, valid parameters are 'week' or 'month'. For using custom calendar, valid parameters are 'customperiod' or 'month'. Allowed values: `week`, `month`, `customperiod`. Default: `week`. * `pagesize` (query, integer) Pagination parameter to show the specified records per page. Default: `10000`. Minimum: 1000. Maximum: 50000. * `showmeta` (query, boolean) Show the pagination meta header within the response. Default: `false`. * `keepalive` (query, integer) Specifies how long the requested pages are alive in minutes. Default: `10`. Minimum: 5. Maximum: 60. * `productlevel` (query, string) An optional filter that allows you to select only values for a specific product level. For example, "brand". Minimum length: 1. Maximum length: 20. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `promotionid` (path, string, required) Salesforce ID of the promotion (Promotion\_\_c.Id). * `If-Match` (header, string) Defines a precondition for sending and calculating a result if the promotion isn't changed. #### Responses * **200** Headers: * `ETag` (string) A hash representing the last change of any KPI. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "value": { "measures": [ { "measurecode": "M001", "tac": "a3CXJ00000031fH2AQ", "prd": "External_Product_Id_1", "from": "201601", "value": [ 1, 2, 3, null, 5 ] }, { "measurecode": "M002", "prd": "External_Product_Id_2", "tac": "", "from": "201601", "value": [ 1, 2, 3, null, 5 ] } ] } } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** Promotion not found. ### GET Get the total values for KPIs over all products for all periods spanning the promotion runtime `GET /api/v68.0/promotions/{promotionid}/aggregation/totals/list` Operation ID: `Get the total values for KPIs over all products for all periods spanning the promotion runtime`. Tags: Promotion Management. Security: oauth\_2\_0. Retrieve the total values for KPIs for all products for all periods during the promotion's runtime. This means that for each returned KPI, the system returns the aggregated value across all assigned products. This occurs at the promotion level. KPIs from the tactic level will also be aggregated to the promotion level. On a custom calendar, pass timeblock=customperiod to retrieve custom-period measures. **Permission Role:** Promotions read #### Parameters * `measure` (query, string) An optional filter to select only values for a single or multiple measure codes. Multiple measure codes are passed comma separated without spaces in between. Limited to 60 measure codes. Minimum length: 1. Maximum length: 299. * `timeblock` (query, string) Controls if weekly, monthly, or custom measures are returned. This is not an aggregation, but depends on the measure configuration in the TPM engine. For using calendar weeks, valid parameters are 'week' or 'month'. For using custom calendar, valid parameters are 'customperiod' or 'month'. Allowed values: `week`, `month`, `customperiod`. Default: `week`. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `productlevel` (query, string) An optional filter that allows you to select only values for a specific product level. For example, "Brand". Default: `Product`. Minimum length: 1. Maximum length: 20. * `promotionid` (path, string, required) Salesforce ID of the promotion (Promotion\_\_c.Id). * `If-Match` (header, string) Defines a precondition for sending and calculating a result if the promotion has not been changed. #### Responses * **200** Headers: * `ETag` (string) A hash representing the last change of any KPI. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "measures": [ { "measure": "M020", "from": "201506", "total": 420, "value": [ 30, 30, 30, 30, null, null, null, null, 60, 60, 60, 60, 60 ] } ] } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** Promotion not found. ### GET Get available tactics for a specified promotion `GET /api/v68.0/promotions/{promotionid}/tactics` Operation ID: `Get available tactics for a specified promotion`. Tags: Promotion Management. Security: oauth\_2\_0. Retrieve available tactics for a specified promotion. **Permission Role:** Promotions read #### Parameters * `promotionid` (path, string, required) Salesforce ID of the promotion (Promotion\_\_c.Id). * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `If-Match` (header, string) Defines a precondition for sending and calculating a result if the promotion has not been changed. #### Responses * **200** Headers: * `ETag` (string) A hash representing the last change of any KPI. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` [ { "tac": "TAC00200002", "datefrom": "2016-02-01", "datethru": "2016-02-15" }, { "tac": "TAC00200002", "datefrom": "2016-02-01", "datethru": "2016-02-15" } ] ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** Promotion not found. ### GET Get data for a specified promotion tactic using pagination `GET /api/v68.0/promotions/{promotionid}/tactics/{tacticid}/list` Operation ID: `Get data for a specified promotion tactic`. Tags: Promotion Management. Security: oauth\_2\_0. Retreieve date for a specified promotion tactic using pagination. The result contains one record as list per period year, measure, and product of a tactic. On a custom calendar, pass timeblock=customperiod to retrieve custom-period measures. **Permission Role:** Promotions read #### Parameters * `measure` (query, string) An optional filter to select only values for a single or multiple measure codes. Multiple measure codes are passed comma separated without spaces in between. Limited to 60 measure codes. Return proudct and none product-related KPIs. Minimum length: 1. Maximum length: 299. * `timeblock` (query, string) Controls if weekly, monthly, or custom measures are returned. This is not an aggregation, but depends on the measure configuration in the TPM engine. For using calendar weeks, valid parameters are 'week' or 'month'. For using custom calendar, valid parameters are 'customperiod' or 'month'. Allowed values: `week`, `month`, `customperiod`. Default: `week`. * `pagesize` (query, integer) Pagination parameter to show the specified records per page. Default: `10000`. Minimum: 1000. Maximum: 50000. * `showmeta` (query, boolean) Show the pagination meta header within the response. Default: `false`. * `keepalive` (query, integer) Specifies how long the requested pages are alive in minutes. Default: `10`. Minimum: 5. Maximum: 60. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `productlevel` (query, string) An optional filter that allows you to select only values for a specific productlevel. For example, "brand". Minimum length: 1. Maximum length: 20. * `promotionid` (path, string, required) Salesforce ID of the promotion (Promotion\_\_c.Id). * `tacticid` (path, string, required) Salesforce ID of the tactic. * `If-Match` (header, string) Defines a condition for sending and calculating a result if promotions are not changed. #### Responses * **200** Headers: * `ETag` (string) A hash representing the last change of any KPI. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "measures": [ { "measurecode": "M020", "prd": "External_Product_Id_6", "from": "201506", "value": [ 10, 10, 10, 10, 10 ] }, { "measurecode": "M021", "prd": "External_Product_Id_5", "from": "201506", "value": [ 20, 20, 20, 20, 20 ] } ] } ``` * **400** The API request is not successful. Review the path & query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** Promotion not found. ### GET Get aggregated data for a specified promotion tactic using pagination `GET /api/v68.0/promotions/{promotionid}/aggregation/tactics/{tacticid}` Operation ID: `Get aggregated data for a specified promotion tactic`. Tags: Promotion Management. Security: oauth\_2\_0. Retrieve aggregated data for a specified promotion tactic using pagination. Total value for a measure and product for tactic-level measures. On a custom calendar, pass timeblock=customperiod to retrieve custom-period measures. **Permission Role:** Promotions read #### Parameters * `measure` (query, string) An optional filter to select only values for a single or multiple measure codes. Multiple measure codes are passed comma separated without spaces in between. Limited to 60 measure codes. Minimum length: 1. Maximum length: 299. * `timeblock` (query, string) Controls whether weekly, monthly, or custom measures are returned. This is not an aggregation; the value must match how the measure is stored in the TPM engine. The accepted values are week (default), month, and customperiod. For a standard calendar, use week or month. For a custom calendar, use customperiod or month, because a custom-calendar org doesn't populate the weekly measure bucket and week returns zeros. Any other value returns an HTTP 400 error. Allowed values: `week`, `month`, `customperiod`. Default: `week`. * `pagesize` (query, integer) Pagination parameter to show the specified records per page. Default: `10000`. Minimum: 1000. Maximum: 50000. * `showmeta` (query, boolean) Show the pagination meta header within the response. Default: `false`. * `keepalive` (query, integer) Specified how long the requested pages will be alive in minutes. Default: `10`. Minimum: 5. Maximum: 60. * `productlevel` (query, string) An optional filter that allows you to select only values for a specific productlevel. For example, "brand". Minimum length: 1. Maximum length: 20. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `promotionid` (path, string, required) Salesforce ID of the promotion (Promotion\_\_c.Id). * `tacticid` (path, string, required) Salesforce ID of the tactic. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "value": { "measures": [ { "prm": "a2ZXJ000000017C2AQ", "tac": "a3CXJ00000031fH2AQ", "prd": "External_Product_Id_15", "measurecode": "COGS", "value": 72.9277 }, { "prm": "a2ZXJ000000017C2AQ", "tac": "a3CXJ00000031fH2AQ", "prd": "External_Product_Id_16", "measurecode": "COGS", "value": 459.659 } ] } } ``` * **400** The API request is not successful. Review the path & query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** Promotion not found. ### GET Get a list of products that created at least one writeback for a specified promotion ID, for each tactic and promotion header level `GET /api/v68.0/promotions/{promotionid}/products` Operation ID: `Get a list of products that created at least one writeback`. Tags: Promotion Management. Security: oauth\_2\_0. Retrieves a list of products that created at least one writeback for each tactic and promotion header level for a given promotion ID. On a custom calendar, pass timeblock=customperiod to retrieve custom-period measures. **Permission Role:** Promotions read #### Parameters * `timeblock` (query, string) Controls if weekly, monthly, or custom measures are returned. This is not an aggregation. Depends on the measure configuration in the TPM engine. For using calendar weeks, valid parameters are 'week' or 'month'. For using custom calendar, valid parameters are 'customperiod' or 'month'. Allowed values: `week`, `month`, `customperiod`. Default: `week`. * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `productlevel` (query, string) An optional filter that allows you to select only values for a specific productlevel. For example, "brand". Minimum length: 1. Maximum length: 20. * `keepalive` (query, integer) Specifies how long the requested pages are alive in minutes. Default: `10`. Minimum: 5. Maximum: 60. * `pagesize` (query, integer) Pagination parameter to show records per page. Default: `10000`. Minimum: 1000. Maximum: 50000. * `showmeta` (query, boolean) Show the pagination meta header within the response. * `promotionid` (path, string, required) Salesforce ID of the promotion (Promotion\_\_c.Id). #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "measures": [ { "prd": "External_Product_Id_17", "tac": "" }, { "prd": "External_Product_Id_16", "tac": "a3CXJ00000031fH2AQ" }, { "prd": "External_Product_Id_15", "tac": "a3CXJ00000031fH2AQ" }, { "prd": "External_Product_Id_18", "tac": "a3CXJ00000031fH2AQ" }, { "prd": "External_Product_Id_19", "tac": "a3CXJ00000031fH2AQ" } ] } ``` * **400** JSON format not as expected or no registered transaction. Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** Promotion not found. ### POST Starts P&L analyze session for a promotion `POST /api/v68.0/pnlanalyze/sessions/start` Operation ID: `Starts a P&L analyze session`. Tags: Promotion Management. Security: oauth\_2\_0. Starts a P&L analyze session for the requested promotion. This session is valid for 15min. The P&L analyze result can be fetched by another GET API using the current session id provided in the response of this API. **Permission Role:** Promotions read #### Request body (required) Media type: `application/json`. Schema: `object`. * `promotionid` (_string_, required) Salesforce ID of the promotion (Promotion\_\_c.Id) Minimum length: 18. Maximum length: 18. * `salesorg` (_string_, required) SalesOrg of the promotion Minimum length: 4. Maximum length: 4. * `product` (_string_) Filter for a selected Product ID. Either product or measurename filter is required. Minimum length: 4. Maximum length: 4. * `measurename` (_string_) Filter for a selected measure name. Either product or measurename filter is required. Minimum length: 4. Maximum length: 4. _Example_ ``` { "promotionid": "a2YTC0000001vmb2AB", "salesorg": "0001" } ``` #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "status": "Queued", "message": "Successfully queued request.", "sessionId": "3536f9e3-c017-426d-85ad-9de2207b77cd" } ``` * **400** The API request is not successful. Review the input parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get the result of P&L analyze session `GET /api/v68.0/pnlanalyze/sessions/{sessionid}` Operation ID: `Get the result of P&L analyze session`. Tags: Promotion Management. Security: oauth\_2\_0. Get the result of P&L analyze session for the requested measure and product. This result contains daily split of measure values for the entire promotion duration for which P&L session was started. **Permission Role:** Promotions read #### Parameters * `sessionid` (path, string, required) Session ID received from the P&L analyze POST request * `measurename` (query, string, required) Filter for a selected measure name Minimum length: 4. Maximum length: 4. * `product` (query, string, required) Filter for a selected Product ID #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "status": "Done", "sessionid": "937f44d2-256e-4efd-85f9-57dfddff6918", "response": { "accountid": "001TC000001aYXRYA2", "promotionid": "a2YTC0000001vmb2AA", "dateFrom": "2021-09-06T00:00:00.000Z", "dateThru": "2021-09-09T00:00:00.000Z", "productid": "01tTC000000ClTnYAK", "measurename": "PlanBaseVolume", "values": [ { "date": "2021-09-06T00:00:00.000Z", "value": 117, "weekdayshare": 0.1 }, { "date": "2021-09-07T00:00:00.000Z", "value": 117, "weekdayshare": 0.1 }, { "date": "2021-09-08T00:00:00.000Z", "value": 117, "weekdayshare": 0.1 }, { "date": "2021-09-09T00:00:00.000Z", "value": 351, "weekdayshare": 0.3 } ] } } ``` * **400** The API request is not successful. Review the path & query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get accounts available and successfully transferred into CGCloud Processing services internal structures `GET /api/v68.0/support/accounts` Operation ID: `Get accounts available and successfully transferred into CGCloud Processing services internal structures`. Tags: Support Management. Security: oauth\_2\_0. Retrieve available accounts and transfer them into the internal structures of the CGCloud Processing services. The result is limited to 100.000 accounts. **Permission Role:** Support #### Parameters * `filter` (query, string) Filter on external ID. All IDs starting with the filter string are selected. Maximum length: 30. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` [ { "sfid": "SF1", "externalid": "External_Account_Id_1" }, { "sfid": "SF2", "externalid": "External_Account_Id_2" }, { "sfid": "SF3", "externalid": "External_Account_Id_3" } ] ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get products available and successfully transferred into CGCloud Processing services internal structures `GET /api/v68.0/support/products` Operation ID: `Get products available and successfully transferred into CGCloud Processing services internal structures`. Tags: Support Management. Security: oauth\_2\_0. Retrieve available products and transfer them into the internal structures of the CGCloud Processing services. The limit is 100.000 products. **Permission Role:** Support #### Parameters * `filter` (query, string) Filter on external ID. All IDs starting with the filter string are selected. Maximum length: 30. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` [ { "sfid": "SF1", "externalid": "External_Account_Id_1" }, { "sfid": "SF2", "externalid": "External_Account_Id_2" }, { "sfid": "SF3", "externalid": "External_Account_Id_3" } ] ``` * **400** The API request is not successful. Review the query parameters, for example, the character limit of filter. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Analyze internal datastructures for integer values on a weekly basis `GET /api/v68.0/support/volumes/weeklymeasureint` Operation ID: `Analyze internal datastructures for integer values on a weekly basis`. Tags: Support Management. Security: oauth\_2\_0. Analyze internal datastructures for integer values on a weekly basis. This API is only for support purposes and is subject to change without notice. To use this API, you must have support privileges. The API is limited to 100.000 rows and uses pagination. **Permission Role:** Support #### Parameters * `measure` (query, string, required) List of measures comma separated. Maximum 10 measure codes. Minimum length: 1. Maximum length: 49. * `year` (query, string, required) Year of the requested measures. For example, 2016 Minimum length: 4. Maximum length: 4. * `account` (query, string) List of account ID. A maximum 30 IDs are supported. Minimum length: 1. Maximum length: 329. * `product` (query, string) List of product ID. Maximum 30 IDs are supported. Minimum length: 1. Maximum length: 329. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "measures": [ { "acc": "External_Account_Id_1", "prd": "External_Product_Id_9", "row": { "accountid": 1, "productid": 9, "periodid": 5559, "measurecode": "WI", "week1": 11, "week2": null, "week3": null, "week4": null, "week5": null, "week6": null, "week7": null, "week8": null, "week9": null, "week10": null, "week11": null, "week12": null, "week13": null, "week14": null, "week15": null, "week16": null, "week17": null, "week18": null, "week19": null, "week20": null, "week21": null, "week22": null, "week23": null, "week24": null, "week25": null, "week26": null, "week27": null, "week28": null, "week29": null, "week30": null, "week31": null, "week32": null, "week33": null, "week34": null, "week35": null, "week36": null, "week37": null, "week38": null, "week39": null, "week40": null, "week41": null, "week42": null, "week43": null, "week44": null, "week45": null, "week46": null, "week47": null, "week48": null, "week49": null, "week50": null, "week51": null, "week52": null, "week53": null, "week54": null } } ] } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Analyze internal datastructures for decimal values on a weekly basis `GET /api/v68.0/support/volumes/weeklymeasurereal` Operation ID: `Analyze internal datastructures for decimal values on a weekly basis`. Tags: Support Management. Security: oauth\_2\_0. Analyze internal datastructures for decimal values on a weekly basis. This API is only for support purposes and is subject to change without notice. To use this API, you must have support privileges. The API is limited to 100.000 rows and uses pagination. **Permission Role:** Support #### Parameters * `measure` (query, string, required) List of measures comma separated. Maximum 10 measure codes. Minimum length: 1. Maximum length: 49. * `year` (query, string, required) Year of the requested measures. For example, 2016 Minimum length: 4. Maximum length: 4. * `account` (query, string) List of account ID. A maximum 30 IDs are supported. Minimum length: 1. Maximum length: 329. * `product` (query, string) List of product ID. A maximum 30 IDs are supported. Minimum length: 1. Maximum length: 329. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "measures": [ { "acc": "External_Account_Id_2", "prd": "External_Product_Id_3", "row": { "accountid": 2, "productid": 3, "periodid": 5559, "measurecode": "WD", "week1": null, "week2": null, "week3": null, "week4": null, "week5": null, "week6": null, "week7": null, "week8": null, "week9": null, "week10": null, "week11": null, "week12": null, "week13": null, "week14": null, "week15": null, "week16": null, "week17": null, "week18": null, "week19": null, "week20": -345.2, "week21": null, "week22": null, "week23": null, "week24": null, "week25": null, "week26": null, "week27": null, "week28": null, "week29": null, "week30": null, "week31": null, "week32": null, "week33": null, "week34": null, "week35": null, "week36": null, "week37": null, "week38": null, "week39": null, "week40": null, "week41": null, "week42": null, "week43": null, "week44": null, "week45": null, "week46": null, "week47": null, "week48": null, "week49": null, "week50": null, "week51": null, "week52": null, "week53": null, "week54": null } } ] } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Analyze internal data structures for integer values on a daily basis `GET /api/v68.0/support/volumes/dailymeasureint` Operation ID: `Analyze internal data structures for integer values on a daily basis`. Tags: Support Management. Security: oauth\_2\_0. Analyze internal data structures for integer values on a daily basis. This API is only for support purposes and is subject to change without notice. To use this API, you must have support privileges. The API is limited to 100.000 rows and uses pagination. **Permission Role:** Support #### Parameters * `measure` (query, string, required) List of measures comma separated. Maximum 10 measure codes. Minimum length: 1. Maximum length: 49. * `year` (query, string, required) Year of the requested measures. For example, 2016 Minimum length: 4. Maximum length: 4. * `month` (query, string, required) Month of the requested measures. For example, 1 and 10 Minimum length: 1. Maximum length: 2. * `account` (query, string) List of account ID. A maximum 30 IDs are supported. Minimum length: 1. Maximum length: 329. * `product` (query, string) List of product ID. A maximum 30 IDs are supported. Minimum length: 1. Maximum length: 329. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "measures": [ { "acc": "External_Account_Id_8", "prd": "External_Product_Id_1", "month": 2, "row": { "accountid": 8, "productid": 1, "periodid": 21402, "measurecode": "DI", "day1": null, "day2": null, "day3": null, "day4": null, "day5": null, "day6": null, "day7": null, "day8": 3, "day9": null, "day10": null, "day11": null, "day12": null, "day13": null, "day14": null, "day15": null, "day16": null, "day17": null, "day18": null, "day19": null, "day20": null, "day21": null, "day22": null, "day23": null, "day24": null, "day25": null, "day26": null, "day27": null, "day28": null, "day29": null, "day30": null, "day31": null } } ] } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Analyze internal data structures for decimal values on a daily basis `GET /api/v68.0/support/volumes/dailymeasurereal` Operation ID: `Analyze internal data structures for decimal values on a daily basis`. Tags: Support Management. Security: oauth\_2\_0. Analyze internal data structures for decimal values on a daily basis. This API is only for support purposes and is subject to change without notice. To use this API, you must have support privileges. The API is limited to 100.000 rows and uses pagination. **Permission Role:** Support #### Parameters * `measure` (query, string, required) List of measures comma separated. Maximum 10 measure codes. Minimum length: 1. Maximum length: 49. * `year` (query, string, required) Year of the requested measures. For example, 2016 Minimum length: 4. Maximum length: 4. * `month` (query, string, required) Month of the requested measures. For example, 1 and 10 Minimum length: 1. Maximum length: 2. * `account` (query, string) List of account ID. A maximum 30 IDs are supported. Minimum length: 1. Maximum length: 329. * `product` (query, string) List of product ID. A maximum 30 IDs are supported. Minimum length: 1. Maximum length: 329. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "measures": [ { "acc": "External_Account_Id_1", "prd": "External_Product_Id_3", "month": 2, "row": { "accountid": 1, "productid": 3, "periodid": 21391, "measurecode": "DD", "day1": null, "day2": null, "day3": null, "day4": null, "day5": null, "day6": null, "day7": null, "day8": null, "day9": null, "day10": null, "day11": 777.3434, "day12": null, "day13": null, "day14": null, "day15": null, "day16": null, "day17": null, "day18": null, "day19": null, "day20": null, "day21": null, "day22": null, "day23": null, "day24": null, "day25": null, "day26": null, "day27": null, "day28": null, "day29": null, "day30": null, "day31": null } } ] } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Analyze internal data structures of type decimal on a weekly basis `GET /api/v68.0/support/volumes/promotiontacticweeklymeasurereal` Operation ID: `Analyze internal data structures of type decimal on a weekly basis`. Tags: Support Management. Security: oauth\_2\_0. Analyze internal data structures of type decimal on a weekly basis. This API is only for support purposes and is subject to change without notice. To use this API, you must have support privileges. The API is limited to 300.000 rows and uses pagination. **Permission Role:** Support #### Parameters * `measure` (query, string, required) List of measures comma separated. Maximum 10 measure codes. Minimum length: 1. Maximum length: 49. * `year` (query, string, required) Year of the requested measures. For example, 2016 Minimum length: 4. Maximum length: 4. * `account` (query, string) List of account ID. A maximum 30 IDs are supported. Minimum length: 1. Maximum length: 329. * `product` (query, string) List of product ID. Maximum 30 IDs are supported. Minimum length: 1. Maximum length: 329. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "measures": [ { "acc": "External_Account_Id_2", "prd": "External_Product_Id_3", "row": { "promotionid": "a2ZXJ000000017C2AQ", "tacticid": "a3CXJ00000031fH2AQ", "accountid": 2, "productid": 3, "periodid": 5559, "measurecode": "WD", "week1": null, "week2": null, "week3": null, "week4": null, "week5": null, "week6": null, "week7": null, "week8": null, "week9": null, "week10": null, "week11": null, "week12": null, "week13": null, "week14": null, "week15": null, "week16": null, "week17": null, "week18": null, "week19": null, "week20": -345.2, "week21": null, "week22": null, "week23": null, "week24": null, "week25": null, "week26": null, "week27": null, "week28": null, "week29": null, "week30": null, "week31": null, "week32": null, "week33": null, "week34": null, "week35": null, "week36": null, "week37": null, "week38": null, "week39": null, "week40": null, "week41": null, "week42": null, "week43": null, "week44": null, "week45": null, "week46": null, "week47": null, "week48": null, "week49": null, "week50": null, "week51": null, "week52": null, "week53": null, "week54": null } } ] } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Analyze internal data structures of type decimal on a daily basis `GET /api/v68.0/support/volumes/promotiontacticdailymeasurereal` Operation ID: `Analyze internal data structures of type decimal on a daily basis`. Tags: Support Management. Security: oauth\_2\_0. Analyze internal data structures of type decimal on a daily basis. This API is only for support purposes and is subject to change without notice. To use this API, you must have support privileges. The API is limited to 300.000 rows and uses pagination. **Permission Role:** Support #### Parameters * `measure` (query, string, required) List of measures comma separated. Maximum 10 measure codes. Minimum length: 1. Maximum length: 49. * `year` (query, string, required) Year of the requested measures. For example, 2016 Minimum length: 4. Maximum length: 4. * `month` (query, string, required) Month of the requested measures. For example, 1 and 10 Minimum length: 1. Maximum length: 2. * `account` (query, string) List of account ID. A maximum 30 IDs are supported. Minimum length: 1. Maximum length: 329. * `product` (query, string) List of product ID. A maximum 30 IDs are supported. Minimum length: 1. Maximum length: 329. * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "measures": [ { "acc": "External_Account_Id_1", "prd": "External_Product_Id_3", "month": 2, "row": { "promotionid": "a2ZXJ000000017C2AQ", "tacticid": "a3CXJ00000031fH2AQ", "accountid": 1, "productid": 3, "periodid": 21391, "measurecode": "DD", "day1": null, "day2": null, "day3": null, "day4": null, "day5": null, "day6": null, "day7": null, "day8": null, "day9": null, "day10": null, "day11": 777.3434, "day12": null, "day13": null, "day14": null, "day15": null, "day16": null, "day17": null, "day18": null, "day19": null, "day20": null, "day21": null, "day22": null, "day23": null, "day24": null, "day25": null, "day26": null, "day27": null, "day28": null, "day29": null, "day30": null, "day31": null } } ] } ``` * **400** The API request is not successful. Review the query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get a list of all dependencies like accounts, accountproducts, volumes (weekly and daily) of type integer or decimal for a specified account `GET /api/v68.0/support/accounts/{id}/summary` Operation ID: `Get a list of all dependencies for a specified account`. Tags: Support Management. Security: oauth\_2\_0. Retrieve a list of all dependencies like accounts, accountproducts, volumes (weekly and daily) of type integer or decimal for a specified account. **Permission Role:** Support #### Parameters * `year` (query, string) Filter for a given year. Default is the current year. Minimum length: 4. Maximum length: 4. * `id` (path, string, required) * `salesorg` (query, string, required) SalesOrg used to determine the correct periods and the first day of the week and the first week of the year. Minimum length: 4. Maximum length: 4. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "value": { "acc": "External_Account_Id_1", "accounts": [ { "measurecode": "COGS", "value": 0, "datefrom": "2016-01-01", "datethru": "2017-02-01" }, { "measurecode": "COGS", "value": 5, "datefrom": "2017-02-02", "datethru": "2018-01-01" } ], "accountsproducts": [ { "prd": "External_Product_Id_1", "prdsfid": "SF1", "prm": null, "tac": null, "measurecode": "COGS", "value": 1, "datefrom": "2018-01-01", "datethru": "2019-01-31" } ], "volumesweeksinteger": [ { "prd": "External_Product_Id_1", "prdsfid": "SF1", "datefrom": "2015-12-27", "datethru": "2016-12-24", "calendaryear": 2016, "measurecode": "WI", "week11": 888 } ], "volumesweeksdecimal": [ { "prd": "External_Product_Id_1", "prdsfid": "SF1", "datefrom": "2015-12-27", "datethru": "2016-12-24", "calendaryear": 2016, "measurecode": "WD", "week7": 222.3434 } ], "volumesdailyinteger": [ { "prd": "External_Product_Id_1", "prdsfid": "SF1", "datefrom": "2016-01-01", "datethru": "2016-01-31", "calendaryear": 2016, "measurecode": "DD", "day17": 5656 } ], "volumesdailydecimal": [ { "prd": "External_Product_Id_1", "prdsfid": "SF1", "datefrom": "2016-01-01", "datethru": "2016-01-31", "calendaryear": 2016, "measurecode": "DD", "day1": 1.1 } ] } } ``` * **400** The API request is not successful. Review the path and query parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. ### GET Get all registered users `GET /api/v68.0/users` Operation ID: `Get all registered users`. Tags: User Management. Security: oauth\_2\_0. Get all the registered users. **Permission Role:** User read #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` [ { "id": 450, "active": true, "user_id": "005580000018P03453", "organization_id": "00Q5856700cbyPEAQ", "username": "john.doe@company.com" } ] ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** User for the specified ID not found. ### POST Add a user `POST /api/v68.0/users` Operation ID: `Add a user`. Tags: User Management. Security: oauth\_2\_0. Add a new user. Available User roles to grant permission on integration APIs. The required permission role is mentioned in each integration api. **TRANSACTION\_REGISTER\_EXPLICIT:** Allows the access to transaction APIs like GET/POST/DELETE. **TEMPLATE\_MEASURE\_WRITE:** Allows the access to the APIs to register template measures for condition interfacing APIs. **TEMPLATE\_MEASURE\_READ:** Allows the access to the APIs to retrieve the registered template measures. **TEMPLATE\_VOLUMES\_WRITE:** Allows the access to the APIs to register template measures for volume interfacing APIs. **TEMPLATE\_VOLUMES\_READ:** Allows the access to the APIs to retrieve the registered template measures. **CONDITIONS\_WRITE:** Allows the access to the APIs to interface the conditions. **CONDITIONS\_READ:** Allows the access to the APIs to retrieve the conditions. **CONDITIONS\_DELETE:** Allows the access to the APIs to delete the conditions. **USER\_MANAGE:** Allows the access to the APIs related to user in order to manage new and existing users. **USER\_READ:** Allows Access to the API to fetch all the user details. **VOLUMES\_WRITE:** Allows the access to the APIs to write the volumes. **VOLUMES\_DELETE:** Allows the access to the APIs to delete the volumes. **VOLUMES\_READ:** Allows the access to the APIs to retrieve the volumes. **PROMOTIONS\_READ:** Allows the access to promotion APIs. **SUPPORT:** Allows the access to support APIs **ACCOUNTPLANS\_READ:** Allows the access to accounplan APIs. **PAYMENT\_READ:** Allows the access to payment APIs. **Permission Role:** User manage #### Request body (required) Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "organization_id": "02D580567801byPEAj", "user_id": "015684567818P5GAAD", "name": "john.doe@company.com", "privileges": { "TRANSACTION_REGISTER_EXPLICIT": true, "TEMPLATE_MEASURES_WRITE": true, "TEMPLATE_MEASURES_READ": true, "TEMPLATE_VOLUMES_WRITE": true, "TEMPLATE_VOLUMES_READ": true, "CONDITIONS_WRITE": true, "CONDITIONS_READ": true, "CONDITIONS_DELETE": true, "USERS_MANAGE": true, "USERS_READ": true, "VOLUMES_WRITE": true, "VOLUMES_DELETE": true, "VOLUMES_READ": true, "PROMOTIONS_READ": true, "SUPPORT": true, "ACCOUNTPLANS_READ": true, "PAYMENT_READ": true } } ``` #### Responses * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **409** User already exists. ### GET Get user information `GET /api/v68.0/users/{id}` Operation ID: `Get user information`. Tags: User Management. Security: oauth\_2\_0. Get user information like assigned privileges **Permission Role:** User read #### Parameters * `id` (path, integer, required) Internal ID of CGCloud Processing Engine. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "id": "444", "active": true, "organization_id": "organization_id", "user_id": "user_id", "name": "Test User", "privileges": { "ACCOUNTPLANS_READ": true, "CONDITIONS_DELETE": true, "CONDITIONS_PROMOTIONS": true, "CONDITIONS_READ": true, "CONDITIONS_WRITE": true, "FILES_READ": true, "PROMOTIONS_READ": true, "SUPPORT": true, "TEMPLATE_MEASURES_READ": true, "TEMPLATE_MEASURES_WRITE": true, "TEMPLATE_VOLUMES_READ": true, "TEMPLATE_VOLUMES_WRITE": true, "TRANSACTION_REGISTER_EXPLICIT": true, "USERS_MANAGE": true, "USERS_READ": true, "VOLUMES_DELETE": true, "VOLUMES_READ": true, "VOLUMES_WRITE": true, "PAYMENT_READ": true } } ``` * **400** The API request is not successful. Review the path parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** User for the specified ID not found. ### PUT Update a user `PUT /api/v68.0/users/{id}` Operation ID: `Update a user`. Tags: User Management. Security: oauth\_2\_0. Update an existing user. Depending on the user privileges, remove or add the user details. Available User roles to grant permission on integration APIs. The required permission role is mentioned in each integration api. **TRANSACTION\_REGISTER\_EXPLICIT:** Allows the access to transaction APIs like GET/POST/DELETE. **TEMPLATE\_MEASURE\_WRITE:** Allows the access to the APIs to register template measures for condition interfacing APIs. **TEMPLATE\_MEASURE\_READ:** Allows the access to the APIs to retrieve the registered template measures. **TEMPLATE\_VOLUMES\_WRITE:** Allows the access to the APIs to register template measures for volume interfacing APIs. **TEMPLATE\_VOLUMES\_READ:** Allows the access to the APIs to retrieve the registered template measures. **CONDITIONS\_WRITE:** Allows the access to the APIs to interface the conditions. **CONDITIONS\_READ:** Allows the access to the APIs to retrieve the conditions. **CONDITIONS\_DELETE:** Allows the access to the APIs to delete the conditions. **USER\_MANAGE:** Allows the access to the APIs related to user in order to manage new and existing users. **USER\_READ:** Allows Access to the API to fetch all the user details. **VOLUMES\_WRITE:** Allows the access to the APIs to write the volumes. **VOLUMES\_DELETE:** Allows the access to the APIs to delete the volumes. **VOLUMES\_READ:** Allows the access to the APIs to retrieve the volumes. **PROMOTIONS\_READ:** Allows the access to promotion APIs. **SUPPORT:** Allows the access to support APIs **ACCOUNTPLANS\_READ:** Allows the access to accounplan APIs. **PAYMENT\_READ:** Allows the access to payment APIs. **Permission Role:** User manage #### Parameters * `id` (path, integer, required) Internal ID of CGCloud Processing Engine. #### Request body (required) Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "active": true, "name": "john.doe@company.com", "privileges": { "TRANSACTION_REGISTER_EXPLICIT": true, "TEMPLATE_MEASURES_WRITE": true, "TEMPLATE_MEASURES_READ": true, "TEMPLATE_VOLUMES_WRITE": true, "TEMPLATE_VOLUMES_READ": true, "CONDITIONS_WRITE": true, "CONDITIONS_READ": true, "CONDITIONS_DELETE": true, "USERS_MANAGE": true, "USERS_READ": true, "VOLUMES_WRITE": true, "VOLUMES_DELETE": true, "VOLUMES_READ": true, "PROMOTIONS_READ": true, "SUPPORT": true, "ACCOUNTPLANS_READ": true, "PAYMENT_READ": true } } ``` #### Responses * **400** JSON format not as expected Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'privileges'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** User with the specified ID not found. ### DELETE Delete a user `DELETE /api/v68.0/users/{id}` Operation ID: `Delete a user`. Tags: User Management. Security: oauth\_2\_0. Delete a speficied user. Only if the user has not used the API in the last six months. **Warning:**The DELETE API permanently deletes data. Data once deleted cannot be restored. **Permission Role:** User manage #### Parameters * `id` (path, integer, required) Internal ID of CGCloud Processing Engine. #### Responses * **200** Successfully deleted. * **400** The API request is not successful. Review the path parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** User for the specified ID not found. ### GET Get user history (audit information) in order by date descending `GET /api/v68.0/users/{id}/history` Operation ID: `Get user history`. Tags: User Management. Security: oauth\_2\_0. Get user history (audit information) in order by date descending. **Permission Role:** User read #### Parameters * `limit` (query, integer) Maximum number of events returned in descending order by time Default: `50`. * `id` (path, integer, required) Internal ID of CGCloud Processing Engine. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "id": "450", "organization_id": "00D580000444byPEAQ", "user_id": "005567000018P0WAAU", "name": "john.doe@company.com", "History": { "actions": [ { "logdate": "2016-09-21T11:39:30.975857", "action": "ROUTE", "description": "GET api/users/450/history?limit=2", "affected_rows": 0 }, { "logdate": "2016-09-21T11:39:22.573672", "action": "ROUTE", "description": "GET api/users/450/history?limit=10", "affected_rows": 0 } ] } } ``` * **400** The API request is not successful. Review the query and path parameters. * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** User for the specified ID not found. ### GET Export CSV files `GET /api/v68.0/files/getcsv/{csvguid}` Operation ID: `Export CSV files`. Tags: Export Management. Security: oauth\_2\_0. A stream or file that the caller can use to download the CSV content in ZIP format for the specified csvGUID. The default location is full. You must unzip it before you can use the CSV. By providing a path thru the query, you are able to direct where the CSV file are stored. The lifecycle of a file depends on a configuration in which directory the file is located. **Permission Role:** Files read #### Parameters * `csvguid` (path, string, required) A valid GUID (Globally Unique Identifier) to identify the requested file. Minimum length: 36. Maximum length: 36. * `path` (query, string) Location of the CSV file. Valid values are full or delta. Default is full. Minimum length: 1. Maximum length: 250. #### Responses * **200** CSV content/file Media type: `application/json, application/gzip`. Schema: `file`. Type: `file`. * **400** JSON format not as expected or no registered transaction. Media type: `application/json, application/gzip`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "invalid payload", "code": 104, "details": [ null, [ { "dataPath": "", "message": "must have required property 'transaction'" } ] ] } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** Path not exist. ### GET Get data for a single payment by payment id `GET /api/v68.0/payments/{paymentid}/aggregation` Operation ID: `Get data for a single payment by payment id`. Tags: Payment Management. Security: oauth\_2\_0. Retrieve data for a single payment with filters like tactic, measure, productlevel using pagination. Total value for a measure and product for measures on payment level. **Permission Role:** Payment read #### Parameters * `salesorg` (query, string, required) The name of the sales org. Minimum length: 4. Maximum length: 4. * `measure` (query, string) An optional filter to select only values for a single or multiple measure codes. Multiple measure codes are passed comma separated without spaces in between. Limited to 60 measure codes. Minimum length: 1. Maximum length: 299. * `tactic` (query, string) An optional filter to select only values for a single or multiple tactics. Multiple tactic IDs are passed comma-separated without spaces in between. Limited to 15 tactic IDs. If the tactic is not specified all tactics will be returned. Minimum length: 1. Maximum length: 299. * `pagesize` (query, integer) Pagination parameter to show the specified records per page. Default: `10000`. Minimum: 1000. Maximum: 50000. * `showmeta` (query, boolean) Show the pagination meta header within the response. Default: `false`. * `keepalive` (query, integer) Specifies how long requested pages are alive in minutes. Default: `10`. Minimum: 5. Maximum: 60. * `productlevel` (query, string) An optional filter that allows you to select only values for a specific product level. For example, "brand". Minimum length: 1. Maximum length: 20. * `paymentid` (path, string, required) Salesforce ID of the payment. #### Responses * **200** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "meta": { "page": 0, "keepalive": 10, "pagesize": 10000, "page_count": 1, "this_page_count": 88, "total": 88, "request_id": "748f319c-1c79-75e1-05f4-9fc909a3a5e2", "originalurl": "/api/v68.0/payments/a24SL0000001OWaYAM/aggregation?salesorg=0001&tactic=a37SL0000001IAlYAM&showmeta=true", "links": { "first": "/api/v68.0/payments/a24SL0000001OWaYAM/aggregation?salesorg=0001&tactic=a37SL0000001IAlYAM&showmeta=true&request_id=748f319c-1c79-75e1-05f4-9fc909a3a5e2&page=0", "last": "/api/v68.0/payments/a24SL0000001OWaYAM/aggregation?salesorg=0001&tactic=a37SL0000001IAlYAM&showmeta=true&request_id=748f319c-1c79-75e1-05f4-9fc909a3a5e2&page=0" } }, "measures": [ { "measurecode": "PAMO", "productid": "01tSL0000000u3tYAA", "paymenttacticid": "a22SL0000000HU0YAM", "value": 695.48, "tacticid": "a37SL0000001IAlYAM" }, { "measurecode": "PAMO", "productid": "01tSL0000000u4aYAA", "paymenttacticid": "a22SL0000000HU0YAM", "value": 591.53, "tacticid": "a37SL0000001IAlYAM" } ] } ``` * **400** Media type: `application/json`. Schema: `any`. Type: `any`. _Example_ ``` { "error": "Invalid Tactic Id format", "code": 143 } ``` * **401** The authorization token used to send the API request is invalid or it is not validated by the Salesforce token validation. * **403** The API request is not authorized or may need sufficient user privileges. * **404** Requested page not found.