Hi everyone
I'm using this endpoint to try and update the name of a Marketo Email program. https://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Programs/upda...
Here's my Python code:
updateProgramRequest = {'name': 'GA_190123 VIP Wellness Sale - German'}
parameters = {'access_token': access_token, 'updateProgramRequest': updateProgramRequest}
data = requests.post(
base_endpoint + "program/5525.json",
params=parameters
).json()
I get a 200 response, so it's saying it worked - but all the parameters - including "name", which I am trying to update - look exactly the same. I confirmed in Marketo that nothing has changed. Why?
Solved! Go to Solution.
Ah, thank you! I was passing the details as parameters instead of inside the body of the request. I changed that and now it's working.
However, I do find it weird that I get a 200 success response when nothing happened. If you post a change, and no change is posted, surely that shouldn't come back with "success"?
I just tried the same in postman using the below endpoint and parameter and it works fine:
End Point:
Body:
Response:
Note* My API user has both read/write access for all operations on the Program.
Ah, thank you! I was passing the details as parameters instead of inside the body of the request. I changed that and now it's working.
However, I do find it weird that I get a 200 success response when nothing happened. If you post a change, and no change is posted, surely that shouldn't come back with "success"?