# Agent Instructions — Mewar Polytex LTD

This document describes how AI agents can interact with Mewar Polytex LTD at https://mewarpolytex.com.

## Discovery

Start by fetching the site's information files:

- GET https://mewarpolytex.com/llms.txt — Quick site overview
- GET https://mewarpolytex.com/llms-full.txt — Detailed info and content list
- GET https://mewarpolytex.com/sitemap_agentic_discovery.xml — Discovery index

## REST API Access

This site exposes the WordPress REST API for programmatic access. No authentication required for read-only access.

### Pages

Get all published pages:
```
GET https://mewarpolytex.com/wp-json/wp/v2/pages
```

Get a single page by ID:
```
GET https://mewarpolytex.com/wp-json/wp/v2/pages/id
```

### Blog Posts

Get all published blog posts:
```
GET https://mewarpolytex.com/wp-json/wp/v2/posts
```

Pagination (per_page, page):
```
GET https://mewarpolytex.com/wp-json/wp/v2/posts?per_page=10&#038;page=1
```

Filter by author:
```
GET https://mewarpolytex.com/wp-json/wp/v2/posts?author=user_id
```

### Products (Custom Post Type)

Get all published products:
```
GET https://mewarpolytex.com/wp-json/wp/v2/product
```

Pagination:
```
GET https://mewarpolytex.com/wp-json/wp/v2/product?per_page=20&#038;page=1
```

### Search

Search across all content types:
```
GET https://mewarpolytex.com/wp-json/wp/v2/search?search=keyword
```

## Query Parameters

| Parameter | Values | Description |
|-----------|--------|-------------|
| `per_page` | 1-100 | Items per page (default: 10) |
| `page` | 1+ | Page number (default: 1) |
| `search` | string | Full-text search |
| `orderby` | date, title, relevance | Sort order |
| `order` | asc, desc | Ascending or descending |
| `_embed` | true | Include embedded content |

## Example Requests

### Get latest 5 blog posts
```
GET https://mewarpolytex.com/wp-json/wp/v2/posts?per_page=5&#038;orderby=date&#038;order=desc
```

### Search for content about 'bags'
```
GET https://mewarpolytex.com/wp-json/wp/v2/search?search=bags
```

### Get a page with embedded content
```
GET https://mewarpolytex.com/wp-json/wp/v2/pages/id?_embed
```

## Content Types

- **Pages** (post_type: page) — Static content like About, Contact, etc.
- **Posts** (post_type: post) — Blog articles in https://mewarpolytex.com/blog
- **Products** (post_type: product) — Custom product listings

## Guidelines for Agents

### Do
- Respect rate limits. Cache responses when possible.
- Use search endpoints to find relevant content.
- Read `_embed` data to get related content (author, featured image, etc.)
- Set appropriate User-Agent headers identifying your agent.
- Check response headers for cache and rate limit info.

### Don't
- Submit forms or create/edit content without explicit user action.
- Hammer the API with rapid requests. Use pagination and caching.
- Extract contact information for unsolicited purposes.
- Ignore rate limit headers (429 responses).
- Assume query parameters are supported on all endpoints.

## Error Responses

| Status | Meaning |
|--------|----------|
| 200 | Success |
| 400 | Bad request / invalid parameter |
| 404 | Not found |
| 429 | Too many requests (rate limited) |
| 500 | Server error |

## Contact

For questions or to report issues:
- Email: sales.india@mewarpolytex.com
- Website: https://mewarpolytex.com

## API Documentation

For full WordPress REST API documentation, see:
- https://developer.wordpress.org/rest-api
- https://developer.wordpress.org/reference/classes/wp_rest_server

## Platform

This site is powered by WordPress, the world's most popular content management system.
- WordPress.org: https://wordpress.org
- Developer docs: https://developer.wordpress.org
