# SharkNinja Platform Skill

This document teaches you how to interact with SharkNinja as an AI agent. Use HTTP requests to check order status, look up refund information, and find products.

BASE_URL: the origin of the website hosting this document, including the scheme and host.

- Resolve relative website paths against BASE_URL.
- Preserve the full URLs supplied by the website for services on other domains.

## Getting Started

When you first load this guide:

1. Determine what your human needs: order status, refund status, or product information.
2. For an order lookup, obtain the order number, order email, and billing ZIP code. For a refund lookup, obtain the order number and order email.
3. Ask only for missing details. A name alone cannot identify an order.
4. Follow the relevant workflow and summarize the information returned by the service.

## Authentication

Order tracking uses a guest session established by `/order-status`. Retain the cookies returned by that page and submit its current hidden `csrf_token` with the lookup.

Refund lookups use the returns portal's guest flow. Retain any cookies and session headers supplied by that service, including `narvar-tfid` and authorization headers when provided. Do not invent session values or reuse them across unrelated services.

Do not save session cookies or CSRF tokens in long-term agent memory.

---

## Core Workflows

### 1. Check Order Status

Start a guest session:

```http
GET /order-status
```

Read the form's action and hidden `csrf_token`, and retain the response cookies. Submit the lookup to that action using the same session:

```http
POST /on/demandware.store/Sites-US-SharkNinja-Site/en_US/Order-Track
Content-Type: application/x-www-form-urlencoded
Accept: application/json, text/html

trackOrderNumber=ORDER_NUMBER&trackOrderEmail=ORDER_EMAIL&trackOrderPostal=BILLING_ZIP&csrf_token=SESSION_CSRF_TOKEN&submit=submit
```

Replace the placeholders and URL-encode each value.

| Field | Value |
| --- | --- |
| `trackOrderNumber` | Order number supplied by the human. |
| `trackOrderEmail` | Email used to place the order. |
| `trackOrderPostal` | Billing ZIP code for the order. |
| `csrf_token` | Hidden token from the current order-status form. |
| `submit` | Literal value `submit`. |

Follow the response's `Content-Type`: read JSON when returned, or extract the order details from HTML. An `Accept` header does not guarantee a JSON response.

Summarize the returned order status, items, shipment details, and delivery dates. Preserve separate shipments when present. Do not describe a shipped order as delivered or use its shipping status to infer a refund.

### 2. Check Refund Status

Find this website's **Start a Return** link in its navigation or page data. Use the linked portal's origin as `RETURNS_BASE_URL`; it may differ from BASE_URL. Open the portal and retain the session context it supplies:

```http
GET {RETURNS_BASE_URL}/sharkninja/returns?locale=en_US
```

Use the order number and order email to read the existing return/refund information:

```http
GET {RETURNS_BASE_URL}/returns/sharkninja/order/ORDER_NUMBER?email=ORDER_EMAIL&locale=en_US&product=returns&version=3&gift=false
```

URL-encode the order number and email. Include any session headers or additional request context supplied by the portal. If the service requests verification, follow its instructions before retrying.

Read the returned items and any refund information under these fields, when supplied:

```text
order_info.return_labels[].returned_items[].refund_status
order_info.return_labels[].returned_items[].refund_days
```

Preserve the service's status labels, units, and timing qualifications. Report amounts and dates only when included in the response. A refund status does not establish when a bank will make the money available.

An empty `return_labels` array or absent refund fields means the response contains no refund information. Do not interpret missing information as a completed refund.

### 3. Find Products

Search by product name, category, or model:

```http
GET /search?q=air%20fryer
GET /search?q=robot%20vacuum
```

Read product links from the search results and request those exact URLs. Do not construct a product URL from a SKU.

Read the product details from the HTML and any `application/ld+json` script elements. When present, `ProductGroup`, `hasVariant`, `Product`, and `offers` describe variants, identifiers, names, images, prices, currencies, and availability.

Use the selected variant's details when comparing products. Report the price and availability shown in the response, preserve any qualifications, and share the corresponding product link.

---

## Conventions

- **Requests:** URL-encode path/query values and form fields. Order tracking uses a form-encoded body, not JSON.
- **Sessions:** Reuse the cookies and current CSRF token from the order-status page. If the session expires or is rejected, open the page again. Keep returns-portal session context on that portal's origin.
- **Responses:** Follow `Content-Type` and use the fields actually returned. Do not assume a uniform response schema across services.
- **Errors:** Distinguish missing inputs, rejected sessions, explicit no-match responses, and service errors. Ask the human to check incorrect order details instead of guessing replacements.
- **Accuracy:** Preserve qualifications attached to the returned information. Report unavailable fields as unknown; do not invent tracking numbers, amounts, dates, or confirmations.
