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

# Update

PATCH https://restapi.ordergroove.com/customers/{merchant_user_id}/update
Content-Type: application/json

Updates an individual customer's extra data or locale.

Reference: https://docs.ordergroove.com/reference/rest-rpc-api/customers/update

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: ordergroove-restrpc
  version: 1.0.0
paths:
  /customers/{merchant_user_id}/update:
    patch:
      operationId: update
      summary: Update
      description: Updates an individual customer's extra data or locale.
      tags:
        - customers
      parameters:
        - name: merchant_user_id
          in: path
          description: Merchant User ID
          required: true
          schema:
            type: string
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customers_update_Response_200'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateRequestBadRequestError'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateRequestForbiddenError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                extra_data:
                  type: string
                  description: Customer extra data
                locale:
                  type: string
                  description: >-
                    Customer locale (case insensitive, hyphens and dashes are
                    interchangeable) e.g. 'fr-ca', 'es_ES'
                price_code:
                  type: string
                  description: Customer price code
servers:
  - url: https://restapi.ordergroove.com
    description: https://restapi.ordergroove.com
components:
  schemas:
    CustomersUpdateResponse2000:
      type: object
      properties:
        extra_data:
          type: string
        locale:
          type: string
      title: CustomersUpdateResponse2000
    CustomersUpdateResponse2001:
      type: object
      properties:
        extra_data:
          type: string
        locale:
          type: string
      title: CustomersUpdateResponse2001
    Customers_update_Response_200:
      oneOf:
        - $ref: '#/components/schemas/CustomersUpdateResponse2000'
        - $ref: '#/components/schemas/CustomersUpdateResponse2001'
      title: Customers_update_Response_200
    UpdateRequestBadRequestError0:
      type: object
      properties:
        locale:
          type: array
          items:
            type: string
      title: UpdateRequestBadRequestError0
    UpdateRequestBadRequestError1:
      type: object
      properties:
        extra_data:
          type: array
          items:
            type: string
      title: UpdateRequestBadRequestError1
    UpdateRequestBadRequestError:
      oneOf:
        - $ref: '#/components/schemas/UpdateRequestBadRequestError0'
        - $ref: '#/components/schemas/UpdateRequestBadRequestError1'
      title: UpdateRequestBadRequestError
    UpdateRequestForbiddenError:
      type: object
      properties:
        detail:
          type: string
      title: UpdateRequestForbiddenError
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

```

## Examples

### Result



**Request**

```json
undefined
```

**Response**

```json
{}
```

**SDK Code**

```python Result
import requests

url = "https://restapi.ordergroove.com/customers/merchant_user_id/update"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, headers=headers)

