# Brands List

## Brand List

<mark style="color:green;">`POST`</mark> `https://sandbox.mnasati.com/v1/brands`

This endpoint allows you to get free cakes.

#### Headers

| Name         | Type   | Description                                                    |
| ------------ | ------ | -------------------------------------------------------------- |
| Content-Type | string | Application/JSON                                               |
| Access Token | string | Authentication token to track down who is emptying our stocks. |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
   "status":true,
   "total":"4",
   "data":[
      {
         "brand_id":"28",
         "brand_name":"APRVD",
         "brand_name_ar":"APRVD",
         "brand_logo":"https://mnasatistorage.fra1.digitaloceanspaces.com/manastitesting/uploads/brand_logo/43/brand_28_1612859416.png",
         "banner_image":"https://mnasatistorage.fra1.digitaloceanspaces.com/manastitesting/uploads/brand_banner/43/brand_28_1612859417.png",
         "sort":"2",
         "date_added":null
      },
      {
         "brand_id":"27",
         "brand_name":"BEAUTY WAY JBL",
         "brand_name_ar":"BEAUTY WAY JBL",
         "brand_logo":"https://mnasatistorage.fra1.digitaloceanspaces.com/manastitesting/uploads/brand_logo/43/brand_27_1612859367.png",
         "banner_image":"https://mnasatistorage.fra1.digitaloceanspaces.com/manastitesting/uploads/brand_banner/43/brand_27_1612859367.png",
         "sort":"1",
         "date_added":null
      },
      {
         "brand_id":"26",
         "brand_name":"JUST BEAUTIFUL",
         "brand_name_ar":"JUST BEAUTIFUL",
         "brand_logo":"https://mnasatistorage.fra1.digitaloceanspaces.com/manastitesting/uploads/brand_logo/43/brand_26_1612859350.png",
         "banner_image":"https://mnasatistorage.fra1.digitaloceanspaces.com/manastitesting/uploads/brand_banner/43/brand_26_1612859350.png",
         "sort":"4",
         "date_added":null
      },
      {
         "brand_id":"25",
         "brand_name":"JBL",
         "brand_name_ar":"JBL",
         "brand_logo":"https://mnasatistorage.fra1.digitaloceanspaces.com/manastitesting/uploads/brand_logo/43/brand_25_1612859297.png",
         "banner_image":"https://mnasatistorage.fra1.digitaloceanspaces.com/manastitesting/uploads/brand_banner/43/brand_25_1612859297.png",
         "sort":"3",
         "date_added":null
      }
   ]
}
```

{% endtab %}

{% tab title="400 " %}

```
{    "message": "Ain't no cake like that."}
```

{% endtab %}
{% endtabs %}

#### Examples

{% tabs %}
{% tab title="Pyhton" %}

```python
import http.client

conn = http.client.HTTPSConnection("sandbox.mnasati.com")

headers = {
    'Content-Type': "Application/JSON",
    'Authorization-Jwt':"Jwt eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZW5kb3JfaWQiOiI0MyIsInVzZXJfaWQiOiI0MCIsInVzZXJfdHlwZSI6InZlbmRvciIsImVtYWlsIjoiemF6YUB1aWd0Yy5jb20iLCJpYXQiOjE2MjExNjkwNjAsImV4cCI6MTYyNjM1MzA2MH0.txMUChjPsKvD9NJrIh_0sFJDKrdRi7GlgLQv0wOdE6E"
    }

conn.request("POST", "/v1/brands", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://sandbox.mnasati.com/v1/brands",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "Authorization-Jwt: ",
    "Content-Type: "
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

{% endtab %}

{% tab title="Java" %}

```java
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://sandbox.mnasati.com/v1/brands")
  .post(null)
  .addHeader("Content-Type", "")
  .addHeader("Authorization-Jwt", "")
  .build();

Response response = client.newCall(request).execute();
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://sandbox.mnasati.com/v1/brands")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["Content-Type"] = ''
request["Authorization-Jwt"] = ''

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

{% endtab %}

{% tab title="Go" %}

```go
package main

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

func main() {

	url := "https://sandbox.mnasati.com/v1/brands"

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

	req.Header.Add("Content-Type", "")
	req.Header.Add("Authorization-Jwt", "")

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

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

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

}
```

{% endtab %}

{% tab title="C#" %}

```csharp
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("https://sandbox.mnasati.com/v1/brands"),
    Headers =
    {
        { "Content-Type", "" },
        { "Authorization-Jwt", "" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
```

{% endtab %}

{% tab title="jQuery" %}

```javascript
const settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://sandbox.mnasati.com/v1/brands",
  "method": "POST",
  "headers": {
    "Content-Type": "",
    "Authorization-Jwt": ""
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
```

{% endtab %}

{% tab title="Swift" %}

```swift
import Foundation

let headers = [
  "Content-Type": "",
  "Authorization-Jwt": ""
]

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.mnasati.com/v1/brands")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

{% 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.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.
