Admin API
Custom endpoints added under /admin.
Everything under /admin requires Medusa's admin authentication. See
Authentication.
GET /admin/gateway-mode
Reports which mode the payment gateway and courier are in. Backs the Gateway mode widget on the admin order list.
Response
{
"payment": { "provider": "Curlec by Razorpay", "mode": "live" },
"fulfillment": { "provider": null, "mode": null }
}provider is null when nothing is configured; mode is live or test for
payments, live or demo for fulfillment.
Read-only, deliberately. No credential is returned — the key id would identify the merchant account and the secret must never leave the server, so the response carries the mode word and nothing else. There is no endpoint to change a mode: that is an environment variable, so a stray click cannot halt every payment or route a real customer through a test gateway.
Medusa's own admin API
Everything else is stock Medusa — products, orders, customers, price lists, promotions, shipping options. Documented at docs.medusajs.com/api/admin.
Working with product tags
Vehicle fitment is stored as product tags. One trap worth stating here because it fails at the type level rather than at runtime:
// Does not work — the tag DTO only carries `value`.
updateProductTags(id, { metadata })
// Use the workflow instead.
import { updateProductTagsWorkflow } from "@medusajs/core-flows"