GET /product_drafts/:id

GET /product_drafts/{id}

Returns a single product draft

Path parameters

  • id integer(int64) Required

    ID of the resource to fetch

Responses

GET /product_drafts/{id}
curl \
 -X GET https://api.cosmily.com/api/v1/product_drafts/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "id": 42,
    "author_user_id": 42,
    "reviewer_user_id": 42,
    "product_attributes": {
      "image": "string",
      "title": "string",
      "brand_id": 42,
      "raw_label": "string",
      "category_id": 42
    },
    "ingredient_classifications": [
      {
        "label_text": "string",
        "label_order": 42,
        "normalized_label": "string",
        "recognized_ingredients": [
          {
            "id": 42,
            "title": "string"
          }
        ],
        "classified_ingredient_id": 42
      }
    ],
    "draft_version": 42,
    "created_at": "string",
    "updated_at": "string",
    "approved_at": "string",
    "approved_product_id": 42,
    "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,
      "parent_id": 42
    },
    "approved_product": {
      "id": 42,
      "full_title": "string",
      "alias": "string",
      "image": "string"
    },
    "product_image": {
      "id": 42,
      "product_id": 42,
      "product_draft_id": 42,
      "image": "string",
      "url": "string"
    }
  }
}
Response examples (200)
{
  "data": {
    "id": 42,
    "author_user_id": 42,
    "reviewer_user_id": 42,
    "product_attributes": {
      "image": "string",
      "title": "string",
      "brand_id": 42,
      "raw_label": "string",
      "category_id": 42
    },
    "ingredient_classifications": [
      {
        "label_text": "string",
        "label_order": 42,
        "normalized_label": "string",
        "recognized_ingredients": [
          {
            "id": 42,
            "title": "string"
          }
        ],
        "classified_ingredient_id": 42
      }
    ],
    "draft_version": 42,
    "created_at": "string",
    "updated_at": "string",
    "approved_at": "string",
    "approved_product_id": 42,
    "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,
      "parent_id": 42
    },
    "approved_product": {
      "id": 42,
      "full_title": "string",
      "alias": "string",
      "image": "string"
    },
    "product_image": {
      "id": 42,
      "product_id": 42,
      "product_draft_id": 42,
      "image": "string",
      "url": "string"
    }
  }
}