MNASATI - API Docs
  • Introduction
  • Authentication
  • Limitation
  • Pagination
  • SSL Settings
  • API Methods
    • Authorization
    • Branches
    • Brands List
      • Delete Brand
      • Update Brand
      • Create Brand
    • List Categories
      • Create Category
      • Update Category
    • Countries
      • Cities
    • Customer List
      • Create customer
    • Order List
      • Update Order Status
      • Order Status List
      • Order Status History
    • Payment Methods
    • Product List
      • Product Update
      • Create Product
      • Delete Product
      • Update Product Status
    • Taxes List
    • Vouchers
Powered by GitBook
On this page

Was this helpful?

  1. API Methods

Brands List

Brand List

POST 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.

{
   "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
      }
   ]
}
{    "message": "Ain't no cake like that."}

Examples

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"))
<?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;
}
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();
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
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))

}
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);
}
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);
});
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()
PreviousBranchesNextDelete Brand

Last updated 3 years ago

Was this helpful?