APIs & Integrations

Yantes
Member

Trying to create a NOTE Engagement but it does not work

SOLVE

Hey I am trying to create a Note engagement but I keep getting

Service request failed '400 Bad Request' body: '{"status":"error","message":"Json node is missing child properties","correlationId":"ce979dc8-f665-4ea0-8959-ebc12403ace3","requestId":"c8ff0d70219bf7cb75a44bca01edeb77"}

this is the request I am trying to send to the engagements api, have even tried with portalId and metaData still same response. What am I doing wrong?

 

{
  "engagement" : {
    "id" : null,
    "portal-id" : 1234567,
    "active" : true,
    "type" : "NOTE"
  },
  "metadata" : {
    "body" : "http://localhost:8080/something/something?test=test1"
  }
}

I have even tried adding:

"associations" : {
    "contactIds" : [ 80000 ]
  }

to try to sent it to a specific contact but still does not work.

 

 

0 Upvotes
1 Accepted solution
Yantes
Solution
Member

Trying to create a NOTE Engagement but it does not work

SOLVE

Never mind just found the stupid mistake I had defined the urls statically like

 

private static final CREATE_CONTACT = "/contact/v1..."
private static final CREATE_ENGAGEMENT = "/engagements/v1..."

and just copy pasted the code from the create contacts methods and forgot to change the url to use, my stupid mistake, sorry for bordering. So I was calling the create contact endpoint with wrong data instead og calling the create engagements endpoint. Note to my self extra check when copy pasting that everything has been changed accordingly.

View solution in original post

0 Upvotes
2 Replies 2
Yantes
Solution
Member

Trying to create a NOTE Engagement but it does not work

SOLVE

Never mind just found the stupid mistake I had defined the urls statically like

 

private static final CREATE_CONTACT = "/contact/v1..."
private static final CREATE_ENGAGEMENT = "/engagements/v1..."

and just copy pasted the code from the create contacts methods and forgot to change the url to use, my stupid mistake, sorry for bordering. So I was calling the create contact endpoint with wrong data instead og calling the create engagements endpoint. Note to my self extra check when copy pasting that everything has been changed accordingly.

0 Upvotes
Yantes
Member

Trying to create a NOTE Engagement but it does not work

SOLVE

Okay so just tried sending it via Postman seems to work just fine, why it does not work sending it from our backend I have to figure out, just can't see doing anythign wrong in regards the setup since it is a lot like how we call the contacts api. Anyway will give a answer once I hopefully figure out what is going wrong.

0 Upvotes