> This page is for version v6.0 (default).
> For other versions, use one of these documentation indexes:
> - v6.0 (default): https://docs.zip.tax/v-6-0/llms.txt
> - v5.0: https://docs.zip.tax/v-5-0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.zip.tax/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.zip.tax/_mcp/server.

# Update Merchant

POST https://api.zip-tax.com/merchant/update
Content-Type: application/json

Available on Pro and Enterprise PlansUpdates a merchant's details, its compliance model, or both.Send `update` to change the merchant's name and contact details, `setMerchantType` to switch the merchant between the `taxcloud` and `self-managed` compliance models, or both together. At least one of the two is required.Switching the compliance model sets the merchant's `status`:| `setMerchantType` | Resulting `status`                                                   |
| ----------------- | -------------------------------------------------------------------- |
| `taxcloud`        | `taxcloud_invited`, and a TaxCloud invite is emailed to the merchant |
| `self-managed`    | `external_compliance`                                                |**Switching to `self-managed` disconnects the merchant from TaxCloud.** Their stored TaxCloud credentials are removed, so the order, exemption certificate, and refund endpoints return 403 for them and cart calculation switches to Ziptax's own rate engine. Reconnecting later means switching back to `taxcloud` and setting their credentials again with Set Merchant Credentials.Sending the compliance model a merchant already has changes nothing and does not re-send the invite, so a request is safe to repeat.You can only update merchants that belong to your account. Requests for any other merchant, or for one that has been deleted, return 403.

Reference: https://docs.zip.tax/api-reference/merchant/update-merchant

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header

## Request

### Body (application/json)

This endpoint expects an object.

- `merchantId` (string, required) — UUID of the merchant to update. The merchant must be owned by the calling account.
- `sendTaxcloudInvite` (boolean, optional) — Whether to email the merchant a TaxCloud invite when this request switches them to 'taxcloud'. Defaults to true. It has no effect on a request that does not change the compliance model, so repeating a request will not invite the merchant twice. The invite goes to the merchant's stored contactEmail; include an 'update' block to change that address first. A merchant with no contact email cannot be invited.
- `setMerchantType` (enum, optional) — Switches the merchant to a different compliance model. Use 'taxcloud' to have TaxCloud handle the merchant's registration, filing, and remittance: their status becomes 'taxcloud_invited' and they are emailed an invite. Use 'self-managed' to hand compliance back to the merchant: their status becomes 'external_compliance' and their stored TaxCloud credentials are removed. 'connected' and 'offline' are deprecated names for 'taxcloud' and 'self-managed'. Sending the merchant's current model changes nothing. Omit this field to leave the compliance model as it is.
  - Allowed values: `taxcloud`, `self-managed`, `connected`, `offline`
- `update` (UpdateStruct, optional) — New values for the merchant's name and contact details. Every field in this block is replaced, so send the current value for anything you do not want to clear. Omit the block to change only the compliance model.

## Response

### 200

OK

- `merchantId` (string, required) — UUID of the updated merchant.
- `message` (string, required) — Human-readable description of the result.
- `status` (string, required) — Result status of the operation (e.g. 'success').

## Errors

### 400 Update Merchant Body Bad Request Error

Bad Request

- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ErrorDetail, optional) — List of individual error details
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `status` (long, optional) — HTTP status code
- `title` (string, optional) — A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
- `type` (string, optional, default: about:blank) — A URI reference to human-readable documentation for the error.

### 401 Update Merchant Body Unauthorized Error

Unauthorized

- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ErrorDetail, optional) — List of individual error details
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `status` (long, optional) — HTTP status code
- `title` (string, optional) — A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
- `type` (string, optional, default: about:blank) — A URI reference to human-readable documentation for the error.

### 403 Update Merchant Body Forbidden Error

Forbidden

- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ErrorDetail, optional) — List of individual error details
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `status` (long, optional) — HTTP status code
- `title` (string, optional) — A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
- `type` (string, optional, default: about:blank) — A URI reference to human-readable documentation for the error.

### 404 Update Merchant Body Not Found Error

Not Found

- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ErrorDetail, optional) — List of individual error details
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `status` (long, optional) — HTTP status code
- `title` (string, optional) — A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
- `type` (string, optional, default: about:blank) — A URI reference to human-readable documentation for the error.

