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

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
3 0 1 3

Problems adding date of birth secondary field with Java API

I'm generated Swagger generated Java code using the World Check One YAML API and the code is generated such that the dateTimeValue for Field is an org.joda.time.DateTime class. This causes any dates set using the API to be sent as a date time value. For example : "dateTimeValue: 1990-12-20T00:00:00.000-05:00". That fails when setting the DATE_OF_BIRTH secondary field because World Check One only wants the date portion: ie. "1990-12-20". The actual error returned is "Date of birth secondary field values must be a valid date not containing any time fields"

The YAML file defines the dateTimeValue property as a string of format "date-time". That's the same format used for all other date/time fields.

As far as I can tell, there is no way to specify a DateTime value without the time part using the API. If the field should only contain the date, then the "date" format should be used. See https://swagger.io/docs/specification/data-models/data-types/

The only way around this, I've found is to modify the YAML file to change the format type from "date-time" to "date".

Is there some other way to fix this, other than to modify the YAML file myself?

world-checkworld-check-one
icon clock
10 |1500

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

Upvotes
Accepted
456 2 2 2

Hi @Michael.Kraft,

At this moment API supports only date values not time.There is no other way fix this other than to modify the YAML file.But I will check again our product team if is there any alternative way to resolve this issue.

Thanks,

Shilpi

icon clock
10 |1500

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

Upvotes
1 0 0 1

Hi,

Any plan to update the spec at your end?

icon clock
10 |1500

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

Click below to post an Idea Post Idea