POST /products/create

POST /products/create

Returns created product

Body Required

  • category_id integer Required
  • title string Required
  • analyze_ingredient_list_log_uuid string

    analyze_ingredient_list_log_uuid or label_text must be entered but not both.

  • label_text string

    comma separated ingredient list. analyze_ingredient_list_log_uuid or label_text must be entered but not both.

Responses

  • 201

    successful operation

    Hide response attributes Show response attributes object
    • data object
      Hide data attributes Show data attributes object
      • id integer(int32)
      • title string
      • full_title string
      • alias string
      • raw_label string
      • image string(nullable)
      • asin string
      • published boolean
      • created_at string(DateTime)
      • updated_at string(DateTime)
      • deprecated_at string(nullable)
      • deprecated_reason string(nullable)
      • ingredient_count integer(int32)
      • brand_id integer(int32)
      • category_id integer(int32)
      • owner_user_id integer(int32)
      • ft_bool_non_comedogenic boolean
      • ft_bool_allergen_free boolean
      • ft_bool_alcohol_free boolean
      • ft_bool_gluten_free boolean
      • ft_bool_silicone_free boolean
      • ft_bool_sulfate_free boolean
      • ft_bool_paraben_free boolean
      • ft_bool_peg_free boolean
      • ft_bool_fungal_acne_feeding_free boolean
      • ft_bool_fragrance_free boolean
      • ft_bool_moisturising boolean
      • ft_bool_softening boolean
      • ft_bool_soothing boolean
      • ft_bool_acne_fighting boolean
      • ft_bool_anti_aging boolean
      • ft_bool_healing boolean
      • ft_bool_antiseptic boolean
      • ft_bool_whitening boolean
      • ft_bool_uv_protecting boolean
      • ft_bool_antioxidant boolean
      • ft_bool_ceramide boolean
      • ft_bool_vitamin boolean
      • ft_bool_pha boolean
      • ft_bool_bha boolean
      • ft_bool_aha boolean
      • ft_bool_hyaluronic_acid boolean
      • ft_bool_retinoid boolean
      • ft_bool_niacinamide boolean
      • brand object
        Hide brand attributes Show brand attributes object
        • id integer
        • alias string
        • title string
        • created_at string(DateTime)
        • updated_at string(DateTime)
        • owner_user_id integer
      • category object
        Hide category attributes Show category attributes object
        • id integer(int32)
        • title string
        • alias string
        • menuindex integer(int32)
        • created_at string(DateTime)
        • updated_at string(DateTime)
        • parent_id integer(int32)
      • product_image object
        Hide product_image attributes Show product_image attributes object
        • id integer
        • product_id integer
        • product_draft_id integer
        • image string
        • url string
      • owner_user object
        Hide owner_user attributes Show owner_user attributes object
        • id integer
        • username string
        • user_type string
        • last_active string
  • 400

    Bad Request

  • 401

    Authorization information is missing or invalid.

  • 403

    Authorization forbidden

  • 422

    Unprocessable Entity

  • 500

    Server Error

POST /products/create
curl \
 -X POST https://api.cosmily.com/api/v1/products/create \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"category_id":42,"title":"string","analyze_ingredient_list_log_uuid":"string","label_text":"string"}'
