# Customs — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Check import/export duties, tariff classifications, and exchange rates for Maldives customs compliance, plus track vessel movements, company registrations, and declaration statuses. Get real-time data directly from the official customs portal to streamline your trade and logistics operations.

**Category:** Government & Public Data | **Website:** [customs.gov.mv/](https://customs.gov.mv/) | **Docs:** [parse.bot/marketplace/383c1ea1-f1ef-4b53-86fc-ab584753c9d7/customs-gov-mv-api](https://parse.bot/marketplace/383c1ea1-f1ef-4b53-86fc-ab584753c9d7/customs-gov-mv-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-customs-gov-mv-api-383c1ea1/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### check_declaration_status

Check the status of a customs declaration by form number and consignment number. Returns status history or empty array if not found.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `consig_no` | string | Yes | Consignment number (e.g. 'C1234') |
| `form_no` | string | Yes | Form number in format X/NNNN/NNXX with 3 parts separated by forward slashes (e.g. 'R/1234/00MP') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-customs-gov-mv-api-383c1ea1/check_declaration_status \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"consig_no":"<string>","form_no":"<string>"}'
```

### get_exchange_rates

Retrieve current customs-accepted exchange rates for all supported currencies in Maldivian Rufiyaa (MVR).

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-customs-gov-mv-api-383c1ea1/get_exchange_rates \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_statistics

Retrieve metadata for published import and export statistics reports. Returns report titles and download URLs organized by import and export categories.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-customs-gov-mv-api-383c1ea1/get_statistics \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_tariff_details

Get detailed tariff information for a specific product identified by product_id from search_tariff results. Returns HS code, description, unit, and all duty rates.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_id` | string | Yes | Product ID from search_tariff results (e.g. '13327') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-customs-gov-mv-api-383c1ea1/get_tariff_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_id":"<string>"}'
```

### get_tariff_products_by_hs_code

Get all commodity products sharing the same HS code. Returns rate metadata and a list of products under that code.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `hscode` | string | Yes | HS code from search_tariff hscode_for_more field (e.g. '1006200010') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-customs-gov-mv-api-383c1ea1/get_tariff_products_by_hs_code \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hscode":"<string>"}'
```

### get_vessel_movements

Retrieve recent vessel arrivals and departures at Maldivian ports with operator, IMO, origin, destination, ETA, and manifest details.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-customs-gov-mv-api-383c1ea1/get_vessel_movements \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_company

Search for companies registered with Maldives Customs Service by name or keyword. Returns matching companies with registration details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Company name or keyword to search (e.g. 'import', 'shipping') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-customs-gov-mv-api-383c1ea1/search_company \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### search_tariff

Search the Maldives Customs tariff database by keyword or HS code. Returns matching items with standard duty rates, SAFTA preferential rates, and CMFTA preferential rates. Each result carries a product_id for detail lookup and an hscode_for_more for related-product exploration.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword or HS code prefix (e.g. 'rice', '1006') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-customs-gov-mv-api-383c1ea1/search_tariff \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
