التحقق من تفاصيل المنتج
curl --request GET \
--url https://api.oneclickdz.com/v3/gift-cards/checkProduct/{productId} \
--header 'X-Access-Token: <api-key>'import requests
url = "https://api.oneclickdz.com/v3/gift-cards/checkProduct/{productId}"
headers = {"X-Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Access-Token': '<api-key>'}};
fetch('https://api.oneclickdz.com/v3/gift-cards/checkProduct/{productId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.oneclickdz.com/v3/gift-cards/checkProduct/{productId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Access-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.oneclickdz.com/v3/gift-cards/checkProduct/{productId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Access-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.oneclickdz.com/v3/gift-cards/checkProduct/{productId}")
.header("X-Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneclickdz.com/v3/gift-cards/checkProduct/{productId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_bodyبطاقات الهدايا
التحقق من تفاصيل المنتج
احصل على التسعير التفصيلي والفئات والمخزون لمنتج محدد
GET
/
v3
/
gift-cards
/
checkProduct
/
{productId}
التحقق من تفاصيل المنتج
curl --request GET \
--url https://api.oneclickdz.com/v3/gift-cards/checkProduct/{productId} \
--header 'X-Access-Token: <api-key>'import requests
url = "https://api.oneclickdz.com/v3/gift-cards/checkProduct/{productId}"
headers = {"X-Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Access-Token': '<api-key>'}};
fetch('https://api.oneclickdz.com/v3/gift-cards/checkProduct/{productId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.oneclickdz.com/v3/gift-cards/checkProduct/{productId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Access-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.oneclickdz.com/v3/gift-cards/checkProduct/{productId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Access-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.oneclickdz.com/v3/gift-cards/checkProduct/{productId}")
.header("X-Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneclickdz.com/v3/gift-cards/checkProduct/{productId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_bodyنظرة عامة
يعيد أنواع/فئات المنتج مع الأسعار في الوقت الفعلي وتوافر المخزون.الأسعار مخصصة لحسابك. احذف
cost قبل عرضه للمستخدمين.معاملات المسار
string
مطلوب
معرف المنتج من endpoint الـ
/catalogالاستجابة
object
أمثلة
curl https://api.oneclickdz.com/v3/gift-cards/checkProduct/507f1f77bcf86cd799439011 \
-H "X-Access-Token: YOUR_API_KEY"
const productId = "507f1f77bcf86cd799439011";
const response = await fetch(
`https://api.oneclickdz.com/v3/gift-cards/checkProduct/${productId}`,
{ headers: { "X-Access-Token": "YOUR_API_KEY" } }
);
const { data } = await response.json();
// Filter in-stock items
const available = data.types.filter((t) => t.quantity > 0);
product_id = '507f1f77bcf86cd799439011'
response = requests.get(
f'https://api.oneclickdz.com/v3/gift-cards/checkProduct/{product_id}',
headers={'X-Access-Token': 'YOUR_API_KEY'}
)
types = response.json()['data']['types']
# Filter available
available = [t for t in types if t['quantity'] > 0]
<?php
$productId = '507f1f77bcf86cd799439011';
$ch = curl_init("https://api.oneclickdz.com/v3/gift-cards/checkProduct/{$productId}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-Access-Token: YOUR_API_KEY']);
$response = curl_exec($ch);
$data = json_decode($response, true);
$types = $data['data']['types'];
// Filter available
$available = array_filter($types, function($t) {
return $t['quantity'] > 0;
});
?>
مثال الاستجابة
{
"success": true,
"data": {
"productId": "507f1f77bcf86cd799439011",
"productTitle": "PlayStation Network",
"types": [
{
"id": "type_001",
"name": "PSN 500 DA",
"price": 490,
"quantity": 150
},
{
"id": "type_002",
"name": "PSN 1000 DA",
"price": 980,
"quantity": 87
},
{
"id": "type_003",
"name": "PSN 2000 DA",
"price": 1960,
"quantity": 0
}
]
},
"meta": {
"timestamp": "2025-10-29T01:00:00.000Z"
}
}
تطبيق هامش الربح
function applyMarkup(types, markupPercent = 5) {
return types
.filter((t) => t.quantity > 0)
.map((t) => ({
id: t.id,
name: t.name,
price: Math.ceil(t.price * (1 + markupPercent / 100)),
available: true,
}));
}
// Usage
const customerPrices = applyMarkup(data.types, 5); // 5% markup
أفضل الممارسات
التحقق من المخزون
تأكد من
quantity > 0 قبل العرضتطبيق الهامش
أضف هامش ربحك إلى
priceإخفاء السعر
لا تُظهر أبداً
price الجملة للعملاءالتحديث المنتظم
قم بتحديث المخزون بشكل دوري
روابط ذات صلة
الحصول على الكتالوج
تصفح جميع المنتجات
تقديم طلب
شراء منتج
⌘I

