PATCH /product_pitches/:id/assign_affiliate

PATCH /product_pitches/{id}/assign_affiliate

Assign affiliate to product pitch

Path parameters

  • id integer(int64) Required

    ID of the resource to fetch

application/json

Body Required

Responses

PATCH /product_pitches/{id}/assign_affiliate
curl \
 -X PATCH https://api.cosmily.com/api/v1/product_pitches/{id}/assign_affiliate \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"affiliate_url":"string","coupon_code":"string"}'
Request example
{
  "affiliate_url": "string",
  "coupon_code": "string"
}
Response examples (201)
{
  "data": [
    {
      "id": 1,
      "product_id": 1,
      "user_id": 1,
      "effects": [
        {
          "effect": "effect",
          "ingredient_ids": "[1,2]"
        }
      ],
      "affiliate_url": "http://some.url.com",
      "coupon_code": "new_coupon_code",
      "created_at": "2021-10-04T13:24:22.000Z",
      "updated_at": "2021-11-13T20:23:18.000Z"
    }
  ]
}