PATCH /facets/update/:id

PATCH /facets/update/{id}

Update facet

Path parameters

  • id integer(int64) Required

    ID of the resource to fetch

Body Required

  • menuindex integer Required

Responses

  • 400

    Bad Request

  • 201

    successful operation

    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
      • id integer
      • facet_type string
      • facet_value string
      • menuindex integer
      • created_at string(DateTime)
      • updated_at string(DateTime)
  • 401

    Authorization information is missing or invalid.

  • 404

    Facet Not Found

  • 422

    Unprocessable Entity

  • 500

    Server Error

PATCH /facets/update/{id}
curl \
 -X PATCH https://api.cosmily.com/api/v1/facets/update/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"menuindex":42}'
Request example
{
  "menuindex": 42
}
Request examples
{
  "menuindex": 42
}
Response examples (201)
{
  "data": {
    "id": 1,
    "facet_type": "skin_types",
    "facet_value": "dry skin",
    "menuindex": 0,
    "created_at": "2021-10-04T13:24:22.000Z",
    "updated_at": "2021-11-13T20:23:18.000Z"
  }
}
Response examples (201)
{
  "data": {
    "id": 42,
    "facet_type": "string",
    "facet_value": "string",
    "menuindex": 42,
    "created_at": "string",
    "updated_at": "string"
  }
}