Multi Basket
This method retrieves a list of all active baskets for the current session.
Returns basic information about each basket including the primary key and namespace. This is useful for displaying available baskets to users or for basket management interfaces.
Use Cases:
Display user's available baskets
Basket switching interfaces
Administrative basket overview
Use X-Cookie header instead of Cookie header in "try out" section. Use Cookie header while testing in postman or other tools. Some commerce applications may support 'sesionid' instead of 'osessionid'.
osessionid=abc123Successfully 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
}
]
}This method sets a specific basket as the main/active basket using its primary key (ID).
When a basket is set as main, it becomes the default basket for the current session. The basket's namespace is stored in the user's session for subsequent operations.
Use Cases:
Switch between different user baskets
Set a saved basket as the current active basket
Restore a previous shopping session
CSRF token for state-changing requests (POST/PUT/PATCH/DELETE)
Primary key (ID) of the basket to set as main
Use X-Cookie header instead of Cookie header in "try out" section. Use Cookie header while testing in postman or other tools. Some commerce applications may support 'sesionid' instead of 'osessionid'.
osessionid=abc123Successfully 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
}
}This method retrieves detailed information about discounts applied to a specific basket.
Returns comprehensive discount information including sample products, allowed quantities, and detailed breakdown of promotional benefits. This is particularly useful for understanding complex promotional structures and sample product offerings.
Use Cases:
Display detailed discount information to users
Promotional analysis and reporting
Sample product management
Marketing campaign effectiveness tracking
Primary key (ID) of the basket
Use X-Cookie header instead of Cookie header in "try out" section. Use Cookie header while testing in postman or other tools. Some commerce applications may support 'sesionid' instead of 'osessionid'.
osessionid=abc123Successfully retrieved detailed discounts
Basket 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
}
]This method sets a specific basket as the main/active basket using its namespace identifier.
Namespaces allow for logical separation of baskets (e.g., "main", "wishlist", "saved"). When a basket is set as main by namespace, it becomes the default basket for the current session.
Special handling:
Use "null" as namespace parameter to select baskets with null namespace
The namespace is stored in the user's session for subsequent operations
Use Cases:
Switch between thematic baskets (main cart vs wishlist)
Restore namespace-specific shopping sessions
Multi-store or multi-context basket management
CSRF token for state-changing requests (POST/PUT/PATCH/DELETE)
Namespace identifier for the basket. Use "null" for baskets with null namespace.
Use X-Cookie header instead of Cookie header in "try out" section. Use Cookie header while testing in postman or other tools. Some commerce applications may support 'sesionid' instead of 'osessionid'.
osessionid=abc123Successfully 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
}
}This method permanently deletes a specific basket identified by its ID.
Once deleted, the basket and all its items are removed from the system. This operation cannot be undone, so use with caution.
Use Cases:
Clean up abandoned or unwanted baskets
User-initiated basket deletion
Administrative basket management
Session cleanup operations
CSRF token for state-changing requests (POST/PUT/PATCH/DELETE)
Unique identifier of the basket to delete
Use X-Cookie header instead of Cookie header in "try out" section. Use Cookie header while testing in postman or other tools. Some commerce applications may support 'sesionid' instead of 'osessionid'.
osessionid=abc123Basket successfully deleted (no content returned)
Basket not found
DELETE /baskets/basket-list/{basket_id}/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
No content
This method retrieves comprehensive details about a specific basket using its namespace identifier.
Returns complete basket information including all items, pricing, discounts, and metadata. The endpoint also handles unavailable products by removing them from the basket automatically and applies current promotional offers.
Special handling:
Use "null" as namespace parameter to access baskets with null namespace
Unavailable products are automatically removed from the basket
Promotional offers are automatically applied before returning data
Use Cases:
Display full basket details to users
Checkout page data loading
Basket review and modification interfaces
Order preparation workflows
Namespace identifier for the basket. Use "null" for baskets with null namespace.
Use X-Cookie header instead of Cookie header in "try out" section. Use Cookie header while testing in postman or other tools. Some commerce applications may support 'sesionid' instead of 'osessionid'.
osessionid=abc123Successfully 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
}
}This method retrieves minimal basket information using its namespace identifier.
Returns only essential basket information like primary key and total quantity, optimized for quick loading scenarios such as header cart indicators or navigation elements where full basket details are not needed.
Special handling:
Use "null" as namespace parameter to access baskets with null namespace
Lightweight response for performance-critical scenarios
Use Cases:
Shopping cart icon with item count
Quick basket status checks
Mobile app header indicators
Performance-sensitive basket summaries
Namespace identifier for the basket. Use "null" for baskets with null namespace.
Use X-Cookie header instead of Cookie header in "try out" section. Use Cookie header while testing in postman or other tools. Some commerce applications may support 'sesionid' instead of 'osessionid'.
osessionid=abc123Successfully retrieved mini basket information
Basket 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?

