Pico DocsSandbox

DocsCustom store

Integration guide

Custom store

Use this when the shop is not Shopify or Shopware. Any language can implement the same HTTP API. Pico syncs the catalog, then the widget answers from that index.

Widget embedHTTP API

Widget embed

The script mounts the assistant on the storefront. It talks to Pico. It does not read your database and it does not place orders by itself.

The embed does

  • Open the chat on your site
  • Send the shopper’s question to Pico
  • Show products Pico already synced

The embed does not

  • Discover products that were never synced
  • Replace your catalog or checkout
  • Call your cart unless you implement the cart endpoint
Storefront embed
<script
  src="https://api.picofinds.com/pico-widget.js"
  data-public-widget-id="pw_..."
  data-api-url="https://api.picofinds.com/api/v1"
  defer
></script>

HTTP API

Expose these routes on your store. Pico calls them with the API token you save in the dashboard. Search in chat uses the synced catalog first and calls your search route only when that index is empty.

MethodPathPurpose
GET/pico/healthConnection test
GET/pico/products?cursor=&limit=Catalog pages for sync
GET/pico/products/search?q=Live search fallback
GET/pico/products/{id}One product
GET/pico/variants/{id}/availabilityStock check
POST/pico/cart/itemsOptional add to cart

Product JSON

List and search responses use { data: [ product, ... ], next_cursor }. A product looks like this:

Product
{
  "id": "sku-100",
  "name": "Trail boot",
  "active": true,
  "url": "https://shop.example/products/trail-boot",
  "image_url": "https://shop.example/images/trail-boot.jpg",
  "price": { "amount_minor": 14900, "currency": "EUR" },
  "availability": { "status": "in_stock", "quantity": 4 },
  "variants": [
    {
      "id": "sku-100-42",
      "sku": "TB-42",
      "attributes": { "Size": "42" },
      "price": { "amount_minor": 14900, "currency": "EUR" },
      "availability": { "status": "in_stock", "quantity": 4 }
    }
  ]
}

Sync, then embed

  1. Save the store

    In the dashboard, choose Custom store and enter the base URL plus the API token.

  2. Test the connection

    Pico calls GET /pico/health. A 200 response marks the store connected.

  3. Sync the catalog

    Pico pages through GET /pico/products and indexes products for the assistant.

  4. Embed the widget

    Paste the script on the storefront with the public widget id from the dashboard.

Add to cart

Add to cart appears only when POST /pico/cart/items is implemented. The body is { variant_id, quantity, cart_token, idempotency_key }. Return { success, message, cart_id }. If you skip this route, shoppers can still browse recommendations.

← Back to the docs overview

Custom store · Pico Docs