Record a product, voucher, or course sale from an external storefront into Phorest using the Purchase API

domain: developer.phorest.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. POST to /third-party-api-server/api/business/{businessId}/branch/{branchId}/purchase with a unique number, the paying clientId, one or more items, and a single payments entry.
  2. For a retail product sale (e.g., from WooCommerce or Shopify), check stock and pricing first via the Product API, then submit the sale as a purchase item so Phorest decrements inventory and includes it in reporting.
  3. For a gift card/voucher sale, include voucher data on the purchase item instead of a product/service — Phorest auto-generates a serial number if one isn't supplied and requires a future expiry date.
  4. Set outstandingBalancePayment to true (with staffId and price) to post the purchase against a client's credit account rather than taking payment immediately.
  5. Handle the 201 response for a successful purchase, or the 400 response if the supplied payment doesn't cover the item total at Phorest's currently configured tax rates.

Known gotchas

Related routes

List and update a client's purchased course packages using Phorest's Client Course endpoint
developer.phorest.com · 5 steps · unrated
access phorest client and sales data for marketing and reporting use cases
developer.phorest.com · 5 steps · unrated
Export bulk transaction, sundries, DATEV, or client-course data from Phorest asynchronously via the CSV Export Job endpoint
developer.phorest.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans