# Frontstore API

In this section, you can find all basic information about the TheShop frontstore API.

* [Generate API key](#generate-api-key)
* [Editing the Source](#editing-the-source)

## Generate API key

You can generate an API key in TheShop administration:

1. In TheShop administration, navigate to [API section](https://demo.theshop.dev/api).
2. Click the arrow icon in the top right corner of chosen e-shop catalog section to expand it. You can see the catalog ID shown above the generate button. Click **Generate new API key**.\
   \
   Do not use **Developer API** section to generate the API key. This section hasn't been activated yet.<br>

   <figure><img src="/files/FcH3dCDgiPeDSiMWHBmQ" alt=""><figcaption><p>Generate new API key button</p></figcaption></figure>
3. In the dialog window, copy the API key (ensure to save the API key as it won't be possible to show it again) and then click **Confirm and save**.
4. Navigate to [TheShop frontstore API v2](https://demo.theshop.dev/api-documentation/v2). Above the API calls, you can see API endpoint.<br>

   <figure><img src="/files/5Oc35H5FPzRCGpzvshU0" alt=""><figcaption><p>API endpoint</p></figcaption></figure>

## Editing the Source

If you want to edit or delete anything in the Source of WYSIWYG Editor in TheShop administration, you need to switch back to the Editor and save it there.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.theshop.dev/docs/frontstore/api/frontstore-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
