انتقل إلى المحتوى الرئيسي

orderByHandle

نظرة عامة

اجلب طلباً واحداً باستخدام handle العام الخاص به. ملاحظة: اسم معامل API مكتوب handel (كما في المخطط أدناه).

  • النوع: GraphQL Query
  • Endpoint: https://subdomain.com
  • المصادقة: Authorization: Bearer <TOKEN>

Query

query GetOrderByHandle($handel: String!) {
getOrderByHandle(handel: $handel) {
data {
_id
status { _id code title }
type
salesLead {
_id
firstName
lastName
country
city
district
street
phone1
phone2
}
currency { _id title currencyCode currencySymbol }
freeze
taxAmount
totalPriceWithTax
totalPrice
totalCompareAtPrice
priceWithShipping
shippingPrice
handel
paymentMethod {
_id
key
descreption
installed
deleted
schema
createdAt
updatedAt
icon
iconUrl
needConfig
methods
name
instructions
id
}
shippingAddress {
_id
country {
_id
name
image { image imageUrl }
code
continent
capital
active
deleted
phonekey
}
city {
_id
name
description
active
deleted
country {
_id
name
image { image imageUrl }
code
continent
capital
active
deleted
phonekey
}
createdAt
}
neighborhood
zipCode
description
account
device
deleted
createdAt
updatedAt
}
customerName
isPaid
isFastOrder
createdAt
account {
_id
fullname
phone
type
verified
blocked
status
avatar
avatarUrl
country {
_id
name
image { image imageUrl }
code
continent
capital
active
deleted
phonekey
}
deleted
devices
createdAt
updatedAt
}
items {
_id
orderId
productId
variantId
productData { title slug app images price }
variantData {
price
compareAtPrice
options {
_id
option { _id name type product }
label
sortOrder
}
}
quantity
price
compareAtPrice
totalPrice
totalCompareAtPrice
totalSavings
}
}
success
message
}
}

المتغيرات

{
"handel": "<ORDER_HANDLE>"
}

أمثلة

curl -X POST \
https://subdomain.com \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <TOKEN>" \
--data-binary @- << 'EOF'
{
"query": "query GetOrderByHandle($handel: String!) { getOrderByHandle(handel: $handel) { success message data { _id handel totalPrice } } }",
"variables": { "handel": "<ORDER_HANDLE>" }
}
EOF

ملاحظات

  • اسم المعامل هو handel في المخطط؛ مرر handle الطلب الخاص بك تحت هذا المتغير.
  • قلل الحقول المحددة إلى ما تحتاجه واجهتك للأداء.