İçeriğe geç

Endpoint'ler

Orders & products

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

Yollar temel URL'ye göredir. Her kart, çağrının gerektirdiği izni ve her parametreyi türü ve sınırlarıyla listeler.

GET
/orders

List orders, newest first.

İzin: orders
Sayfalı

Sorgu parametreleri

  • statusisteğe bağlıenum

    Fulfillment status.

    İzin verilen değerler:unfulfilledshippeddeliveredcancelledfailed

  • payment_statusisteğe bağlıenum

    Payment status.

    İzin verilen değerler:pendingpaid

  • contact_idisteğe bağlıinteger

    Orders of this contact.

  • created_sinceisteğe bağlıstring (ISO 8601 date-time with offset)

    Orders created at or after this time.

GET
/orders/:id

Retrieve an order with its items.

İzin: orders

Yol parametreleri

  • idzorunluinteger

    Order ID.

POST
/orders

Create an order for a contact.

İzin: orders

JSON gövdesi

  • contact_idzorunluinteger

    The customer.

  • itemszorunluarray of objects

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

  • currencyisteğe bağlıstring

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

  • notesisteğe bağlıstring | null

    Up to 2,000 characters.

  • statusisteğe bağlıenum

    Fulfillment status.

    İzin verilen değerler:unfulfilledshippeddeliveredcancelledfailed

  • payment_statusisteğe bağlıenum

    Payment status.

    İzin verilen değerler:pendingpaid

  • paid_amountisteğe bağlınumber

    ≥ 0.

  • shipping_feeisteğe bağlınumber

    ≥ 0.

PATCH
/orders/:id

Update order details. Send at least one field.

İzin: orders

Yol parametreleri

  • idzorunluinteger

    Order ID.

JSON gövdesi

  • statusisteğe bağlıenum

    Fulfillment status.

    İzin verilen değerler:unfulfilledshippeddeliveredcancelledfailed

  • payment_statusisteğe bağlıenum

    Payment status.

    İzin verilen değerler:pendingpaid

  • paid_amountisteğe bağlınumber

    ≥ 0.

  • shipping_feeisteğe bağlınumber

    ≥ 0.

  • notesisteğe bağlıstring

    Up to 2,000 characters.

PUT
/orders/:id/status

Change the fulfillment status.

İzin: orders

Yol parametreleri

  • idzorunluinteger

    Order ID.

JSON gövdesi

  • statuszorunluenum

    Fulfillment status.

    İzin verilen değerler:unfulfilledshippeddeliveredcancelledfailed

POST
/orders/:id/items

Add an item to an order.

İzin: orders

Yol parametreleri

  • idzorunluinteger

    Order ID.

JSON gövdesi

  • namezorunlustring

    Line name, 1–255 characters.

  • quantityzorunluinteger

    1–100,000.

  • unit_pricezorunlunumber

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

  • product_idisteğe bağlıinteger | null

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

  • skuisteğe bağlı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.

İzin: orders

Yol parametreleri

  • idzorunluinteger

    Order ID.

  • itemIdzorunluinteger

    Order item ID.

JSON gövdesi

  • quantityzorunluinteger

    1–100,000.

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

Remove an item from an order.

İzin: orders

Yol parametreleri

  • idzorunluinteger

    Order ID.

  • itemIdzorunluinteger

    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.

İzin: orders

Yol parametreleri

  • idzorunluinteger

    Order ID.

JSON gövdesi

  • notezorunlustring

    1–2,000 characters.

GET
/products

List catalog products, newest first.

Herhangi bir ekip üyesi
Sayfalı

Sorgu parametreleri

  • searchisteğe bağlıstring

    Matches the product name, up to 200 characters.

  • in_stockisteğe bağlıenum

    Stock filter.

    İzin verilen değerler:truefalse

  • sourceisteğe bağlıenum

    Where the product came from.

    İzin verilen değerler:manualshopifytrendyol

GET
/products/:id

Retrieve a product.

Herhangi bir ekip üyesi

Yol parametreleri

  • idzorunluinteger

    Product ID.

POST
/products

Create a product.

İzin: business_pages

JSON gövdesi

  • namezorunlustring

    1–500 characters.

  • descriptionisteğe bağlıstring | null

    Up to 20,000 characters.

  • priceisteğe bağlınumber | string | null

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

  • original_priceisteğe bağlınumber | string | null

    Price before discount. Same format as price.

  • currencyisteğe bağlıstring | null

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

  • skuisteğe bağlıstring | null

    Up to 200 characters.

  • brandisteğe bağlıstring | null

    Up to 200 characters.

  • in_stockisteğe bağlıboolean | null

    Whether the product is available.

  • stock_quantityisteğe bağlıinteger | null

    Units in stock, ≥ 0.

  • image_urlisteğe bağlıstring (URL) | null

    Main image, up to 2,048 characters.

  • imagesisteğe bağlıarray of strings (URL)

    Up to 50 image URLs.

  • urlisteğe bağlıstring (URL) | null

    Product page URL.

  • tagsisteğe bağlıarray of strings

    Up to 100 tags, 100 characters each.

  • categoriesisteğe bağlıarray of strings

    Up to 100 categories, 100 characters each.

PATCH
/products/:id

Update a product. Send at least one field.

İzin: business_pages

Yol parametreleri

  • idzorunluinteger

    Product ID.

JSON gövdesi

  • nameisteğe bağlıstring

    1–500 characters.

  • descriptionisteğe bağlıstring | null

    Up to 20,000 characters.

  • priceisteğe bağlınumber | string | null

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

  • original_priceisteğe bağlınumber | string | null

    Price before discount. Same format as price.

  • currencyisteğe bağlıstring | null

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

  • skuisteğe bağlıstring | null

    Up to 200 characters.

  • brandisteğe bağlıstring | null

    Up to 200 characters.

  • in_stockisteğe bağlıboolean | null

    Whether the product is available.

  • stock_quantityisteğe bağlıinteger | null

    Units in stock, ≥ 0.

  • image_urlisteğe bağlıstring (URL) | null

    Main image, up to 2,048 characters.

  • imagesisteğe bağlıarray of strings (URL)

    Up to 50 image URLs.

  • urlisteğe bağlıstring (URL) | null

    Product page URL.

  • tagsisteğe bağlıarray of strings

    Up to 100 tags, 100 characters each.

  • categoriesisteğe bağlıarray of strings

    Up to 100 categories, 100 characters each.

DELETE
/products/:id

Delete a product.

İzin: business_pages

Yol parametreleri

  • idzorunluinteger

    Product ID.