<!-- ZenPays documentation · https://docs.zenpayz.com/docs/rest-api/endpoints/vendors/get-vendor -->

# Get Vendor

Retrieve detailed information about a specific vendor by their ID.

<EndpointHeader verb="GET" path="/merchant/api/v1/vendors/:id" />

## Request

### Headers

<ParamTable
  label="Header"
  rows={[
    { name: "Authorization", required: true, desc: "`Bearer {api_key}`" },
    { name: "X-Signature", required: true, desc: "HMAC-SHA256 signature" },
    { name: "X-Timestamp", required: true, desc: "ISO 8601 timestamp" },
    { name: "X-Secret-Salt", required: true, desc: "Secret salt for HMAC validation" },
    { name: "Content-Type", required: true, desc: "`application/json`" },
  ]}
/>

### Path Parameters

<ParamTable
  rows={[
    { name: "id", type: "string", required: true, desc: "Vendor ID (e.g., `vnd_a1b2c3d4e5f6g7h8`)" },
  ]}
/>

## Response

### Success (200 OK)

```json
{
  "success": true,
  "data": {
    "vendorId": "vnd_a1b2c3d4e5f6g7h8",
    "name": "Acme Referrals",
    "description": "Strategic referral partner for APAC region",
    "email": "partners@acmereferrals.com",
    "phone": "+14155551234",
    "website": "https://acmereferrals.com",
    "status": "active",
    "contactInfo": {
      "primaryContact": {
        "firstName": "Sarah",
        "lastName": "Chen",
        "email": "sarah.chen@acmereferrals.com",
        "phone": "+14155551235",
        "designation": "Partnerships Director"
      },
      "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": 500000
    },
    "commissionRate": 12.5,
    "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"
    },
    "totalReferrals": 45,
    "activeReferrals": 38,
    "totalCommissionEarned": 15230.50,
    "kycStatus": "verified",
    "environment": "production",
    "metadata": {},
    "createdAt": "2024-01-15T10:30:00.000Z",
    "updatedAt": "2024-03-20T14:15:00.000Z"
  },
  "message": "Vendor retrieved successfully",
  "error": null,
  "meta": {
    "request_id": "req_xxxxx",
    "timestamp": "2024-03-21T10:30:00.000Z",
    "processing_time_ms": 65,
    "api_version": "v1",
    "endpoint": "GET /vendors/:id",
    "user_type": "merchant"
  }
}
```

### Error Responses

<ErrorTable
  rows={[
    { code: "UNAUTHORIZED", status: "401", message: "Invalid API key" },
    { code: "VENDOR_NOT_FOUND", status: "404", message: "Vendor with specified ID does not exist" },
  ]}
/>

<CodeRail>

## Examples

<Tabs groupId="language">
  <TabItem value="curl" label="cURL" default>

```bash
curl -X GET https://api.zenpayz.com/merchant/api/v1/vendors/vnd_a1b2c3d4e5f6g7h8 \
  -H "Authorization: Bearer zp_test_xxxxx" \
  -H "X-Timestamp: 2024-03-21T10:30:00.000Z" \
  -H "X-Signature: a1b2c3d4e5f6..." \
  -H "X-Secret-Salt: your_secret_salt" \
  -H "Content-Type: application/json"
```

  </TabItem>
  <TabItem value="javascript" label="JavaScript">

```javascript
const response = await fetch('https://api.zenpayz.com/merchant/api/v1/vendors/vnd_a1b2c3d4e5f6g7h8', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'X-Timestamp': timestamp,
    'X-Signature': signature,
    'X-Secret-Salt': secretSalt,
    'Content-Type': 'application/json',
  },
});

const result = await response.json();
console.log(result.data.name); // Acme Referrals
console.log(result.data.commissionRate); // 12.5
```

  </TabItem>
  <TabItem value="sdk" label="SDK">

```javascript
const vendor = await zenpays.vendors.retrieve('vnd_a1b2c3d4e5f6g7h8');

console.log(vendor.name); // Acme Referrals
console.log(vendor.commissionRate); // 12.5
```

  </TabItem>
</Tabs>

</CodeRail>

## Related Endpoints

- [List Vendors](/docs/rest-api/endpoints/vendors/list-vendors)
- [Update Vendor](/docs/rest-api/endpoints/vendors/update-vendor)
- [Vendor Commissions](/docs/rest-api/endpoints/vendors/vendor-commissions)
- [Vendor Analytics](/docs/rest-api/endpoints/vendors/vendor-analytics)
