Bulk Extract API....help please | Community
Skip to main content
New Participant
November 10, 2021
Solved

Bulk Extract API....help please

  • November 10, 2021
  • 1 reply
  • 1826 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

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" } } }

 

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
November 10, 2021

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" } } }