Public REST API • v1

Build with the AS-Mart API

Integrate AS-Mart product listings, categories, collections, blog content, widgets and published buying guides into approved websites, applications and internal tools.

HTTPS + JSON Version 1 Optional API key Maximum count 50

Overview

The AS-Mart API provides selected public product and content data. It can return featured products, latest products, popular items, deals, category products, collections, related products, blog posts and published guide pages.

Product responses intentionally exclude stored price, list-price, currency, customer-rating and rating-count fields. Public image values are also restricted to images that are safe for public use.

Use buyUrl for the tracked outbound retailer redirect and productUrl for the AS-Mart product detail page.

JSON Responses

Versioned endpoints return structured JSON.

Rate Limited

Public endpoints are protected by request limits.

Tracked Links

Use buyUrl when an outbound product link is needed.

Base URLs

Use version 1 endpoints for new integrations.

https://as-mart.com/api/v1/products
https://as-mart.com/api/v1/categories
https://as-mart.com/api/v1/collections
https://as-mart.com/api/v1/blogs
https://as-mart.com/api/v1/widgets
https://as-mart.com/api/v1/seopages

Authentication

Anonymous public requests can be sent without credentials. Production integrations can use an API key in the X-API-Key request header when account-specific limits or lifecycle management are required.

Public request

No authentication header is required for endpoints that permit anonymous access.

API-key request

Send X-API-Key: YOUR_API_KEY with the request.

Keep API keys on the server. Do not publish production keys in JavaScript, repositories, screenshots or client-side configuration.

Product API Endpoints

Product endpoints expose the current compliance-safe public product DTO.

Method Endpoint Resource Functionality
GET /api/v1/products/featured?count=12 Products Featured active products.
GET /api/v1/products/latest?count=12 Products Latest active products.
GET /api/v1/products/popular?count=12 Products Popular products based on site engagement.
GET /api/v1/products/deals?count=12 Deals Products marked as Deal of the Day.
GET /api/v1/products/random?count=6 Widgets Random active products.
GET /api/v1/products/search?q=watch&count=12 Search Search products by supported text fields.
GET /api/v1/products/category/{categorySlug}?count=12 Category Products from a category slug.
GET /api/v1/products/brand/{brand}?count=12 Brand Products from a specific brand.
GET /api/v1/products/related/{slug}?count=12 Related Related products using category overlap and engagement.
GET /api/v1/products/collection/{collectionSlug}?count=12 Collection Products from a public collection.
GET /api/v1/products/home-widget?count=8 Widget Featured, deals, popular and latest product groups.
GET /api/v1/products/promote/{slug} Single Single active product for a promotion placement.
GET /api/v1/products/{slug} Single Single active product by SEO slug.
The count parameter is limited by the API. Public product responses do not expose stored price or customer-rating data.

Category API

Method Endpoint Resource Functionality
GET /api/v1/categories Categories Returns public categories.
GET /api/v1/products/category/{categorySlug}?count=12 Products Returns products for a category.

Collection API

Method Endpoint Resource Functionality
GET /api/v1/collections Collections Returns public collections.
GET /api/v1/products/collection/{collectionSlug}?count=12 Products Returns products from a collection.

Blog API

Method Endpoint Resource Functionality
GET /api/v1/blogs/latest?count=6 Blogs Returns latest published AS-Mart blog posts.

Combined Widget API

Use the combined endpoint when a page needs several public AS-Mart resources in one request.

Method Endpoint Resource Functionality
GET /api/v1/widgets/home?productCount=8&blogCount=6&categoryCount=12&collectionCount=8&guideCount=8 Combined Returns product groups, blogs, categories, collections and published guides.

SEO Pages API

These endpoints expose published AS-Mart guide pages.

