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

# Créer un emplacement de stock

> Crée un emplacement de stock.

Crée un emplacement de stock.

```json Corps de la requête theme={null}
{
  "name": "Magasin MP",
  "siteId": 1,
  "type": "PHYSICAL"
}
```


## OpenAPI

````yaml openapi.json POST /stock/locations
openapi: 3.0.0
info:
  title: Bonx API
  version: 1.0.0
servers:
  - url: '{baseUrl}'
    variables:
      baseUrl:
        default: https://YOUR-API-URL
        description: Your space API URL, available in Settings → API tokens.
security: []
paths:
  /stock/locations:
    post:
      summary: Create a stock location
      parameters:
        - in: header
          name: x-api-key
          schema:
            type: string
          description: API token from your Bonx space.
        - description: _"name" is required (enter it either in parameters or request body)_
          in: query
          name: name
          required: true
          schema:
            type: string
        - in: query
          name: siteId
          required: false
          schema:
            type: integer
        - in: query
          name: type
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                name:
                  nullable: false
                  type: string
                siteId:
                  nullable: true
                  type: integer
                type:
                  nullable: true
                  type: string
              type: object
        description: >-
          Query parameters can also be provided in the request body as a JSON
          object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  insertStockLocationsOne:
                    nullable: true
                    properties:
                      id:
                        nullable: false
                        type: integer
                      name:
                        nullable: false
                        type: string
                      site:
                        nullable: true
                        properties:
                          id:
                            nullable: false
                            type: integer
                          name:
                            nullable: false
                            type: string
                        type: object
                      type:
                        $ref: '#/components/schemas/location_type'
                    type: object
          description: Response
components:
  schemas:
    location_type:
      nullable: false

````