Skip to content
Get started

List Suppliers

SupplierListSuppliersPageResponse Suppliers.ListSuppliers(SupplierListSuppliersParams?parameters, CancellationTokencancellationToken = default)
GET/api/v2/public/suppliers

Suppliers for the organisation, ordered by supplier code. Deleted suppliers are not returned. Use it to find the supplier_code values the order, delivery and receipt endpoints expect.

ParametersExpand Collapse
SupplierListSuppliersParams parameters
Int pageSize

Number of suppliers per page. Defaults to 10.

formatint32
Int pageStart

Page number, starting at 1. Defaults to 1.

formatint32
string searchText

Case-insensitive search in supplier code, name, country/region and city.

ReturnsExpand Collapse
class SupplierListSuppliersPageResponse:

Generic paginated response wrapper.

required Int PageSize

Maximum number of items returned per page.

formatint32
required Int PageStart

Current page number (1-based).

formatint32
required Long TotalCount

Total number of records matching the query across all pages.

formatint64
IReadOnlyList<SupplierListSuppliersResponse>? List

Collection of items for the current page.

required Boolean AllowCreateReceipt

true when store staff can raise a receipt against this supplier without an order.

required Boolean IsDirectVendor

true when the supplier delivers straight to the store instead of through a distribution centre.

string? City

City the supplier is registered in.

string? CountryRegionID

Country or region the supplier is registered in.

string? Name

Display name of the supplier.

Int? ReasonCode

Default reason code for movements booked against this supplier, or null when there is none. Look the code up through the reason codes endpoint.

formatint32
string? SupplierCode

The supplier’s code in the source system. The order, delivery and receipt endpoints expect this value, and suppliers are matched on it when created or updated.

IReadOnlyDictionary<string, JsonElement>? ListBody

Additional body-level metadata for the list.

IReadOnlyDictionary<string, IReadOnlyList<string>>? ListFilters

Active filter criteria applied to the result set, keyed by field name.

Int? NextPage

Next page number, or null when on the last page.

formatint32
Long? PreviousPage

Previous page number, or null when on the first page.

formatint64
string? ProjectLastModifiedDate

Last modified date/time of the project.

string? ScrollID

Opaque scroll identifier for deep-pagination scenarios.

string? ServerTime

Server UTC date/time when the response was generated.

string? SortColumn

Column name the results are sorted by.

string? SortOrder

Sort direction (asc or desc).

string? TaskLastModifiedDate

Last modified date/time of the task.

List Suppliers

SupplierListSuppliersParams parameters = new();

var page = await client.Suppliers.ListSuppliers(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
{
  "page_size": 0,
  "page_start": 0,
  "total_count": 0,
  "list": [
    {
      "allow_create_receipt": true,
      "is_direct_vendor": true,
      "city": "city",
      "country_region_id": "country_region_id",
      "name": "name",
      "reason_code": 0,
      "supplier_code": "supplier_code"
    }
  ],
  "list_body": {
    "foo": "bar"
  },
  "list_filters": {
    "foo": [
      "string"
    ]
  },
  "next_page": 0,
  "previous_page": 0,
  "project_last_modified_date": "project_last_modified_date",
  "scroll_id": "scroll_id",
  "server_time": "server_time",
  "sort_column": "sort_column",
  "sort_order": "sort_order",
  "task_last_modified_date": "task_last_modified_date"
}
{
  "code": 401,
  "status": "error",
  "message": "Authentication failed.",
  "error": "unauthorized",
  "error_description": "Authentication failed."
}
{
  "code": 500,
  "status": "fail",
  "message": "The request could not be processed.",
  "error": "internal_error",
  "error_description": "The request could not be processed."
}
Returns Examples
{
  "page_size": 0,
  "page_start": 0,
  "total_count": 0,
  "list": [
    {
      "allow_create_receipt": true,
      "is_direct_vendor": true,
      "city": "city",
      "country_region_id": "country_region_id",
      "name": "name",
      "reason_code": 0,
      "supplier_code": "supplier_code"
    }
  ],
  "list_body": {
    "foo": "bar"
  },
  "list_filters": {
    "foo": [
      "string"
    ]
  },
  "next_page": 0,
  "previous_page": 0,
  "project_last_modified_date": "project_last_modified_date",
  "scroll_id": "scroll_id",
  "server_time": "server_time",
  "sort_column": "sort_column",
  "sort_order": "sort_order",
  "task_last_modified_date": "task_last_modified_date"
}
{
  "code": 401,
  "status": "error",
  "message": "Authentication failed.",
  "error": "unauthorized",
  "error_description": "Authentication failed."
}
{
  "code": 500,
  "status": "fail",
  "message": "The request could not be processed.",
  "error": "internal_error",
  "error_description": "The request could not be processed."
}