### 409 Update Merchant Body Conflict Error

Conflict

- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ErrorDetail, optional) — List of individual error details
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `status` (long, optional) — HTTP status code
- `title` (string, optional) — A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
- `type` (string, optional, default: about:blank) — A URI reference to human-readable documentation for the error.

### 422 Update Merchant Body Unprocessable Entity Error

Unprocessable Entity

- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ErrorDetail, optional) — List of individual error details
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `status` (long, optional) — HTTP status code
- `title` (string, optional) — A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
- `type` (string, optional, default: about:blank) — A URI reference to human-readable documentation for the error.

### 500 Update Merchant Body Internal Server Error

Internal Server Error

- `detail` (string, optional) — A human-readable explanation specific to this occurrence of the problem.
- `errors` (list of ErrorDetail, optional) — List of individual error details
- `instance` (string, optional) — A URI reference that identifies the specific occurrence of the problem.
- `status` (long, optional) — HTTP status code
- `title` (string, optional) — A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
- `type` (string, optional, default: about:blank) — A URI reference to human-readable documentation for the error.

## Types

### UpdateStruct

- `merchantName` (string, required) — New legal or trading name of the merchant business. Required; must be 1–255 characters.
- `contactEmail` (string, optional) — Updated email address of the merchant's primary contact.
- `contactFirst` (string, optional) — Updated first name of the merchant's primary contact.
- `contactLast` (string, optional) — Updated last name of the merchant's primary contact.
- `referenceId` (string, optional) — The ID you use in your own system to identify this merchant.

### ErrorDetail

- `location` (string, optional) — Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
- `message` (string, optional) — Error message text
- `value` (any, optional) — The value at the given location

## Examples

### Change a merchant's details

**Request**

```json
{
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "update": {
    "merchantName": "Blue Ridge Outfitters",
    "contactEmail": "dana@blueridgeoutfitters.example",
    "contactFirst": "Dana",
    "contactLast": "Reyes",
    "referenceId": "seller-4417"
  }
}
```

**Response**

```json
{
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "message": "merchant updated successfully",
  "status": "success"
}
```

**SDK Code**

```python Change a merchant's details
import requests

url = "https://api.zip-tax.com/merchant/update"

payload = {
    "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
    "update": {
        "merchantName": "Blue Ridge Outfitters",
        "contactEmail": "dana@blueridgeoutfitters.example",
        "contactFirst": "Dana",
        "contactLast": "Reyes",
        "referenceId": "seller-4417"
    }
}
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Change a merchant's details
const url = 'https://api.zip-tax.com/merchant/update';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"merchantId":"2c0534ea-eb8a-4732-9cdb-2476f244029d","update":{"merchantName":"Blue Ridge Outfitters","contactEmail":"dana@blueridgeoutfitters.example","contactFirst":"Dana","contactLast":"Reyes","referenceId":"seller-4417"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Change a merchant's details
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.zip-tax.com/merchant/update"

	payload := strings.NewReader("{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"update\": {\n    \"merchantName\": \"Blue Ridge Outfitters\",\n    \"contactEmail\": \"dana@blueridgeoutfitters.example\",\n    \"contactFirst\": \"Dana\",\n    \"contactLast\": \"Reyes\",\n    \"referenceId\": \"seller-4417\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Change a merchant's details
require 'uri'
require 'net/http'

url = URI("https://api.zip-tax.com/merchant/update")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"update\": {\n    \"merchantName\": \"Blue Ridge Outfitters\",\n    \"contactEmail\": \"dana@blueridgeoutfitters.example\",\n    \"contactFirst\": \"Dana\",\n    \"contactLast\": \"Reyes\",\n    \"referenceId\": \"seller-4417\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Change a merchant's details
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.zip-tax.com/merchant/update")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"update\": {\n    \"merchantName\": \"Blue Ridge Outfitters\",\n    \"contactEmail\": \"dana@blueridgeoutfitters.example\",\n    \"contactFirst\": \"Dana\",\n    \"contactLast\": \"Reyes\",\n    \"referenceId\": \"seller-4417\"\n  }\n}")
  .asString();
```

