# Villampiac Vendor API > Public, API-key-authenticated vendor API. Locale-neutral; clients localize from the stable error `code`. Base URL: https://www.flashmob.market/api/v1 Authentication: send your API key as `Authorization: Bearer vp_live_…` (the `x-api-key` header is also accepted), or an OAuth 2.0 Bearer access token (`Authorization: Bearer …`). OAuth discovery: discover authorization server metadata at `https://www.flashmob.market/.well-known/oauth-authorization-server` (same-origin OAuth discovery using canonical API origin). Tokens require the `vendor` scope. Permissions: each key is `read` or `read_write`. Read endpoints accept any valid key; write endpoints require a `read_write` key. OAuth tokens operate with vendor scope permissions. Error envelope: `{ "error": { "code", "message", "details?", "requestId" } }` — localize from the stable, machine-readable `code`. Buyer discovery: for anonymous marketplace search without vendor credentials, use the public buyer discovery schema at `https://www.flashmob.market/api/discovery/openapi.json`. MCP: the operations below are also exposed as Model Context Protocol tools at `POST https://www.flashmob.market/api/mcp` (supports API key or OAuth Bearer token; tool names = operationIds). ## Endpoints - `GET /analytics` — Ranged sales & traffic analytics (read) - `GET /customers/by-email` — Customer CRM profile by email (read) - `GET /customers/by-phone` — Customer CRM profile by phone (read) - `GET /demand-intelligence` — Demand intelligence around a geo anchor (read) - `GET /events` — List events (read) - `POST /events` — Create an event (write) - `GET /events/{id}` — Get an event (read) - `PATCH /events/{id}` — Update an event (write) - `DELETE /events/{id}` — Delete an event (write) - `POST /events/{id}/check-in` — Check in to an event (write) - `POST /events/{id}/check-out` — Check out of an event (write) - `GET /events/search` — Search joined events (read) - `GET /managed-locations` — List managed locations (read) - `GET /managed-locations/{id}` — Get a managed location (read) - `PATCH /managed-locations/{id}` — Update a managed location (write) - `GET /managed-locations/{id}/images` — List location images (read) - `POST /managed-locations/{id}/images` — Confirm an image upload (write) - `PATCH /managed-locations/{id}/images/{imageId}` — Update a location image (write) - `DELETE /managed-locations/{id}/images/{imageId}` — Delete a location image (write) - `PUT /managed-locations/{id}/images/order` — Reorder location images (write) - `POST /managed-locations/{id}/images/presign` — Presign an image upload (write) - `GET /orders` — List the authenticated vendor's orders. (read) - `POST /orders` — Create a pickup-event preorder for an existing customer. (write) - `GET /orders/{id}` — Fetch one of the authenticated vendor's orders. (read) - `PATCH /orders/{id}/delivery` — Report courier progress on one of the vendor's home-delivery orders. (write) - `POST /orders/{id}/event` — Move one of the authenticated vendor's orders to another pickup event. (write) - `PUT /orders/{id}/items` — Replace an editable order's complete item list. (write) - `GET /orders/{id}/payment-request` — Read an order's payment request and whether a new one can be issued. (read) - `POST /orders/{id}/payment-request` — Issue a payment request for an order and email it to the buyer. (write) - `POST /orders/{id}/payment-request/cancel` — Withdraw an order's open payment request. (write) - `GET /orders/{id}/payment-request/pdf` — Download one of an order's payment requests as a PDF. (read) - `POST /orders/{id}/payment-request/settle` — Mark an order's open payment request as paid. (write) - `POST /orders/{id}/state` — Transition one of the authenticated vendor's orders to a new state. (write) - `PUT /orders/{id}/vendor-note` — Replace the internal vendor note on one of the authenticated vendor's orders. (write) - `GET /orders/by-email` — Find this vendor's orders by exact customer email. (read) - `GET /orders/by-event/{eventId}` — List the authenticated vendor's orders at one event. (read) - `POST /orders/guest` — Create a pickup pre-order for a customer identified by email only. (write) - `GET /products` — List products (read) - `POST /products` — Create a product (write) - `GET /products/{id}` — Get a product (read) - `PATCH /products/{id}` — Update a product (write) - `DELETE /products/{id}` — Delete a product (write) - `GET /reviews` — List reviews (read) - `GET /reviews/{id}` — Get a review (read) - `GET /supplies` — List supplies (read) - `POST /supplies` — Create a supply (write) - `GET /supplies/{id}` — Get a supply (read) - `PATCH /supplies/{id}` — Update a supply (write) - `DELETE /supplies/{id}` — Cancel a supply (write) - `GET /supplies/forecast` — Supply forecast (read) - `POST /supplies/production-close` — Close a production batch (write) - `GET /support/accounts/by-email` — Support: does an account exist for this email, and in what state? (support key) (read) - `GET /support/community-markets/{idOrSlug}` — Support: state of one community market by id or slug (support key) (read) - `POST /support/community-markets/{idOrSlug}/activate` — Support: activate a community market, as the admin button does (support key) (write) - `GET /support/locations/{id}` — Support: a location's organizers, upcoming market days and community markets (support key) (read) - `POST /support/locations/{id}/events` — Support: create market days at a location, optionally with vendors (support key) (write) - `POST /support/locations/{id}/organizers` — Support: invite an existing account to co-organize a location, by email (support key) (write) - `GET /tags` — List product tags (read) - `GET /webhooks` — List webhook endpoints (read) - `POST /webhooks` — Create a webhook endpoint (write) - `DELETE /webhooks/{id}` — Delete a webhook endpoint (write) - `POST /webhooks/{id}/rotate-secret` — Rotate a webhook endpoint's signing secret (write)