WCO: Empty Arrays in API Responses

Our dev team have found empty arrays presented in API Responses and have asked if this is the default behaviour where no data is present.

Example: Profile retrieval resulted in an empty 'actions' array - ("actions": [ ],)

Is each field array subject to the same behaviour across the WCO API call responses?

(i.e. presented as an empty array where no underlying data is present).

Best Answer

  • @james.russell

    Hi,

    Yes, When you look for a profile which doesn't exist or it is unavailable in the WC1 database you will see a 404 Not found and empty response!

    Another example would be the synchronous screening request, is there are no matches to the entity being screened you will get an empty result array along with the case Id as the response.

    Same holds good when you're checking for the case ID availability if you see a 404 Not found and empty response it means that the case Id doesn't exist and is available to use.\

    To sum it up, you will see this behaviour if there is no underlying data present.

    Let us know if you need further information!

    Regards,

    Mehran Khan