Get a supplier
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/suppliers/1';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The supplier ID.
The store’s ref, as returned by GET /stores.
Responses
Section titled “Responses”object
The 20 most recent purchase order lines placed with the supplier.
object
Status: draft, ordered, partially_received, received, closed or cancelled.
ID of the purchase order the line belongs to.
Purchase order code, such as PO1042.
ID of the ordered variant, or null once the variant was deleted.
Product name as it was when the line was added.
Variant title as it was when the line was added, or null.
Units ordered.
Units received and accepted into stock so far.
Cost per unit, before tax, in the purchase order currency.
When the purchase order was marked as ordered, as an ISO 8601 timestamp, or null for a draft.
Supplier ID.
Supplier name. Unique among the store’s live suppliers.
Name of the contact person, or null.
Email address that purchase orders are sent to, or null.
Phone number, or null.
First address line, or null.
Second address line, or null.
Province code, or null.
Ward code, or null.
Two-letter country code.
Internal note about the supplier, or null.
When the supplier was archived, as an ISO 8601 timestamp, or null while the supplier is live.
When the supplier was created, as an ISO 8601 timestamp.
When the supplier was last updated, as an ISO 8601 timestamp.
Example
{ "recent_lines": [ { "status": "draft" } ]}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
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.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The resource does not exist in this store.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}