Auths not being created with dates


I’ve recently tried creating/updating authorizations with start and end dates, but it seems the Web API just completely ignores those fields… I’ve sent a request with the following body:

name: 'TESTE',
  type: 13,
  code: 234567,
  allowedFromDate: '20201-01-08T00:00:00.000Z',
  allowedUntilDate: '2021-01-09T00:00:00.000Z' 

and when I use Nuki Web, or make a request to list my authorizations, the authorization is indeed created correctly, except it’s missing the allowedFromDate and allowedUntilDate fields.
I’ve tried waiting a bit as it could’ve been a matter of the server taking a bit longer to deal with it, but it seems that’s not the case.

Thank you


sorry to reply to this again, but I’ve done further testing on this issue, and I have still not found a cause to this. I cannot test a rather important part of my integration while this issue is present.

Thank you

@dmsapereira Sorry for the late reply, I seem to have missed your topic initially.

Do you already have tried to send the complete set of variables?

In your case the issue seems to be the misssing allowedWeekDays (default it to 0 for all days allowed)

so for your example

        "name": "TESTE",
        "type": 13,
        "allowedFromDate": "2021-01-08T00:00:00.000Z",
        "allowedUntilDate": "2021-01-09T00:00:00.000Z",
        "allowedWeekDays": 0,
        "code": 234567

Thank you, it works now!

Again, I think the documentation could be more explicit in this regard.
I tried updating only other fields to check if it was a problem with the update itself, but it never crossed my mind that the allowedWeekDays field would be necesssary…
The allowedFromDate and allowedUntilDate fields could have that information in their description to make it more explicit.
Regardless, it works now, so thank you!

1 Like