Skip to content

Get a supplier

GET
/stores/{storeRef}/suppliers/{id}
curl --request GET \
--url https://apibase.ecomweb.app/api/v1/stores/example/suppliers/1 \
--header 'x-api-key: <x-api-key>'

Returns one supplier together with the 20 most recent purchase order lines placed with it, in recent_lines.

Required scopes: read:purchase_orders

id
required
integer

The supplier ID.

storeRef
required
string

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

Media typeapplication/json
object
recent_lines
required

The 20 most recent purchase order lines placed with the supplier.

Array<object>
object
status
required

Status: draft, ordered, partially_received, received, closed or cancelled.

string
Allowed values: draft ordered partially_received received closed cancelled
purchase_order_id
required

ID of the purchase order the line belongs to.

number
po_code
required

Purchase order code, such as PO1042.

string
variant_id
required

ID of the ordered variant, or null once the variant was deleted.

number
nullable
product_name
required

Product name as it was when the line was added.

string
variant_title
required

Variant title as it was when the line was added, or null.

string
nullable
qty_ordered
required

Units ordered.

number
qty_accepted
required

Units received and accepted into stock so far.

number
unit_cost
required

Cost per unit, before tax, in the purchase order currency.

number
ordered_at
required

When the purchase order was marked as ordered, as an ISO 8601 timestamp, or null for a draft.

string
nullable
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

Example

{
"recent_lines": [
{
"status": "draft"
}
]
}

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"
}

The resource does not exist in this store.

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"
}