¿Cómo usar la actualización de routes múltiples con la API REST en Firebase? Error 400

Me gustaría actualizar varios nodos en una sola operación utilizando la API REST de firebase y el marco de Vapor. Cuando hago la petición .patch a Firebase, recibo un error del cliente de Vapor:

La operación no se pudo completar. Error 400 Solicitud errónea

¿Alguien podría decirme si finalDictionary se inicializa correctamente antes de convertirse en JSON?

Salida deseada para el nodo Usuarios:

  brv-61e24 Users usersUID customer bookingNumber timeStampBookingCancelled CleanersUID:"cleanersUID" TimeStampBookingClaimed: "TimeStampBookingClaimed" TimeStampBookingCancelledByCleaner: "TimeStampBookingCancelledByCleaner" Cleaners cleanersUID bookingNumber timeStampBookingCancelled TimeStampBookingClaimed:"TimeStampBookingClaimed" TimeStampBookingCancelledByCleaner: "TimeStampBookingCancelledByCleaner" Cleaners cleanersUID bookingNumber Claimed: "ClaimedValue" var finalJSON:JSON? func makeFinalDictionary() throws -> JSON? { let customer = userStripeIdCustomer var finalDictionary = Node([:]) //create base paths let path0 = "Users/\(usersUID!)/\(customer!)/\(bookingNumber!)/timeStampBookingCancelled" let path1 = "Cleaners/\(cleanersUID!)/\(bookingNumber!)/timeStampBookingCancelled" let path2 = "Cleaners/\(cleanersUID!)/\(bookingNumber!)" //create final paths and assign values to keys finalDictionary[path0] = try Node(node: ["CleanersUID": cleanersUID]) finalDictionary[path0] = try Node(node:["TimeStampBookingClaimed":timeStampBookingClaimed]) finalDictionary[path0] = try Node(node:["TimeStampBookingCancelledByCleaner":timeStampBookingCancelledByCleaner]) finalDictionary[path1] = try Node(node:["TimeStampBookingClaimed":timeStampBookingClaimed]) finalDictionary[path1] = try Node(node:["TimeStampBookingCancelledByCleaner":timeStampBookingCancelledByCleaner]) finalDictionary[path2] = try Node(node:["Claimed":claimedValue]) do { finalJSON = try JSON(Node(node:finalDictionary)) } catch let error as NSError { let message = error.localizedDescription drop.log.error(message) throw NSError(domain: "errorFirebase", code: error.code, userInfo: ["error" : message]) } return finalJSON } func writeAsMultiPath(tokenReceived:String!, jsonObject:JSON?) throws -> Void { let responseFirebase:Response? do{ let token = tokenReceived ?? "defaultValue" let response = try drop.client.patch( "https://brv-61e24.firebaseio.com.json/", headers: ["Authorization":"Bearer \(tokenReceived)"], query: [:], body: jsonObject!) responseFirebase = response }catch let error as NSError { guard let phrase = error.userInfo["error"] as? String else { throw NSError(domain: "errorFirebase", code: error.code, userInfo: ["error" : error.localizedDescription]) } throw NSError(domain: "errorFirebase", code: error.code, userInfo: ["error" : phrase]) } let body = responseFirebase?.body.bytes do { jsonFromWritingUsers = try JSON(bytes:body!) } catch let error as NSError{ let message = "jsonFromWritingUsers cannot be converted in JSON line 408 in\(fileName)" drop.log.error(message) throw NSError(domain: "errorFirebase", code: error.code, userInfo: ["error" : message]) } guard responseFirebase?.status.statusCode == 200 else{ let message1 = "write as multi-path failed line 410 in\(fileName)" drop.log.error(message1) let message = "fail" throw NSError(domain: "errorFirebase", code: 400, userInfo: ["error" : message]) } }