MCP endpoint
The Premium Apparel API also speaks MCP (Model Context Protocol), so an AI assistant can call it directly instead of you writing integration code.
It is the same API. Same token, same data, same permissions — every tool below is one of the REST endpoints documented at /docs, and a tool call runs exactly the same code as the equivalent HTTP request. Nothing is accessible through MCP that is not already accessible through REST.
MCP covers sales orders, the product catalogue, and updating existing
products (update_products, which needs the products write permission on your
account). Replacing an order's lines (set_order_lines) and adding lines to one
(add_order_lines) need the line-amendment permission on your account. Purchase orders, creating products and adding images are not available
over MCP and remain REST-only.
https://api.premiumapparel.co.nz/mcp New Zealand
https://api.premiumapparel.com.au/mcp Australia
The host selects the region, exactly as it does for the REST endpoints.
Connecting
Add a custom connector in your AI assistant using just the URL above. There is nothing else to fill in — leave any "advanced" or "OAuth client" fields blank.
| Assistant | Where |
|---|---|
| Claude (web or desktop) | Settings → Connectors → Add custom connector |
| ChatGPT | Settings → Connectors → Add (developer mode) |
When you connect, a Premium Apparel page opens in your browser and asks for your API token — the same one you use for the REST API. Paste it there and the connection completes.
Your assistant never sees that token. It stays with Premium Apparel, and the assistant receives only a limited credential that works for the tools below and nothing else. Revoking your API token disconnects the assistant immediately.
If you do not have an API token, or are unsure where to find yours, contact us.
Command-line clients
Claude Code and other tools that let you set a header can skip the browser step and send the API token directly:
claude mcp add --transport http premium-apparel \
https://api.premiumapparel.co.nz/mcp \
--header "Authorization: Bearer YOUR_API_TOKEN"
curl -s https://api.premiumapparel.co.nz/mcp \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
Both paths reach the same tools with the same permissions.
Tools
| Tool | REST equivalent | Does |
|---|---|---|
create_order |
POST /v1/orders |
Place a sales order |
find_order_by_reference |
GET /v1/orders |
Find an order by your own reference |
get_order |
GET /v1/orders/{id} |
Fetch an order by id |
update_order |
PATCH /v1/orders/{our_ref} |
Amend an existing order's header |
set_order_lines |
PUT /v1/orders/{our_ref}/line-items |
Replace an order's lines with exactly those sent (needs the line-amendment permission) |
add_order_lines |
POST /v1/orders/{our_ref}/line-items |
Add new lines to an order, leaving its existing lines alone (needs the line-amendment permission) |
list_products |
GET /v1/products |
Product catalogue with your pricing |
get_stock |
GET /v1/stock |
Stock levels per size-level SKU |
get_prices |
GET /v1/prices |
Prices per size-level SKU |
update_products |
PUT /v1/products |
Update existing products' attributes (needs the products write permission) |
Purchase orders (/v1/purchase-orders and its line operations), product creation
(POST /v1/products, GET /v1/products/{code}/exists) and image upload
(POST /v1/product-images) have no MCP tool. They are unchanged over REST —
if you are entitled to them, keep calling them over HTTP as you do now.
Tool arguments mirror the REST parameters one-for-one, and your client will show
you the exact schema for each. Full field-level documentation is at
/docs — except update_products, set_order_lines and add_order_lines, which are documented
with the other privileged operations in the partner reference at /docs/partner. Error
codes are at /docs/errors.
Entitlement
The tools above are the whole MCP surface, the same for every customer — there is no setting or token that reveals more of them.
Whether your account may use a given tool is decided when the call is made, just
as over REST. 401 invalid_token means your connection has expired or your API
token was revoked — reconnect the connector. 403 forbidden means your account
is not entitled to that operation: a definitive answer, not a temporary failure,
so retrying will not change it.
Large reads
The catalogue is large — a full unfiltered read runs to megabytes, which is more
than an assistant can usefully hold at once. list_products, get_stock, and
get_prices therefore refuse a response over roughly 256 KB and tell you which
filters would narrow it.
Filter by style, product_id, or sku, or pass since to get only what has
changed since your last call. For genuine bulk export, use the REST endpoint
directly — that is what it is for.
Notes and limits
- Stateless. Every call stands alone; there is no session to open or close.
POSTis the only method the endpoint accepts. - No streaming. Responses are plain JSON. A
GETfor an event stream returns405. - Writes are real.
create_orderplaces a genuine sales order the moment an assistant calls it, andupdate_orderchanges one that already exists. Treat an assistant holding your token as you would a member of staff with the same access, and review what it is about to do before letting it proceed. set_order_linesis the whole list, not an addition. The order ends up with exactly the lines you send. A line you leave out is removed, and removing one with a purchase order raised against it is refused unlessmoved_tonames the order it went to. Fetch the order withget_orderfirst.- To add a line (freight, say), use
add_order_lines. It only adds, so the lines already on the order are untouched, and it works on an order that holds one product on several lines, whichset_order_linesrefuses. It is not safe to repeat: calling it twice adds the lines twice. If a call times out, check the order withget_orderbefore trying again. update_orderonly touches what you name. A field you leave out is left alone. Two of them are not symmetric:comments_appendadds to the internal message and never overwrites it, andshipping_addressreplaces the delivery address whole, so anything omitted from it is cleared.