# List vendor groups

Lists the vendor groups defined by the caller's organization, scoped server-side to the caller's organization. Paginated via limit/offset or an opaque cursor; page size is capped server-side.

Endpoint: GET /public/v1/vendors/groups
Version: Beta

## Query parameters:

  - `limit` (integer)
    Maximum number of groups to return per page. Bounded server-side: values above
the server maximum are clamped rather than rejected, and an unset or zero value
uses a server default. Must not be negative.

  - `offset` (integer)
    Zero-based offset for page-based pagination; ignored when cursor is provided.
Must not be negative.

  - `cursor` (string)
    Opaque pagination cursor, echoed from a prior response's next_cursor. Takes
precedence over offset when both are set. Set to "" or leave unset to request the
first page; treat the encoding as opaque, it is not part of this contract.

## Response 200:

  - `200` (unknown)
    A successful response.

## Response 200 fields (application/json):

  - `vendorGroups` (array, required)
    The vendor groups on this page, curated for public consumption, newest first.

  - `vendorGroups.id` (string, required)
    Server-generated unique identifier of the group. Pass this back when addressing
a specific group.

  - `vendorGroups.name` (string, required)
    Human-readable display name of the group; unique within the caller's organization.

  - `vendorGroups.description` (string)
    Free-text description of the group. Absent when never set, which is
distinguishable from an explicitly empty description.

  - `vendorGroups.memberCount` (string, required)
    Number of vendors currently in this group. Maintained by the service and
read-only on this surface.

  - `vendorGroups.createdAt` (string, required)
    Time the group was created.

  - `vendorGroups.updatedAt` (string, required)
    Time the group's metadata was last updated.

  - `totalCount` (integer, required)
    Total number of groups in the caller's organization (before pagination).

  - `nextCursor` (string)
    Opaque cursor to pass as cursor in the next request. Absent when no further
pages exist, which is the caller's signal to stop paging.

## Response 400:

  - `400` (unknown)
    INVALID_ARGUMENT: limit or offset is negative, or the cursor is malformed.

## Response 401:

  - `401` (unknown)
    UNAUTHENTICATED: access token is absent, malformed, or missing the required organization claim.

## Response 403:

  - `403` (unknown)
    PERMISSION_DENIED: access token does not include the vendor-directory.read scope.

## Response default:

  - `default` (unknown)
    An unexpected error response.

## Response default fields (application/json):

  - `code` (integer, required)
    The status code, which should be an enum value of
[google.rpc.Code][google.rpc.Code].

  - `message` (string, required)
    A developer-facing error message, which should be in English. Any
user-facing error message should be localized and sent in the
[google.rpc.Status.details][google.rpc.Status.details] field, or localized
by the client.

  - `details` (array, required)
    A list of messages that carry the error details.  There is a common set of
message types for APIs to use.

  - `details.@type` (string)
    A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
`path/google.protobuf.Duration`). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme `http`, `https`, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
* If no scheme is provided, `https` is assumed.
* An HTTP GET on the URL must yield a [google.protobuf.Type][]
value in binary format, or produce an error.
* Applications are allowed to cache lookup results based on the
URL, or have them precompiled into a binary to avoid any
lookup. Therefore, binary compatibility needs to be preserved
on changes to types. (Use versioned type names to manage
breaking changes.)

Note: this functionality is not currently available in the official
protobuf release, and it is not used for type URLs beginning with
type.googleapis.com. As of May 2023, there are no widely used type server
implementations and no plans to implement one.
Schemes other than `http`, `https` (or the empty scheme) might be
used with implementation specific semantics.

