# Update seller

- Sandbox: `PUT https://sandbox.payme.io/api/public/sellers/{sellerId}/update`
- Production: `PUT https://live.payme.io/api/public/sellers/{sellerId}/update`

## Credentials

- Header `Authorization: Bearer <token>`

Update existing seller details. Supports partial updates with Israeli compliance re-validation for modified fields.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `sellerId` | path | string | yes | Seller UUID |

## Request body

Content type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `firstName` | string | no | Seller's first name |
| `lastName` | string | no | Seller's last name |
| `email` | string | no | Primary email address |
| `contactEmail` | string | no | Business contact email |
| `phone` | string | no | Phone number in international format |
| `businessName` | string | no | Legal business name |
| `businessType` | integer | no | Israeli business type classification |
| `businessNumber` | string | no | Israeli business registration number |
| `socialId` | string | no | Israeli ID number |
| `bankId` | string | no | Israeli bank code |
| `accountNumber` | string | no | Bank account number |
| `branchNumber` | string | no | Bank branch number |
| `logo` | string | no | Business logo as base64 encoded data URI |

### Request example

```json
{
  "firstName": "David",
  "lastName": "Cohen",
  "email": "david.cohen1115@example.com",
  "contactEmail": "business@cohenelectronics.co.il",
  "phone": "+972541234500",
  "businessName": "Cohen Electronics",
  "businessType": 2,
  "businessNumber": "330988015",
  "socialId": "336907282",
  "bankId": "12",
  "accountNumber": "123456789012345",
  "branchNumber": "123",
  "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
```

## Code samples

### curl

```bash
curl -X PUT 'https://sandbox.payme.io/api/public/sellers/<sellerId>/update' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <YOUR_TOKEN>' \
  --data-raw '{
  "firstName": "David",
  "lastName": "Cohen",
  "email": "david.cohen1115@example.com",
  "contactEmail": "business@cohenelectronics.co.il",
  "phone": "+972541234500",
  "businessName": "Cohen Electronics",
  "businessType": 2,
  "businessNumber": "330988015",
  "socialId": "336907282",
  "bankId": "12",
  "accountNumber": "123456789012345",
  "branchNumber": "123",
  "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}'
```

### Node.js

```javascript
const response = await fetch("https://sandbox.payme.io/api/public/sellers/<sellerId>/update", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer <YOUR_TOKEN>",
  },
  body: JSON.stringify({
    "firstName": "David",
    "lastName": "Cohen",
    "email": "david.cohen1115@example.com",
    "contactEmail": "business@cohenelectronics.co.il",
    "phone": "+972541234500",
    "businessName": "Cohen Electronics",
    "businessType": 2,
    "businessNumber": "330988015",
    "socialId": "336907282",
    "bankId": "12",
    "accountNumber": "123456789012345",
    "branchNumber": "123",
    "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
  }),
});

console.log(await response.text());
```

### Python

```python
import requests

response = requests.put(
    "https://sandbox.payme.io/api/public/sellers/<sellerId>/update",
    headers={
        "Authorization": "Bearer <YOUR_TOKEN>",
    },
    json={
        "firstName": "David",
        "lastName": "Cohen",
        "email": "david.cohen1115@example.com",
        "contactEmail": "business@cohenelectronics.co.il",
        "phone": "+972541234500",
        "businessName": "Cohen Electronics",
        "businessType": 2,
        "businessNumber": "330988015",
        "socialId": "336907282",
        "bankId": "12",
        "accountNumber": "123456789012345",
        "branchNumber": "123",
        "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
    },
)

print(response.text)
```

### PHP

```php
<?php

$body = <<<'BODY'
{
  "firstName": "David",
  "lastName": "Cohen",
  "email": "david.cohen1115@example.com",
  "contactEmail": "business@cohenelectronics.co.il",
  "phone": "+972541234500",
  "businessName": "Cohen Electronics",
  "businessType": 2,
  "businessNumber": "330988015",
  "socialId": "336907282",
  "bankId": "12",
  "accountNumber": "123456789012345",
  "branchNumber": "123",
  "logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
BODY;

$ch = curl_init('https://sandbox.payme.io/api/public/sellers/<sellerId>/update');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'Authorization: Bearer <YOUR_TOKEN>',
    ],
    CURLOPT_POSTFIELDS => $body,
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
```

## Responses

### 200 — Seller updated successfully (success)

```json
{}
```

### 400 — Bad Request (error)

| Field | Type | Description |
| --- | --- | --- |
| `statusCode` | integer | HTTP status code |
| `message` | string | Error message(s) |
| `error` | string | Error type |

```json
{
  "statusCode": 400,
  "message": [
    "Validation failed"
  ],
  "error": "Bad Request"
}
```

### 401 — Unauthorized (error)

| Field | Type | Description |
| --- | --- | --- |
| `error` | string |  |
| `error_description` | string |  |

```json
{
  "error": "unauthorized_client",
  "error_description": "Client authentication failed"
}
```

### 404 — Seller not found (error)
