Media Jay Basket API - v2 (2025-07-21)

The basket API provides shopping baskets. It is designed fast access for a big amount of users.

Authentication

To access the endpoints you require a X-API-Key in the header. Partners, please contact Transfermedia to retrieve one.

All endpoints are protected with a standard Authentication Bearer JWT token. We provide two mechanisms here:

  1. A JWT token provided on partner side. Signature validation is required. This allows comfort functions like:

    • the customer id to prevent users to re-enter their data multiple times
    • a payment token to checkout with a single click

    This requires:

    • that the JWT token can be validated on partners side.
    • the user id is specified in the 'sub' field of the payload.
    • optionally a static issuer is specified in the 'iss' field of the payload.
    • optionally a static audience is specified in the 'aud' field of the payload.
  2. A JWT token and a user id is generated on an endpoint in the basket api for guest users. In such a case the basket has some limitations:

    • the basket is a fresh one (filled only with the products specified)
    • no comfort functions are available
    • the JWT token expires after 30 days

Versioning

To use a specific implementation version of this API place it to the request header X-API-Version. If the header is missed the latest implementation version 2025-07-21 is used. The response header X-API-Version contains the implementation version the request was processed with.

Shopping basket

A shopping basket contains three product lists:

  • cart: holding up to 20 products planned to buy
  • saved: holding the products to remember for later usage (aka wishlist)
  • checkout: holding the products currently in the order process (in the active checkout session) Products can be added, updated and deleted to/from the cart or saved list.

Products

Products are represented by a product identifier with an order count. A product can be a main product or a product variant (e.g. a shoe in a specific size).

Checkout session

When the user decides to start the order process the checkout is the first step in the order process. It communicates with the payment service provider (PSP) responsible to manage the payment. If the payment succeeds an order process starts in the background.

Transfer basket

The API provides the ability to transfer a basket e.g., to a web shop. Optionally a QR code image can be created to be presented to a customer. For security reasons the transfer needs to be finished within 1 minute.

Further documentation

For further details please visit the documentation or contact Transfermedia support@transfermedia.de.

Download OpenAPI description
Languages
Servers
Development Server

https://docs.jay-metadata.com/_mock/apis/basket/latest/openapi/

Guest Baskets

Operations

Creates a fresh guest shopping basket.

Request

Creates a fresh guest (aka anonymous) shopping basket. If the query parameter "jayToken" is specified this methods creates the credentials to access a transferred basket.

Products can be added directly to this basket. Some restrictions apply on a guest basket:
- no comfort functions are available
- a guest basket is accessible for 30 days
If you add the same product multiple times they become a single product entry in the basket.

Query
jayTokenstring(Jay transfer token)

The Jay transfer token to access a transferred basket.

Headers
X-API-Keystring(X-Api-Key)required

Required. API access key for authorized use of the checkout endpoints. Partners, please contact Transfermedia to retrieve a valid key.

__Secure-jay_trackingstring( Secure-Jay Tracking)

Tracking session header for user tracking and analytics. This is set by the /playouts/tracking/session endpoint.

Example: __Secure-jay_tracking=eyJzZX...
x-jay-api-versionstring(X-Jay-Api-Version)

The version of the API to use. Defaults to 2025-07-21.

Default 2025-07-21
Bodyapplication/json
productsArray of objects(products)

The products to initially add to the freshly created guest basket. If you add identical products multiple times they are merged together to one product entry in the basket.

curl -i -X POST \
  'https://docs.jay-metadata.com/_mock/apis/basket/latest/openapi/baskets/guests?jayToken=string' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: string' \
  -H '__Secure-jay_tracking: __Secure-jay_tracking=eyJzZX...' \
  -H 'x-jay-api-version: 2025-07-21' \
  -d '{
    "products": [
      {
        "productId": "string",
        "count": 1
      }
    ]
  }'

Responses

Successfully updated the basket comfort settings

Bodyapplication/json
dataobject(The response data)

Represents the keys to operate with the guest basket

Example: {"userId":"string","jwtToken":"string"}
nextTokenstring(Next token)

The token, which can be used to retrieve the next page of data.

errorobject(The error response)

Represents a data response with a possible error.

Response
application/json
{ "data": { "userId": "string", "jwtToken": "string" } }

Basket Operations

Operations

Product Operations

Operations

Product Details

Operations

Checkout Sessions

Operations

Basket Transfer

Operations

API information

Operations