> For the complete documentation index, see [llms.txt](https://talque.gitbook.io/public/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://talque.gitbook.io/public/webhooks/vendors/update.md).

# Update

## Update vendor

<mark style="color:green;">`POST`</mark> `https://www.talque.com/webhook/org/:orgId/vendor/update`

This endpoint allows you to update vendor. Either the `extId` or the `vendorId` field must be present to identify which vendor to update. If both are present then the `extId` field of the specified vendor is updated.\
\
Apart from having to specify the ID (either internal or external), all other parameters are optional. Fields that are not included remain unchanged by the webhook call.\
\
The parameters marked with **COMING SOON:** are not yet implemented.

You can find a basic example at <https://github.com/talque/webhook-samples/blob/main/src/vendor/update.py>

#### Request Body

| Name            | Type           | Description                                                                                             |
| --------------- | -------------- | ------------------------------------------------------------------------------------------------------- |
| extId           | string         | External ID of the vendor to update                                                                     |
| vendorId        | string         | Internal (talque) ID of the vendor to update.                                                           |
| name            | object         | Vendor name (translated text)                                                                           |
| description     | object         | A translated text                                                                                       |
| customData      | object         | **COMING SOON:** A custom data object                                                                   |
| exhibitor       | string         | The exhibitor category. Can be null.                                                                    |
| sponsor         | string         | The sponsor category. Can be null.                                                                      |
| businessAreas   | array          | The vendor filter tags                                                                                  |
| email           | string         | Company contact email address                                                                           |
| phone           | string         | Company contact phone number                                                                            |
| hall            | string         | Booth hall ID                                                                                           |
| booth           | string         | Booth ID                                                                                                |
| address         | string         | Company street address                                                                                  |
| zipCode         | string         | Company ZIP code                                                                                        |
| city            | string         | Company city                                                                                            |
| country         | string         | Company country: a value of country enum                                                                |
| facebook        | string         | Company Facebook profile URL                                                                            |
| linkedin        | string         | Company LinkedIn profile URL                                                                            |
| twitter         | string         | Company Twitter profile URL                                                                             |
| xing            | string         | Company Xing profile URL                                                                                |
| instagram       | string         | Company Instagram URL                                                                                   |
| website         | string         | Company website URL                                                                                     |
| photo           | string \| null | A temp file ID, or null to delete                                                                       |
| backgroundImage | string \| null | A temp file ID, or null to delete                                                                       |
| staff           | string\[]      | Company staff members as a [list of profile ids](/public/webhooks/users.md) (existing profile required) |
| staffPending    | string\[]      | Company staff members that have not joined yet as a [list of account ids](/public/webhooks/users.md)    |
| admins          | string\[]      | A [list of account ids](/public/webhooks/users.md) of admins                                            |
| isSelfSelect    | boolean        | **COMING SOON:** A boolean value                                                                        |
| staffCanMeet    | boolean        | **COMING SOON:** A boolean value                                                                        |
| staffCanChat    | boolean        | **COMING SOON:** A boolean value                                                                        |
| locale          | string         | A value of locale enum, see the [supported values](/public/json-api/general/locales-and-text.md)        |
| video           | object         | A translated text object with the video URLs                                                            |
| gallery         | object         | A gallery change object                                                                                 |
| clearGallery    | boolean        | Whether to delete all gallery objects that are not referenced                                           |
| portfolio       | object         | A portfolio change object                                                                               |
| clearPortfolio  | boolean        | Whether to delete all portfolio objects that are not referenced                                         |
| marks           | string\[]      | A list of vendor tags                                                                                   |
| perks           | string\[]      | A list of perk ids                                                                                      |
| main            | string\[]      | A list of vendor IDs                                                                                    |
| adminName       | object         | A translated text for an internal (admin-only) name for the vendor                                      |
| buttons         | array          | Array of `{url, label}` objects for custom buttons to display on the company profile                    |

{% tabs %}
{% tab title="200 Vendor successfully updated" %}

```javascript
{
    "reasonEnum": "UpdateVendorReason",
    "reason": "SUCCESS",
    "vendor": {
        "rating": null,
        "photoMedium": "/_ah/img/encoded_gs_file:cGhvdG8udGFscXVlLmNvbS92ZW5kb3IvY2NDOFFGTklPakhCRUI5YUczZ0ovMTYyNzMyMTEzNC5qcGc=",
        "instagram": "https://instagram.com/foo",
        "vendorId": "ccC8QFNIOjHBEB9aG3gJ",
        "isVipSpot": false,
        "photo": "/_ah/img/encoded_gs_file:cGhvdG8udGFscXVlLmNvbS92ZW5kb3IvY2NDOFFGTklPakhCRUI5YUczZ0ovMTYyNzMyMTEzNC5qcGc=",
        "twitter": "https://twitter/foo",
        "descriptionSource": {
            "DE_DE": "German new",
            "EN_US": "English new"
        },
        "linkedin": "https://linkedin/foo",
        "isPublished": true,
        "vipAnswerRequired": false,
        "video": null,
        "booth": "3",
        "mtime": 1627321434073,
        "portfolio": {
            "items": [],
            "config": {
                "document": 0,
                "limit": 0
            }
        },
        "staff": [
            "IsPclKMCQ95K51qDk192",
            "RyKgC5yP5OLLoiWPILMy"
        ],
        "city": "Newcity",
        "xing": "https://xing.de/foo",
        "name": "Newname",
        "vipQuestionSource": {},
        "admins": [
            "RPUDoQPRShPX5QgOpeiH"
        ],
        "hall": "8",
        "buttons": [],
        "locale": "EN_US",
        "subjects": [],
        "backgroundImage": null,
        "marks": [],
        "vipCategories": [],
        "main": [],
        "email": "vendor@debug.foo",
        "vipSpots": [],
        "businessAreas": [],
        "website": "https://new.debug.foo/bar/baz.html",
        "isInLeadList": false,
        "vendor": "exhib",
        "description": "<div class='msg_div'>\n<p class='msg_p'>English new</p>\n</div>",
        "form": {
            "instagram": null,
            "photo": null,
            "twitter": null,
            "descriptionSource": {},
            "linkedin": null,
            "mtime": 0,
            "city": null,
            "xing": null,
            "backgroundImage": null,
            "editor": null,
            "email": null,
            "website": "",
            "citySource": {},
            "description": null,
            "zipCode": null,
            "phone": null,
            "facebook": null,
            "address": null,
            "name": null,
            "country": "",
            "countrySource": null,
            "nameSource": {}
        },
        "portfolioSource": {
            "items": [],
            "config": {
                "document": 0,
                "limit": 0
            }
        },
        "customData": {
            "data": [
                {
                    "type": "StringData",
                    "id": "iNzycByOV1bulbPt41kE",
                    "value": "Bamberg"
                },
                {
                    "vendorId": "K1F4CbMn49B3xJ1I3I3B",
                    "filename": "logo.eps",
                    "previewUrl": "http://path/to/preview.jpg",
                    "fileId": "YdvGQQr7nzq20b7jYVbM",
                    "type": "VendorFileData",
                    "id": "rZQCVQRxx2XUrq05ZCbs",
                    "tempFileId": null
                },
                {
                    "type": "IntegerData",
                    "id": "EjbS2j0lB4Rhikfptaxk",
                    "value": 99
                }
            ]
        },
        "quota": {
            "speakerFormCredits": 1,
            "directCall": false,
            "products": [],
            "dashboard": false,
            "markLimits": [],
            "leadList": {
                "profile": false,
                "portfolio": false,
                "gallery": false,
                "chat": false
            }
        },
        "zipCode": "54321",
        "phone": "555 555-5555",
        "facebook": "https://facebook/foo",
        "staffCanMeet": true,
        "vipQuestion": null,
        "address": "Newstr 20",
        "gallery": {
            "items": [],
            "config": {
                "limit": 0,
                "embed": 0,
                "video": 0,
                "image": 0
            }
        },
        "needsApproval": false,
        "isSelfSelect": true,
        "hasVipSpot": false,
        "ctime": 1627321134073,
        "country": "United States",
        "staffCanChat": true,
        "speakerFormCredits": 1,
        "citySource": {
            "EN_US": "Newcity"
        },
        "isSpeakerFormInvitationSent": false,
        "ownRating": 42,
        "extId": null,
        "countrySource": "US",
        "perks": [],
        "isFormInvitationSent": false,
        "nameSource": {
            "EN_US": "Newname"
        },
        "isLectureFormInvitationSent": false,
        "sponsor": "gold"
    },
    "channel": {
        "notification": null,
        "messages": [
            {
                "data": {
                    "orgId": "Y52ccThbN4RjsTLljTu5",
                    "vendorIdList": [
                        "ccC8QFNIOjHBEB9aG3gJ"
                    ]
                },
                "messageType": "VENDOR_CHANGE"
            }
        ],
        "sender": {
            "sessionId": "ZjJD06EBHyZYdT9sYsBy",
            "accountId": "lhSAV55zl23Wr07aWDmh"
        },
        "sortKey": "1wD9B8k8iOQ",
        "time": 1627321134269
    },
    "success": true
}
```

{% endtab %}
{% endtabs %}

### Example Request

```javascript
{
  "address": "Newstr 20",
  "admins": [
    "RPUDoQPRShPX5QgOpeiH"
  ],
  "booth": "3",
  "city": {
    "EN_US": "Newcity"
  },
  "country": "US",
  "description": {
    "DE_DE": "German new",
    "EN_US": "English new"
  },
  "email": "vendor@debug.foo",
  "facebook": "https://facebook/foo",
  "hall": "8",
  "instagram": "https://instagram.com/foo",
  "linkedin": "https://linkedin/foo",
  "name": {
    "EN_US": "Newname"
  },
  "phone": "555 555-5555",
  "photo": "MiuWhICsJxcCOiSsVTJL",
  "sponsor": "gold",
  "twitter": "https://twitter/foo",
  "vendor": "exhib",
  "vendorId": "ccC8QFNIOjHBEB9aG3gJ",
  "website": "https://new.debug.foo/bar/baz.html",
  "xing": "https://xing.de/foo",
  "zipCode": "54321"
}
```
