curl --location '
https://googleads.googleapis.com/v17/customers/8702376.../campaigns:mutate' \
--header 'Content-Type: application/json' \
--header 'developer-token: 0-4PjaUzBnyeiqsEkhb...' \
--header 'login-customer-id: 8663393...' \
--header 'Authorization: Bearer ya29.a0AcM612ym1r94_mWDmNoQ5-rG-67OoAi-1Jj-DS5BcZqqGtYf6FWBha6Bt_j96iUu4liInQOY-MjsolKYFDOYI8PZMR9_Xb0m-2YuZTm2nwGyp9xpvOBOauDqDjTuwh1LxCnCAA1YQb50r3GjKMpm4WXu-Pd4s3fQZIUe6waCgYKAagSARMSFQHGX2MidTHNzPMydXz6r7gSqVVuMQ...' \
--data '{
"operations": [
{
"create": {
"name": "new-PM-campaign",
"status": "ENABLED",
"advertisingChannelType": "PERFORMANCE_MAX",
"campaignBudget": "customers/8702376.../campaignBudgets/13837288...",
"biddingStrategyType": "ENHANCED_CPC",
"maximizeConversionValue": {
"targetRoas": 0.9
}
}
}
]
}'
The above curl is regarding creating campaign, that i created successfully and i got the response of a resource as
customers/8702376.../campaigns/21572158...
curl --location '
https://googleads.googleapis.com/v17/customers/8702376.../assetGroupAssets:mutate' \
--header 'Content-Type: application/json' \
--header 'developer-token: 0-4PjaUzBnyeiqsEkhb...' \
--header 'login-customer-id: 8663393...' \
--header 'Authorization: Bearer ya29.a0AcM612xKADH3bA8Db-er8Lk7wqYeF7QPkFu5SI1CH0wK0Nu2hMN41-cM6fM7mX_cv_emBzugBdv23lh0ZObrIHQnmzZ9wzjjK7gDWZwhh7LUjO40Pyq_sx5fc8M7XsK4Uqz9rZpBgsMqpIsNXj7xNFq1cwZ-XHGO3rjGcwIZ9QaCgYKAeQSARMSFQHGX2Mix_Ts_Ndx2xXMb9EahGR5IQ0...' \
--data '{
"operations": [
{
"create": {
"assetGroup": "customers/8702376.../assetGroups/-1",
"asset": "customers/8702376.../assets/156759927...",
"fieldType": "HEADLINE"
}
},
{
"create": {
"assetGroup": "customers/8702376.../assetGroups/-1",
"asset": "customers/8702376.../assets/156746501...",
"fieldType": "AD_IMAGE"
}
}
]
}'
then this above is the curl regarding making of asset group assets . as i have not made asset group so i used temporary id to refer it for future
. i am getting an error below as it is not considering the asset group resource with the temporary id that i mentioned here
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"errors": [
{
"errorCode": {
"mutateError": "RESOURCE_NOT_FOUND"
},
"message": "Resource was not found.",
"trigger": {
"int64Value": "-1"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
},
{
"fieldName": "create"
},
{
"fieldName": "asset_group"
}
]
}
},
{
"errorCode": {
"mutateError": "RESOURCE_NOT_FOUND"
},
"message": "Resource was not found.",
"trigger": {
"int64Value": "-1"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 1
},
{
"fieldName": "create"
},
{
"fieldName": "asset_group"
}
]
}
}
],
"requestId": "iQnDOIvLAySHvEyG9LLWPA"
}
]
}
}
curl --location '
https://googleads.googleapis.com/v17/customers/8702376846/assetGroups:mutate' \
--header 'Content-Type: application/json' \
--header 'developer-token: 0-4PjaUzBnyeiqsEkhbpgg' \
--header 'login-customer-id:
8663393180' \
--header 'Authorization: Bearer ya29.a0AcM612xKADH3bA8Db-er8Lk7wqYeF7QPkFu5SI1CH0wK0Nu2hMN41-cM6fM7mX_cv_emBzugBdv23lh0ZObrIHQnmzZ9wzjjK7gDWZwhh7LUjO40Pyq_sx5fc8M7XsK4Uqz9rZpBgsMqpIsNXj7xNFq1cwZ-XHGO3rjGcwIZ9QaCgYKAeQSARMSFQHGX2Mix_Ts_Ndx2xXMb9EahGR5IQ0177' \
--data '{
"operations": [
{
"create": {
"resourceName": "customers/
8702376846/assetGroups/-1",
"campaign": "customers/
8702376846/campaigns/21572158461",
"name": "pm-headline-asset-group",
"finalUrls": [
"
https://app-dev.adlaunch.io/"
],
"finalMobileUrls": [
"
https://your-mobile-landing-page.com"
],
"status": "ENABLED",
"adStrength": "PENDING"
}
}
]
}'
this is the curl i used for making asset group and the resource id i used here was temporary that i mentioned while making asset group assets ,but i am getting a following error
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"errors": [
{
"errorCode": {
"assetGroupError": "NOT_ENOUGH_HEADLINE_ASSET"
},
"message": "Headline asset for a valid asset group is not enough.",
"trigger": {
"stringValue": "Asset type: headline"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
}
]
}
},
{
"errorCode": {
"assetGroupError": "NOT_ENOUGH_LONG_HEADLINE_ASSET"
},
"message": "Long headline asset for a valid asset group is not enough.",
"trigger": {
"stringValue": "Asset type: long headline"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
}
]
}
},
{
"errorCode": {
"assetGroupError": "NOT_ENOUGH_DESCRIPTION_ASSET"
},
"message": "Description headline asset for a valid asset group is not enough.",
"trigger": {
"stringValue": "Asset type: description"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
}
]
}
},
{
"errorCode": {
"assetGroupError": "NOT_ENOUGH_MARKETING_IMAGE_ASSET"
},
"message": "Marketing image asset for a valid asset group is not enough.",
"trigger": {
"stringValue": "Asset type: marketing image"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
}
]
}
},
{
"errorCode": {
"assetGroupError": "NOT_ENOUGH_SQUARE_MARKETING_IMAGE_ASSET"
},
"message": "Square marketing image asset for a valid asset group is not enough.",
"trigger": {
"stringValue": "Asset type: square marketing image"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
}
]
}
},
{
"errorCode": {
"assetGroupError": "NOT_ENOUGH_BUSINESS_NAME_ASSET"
},
"message": "Business name asset for a valid asset group is not enough.",
"trigger": {
"stringValue": "Asset type: business name"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
}
]
}
},
{
"errorCode": {
"assetGroupError": "NOT_ENOUGH_LOGO_ASSET"
},
"message": "Logo asset for a valid asset group is not enough.",
"trigger": {
"stringValue": "Asset type: logo"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
}
]
}
},
{
"errorCode": {
"assetGroupError": "SHORT_DESCRIPTION_REQUIRED"
},
"message": "Short description asset for a valid asset group is required.",
"trigger": {
"stringValue": "Asset type: description"
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
}
]
}
}
],
"requestId": "JCA0F6kUxccxMdBYKFGZ8A"
}
]
}
}
kindly go through all these curls and let me know where am i making a mistake or missing something