Options

Options Documentation

Option [LIST]

Option [LIST]

Request

Endpoint

GET /api/v2/user/options
Content-Type: application/vnd.api+json

Body

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": [
    {
      "id": "e6a78d63-9ec0-4cd5-a880-639106506e98",
      "type": "user_options",
      "attributes": {
        "created_at": "2022-01-12T17:18:40Z",
        "key": "key_3",
        "updated_at": "2022-01-12T17:18:40Z",
        "updated_in_db_at": "2022-01-12T17:18:40Z",
        "value": "goth"
      }
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "per_page": 25,
      "total_count": 1,
      "total_pages": 1
    },
    "sort": null,
    "filter": {
    }
  }
}

Fields

data

Type [Option]

Description An array of Options

Option [POST]

Option [POST]

Request

Endpoint

POST /api/v2/user/options
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "user_options",
    "attributes": {
      "key": "key_8",
      "updated_in_db_at": "2022-01-12 17:18:41 UTC",
      "value": "keffiyeh"
    }
  }
}

Parameters

Attributes

created_at

Type date

Description The timestamp of when this resource was created

Required No

key

Type string

Description Key to reference option (only contain alphanumeric and underscore chars)

Required No

updated_at

Type date

Description The timestamp of when this resource was last updated

Required No

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Required No

value

Type string

Description Value of option

Required No

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
201 Created

Body

{
  "data": {
    "id": "9b934a5a-46b4-4bd4-b7c4-704c26f90140",
    "type": "user_options",
    "attributes": {
      "created_at": "2022-01-12T17:18:41Z",
      "key": "key_8",
      "updated_at": "2022-01-12T17:18:41Z",
      "updated_in_db_at": "2022-01-12T17:18:41Z",
      "value": "keffiyeh"
    }
  }
}

Fields

Attributes

created_at

Type date

Description The timestamp of when this resource was created

key

Type string

Description Key to reference option (only contain alphanumeric and underscore chars)

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

value

Type string

Description Value of option

Option [GET]

Option [GET]

Request

Endpoint

GET /api/v2/user/options/key_4
Content-Type: application/vnd.api+json

Body

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": {
    "id": "6f016686-1093-4a1b-8bcb-3ef9ddbc393f",
    "type": "user_options",
    "attributes": {
      "created_at": "2022-01-12T17:18:40Z",
      "key": "key_4",
      "updated_at": "2022-01-12T17:18:40Z",
      "updated_in_db_at": "2022-01-12T17:18:40Z",
      "value": "poutine"
    }
  }
}

Fields

Attributes

created_at

Type date

Description The timestamp of when this resource was created

key

Type string

Description Key to reference option (only contain alphanumeric and underscore chars)

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

value

Type string

Description Value of option

Option [PUT]

Option [PUT]

Request

Endpoint

PUT /api/v2/user/options/key_1
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "user_options",
    "attributes": {
      "key": "key_2",
      "updated_in_db_at": "2022-01-12 17:18:40 UTC",
      "value": "knausgaard"
    }
  }
}

Parameters

Attributes

created_at

Type date

Description The timestamp of when this resource was created

Required No

key

Type string

Description Key to reference option (only contain alphanumeric and underscore chars)

Required No

overwrite

Type boolean

Description Only used for updating a record where you want to ignore the server's ' 'updated_in_db_at value and force overwrite the values for the record. ' 'Must be true to work.

Required No

updated_at

Type date

Description The timestamp of when this resource was last updated

Required No

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Required No

value

Type string

Description Value of option

Required No

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": {
    "id": "3979a99d-1a35-459d-9dcc-331e2094fa84",
    "type": "user_options",
    "attributes": {
      "created_at": "2022-01-12T17:18:40Z",
      "key": "key_2",
      "updated_at": "2022-01-12T17:18:40Z",
      "updated_in_db_at": "2022-01-12T17:18:40Z",
      "value": "knausgaard"
    }
  }
}

Fields

Attributes

created_at

Type date

Description The timestamp of when this resource was created

key

Type string

Description Key to reference option (only contain alphanumeric and underscore chars)

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

value

Type string

Description Value of option

Option [DELETE]

Option [DELETE]

Request

Endpoint

DELETE /api/v2/user/options/key_6
Content-Type: application/vnd.api+json

Body

Response

Headers

204 No Content

Body

Last updated