> For the complete documentation index, see [llms.txt](https://support.ordereazi.com/central/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.ordereazi.com/central/developers/api-guides/suppliers.md).

# Suppliers

Read and create suppliers with the OrderEazi API, to keep them in step with your accounting system.

Purchase Orders and supplier costs need the same suppliers your accounting system pays. The OrderEazi API lets you read OrderEazi's suppliers, and create or update them from your system.

### Before you start

You'll need **Read** on **For Supplier** to read suppliers, and **Write** to create and change them. See [Authentication](/central/developers/authentication.md).

Send `x-api-version: 2.0` to get structured addresses.

### How to read suppliers

`GET /api/supplier/list` returns every supplier, with its `FinSupplierId`, `Name`, `Code`, `ERPId` (its ID in your accounting system), contact details, `PostalAddress`, `ShippingAddress`, currency, and `IsActive`.

### How to create or update suppliers

Send a list of suppliers with `POST /api/supplier/create`:

```json
[
  {
    "Name": "Chair Supplier (Pty) Ltd",
    "Code": "CHSUP01",
    "Email": "orders@example.com",
    "Telephone": "0115550199",
    "ContactPerson": "Pieter",
    "TaxNumber": "4987654321",
    "ERPId": "SUP-77",
    "PostalAddress": { "StreetAddress": "PO Box 5", "City": "Johannesburg", "Country": "ZAF", "StreetCode": "2000" },
    "ShippingAddress": { "StreetAddress": "5 Mill St", "City": "Johannesburg", "Country": "ZAF", "StreetCode": "2001" }
  }
]
```

* **Required fields:** You must send `Name`, `Code`, and `Email`. A supplier missing one is skipped, with a warning.
* **Existing suppliers:** A supplier with the same `Name` or `Code` as one you send is updated instead of created.
* **Currency:** Suppliers use the organisation's currency.

> **Warning:** An update replaces the supplier's details with what you send, and fields you leave out are cleared. Send every field each time.

The response lists the saved suppliers. `Success` is `true` when at least one was saved, so check `Warnings` for any that were skipped.

### Related pages

* [Purchase Orders](/central/developers/api-guides/purchase-orders.md): order from these suppliers
* [Products and stock levels](/central/developers/api-guides/products-and-stock-levels.md): link products to suppliers, with their costs
