# Update a vendor

Endpoint: PUT /vendors/{id}
Version: 2.0.0
Security: oauth2ClientCredentials

## Path parameters:

  - `id` (string, required)
    Vendor ID

## Header parameters:

  - `org_wallet_ref` (string)
    Organization wallet reference, defaults to "1" if not provided

  - `business_id` (string, required)
    Business identifier for the request

## Request fields (application/json):

  - `phone` (string)
    Vendor phone number
    Example: 712345678

  - `email` (string)
    Vendor email address
    Example: vendor@example.com

  - `contact_name` (string)
    Contact person name
    Example: John Doe

  - `company_name` (string)
    Company name
    Example: Acme Corporation

  - `address` (string)
    Company address
    Example: P.O. Box 12345, Nairobi

  - `description` (string)
    Vendor description
    Example: Office supplies vendor

  - `status` (string)
    Vendor status
    Enum: "ACTIVE", "INACTIVE", "ARCHIVED"

  - `payment_instructions` (array)
    Payment instructions array

  - `payment_instructions._id` (string)
    Payment instruction MongoDB ID (for updates)

  - `payment_instructions.channel` (string, required)
    Payment channel type
    Enum: "mpesa", "mtn", "pochi", "airtel", "xentebanktransfer", "bank", "rtgs", "paybill", "till", "airtime", "internal"

  - `payment_instructions.phone` (string)
    Phone number for mpesa payments
    Example: 712345678

  - `payment_instructions.accno` (string)
    Account number for bank payments
    Example: 1234567890

  - `payment_instructions.bank` (string)
    Bank name
    Example: BANK OF AFRICA K LTD

  - `payment_instructions.bank_code` (string)
    Bank code
    Example: 19

  - `payment_instructions.bankCode` (string)
    Bank code (alternative field)
    Example: 19

  - `payment_instructions.till` (string)
    Till number for till payments
    Example: 123456

  - `payment_instructions.till_no` (string)
    Till number (alternative field)
    Example: 123456

  - `payment_instructions.business_no` (string)
    Business number for paybill payments
    Example: 247247

  - `payment_instructions.is_default` (boolean)
    Whether this is the default payment method
    Example: true

  - `taxID` (string)
    Tax identification number
    Example: P051234567X

  - `read_only` (boolean)
    Whether vendor is read-only
    Example: false

  - `externalId` (string)
    External system ID
    Example: 12345

## Response 200 fields (application/json):

  - `_id` (string)
    Vendor MongoDB ID

  - `phone` (string)
    Vendor phone number

  - `email` (string)
    Vendor email address

  - `contact_name` (string)
    Contact person name

  - `company_name` (string)
    Company name

  - `address` (string)
    Company address

  - `description` (string)
    Vendor description

  - `status` (string)
    Vendor status
    Enum: "ACTIVE", "INACTIVE", "ARCHIVED"

  - `payment_instructions` (array)
    Payment instructions array

  - `payment_instructions._id` (string)
    Payment instruction MongoDB ID

  - `payment_instructions.channel` (string)
    Payment channel type
    Enum: "mpesa", "mtn", "pochi", "airtel", "xentebanktransfer", "bank", "rtgs", "paybill", "till", "airtime", "internal"

  - `payment_instructions.phone` (string)
    Phone number for mpesa payments

  - `payment_instructions.accno` (string)
    Account number for bank payments

  - `payment_instructions.bank` (string)
    Bank name

  - `payment_instructions.bank_code` (string)
    Bank code

  - `payment_instructions.bankCode` (string)
    Bank code (alternative field)

  - `payment_instructions.till` (string)
    Till number for till payments

  - `payment_instructions.business_no` (string)
    Business number for paybill payments

  - `payment_instructions.is_default` (boolean)
    Whether this is the default payment method

  - `taxID` (string)
    Tax identification number

  - `read_only` (boolean)
    Whether vendor is read-only

  - `externalId` (string)
    External system ID

  - `createdAt` (string)
    Created timestamp

  - `updatedAt` (string)
    Updated timestamp

  - `__v` (number)
    Version key

