Closed AntonioSillero closed 7 years ago
Vale, me respondo yo, he visto que los obligatorios son: { "cif": "companycif", "email": "string@domain.local", "id": 10, "name": "string", "phones": [ "string" ], "postalCode": "PCcompany", "status": "ACTIVE", "web": "www.company.local" }
No obstante los datos no se consolidan en la base de datos.
El id no es obligatorio, y no debería enviarse. Se autogenera al guardar.
Al crear un vehiculo y al crear una empresa hay que proporcionar una cantidad considerable de datos es correcto? Por ejemplo, para crear una empresa: { "address": { "company": {}, "door": "string", "floor": "string", "id": 0, "number": "string", "postalCode": "string", "street": "string", "town": { "id": 0, "name": "string", "province": { "id": 0, "name": "string", "towns": [ {} ] } } }, "appUsers": [ { "company": {}, "email": "string", "firstSurname": "string", "id": 0, "name": "string", "password": "string", "phone": "string", "role": "USER", "secondSurname": "string", "status": "ACTIVE", "username": "string" } ], "cif": "string", "contact": { "company": {}, "email": "string", "firstSurname": "string", "id": 0, "name": "string", "phone": "string", "secondSurname": "string" }, "drivers": [ { "company": {}, "email": "string", "firstSurname": "string", "id": 0, "name": "string", "nif": "string", "phone": "string", "secondSurname": "string", "status": "ACTIVE" } ], "email": "string", "id": 0, "name": "string", "phones": [ "string" ], "postalCode": "string", "status": "ACTIVE", "vehicles": [ { "comments": "string", "company": {}, "driverAssignments": [ { "driver": { "company": {}, "email": "string", "firstSurname": "string", "id": 0, "name": "string", "nif": "string", "phone": "string", "secondSurname": "string", "status": "ACTIVE" }, "endTime": "2017-10-08T06:27:19.038Z", "id": 0, "startTime": "2017-10-08T06:27:19.038Z", "vehicle": {} } ], "gpsDevicesAssignments": [ { "endTime": "2017-10-08T06:27:19.039Z", "gpsDevice": { "id": 0, "imei": "string", "status": "ACTIVE" }, "id": 0, "startTime": "2017-10-08T06:27:19.039Z", "status": "ACTIVE", "vehicle": {} } ], "id": 0, "kmsLeftForRevision": 0, "lastRevisionDate": "2017-10-08", "model": { "id": 0, "make": { "id": 0, "models": [ {} ], "name": "string" }, "name": "string" }, "name": "string", "plate": "string", "status": "ACTIVE", "type": { "id": 0, "name": "string" } } ], "web": "string" }