Μετάβαση στο περιεχόμενο

Endpoints

Orders & products

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

Οι διαδρομές είναι σχετικές με το βασικό URL. Κάθε κάρτα δείχνει το δικαίωμα που απαιτεί η κλήση και κάθε παράμετρο, με τον τύπο και τα όριά της.

GET
/orders

List orders, newest first.

Δικαίωμα: orders
Με σελιδοποίηση

Παράμετροι query

  • 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

Σώμα 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.

Σώμα 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.

Σώμα JSON

  • statusυποχρεωτικόenum

    Fulfillment status.

    Επιτρεπτές τιμές:unfulfilledshippeddeliveredcancelledfailed

POST
/orders/:id/items

Add an item to an order.

Δικαίωμα: orders

Παράμετροι διαδρομής

  • idυποχρεωτικόinteger

    Order ID.

Σώμα 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.

Σώμα 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.

Σώμα JSON

  • noteυποχρεωτικόstring

    1–2,000 characters.

GET
/products

List catalog products, newest first.

Οποιοδήποτε μέλος της ομάδας
Με σελιδοποίηση

Παράμετροι query

  • 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

Σώμα 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.

Σώμα 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.