Skip to content
On this page

Create Supplier ​

Create a new supplier in your store.

Endpoint ​

POST /api/suppliers/create

Request Body ​

FieldTypeRequiredDescription
storeIdstringYesStore ID
namestringYesSupplier name
companystringNoCompany name
address1stringYesAddress line 1
address2stringNoAddress line 2
cityobjectNoCity object
provinceobjectNoProvince object
countryobjectNoCountry object
phonestringNoPhone number
connectablebooleanNoIs connectable
routestringNoRoute (required if connectable)

Example ​

json
{
  "name": "Supplier Name",
  "company": "Company Inc.",
  "address1": "123 Main St",
  "address2": "",
  "city": { "name": "City" },
  "province": { "name": "Province" },
  "country": { "name": "Country" },
  "phone": "+123456789",
  "connectable": true,
  "route": ""
}

Response ​

json
{
  "status": "success",
  "data": {
    "_id": "string",
    "name": "Supplier Name",
    ...
  }
}

Released under the MIT License.