print(response.json())
```

```javascript Result
const url = 'https://restapi.ordergroove.com/customers/merchant_user_id/update';
const options = {
  method: 'PATCH',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

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

```go Result
package main

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

func main() {

	url := "https://restapi.ordergroove.com/customers/merchant_user_id/update"

	req, _ := http.NewRequest("PATCH", url, nil)

	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 Result
require 'uri'
require 'net/http'

url = URI("https://restapi.ordergroove.com/customers/merchant_user_id/update")

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

request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'

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

```java Result
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://restapi.ordergroove.com/customers/merchant_user_id/update")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

```php Result
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://restapi.ordergroove.com/customers/merchant_user_id/update', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Result
using RestSharp;

var client = new RestClient("https://restapi.ordergroove.com/customers/merchant_user_id/update");
var request = new RestRequest(Method.PATCH);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Result
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://restapi.ordergroove.com/customers/merchant_user_id/update")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers

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()
```

### locale: case insensitive, hyphen/dash allowed



**Request**

```json
undefined
```

**Response**

```json
{}
```

**SDK Code**

```python locale: case insensitive, hyphen/dash allowed
import requests

url = "https://restapi.ordergroove.com/customers/merchant_user_id/update"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, headers=headers)

print(response.json())
```

```javascript locale: case insensitive, hyphen/dash allowed
const url = 'https://restapi.ordergroove.com/customers/merchant_user_id/update';
const options = {
  method: 'PATCH',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

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

```go locale: case insensitive, hyphen/dash allowed
package main

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

func main() {

	url := "https://restapi.ordergroove.com/customers/merchant_user_id/update"

	req, _ := http.NewRequest("PATCH", url, nil)

	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 locale: case insensitive, hyphen/dash allowed
require 'uri'
require 'net/http'

url = URI("https://restapi.ordergroove.com/customers/merchant_user_id/update")

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

request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'

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

```java locale: case insensitive, hyphen/dash allowed
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://restapi.ordergroove.com/customers/merchant_user_id/update")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

```php locale: case insensitive, hyphen/dash allowed
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://restapi.ordergroove.com/customers/merchant_user_id/update', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp locale: case insensitive, hyphen/dash allowed
using RestSharp;

var client = new RestClient("https://restapi.ordergroove.com/customers/merchant_user_id/update");
var request = new RestRequest(Method.PATCH);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift locale: case insensitive, hyphen/dash allowed
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://restapi.ordergroove.com/customers/merchant_user_id/update")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers

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()
```

### 200 OK



**Request**

```json
{
  "extra_data": "{\"key\": \"value\"}",
  "locale": "es-ar"
}
```

**Response**

```json
{}
```

**SDK Code**

```python 200 OK
import requests

url = "https://restapi.ordergroove.com/customers/merchant_user_id/update"

payload = {
    "extra_data": "{\"key\": \"value\"}",
    "locale": "es-ar"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript 200 OK
const url = 'https://restapi.ordergroove.com/customers/merchant_user_id/update';
const options = {
  method: 'PATCH',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"extra_data":"{\"key\": \"value\"}","locale":"es-ar"}'
};

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

```go 200 OK
package main

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

func main() {

	url := "https://restapi.ordergroove.com/customers/merchant_user_id/update"

	payload := strings.NewReader("{\n  \"extra_data\": \"{\\\"key\\\": \\\"value\\\"}\",\n  \"locale\": \"es-ar\"\n}")

	req, _ := http.NewRequest("PATCH", 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 200 OK
require 'uri'
require 'net/http'

url = URI("https://restapi.ordergroove.com/customers/merchant_user_id/update")

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

request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"extra_data\": \"{\\\"key\\\": \\\"value\\\"}\",\n  \"locale\": \"es-ar\"\n}"

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

```java 200 OK
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://restapi.ordergroove.com/customers/merchant_user_id/update")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"extra_data\": \"{\\\"key\\\": \\\"value\\\"}\",\n  \"locale\": \"es-ar\"\n}")
  .asString();
```

```php 200 OK
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://restapi.ordergroove.com/customers/merchant_user_id/update', [
  'body' => '{
  "extra_data": "{\\"key\\": \\"value\\"}",
  "locale": "es-ar"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp 200 OK
using RestSharp;

var client = new RestClient("https://restapi.ordergroove.com/customers/merchant_user_id/update");
var request = new RestRequest(Method.PATCH);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"extra_data\": \"{\\\"key\\\": \\\"value\\\"}\",\n  \"locale\": \"es-ar\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 200 OK
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "extra_data": "{\"key\": \"value\"}",
  "locale": "es-ar"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://restapi.ordergroove.com/customers/merchant_user_id/update")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```

### 200 locale: case insensitive, hyphen/dash allowed



**Request**

```json
{
  "locale": "Fr_cA"
}
```

**Response**

```json
{}
```

**SDK Code**

```python 200 locale: case insensitive, hyphen/dash allowed
import requests

url = "https://restapi.ordergroove.com/customers/merchant_user_id/update"

payload = { "locale": "Fr_cA" }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript 200 locale: case insensitive, hyphen/dash allowed
const url = 'https://restapi.ordergroove.com/customers/merchant_user_id/update';
const options = {
  method: 'PATCH',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"locale":"Fr_cA"}'
};

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

```go 200 locale: case insensitive, hyphen/dash allowed
package main

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

func main() {

	url := "https://restapi.ordergroove.com/customers/merchant_user_id/update"

	payload := strings.NewReader("{\n  \"locale\": \"Fr_cA\"\n}")

	req, _ := http.NewRequest("PATCH", 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 200 locale: case insensitive, hyphen/dash allowed
require 'uri'
require 'net/http'

url = URI("https://restapi.ordergroove.com/customers/merchant_user_id/update")

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

request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"locale\": \"Fr_cA\"\n}"

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

```java 200 locale: case insensitive, hyphen/dash allowed
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://restapi.ordergroove.com/customers/merchant_user_id/update")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"locale\": \"Fr_cA\"\n}")
  .asString();
```

```php 200 locale: case insensitive, hyphen/dash allowed
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://restapi.ordergroove.com/customers/merchant_user_id/update', [
  'body' => '{
  "locale": "Fr_cA"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp 200 locale: case insensitive, hyphen/dash allowed
using RestSharp;

var client = new RestClient("https://restapi.ordergroove.com/customers/merchant_user_id/update");
var request = new RestRequest(Method.PATCH);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"locale\": \"Fr_cA\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 200 locale: case insensitive, hyphen/dash allowed
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["locale": "Fr_cA"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://restapi.ordergroove.com/customers/merchant_user_id/update")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```

### 400 Bad Request (locale)



**Request**

```json
{
  "extra_data": "{notJSON",
  "locale": "en-us"
}
```

**Response**

```json
{}
```

**SDK Code**

```python 400 Bad Request (locale)
import requests

url = "https://restapi.ordergroove.com/customers/merchant_user_id/update"

payload = {
    "extra_data": "{notJSON",
    "locale": "en-us"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript 400 Bad Request (locale)
const url = 'https://restapi.ordergroove.com/customers/merchant_user_id/update';
const options = {
  method: 'PATCH',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"extra_data":"{notJSON","locale":"en-us"}'
};

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

```go 400 Bad Request (locale)
package main

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

func main() {

	url := "https://restapi.ordergroove.com/customers/merchant_user_id/update"

	payload := strings.NewReader("{\n  \"extra_data\": \"{notJSON\",\n  \"locale\": \"en-us\"\n}")

	req, _ := http.NewRequest("PATCH", 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 400 Bad Request (locale)
require 'uri'
require 'net/http'

url = URI("https://restapi.ordergroove.com/customers/merchant_user_id/update")

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

request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"extra_data\": \"{notJSON\",\n  \"locale\": \"en-us\"\n}"

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

```java 400 Bad Request (locale)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://restapi.ordergroove.com/customers/merchant_user_id/update")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"extra_data\": \"{notJSON\",\n  \"locale\": \"en-us\"\n}")
  .asString();
```

```php 400 Bad Request (locale)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://restapi.ordergroove.com/customers/merchant_user_id/update', [
  'body' => '{
  "extra_data": "{notJSON",
  "locale": "en-us"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp 400 Bad Request (locale)
using RestSharp;

var client = new RestClient("https://restapi.ordergroove.com/customers/merchant_user_id/update");
var request = new RestRequest(Method.PATCH);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"extra_data\": \"{notJSON\",\n  \"locale\": \"en-us\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 400 Bad Request (locale)
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "extra_data": "{notJSON",
  "locale": "en-us"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://restapi.ordergroove.com/customers/merchant_user_id/update")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```

### 400 Bad Request (extra_data)



**Request**

```json
{
  "extra_data": "{notJSON",
  "locale": "en-us"
}
```

**Response**

```json
{}
```

**SDK Code**

```python 400 Bad Request (extra_data)
import requests

url = "https://restapi.ordergroove.com/customers/merchant_user_id/update"

payload = {
    "extra_data": "{notJSON",
    "locale": "en-us"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript 400 Bad Request (extra_data)
const url = 'https://restapi.ordergroove.com/customers/merchant_user_id/update';
const options = {
  method: 'PATCH',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"extra_data":"{notJSON","locale":"en-us"}'
};

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

```go 400 Bad Request (extra_data)
package main

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

func main() {

	url := "https://restapi.ordergroove.com/customers/merchant_user_id/update"

	payload := strings.NewReader("{\n  \"extra_data\": \"{notJSON\",\n  \"locale\": \"en-us\"\n}")

	req, _ := http.NewRequest("PATCH", 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 400 Bad Request (extra_data)
require 'uri'
require 'net/http'

url = URI("https://restapi.ordergroove.com/customers/merchant_user_id/update")

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

request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"extra_data\": \"{notJSON\",\n  \"locale\": \"en-us\"\n}"

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

```java 400 Bad Request (extra_data)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://restapi.ordergroove.com/customers/merchant_user_id/update")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"extra_data\": \"{notJSON\",\n  \"locale\": \"en-us\"\n}")
  .asString();
```

```php 400 Bad Request (extra_data)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://restapi.ordergroove.com/customers/merchant_user_id/update', [
  'body' => '{
  "extra_data": "{notJSON",
  "locale": "en-us"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp 400 Bad Request (extra_data)
using RestSharp;

var client = new RestClient("https://restapi.ordergroove.com/customers/merchant_user_id/update");
var request = new RestRequest(Method.PATCH);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"extra_data\": \"{notJSON\",\n  \"locale\": \"en-us\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 400 Bad Request (extra_data)
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "extra_data": "{notJSON",
  "locale": "en-us"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://restapi.ordergroove.com/customers/merchant_user_id/update")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
```