Skip to content

List suppliers

GET
/stores/{storeRef}/suppliers
curl --request GET \
--url 'https://apibase.ecomweb.app/api/v1/stores/example/suppliers?limit=20&offset=0&status=active&include_archived=false' \
--header 'x-api-key: <x-api-key>'

Returns the store’s suppliers one page at a time. By default only live suppliers are returned; set status to archived or all to include archived ones. Use search to match a name, contact name or email.

Required scopes: read:purchase_orders

storeRef
required
string

The store’s ref, as returned by GET /stores.

limit
number
default: 20 >= 1 <= 100

Maximum number of suppliers to return, from 1 to 100.

offset
number
0

Number of suppliers to skip.

search
string
<= 255 characters

Matches name, contact name or email

status
string
default: active
Allowed values: active archived all

Live suppliers only (default), archived ones only, or both. Takes precedence over include_archived.

include_archived
deprecated
boolean

Same as status=all when true. Ignored when status is set.

Media typeapplication/json
object
data
required
Array<object>
object
id
required

Supplier ID.

number
name
required

Supplier name. Unique among the store’s live suppliers.

string
contact_name
required

Name of the contact person, or null.

string
nullable
email
required

Email address that purchase orders are sent to, or null.

string
nullable
phone
required

Phone number, or null.

string
nullable
address_line1
required

First address line, or null.

string
nullable
address_line2
required

Second address line, or null.

string
nullable
province
required

Province code, or null.

string
nullable
ward
required

Ward code, or null.

string
nullable
country
required

Two-letter country code.

string
note
required

Internal note about the supplier, or null.

string
nullable
archived_at
required

When the supplier was archived, as an ISO 8601 timestamp, or null while the supplier is live.

string
nullable
created_at
required

When the supplier was created, as an ISO 8601 timestamp.

string
updated_at
required

When the supplier was last updated, as an ISO 8601 timestamp.

string
meta
required
object
total
required

Total number of items matching the request.

number
limit
required

Maximum number of items in this page.

number
offset
required

Number of items skipped before this page.

number
page
required

Current page number, starting at 1.

number
totalPages
required

Total number of pages.

number
hasNext
required

Whether a next page exists.

boolean
hasPrev
required

Whether a previous page exists.

boolean

Example generated

{
"data": [
{
"id": 1,
"name": "example",
"contact_name": "example",
"email": "example",
"phone": "example",
"address_line1": "example",
"address_line2": "example",
"province": "example",
"ward": "example",
"country": "example",
"note": "example",
"archived_at": "example",
"created_at": "example",
"updated_at": "example"
}
],
"meta": {
"total": 1,
"limit": 1,
"offset": 1,
"page": 1,
"totalPages": 1,
"hasNext": true,
"hasPrev": true
}
}

The request is malformed or failed validation.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}