SOLVED

Bulk Extract API....help please

Go to solution
haliddelkic-cr
Level 1

Bulk Extract API....help please

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.

Tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Bulk Extract API....help please

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

 

View solution in original post

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Bulk Extract API....help please

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