Basket Offers

User-specific basket offers (active, past, upcoming)

List Active Basket Offers

get

Lists the user's active basket offers.

Business Logic:

  • Returns offers whose date range is currently active (start_datetime <= now <= end_datetime)

  • User-specific assigned offers only

  • Offers valid for the active session currency

  • Includes FIXED, PERCENTAGE, SHIPPING_FREE benefit types

Returned Data:

  • total_discount: Sum of amounts for FIXED benefit type offers

  • discounts: Only FIXED benefit type offers

  • all_discounts: All offer types (FIXED, PERCENTAGE, SHIPPING_FREE)

Authorizations
Header parameters
X-CookiestringRequired

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'.

Example: osessionid=abc123
Accept-Languagestring · enumOptional

Language preference (for multilingual content). Supported languages: tr, en, ar, ru, de, fr

Default: trExample: trPossible values:
Responses
200

Successful response

application/json
get
/basket-offers/
GET /account/basket-offers/ HTTP/1.1
Host: sandbox.akinon.com
X-Cookie: osessionid=abc123
Accept: */*
{
  "total_discount": 350,
  "discounts": [
    {
      "label": "New Year Campaign",
      "amount": 200,
      "percentage": null,
      "end_datetime": "2025-12-31T23:59:59Z",
      "start_datetime": "2025-11-01T00:00:00Z",
      "currency": {
        "value": "try",
        "label": "TRY"
      },
      "voucher_code": "NEWYEAR2025",
      "status": {
        "value": "active",
        "label": "Active"
      },
      "offer_type": {
        "value": "coupon_code",
        "label": "Coupon Code"
      },
      "condition": {
        "type": "Amount",
        "value": 90
      },
      "benefit_type": {
        "value": "fixed",
        "label": "Fixed"
      }
    },
    {
      "label": "Welcome Discount",
      "amount": 150,
      "percentage": null,
      "end_datetime": "2025-11-30T23:59:59Z",
      "start_datetime": "2025-11-05T00:00:00Z",
      "currency": {
        "value": "try",
        "label": "TRY"
      },
      "voucher_code": "WELCOME150",
      "status": {
        "value": "active",
        "label": "Active"
      },
      "offer_type": {
        "value": "coupon_code",
        "label": "Coupon Code"
      },
      "condition": {
        "type": "Amount",
        "value": 90
      },
      "benefit_type": {
        "value": "fixed",
        "label": "Fixed"
      }
    }
  ],
  "all_discounts": [
    {
      "label": "New Year Campaign",
      "amount": 200,
      "percentage": null,
      "end_datetime": "2025-12-31T23:59:59Z",
      "start_datetime": "2025-11-01T00:00:00Z",
      "currency": {
        "value": "try",
        "label": "TRY"
      },
      "voucher_code": "NEWYEAR2025",
      "status": {
        "value": "active",
        "label": "Active"
      },
      "offer_type": {
        "value": "coupon_code",
        "label": "Coupon Code"
      },
      "condition": {
        "type": "Amount",
        "value": 90
      },
      "benefit_type": {
        "value": "fixed",
        "label": "Fixed"
      }
    },
    {
      "label": "Welcome Discount",
      "amount": 150,
      "percentage": null,
      "end_datetime": "2025-11-30T23:59:59Z",
      "start_datetime": "2025-11-05T00:00:00Z",
      "currency": {
        "value": "try",
        "label": "TRY"
      },
      "voucher_code": "WELCOME150",
      "status": {
        "value": "active",
        "label": "Active"
      },
      "offer_type": {
        "value": "coupon_code",
        "label": "Coupon Code"
      },
      "condition": {
        "type": "Amount",
        "value": 90
      },
      "benefit_type": {
        "value": "fixed",
        "label": "Fixed"
      }
    },
    {
      "label": "Free Shipping",
      "amount": 0,
      "percentage": null,
      "end_datetime": "2025-11-15T23:59:59Z",
      "start_datetime": "2025-11-01T00:00:00Z",
      "currency": {
        "value": "try",
        "label": "TRY"
      },
      "voucher_code": "FREESHIP",
      "status": {
        "value": "active",
        "label": "Active"
      },
      "offer_type": {
        "value": "coupon_code",
        "label": "Coupon Code"
      },
      "condition": {
        "type": "Amount",
        "value": 90
      },
      "benefit_type": {
        "value": "fixed",
        "label": "Fixed"
      }
    },
    {
      "label": "20% Discount",
      "amount": 0,
      "percentage": 20,
      "end_datetime": "2025-11-20T23:59:59Z",
      "start_datetime": "2025-11-05T00:00:00Z",
      "currency": {
        "value": "try",
        "label": "TRY"
      },
      "voucher_code": "DISCOUNT20",
      "status": {
        "value": "active",
        "label": "Active"
      },
      "offer_type": {
        "value": "coupon_code",
        "label": "Coupon Code"
      },
      "condition": {
        "type": "Amount",
        "value": 90
      },
      "benefit_type": {
        "value": "fixed",
        "label": "Fixed"
      }
    }
  ]
}

List Expired Basket Offers

get

Lists the user's expired basket offers (past promotions).

Business Logic:

  • Offers satisfying end_datetime < now

  • User-specific assignments

  • Valid for the active session currency

Authorizations
Query parameters
pageinteger · min: 1Optional

Page number (starts from 1)

Default: 1Example: 1
page_sizeinteger · min: 1Optional

Number of records per page

Default: 10Example: 10
Header parameters
X-CookiestringRequired

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'.

Example: osessionid=abc123
Accept-Languagestring · enumOptional

Language preference (for multilingual content). Supported languages: tr, en, ar, ru, de, fr

Default: trExample: trPossible values:
Responses
200

Successful response

application/json
get
/expired-basket-offers/
GET /account/expired-basket-offers/ HTTP/1.1
Host: sandbox.akinon.com
X-Cookie: osessionid=abc123
Accept: */*
{
  "count": 25,
  "next": "https://sandbox.akinon.com/account/expired-basket-offers/?page=2",
  "previous": null,
  "results": [
    {
      "label": "October Campaign",
      "amount": 100,
      "percentage": null,
      "end_datetime": "2025-10-31T23:59:59Z",
      "start_datetime": "2025-10-01T00:00:00Z",
      "currency": {
        "value": "try",
        "label": "TRY"
      },
      "voucher_code": "OCTOBER100",
      "status": {
        "value": "active",
        "label": "Active"
      },
      "offer_type": {
        "value": "coupon_code",
        "label": "Coupon Code"
      },
      "condition": {
        "type": "Amount",
        "value": 90
      },
      "benefit_type": {
        "value": "fixed",
        "label": "Fixed"
      }
    },
    {
      "label": "End of Summer Offer",
      "amount": 0,
      "percentage": 15,
      "end_datetime": "2025-09-30T23:59:59Z",
      "start_datetime": "2025-09-01T00:00:00Z",
      "currency": {
        "value": "try",
        "label": "TRY"
      },
      "voucher_code": "SUMMER15",
      "status": {
        "value": "active",
        "label": "Active"
      },
      "offer_type": {
        "value": "coupon_code",
        "label": "Coupon Code"
      },
      "condition": {
        "type": "Amount",
        "value": 90
      },
      "benefit_type": {
        "value": "fixed",
        "label": "Fixed"
      }
    }
  ]
}

