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

Branches

List of available branches for the store

Branch List

POST https://sandbox.mnasati.com/v1/branches

This endpoint retrieves all branches under the specified store/vendor.

Headers

Name
Type
Description

Content-Type

string

Application/JSON

Jwt Access token

string

The Access token is given when using the Authorization method.

{
   "status":true,
   "data":{
      "branches":[
         {
            "branch_id":"101",
            "name":"kw1",
            "address":"",
            "phone_no":"+96525756568",
            "latitude":"00",
            "longitude":"000",
            "order_delivery":"1",
            "max_fulfillment":"2147483647",
            "delivery_busy":"0",
            "busy_until":null,
            "display_branch_info":"1",
            "pickup_available":"1",
            "schedule_order":"1",
            "status":"1",
            "working_hours":[
               {
                  "day":"sun",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"mon",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"tue",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"wed",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"thu",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"fri",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"sat",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               }
            ],
            "dinein_booking":"1",
            "availability":[
               {
                  "key":"Order Delivery",
                  "value":"1"
               },
               {
                  "key":"Pickup Available",
                  "value":"1"
               },
               {
                  "key":"Schedule Order",
                  "value":"1"
               },
               {
                  "key":"Booking",
                  "value":"1"
               }
            ],
            "pickup_as_soon_as":1,
            "pickup_time_text":"As soon as possible"
         },
         {
            "branch_id":"140",
            "name":"kw2",
            "address":"",
            "phone_no":"-",
            "latitude":"-",
            "longitude":"-",
            "order_delivery":"1",
            "max_fulfillment":"1440000",
            "delivery_busy":"0",
            "busy_until":null,
            "display_branch_info":"1",
            "pickup_available":"1",
            "schedule_order":"1",
            "status":"1",
            "working_hours":[
               {
                  "day":"sun",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"mon",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"tue",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"wed",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"thu",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"fri",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"sat",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               }
            ],
            "dinein_booking":"1",
            "availability":[
               {
                  "key":"Order Delivery",
                  "value":"1"
               },
               {
                  "key":"Pickup Available",
                  "value":"1"
               },
               {
                  "key":"Schedule Order",
                  "value":"1"
               },
               {
                  "key":"Booking",
                  "value":"1"
               }
            ],
            "pickup_as_soon_as":1,
            "pickup_time_text":"As soon as possible"
         }
      ],
      "delivery_zones":[
         {
            "zone_id":"102",
            "branch_id":"101",
            "delivery_time":"50.00",
            "delivery_fee":1,
            "weight_based_fee":"0",
            "minimum_order":10,
            "delivery_areas":"886",
            "business_hours":[
               {
                  "day":"sun",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"mon",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"tue",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"wed",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"thu",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"fri",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"sat",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               }
            ],
            "status":"1",
            "delivery_as_soon_as":1,
            "delivery_time_text":{
               "ar":"3 ساعات 50 الدقائق",
               "en":"3 Hours 50 Minutes"
            }
         },
         {
            "zone_id":"153",
            "branch_id":"101",
            "delivery_time":"4.00",
            "delivery_fee":4,
            "weight_based_fee":"0",
            "minimum_order":3,
            "delivery_areas":"885",
            "business_hours":[
               {
                  "day":"sun",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"mon",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"tue",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"wed",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"thu",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"fri",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"sat",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               }
            ],
            "status":"1",
            "delivery_as_soon_as":1,
            "delivery_time_text":{
               "ar":"3 ساعات 4 الدقائق",
               "en":"3 Hours 4 Minutes"
            }
         },
         {
            "zone_id":"154",
            "branch_id":"140",
            "delivery_time":"60.00",
            "delivery_fee":1,
            "weight_based_fee":"0",
            "minimum_order":1,
            "delivery_areas":"888",
            "business_hours":[
               {
                  "day":"sun",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"mon",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"tue",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"wed",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"thu",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"fri",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"sat",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               }
            ],
            "status":"1",
            "delivery_as_soon_as":1,
            "delivery_time_text":{
               "ar":"4 ساعات",
               "en":"4 Hours"
            }
         },
         {
            "zone_id":"155",
            "branch_id":"140",
            "delivery_time":"60.00",
            "delivery_fee":1,
            "weight_based_fee":"0",
            "minimum_order":1,
            "delivery_areas":"887",
            "business_hours":[
               {
                  "day":"sun",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"mon",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"tue",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"wed",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"thu",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"fri",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               },
               {
                  "day":"sat",
                  "off_day":false,
                  "open_at":"00:00",
                  "close_at":"00:00",
                  "break_start":"",
                  "break_end":""
               }
            ],
            "status":"1",
            "delivery_as_soon_as":1,
            "delivery_time_text":{
               "ar":"4 ساعات",
               "en":"4 Hours"
            }
         }
      ]
   }
}
{"status":400,"error":400,"messages":{"status":false,"message":"Access denied"}}

Headers

{    
    'Content-Type': "application/json",    
    'Authorization-Jwt':"Jwt eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZW5kb3JfaWQiOiI0MyIsInVzZXJfaWQiOiI0MCIsInVzZXJfdHlwZSI6InZlbmRvciIsImVtYWlsIjoiemF6YUB1aWd0Yy5jb20iLCJpYXQiOjE2MjExNjkwNjAsImV4cCI6MTYyNjM1MzA2MH0.txMUChjPsKvD9NJrIh_0sFJDKrdRi7GlgLQv0wOdE6E"    
}

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/branches", 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/branches",
  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/branches")
  .post(null)
  .addHeader("Content-Type", "")
  .addHeader("Authorization-Jwt", "")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://sandbox.mnasati.com/v1/branches");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "");
request.AddHeader("Authorization-Jwt", "");
IRestResponse response = client.Execute(request);
package main

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

func main() {

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

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

}
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.mnasati.com/v1/branches")! 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()
const settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://sandbox.mnasati.com/v1/branches",
  "method": "POST",
  "headers": {
    "Content-Type": "",
    "Authorization-Jwt": ""
  }
};

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

Last updated 3 years ago

Was this helpful?