Empty API response

deals

#1

I’m trying to create tasks and deals via the API, and get an empty response back for both of the POST-requests.

For the Deal, I’m requesting

{
  "associations":{
    "associatedCompanyIds":[*],
    "associatedVids":[*]
  },
  "properties":[
    {"value":"New Deal Ipsum","name":"dealname"},
    {"value":"appointmentscheduled","name":"dealstage"},
    {"value":"default","name":"pipeline"},
    {"value":*,"name":"hubspot_owner_id"},
    {"value":1496102400,"name":"closedate"},
    {"value":100,"name":"amount"},
    {"value":"newbusiness","name":"dealtype"}
  ]
}

Authing through header: Authorization: Bearer %s
and don’t get any response at all from Hubspot. Just empty.

The same thing happens when I try to create a task

{
  "description":"Creating a test task",
  "eventDate":1494934417,
  "ownerID":*,
  "name":"Test Task",
  "eventType":"PUBLISHING_TASK",
  "category":"CUSTOM",
  "state":"TODO",
  "campaignGuid":"",
  "contentGroupId":0,
  "topicIds":[]
}

No response here either.

A bit hard to debug when you simply get no response at all, what am I doing wrong?..


#2

@kalleericson are you setting the content-type: application/json header in your request?


#3

Silly mistake. Awful haha. Thank you!