# API Endpoints for Row Management

## **Overview of API Endpoints for Rows**

Beefree SDK provides robust APIs for managing rows. These API endpoints enable operations such as saving, retrieving, syncing, merging, and organizing rows, making them essential for maintaining design consistency and managing shared rows.

## **Row-Related API endpoints**

1. **Merge Rows API endpoints**
   * **Purpose**: Updates linked rows across multiple designs by replacing outdated content with new versions. Ideal for batch-updating designs or maintaining consistent synced rows.
2. **Synced Rows API endpoint**
   * **Purpose**: Retrieves all rows marked as "synced," ensuring centralized tracking of synced rows across templates.
3. **Index Rows API endpoint**
   * **Purpose**: Generates metadata for template rows, enabling better organization and search capabilities. Create structured catalogs of rows with attributes like categories, names, or tags.

### **Row Endpoints and Descriptions**

**Merge Rows**

**Endpoint**: `POST https://api.beefree.io/v1/{collection}/merge-rows`

{% openapi src="/files/4IgdMOAKgWISC6FHzDyy" path="/v1/{collection}/merge-rows" method="post" %}
[merge\_rows\_endpoint.yaml](https://806400411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8c7XIQHfAtM23Dp3ozIC%2Fuploads%2F4cMnaERKBH7M5lsaw5AP%2Fmerge_rows_endpoint.yaml?alt=media\&token=2cbdfbb6-62f3-4a78-b40f-b735884788ba)
{% endopenapi %}

**Index Rows**

**Endpoint**: `POST https://api.beefree.io/v1/{collection}/merge/index`

{% openapi src="/files/WSnAH22DdLreLJHQ3c0k" path="/v1/{collection}/merge/index" method="post" %}
[merge\_index\_endpoint.yaml](https://806400411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8c7XIQHfAtM23Dp3ozIC%2Fuploads%2FOhOESfswZoZeZylnpEtt%2Fmerge_index_endpoint.yaml?alt=media\&token=4e5c25b3-9df6-495c-a5ea-5d8758bfb2d0)
{% endopenapi %}

**Retrieve Synced Rows**

**Endpoint**: `POST https://api.beefree.io/v1/{collection}/synced-rows`

{% openapi src="/files/DR0Jz51rugSwEuvjz2oX" path="/v1/{collection}/synced-rows" method="post" %}
[synced\_rows\_endpoint.yaml](https://806400411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8c7XIQHfAtM23Dp3ozIC%2Fuploads%2Fncx0rZyHII0wTdvkEFZ0%2Fsynced_rows_endpoint.yaml?alt=media\&token=a48ebaa0-df7f-4738-bac1-92b8c7c50680)
{% endopenapi %}

## Workflow Example

1. **Retrieve Synced Rows**: Use the `Synced Rows` endpoint to identify synced rows across designs.
2. **Modify a Synced Row**: Update the row and submit changes using the `Merge Rows` endpoint.
3. **Verify Updates**: Confirm that updates are reflected in all linked templates based on the `Merge Rows` response.


---

# Agent Instructions: 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://docs.beefree.io/beefree-sdk/~/changes/s6kaGu3uaMgmVVo1sL8X/rows/api-endpoints.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.
