SOLVED

Unable to retrieve Status after REST Bulk Leads Insert

Go to solution
Anonymous
Not applicable

Unable to retrieve Status after REST Bulk Leads Insert

I am attempting to upload a CSV file using the REST Leads Bulk Import.

When I submit the request, I get the following,

{"batchId":1124,"importId":"1124","status":"Queued"}

I then use the batchId (in this case 1124) to attempt to poll for the results using the Classic ASP Code below:

Set xmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")

xmlHTTP.Open "GET", "https://REDACTED.mktorest.com/bulk/v1/batch/1124.json", false

xmlHTTP.setRequestHeader "content-type", "application/json"

xmlHTTP.setRequestHeader "Authorization", "bearer " & access_token

xmlHTTP.Send

I don't get any results back.  Anyone know what the problem could be?  I would expect to see a status of Queued, Importing, Complete, Failed but I get no response whatsoever.

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Unable to retrieve Status after REST Bulk Leads Insert

The redacted portion is your Munchkin ID, which is already public.

Your URL appears to be missing the path segment /leads/ - /bulk/v1/leads/batch/1124.json

Also, a GET doesn't need a Content-Type.

View solution in original post

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Unable to retrieve Status after REST Bulk Leads Insert

The redacted portion is your Munchkin ID, which is already public.

Your URL appears to be missing the path segment /leads/ - /bulk/v1/leads/batch/1124.json

Also, a GET doesn't need a Content-Type.

Anonymous
Not applicable

Re: Unable to retrieve Status after REST Bulk Leads Insert

Sanford.  Thanks for catching that.  It resolved my issue!