Skip to main content

Update Vendor

Update an existing vendor's information. All fields are optional; only provided fields will be updated.

PUThttps://api.zenpayz.com/merchant/api/v1/vendors/:id
Bearer · API key

Request

Headers

HeaderDescription
Authorization
REQUIRED
Bearer {api_key}
X-Signature
REQUIRED
HMAC-SHA256 signature
X-Timestamp
REQUIRED
ISO 8601 timestamp
X-Secret-Salt
REQUIRED
Secret salt for HMAC validation
Content-Type
REQUIRED
application/json

Path Parameters

ParameterTypeDescription
id
REQUIRED
stringVendor ID (e.g., vnd_a1b2c3d4e5f6g7h8)

Body Parameters

ParameterTypeDescription
name
OPTIONAL
stringVendor display name
description
OPTIONAL
stringVendor description
email
OPTIONAL
stringVendor email address (must be valid email)
phone
OPTIONAL
stringVendor phone number
website
OPTIONAL
stringVendor website URL
status
OPTIONAL
stringStatus (active, inactive, suspended, pending)
contactInfo
OPTIONAL
objectContact information object
businessInfo
OPTIONAL
objectBusiness information
commissionRate
OPTIONAL
numberCommission rate (0-100)
commissionType
OPTIONAL
stringCommission model (percentage, fixed, tiered)
commissionConfig
OPTIONAL
objectAdditional commission configuration
riskLevel
OPTIONAL
stringRisk classification (low, medium, high, critical)
payoutFrequency
OPTIONAL
stringPayout schedule (weekly, monthly, quarterly)
bankDetails
OPTIONAL
objectBank account for payouts
environment
OPTIONAL
stringEnvironment identifier
metadata
OPTIONAL
objectCustom key-value pairs

Response

Success (200 OK)

{
"success": true,
"data": {
"vendorId": "vnd_a1b2c3d4e5f6g7h8",
"name": "Acme Referrals",
"description": "Updated partner description",
"email": "partners@acmereferrals.com",
"phone": "+14155559999",
"website": "https://acmereferrals.com",
"status": "active",
"contactInfo": {
"primaryContact": {
"firstName": "Sarah",
"lastName": "Chen",
"email": "sarah.chen@acmereferrals.com",
"phone": "+14155551235",
"designation": "VP of Partnerships"
},
"address": {
"street": "100 Market Street",
"city": "San Francisco",
"state": "CA",
"postalCode": "94105",
"country": "US"
}
},
"businessInfo": {
"registrationNumber": "REG-2024-78901",
"taxId": "87-6543210",
"businessType": "LLC",
"incorporationDate": "2020-03-15",
"monthlyVolume": 750000
},
"commissionRate": 15.0,
"commissionType": "percentage",
"commissionConfig": null,
"riskLevel": "low",
"payoutFrequency": "monthly",
"bankDetails": {
"accountNumber": "****6789",
"routingNumber": "****4321",
"bankName": "First National Bank",
"swiftCode": "FNBKUS33",
"beneficiaryName": "Acme Referrals LLC",
"accountType": "current",
"payoutType": "wire"
},
"environment": "production",
"metadata": {},
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-03-21T11:00:00.000Z"
},
"message": "Vendor updated successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-03-21T11:00:00.000Z",
"processing_time_ms": 110,
"api_version": "v1",
"endpoint": "PUT /vendors/:id",
"user_type": "merchant"
}
}

Error Responses

CodeHTTPMessage
VALIDATION_ERROR400Invalid request parameters
UNAUTHORIZED401Invalid API key
VENDOR_NOT_FOUND404Vendor with specified ID does not exist
DUPLICATE_VENDOR409Another vendor with this email already exists

Examples

curl -X PUT https://api.zenpayz.com/merchant/api/v1/vendors/vnd_a1b2c3d4e5f6g7h8 \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-03-21T11:00:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt" \
-H "Content-Type: application/json" \
-d '{
"commissionRate": 15.0,
"phone": "+14155559999",
"businessInfo": {
"monthlyVolume": 750000
},
"contactInfo": {
"primaryContact": {
"designation": "VP of Partnerships"
}
}
}'