List Future Basket Offers

get

Lists the user's future basket offers (scheduled promotions not yet started).

Business Logic:

  • Offers satisfying start_datetime > now

  • User-specific assignments

  • Valid for the active session currency

  • Supports pagination

Notes:

  • These offers cannot yet be applied to the basket

  • Informational only

  • Sorting by ascending start date (start_datetime ASC) is recommended

Authorizations
Query parameters
pageinteger · min: 1Optional

Page number (starts from 1)

Default: 1Example: 1
page_sizeinteger · min: 1Optional

Number of records per page

Default: 10Example: 10
Header parameters
X-CookiestringRequired

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'.

Example: osessionid=abc123
Accept-Languagestring · enumOptional

Language preference (for multilingual content). Supported languages: tr, en, ar, ru, de, fr

Default: trExample: trPossible values:
Responses
200

Successful response

application/json
get
/future-basket-offers/
GET /account/future-basket-offers/ HTTP/1.1
Host: sandbox.akinon.com
X-Cookie: osessionid=abc123
Accept: */*
{
  "count": 8,
  "next": null,
  "previous": null,
  "results": [
    {
      "label": "December Mega Campaign",
      "amount": 500,
      "percentage": null,
      "end_datetime": "2025-12-31T23:59:59Z",
      "start_datetime": "2025-12-01T00:00:00Z",
      "currency": {
        "value": "try",
        "label": "TRY"
      },
      "voucher_code": "DECEMBER500",
      "status": {
        "value": "active",
        "label": "Active"
      },
      "offer_type": {
        "value": "coupon_code",
        "label": "Coupon Code"
      },
      "condition": {
        "type": "Amount",
        "value": 90
      },
      "benefit_type": {
        "value": "fixed",
        "label": "Fixed"
      }
    },
    {
      "label": "Winter Discount",
      "amount": 0,
      "percentage": 25,
      "end_datetime": "2025-12-20T23:59:59Z",
      "start_datetime": "2025-11-15T00:00:00Z",
      "currency": {
        "value": "try",
        "label": "TRY"
      },
      "voucher_code": "WINTER25",
      "status": {
        "value": "active",
        "label": "Active"
      },
      "offer_type": {
        "value": "coupon_code",
        "label": "Coupon Code"
      },
      "condition": {
        "type": "Amount",
        "value": 90
      },
      "benefit_type": {
        "value": "fixed",
        "label": "Fixed"
      }
    }
  ]
}

Last updated

Was this helpful?