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
  • Order List
  • Examples

Was this helpful?

  1. API Methods

Order List

Order List

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

This endpoint allows you to get a list of all your orders.

Headers

Name
Type
Description

Content-Type

string

Application/JSON

Access Token

string

Authentication token (JWT).

{
   "status":true,
   "total":6309,
   "next_page":2,
   "orders":[
    
      {
         "sale_id":"7345",
         "sale_code":"PO3X-7345",
         "buyer_name":"lana1",
         "buyer_email":"",
         "buyer_phone":"99966696",
         "buyer_phone_code":"974",
         "fund_number":"2",
         "shipping":"0.000",
         "payment_type_id":"5",
         "payment_status_id":"2",
         "grand_total":"23.200",
         "sale_datetime":"2021-05-09 15:00:08",
         "delivery_status_id":"1",
         "order_mode_id":"2",
         "estimated_time":"2021-05-09 18:00:08",
         "branch_id":"121",
         "discount":"0.000",
         "sub_total":"23.200",
         "schedule_order":"0",
         "payment_method_id":"0",
         "area_id":"0",
         "special_price":"1",
         "delivery_company":null,
         "country_id":"11",
         "business_settings_id":"0",
         "payment_type":"wallet",
         "current_payment_status":"paid",
         "current_delivery_status":"pending",
         "order_mode":"pickup",
         "branch_name":"",
         "branch_name_ar":"",
         "area_name":"",
         "area_name_ar":"",
         "currency_code":"QAR",
         "payment_name_ar":"",
         "payment_name":""
      },
      {
         "sale_id":"7344",
         "sale_code":"YUXD-7344",
         "buyer_name":"lana1",
         "buyer_email":"",
         "buyer_phone":"99966696",
         "buyer_phone_code":"974",
         "fund_number":"2",
         "shipping":"0.000",
         "payment_type_id":"5",
         "payment_status_id":"2",
         "grand_total":"0.800",
         "sale_datetime":"2021-05-09 14:57:46",
         "delivery_status_id":"4",
         "order_mode_id":"0",
         "estimated_time":"2021-05-09 14:57:46",
         "branch_id":"0",
         "discount":"0.000",
         "sub_total":"0.800",
         "schedule_order":"0",
         "payment_method_id":"0",
         "area_id":"0",
         "special_price":"1",
         "delivery_company":null,
         "country_id":"11",
         "business_settings_id":"0",
         "payment_type":"wallet",
         "current_payment_status":"paid",
         "current_delivery_status":"delivered",
         "order_mode":"",
         "branch_name":"",
         "branch_name_ar":"",
         "area_name":"",
         "area_name_ar":"",
         "currency_code":"QAR",
         "payment_name_ar":"",
         "payment_name":""
      }
   ]
}
{    "message": "Not found."}

Examples

import http.client

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

headers = {
    'Content-Type': "",
    'Authorization-Jwt': ""
    }

conn.request("POST", "/v1/orders", 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/orders",
  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/orders")
  .post(null)
  .addHeader("Content-Type", "")
  .addHeader("Authorization-Jwt", "")
  .build();

Response response = client.newCall(request).execute();
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("https://sandbox.mnasati.com/v1/orders"),
    Headers =
    {
        { "Content-Type", "" },
        { "Authorization-Jwt", "" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
require 'uri'
require 'net/http'
require 'openssl'

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

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/orders"

	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/orders")! 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/orders",
  "method": "POST",
  "headers": {
    "Content-Type": "",
    "Authorization-Jwt": ""
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
PreviousCreate customerNextUpdate Order Status

Last updated 4 years ago

Was this helpful?