```php Change a merchant's details
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.zip-tax.com/merchant/update', [
  'body' => '{
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "update": {
    "merchantName": "Blue Ridge Outfitters",
    "contactEmail": "dana@blueridgeoutfitters.example",
    "contactFirst": "Dana",
    "contactLast": "Reyes",
    "referenceId": "seller-4417"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Change a merchant's details
using RestSharp;

var client = new RestClient("https://api.zip-tax.com/merchant/update");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"update\": {\n    \"merchantName\": \"Blue Ridge Outfitters\",\n    \"contactEmail\": \"dana@blueridgeoutfitters.example\",\n    \"contactFirst\": \"Dana\",\n    \"contactLast\": \"Reyes\",\n    \"referenceId\": \"seller-4417\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Change a merchant's details
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "update": [
    "merchantName": "Blue Ridge Outfitters",
    "contactEmail": "dana@blueridgeoutfitters.example",
    "contactFirst": "Dana",
    "contactLast": "Reyes",
    "referenceId": "seller-4417"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.zip-tax.com/merchant/update")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Move a self-managed merchant to TaxCloud

**Request**

```json
{
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "sendTaxcloudInvite": true,
  "setMerchantType": "taxcloud"
}
```

**Response**

```json
{
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "message": "merchant updated successfully",
  "status": "success"
}
```

**SDK Code**

```python Move a self-managed merchant to TaxCloud
import requests

url = "https://api.zip-tax.com/merchant/update"

payload = {
    "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
    "sendTaxcloudInvite": True,
    "setMerchantType": "taxcloud"
}
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Move a self-managed merchant to TaxCloud
const url = 'https://api.zip-tax.com/merchant/update';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"merchantId":"2c0534ea-eb8a-4732-9cdb-2476f244029d","sendTaxcloudInvite":true,"setMerchantType":"taxcloud"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Move a self-managed merchant to TaxCloud
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.zip-tax.com/merchant/update"

	payload := strings.NewReader("{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"sendTaxcloudInvite\": true,\n  \"setMerchantType\": \"taxcloud\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Move a self-managed merchant to TaxCloud
require 'uri'
require 'net/http'

url = URI("https://api.zip-tax.com/merchant/update")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"sendTaxcloudInvite\": true,\n  \"setMerchantType\": \"taxcloud\"\n}"

response = http.request(request)
puts response.read_body
```

```java Move a self-managed merchant to TaxCloud
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.zip-tax.com/merchant/update")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"sendTaxcloudInvite\": true,\n  \"setMerchantType\": \"taxcloud\"\n}")
  .asString();
```

```php Move a self-managed merchant to TaxCloud
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.zip-tax.com/merchant/update', [
  'body' => '{
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "sendTaxcloudInvite": true,
  "setMerchantType": "taxcloud"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Move a self-managed merchant to TaxCloud
using RestSharp;

var client = new RestClient("https://api.zip-tax.com/merchant/update");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"sendTaxcloudInvite\": true,\n  \"setMerchantType\": \"taxcloud\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Move a self-managed merchant to TaxCloud
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "sendTaxcloudInvite": true,
  "setMerchantType": "taxcloud"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.zip-tax.com/merchant/update")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Move to TaxCloud and invite a different address

**Request**

```json
{
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "setMerchantType": "taxcloud",
  "update": {
    "merchantName": "Blue Ridge Outfitters",
    "contactEmail": "dana@blueridgeoutfitters.example",
    "contactFirst": "Dana",
    "contactLast": "Reyes"
  }
}
```

**Response**

```json
{
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "message": "merchant updated successfully",
  "status": "success"
}
```

**SDK Code**

