Multi Basket
Session-based authentication using osessionid cookie
Successfully retrieved basket list
GET /baskets/basket-list/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
Successfully retrieved basket list
{
"baskets": [
{
"pk": 123,
"namespace": "main"
},
{
"pk": 124,
"namespace": "wishlist"
},
{
"pk": 125,
"namespace": null
}
]
}Session-based authentication using osessionid cookie
CSRF token for state-changing requests (POST/PUT/PATCH/DELETE)
Primary key (ID) of the basket to set as main
Successfully set basket as main
Basket not found
POST /baskets/basket-list/id/{pk}/main/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
{
"basket": {
"pk": 123,
"namespace": "main",
"total_quantity": 3,
"total_amount": 89.97,
"total_discount_amount": 0,
"total_product_amount": 89.97,
"basketitem_set": [
{
"id": 456,
"product": {
"pk": 789,
"sku": "MSE-001-BLK",
"name": "Wireless Mouse",
"base_code": "MSE-001",
"product_type": "simple",
"productimage_set": [
{
"image": "https://example.com/images/mouse.jpg"
},
{
"image": "https://example.com/images/mouse-side.jpg"
}
],
"attributes": {
"color": "Black",
"brand": "TechPeripherals",
"connectivity": "Wireless 2.4GHz"
},
"is_active": true,
"attribute_set": 1
},
"quantity": 3,
"unit_price": 29.99,
"price": 89.97,
"retail_price": 29.99,
"discounted_price": null,
"tax_rate": 0.18,
"currency_type": "try",
"total_amount": 89.97,
"discount_amount": 0,
"stock": 100,
"attributes": {},
"attributes_kwargs": {},
"shipping_discount": 0,
"offer_badges": [],
"image": "https://example.com/images/mouse.jpg",
"parent": null,
"datasource": null,
"extra_product_stock_detailed": null,
"extra_product_price_detailed": null
}
],
"discounts": [],
"voucher_code": null,
"unavailable_basket_products": [],
"upsell_details": [],
"created_date": "2025-01-15T10:30:00Z",
"modified_date": "2025-01-15T10:30:00Z",
"segment": null
}
}Session-based authentication using osessionid cookie
Primary key (ID) of the basket
Successfully retrieved detailed discounts
Description of the discount
10% off on electronicsDiscount amount
5.99Type of discount application result that determines what the discount affects.
Application types:
basket- Discount applied to basket items (reduces product prices)shipping- Discount applied to shipping costs (free or reduced shipping)post_order- Discount applied after order completion (cashback, loyalty points)sample_product- Free sample product added to basket as promotional item
Usage in responses:
- Basket discounts reduce the total_amount
- Shipping discounts appear in shipping_discount field on items
- Sample products appear as separate basket items with special pricing
- Post-order benefits are tracked separately for future application
basketPossible values: Sample products for the discount
Allowed quantity for the discount
5Basket not found
GET /baskets/basket-list/id/{pk}/detailed_discounts/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
[
{
"description": "10% off electronics",
"discount": "15.00",
"affects": "basket",
"sample_products": [],
"allowed_quantity": 5
},
{
"description": "Free sample with purchase",
"discount": "0.00",
"affects": "item",
"sample_products": [
{
"name": "Sample Product",
"sku": "SAMPLE001"
}
],
"allowed_quantity": 1
}
]Session-based authentication using osessionid cookie
CSRF token for state-changing requests (POST/PUT/PATCH/DELETE)
Namespace identifier for the basket. Use "null" for baskets with null namespace.
Successfully set basket as main
Basket not found for the specified namespace
POST /baskets/basket-list/ns/{namespace}/main/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
{
"basket": {
"pk": 124,
"namespace": "main",
"total_quantity": 2,
"total_amount": 59.98,
"total_discount_amount": 0,
"total_product_amount": 59.98,
"basketitem_set": [
{
"id": 457,
"product": {
"pk": 790,
"sku": "CBL-001-WHT",
"name": "USB Cable",
"base_code": "CBL-001",
"product_type": "simple",
"productimage_set": [
{
"image": "https://example.com/images/cable.jpg"
},
{
"image": "https://example.com/images/cable-pack.jpg"
}
],
"attributes": {
"color": "White",
"length": "2m",
"type": "USB-C to USB-A"
},
"is_active": true,
"attribute_set": 1
},
"quantity": 2,
"unit_price": 29.99,
"price": 59.98,
"retail_price": 29.99,
"discounted_price": null,
"tax_rate": 0.18,
"currency_type": "try",
"total_amount": 59.98,
"discount_amount": 0,
"stock": 200,
"attributes": {},
"attributes_kwargs": {},
"shipping_discount": 0,
"offer_badges": [],
"image": "https://example.com/images/cable.jpg",
"parent": null,
"datasource": null,
"extra_product_stock_detailed": null,
"extra_product_price_detailed": null
}
],
"discounts": [],
"voucher_code": null,
"unavailable_basket_products": [],
"upsell_details": [],
"created_date": "2025-01-15T08:45:00Z",
"modified_date": "2025-01-15T08:45:00Z",
"segment": null
}
}Session-based authentication using osessionid cookie
CSRF token for state-changing requests (POST/PUT/PATCH/DELETE)
Unique identifier of the basket to delete
Basket successfully deleted (no content returned)
No content
Basket not found
DELETE /baskets/basket-list/{basket_id}/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
No content
Session-based authentication using osessionid cookie
Namespace identifier for the basket. Use "null" for baskets with null namespace.
Successfully retrieved basket details
Basket not found for the specified namespace
GET /baskets/basket/{namespace}/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
{
"basket": {
"pk": 124,
"namespace": "main",
"total_quantity": 3,
"total_amount": 149.95,
"total_discount_amount": 15,
"total_product_amount": 164.95,
"basketitem_set": [
{
"id": 456,
"product": {
"pk": 789,
"sku": "SKU001",
"name": "Sample Product",
"base_code": "SPL-001",
"product_type": "simple",
"productimage_set": [
{
"image": "https://example.com/images/sample.jpg"
},
{
"image": "https://example.com/images/sample-detail.jpg"
}
],
"attributes": {
"category": "Electronics",
"brand": "SampleBrand",
"model": "SP-2025"
},
"is_active": true,
"attribute_set": 1
},
"quantity": 2,
"unit_price": 29.99,
"price": 59.98,
"retail_price": 29.99,
"discounted_price": null,
"tax_rate": 0.18,
"currency_type": "try",
"total_amount": 59.98,
"discount_amount": 0,
"stock": 75,
"attributes": {},
"attributes_kwargs": {},
"shipping_discount": 0,
"offer_badges": [],
"image": "https://example.com/images/sample.jpg",
"parent": null,
"datasource": null,
"extra_product_stock_detailed": null,
"extra_product_price_detailed": null
}
],
"discounts": [],
"voucher_code": null,
"unavailable_basket_products": [],
"upsell_details": [],
"created_date": "2025-01-15T09:00:00Z",
"modified_date": "2025-01-15T11:30:00Z",
"segment": null
}
}Session-based authentication using osessionid cookie
Namespace identifier for the basket. Use "null" for baskets with null namespace.
Successfully retrieved mini basket information
Basket unique identifier
124Total quantity of items in basket
3Basket not found for the specified namespace
GET /baskets/basket/{namespace}/mini/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
{
"pk": 124,
"total_quantity": 3
}Last updated
Was this helpful?

