Merchant Product API

The Product API allows merchants to create, update, list, and delete products in their store.
All requests require a valid {domain} and must include a valid x-api-key in the request header for authentication.


Endpoints Overview

MethodEndpointDescription
POST/{domain}/merchant/product/addAdd a new product to the store.
GET/{domain}/merchant/product/get/{id}Retrieve details for a specific product.
GET/{domain}/merchant/product/listList products with optional filters.
PUT/{domain}/merchant/product/edit/{id}Update product details.
DELETE/{domain}/merchant/product/delete/{id}Delete a specific product.
DELETE/{domain}/merchant/product/clearDelete all products in the store.

Authentication & Requirements

  • Domain Validation – The {domain} in the route must match a registered merchant domain.
  • API Key Authentication – Include a valid x-api-key header in all requests.
  • Scoped Access – All product actions are tied to the merchant’s store ID, preventing cross-store access.

1. Add Product

Adds a new product to your store.

Example request: Add product

curl -X POST "https://api.waltacheckout.com/{domain}/merchant/product/add" \
  -H "x-api-key: {merchant_api_key}" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "New Product",
    "cost": 49.99,
    "other_specs": { "color": "red", "size": "L" }
  }'

Example Response

{
  "id": "f1a3c7b2-1234-4abc-9ef0-98765dcba321",
  "company_name": "store-alpha",
  "title": "New Product",
  "cost": 49.99,
  "other_specs": { "color": "red", "size": "L" },
  "created_at": "2025-08-03T10:15:30Z",
  "updated_at": "2025-08-03T10:15:30Z"
}

2. Get Product

Retrieves details for a single product by ID.

curl "https://api.waltacheckout.com/{domain}/merchant/product/get/f1a3c7b2-1234-4abc-9ef0-98765dcba321" \
  -H "x-api-key: {merchant_api_key}"

3. List Products

Lists products in the store with optional filters (title, price range, specs).

curl "https://api.waltacheckout.com/{domain}/merchant/product/list?title_filter=shirt&min_cost=20&max_cost=100" \
-H "x-api-key: {merchant_api_key}"

Example Response

{
  "products": [
    {
      "id": "a1b2c3d4",
      "company_name": "store-alpha",
      "title": "Cotton Shirt",
      "cost": 29.99,
      "other_specs": { "color": "blue", "size": "M" },
      "created_at": "2025-08-03T10:15:30Z",
      "updated_at": "2025-08-03T10:15:30Z"
    }
  ],
  "total_count": 1
}

4. Edit Product

Updates product details by ID.

curl -X PUT "https://api.waltacheckout.com/{domain}/merchant/product/edit/f1a3c7b2-1234-4abc-9ef0-98765dcba321" \
  -H "x-api-key: {merchant_api_key}" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Product Name",
    "cost": 59.99
  }'

5. Delete Product

Deletes a specific product by ID.

curl -X DELETE "https://api.waltacheckout.com/{domain}/merchant/product/delete/f1a3c7b2-1234-4abc-9ef0-98765dcba321" \
  -H "x-api-key: {merchant_api_key}"

6. Clear Products

Deletes all products for the given store domain.

curl -X DELETE "https://api.waltacheckout.com/{domain}/merchant/product/clear" \
  -H "x-api-key: {merchant_api_key}"

Features

  • Supports filters for searching products by title, cost, or custom specifications.
  • Allows incremental updates with partial fields in edit requests.
  • Ensures secure access through domain + API key validation.
  • Logs all actions for monitoring and auditing.

Was this page helpful?