POST /product_pitches/create

POST /product_pitches/create

Create new product pitch

Body Required

Responses

POST /product_pitches/create
curl \
 -X POST https://api.cosmily.com/api/v1/product_pitches/create \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"product_id":42,"effects":[{"effect":"string","ingredient_ids":[42]}]}'
Request example
{
  "product_id": 42,
  "effects": [
    {
      "effect": "string",
      "ingredient_ids": [
        42
      ]
    }
  ]
}
Request examples
{
  "product_id": 42,
  "effects": [
    {
      "effect": "string",
      "ingredient_ids": [
        42
      ]
    }
  ]
}
Response examples (200)
{
  "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"
  }
}
Response examples (200)
{
  "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"
  }
}