Device status 'unknown' using mender API

I’m using Mender API to check through python if there’s a new update to install in But when I use these link “{device-id}/check-update”, I get “409 Client Error”. In mender API docs it says that it’s caused because the device it’s not connected. I checked the device status with the link “{device-id}” and I get “‘status’: ‘unknown’” in the response. In Mender API docs also include the link “{device-id}/connect” but I get 404 Error and I don’t be able to find the reason because I recreated the Mender API docs example, whit all the headers in the request. The device is a virtual machine menderized with debian, it works perfectly and I can install deployments through and manually using mender install, also in the mender page appears with connected status.