Suppliers are the vendors and businesses you buy from. A supplier is required to raise a purchase order, and expenses can optionally be linked to one for reporting.
List suppliers
GET /supplier
Returns suppliers for your account. Archived suppliers are excluded unless requested.
| Query parameter | Type | Description |
|---|---|---|
| include_archived | boolean | Include archived suppliers (default: false) |
curl https://api.rebill.co.za/supplier \ -H "Authorization: Bearer sk_your_secret_key"
Response:
{
"suppliers": [
{
"id": "sup_001",
"name": "BuildRight Hardware",
"email": "[email protected]",
"phone": "+27821234567",
"address": "12 Voortrekker Road, Bellville",
"notes": "Net 30 terms",
"archived": false
}
]
}Get a supplier
GET /supplier/:id
Returns a single supplier by ID.
Supplier object
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier |
| name | string | Supplier name |
| string | Email address (optional) | |
| phone | string | Phone number (optional) |
| address | string | Free-text address (optional) |
| notes | string | Free-text notes (optional) |
| archived | boolean | Whether the supplier has been archived |
Create a supplier
POST /supplier
| Field | Required | Type | Description |
|---|---|---|---|
| name | Yes | string | Supplier name |
| No | string | Valid email address | |
| phone | No | string | Phone number |
| address | No | string | Free-text address |
| notes | No | string | Free-text notes |
curl -X POST https://api.rebill.co.za/supplier \
-H "Authorization: Bearer sk_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"name": "BuildRight Hardware",
"email": "[email protected]",
"phone": "+27821234567",
"address": "12 Voortrekker Road, Bellville"
}'Response (201 Created):
{
"id": "sup_001"
}Update a supplier
PUT /supplier/:id
Applies a partial patch. Unlike clients and items, only the fields you include are changed; omitted fields keep their existing value.
curl -X PUT https://api.rebill.co.za/supplier/sup_001 \
-H "Authorization: Bearer sk_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"phone": "+27831234567"
}'Delete a supplier
DELETE /supplier/:id
Archives the supplier (sets archived to true). Suppliers are never hard-deleted, so existing purchase orders and expenses that reference one keep working. Returns 200 OK.
curl -X DELETE https://api.rebill.co.za/supplier/sup_001 \ -H "Authorization: Bearer sk_your_secret_key"