# 認証

Ingestion API（Products / Inventory Levels / Order Line Master）共通の認証方式です。

> **Base URL** `https://api.lmile.io`

## Headers

```http
x-ingest-secret: {INGEST_SECRET}
Content-Type: application/json
```

| Header            | Required | 説明                 |
| ----------------- | :------: | ------------------ |
| `x-ingest-secret` |     ✓    | ingest API シークレット  |
| `Content-Type`    |     ✓    | `application/json` |

* **`shop` はリクエストボディに含めます**（ヘッダではありません）。各エンドポイントの仕様を参照してください。
* 認証に失敗すると `401 unauthorized`、シークレット未設定のサーバーは `503` を返します。

## API シークレットの取得

現在セルフサービス発行はありません。取得希望は <admin@lmile.io> へ。

## 取り扱いルール

* サーバーサイド環境変数に格納する
* ブラウザ JS / フロントエンドに埋め込まない
* Git にコミットしない

```env
INGEST_SECRET=your_secret_here
```


---

# 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://lmile.gitbook.io/lmile-docs/getting-started/authentication.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.
