Create Supplier
Create a new supplier in your store.
Endpoint
POST /api/suppliers/createRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
| storeId | string | Yes | Store ID |
| name | string | Yes | Supplier name |
| company | string | No | Company name |
| address1 | string | Yes | Address line 1 |
| address2 | string | No | Address line 2 |
| city | object | No | City object |
| province | object | No | Province object |
| country | object | No | Country object |
| phone | string | No | Phone number |
| connectable | boolean | No | Is connectable |
| route | string | No | Route (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",
...
}
}