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

You are viewing an old version of the API
Update vendor BETA

PUT /v2/vendors/{vendor_id}

Updates an existing Vendor object as a supplier to a seller.


Permissions
VENDOR_WRITE
Guide
Update vendors
Try in API Explorer
Name Description
idempotency_key
string

A client-supplied, universally unique identifier (UUID) for the request.

See Idempotency in the API Development 101 section for more information.

Max Length 128
vendor
Vendor

Required

The specified Vendor to be updated.

Response Fields

Name Description
errors
Error [ ]

Errors occurred when the request fails.

vendor
Vendor

The Vendor that has been updated.

Examples

You are viewing an old version of the API
PUT /v2/vendors/{vendor_id}
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/vendors/{vendor_id} \
  -X PUT \
  -H 'Square-Version: 2022-09-21' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "idempotency_key": "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe",
    "vendor": {
      "id": "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4",
      "name": "Jack'\''s Chicken Shack",
      "status": "ACTIVE",
      "version": 1
    }
  }'
Response JSON
{
  "vendor": {
    "id": "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4",
    "created_at": "2022-03-16T10:21:54.859Z",
    "updated_at": "2022-03-16T20:21:54.859Z",
    "name": "Jack's Chicken Shack",
    "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",
    "version": 2,
    "status": "ACTIVE"
  },
  "errors": []
}