Method Endpoint Resource Functionality
GET /api/v1/seopages?page=1&pageSize=20 List Paginated published SEO pages.
GET /api/v1/seopages/{slug} Single One published SEO page.
GET /api/v1/seopages/latest?count=20 Latest Newest published SEO pages.
GET /api/v1/seopages/random?count=10 Widget Random published SEO pages.
GET /api/v1/seopages/search?q=laptop&page=1&pageSize=20 Search Searches published page metadata.
GET /api/v1/seopages/filter?category=laptops&brand=Apple&template=best_of Filter Filters pages by supported category, brand, template and keyword options.
GET /api/v1/seopages/category/{categorySlug}?count=20 Category Pages from a selected category.
GET /api/v1/seopages/categories Categories Available SEO page categories.
GET /api/v1/seopages/related/{slug}?count=10 Related Related SEO pages.
GET /api/v1/seopages/home-widget?count=8 Widget Combined guide-page sections.
GET /api/v1/seopages/stats Stats Published SEO page statistics.
GET /api/v1/seopages/sitemap Sitemap Public guide URLs and update dates.
GET /api/v1/seopages/templates Templates Available SEO page template keys.
GET /api/v1/seopages/template/{template}?count=20 Template Pages from a template key.
GET /api/v1/seopages/brands Brands Available SEO page brands.
GET /api/v1/seopages/brand/{brand}?count=20 Brand Pages for a selected brand.
GET /api/v1/seopages/ai?q=best+laptop&count=10 Search Compact search-oriented guide results.
SEO page responses do not expose price-range fields or price-based sorting options.

Response Models

Product Response

Field Type Description
id int Product ID.
title string Product title.
slug string SEO slug.
shortDescription string? Short product description.
brand string? Product brand when available.
mainImageUrl string? Public-safe product image URL or local fallback.
productUrl string AS-Mart product detail URL.
buyUrl string Tracked outbound retailer redirect.
isFeatured bool Featured status.
isDealOfTheDay bool Deal flag.
clickCount int AS-Mart engagement count.
categories string[] Associated category names.
Stored product price, list price, currency, customer rating and rating-count properties are intentionally excluded from the public product response.

Common Status Codes

200

Success

The request completed successfully.

400

Bad Request

A query parameter or request value is invalid.

404

Not Found

The requested resource could not be found.

429

Rate Limited

The request limit has been exceeded.

500

Server Error

An unexpected server error occurred.

Product JSON Response

[
  {
    "id": 101,
    "title": "Example Product Title",
    "slug": "example-product-title",
    "shortDescription": "Short product description here.",
    "brand": "Example Brand",
    "mainImageUrl": "https://as-mart.com/images/no-image.png",
    "productUrl": "https://as-mart.com/product/example-product-title",
    "buyUrl": "https://as-mart.com/product/go/101",
    "isFeatured": true,
    "isDealOfTheDay": false,
    "clickCount": 250,
    "categories": [
      "Electronics",
      "Smart Devices"
    ]
  }
]

Home Widget Response

{
  "featured": [],
  "deals": [],
  "popular": [],
  "latest": []
}

JavaScript Fetch Example

fetch("https://as-mart.com/api/v1/products/home-widget?count=6")
  .then(response => response.json())
  .then(data => {
      console.log(data.featured);
      console.log(data.deals);
      console.log(data.popular);
      console.log(data.latest);
  })
  .catch(error => {
      console.error("API Error:", error);
  });

ASP.NET Core HttpClient Example

public class AsMartApiService
{
    private readonly HttpClient _httpClient;

    public AsMartApiService(HttpClient httpClient)
    {
        _httpClient = httpClient;
    }

    public async Task<ProductHomeWidgetApiDto> GetHomeWidgetAsync()
    {
        var result =
            await _httpClient.GetFromJsonAsync<ProductHomeWidgetApiDto>(
                "https://as-mart.com/api/v1/products/home-widget?count=8");

        return result ?? new ProductHomeWidgetApiDto();
    }
}

ASP.NET Core with API Key

builder.Services.AddHttpClient<AsMartApiService>(client =>
{
    client.BaseAddress = new Uri("https://as-mart.com/");
    client.DefaultRequestHeaders.Accept.ParseAdd("application/json");
    client.DefaultRequestHeaders.Add(
        "X-API-Key",
        configuration["AsMartApi:ApiKey"]);
});