# Gets the shopping basket of the specified user. Retrieves the shopping basket of a user. An empty basket is returned if it does not exist yet. A shopping basket contains - a cart containing the products to buy - a saved list containing the products to remember for later usage - a checkout list containing the products in the active checkout session Endpoint: GET /baskets/users/{userId} Version: 2025-09-15 Security: Basket-API-Endpoints ## Path parameters: - `userId` (string, required) The platform specific user identifier representing a user. ## Query parameters: - `provider_id` (string) Optional provider identifier to use as a fallback when tracking session is unavailable or does not contain provider information. This ensures tracking events can still be attributed to the correct provider. Example: "netflix" ## Header parameters: - `X-API-Key` (string, required) API access key for authorized use of the checkout endpoints. Partners, please contact Transfermedia to retrieve a valid key. - `X-JAY-Tracking` (string) Tracking session header for user tracking and analytics. This is set by the /playouts/tracking/session endpoint. Example: "eyJzZXNzaW9uX2lkIjoiZXhhbXBsZS1zZXNzaW9uLWlkLTEyMzQiLCJzdGFydF90aW1lIjoiMjAyNS0wMS0wMVQxMjowMDowMC4wMDAwMDAiLCJzb3VyY2UiOiJqYXkuYXBpLnBsYXlvdXQuZXhhbXBsZSJ9" - `x-jay-api-version` (string) The version of the API to use. Defaults to 2025-09-15. ## Response 200 fields (application/json): - `data` (object) The response data. Example: {"expires":"2025-06-29T08:12:34Z","lastChanged":"2025-06-04T12:34:56Z","cart":[{"productId":"prod-123","count":2},{"productId":"prod-456","count":1}],"saved":[{"productId":"prod-789","count":1}],"checkout":[{"productId":"prod-123","count":1},{"productId":"prod-456","count":1}]} - `data.expires` (string) Example: "2025-06-29T08:12:34Z" - `data.lastChanged` (string) Example: "2025-06-04T12:34:56Z" - `data.cart` (array) The list of products in the cart. Example: [{"productId":"prod-123","count":2},{"productId":"prod-456","count":1}] - `data.cart.productId` (string) The product identifier. - `data.cart.count` (integer) The number of products to order. Default is 1. A value above zero place the product in the cart. A value equal to zero places the product in the saved list. - `data.cart.variant` (string) The product variant (e.g. the size). If empty the main product is addressed. - `data.cart.mainProductIdentifier` (string) The identifier of this main product. - `data.saved` (array) The list of saved product identifiers in this basket. Example: [{"productId":"prod-789","count":1}] - `data.checkout` (array) The list of products currently being checked-out Example: [{"productId":"prod-123","count":1},{"productId":"prod-456","count":1}] - `data.checkout.stocked` (integer) The number of products reserved in stock during checkout. A value below zero means that a reservation had failed. If None no reservation has been made because there are unlimited number of products available. - `nextToken` (string) The token, which can be used to retrieve the next page of data. - `error` (object) Details of the error that occurred during the API request, including error code and message. This field is only present when the request results in an error. - `error.code` (integer, required) The API error code Enum: 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 4001, 4002, 5001, 5002, 5003, 5004, 200, 201, 202, 204, 400, 401, 403, 404, 405, 406, 422, 423, 501, 503 - `error.message` (string, required) The API error message. - `error.details` (any) The HTTP error details. ## Response 401 fields (application/json): - `data` (object) The response data. Example: {"expires":"2025-06-29T08:12:34Z","lastChanged":"2025-06-04T12:34:56Z","cart":[{"productId":"prod-123","count":2},{"productId":"prod-456","count":1}],"saved":[{"productId":"prod-789","count":1}],"checkout":[{"productId":"prod-123","count":1},{"productId":"prod-456","count":1}]} - `data.expires` (string) Example: "2025-06-29T08:12:34Z" - `data.lastChanged` (string) Example: "2025-06-04T12:34:56Z" - `data.cart` (array) The list of products in the cart. Example: [{"productId":"prod-123","count":2},{"productId":"prod-456","count":1}] - `data.cart.productId` (string) The product identifier. - `data.cart.count` (integer) The number of products to order. Default is 1. A value above zero place the product in the cart. A value equal to zero places the product in the saved list. - `data.cart.variant` (string) The product variant (e.g. the size). If empty the main product is addressed. - `data.cart.mainProductIdentifier` (string) The identifier of this main product. - `data.saved` (array) The list of saved product identifiers in this basket. Example: [{"productId":"prod-789","count":1}] - `data.checkout` (array) The list of products currently being checked-out Example: [{"productId":"prod-123","count":1},{"productId":"prod-456","count":1}] - `data.checkout.stocked` (integer) The number of products reserved in stock during checkout. A value below zero means that a reservation had failed. If None no reservation has been made because there are unlimited number of products available. - `nextToken` (string) The token, which can be used to retrieve the next page of data. - `error` (object) Details of the error that occurred during the API request, including error code and message. This field is only present when the request results in an error. - `error.code` (integer, required) The API error code Enum: 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 4001, 4002, 5001, 5002, 5003, 5004, 200, 201, 202, 204, 400, 401, 403, 404, 405, 406, 422, 423, 501, 503 - `error.message` (string, required) The API error message. - `error.details` (any) The HTTP error details. ## Response 422 fields (application/json): - `data` (object) The response data. Example: {"expires":"2025-06-29T08:12:34Z","lastChanged":"2025-06-04T12:34:56Z","cart":[{"productId":"prod-123","count":2},{"productId":"prod-456","count":1}],"saved":[{"productId":"prod-789","count":1}],"checkout":[{"productId":"prod-123","count":1},{"productId":"prod-456","count":1}]} - `data.expires` (string) Example: "2025-06-29T08:12:34Z" - `data.lastChanged` (string) Example: "2025-06-04T12:34:56Z" - `data.cart` (array) The list of products in the cart. Example: [{"productId":"prod-123","count":2},{"productId":"prod-456","count":1}] - `data.cart.productId` (string) The product identifier. - `data.cart.count` (integer) The number of products to order. Default is 1. A value above zero place the product in the cart. A value equal to zero places the product in the saved list. - `data.cart.variant` (string) The product variant (e.g. the size). If empty the main product is addressed. - `data.cart.mainProductIdentifier` (string) The identifier of this main product. - `data.saved` (array) The list of saved product identifiers in this basket. Example: [{"productId":"prod-789","count":1}] - `data.checkout` (array) The list of products currently being checked-out Example: [{"productId":"prod-123","count":1},{"productId":"prod-456","count":1}] - `data.checkout.stocked` (integer) The number of products reserved in stock during checkout. A value below zero means that a reservation had failed. If None no reservation has been made because there are unlimited number of products available. - `nextToken` (string) The token, which can be used to retrieve the next page of data. - `error` (object) Details of the error that occurred during the API request, including error code and message. This field is only present when the request results in an error. - `error.code` (integer, required) The API error code Enum: 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 4001, 4002, 5001, 5002, 5003, 5004, 200, 201, 202, 204, 400, 401, 403, 404, 405, 406, 422, 423, 501, 503 - `error.message` (string, required) The API error message. - `error.details` (any) The HTTP error details.