Skip to main content

Sync local mutations

An endpoint to sync local mutations to the server.

Query Parameters
    lastSyncedAt float required

    The timestamp of the last mutation that was applied on the server. The value needs to match the latest value from get mutations endpoint, otherwise, the request will be rejected.

Request Body
    mutations object[] required
  • Array [
  • type string required

    Possible values: [CREATE, UPDATE, DELETE]

    The type of the mutation

    resource string required

    Possible values: [BOOKMARK, COLLECTION, COLLECTION_BOOKMARK, READING_SESSION, PREFERENCE, NOTE]

    The resource the mutation has been applied to.

    resourceId string

    The server's id of the resource the mutation will be applied to. This will be required for some resources when updating/deleting and is used by the server to find the relevant resource.

    data object

    The data or the resource. The format of the data will depend on the resource type.

  • ]
Responses

Request has been handled successfully.


Schema
    success boolean
    data object

    Response schema for post mutations endpoint

    mutations object[] required

    Array of mutations that were successfully applied on the server

  • Array [
  • type string required

    Possible values: [CREATE, UPDATE, DELETE]

    The type of the mutation

    resource string required

    Possible values: [BOOKMARK, COLLECTION, COLLECTION_BOOKMARK, READING_SESSION, PREFERENCE, NOTE]

    The resource the mutation was applied to.

    resourceId string

    The id of the resource the mutation was applied to. Will not be present if the mutation was applied to certain resource without specific ID e.g. Preference.

    data object

    The latest version of the data of the resource that was mutated

    timestamp float required

    Unix timestamp when the latest mutation of the resource occurred

  • ]
  • newLastSyncedAt float required

    Timestamp of the latest mutation that was applied on the server. This should be used for subsequent sync requests.

Loading...