For a deeper look into our World Check One API, look into:

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
18 3 3 8

Update API Call Issue in WCO.

@Irfan.Khan
I would like to know know one more question regarding update request of WCO API.

previously i have observed that when i run postman application using put request with the individual/Organisation data, it would update the data what we sent irrespective of remaining fileds like secondary/custom (the data would remain as usual). but later on i came to notice that when I use the same PUT request i saw only the fields that were send was updated and remaining secondary/custom fields remains Null(empty). this was so surprising for me.kindly help me whether the API calls of WCO has been changed Recently?? so as to change the code accordingly.

world-checkworld-check-oneupdate-message
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
2.4k 6 5 5

@manjusha.batchu,

Hi,

Can you tell me exactly when is previously?

Also, to explain you the update case API -

Suppose below is your existing case details with secondary fields as shown-

Scenario 1:

Name: Donald Trump

secondaryFields[

{ "typeId": "SFCT_1", "value": "MALE", "dateTimeValue": null },

{ "typeId": "SFCT_2", "value": null, "dateTimeValue": "1961-12" },

{ "typeId": "SFCT_3", "value": "USA", "dateTimeValue": null },

{ "typeId": "SFCT_4", "value": "IND", "dateTimeValue": null },

{ "typeId": "SFCT_5", "value": "ABW", "dateTimeValue": null}

]

Scenario 2: Now If i want to update the case by only changing the name to Vladimir Putin and I don't pass the above secondary fields in the update case request payload, the secondary fields will be lost and will be updated to blank.

Name: Vladimir Putin

secondaryFields[]

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Basically, the update case updates the case with the data or fields that you're passing in the request if you wish to keep Secondary fields of a case as same and would want only certain data to be changed you must include the secondary fields/custom fields in your request payload and not pass it empty, if you pass it empty it will be overwritten to blank!

Hope this answers your query.

Feel free to reach out if you need further explanation on this!

Thanks,

Mehran Khan

API Technical Consultant

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
18 3 3 8

@Mehran.Ahmed Khan
The word previously terms 3-4 weeks ago.so if in this case, i need to pass the entire fields data even though i need to update a single name field. i think that would burdens the payload data and probably leads to poor performance.
the above mentioned Scenario 2 will misleads the case i think. since on update API calls we need to update the necessary fields and the remaining should be same. Hope you got my point.
thanks in advance.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
2.4k 6 5 5

@manjusha.batchu,

I totally understand your point, but when you pass secondary fields as empty while updating the desired fields, the API would think that you're updating the secondary fields to empty as well, and I don't believe it would cause any performance issue as our APIs are designed to handle payloads with/without secondary or custom fields in them.

Regards,

Mehran Khan

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
2.4k 6 5 5

@manjusha.batchu,

Just wanted to check with you if you have all the information you need or do you require a more detailed explanation on this topic?

Thanks,

Mehran Khan

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
18 3 3 8

@Mehran.Ahmed Khan

yeah. thanks for the info. i have modified the code accordingly.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.