انتقل إلى المحتوى

الـ Endpoints

Orders & products

Orders, their items and timeline, and the product catalog.

المسارات نسبية للـ base URL. كل كارت بيوضّح الصلاحية اللي الاستدعاء محتاجها وكل parameter، مع نوعه وحدوده.

GET
/orders

List orders, newest first.

الصلاحية: orders
مقسّم لصفحات

معاملات الاستعلام

  • statusاختياريenum

    Fulfillment status.

    القيم المسموحة:unfulfilledshippeddeliveredcancelledfailed

  • payment_statusاختياريenum

    Payment status.

    القيم المسموحة:pendingpaid

  • contact_idاختياريinteger

    Orders of this contact.

  • created_sinceاختياريstring (ISO 8601 date-time with offset)

    Orders created at or after this time.

GET
/orders/:id

Retrieve an order with its items.

الصلاحية: orders

معاملات المسار

  • idمطلوبinteger

    Order ID.

POST
/orders

Create an order for a contact.

الصلاحية: orders

الـ body بصيغة JSON

  • contact_idمطلوبinteger

    The customer.

  • itemsمطلوبarray of objects

    1–200 items. Each item: name (required), quantity (required), unit_price (required), product_id, sku.

  • currencyاختياريstring

    Three-letter ISO 4217 code, e.g. "USD".

  • notesاختياريstring | null

    Up to 2,000 characters.

  • statusاختياريenum

    Fulfillment status.

    القيم المسموحة:unfulfilledshippeddeliveredcancelledfailed

  • payment_statusاختياريenum

    Payment status.

    القيم المسموحة:pendingpaid

  • paid_amountاختياريnumber

    ≥ 0.

  • shipping_feeاختياريnumber

    ≥ 0.

PATCH
/orders/:id

Update order details. Send at least one field.

الصلاحية: orders

معاملات المسار

  • idمطلوبinteger

    Order ID.

الـ body بصيغة JSON

  • statusاختياريenum

    Fulfillment status.

    القيم المسموحة:unfulfilledshippeddeliveredcancelledfailed

  • payment_statusاختياريenum

    Payment status.

    القيم المسموحة:pendingpaid

  • paid_amountاختياريnumber

    ≥ 0.

  • shipping_feeاختياريnumber

    ≥ 0.

  • notesاختياريstring

    Up to 2,000 characters.

PUT
/orders/:id/status

Change the fulfillment status.

الصلاحية: orders

معاملات المسار

  • idمطلوبinteger

    Order ID.

الـ body بصيغة JSON

  • statusمطلوبenum

    Fulfillment status.

    القيم المسموحة:unfulfilledshippeddeliveredcancelledfailed

POST
/orders/:id/items

Add an item to an order.

الصلاحية: orders

معاملات المسار

  • idمطلوبinteger

    Order ID.

الـ body بصيغة JSON

  • nameمطلوبstring

    Line name, 1–255 characters.

  • quantityمطلوبinteger

    1–100,000.

  • unit_priceمطلوبnumber

    0–100,000,000, in the order currency.

  • product_idاختياريinteger | null

    A product of this workspace (see GET /products).

  • skuاختياريstring | null

    Up to 100 characters.

  • Items can only change while the order is unfulfilled and unpaid (409 order_not_editable).
PATCH
/orders/:id/items/:itemId

Change the quantity of an order item.

الصلاحية: orders

معاملات المسار

  • idمطلوبinteger

    Order ID.

  • itemIdمطلوبinteger

    Order item ID.

الـ body بصيغة JSON

  • quantityمطلوبinteger

    1–100,000.

  • Only while the order is unfulfilled and unpaid.
DELETE
/orders/:id/items/:itemId

Remove an item from an order.

الصلاحية: orders

معاملات المسار

  • idمطلوبinteger

    Order ID.

  • itemIdمطلوبinteger

    Order item ID.

  • An order needs at least one item: removing the last one answers 409 (cancel the order instead).
POST
/orders/:id/timeline

Add a note to the order timeline.

الصلاحية: orders

معاملات المسار

  • idمطلوبinteger

    Order ID.

الـ body بصيغة JSON

  • noteمطلوبstring

    1–2,000 characters.

GET
/products

List catalog products, newest first.

أي عضو في الفريق
مقسّم لصفحات

معاملات الاستعلام

  • searchاختياريstring

    Matches the product name, up to 200 characters.

  • in_stockاختياريenum

    Stock filter.

    القيم المسموحة:truefalse

  • sourceاختياريenum

    Where the product came from.

    القيم المسموحة:manualshopifytrendyol

GET
/products/:id

Retrieve a product.

أي عضو في الفريق

معاملات المسار

  • idمطلوبinteger

    Product ID.

POST
/products

Create a product.

الصلاحية: business_pages

الـ body بصيغة JSON

  • nameمطلوبstring

    1–500 characters.

  • descriptionاختياريstring | null

    Up to 20,000 characters.

  • priceاختياريnumber | string | null

    A number ≥ 0, or a price text up to 50 characters.

  • original_priceاختياريnumber | string | null

    Price before discount. Same format as price.

  • currencyاختياريstring | null

    Up to 10 characters, e.g. "USD".

  • skuاختياريstring | null

    Up to 200 characters.

  • brandاختياريstring | null

    Up to 200 characters.

  • in_stockاختياريboolean | null

    Whether the product is available.

  • stock_quantityاختياريinteger | null

    Units in stock, ≥ 0.

  • image_urlاختياريstring (URL) | null

    Main image, up to 2,048 characters.

  • imagesاختياريarray of strings (URL)

    Up to 50 image URLs.

  • urlاختياريstring (URL) | null

    Product page URL.

  • tagsاختياريarray of strings

    Up to 100 tags, 100 characters each.

  • categoriesاختياريarray of strings

    Up to 100 categories, 100 characters each.

PATCH
/products/:id

Update a product. Send at least one field.

الصلاحية: business_pages

معاملات المسار

  • idمطلوبinteger

    Product ID.

الـ body بصيغة JSON

  • nameاختياريstring

    1–500 characters.

  • descriptionاختياريstring | null

    Up to 20,000 characters.

  • priceاختياريnumber | string | null

    A number ≥ 0, or a price text up to 50 characters.

  • original_priceاختياريnumber | string | null

    Price before discount. Same format as price.

  • currencyاختياريstring | null

    Up to 10 characters, e.g. "USD".

  • skuاختياريstring | null

    Up to 200 characters.

  • brandاختياريstring | null

    Up to 200 characters.

  • in_stockاختياريboolean | null

    Whether the product is available.

  • stock_quantityاختياريinteger | null

    Units in stock, ≥ 0.

  • image_urlاختياريstring (URL) | null

    Main image, up to 2,048 characters.

  • imagesاختياريarray of strings (URL)

    Up to 50 image URLs.

  • urlاختياريstring (URL) | null

    Product page URL.

  • tagsاختياريarray of strings

    Up to 100 tags, 100 characters each.

  • categoriesاختياريarray of strings

    Up to 100 categories, 100 characters each.

DELETE
/products/:id

Delete a product.

الصلاحية: business_pages

معاملات المسار

  • idمطلوبinteger

    Product ID.