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

Was this helpful?

  1. API Methods

Product List

Product List

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

This endpoint allows you to get a list of all availabe products in your store.

Headers

Name
Type
Description

Content-Type

string

Application/JSON

Access Token

string

Authentication token (JWT).

{
   "status":true,
   "total":737,
   "products":[
      {
         "product_id":"2274",
         "title":"product 5",
         "title_ar":"المنتج 5",
         "description":"this is the description\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n",
         "description_ar":"هذا هو الوصف\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n",
         "sort_order":"0",
         "image":"https://mnasatistorage.fra1.digitaloceanspaces.com/manastitesting/uploads/product_image/43/product_01608647672.jpg",
         "current_stock":"0",
         "sale_price":22,
         "category":"304",
         "sub_category":"0",
         "discount":"0.00",
         "special_price_discount":"1",
         "main_image":"https://mnasatistorage.fra1.digitaloceanspaces.com/manastitesting/uploads/product_image/43/product_01608647672_thumb.jpg",
         "thumb_image":"https://mnasatistorage.fra1.digitaloceanspaces.com/manastitesting/uploads/product_image/43/product_01608647672_thumb.jpg",
         "special_price":{
            "1":12,
            "10":4,
            "11":22
         }
      },
      {
         "product_id":"2276",
         "title":"product 26",
         "title_ar":"المنتج 26",
         "description":"this is the description\r\n\r\n\r\n\r\n\n",
         "description_ar":"هذا هو الوصف\r\n\r\n\r\n\r\n\n",
         "sort_order":"0",
         "image":"https://mnasatistorage.fra1.digitaloceanspaces.com/manastitesting/uploads/product_image/43/product_01608647654.jpg",
         "current_stock":"13",
         "sale_price":34,
         "category":"304",
         "sub_category":"0",
         "discount":"0.00",
         "special_price_discount":"1",
         "main_image":"https://mnasatistorage.fra1.digitaloceanspaces.com/manastitesting/uploads/product_image/43/product_01608647654_thumb.jpg",
         "thumb_image":"https://mnasatistorage.fra1.digitaloceanspaces.com/manastitesting/uploads/product_image/43/product_01608647654_thumb.jpg",
         "special_price":{
            "1":23,
            "10":23,
            "11":34
         }
      }
   ]
}
{    "message": "Not found."}

Examples

import http.client

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

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

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

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

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

$.ajax(settings).done(function (response) {
  console.log(response);
});
PreviousPayment MethodsNextProduct Update

Last updated 4 years ago

Was this helpful?