> For the complete documentation index, see [llms.txt](https://b2see.gitbook.io/b2see/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://b2see.gitbook.io/b2see/batch-data-api.md).

# Batch Data API

## Purpose

For any organisation that wants to query all meta data linked to a batch to enhance their CRM or reporting functions.

## MyVideos

<mark style="color:blue;">`GET`</mark> `https://app.b2see.co.uk/PublicAPI/MyVideos/v1/cakes/:id`

This endpoint allows you to get all meta data linked to a Batch&#x20;

#### Query Parameters

| Name          | Type    | Description                                              |
| ------------- | ------- | -------------------------------------------------------- |
| customerId    | string  | This is the unique identifier for the account (B2see ID) |
| apiKey        | string  | API key to authenticate the 3rd party                    |
| daysOfHistory | integer | How far back in days the data set will be queri          |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
[ 
 { 
  "BatchId": 1032005, 
  "MarketingContactId": 0, 
  "DateCreated": "2021-05-13T10:53:44Z", 
  "SendingUserName": "Rory Walsh",
  "Title": "TEST SERVICE ", 
  "ProductType": "aftersales_via_portal", 
  "RecipientEmail": "", 
  "RecipientMobile": "", 
  "Data": null, 
  "DateSent": null, 
  "LandingPageFirstWatched": null, 
  "LandingPageLastWatched": null, 
  "LandingPageWatchCount": 0, 
  "CustomerActionState": null, 
  "CustomerActionDate": null, 
  "CustomerActionDescription": null, 
  "CustomerActionPrice": 0, 
  "CustomerActionPriceSuffix": null, 
  "CustomerActionPaymentOutcome": null, 
  "CustomerRating": null, 
  "CustomerRatingAdditional": null, 
  "VideoPlayCount": 1, 
  "ImageLinkClicks": 0, 
  "FacebookClicks": 0, 
  "GoogleClicks": 0 
 } 
]

```

{% endtab %}

{% tab title="404 " %}

```
{
  "Success": false,
  "Message": "CustomerID does not exist"
}

or

{
  "Success": false,
  "Message": "API key not in correct format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://b2see.gitbook.io/b2see/batch-data-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
