PATCH /product_pitches/:id/add_ingredient_opinion

PATCH /product_pitches/{id}/add_ingredient_opinion

Add ingredient opinion to product pitch

Path parameters

  • id integer(int64) Required

    ID of the resource to fetch

Body Required

Responses

PATCH /product_pitches/{id}/add_ingredient_opinion
curl \
 -X PATCH https://api.cosmily.com/api/v1/product_pitches/{id}/add_ingredient_opinion \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"ingredient_opinion_uuid":"string"}'
Request example
{
  "ingredient_opinion_uuid": "string"
}
Request examples
{
  "ingredient_opinion_uuid": "string"
}
Response examples (201)
{
  "data": {
    "id": 42,
    "product_id": 42,
    "user_id": 42,
    "effects": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ],
    "preferred_ingredients": [
      {
        "effects": [
          "string"
        ],
        "ingredient_id": 42
      }
    ],
    "affiliate_url": "string",
    "coupon_code": "string",
    "created_at": "string",
    "updated_at": "string",
    "ingredient_opinions": [
      {
        "uuid": "string",
        "feeling_id": 42,
        "created_at": "string",
        "current_entry": {
          "uuid": "string",
          "opinion_uuid": "string",
          "revision": 42,
          "publication": "published",
          "created_at": "string",
          "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": {
    "id": 42,
    "product_id": 42,
    "user_id": 42,
    "effects": [
      {
        "effect": "string",
        "ingredient_ids": [
          42
        ]
      }
    ],
    "preferred_ingredients": [
      {
        "effects": [
          "string"
        ],
        "ingredient_id": 42
      }
    ],
    "affiliate_url": "string",
    "coupon_code": "string",
    "created_at": "string",
    "updated_at": "string",
    "ingredient_opinions": [
      {
        "uuid": "string",
        "feeling_id": 42,
        "created_at": "string",
        "current_entry": {
          "uuid": "string",
          "opinion_uuid": "string",
          "revision": 42,
          "publication": "published",
          "created_at": "string",
          "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"
                }
              ]
            }
          }
        }
      }
    ]
  }
}