Vai al contenuto

Endpoint

Orders & products

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

I percorsi sono relativi all'URL di base. Ogni scheda indica il permesso richiesto dalla chiamata e ogni parametro, con tipo e limiti.

GET
/orders

List orders, newest first.

Permesso: orders
Paginato

Parametri di query

  • statusopzionaleenum

    Fulfillment status.

    Valori consentiti:unfulfilledshippeddeliveredcancelledfailed

  • payment_statusopzionaleenum

    Payment status.

    Valori consentiti:pendingpaid

  • contact_idopzionaleinteger

    Orders of this contact.

  • created_sinceopzionalestring (ISO 8601 date-time with offset)

    Orders created at or after this time.

GET
/orders/:id

Retrieve an order with its items.

Permesso: orders

Parametri del percorso

  • idobbligatoriointeger

    Order ID.

POST
/orders

Create an order for a contact.

Permesso: orders

Corpo JSON

  • contact_idobbligatoriointeger

    The customer.

  • itemsobbligatorioarray of objects

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

  • currencyopzionalestring

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

  • notesopzionalestring | null

    Up to 2,000 characters.

  • statusopzionaleenum

    Fulfillment status.

    Valori consentiti:unfulfilledshippeddeliveredcancelledfailed

  • payment_statusopzionaleenum

    Payment status.

    Valori consentiti:pendingpaid

  • paid_amountopzionalenumber

    ≥ 0.

  • shipping_feeopzionalenumber

    ≥ 0.

PATCH
/orders/:id

Update order details. Send at least one field.

Permesso: orders

Parametri del percorso

  • idobbligatoriointeger

    Order ID.

Corpo JSON

  • statusopzionaleenum

    Fulfillment status.

    Valori consentiti:unfulfilledshippeddeliveredcancelledfailed

  • payment_statusopzionaleenum

    Payment status.

    Valori consentiti:pendingpaid

  • paid_amountopzionalenumber

    ≥ 0.

  • shipping_feeopzionalenumber

    ≥ 0.

  • notesopzionalestring

    Up to 2,000 characters.

PUT
/orders/:id/status

Change the fulfillment status.

Permesso: orders

Parametri del percorso

  • idobbligatoriointeger

    Order ID.

Corpo JSON

  • statusobbligatorioenum

    Fulfillment status.

    Valori consentiti:unfulfilledshippeddeliveredcancelledfailed

POST
/orders/:id/items

Add an item to an order.

Permesso: orders

Parametri del percorso

  • idobbligatoriointeger

    Order ID.

Corpo JSON

  • nameobbligatoriostring

    Line name, 1–255 characters.

  • quantityobbligatoriointeger

    1–100,000.

  • unit_priceobbligatorionumber

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

  • product_idopzionaleinteger | null

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

  • skuopzionalestring | 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.

Permesso: orders

Parametri del percorso

  • idobbligatoriointeger

    Order ID.

  • itemIdobbligatoriointeger

    Order item ID.

Corpo JSON

  • quantityobbligatoriointeger

    1–100,000.

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

Remove an item from an order.

Permesso: orders

Parametri del percorso

  • idobbligatoriointeger

    Order ID.

  • itemIdobbligatoriointeger

    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.

Permesso: orders

Parametri del percorso

  • idobbligatoriointeger

    Order ID.

Corpo JSON

  • noteobbligatoriostring

    1–2,000 characters.

GET
/products

List catalog products, newest first.

Qualsiasi membro del team
Paginato

Parametri di query

  • searchopzionalestring

    Matches the product name, up to 200 characters.

  • in_stockopzionaleenum

    Stock filter.

    Valori consentiti:truefalse

  • sourceopzionaleenum

    Where the product came from.

    Valori consentiti:manualshopifytrendyol

GET
/products/:id

Retrieve a product.

Qualsiasi membro del team

Parametri del percorso

  • idobbligatoriointeger

    Product ID.

POST
/products

Create a product.

Permesso: business_pages

Corpo JSON

  • nameobbligatoriostring

    1–500 characters.

  • descriptionopzionalestring | null

    Up to 20,000 characters.

  • priceopzionalenumber | string | null

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

  • original_priceopzionalenumber | string | null

    Price before discount. Same format as price.

  • currencyopzionalestring | null

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

  • skuopzionalestring | null

    Up to 200 characters.

  • brandopzionalestring | null

    Up to 200 characters.

  • in_stockopzionaleboolean | null

    Whether the product is available.

  • stock_quantityopzionaleinteger | null

    Units in stock, ≥ 0.

  • image_urlopzionalestring (URL) | null

    Main image, up to 2,048 characters.

  • imagesopzionalearray of strings (URL)

    Up to 50 image URLs.

  • urlopzionalestring (URL) | null

    Product page URL.

  • tagsopzionalearray of strings

    Up to 100 tags, 100 characters each.

  • categoriesopzionalearray of strings

    Up to 100 categories, 100 characters each.

PATCH
/products/:id

Update a product. Send at least one field.

Permesso: business_pages

Parametri del percorso

  • idobbligatoriointeger

    Product ID.

Corpo JSON

  • nameopzionalestring

    1–500 characters.

  • descriptionopzionalestring | null

    Up to 20,000 characters.

  • priceopzionalenumber | string | null

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

  • original_priceopzionalenumber | string | null

    Price before discount. Same format as price.

  • currencyopzionalestring | null

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

  • skuopzionalestring | null

    Up to 200 characters.

  • brandopzionalestring | null

    Up to 200 characters.

  • in_stockopzionaleboolean | null

    Whether the product is available.

  • stock_quantityopzionaleinteger | null

    Units in stock, ≥ 0.

  • image_urlopzionalestring (URL) | null

    Main image, up to 2,048 characters.

  • imagesopzionalearray of strings (URL)

    Up to 50 image URLs.

  • urlopzionalestring (URL) | null

    Product page URL.

  • tagsopzionalearray of strings

    Up to 100 tags, 100 characters each.

  • categoriesopzionalearray of strings

    Up to 100 categories, 100 characters each.

DELETE
/products/:id

Delete a product.

Permesso: business_pages

Parametri del percorso

  • idobbligatoriointeger

    Product ID.