Hi Tim,
Thank you for raising this concern to the Google Ads API support team.
Regarding your concern, it appears that this is specifically about customer match. You may refer to our
Customer Match documentation for more details about this. Let me provide you steps with sample code.
You will need to create first a
userlist.
Sample code:
curl -X POST "https://googleads.googleapis.com/$(version)/customers/$CustomerID)/userLists:mutate" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${OAUTH2_ACCESS_TOKEN}" \
--header "developer-token: ${DEVELOPER_TOKEN}" \
--header "login-customer-id: ${LOGIN_CUSTOMER_ID}" \
--data "{
'operations': [
{
'create': {
'crmBasedUserList': {
'uploadKeyType': 'CONTACT_INFO'
},
'name': 'Customer Match list $(date)',
'description': 'A list of customers that originated from email addresses',
'membershipLifeSpan': 30
}
}
]
# Substitute ${USER_LIST_RESOURCE_NAME} with the user list resource name
# returned when creating the user list in the last step.
And then you will need to create an
offlineuserdatajob to upload data.
curl -X POST "https://googleads.googleapis.com/$(version)/customers/$CustomerID)//offlineUserDataJobs:create" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${OAUTH2_ACCESS_TOKEN}" \
--header "developer-token: ${DEVELOPER_TOKEN}" \
--header "login-customer-id: ${LOGIN_CUSTOMER_ID}" \
--data "{
'job': {
'type': 'CUSTOMER_MATCH_USER_LIST',
'customerMatchUserListMetadata': {
'userList': '${USER_LIST_RESOURCE_NAME}'
}
}
}"
Lastly, you will need to use the
offlineUserDataJobs.addOperations to Add operations to the offline user data job.
# Substitute ${OFFLINE_USER_DATA_JOB_ID} with the offline user data
# job ID (a long number) returned when creating the job in the last step.
# Uploads email, first name, last name, and address data to the job.
# Note: Emails, first names, and last names must be SHA-256 encoded.
curl -X POST "https://googleads.googleapis.com/$(version)/customers/$CustomerID)/offlineUserDataJobs/${OFFLINE_USER_DATA_JOB_ID}:addOperations" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${OAUTH2_ACCESS_TOKEN}" \
--header "developer-token: ${DEVELOPER_TOKEN}" \
--header "login-customer-id: ${LOGIN_CUSTOMER_ID}" \
--data "{
'operations': {
'create': {
'userIdentifiers': {
'hashedEmail': 'REDACTED'
}
}
},
'operations': {
'create': {
'userIdentifiers': {
'addressInfo': {
'hashedFirstName': 'REDACTED',
'hashedLastName': 'REDACTED',
'countryCode': 'US',
'postalCode': '10011'
}
}
}
},
'enablePartialFailure': 'true'
}"
To check your offlineuserdatajob's status, you may use the
offline_user_data_job report.
Let us know how it goes on your end.
Links included in this email:
Regards,
 |
Google Ads API Team |

ref:_00D1U1174p._5004Q2knQ1s:ref