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

Was this helpful?

  1. API Methods

Customer List

List customers

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

This endpoint allows you to list all customers.

Headers

Name
Type
Description

Content-Type

string

Application/JSON

Access Token

string

JWT Access Token from the authorization method..

{
   "status":true,
   "total":"78",
   "data":[
      {
         "customer_id":"78",
         "name":"john",
         "phone":"966431424",
         "email":"johnd11@gmail.com",
         "registeration_date":"2021-05-17 10:03:57"
      },
      {
         "customer_id":"77",
         "name":"tttttttt",
         "phone":"97499999999966",
         "email":"test@test.com",
         "registeration_date":"2021-04-22 06:42:51"
      },
      {
         "customer_id":"76",
         "name":"odeh33333333",
         "phone":"97499944222",
         "email":"odeh3333333@uigtc.com",
         "registeration_date":"2021-04-07 10:44:00"
      },
      {
         "customer_id":"75",
         "name":"vuvuuvvyyv",
         "phone":"9749991144",
         "email":"pppppp@uigtc.com",
         "registeration_date":"2021-04-05 21:33:33"
      },
      {
         "customer_id":"74",
         "name":"ghhhhu",
         "phone":"97499922211",
         "email":"yyyyyy@uigtc.com",
         "registeration_date":"2021-04-05 21:32:33"
      },
      {
         "customer_id":"73",
         "name":"odeh",
         "phone":"97499966611",
         "email":"odehtest@uigtc.com",
         "registeration_date":"2021-04-05 19:12:40"
      },
      {
         "customer_id":"72",
         "name":"Qasem",
         "phone":"97499009060",
         "email":"jeya22@uigtc.com",
         "registeration_date":"2021-03-30 15:56:48"
      },
      {
         "customer_id":"71",
         "name":"john",
         "phone":"966441424",
         "email":"john@gmail.com",
         "registeration_date":"2021-03-25 11:18:02"
      },
      {
         "customer_id":"70",
         "name":"Bayan",
         "phone":"96594476503",
         "email":"bayan.darwish@uigtc.com",
         "registeration_date":"2021-03-24 13:52:03"
      },
      {
         "customer_id":"69",
         "name":"jack",
         "phone":"974962799101921",
         "email":"j.abbadi@uigtc.com",
         "registeration_date":"2021-03-24 13:20:06"
      }
   ]
}
{    "message": "Not Found."}

Examples

import http.client

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

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

conn.request("POST", "/v1/customers", 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/customers",
  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/customers")
  .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/customers"),
    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/customers")

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

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

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

Last updated 4 years ago

Was this helpful?