GitBook Petstore API Documentation

website·Indexed 30 days ago

https://lovandu.gitbook.io

A documentation template and demo API for managing a pet store. It includes guides on authentication, server configuration, and endpoints for managing pets, animals, categories, inventory, and orders.

Tokens
2.6K
Snippets
20
Records
31
Agent score
50%

What's inside GitBook Petstore API

  1. Use Markdown in GitBook

    GitBook is backed by Markdown, allowing users to copy and paste existing Markdown files directly into the editor to create content. For users with multiple files, GitBook supports importing full repositories to keep content in sync.
    # Heading
    
    This is some paragraph text, with a [link](https://docs.gitbook.com) to our docs. 
    
    ## Heading 2
    - Point 1
    - Point 2
    - Point 3
  2. Import existing content into GitBook

    GitBook allows you to bring in pre-existing documentation by importing files from various popular writing tools and formats. You can upload individual files or groups of files to migrate your content into the GitBook environment.
  3. Insert and manage content blocks in the GitBook Editor

    GitBook uses a block-based editor where content is composed of various block types (such as text, tables, and code blocks). To add a new block to a page, use the slash command to open the insert menu, search for the desired block type, and select it to begin editing.
    Press / to open the insert block menu
  4. Set up a Petstore API account and obtain an API key

    To begin using the Petstore API, first create a free account at petstore.example.com. Once registered, navigate to the dashboard and locate the API Keys section to copy your unique API key for authentication.
  5. Synchronize GitBook content with GitHub or GitLab

    GitBook supports bi-directional synchronization with existing repositories on GitHub or GitLab. This 'Git Sync' feature enables teams to edit content either directly within the GitBook editor or via code in their repository, ensuring that both environments remain in sync automatically.
  6. Add images and media to GitBook documents

    GitBook provides multiple ways to insert images and media into documents. All uploaded files are automatically stored in the file manager. Methods for adding media include:

    • Dragging and dropping files directly into the editor.
    • Using the file manager (located in the upper right corner) to upload multiple images simultaneously.
    • Copying and pasting images directly into the editor.
  7. Publish a GitBook documentation site to the web

    After completing the writing, editing, or importing of content, you can publish your work as a docs site. Once published, the site is accessible online to your selected audience. Publishing controls and related settings are located on the docs site's homepage.
  8. Embed external content in GitBook

    Embed external websites or media using the {% embed url="..." %} tag. GitBook supports thousands of websites natively via Iframely; in many cases, simply pasting a supported link into the editor will also trigger an embed.
    {% embed url="https://www.youtube.com/watch?v=YILlrDYzAm4>" %}
  9. Create expandable sections in GitBook

    Use standard HTML <details> and <summary> tags to create collapsible sections. This is recommended for condensing lengthy paragraphs, creating FAQs, or building step-by-step guides.
    <details>
    <summary>Click me to expand</summary>
    Expandable content goes here.
    </details>
  10. List all pet inventory stock levels

    Retrieve a list of current stock levels for all pets in the store. This endpoint returns an array of inventory items, each containing the pet's ID, the current quantity in stock, and the pet's status (available, pending, or sold). Authentication requires a Bearer token in the Authorization header.
    curl -X GET "https://petstore.example.com/v1/inventory" \
         -H "Authorization: Bearer YOUR_API_KEY"