POST /routines/request

POST /routines/request

Request the manual creation of a routine from offsite products

Body Required

Responses

POST /routines/request
curl \
 -X POST https://api.cosmily.com/api/v1/routines/request \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"routine_title":"The Daily Grind","routine_type":"AM","products":["https://www.amazon.com/CeraVe-Hydrating-Facial-Cleanser-Fragrance/dp/B01MSSDEPK","https://www.sephora.com/product/supergoop-unseen-sunscreen-spf-40-P454380"]}'
Request example
{
  "routine_title": "The Daily Grind",
  "routine_type": "AM",
  "products": [
    "https://www.amazon.com/CeraVe-Hydrating-Facial-Cleanser-Fragrance/dp/B01MSSDEPK",
    "https://www.sephora.com/product/supergoop-unseen-sunscreen-spf-40-P454380"
  ]
}
Request examples
{
  "routine_title": "The Daily Grind",
  "routine_type": "AM",
  "products": [
    "https://www.amazon.com/CeraVe-Hydrating-Facial-Cleanser-Fragrance/dp/B01MSSDEPK",
    "https://www.sephora.com/product/supergoop-unseen-sunscreen-spf-40-P454380"
  ]
}
Response examples (201)
{
  "data": {
    "id": 123,
    "user_id": 55,
    "routine_id": null,
    "status": "pending",
    "routine_title": "The Daily Grind",
    "routine_type": "AM",
    "request": {
      "products": [
        "https://www.amazon.com/CeraVe-Hydrating-Facial-Cleanser-Fragrance/dp/B01MSSDEPK",
        "https://www.sephora.com/product/supergoop-unseen-sunscreen-spf-40-P454380"
      ]
    },
    "created_at": "2022-08-01T19:58:57.073Z",
    "updated_at": "2022-08-01T19:58:57.073Z"
  }
}
Response examples (201)
{
  "data": {
    "id": 42,
    "user_id": 42,
    "routine_id": 42,
    "status": "string",
    "routine_title": "string",
    "routine_type": "string",
    "request": {
      "products": [
        "string"
      ]
    },
    "created_at": "string",
    "updated_at": "string"
  }
}