CData Python Connector for Square

Build 26.0.9770

Vendors

Returns the available vendors, including contact details, address information, and account data.

Table Specific Information

Select

The connector uses the Square API to filter the results by the following columns and operators while the rest of the filter is executed client-side within the connector.

  • Id supports the following operators: =, IN.
  • Name supports the following operators: =, IN.
  • Status supports the following operators: =, IN.

List all vendors, including both active and inactive records:

SELECT * FROM Vendors;

Retrieve a vendor by specifying its Id:

SELECT * FROM Vendors WHERE Id = 'F5MMNGPNW2IZVRB2'

Retrieve several vendors at once by supplying their Ids with IN. The connector sends these to the Square bulk retrieve endpoint, so the list is served by a single request rather than one request per Id.

SELECT * FROM Vendors WHERE Id IN ('F5MMNGPNW2IZVRB2', 'SUKM5RFPH6T4CWTW')

Retrieve a vendor by specifying its Name:

SELECT * FROM Vendors WHERE Name = 'new-vendor'

List only active vendors:

SELECT * FROM Vendors WHERE Status = 'ACTIVE'

List only inactive vendors:

SELECT * FROM Vendors WHERE Status = 'INACTIVE'

Insert

To create a vendor, the Name field is required.

INSERT INTO Vendors (Name, AddressAddressLine1, AddressAddressLine2, AddressAddressLine3, AddressLocality, AddressSublocality, AddressSublocality2, AddressSublocality3, AddressAdministrativeDistrictLevel1, AddressAdministrativeDistrictLevel2, AddressAdministrativeDistrictLevel3, AddressPostalCode, AddressCountry, AddressFirstName, AddressLastName, AccountNumber, Note, Status) VALUES ('insert_4', 'a', 'b', 'c', 'locality', 'sub', 'sub2', 'sub3', 'AddressAdministrativeDistrictLevel1', 'AddressAdministrativeDistrictLevel2', 'AddressAdministrativeDistrictLevel3', '134003', 'IN', 'AddressFirstName', 'AddressLastName', '1234567890', 'this is a note.', 'ACTIVE')

INSERT INTO Vendors (Name, AccountNumber, Note, Status, Contacts) VALUES ('insert_8', '1234567890', 'this is a note.', 'ACTIVE', '[{"ordinal": 0, "name": "first_contact", "phone_number": "1234567890", "removed": false}, {"ordinal": 1, "name": "first_contact2", "phone_number": "1234567891", "removed": false}]')
Note: The Version field cannot be set during INSERT operations.

Update

To update a Vendor record, the Version field is required. The supplied value must match the record's current value for this field.

UPDATE Vendors SET Name = 'updated', AddressAddressLine1 = 'updated', AddressAddressLine2 = 'updated', AddressAddressLine3 = 'updated', AddressLocality = 'updated', AddressSublocality = 'updated', AddressSublocality2 = 'updated', AddressSublocality3 = 'updated', AddressAdministrativeDistrictLevel1 = 'updated', AddressAdministrativeDistrictLevel2 = 'updated', AddressAdministrativeDistrictLevel3 = 'updated', AddressPostalCode = 'updated', AddressCountry = 'AU', AddressFirstName = 'updated', AddressLastName = 'updated', Contacts = '[{"ordinal": 2,"email_address": "[email protected]","name": "updated1","phone_number": "5645645645","removed": false}, {"ordinal": 3,"email_address": "[email protected]","name": "updated2","phone_number": "1233211233","removed": false}]', AccountNumber = '9346', Note = 'updated', Version = 3, Status = 'INACTIVE' WHERE Id = 'YEA4LD6WXX6BJUZT'

Bulk Insert

The maximum BatchSize supported by Vendors is 100.

You can create vendors in bulk using TEMP tables.

INSERT INTO Vendors#TEMP (Name, AddressCountry) VALUES ('s1', 'IN')

INSERT INTO Vendors#TEMP (Name, AddressCountry) VALUES ('s2', 'IN')

INSERT INTO Vendors (Name, AddressCountry) SELECT Name, AddressCountry FROM Vendors#TEMP

Bulk Update

The maximum BatchSize supported by Vendors is 100.

Vendors can be updated in bulk using their Ids.

INSERT INTO Vendors#TEMP (Id, Version, AddressCountry) VALUES ('SUKM5RFPH6T4CWTW', 5, 'IN')

INSERT INTO Vendors#TEMP (Id, Version, AddressCountry) VALUES ('RCWAADSCRNBVER3W', 9, 'IN')

UPDATE Vendors (Id, Version, AddressCountry) SELECT Id, Version, AddressCountry FROM Vendors#TEMP

Columns

Name Type ReadOnly Description
Id [KEY] String True

A unique Square-generated Id for the vendor.

CreatedAt Datetime True

An RFC 3339-formatted timestamp that indicates when the vendor was created.

UpdatedAt Datetime True

An RFC 3339-formatted timestamp that indicates when the vendor was last updated.

Name String False

The name of the vendor.

AddressAddressLine1 String False

The first line of the address.

AddressAddressLine2 String False

The second line of the address, if any.

AddressAddressLine3 String False

The third line of the address, if any.

AddressLocality String False

The city or town of the address.

AddressSublocality String False

A civil region within the address's locality, if any.

AddressSublocality2 String False

A civil region within the address's sublocality, if any.

AddressSublocality3 String False

A civil region within the address's Sublocality2, if any.

AddressAdministrativeDistrictLevel1 String False

A civil entity within the address's country. In the US, this is the state.

AddressAdministrativeDistrictLevel2 String False

A civil entity within the address's AdministrativeDistrictLevel1. In the US, this is the county.

AddressAdministrativeDistrictLevel3 String False

A civil entity within the address's AdministrativeDistrictLevel2, if any.

AddressPostalCode String False

The address's postal code.

AddressCountry String False

The address's country, in the two-letter format of ISO 3166. For example, US or FR.

The allowed values are ZZ, AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW.

AddressFirstName String False

Optional first name when it's representing recipient.

AddressLastName String False

Optional last name when it's representing recipient.

Contacts String False

The contacts of the vendor.

AccountNumber String False

The account number of the vendor.

Note String False

A note detailing information about the vendor.

Version Integer False

The version of the vendor.

Status String False

The status of the vendor.

The allowed values are ACTIVE, INACTIVE.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770