Skip to main content

Update Vendor Status

Update the status of a specific vendor. Use this endpoint to activate, deactivate, or suspend a vendor.

PATCHhttps://api.zenpayz.com/merchant/api/v1/vendors/:id/status
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
status
REQUIRED
stringNew status (active, inactive, suspended, pending)
reason
OPTIONAL
stringReason for the status change
adminComment
OPTIONAL
stringInternal admin comment

Response

Success (200 OK)

{
"success": true,
"data": {
"vendorId": "vnd_a1b2c3d4e5f6g7h8",
"previousStatus": "active",
"status": "suspended",
"reason": "Compliance review required",
"adminComment": "Flagged during quarterly audit",
"updatedAt": "2024-03-21T14:00:00.000Z"
},
"message": "Vendor status updated successfully",
"error": null,
"meta": {
"request_id": "req_xxxxx",
"timestamp": "2024-03-21T14:00:00.000Z",
"processing_time_ms": 90,
"api_version": "v1",
"endpoint": "PATCH /vendors/:id/status",
"user_type": "merchant"
}
}

Error Responses

CodeHTTPMessage
VALIDATION_ERROR400Invalid status value
UNAUTHORIZED401Invalid API key
VENDOR_NOT_FOUND404Vendor with specified ID does not exist
INVALID_STATUS_TRANSITION409Status transition is not allowed

Examples

curl -X PATCH https://api.zenpayz.com/merchant/api/v1/vendors/vnd_a1b2c3d4e5f6g7h8/status \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-03-21T14:00:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt" \
-H "Content-Type: application/json" \
-d '{
"status": "suspended",
"reason": "Compliance review required",
"adminComment": "Flagged during quarterly audit"
}'