All Sources
GET
https://rebuyengine.com/api/v1/sourcesUse Cases
Third-party app integrations can use this endpoint to provide a drop down list of endpoints that the merchant can pick from within the app.
Query Parameters¶
key· string · required- Your Rebuy public API key. Find this in your Rebuy admin under Settings → API Keys.
format· string- Valid values: pretty. Use pretty to make the response easy to read.
Code Example¶
// GET https://rebuyengine.com/api/v1/sources/
const API_KEY = "YOUR_PUBLIC_API_KEY";
const params = new URLSearchParams({
key: API_KEY,
format: "pretty"
});
fetch(`https://rebuyengine.com/api/v1/sources/?${params}`)
.then(response => response.json())
.then(data => console.log(data));
Response Examples¶
200 OK¶
{
"data": [
{
"id": "/api/v1/products/recommended",
"name": "Recommended Products",
"description": "Returns AI-based product recommendations",
"protocol": "https",
"host": "rebuyengine.com",
"path": "/api/v1/products/recommended",
"query": [
{
"name": "shopify_product_ids",
"required": false,
"default": null,
"description": "Comma separated list of Shopify product IDs.",
"example": "123,456"
},
{
"name": "limit",
"required": false,
"default": null,
"description": "Used to limit the number of results returned.",
"example": "10"
}
]
},
{
"id": "/api/v1/products/top_sellers",
"name": "Top Sellers",
"description": "Returns a list of top selling products",
"protocol": "https",
"host": "rebuyengine.com",
"path": "/api/v1/products/top_sellers",
"query": [
{
"name": "shopify_collection_id",
"required": false,
"default": null,
"description": "Shopify collection ID. If provided, products belonging to this collection will be returned.",
"example": "123456"
},
{
"name": "limit",
"required": false,
"default": null,
"description": "Used to limit the number of results returned.",
"example": "10"
}
]
}
]
}
Response Structure
The response includes all available data sources for your merchant account, including built-in sources (Recommended, Top Sellers, etc.) and any custom data sources you've configured.
400 Bad Request¶
--- title: All Sources excerpt: Returns a list of available data sources for the given merchant. api: file: rebuy-sources.json operationId: sources deprecated: false hidden: false metadata: title: '' description: '' robots: index next: description: '' --- ## GET /api/v1/sources !!! note "Use Cases" Third-party app integrations can use this endpoint to provide a drop down list of endpoints that the merchant can pick from within the app. ## Query Parameters `key` · string · required : Your Rebuy public API key. Find this in your Rebuy admin under [**Settings → API Keys**](https://rebuyengine.com/account/keys). `format` · string : Valid values: pretty. Use pretty to make the response easy to read. ## Code Example ```javascript // GET https://rebuyengine.com/api/v1/sources/ const API_KEY = "YOUR_PUBLIC_API_KEY"; const params = new URLSearchParams({ key: API_KEY, format: "pretty" }); fetch(`https://rebuyengine.com/api/v1/sources/?${params}`) .then(response => response.json()) .then(data => console.log(data)); ``` ## Response Examples ### 200 OK ```json { "data": [ { "id": "/api/v1/products/recommended", "name": "Recommended Products", "description": "Returns AI-based product recommendations", "protocol": "https", "host": "rebuyengine.com", "path": "/api/v1/products/recommended", "query": [ { "name": "shopify_product_ids", "required": false, "default": null, "description": "Comma separated list of Shopify product IDs.", "example": "123,456" }, { "name": "limit", "required": false, "default": null, "description": "Used to limit the number of results returned.", "example": "10" } ] }, { "id": "/api/v1/products/top_sellers", "name": "Top Sellers", "description": "Returns a list of top selling products", "protocol": "https", "host": "rebuyengine.com", "path": "/api/v1/products/top_sellers", "query": [ { "name": "shopify_collection_id", "required": false, "default": null, "description": "Shopify collection ID. If provided, products belonging to this collection will be returned.", "example": "123456" }, { "name": "limit", "required": false, "default": null, "description": "Used to limit the number of results returned.", "example": "10" } ] } ] } ``` !!! info "Response Structure" The response includes all available data sources for your merchant account, including built-in sources (Recommended, Top Sellers, etc.) and any custom data sources you've configured. ### 400 Bad Request ```json { "error": "Missing key" } ```
See something that needs updating?
Suggest an edit