The platform specific user identifier representing a user.
Media Jay Basket API - v2 (2025-09-15)
The basket API provides shopping baskets. It is designed fast access for a big amount of users.
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:
- 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.
 
- 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
 
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-09-15 is used. The response header X-API-Version contains the implementation version the request was processed with.
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 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).
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.
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.
For further details please visit the documentation or contact Transfermedia support@transfermedia.de.
https://live.basket.api.jay-metadata.com/v2/
Request
Assigns a product to the shopping basket. If the product exists it will be overwritten.
- A product with an order "count" == 0 will be added to the saved list (and removed from cart).
- A product with an order "count" > 0 will be added to the cart (and removed from saved list).
Note that at max 20 products can be put into the cart.
Required. API access key for authorized use of the checkout endpoints. Partners, please contact Transfermedia to retrieve a valid key.
Tracking session header for user tracking and analytics. This is set by the /playouts/tracking/session endpoint.
- Production serverhttps://live.basket.api.jay-metadata.com/v2/baskets/users/{userId}/products/{productId} 
- cURL
- JS
- Node.js
- Python
- Java
curl -i -X POST \
  'https://live.basket.api.jay-metadata.com/v2/baskets/users/{userId}/products/{productId}?provider_id=netflix' \
  -H 'Authorization: Bearer <YOUR_Bearer_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: string' \
  -H 'X-JAY-Tracking: eyJzZXNzaW9uX2lkIjoiZXhhbXBsZS1zZXNzaW9uLWlkLTEyMzQiLCJzdGFydF90aW1lIjoiMjAyNS0wMS0wMVQxMjowMDowMC4wMDAwMDAiLCJzb3VyY2UiOiJqYXkuYXBpLnBsYXlvdXQuZXhhbXBsZSJ9' \
  -H 'x-jay-api-version: 2025-09-15' \
  -d '{
    "count": 0
  }'Successfully assigned a product to the shopping basket.
The response data.
{ "data": { "expires": "2025-06-29T08:12:34Z", "lastChanged": "2025-06-04T12:34:56Z", "cart": [ … ], "saved": [ … ], "checkout": [ … ] } }
Required. API access key for authorized use of the checkout endpoints. Partners, please contact Transfermedia to retrieve a valid key.
Tracking session header for user tracking and analytics. This is set by the /playouts/tracking/session endpoint.
- Production serverhttps://live.basket.api.jay-metadata.com/v2/baskets/users/{userId}/products/{productId} 
- cURL
- JS
- Node.js
- Python
- Java
curl -i -X DELETE \
  'https://live.basket.api.jay-metadata.com/v2/baskets/users/{userId}/products/{productId}?provider_id=netflix' \
  -H 'Authorization: Bearer <YOUR_Bearer_HERE>' \
  -H 'X-API-Key: string' \
  -H 'X-JAY-Tracking: eyJzZXNzaW9uX2lkIjoiZXhhbXBsZS1zZXNzaW9uLWlkLTEyMzQiLCJzdGFydF90aW1lIjoiMjAyNS0wMS0wMVQxMjowMDowMC4wMDAwMDAiLCJzb3VyY2UiOiJqYXkuYXBpLnBsYXlvdXQuZXhhbXBsZSJ9' \
  -H 'x-jay-api-version: 2025-09-15'Successfully removed an existing product from the shopping basket.
The response data.
{ "data": { "expires": "2025-06-29T08:12:34Z", "lastChanged": "2025-06-04T12:34:56Z", "cart": [ … ], "saved": [ … ], "checkout": [ … ] } }
Request
Updates an existing product in the shopping basket.
- A product with an order "count" == 0 will be added to the saved list (and removed from cart).
- A product with an order "count" > 0 will be added to the cart (and removed from saved list).
- If the order "count" is None the product is not changed.
Required. API access key for authorized use of the checkout endpoints. Partners, please contact Transfermedia to retrieve a valid key.
Tracking session header for user tracking and analytics. This is set by the /playouts/tracking/session endpoint.
- Production serverhttps://live.basket.api.jay-metadata.com/v2/baskets/users/{userId}/products/{productId} 
- cURL
- JS
- Node.js
- Python
- Java
curl -i -X PATCH \
  'https://live.basket.api.jay-metadata.com/v2/baskets/users/{userId}/products/{productId}?provider_id=netflix' \
  -H 'Authorization: Bearer <YOUR_Bearer_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: string' \
  -H 'X-JAY-Tracking: eyJzZXNzaW9uX2lkIjoiZXhhbXBsZS1zZXNzaW9uLWlkLTEyMzQiLCJzdGFydF90aW1lIjoiMjAyNS0wMS0wMVQxMjowMDowMC4wMDAwMDAiLCJzb3VyY2UiOiJqYXkuYXBpLnBsYXlvdXQuZXhhbXBsZSJ9' \
  -H 'x-jay-api-version: 2025-09-15' \
  -d '{
    "count": 0
  }'Successfully updated an existing product in the shopping basket.
The response data.
{ "data": { "expires": "2025-06-29T08:12:34Z", "lastChanged": "2025-06-04T12:34:56Z", "cart": [ … ], "saved": [ … ], "checkout": [ … ] } }