title: Firestore REST API: Query parameters type of object
body: <p>I am looking for an advice regarding Google Firestore REST API </p>
  
  <p>I am trying to update the document but keep the data that are not updated
  (<a href="https://cloud.google.com/firestore/docs/reference/rest/v1beta1/projects.databases.documents/patch" rel="noreferrer">https://cloud.google.com/firestore/docs/reference/rest/v1beta1/projects.databases.documents/patch</a>)</p>
  
  <p>I have a document in "message" collection, the document contains following fields: "timestamp", "message" and "user".</p>
  
  <p>If I do the PATCH request to update the "message" field, then the "timestamp" and "user" fields are removed. </p>
  
  <p>There is "Query Parameter" "updateMask" to preven this. The parameter is type of object (DocumentMask). The DocumentMask object looks like this in documentation:</p>
  
  <pre><code>{
    "fieldPaths": [
      string
    ],
  }
  </code></pre>
  
  <p>There is no example how such a HTTP request should look like.</p>
  
  <p>If I build to request to look like this</p>
  
  <pre><code>PATCH https://firestore.googleapis.com/v1beta1/projects/{projectId}/databases/{databaseId}/documents/messages/someid?updateMask={"fieldPaths":["message"]}
  </code></pre>
  
  <p>The request body contains desired Document</p>
  
  <p>This request will fail on 400, that the parameter with name "updateMask" is unabled to bind...</p>
  
  <p>How can I create such a request with PHP (Guzzle HTTP client)?</p>