API Reference

Suppliers

Create, list, update, and delete suppliers via the Rebill API. Suppliers are the vendors you raise purchase orders against.

Last updated

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 parameterTypeDescription
include_archivedbooleanInclude 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

FieldTypeDescription
idstringUnique identifier
namestringSupplier name
emailstringEmail address (optional)
phonestringPhone number (optional)
addressstringFree-text address (optional)
notesstringFree-text notes (optional)
archivedbooleanWhether the supplier has been archived

Create a supplier

POST /supplier
FieldRequiredTypeDescription
nameYesstringSupplier name
emailNostringValid email address
phoneNostringPhone number
addressNostringFree-text address
notesNostringFree-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"

Was this article helpful?

Still need help?

Our support team is happy to help you get the most out of Rebill.

Contact support