Basket
Session-based authentication using osessionid cookie
Successfully retrieved basket details
GET /baskets/basket/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
Successfully retrieved basket details
{
"basket": {
"pk": 123,
"namespace": null,
"total_quantity": 3,
"total_amount": "149.95",
"total_discount_amount": "15.00",
"total_product_amount": "164.95",
"basketitem_set": [
{
"id": 456,
"quantity": 2,
"unit_price": "29.99",
"price": "29.99",
"retail_price": "39.99",
"discounted_price": "26.99",
"tax_rate": "0.18",
"currency_type": "try",
"total_amount": "53.98",
"discount_amount": "6.00",
"stock": 150,
"attributes": {},
"attributes_kwargs": {},
"shipping_discount": null,
"offer_badges": [],
"image": "https://example.com/images/headphones.jpg",
"parent": null,
"datasource": null,
"extra_product_stock_detailed": null,
"extra_product_price_detailed": null,
"product": {
"pk": 789,
"sku": "PROD-001",
"name": "Premium Wireless Headphones",
"base_code": "AUDIO-HP-001",
"product_type": "simple",
"productimage_set": [
{
"image": "https://example.com/images/headphones.jpg"
},
{
"image": "https://example.com/images/headphones-side.jpg"
}
],
"attributes": {
"color": "Black",
"brand": "TechAudio",
"warranty": "2 years"
},
"is_active": true,
"attribute_set": 1
}
}
],
"discounts": [
{
"description": "10% off electronics",
"discount": "15.00",
"affects": "basket"
}
],
"voucher_code": "SAVE10",
"unavailable_basket_products": [],
"upsell_details": [],
"created_date": "2025-10-23T10:30:00Z",
"modified_date": "2025-10-23T11:45:00Z",
"segment": {
"pk": 1,
"price_list": 10,
"stock_list": 5
}
}
}Session-based authentication using osessionid cookie
CSRF token for state-changing requests (POST/PUT/PATCH/DELETE)
Product ID to add to basket
789Quantity to add (will be added to existing quantity)
2Custom attributes for the basket item (gift notes, form data, etc.)
{"gift_note":"Happy Birthday!"}Datasource/seller ID (required for marketplace)
10Basket namespace to use
mainProduct successfully added to basket
Validation error (invalid product, insufficient stock, etc.)
POST /baskets/basket/ HTTP/1.1
Host: sandbox.akinon.com
Content-Type: application/json
Accept: */*
Content-Length: 28
{
"product": 789,
"quantity": 2
}{
"basket": {
"pk": 123,
"namespace": null,
"total_quantity": 3,
"total_amount": "89.97",
"total_discount_amount": "0.00",
"total_product_amount": "89.97",
"basketitem_set": [
{
"id": 456,
"quantity": 3,
"unit_price": "29.99",
"price": "29.99",
"retail_price": "29.99",
"discounted_price": "29.99",
"tax_rate": "0.18",
"currency_type": "try",
"total_amount": "89.97",
"discount_amount": "0.00",
"stock": 150,
"attributes": null,
"attributes_kwargs": null,
"shipping_discount": null,
"offer_badges": [],
"image": "https://example.com/images/headphones.jpg",
"parent": null,
"datasource": null,
"extra_product_stock_detailed": null,
"extra_product_price_detailed": null,
"product": {
"pk": 789,
"sku": "PROD-001",
"name": "Premium Wireless Headphones",
"base_code": "AUDIO-HP-001",
"product_type": "simple",
"productimage_set": [
{
"image": "https://example.com/images/headphones.jpg"
},
{
"image": "https://example.com/images/headphones-side.jpg"
}
],
"attributes": {
"color": "Black",
"brand": "TechAudio",
"warranty": "2 years"
},
"is_active": true,
"attribute_set": 1
}
}
],
"discounts": [],
"voucher_code": null,
"unavailable_basket_products": [],
"upsell_details": [],
"created_date": "2025-10-23T10:30:00Z",
"modified_date": "2025-10-23T11:45:00Z",
"segment": {
"pk": 1,
"price_list": 10,
"stock_list": 5
}
}
}Session-based authentication using osessionid cookie
CSRF token for state-changing requests (POST/PUT/PATCH/DELETE)
Product ID to set in basket
789Quantity to set (replaces existing quantity, 0 removes item)
3Custom attributes for the basket item
Datasource/seller ID (required for marketplace)
10Basket namespace to use
mainQuantity successfully set
Validation error
PUT /baskets/basket/ HTTP/1.1
Host: sandbox.akinon.com
Content-Type: application/json
Accept: */*
Content-Length: 28
{
"product": 789,
"quantity": 3
}{
"basket": {
"pk": 123,
"namespace": null,
"total_quantity": 3,
"total_amount": "89.97",
"total_discount_amount": "0.00",
"total_product_amount": "89.97",
"basketitem_set": [
{
"id": 456,
"quantity": 3,
"unit_price": "29.99",
"price": "29.99",
"retail_price": "29.99",
"discounted_price": "29.99",
"tax_rate": "0.18",
"currency_type": "try",
"total_amount": "89.97",
"discount_amount": "0.00",
"stock": 150,
"attributes": null,
"attributes_kwargs": null,
"shipping_discount": null,
"offer_badges": [],
"image": "https://example.com/images/headphones.jpg",
"parent": null,
"datasource": null,
"extra_product_stock_detailed": null,
"extra_product_price_detailed": null,
"product": {
"pk": 789,
"sku": "PROD-001",
"name": "Premium Wireless Headphones",
"base_code": "AUDIO-HP-001",
"product_type": "simple",
"productimage_set": [
{
"image": "https://example.com/images/headphones.jpg"
},
{
"image": "https://example.com/images/headphones-side.jpg"
}
],
"attributes": {
"color": "Black",
"brand": "TechAudio",
"warranty": "2 years"
},
"is_active": true,
"attribute_set": 1
}
}
],
"discounts": [],
"voucher_code": null,
"unavailable_basket_products": [],
"upsell_details": [],
"created_date": "2025-10-23T10:30:00Z",
"modified_date": "2025-10-23T11:45:00Z",
"segment": {
"pk": 1,
"price_list": 10,
"stock_list": 5
}
}
}Session-based authentication using osessionid cookie
CSRF token for state-changing requests (POST/PUT/PATCH/DELETE)
All items successfully removed from basket
DELETE /baskets/basket/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
All items successfully removed from basket
{
"basket": {
"pk": 123,
"namespace": "main",
"total_quantity": 0,
"total_amount": "0.00",
"total_discount_amount": "0.00",
"total_product_amount": "0.00",
"basketitem_set": [],
"discounts": [],
"voucher_code": null,
"unavailable_basket_products": [],
"upsell_details": [],
"created_date": "2025-10-23T10:30:00Z",
"modified_date": "2025-10-23T11:45:00Z",
"segment": {
"pk": 1,
"price_list": 10,
"stock_list": 5
}
}
}Session-based authentication using osessionid cookie
CSRF token for state-changing requests (POST/PUT/PATCH/DELETE)
Voucher code to apply
SAVE10Set to true to remove current voucher code
falseExternal offer code (alternative to voucher_code)
EXT-PROMO-2023Voucher code successfully applied or removed
Invalid or expired voucher code
Rate limit exceeded
PATCH /baskets/basket/ HTTP/1.1
Host: sandbox.akinon.com
Content-Type: application/json
Accept: */*
Content-Length: 25
{
"voucher_code": "SAVE10"
}{
"basket": {
"pk": 123,
"namespace": null,
"total_quantity": 3,
"total_amount": "134.95",
"total_discount_amount": "30.00",
"total_product_amount": "164.95",
"basketitem_set": [],
"discounts": [
{
"description": "10% off with code SAVE10",
"discount": "15.00",
"affects": "basket"
}
],
"voucher_code": "SAVE10",
"unavailable_basket_products": [],
"upsell_details": [],
"created_date": "2025-10-23T10:30:00Z",
"modified_date": "2025-10-23T11:45:00Z",
"segment": {
"pk": 1,
"price_list": 10,
"stock_list": 5
}
}
}Session-based authentication using osessionid cookie
Successfully retrieved mini basket summary
Basket unique identifier
123Total quantity of items in basket
5GET /baskets/basket/mini/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
Successfully retrieved mini basket summary
{
"pk": 123,
"total_quantity": 5
}Session-based authentication using osessionid cookie
CSRF token for state-changing requests (POST/PUT/PATCH/DELETE)
Basket item ID to update
456Attributes to update (merged with existing attributes)
{"gift_note":"Updated message"}Apply to all items with same product (default false)
falseAttributes successfully updated
Validation error (item not found, invalid attributes)
PATCH /baskets/basket_items/ HTTP/1.1
Host: sandbox.akinon.com
Content-Type: application/json
Accept: */*
Content-Length: 74
{
"id": 456,
"attributes": {
"gift_note": "Happy Birthday! Hope you enjoy it."
}
}{
"basket": {
"pk": 123,
"namespace": null,
"total_quantity": 3,
"total_amount": 299.98,
"total_discount_amount": 0,
"total_product_amount": 299.98,
"basketitem_set": [
{
"id": 456,
"product": {
"pk": 789,
"sku": "HDN-001-BLK",
"name": "Premium Wireless Headphones",
"base_code": "HDN-001",
"product_type": "simple",
"productimage_set": [
{
"image": "https://example.com/images/headphones.jpg"
},
{
"image": "https://example.com/images/headphones-side.jpg"
}
],
"attributes": {
"color": "Black",
"brand": "TechAudio",
"warranty": "2 years"
},
"is_active": true,
"attribute_set": 1
},
"quantity": 2,
"unit_price": 149.99,
"price": 299.98,
"retail_price": 149.99,
"discounted_price": null,
"tax_rate": 0.18,
"currency_type": "try",
"total_amount": 299.98,
"discount_amount": 0,
"stock": 50,
"attributes": {
"gift_note": "Happy Birthday! Hope you enjoy it."
},
"attributes_kwargs": {},
"shipping_discount": 0,
"offer_badges": [],
"image": "https://example.com/images/headphones.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-15T11:45:00Z",
"segment": null
}
}Session-based authentication using osessionid cookie
Successfully retrieved applicable voucher codes
Response of the applicable discount codes endpoint. Contains the list of voucher/coupon codes that the current user can apply to the current basket.
GET /baskets/applicable-discount-codes/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
Successfully retrieved applicable voucher codes
{
"voucher_codes": [
{
"label": "Welcome 50",
"amount": 50,
"percentage": null,
"end_datetime": "2026-12-31T23:59:59Z",
"start_datetime": "2026-01-01T00:00:00Z",
"currency": {
"value": "try",
"label": "TRY"
},
"voucher_code": "WELCOME50",
"status": {
"value": "active",
"label": "Active"
},
"offer_type": {
"value": "voucher_code",
"label": "Voucher Code"
},
"condition": {
"type": "Amount",
"value": 250
},
"benefit_type": {
"value": "fixed",
"label": "Fixed"
}
},
{
"label": "Member 10%",
"amount": 0,
"percentage": 10,
"end_datetime": "2026-12-31T23:59:59Z",
"start_datetime": "2026-01-01T00:00:00Z",
"currency": {
"value": "try",
"label": "TRY"
},
"voucher_code": "USER-BULK-AB12CD",
"status": {
"value": "active",
"label": "Active"
},
"offer_type": {
"value": "bulk_voucher_code",
"label": "Bulk Voucher Code"
},
"condition": {
"type": "Quantity",
"value": 2
},
"benefit_type": {
"value": "percentage",
"label": "Percentage"
}
}
]
}Last updated
Was this helpful?

