Kitchen Stories User Cookbooks API

The User Cookbooks API from Kitchen Stories — 5 operation(s) for user cookbooks.

OpenAPI Specification

kitchenstories-user-cookbooks-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: '3'
  title: Kitchen Stories Internal Articles Admin User Cookbooks API
  description: ''
  contact:
    email: hello@kitchenstories.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://api.kitchenstories.io/api
  description: LIVE Environment
- url: https://api.dev.kitchenstories.io/api
  description: Development Environment
- url: http://localhost:8000/api
  description: Local Environment
security:
- bearerAuth: []
- ApiKeyAuth: []
tags:
- name: User Cookbooks
paths:
  /users/me/cookbooks/:
    get:
      summary: Get all cookbooks for the currently authenticated user
      operationId: cookbook-list
      tags:
      - User Cookbooks
      parameters:
      - name: feed_item
        in: query
        description: A feed item (article or recipe) uuid. If passed, will only return cookbooks whose item is saved in
        required: false
        schema:
          type: string
          format: uuid
      - name: search
        in: query
        description: Search through cookbooks by title
        schema:
          type: string
      responses:
        '200':
          description: Get a paginated list of Cookbooks
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/cookbook_pagination'
        '403':
          description: User not authenticated
    post:
      summary: Create a cookbook for the currently authenticated user User
      description: Image is the image-uuid for cover-image
      operationId: cookbook-create
      tags:
      - User Cookbooks
      requestBody:
        description: Title is mandatory. `feed_items` is deprecated - use `feed_item_id` for internal feeditem or `external_url` for external recipe. user `feed_item_id` for existing external-recipe.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/cookbook_add_json'
      responses:
        '200':
          description: Operation successfull
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/cookbook'
        '403':
          description: Forbidden. When user is not logged in
  /users/me/cookbooks/{cookbook-uuid}/:
    get:
      summary: Get the given cookbook for the currently authenticated user
      operationId: cookbook-detail
      tags:
      - User Cookbooks
      parameters:
      - name: cookbook-uuid
        in: path
        description: Cookbook uuid
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Get this Cookbook details
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/cookbook'
        '404':
          description: Cookbook not found
    put:
      summary: Update a Cookbook for the currently authenticated User
      description: Image is the image-uuid for cover-image
      operationId: cookbook-update
      tags:
      - User Cookbooks
      parameters:
      - name: cookbook-uuid
        in: path
        description: Cookbook uuid
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: Updates the title for the cookbook
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/cookbook_change_title'
      responses:
        '200':
          description: Operation successfull
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/form_response'
        '403':
          description: Forbidden. When user is not logged in
    delete:
      summary: Delete a Cookbook for the currently authenticated User
      operationId: cookbook-delete
      tags:
      - User Cookbooks
      parameters:
      - name: cookbook-uuid
        in: path
        description: Cookbook uuid
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Operation successfull
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/form_response'
        '403':
          description: Forbidden. When user is not logged in
        '404':
          description: NotFound. When Cookbook does not exists
  /users/me/cookbooks/{cookbook-uuid}/items/:
    get:
      summary: List all items for the given cookbook
      operationId: cookbook-items-list
      tags:
      - User Cookbooks
      parameters:
      - name: cookbook-uuid
        in: path
        description: Cookbook uuid
        required: true
        schema:
          type: string
          format: uuid
      - name: search
        in: query
        description: Search through items of this cookbook by title
        schema:
          type: string
      responses:
        '200':
          description: Get all items (internal recipes, external recipes and articles) from the given cookbook
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/feeditem_pagination'
    post:
      summary: Add Internal Recipe, Article or saved-external-recipe to the given cookbook
      operationId: cookbook-item-create
      tags:
      - User Cookbooks
      parameters:
      - name: cookbook-uuid
        in: path
        description: Cookbook uuid
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: The Article, Internal Recipe or saved-external-recipe uuid - can not already have item with this id in cookbook
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/cookbook_recipes_add_json'
      responses:
        '200':
          description: Operation successfull
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/form_response'
        '403':
          description: Forbidden. When user is not logged in
        '404':
          description: NotFound. When Cookbook does not exist
  /users/me/cookbooks/{cookbook-uuid}/external-items/:
    post:
      summary: Add an external recipe to the given cookbook
      operationId: cookbook-external-recipes-create
      tags:
      - User Cookbooks
      parameters:
      - name: cookbook-uuid
        in: path
        description: Cookbook uuid
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: URL of the external recipe - can not already have recipe with this url in cookbook
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/cookbook_externalrecipes_add_json'
      responses:
        '200':
          description: Operation successful - recipe payload returned
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/recipe'
        '202':
          description: Operation successful - recipe is being fetched. Rerun the request to get the recipe.
        '403':
          description: Forbidden. When user is not logged in or does not have permission to run the operation (not premium)
        '404':
          description: NotFound. When Cookbook does not exists
  /users/me/cookbooks/{cookbook-uuid}/items/{item-uuid}/:
    put:
      summary: Move an item from the given cookbook to another
      operationId: cookbook-item-move
      tags:
      - User Cookbooks
      parameters:
      - name: cookbook-uuid
        in: path
        description: Origin Cookbook uuid
        required: true
        schema:
          type: string
          format: uuid
      - name: item-uuid
        in: path
        description: Item uuid (external recipe, internal recipe or article) - id can not already be in new cookbook
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        description: id should be the destination cookbook-uuid
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/cookbook_update_json'
      responses:
        '200':
          description: Operation successfull
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/form_response'
        '403':
          description: Forbidden. When user is not logged in
    delete:
      summary: Delete an item from the given cookbook
      operationId: cookbook-item-delete
      tags:
      - User Cookbooks
      parameters:
      - name: cookbook-uuid
        in: path
        description: Cookbook uuid
        required: true
        schema:
          type: string
          format: uuid
      - name: item-uuid
        in: path
        description: Item uuid (external recipe, internal recipe or article)
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Operation successfull
          content:
            application/vnd.ajns.kitchenstories+json; version=3:
              schema:
                $ref: '#/components/schemas/form_response'
        '403':
          description: Forbidden. When user is not logged in
        '404':
          description: NotFound. When Cookbook does not exists