Request example
{
  "category_id": 42,
  "title": "string",
  "analyze_ingredient_list_log_uuid": "string",
  "label_text": "string"
}
Request examples
{
  "category_id": 42,
  "title": "string",
  "analyze_ingredient_list_log_uuid": "string",
  "label_text": "string"
}
Response examples (201)
{
  "data": {
    "id": 42,
    "title": "string",
    "full_title": "string",
    "alias": "string",
    "raw_label": "string",
    "image": "string",
    "asin": "string",
    "published": true,
    "created_at": "string",
    "updated_at": "string",
    "deprecated_at": "string",
    "deprecated_reason": "string",
    "ingredient_count": 42,
    "brand_id": 42,
    "category_id": 42,
    "owner_user_id": 42,
    "ft_bool_non_comedogenic": true,
    "ft_bool_allergen_free": true,
    "ft_bool_alcohol_free": true,
    "ft_bool_gluten_free": true,
    "ft_bool_silicone_free": true,
    "ft_bool_sulfate_free": true,
    "ft_bool_paraben_free": true,
    "ft_bool_peg_free": true,
    "ft_bool_fungal_acne_feeding_free": true,
    "ft_bool_fragrance_free": true,
    "ft_bool_moisturising": true,
    "ft_bool_softening": true,
    "ft_bool_soothing": true,
    "ft_bool_acne_fighting": true,
    "ft_bool_anti_aging": true,
    "ft_bool_healing": true,
    "ft_bool_antiseptic": true,
    "ft_bool_whitening": true,
    "ft_bool_uv_protecting": true,
    "ft_bool_antioxidant": true,
    "ft_bool_ceramide": true,
    "ft_bool_vitamin": true,
    "ft_bool_pha": true,
    "ft_bool_bha": true,
    "ft_bool_aha": true,
    "ft_bool_hyaluronic_acid": true,
    "ft_bool_retinoid": true,
    "ft_bool_niacinamide": true,
    "brand": {
      "id": 42,
      "alias": "string",
      "title": "string",
      "created_at": "string",
      "updated_at": "string",
      "owner_user_id": 42
    },
    "category": {
      "id": 42,
      "title": "string",
      "alias": "string",
      "menuindex": 42,
      "created_at": "string",
      "updated_at": "string",
      "parent_id": 42
    },
    "product_image": {
      "id": 42,
      "product_id": 42,
      "product_draft_id": 42,
      "image": "string",
      "url": "string"
    },
    "owner_user": {
      "id": 42,
      "username": "string",
      "user_type": "string",
      "last_active": "string"
    }
  },
  "links": {
    "first": "string",
    "last": "string",
    "prev": "string",
    "next": "string"
  }
}
Response examples (201)
{
  "data": {
    "id": 42,
    "title": "string",
    "full_title": "string",
    "alias": "string",
    "raw_label": "string",
    "image": "string",
    "asin": "string",
    "published": true,
    "created_at": "string",
    "updated_at": "string",
    "deprecated_at": "string",
    "deprecated_reason": "string",
    "ingredient_count": 42,
    "brand_id": 42,
    "category_id": 42,
    "owner_user_id": 42,
    "ft_bool_non_comedogenic": true,
    "ft_bool_allergen_free": true,
    "ft_bool_alcohol_free": true,
    "ft_bool_gluten_free": true,
    "ft_bool_silicone_free": true,
    "ft_bool_sulfate_free": true,
    "ft_bool_paraben_free": true,
    "ft_bool_peg_free": true,
    "ft_bool_fungal_acne_feeding_free": true,
    "ft_bool_fragrance_free": true,
    "ft_bool_moisturising": true,
    "ft_bool_softening": true,
    "ft_bool_soothing": true,
    "ft_bool_acne_fighting": true,
    "ft_bool_anti_aging": true,
    "ft_bool_healing": true,
    "ft_bool_antiseptic": true,
    "ft_bool_whitening": true,
    "ft_bool_uv_protecting": true,
    "ft_bool_antioxidant": true,
    "ft_bool_ceramide": true,
    "ft_bool_vitamin": true,
    "ft_bool_pha": true,
    "ft_bool_bha": true,
    "ft_bool_aha": true,
    "ft_bool_hyaluronic_acid": true,
    "ft_bool_retinoid": true,
    "ft_bool_niacinamide": true,
    "brand": {
      "id": 42,
      "alias": "string",
      "title": "string",
      "created_at": "string",
      "updated_at": "string",
      "owner_user_id": 42
    },
    "category": {
      "id": 42,
      "title": "string",
      "alias": "string",
      "menuindex": 42,
      "created_at": "string",
      "updated_at": "string",
      "parent_id": 42
    },
    "product_image": {
      "id": 42,
      "product_id": 42,
      "product_draft_id": 42,
      "image": "string",
      "url": "string"
    },
    "owner_user": {
      "id": 42,
      "username": "string",
      "user_type": "string",
      "last_active": "string"
    }
  },
  "links": {
    "first": "string",
    "last": "string",
    "prev": "string",
    "next": "string"
  }
}