Skip to content

All Sources

GEThttps://rebuyengine.com/api/v1/sources

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

format · string
Valid values: pretty. Use pretty to make the response easy to read.

Code Example

// GET https://rebuyengine.com/api/v1/sources/
const params = new URLSearchParams({
  format: "pretty"
});

fetch(`https://rebuyengine.com/api/v1/sources/?${params}`)
  .then(response => response.json())
  .then(data => console.log(data));

Response Examples

200 - 200

{
  "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 - 400

{
  "error": "Missing key"
}