GET /api/v4/colors
List of users colors

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

[
  {
    "id": 1,
    "color": "#ffffff"
  },
  ...
]

POST /api/v4/colors
Create user color

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  "color": {
    "color": "#ffffff"
  }
}

Success response body

{
  "id": 1,
  "color": "#ffffff"
}

Params

Param name Description
color
required

Validations:

  • Must be a Hash

color[color]
required

Hex code of color

Validations:

  • Must be a String


PUT /api/v4/colors/:id
Update user color

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  "color": {
    "color": "#fffffa"
  }
}

Success response body

{
  "id": 1,
  "color": "#fffffa"
}

Params

Param name Description
id
required

ID of color

Validations:

  • Must be a Integer

color
required

Validations:

  • Must be a Hash

color[color]
required

Hex code of color

Validations:

  • Must be a String


DELETE /api/v4/colors/:id
Delete user color

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Success response body

{
  success: true
}

Params

Param name Description
id
required

ID of color

Validations:

  • Must be a Integer


POST /api/v4/colors/bulk_create
Create multiple colors. Last updates: 11/08/23

Request headers

Only registered user can perform this action
  Authentication - string - required
    Example of Authentication header : "Bearer TOKEN_FETCHED_FROM_SERVER_DURING_REGISTRATION"

Request body example

{
  "colors": [
    "#ffffff",
    ...
  ]
}

Success response body

{
  success: true
}

Params

Param name Description
colors
required

Validations:

  • Must be an array of String