LOADING

initializing...

Pariette

Basket & Checkout

Sepet ve Ödeme işlemleri e-ticaretin kalbidir. Pariette, güvenli ve esnek bir sepet yönetimi sunar. Ziyaretçileriniz üye olmadan da (Guest) sepet oluşturabilir.

1) Get Cart

Mevcut kullanıcının (veya misafirin) sepetini görüntülemek için kullanılır. Eğer kullanıcı giriş yapmadıysa, tarayıcıda saklanan session_id ile sepet eşleştirilir.
Request Example
cURL Requestbash
curl --location --request GET 'https://live.pariette.com/api/public/shopping/cart' 
--header 'ParietteToken: {YOUR_API_TOKEN}' 
--header 'Authorization: Bearer {USER_TOKEN} (Opsiyonel)' 
--header 'X-Guest-Id: {SESSION_ID}'
Response Examplejson
{
    "status": true,
    "data": {
        "id": "cart_12345",
        "items": [
            {
                "product_id": 101,
                "title": "Kablosuz Kulaklık",
                "quantity": 1,
                "price": 1500.00,
                "total": 1500.00
            }
        ],
        "subtotal": 1500.00,
        "total": 1500.00,
        "currency": "TRY"
    }
}

2) Add to Cart

Sepete ürün eklemek veya mevcut ürünün miktarını güncellemek için kullanılır.
Request Example
cURL Requestbash
curl --location --request POST 'https://live.pariette.com/api/public/shopping/cart' 
--header 'ParietteToken: {YOUR_API_TOKEN}' 
--header 'Content-Type: application/json' 
--data-raw '{
  "product_id": 101,
  "quantity": 1,
  "variant_id": null
}'
Response Examplejson
{
    "status": true,
    "message": "Ürün sepete eklendi",
    "data": { ...cart_object }
}

3) Remove from Cart

Sepetten bir ürünü tamamen kaldırmak için kullanılır.
Request Example
cURL Requestbash
curl --location --request DELETE 'https://live.pariette.com/api/public/shopping/cart/{item_id}' 
--header 'ParietteToken: {YOUR_API_TOKEN}'
Response Examplejson
{
    "status": true,
     "message": "Ürün sepetten çıkarıldı",
    "data": { ...updated_cart }
}

4) Checkout (Complete Order)

Sepeti siparişe dönüştürmek ve ödeme sürecini başlatmak için kullanılır. Fatura ve teslimat adresleri bu aşamada gönderilmelidir.
Request Example
cURL Requestbash
curl --location --request POST 'https://live.pariette.com/api/public/shopping/checkout' 
--header 'ParietteToken: {YOUR_API_TOKEN}' 
--header 'Authorization: Bearer {USER_TOKEN}' 
--header 'Content-Type: application/json' 
--data-raw '{
  "billing_address_id": 5,
  "shipping_address_id": 5,
  "payment_method": "credit_card"
}'
Response Examplejson
{
    "status": true,
    "message": "Sipariş oluşturuldu",
    "data": {
        "order_id": 999,
        "redirect_url": "https://pariette.com/payment/..."
    }
}