# Todogift Shipping API (WooCommerce)

Expose simple, authenticated REST endpoints so an external system can retrieve **shipping rates calculated by WooCommerce** for a given shipping address and list of products.

This plugin is primarily built for stores integrating with **Todogift**. It can also be used by any external system that needs authenticated access to WooCommerce-calculated shipping rates.

## Endpoints

- `GET /wp-json/todogift/v1/status` (auth required)
- `GET /wp-json/todogift/v1/shipping/free-shipping-rules` (auth required; core WooCommerce Free shipping min amount rules)
- `POST /wp-json/todogift/v1/shipping/calculate` (auth required)

Each returned rate includes: `id` (e.g. flat_rate:5), `method_id`, `instance_id` (WooCommerce shipping method instance ID), `label`, `cost`, `taxes`.

## Authentication

All endpoints require authentication using **WooCommerce REST API keys**.

For security, always use HTTPS and HTTP Basic Auth when calling the API. Do not transmit API keys over plain HTTP.

