• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
Bulk update vendors BETA

PUT /v2/vendors/bulk-update

Updates one or more of existing Vendor objects as suppliers to a seller.


Permissions
VENDOR_WRITE
Guide
Update vendors
Try in API Explorer
Name Description
vendors
Map<string, UpdateVendorRequest>

Required

A set of UpdateVendorRequest objects encapsulating to-be-updated Vendor objects. The set is represented by a collection of Vendor-ID/UpdateVendorRequest-object pairs.

Response Fields

Name Description
errors
Error [ ]

Errors encountered when the request fails.

responses
Map<string, UpdateVendorResponse>

A set of UpdateVendorResponse objects encapsulating successfully created Vendor objects or error responses for failed attempts. The set is represented by a collection of Vendor-ID/UpdateVendorResponse-object or Vendor-ID/error-object pairs.

Examples

You are viewing an old version of the API
PUT /v2/vendors/bulk-update
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/vendors/bulk-update \
  -X PUT \
  -H 'Square-Version: 2022-05-12' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "vendors": {
      "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4": {
        "note": "favorite vendor",
        "version": 30,
        "status": "ACTIVE"
      },
      "FMCYHBWT1TPL8MFH52PBMEN92A": {
        "address": {
          "address_line_1": "202 Mill St",
          "locality": "Moorestown",
          "administrative_district_level_1": "NJ",
          "postal_code": "08057",
          "country": "US"
        },
        "version": 10,
        "status": "ACTIVE"
      }
    }
  }'
Response JSON
{
  "vendors": {
    "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4": {
      "id": "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4",
      "created_at": "2022-03-16T10:10:54.859Z",
      "updated_at": "2022-03-16T20:21:54.859Z",
      "name": "Joe's Fresh Seafood",
      "address": {
        "address_line_1": "505 Electric Ave",
        "address_line_2": "Suite 600",
        "locality": "New York",
        "administrative_district_level_1": "NY",
        "postal_code": "10003",
        "country": "US"
      },
      "contacts": [
        {
          "id": "INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A",
          "name": "Joe Burrow",
          "email_address": "joe@joesfreshseafood.com",
          "phone_number": "1-212-555-4250",
          "ordinal": 0
        }
      ],
      "account_number": "4025391",
      "note": "favorite vendor",
      "version": 31,
      "status": "ACTIVE"
    },
    "INV_V_FMCYHBWT1TPL8MFH52PBMEN92A": {
      "id": "INV_V_FMCYHBWT1TPL8MFH52PBMEN92A",
      "created_at": "2022-03-16T10:21:54.859Z",
      "updated_at": "2022-03-16T20:21:54.859Z",
      "name": "Annie’s Hot Sauce",
      "contacts": [
        {
          "id": "INV_VC_ABYYHBWT1TPL8MFH52PBMENPJ4",
          "name": "Annie Thomas",
          "email_address": "annie@annieshotsauce.com",
          "phone_number": "1-212-555-4250",
          "ordinal": 0
        }
      ],
      "address": {
        "address_line_1": "202 Mill St",
        "locality": "Moorestown",
        "administrative_district_level_1": "NJ",
        "postal_code": "08057",
        "country": "US"
      },
      "version": 11,
      "status": "ACTIVE"
    }
  }
}