# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/customs/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/customs/check-declaration-status \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/customs/get-exchange-rates \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/customs/get-statistics \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/customs/get-tariff-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/customs/get-tariff-products-by-hs-code \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/customs/get-vessel-movements \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/customs/search-company \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/customs/search-tariff \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.