SAP Knowledge Base Article - Public

3042852 - How to Update Marketing Permission using Odata

Symptom

You want to update Marketing permission using Odata

Environment

SAP Cloud for Customer

Resolution

  • First Query on the Marketing Permission Collection using Business Partner ID to get the relevant record

Sample Query:
https://myXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/MarketingPermissionCollection?$filter=BusinessPartner_ID%20eq%20%27ZZZZZ%27


XXXXX - Tenant ID
ZZZZZ - Business Partner ID

  • Then Navigate to the Channel Permission Collection to get the Object id of the Channel Permission

Sample Query:
URL : https://myXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/MarketingPermissionCollection('YYYYY')/ChannelPermission


XXXXX - Tenant ID
YYYYY - Object ID of the Marketing Permission

The above Query will give you the list of all the Channel Permissions. Choose the Object ID of the Channel Permission which you want to update

  • Update the Channel Permission using Object ID.

Method : Patch
URL :
https://myXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/ChannelPermission('OOOOO')


XXXXX - Tenant ID
OOOOO -  Object ID of the Channel Permission


Payload :

"Consent": "1"
}
 

Keywords

Marketing Permission, Odata, PATCH , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem

Product

SAP Cloud for Customer add-ins all versions