Skip to content

Square: Search Vendors

Square vendors.searchVendors: arguments, response, policy and SDK examples.

← Vendors operations · Get started

Operation square.searchvendors

Provider route: POST /v2/vendors/search. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/square with npm, or alter-sdk-square with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { SquareIntegration } from "@alter-ai/square";
async function execute(input: Parameters<SquareIntegration["vendors"]["searchVendors"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new SquareIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.vendors.searchVendors(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_square import SquareIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = SquareIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.vendors.search_vendors(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyModelRequired within parentExpand Search Vendors — request body — body

Referenced models: Search Vendors — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Search Vendors — response body

Referenced models: Search Vendors — response body

3 more schemas are linked from the tables above, on the schema pages.

Search Vendors — response body
FieldTypePresenceDescription and constraints
$objectRootRepresents an output from a call to [SearchVendors](api-endpoint:Vendors-SearchVendors).
cursorstringOptionalThe pagination cursor to be used in a subsequent request. If unset,
this is the final response.

See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information.
errorsarrayOptionalErrors encountered when the request fails.
errors[]ModelEach itemExpand Get Shift — response body — errors item
vendorsarrayOptionalThe [Vendor](entity:Vendor) objects matching the specified search filter.
vendors[]ModelEach itemExpand Create Vendor — response body — vendor

Referenced models: Get Shift — response body — errors item, Create Vendor — response body — vendor

Search Vendors — request body — body
FieldTypePresenceDescription and constraints
$objectRootRepresents an input into a call to [SearchVendors](api-endpoint:Vendors-SearchVendors).
cursorstringOptionalA pagination cursor returned by a previous call to this endpoint.
Provide this to retrieve the next set of results for the original query.

See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information.
filterModelOptionalExpand Search Vendors — request body — body filter
Specifies a filter used to search for vendors.
sortModelOptionalExpand Search Vendors — request body — body sort
Specifies a sorter used to sort the returned vendors.

Referenced models: Search Vendors — request body — body filter, Search Vendors — request body — body sort

Get Shift — response body — errors item
FieldTypePresenceDescription and constraints
$objectRootRepresents an error encountered during a request to the Connect API.

See [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information.
categorystringRequired within parentIndicates which high-level category of error has occurred during a
request to the Connect API.
The high-level category for the error.
See [ErrorCategory](#type-errorcategory) for possible values
Known values: API_ERROR, AUTHENTICATION_ERROR, INVALID_REQUEST_ERROR, RATE_LIMIT_ERROR, PAYMENT_METHOD_ERROR, REFUND_ERROR, MERCHANT_SUBSCRIPTION_ERROR, EXTERNAL_VENDOR_ERROR
codeModelRequired within parentExpand Get Shift — response body — errors item code
The specific code of the error.
See [ErrorCode](#type-errorcode) for possible values
detailstringOptionalA human-readable description of the error for debugging purposes.
fieldstringOptionalThe name of the field provided in the original request (if any) that
the error pertains to.

Referenced models: Get Shift — response body — errors item code

Create Vendor — response body — vendor
FieldTypePresenceDescription and constraints
$objectRootRepresents a supplier to a seller.
account_numberJSONOptional
account_number (anyOf 1)stringAlternativeThe account number of the [Vendor](entity:Vendor).
Maximum length: 100
account_number (anyOf 2)nullAlternative
addressJSONOptional
address (anyOf 1)ModelAlternativeExpand Get Payment — response body — payment billing address
The address of the [Vendor](entity:Vendor).
address (anyOf 2)nullAlternative
contactsJSONOptional
contacts (anyOf 1)arrayAlternativeThe contacts of the [Vendor](entity:Vendor).
contacts (anyOf 1)[]ModelEach itemExpand Create Vendor — response body — vendor contacts The contacts of the Vendor (entity:Vendor) item
contacts (anyOf 2)nullAlternative
created_atstringOptionalAn RFC 3339-formatted timestamp that indicates when the
[Vendor](entity:Vendor) was created.
Maximum length: 34
Read only: true
idstringOptionalA unique Square-generated ID for the [Vendor](entity:Vendor).
This field is required when attempting to update a [Vendor](entity:Vendor).
Maximum length: 100
nameJSONOptional
name (anyOf 1)stringAlternativeThe name of the [Vendor](entity:Vendor).
This field is required when attempting to create or update a [Vendor](entity:Vendor).
Maximum length: 100
name (anyOf 2)nullAlternative
noteJSONOptional
note (anyOf 1)stringAlternativeA note detailing information about the [Vendor](entity:Vendor).
Maximum length: 4096
note (anyOf 2)nullAlternative
statusJSONOptional
status (anyOf 1)stringAlternativeThe status of the [Vendor](entity:Vendor),
whether a [Vendor](entity:Vendor) is active or inactive.
The status of the [Vendor](entity:Vendor).
See [Status](#type-status) for possible values
Known values: ACTIVE, INACTIVE
status (anyOf 2)nullAlternative
updated_atstringOptionalAn RFC 3339-formatted timestamp that indicates when the
[Vendor](entity:Vendor) was last updated.
Maximum length: 34
Read only: true
versionJSONOptional
version (anyOf 1)integerAlternativeThe version of the [Vendor](entity:Vendor).
version (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Get Payment — response body — payment billing address, Create Vendor — response body — vendor contacts The contacts of the Vendor (entity:Vendor) item

Search Vendors — request body — body filter
FieldTypePresenceDescription and constraints
$objectRootDefines supported query expressions to search for vendors by.
nameJSONOptional
name (anyOf 1)arrayAlternativeThe names of the [Vendor](entity:Vendor) objects to retrieve.
name (anyOf 1)[]stringEach item
name (anyOf 2)nullAlternative
statusJSONOptional
status (anyOf 1)arrayAlternativeThe statuses of the [Vendor](entity:Vendor) objects to retrieve.
See [VendorStatus](#type-vendorstatus) for possible values
status (anyOf 1)[]stringEach itemThe status of the [Vendor](entity:Vendor),
whether a [Vendor](entity:Vendor) is active or inactive.
One of: ACTIVE, INACTIVE
status (anyOf 2)nullAlternative
Search Vendors — request body — body sort
FieldTypePresenceDescription and constraints
$objectRootDefines a sorter used to sort results from [SearchVendors](api-endpoint:Vendors-SearchVendors).
fieldJSONOptional
field (anyOf 1)stringAlternativeThe field to sort the returned [Vendor](entity:Vendor) objects by.
Specifies the sort key to sort the returned vendors.
See [Field](#type-field) for possible values
One of: NAME, CREATED_AT
field (anyOf 2)nullAlternative
orderJSONOptional
order (anyOf 1)stringAlternativeThe order (e.g., chronological or alphabetical) in which results from a request are returned.
Specifies the sort order for the returned vendors.
See [SortOrder](#type-sortorder) for possible values
One of: DESC, ASC
order (anyOf 2)nullAlternative
Create Vendor — response body — vendor contacts The contacts of the Vendor (entity:Vendor) item
FieldTypePresenceDescription and constraints
$objectRootRepresents a contact of a [Vendor](entity:Vendor).
email_addressJSONOptional
email_address (anyOf 1)stringAlternativeThe email address of the [VendorContact](entity:VendorContact).
Maximum length: 255
email_address (anyOf 2)nullAlternative
idstringOptionalA unique Square-generated ID for the [VendorContact](entity:VendorContact).
This field is required when attempting to update a [VendorContact](entity:VendorContact).
Maximum length: 100
nameJSONOptional
name (anyOf 1)stringAlternativeThe name of the [VendorContact](entity:VendorContact).
This field is required when attempting to create a [Vendor](entity:Vendor).
Maximum length: 255
name (anyOf 2)nullAlternative
ordinalJSONRequired within parent
ordinal (anyOf 1)integerAlternativeThe ordinal of the [VendorContact](entity:VendorContact).
ordinal (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
phone_numberJSONOptional
phone_number (anyOf 1)stringAlternativeThe phone number of the [VendorContact](entity:VendorContact).
Maximum length: 255
phone_number (anyOf 2)nullAlternative
removedJSONOptional
removed (anyOf 1)booleanAlternativeThe state of the [VendorContact](entity:VendorContact).
removed (anyOf 2)nullAlternative

SDK function policy ID: square.searchvendors. Catalog operation: SearchVendors. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["VENDOR_READ"]

Pinned headers: {"Square-Version": "2026-11-18"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.