components:
  schemas:
    article_image_gallery:
      type: object
      properties:
        type:
          type: string
        image_collection:
          type: object
          properties:
            images:
              type: array
              items:
                type: object
                properties:
                  image:
                    $ref: '#/components/schemas/image'
                  link:
                    type: string
                  subtitle:
                    type: string
                required:
                - image
          required:
          - images
      required:
      - type
      - image_collection
    legacy_unit:
      type: object
      properties:
        id:
          type: string
        ingredient_pluralizable:
          type: boolean
        name:
          type: object
          properties:
            rendered:
              type: string
            one:
              type: string
            many:
              type: string
          required:
          - rendered
          additionalProperties: false
      required:
      - name
    category_simplified:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        slug:
          type: string
        path:
          type: array
          items:
            $ref: '#/components/schemas/path_item'
        children:
          type: array
          items:
            $ref: '#/components/schemas/child_item'
      required:
      - slug
      - title
      - id
    links:
      type: object
      properties:
        first:
          type: string
          format: uri
        last:
          type: string
          format: uri
        next:
          type: string
          format: uri
        prev:
          type: string
          format: uri
      required:
      - last
      - first
      additionalProperties: false
    content_meta_markdown:
      type: object
      properties:
        markdown:
          type: string
          minLength: 1
          maxLength: 5000
      required:
      - markdown
    cookbook_pagination:
      type: object
      properties:
        links:
          $ref: '#/components/schemas/links'
        meta:
          $ref: '#/components/schemas/meta'
        data:
          type: array
          items:
            $ref: '#/components/schemas/cookbook'
      required:
      - data
      - links
      - meta
    step:
      type: object
      properties:
        headline:
          type: string
        text:
          type: string
        tip:
          type: object
          properties:
            title:
              type: string
            description:
              type: string
            video:
              $ref: '#/components/schemas/video'
          required:
          - description
          - title
        image:
          $ref: '#/components/schemas/image'
        video:
          $ref: '#/components/schemas/video'
        utensils:
          type: array
          items:
            $ref: '#/components/schemas/recipe_utensil'
        ingredients:
          type: array
          items:
            $ref: '#/components/schemas/recipe_ingredient'
      required:
      - text
    cookbook:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        recipes_count:
          type: number
        articles_count:
          type: number
        items_count:
          type: number
        image:
          $ref: '#/components/schemas/image'
        images:
          type: array
          items:
            $ref: '#/components/schemas/image'
      required:
      - recipes_count
      - id
      - title
      - images
    recipe_simplified:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        slug:
          type: string
        type:
          type: string
        content_id:
          type: string
        difficulty:
          type: string
        image:
          $ref: '#/components/schemas/image'
          nullable: true
        author:
          $ref: '#/components/schemas/user_public'
        url:
          type: string
          format: uri
        duration:
          type: object
          properties:
            preparation:
              type: number
            baking:
              type: number
            resting:
              type: number
          required:
          - preparation
          - resting
          - baking
          nullable: true
        user_reactions:
          type: object
          properties:
            rating:
              type: number
            rating_count:
              type: number
            images:
              type: array
              items:
                $ref: '#/components/schemas/comment_image'
              maxItems: 4
            comments_count:
              type: number
            images_count:
              type: number
            like_count:
              type: number
            quality:
              type: number
          required:
          - comments_count
          - images_count
          - like_count
          - quality
        publishing:
          type: object
          properties:
            created:
              type: string
              format: date-time
            updated:
              type: string
              format: date-time
            published:
              type: string
              format: date-time
            state:
              type: string
              enum:
              - draft
              - submitted
              - rejected
              - live
              - expired
              - scheduled
          required:
          - created
          - updated
          - state
        tags:
          type: array
          items:
            $ref: '#/components/schemas/tag'
      required:
      - content_id
      - type
      - publishing
      - title
      - slug
      - url
      - user_reactions
      - author
      - id
    article_simplified:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        title:
          type: string
        subtitle:
          type: string
        type:
          type: string
        content_id:
          type: string
        image:
          $ref: '#/components/schemas/image'
        author:
          $ref: '#/components/schemas/user_public'
        url:
          type: string
          format: uri
        publishing:
          $ref: '#/components/schemas/publishing'
        user_reactions:
          type: object
          properties:
            comments_count:
              type: number
            images_count:
              type: number
            like_count:
              type: number
            quality:
              type: number
          required:
          - comments_count
          - images_count
          - like_count
          - quality
      required:
      - content_id
      - type
      - publishing
      - title
      - slug
      - url
      - subtitle
      - user_reactions
      - author
      - id
      - image
    characteristic:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
      - id
      - name
      additionalProperties: false
    additional_information:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
      - id
      - name
      additionalProperties: false
    article:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        title:
          type: string
        subtitle:
          type: string
        type:
          type: string
        content_id:
          type: string
        image:
          $ref: '#/components/schemas/image'
        author:
          $ref: '#/components/schemas/user_public'
        url:
          type: string
          format: uri
        publishing:
          $ref: '#/components/schemas/publishing'
        user_reactions:
          type: object
          properties:
            comments_count:
              type: number
            images_count:
              type: number
            like_count:
              type: number
            quality:
              type: number
          required:
          - comments_count
          - images_count
          - like_count
          - quality
        content:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/article_headline'
            - $ref: '#/components/schemas/article_quote'
            - $ref: '#/components/schemas/article_text'
            - $ref: '#/components/schemas/article_recipes'
            - $ref: '#/components/schemas/article_shopping_tips'
            - $ref: '#/components/schemas/article_image_gallery'
            - $ref: '#/components/schemas/article_video'
            - $ref: '#/components/schemas/content_meta_carousel'
            - $ref: '#/components/schemas/article_proscons'
            - $ref: '#/components/schemas/article_cta_button'
        meta:
          $ref: '#/components/schemas/wagtail_meta'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/tag'
        content_meta:
          type: array
          items:
            $ref: '#/components/schemas/content_meta'
        categories:
          type: object
          properties:
            main:
              $ref: '#/components/schemas/category_simplified'
            additional:
              type: array
              items:
                $ref: '#/components/schemas/category_simplified'
      required:
      - content_id
      - type
      - publishing
      - title
      - content
      - slug
      - url
      - subtitle
      - meta
      - user_reactions
      - author
      - id
      - image
    cookbook_change_title:
      type: object
      properties:
        title:
          type: string
        image:
          type: string
      required:
      - title
    feeditem_pagination:
      type: object
      properties:
        links:
          $ref: '#/components/schemas/links'
        meta:
          $ref: '#/components/schemas/meta'
        data:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/feed_article'
            - $ref: '#/components/schemas/feed_recipe'
            - $ref: '#/components/schemas/feed_shopping_tip'
      required:
      - data
      - links
      - meta
    size:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        metric:
          type: string
        imperial:
          type: string
      required:
      - id
      additionalProperties: false
    unit:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        featured_order:
          type: number
        ingredient_pluralizable:
          type: boolean
        name:
          type: object
          properties:
            one:
              type: string
            many:
              type: string
            rendered:
              type: string
          required:
          - rendered
          additionalProperties: false
      required:
      - id
      - name
      - ingredient_pluralizable
      - type
    image:
      type: object
      properties:
        id:
          oneOf:
          - type: string
          - type: number
        url:
          type: string
          format: uri
        source:
          type: string
        source_link:
          type: string
        width:
          type: number
        height:
          type: number
      required:
      - url
      additionalProperties: false
    article_cta_button:
      type: object
      properties:
        type:
          type: string
        cta_button:
          type: object
          properties:
            text:
              type: string
            link:
              type: string
          required:
          - text
          - link
      required:
      - cta_button
      - type
    form_response:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
      required:
      - errors
    article_headline:
      type: object
      properties:
        type:
          type: string
        headline:
          type: object
          properties:
            level:
              type: number
            text:
              type: string
          required:
          - level
          - text
      required:
      - type
      - headline
      additionalProperties: false
    cookbook_add_json:
      type: object
      properties:
        title:
          type: string
        image:
          type: string
        feed_item_id:
          type: string
        external_url:
          type: string
        feed_items:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
            required:
            - id
            additionalProperties: false
      required:
      - title
    feed_recipe:
      type: object
      properties:
        type:
          type: string
        recipe:
          oneOf:
          - $ref: '#/components/schemas/recipe_simplified'
          - $ref: '#/components/schemas/recipe'
        hide_for_web:
          type: boolean
        hide_for_app:
          type: boolean
      required:
      - type
      - recipe
    feed_article:
      type: object
      properties:
        type:
          type: string
        article:
          oneOf:
          - $ref: '#/components/schemas/article_simplified'
          - $ref: '#/components/schemas/article'
        hide_for_web:
          type: boolean
        hide_for_app:
          type: boolean
      required:
      - type
      - article
    recipe_utensil:
      type: object
      properties:
        id:
          type: string
        amount:
          type: number
        name:
          type: object
          properties:
            rendered:
              type: string
            one:
              type: string
            many:
              type: string
          required:
          - rendered
          additionalProperties: false
        characteristic:
          $ref: '#/components/schemas/characteristic'
        additional_information:
          $ref: '#/components/schemas/additional_information'
        size:
          $ref: '#/components/schemas/size'
      required:
      - name
    feed_shopping_tip:
      type: object
      properties:
        type:
          type: string
        shopping_tip:
          oneOf:
          - $ref: '#/components/schemas/article_simplified'
          - $ref: '#/components/schemas/article'
        hide_for_web:
          type: boolean
        hide_for_app:
          type: boolean
      required:
      - type
      - shopping_tip
    comment_image:
      type: object
      properties:
        comment:
          type: string
        author:
          $ref: '#/components/schemas/user_public'
        original_location:
          type: string
        image:
          $ref: '#/components/schemas/image'
        created:
          type: string
          format: date-time
      required:
      - author
      - created
      - image
      - original_location
      - comment
    article_proscons:
      type: object
      properties:
        type:
          type: string
        proscons:
          type: object
          properties:
            pros_title:
              type: string
            pros:
              type: string
            cons_title:
              type: string
            cons:
              type: string
          required:
          - pros
          - pros_title
          - cons
          - cons_title
      required:
      - type
      - proscons
    meta:
      type: object
      properties:
        pagination:
          type: object
          properties:
            pages:
              type: number
            count:
              type: number
            page:
              type: number
          required:
          - page
          - pages
          - count
          additionalProperties: false
      required:
      - pagination
      additionalProperties: false
    cookbook_update_json:
      type: object
      properties:
        id:
          type: string
      required:
      - id
    content_meta_faq:
      type: object
      properties:
        question:
          type: string
          minLength: 1
          maxLength: 500
        answer:
          type: string
          minLength: 1
          maxLength: 5000
      required:
      - answer
      - question
    child_item:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        path:
          type: array
          items:
            $ref: '#/components/schemas/path_item'
        slug:
          type: string
        children:
          type: array
          items:
            $ref: '#/components/schemas/child_item'
      required:
      - id
      - slug
      - title
    article_text:
      type: object
      properties:
        type:
          type: string
        text:
          type: object
          properties:
            text:
              type: string
          required:
          - text
      required:
      - text
      - type
      additionalProperties: false
    article_recipes:
      type: object
      properties:
        type:
          type: string
        recipes:
          type: object
          properties:
            recipes:
              type: array
              items:
                $ref: '#/components/schemas/recipe_simplified'
          required:
          - recipes
      required:
      - recipes
      - type
    cookbook_externalrecipes_add_json:
      type: object
      properties:
        url:
          type: string
          format: uri
      required:
      - url
    article_video:
      type: object
      properties:
        type:
          type: string
        video:
          type: object
          properties:
            video:
              $ref: '#/components/schemas/video'
            subtitle:
              type: string
          required:
          - video
      required:
      - type
      - video
    video:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        slug:
          type: string
        type:
          type: string
        content_id:
          type: string
        remote_id:
          type: string
        url:
          type: string
          format: uri
        recipe_url:
          type: string
          format: uri
        width:
          type: number
        height:
          type: number
        duration:
          type: number
        image:
          $ref: '#/components/schemas/image'
        meta:
          $ref: '#/components/schemas/wagtail_meta'
        publishing:
          type: object
          properties:
            created:
              type: string
              format: date-time
            updated:
              type: string
              format: date-time
            published:
              type: string
              format: date-time
            state:
              type: string
            playback-state:
              type: string
              enum:
              - not-playable
              - processing
              - ready
          required:
          - created
          - updated
          - state
          - playback-state
        user_reactions:
          type: object
          properties:
            view_count:
              type: number
          required:
          - view_count
      required:
      - content_id
      - duration
      - title
      - id
      - slug
      - meta
    recipe_ingredient:
      type: object
      properties:
        id:
          type: string
        name:
          type: object
          properties:
            rendered:
              type: string
            one:
              type: string
            many:
              type: string
          required:
          - rendered
          additionalProperties: false
        measurement:
          type: object
          properties:
            imperial:
              type: object
              properties:
                amount:
                  type: number
                unit:
                  oneOf:
                  - $ref: '#/components/schemas/legacy_unit'
                  - $ref: '#/components/schemas/unit'
              additionalProperties: false
            metric:
              type: object
              properties:
                amount:
                  type: number
                unit:
                  oneOf:
                  - $ref: '#/components/schemas/legacy_unit'
                  - $ref: '#/components/schemas/unit'
              additionalProperties: false
          additionalProperties: false
        characteristic:
          $ref: '#/components/schemas/characteristic'
        additional_information:
          $ref: '#/components/schemas/additional_information'
        is_divided:
          type: boolean
        is_partner:
          type: boolean
        is_searcheable:
          type: boolean
        url:
          type: string
      required:
      - name
    cookbook_recipes_add_json:
      type: object
      properties:
        id:
          type: string
      required:
      - id
    user_public:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
          - community
          - contributor
          - editor
        new_type:
          type: string
          enum:
          - community
          - contributor
          - editor
          - partner
          - external
        name:
          type: string
        slug:
          type: string
        occupation:
          type: string
        description:
          type: string
        image:
          $ref: '#/components/schemas/image'
          nullable: true
        banner_image:
          $ref: '#/components/schemas/image'
        wide_banner_image:
          $ref: '#/components/schemas/image'
        website:
          type: string
          format: uri
        is_premium:
          type: boolean
        created:
          type: string
          format: date-time
      required:
      - type
      - new_type
      - name
      - id
    wagtail_meta:
      type: object
      properties:
        title:
          type: string
        description:
          type: string
        hreflang:
     

# --- truncated at 32 KB (39 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kitchenstories/refs/heads/main/openapi/kitchenstories-user-cookbooks-api-openapi.yml