```python Move to TaxCloud and invite a different address
import requests

url = "https://api.zip-tax.com/merchant/update"

payload = {
    "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
    "setMerchantType": "taxcloud",
    "update": {
        "merchantName": "Blue Ridge Outfitters",
        "contactEmail": "dana@blueridgeoutfitters.example",
        "contactFirst": "Dana",
        "contactLast": "Reyes"
    }
}
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Move to TaxCloud and invite a different address
const url = 'https://api.zip-tax.com/merchant/update';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"merchantId":"2c0534ea-eb8a-4732-9cdb-2476f244029d","setMerchantType":"taxcloud","update":{"merchantName":"Blue Ridge Outfitters","contactEmail":"dana@blueridgeoutfitters.example","contactFirst":"Dana","contactLast":"Reyes"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Move to TaxCloud and invite a different address
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.zip-tax.com/merchant/update"

	payload := strings.NewReader("{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"setMerchantType\": \"taxcloud\",\n  \"update\": {\n    \"merchantName\": \"Blue Ridge Outfitters\",\n    \"contactEmail\": \"dana@blueridgeoutfitters.example\",\n    \"contactFirst\": \"Dana\",\n    \"contactLast\": \"Reyes\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Move to TaxCloud and invite a different address
require 'uri'
require 'net/http'

url = URI("https://api.zip-tax.com/merchant/update")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"setMerchantType\": \"taxcloud\",\n  \"update\": {\n    \"merchantName\": \"Blue Ridge Outfitters\",\n    \"contactEmail\": \"dana@blueridgeoutfitters.example\",\n    \"contactFirst\": \"Dana\",\n    \"contactLast\": \"Reyes\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Move to TaxCloud and invite a different address
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.zip-tax.com/merchant/update")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"setMerchantType\": \"taxcloud\",\n  \"update\": {\n    \"merchantName\": \"Blue Ridge Outfitters\",\n    \"contactEmail\": \"dana@blueridgeoutfitters.example\",\n    \"contactFirst\": \"Dana\",\n    \"contactLast\": \"Reyes\"\n  }\n}")
  .asString();
```

```php Move to TaxCloud and invite a different address
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.zip-tax.com/merchant/update', [
  'body' => '{
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "setMerchantType": "taxcloud",
  "update": {
    "merchantName": "Blue Ridge Outfitters",
    "contactEmail": "dana@blueridgeoutfitters.example",
    "contactFirst": "Dana",
    "contactLast": "Reyes"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Move to TaxCloud and invite a different address
using RestSharp;

var client = new RestClient("https://api.zip-tax.com/merchant/update");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"setMerchantType\": \"taxcloud\",\n  \"update\": {\n    \"merchantName\": \"Blue Ridge Outfitters\",\n    \"contactEmail\": \"dana@blueridgeoutfitters.example\",\n    \"contactFirst\": \"Dana\",\n    \"contactLast\": \"Reyes\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Move to TaxCloud and invite a different address
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "setMerchantType": "taxcloud",
  "update": [
    "merchantName": "Blue Ridge Outfitters",
    "contactEmail": "dana@blueridgeoutfitters.example",
    "contactFirst": "Dana",
    "contactLast": "Reyes"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.zip-tax.com/merchant/update")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Move a merchant to self-managed

**Request**

```json
{
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "setMerchantType": "self-managed"
}
```

**Response**

```json
{
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "message": "merchant updated successfully",
  "status": "success"
}
```

**SDK Code**

```python Move a merchant to self-managed
import requests

url = "https://api.zip-tax.com/merchant/update"

payload = {
    "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
    "setMerchantType": "self-managed"
}
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Move a merchant to self-managed
const url = 'https://api.zip-tax.com/merchant/update';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"merchantId":"2c0534ea-eb8a-4732-9cdb-2476f244029d","setMerchantType":"self-managed"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Move a merchant to self-managed
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.zip-tax.com/merchant/update"

	payload := strings.NewReader("{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"setMerchantType\": \"self-managed\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Move a merchant to self-managed
require 'uri'
require 'net/http'

url = URI("https://api.zip-tax.com/merchant/update")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"setMerchantType\": \"self-managed\"\n}"

response = http.request(request)
puts response.read_body
```

```java Move a merchant to self-managed
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.zip-tax.com/merchant/update")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"setMerchantType\": \"self-managed\"\n}")
  .asString();
```

```php Move a merchant to self-managed
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.zip-tax.com/merchant/update', [
  'body' => '{
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "setMerchantType": "self-managed"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Move a merchant to self-managed
using RestSharp;

var client = new RestClient("https://api.zip-tax.com/merchant/update");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"merchantId\": \"2c0534ea-eb8a-4732-9cdb-2476f244029d\",\n  \"setMerchantType\": \"self-managed\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Move a merchant to self-managed
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "merchantId": "2c0534ea-eb8a-4732-9cdb-2476f244029d",
  "setMerchantType": "self-managed"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.zip-tax.com/merchant/update")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```