Quick Order Form için API’ler
Public API’yi kullanarak Quick Order Form’ları, Quick Buy Collection’ları ve Quick Buy Variant tablolarını oluşturun, güncelleyin, listeleyin ve silin.
Bu sayfa, Quick Order Form özellik ailesi için Public API’yi kapsar. Tek bir uç nokta, type alanıyla ayırt edilen üç ilgili kayıt türünün tamamını işler:
quick_order_page: bağımsız bir Quick Order Form sayfası.quick_buy_collection: koleksiyon/ürün kartı sayfalarındaki Quick Buy özelliği.quick_buy_variant: bir ürün sayfasındaki Variant Table.
4 işlemin tamamı, Genel API’ler sayfasında açıklanan aynı temel URL’yi, üstbilgileri ve kimlik doğrulamayı paylaşır.
Kayıt oluşturma
Bölüm başlığı “Kayıt oluşturma”Uç nokta
Bölüm başlığı “Uç nokta”POST https://wholesale.samita.io/api/v1/quick-order-formsİstek üstbilgileri
Bölüm başlığı “İstek üstbilgileri”| Üstbilgi | Açıklama | Zorunlu |
|---|---|---|
X-SAMITA-API-KEY |
Wholesale uygulamasında sağlanan API anahtarı | Evet |
X-SAMITA-SHOP-URL |
xxx.myshopify.com biçiminde Shopify mağaza alan adı | Evet |
CONTENT-TYPE |
application/json olmalıdır |
Evet |
Bu API, oluşturduğunuz type için API anahtarında Create izni gerektirir.
Ortak alanlar (tüm türler)
Bölüm başlığı “Ortak alanlar (tüm türler)”| Alan | Tür | Zorunlu | Açıklama |
|---|---|---|---|
title |
string, en fazla 255 | Evet | Kaydın uygulamadaki adı. |
status |
boolean | Evet | Kaydın etkin olup olmadığı. |
type |
string | Evet | quick_order_page, quick_buy_collection veya quick_buy_variant. |
Kalan zorunlu alanlar type değerine bağlıdır:
| Alan | Tür | Notlar |
|---|---|---|
apply_product |
object (zorunlu) | type: products veya collections. |
apply_product.product_ids |
array | type değeri products olduğunda zorunludur. |
apply_product.collection_ids |
array | type değeri collections olduğunda zorunludur. |
display_on_page |
string (zorunlu) | Bu formun gösterildiği Shopify sayfasının handle değeri. |
pagination |
object (zorunlu) | type: pagination veya load_more_button; per_page: 1–50 arasında bir sayı. |
columns |
object (zorunlu) | product_stock: boolean; stok sütununu gösterir/gizler. |
Örnek:
{ "title": "Wholesale Order Form", "status": true, "type": "quick_order_page", "apply_product": { "type": "collections", "collection_ids": [123456789] }, "display_on_page": "wholesale-order-form", "pagination": { "type": "pagination", "per_page": 20 }, "columns": { "product_stock": true }}| Alan | Tür | Notlar |
|---|---|---|
apply_product |
object (zorunlu) | type: all, products, collections veya product-tags; buna karşılık gelen product_ids / collection_ids / product_tags ile. |
exclude_product |
object (zorunlu) | type: none, products veya collections; buna karşılık gelen kimliklerle. |
apply_customer |
object (zorunlu) | type: all, logged, non-logged veya customer-tags; uygunsa tags ile. |
exclude_customer |
object (zorunlu) | type: none veya customer-tags; uygunsa tags ile. |
display_on_pages |
array (zorunlu) | index, collection, search, another_page değerlerinden herhangi biri. |
columns |
object (zorunlu) | Boolean değerler: stock_status, quantity, variant, volume_discount, add_to_cart. |
Örnek:
{ "title": "Quick Buy on Collections", "status": true, "type": "quick_buy_collection", "apply_product": { "type": "all", "product_ids": [], "product_tags": [], "collection_ids": [] }, "exclude_product": { "type": "none", "product_ids": [], "collection_ids": [] }, "apply_customer": { "type": "customer-tags", "tags": ["wholesale"] }, "exclude_customer": { "type": "none", "tags": [] }, "display_on_pages": ["collection", "index"], "columns": { "stock_status": true, "quantity": true, "variant": true, "volume_discount": true, "add_to_cart": true }}| Alan | Tür | Notlar |
|---|---|---|
apply_product |
object (zorunlu) | quick_buy_collection ile aynı yapı. |
exclude_product |
object (zorunlu) | quick_buy_collection ile aynı yapı. |
apply_customer |
object (zorunlu) | quick_buy_collection ile aynı yapı. |
exclude_customer |
object (zorunlu) | quick_buy_collection ile aynı yapı. |
template |
string (zorunlu) | default veya matrix-column. |
columns |
object (zorunlu) | stock: boolean; stok sütununu gösterir/gizler. |
Örnek:
{ "title": "Variant Table", "status": true, "type": "quick_buy_variant", "apply_product": { "type": "all", "product_ids": [], "product_tags": [], "collection_ids": [] }, "exclude_product": { "type": "none", "product_ids": [], "collection_ids": [] }, "apply_customer": { "type": "logged", "tags": [] }, "exclude_customer": { "type": "none", "tags": [] }, "template": "default", "columns": { "stock": true }}200 – Success, oluşturulan kaydı döndürür. Aşağıdaki Kayıt alma bölümündeki örneğe bakın.
Kayıt güncelleme
Bölüm başlığı “Kayıt güncelleme”PUT https://wholesale.samita.io/api/v1/quick-order-forms/{id}Create ile aynı üstbilgiler. Yalnızca değiştirmek istediğiniz alanları gönderin; title, status, configs ve product_configs isteğe bağlıdır ve belirtilmeyen alanlar mevcut değerini korur. Bu API, Update izni gerektirir.
Kayıt alma
Bölüm başlığı “Kayıt alma”GET https://wholesale.samita.io/api/v1/quick-order-forms/{id}Create ile aynı üstbilgiler, istek gövdesi yok. Bu API, View izni gerektirir.
200 – Success örneği (type: quick_order_page):
{ "id": 1, "title": "Wholesale Order Form", "status": true, "type": "quick_order_page", "apply_product": { "type": "collections", "product_ids": [], "collection_ids": [123456789] }, "display_on_page": "wholesale-order-form", "pagination": { "type": "pagination", "per_page": 20 }, "columns": { "product": true, "product_stock": true, "quantity": true, "action": true }, "created_at": "2026-01-15T10:00:00", "updated_at": "2026-01-15T10:00:00"}Kayıt silme
Bölüm başlığı “Kayıt silme”DELETE https://wholesale.samita.io/api/v1/quick-order-forms/{id}Create ile aynı üstbilgiler. Silinecek kayıt kimliklerinin virgülle ayrılmış listesi olan bir ids parametresi iletin (sorgu dizesi parametresi veya JSON gövde alanı olarak), örneğin ids=1,2,3. Bu API, Delete izni gerektirir.
200 – Success:
{ "success": true}Hata yanıtları
Bölüm başlığı “Hata yanıtları”4 uç noktanın tamamı, Public API’nin geri kalanıyla aynı hata yanıtlarını paylaşır; 401 Unauthorized, 403 Forbidden ve 429 Too Many Requests için Genel API’ler sayfasına bakın.