# Update Brand

## Update brand

<mark style="color:orange;">`PUT`</mark> `https://sandbox.com/v1/brands`

#### Body

```json
{
    "brand_id":63,
    "brand_name":"test brand 1111",
    "brand_name_ar":"test brand 11111 ar"
}
```

#### Examples

{% tabs %}
{% tab title="Curl/Bash" %}

```
curl --location --request PUT 'https://sandbox.mnasati.com/v1/brands' \
--header 'Authorization-jwt: Jwt eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZW5kb3JfaWQiOiIzIiwidXNlcl9pZCI6IjMzIiwidXNlcl90eXBlIjoidmVuZG9yIiwiZW1haWwiOiJxYTFAdWlndGMuY29tIiwiaWF0IjoxNjMzNTUzMjMzLCJleHAiOjE2Mzg3MzcyMzN9.tMjJ-tTcuvJUhM1zUR2zKC0uR2dSPOA_lmJemm8Gx8Q' \
--data-raw '{
    "brand_id":63,
    "brand_name":"test brand 1111",
    "brand_name_ar":"test brand 11111 ar"
}'
```

{% endtab %}

{% tab title="PHP" %}

```
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://sandbox.mnasati.com/v1/brands',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
    "brand_id":63,
    "brand_name":"test brand 1111",
    "brand_name_ar":"test brand 11111 ar"
}',
  CURLOPT_HTTPHEADER => array(
    'Authorization-jwt: Jwt eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZW5kb3JfaWQiOiIzIiwidXNlcl9pZCI6IjMzIiwidXNlcl90eXBlIjoidmVuZG9yIiwiZW1haWwiOiJxYTFAdWlndGMuY29tIiwiaWF0IjoxNjMzNTUzMjMzLCJleHAiOjE2Mzg3MzcyMzN9.tMjJ-tTcuvJUhM1zUR2zKC0uR2dSPOA_lmJemm8Gx8Q'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

{% endtab %}

{% tab title="Python" %}

```
import http.client

conn = http.client.HTTPSConnection("sandbox.mnasati.com")
payload = "{\n    \"brand_id\":63,\n    \"brand_name\":\"test brand 1111\",\n    \"brand_name_ar\":\"test brand 11111 ar\"\n}"
headers = {
  'Authorization-jwt': 'Jwt eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZW5kb3JfaWQiOiIzIiwidXNlcl9pZCI6IjMzIiwidXNlcl90eXBlIjoidmVuZG9yIiwiZW1haWwiOiJxYTFAdWlndGMuY29tIiwiaWF0IjoxNjMzNTUzMjMzLCJleHAiOjE2Mzg3MzcyMzN9.tMjJ-tTcuvJUhM1zUR2zKC0uR2dSPOA_lmJemm8Gx8Q'
}
conn.request("PUT", "/v1/brands", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

{% endtab %}

{% tab title="C#" %}

```
var client = new RestClient("https://sandbox.mnasati.com/v1/brands");
client.Timeout = -1;
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization-jwt", "Jwt eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZW5kb3JfaWQiOiIzIiwidXNlcl9pZCI6IjMzIiwidXNlcl90eXBlIjoidmVuZG9yIiwiZW1haWwiOiJxYTFAdWlndGMuY29tIiwiaWF0IjoxNjMzNTUzMjMzLCJleHAiOjE2Mzg3MzcyMzN9.tMjJ-tTcuvJUhM1zUR2zKC0uR2dSPOA_lmJemm8Gx8Q");
var body = @"{" + "\n" +
@"    ""brand_id"":63," + "\n" +
@"    ""brand_name"":""test brand 1111""," + "\n" +
@"    ""brand_name_ar"":""test brand 11111 ar""" + "\n" +
@"}";
request.AddParameter("text/plain", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```

{% endtab %}

{% tab title="JAVA" %}

```
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "{\n    \"brand_id\":63,\n    \"brand_name\":\"test brand 1111\",\n    \"brand_name_ar\":\"test brand 11111 ar\"\n}");
Request request = new Request.Builder()
  .url("https://sandbox.mnasati.com/v1/brands")
  .method("PUT", body)
  .addHeader("Authorization-jwt", "Jwt eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZW5kb3JfaWQiOiIzIiwidXNlcl9pZCI6IjMzIiwidXNlcl90eXBlIjoidmVuZG9yIiwiZW1haWwiOiJxYTFAdWlndGMuY29tIiwiaWF0IjoxNjMzNTUzMjMzLCJleHAiOjE2Mzg3MzcyMzN9.tMjJ-tTcuvJUhM1zUR2zKC0uR2dSPOA_lmJemm8Gx8Q")
  .build();
Response response = client.newCall(request).execute();
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mnasati.com/api-methods/brands-list/update-brand.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
