I'm trying to create custom Pricing Rules on Google Ad Manager programatically, but the GAM API doesn't have CRUD Pricing Rules endpoints implemented yet, so i'm looking another ways to do.
I tried to Inspect Element on GAM webapp (admanager.google.com) and on Network tab i seen when i save a Pricing Rule the browser makes a call to this endpoint:
https://admanager.google.com/dfp/v2/exchange/rpc/PricingRuleService?methodName=createPricingRule
So, i believe that i can use this endpoint to create custom Pricing Rules, the problem is on the request body, the webapp places this JSON:
{
"method": "createPricingRule",
"params": {
"2": {
"1119": "29015379732033875438"
},
"1532": {
"1025": 1925346054,
"2103": {
"163": {},
"881": {
"2253": {
"660": 2531
}
},
"1085": {
"3075": [
{
"259": "2032"
}
]
},
"2395": {},
"2527": {},
"2921": {
"1104": false
},
"3417": {
"1225": {
"3786": false
},
"1543": {
"290": false
},
"2381": {},
"3125": {}
},
"3792": true
},
"2377": false,
"3171": [
{
"903": 66989036,
"1021": {
"385": "USD",
"2182": "200000"
},
"3684": {
"403": {},
"1337": {},
"2077": {},
"2929": {},
"3785": {
"1033": true
}
}
}
],
"3844": "TestReport.Country.AdUnitName.3"
}
}
}
I don't understand the keys of this JSON, there no properties, only strings with numbers and values.
Any idea or help?
Thanks! Regards