**Version: 202201**

# Create Supplier

**POST** `/openapi/2022-01/suppliers`

Allows users to add a new supplier to the system.

## Request

**application/json**

**Body | Example**

**Body**

- `supplier` object (required)

  - `title` string (required)

    supplier's name, must be unique within the store.
  - `url` string

```json
{
  "supplier": {
    "title": "string",
    "url": "string"
  }
}
```

## Responses

**200 | 422 | 500**

200

**application/json**

**Schema | Example | Result**

**Schema**

- `supplier` object

  - `id` string

    **Example:** `382453603865993516`
  - `title` string

    **Example:** `example supplier`
  - `url` string

    **Example:** `https://shoplazza.com`
  - `created_at` string

    **Example:** `2024-05-21T08:54:04Z`
  - `updated_at` string

    **Example:** `2024-05-21T08:54:04Z`

```json
{
  "supplier": {
    "id": "382453603865993516",
    "title": "example supplier",
    "url": "https://shoplazza.com",
    "created_at": "2024-05-21T08:54:04Z",
    "updated_at": "2024-05-21T08:54:04Z"
  }
}
```

```json
{
    "supplier": {
        "id": "382453603865993516",
        "title": "example supplier",
        "url": "https://shoplazza.com",
        "created_at": "2024-05-21T08:54:04Z",
        "updated_at": "2024-05-21T08:54:04Z"
    }
}
```

422

**application/json**

**Schema | Example | duplicated supplier name**

**Schema**

- `errors` string[]

```json
{
  "errors": [
    "Duplicated supplier name"
  ]
}
```

```json
{
    "errors": [
        "Duplicated supplier name"
    ]
}
```

500

**application/json**

**Schema | Example | Result**

**Schema**

- `errors` string[]

```json
{
  "errors": [
    "title is a required field"
  ]
}
```

```json
{
  "errors": [
    "title is a required field"
  ]
}
```
