> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mayar.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Section for showcasing API endpoints

> [!WARNING]
>
> **API V1 deprecation notice:** The Mayar Headless **API V1** will be **deprecated on
> 1 October 2026**. After that date, V1 endpoints will no longer be available. Please migrate
> your integration to [API V2](https://docs.mayar.id/api-reference-v2/introduction.md) before then. See the
> [V1 to V2 migration guide](https://docs.mayar.id/api-reference-v2/migration-from-v1.md) for every breaking change and
> the full endpoint mapping.

## Get Started

Headless API is an e-commerce development method where the user interface (Frontend) is separated from the product management and transaction processing systems (Backend). In headless commerce, the front-end can be built using various modern web technologies such as React or Vue.js, while the back-end performs tasks such as product storage, order processing, and integration with payment systems.

By separating the front-end and back-end, headless commerce allows development teams to focus on the user experience without being hampered by the limitations of the underlying e-commerce platform. It also helps reduce the cost and time required to update and maintain an e-commerce site.

## Authentication

For starting using Mayar Headless API, you need account at [https://mayar.id](https://mayar.id). If you have an account, you can create API KEY from [https://web.mayar.id/api-keys](https://web.mayar.id/api-keys).

There are 2 options when creating an API Key, **Read Only** and **Read & Write**.

If you choose **Read Only**, then only API Endpoints with the Get Method can be used. If you choose **Read & Write**, then API Endpoints with both Get and Post Methods can be used.

![Generate API Key](https://mintcdn.com/mayar/vpiZywBuScQO25m8/images/apikeynew.png?fit=max\&auto=format\&n=vpiZywBuScQO25m8\&q=85\&s=24e30a7e059987f89ca9d3d7c7e8ce16)

> [!WARNING]
>
> For your account security, don't share your API KEY!

> [!NOTE]
>
> Please note that any changes to your domain or subdomain require you to create a new API KEY, so the link in the response you receive will also be updated.

## Sandbox Environment

For testing purposes, you can use the webpage [https://web.mayar.io/](https://web.mayar.io/). You can log in or register first, then generate an API key from [https://web.mayar.io/api-keys](https://web.mayar.io/api-keys). (The same method as obtaining an API key on the production page).

## Base URL

The API Base URL is the main part of the address (URL) used to access an API endpoint. Mayar has two API Base URL's based on the page.

```bash Production theme={null}
https://api.mayar.id/hl/v1
```

```bash Sandbox theme={null}
https://api.mayar.io/hl/v1
```

> [!NOTE]
>
> Make sure you use a base URL based on the appropriate web page (Production or Sandbox)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.