POST /ingredient_opinions/create

POST /ingredient_opinions/create

Create an ingredient opinion

Body Required

Responses

POST /ingredient_opinions/create
curl \
 -X POST https://api.cosmily.com/api/v1/ingredient_opinions/create \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"ingredient_id":42,"feeling_type":"positive","opinion_text":"string","publish":true}'
Request example
{
  "ingredient_id": 42,
  "feeling_type": "positive",
  "opinion_text": "string",
  "publish": true
}
Request examples
{
  "ingredient_id": 42,
  "feeling_type": "positive",
  "opinion_text": "string",
  "publish": true
}
Response examples (201)
{
  "data": {
    "entry_uuid": "string",
    "opinion_uuid": "string",
    "revision": 42,
    "publication": "published",
    "created_at": "string",
    "feeling_type": "positive",
    "ingredient_id": 42,
    "author_user_id": 42,
    "active": true,
    "content": {
      "text": "working towards #sustainability with @alex",
      "entities": {
        "hashtags": [
          {
            "text": "sustainability",
            "indices": [
              16,
              31
            ]
          }
        ],
        "user_mentions": [
          {
            "username": "alex",
            "indices": [
              37,
              42
            ],
            "id": 42,
            "name": "string"
          }
        ]
      }
    }
  }
}
Response examples (201)
{
  "data": {
    "entry_uuid": "string",
    "opinion_uuid": "string",
    "revision": 42,
    "publication": "published",
    "created_at": "string",
    "feeling_type": "positive",
    "ingredient_id": 42,
    "author_user_id": 42,
    "active": true,
    "content": {
      "text": "working towards #sustainability with @alex",
      "entities": {
        "hashtags": [
          {
            "text": "sustainability",
            "indices": [
              16,
              31
            ]
          }
        ],
        "user_mentions": [
          {
            "username": "alex",
            "indices": [
              37,
              42
            ],
            "id": 42,
            "name": "string"
          }
        ]
      }
    }
  }
}