API beginner here, attempting (and failing) to create a Bulk Export Activity job using Postman.
This request…
https://111-XXX-222.mktorest.com/bulk/v1/activities/export/create.json?format=CSV&createdAt={"startAt":"2021-11-07T00:00:00Z","endAt":"2021-11-09T00:00:00Z"}&activityTypeIds=2
…is returning this error:
"code": "612",
"message": "Invalid Content Type"
Have tweaked the query parameters multiple times, yet to stumble on the correct format.
Any pointers on what to correct in the request format/structure would be greatly appreciated.
Using the POST method and permissions, authentication not an issue (other APIs responding as expected).
Thanks in advance.
Solved! Go to Solution.
That may be sent in a POST, but you’re putting the the important payload in the query string, which is incorrect.
You really should not have anything in the query string.
The JSON payload is like so:
{
"filter": {
"activityTypeIds" : [104],
"createdAt": {
"startAt": "2021-03-01T00:00:00Z",
"endAt": "2021-03-31T23:59:59Z"
}
}
}
That may be sent in a POST, but you’re putting the the important payload in the query string, which is incorrect.
You really should not have anything in the query string.
The JSON payload is like so:
{
"filter": {
"activityTypeIds" : [104],
"createdAt": {
"startAt": "2021-03-01T00:00:00Z",
"endAt": "2021-03-31T23:59:59Z"
}
}
}