1

When I try to use Put or Patch for a contact object, the comment and title field always remain 'null'.

For instance, this is the json I use to perform a PUT:

{ "IpId" : "tapkey", "Identifier" : "emailaddress here", "Title" : "Test title", "Comment" : "Test comment" }

This executes with 200 OK. The contact that I immediately get return has the comment and title field set to 'null'. The contact is successfully created though.

For a PATCH the same thing happens.

Regards,

Stan

stan0611
  • 53
  • 2

2 Answers2

0

Field's names must start with lowercase letter.

For PUT request it actually works both ways. You can define it with e.g. Title or title and it will be accepted.

For PATCH request you are completely right, this only accepts lowercase letters. After changing this, it works as expected.

{
  "title": "my title",
  "comment": "my comment"
}

We will update our documentation to reflect this on PUT endpoint.

eduard
  • 408
  • 3
  • 13
  • For me it still does not work. This is what I send { "ipId": "tapkey", "identifier": "email", "title": "test title", "comment": "test comment" } This is what I get returned: [{ "id": "newcontactid", "clientRef": null, "ownerId": "ownerid", "comment": null, "ipId": "tapkey", "ipUserId": null, "identifier": "email", "email": "email", "ipUserName": "email", "isActive": true, "title": null }] – stan0611 Dec 14 '22 at 22:09
  • Can you provide some more details on which endpoint and request method are you using? It is unexpected that you get a list of contacts as a result. – eduard Dec 22 '22 at 15:22
0

Never mind. I used a POST method to execute the PUT. Because the contact was created and a HTTP 200 was returned, I never saw this error.

So the behavior for sending a PUT body to the contacts URL using the POST method will result in:

  • HTTP 200
  • Creation of the contact, but without title and comment
  • Result is an array with 1 contact, the new one

Using the PUT method of course solved all my problems

Thanks anyway

Stan

stan0611
  • 53
  • 2