PromptSwing Buy API

The Buy API from PromptSwing — 2 operation(s) for buy.

GitHub OpenAPI

Operations 2

POST /api/buy/quote Price an order from one store #
POST /api/buy/complete Complete a quoted order — QUOTES AND REFUSES TO CHARGE TODAY #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/promptswing-com:promptswing-com-buy-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

promptswing-com-buy-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PromptSwing public commerce Buy API
  version: 1.0.0
  description: 'Endpoints an agent can call with no client, no account and no authorisation: check a site you have just built before publishing it anywhere, search products across hosted PromptSwing stores, and price an order from one of them. Nothing here creates an account, holds a basket, takes a payment, or keeps anything you send.'
  contact:
    url: https://www.promptswing.com/contact
servers:
- url: https://api.promptswing.com
  description: Production
tags:
- name: Buy
paths:
  /api/buy/quote:
    post:
      operationId: quoteOrder
      summary: Price an order from one store
      description: 'Reads the catalogue live, checks availability, prices the parcel, and states a total.


        **NOTHING IS RESERVED.** The response says so in its own words: this is a price at a moment, not a reservation, and the items can be bought by someone else until the order is paid. A machine that can create a cart can create ten thousand, so nothing is held before payment.


        One purchase is one merchant. There is no cross-store basket and no shape here that could express one. Shipping, where it applies, carries its own label saying whether it is an exact or an approximate carrier quote; that label is never set here.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteRequest'
      responses:
        '200':
          description: A quote, valid for a stated moment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Quote'
        '400':
          description: merchant_id or items missing.
        '403':
          description: This store does not sell through this path.
        '409':
          description: Nothing in the order can be bought.
      tags:
      - Buy
  /api/buy/complete:
    post:
      operationId: completeOrder
      summary: Complete a quoted order — QUOTES AND REFUSES TO CHARGE TODAY
      description: '**Read this before depending on it: this endpoint cannot currently take a payment, and says so rather than pretending.**


        Everything before the charge is live and runs: the quote is re-validated, availability is checked again immediately before the charge, and the price is re-checked — a total that has moved is refused, never adjusted. It then returns a refusal naming which of two external conditions is unmet, and hands back the store''s own checkout URL so a person can complete the purchase.


        The two conditions are not PromptSwing''s to satisfy: the payment provider must enable agent payments for the platform, and each merchant must agree to sell that way — a consent that may never be given on a merchant''s behalf.


        When it does charge: the buyer''s own agent issues a payment credential scoped to one seller, one currency and one amount. **That credential IS the customer''s confirmation.** No field on this request can assert that a customer approved anything, deliberately — there is nothing to send. PromptSwing never holds a payment credential and never sees a card.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompleteRequest'
      responses:
        '200':
          description: The purchase already made, returned again — a retry is never a second order.
        '400':
          description: quote_id missing, or a payment credential is required and absent.
        '404':
          description: No such quote.
        '409':
          description: The quote expired, or the order can no longer be filled at the quoted price. Nothing was charged.
        '501':
          description: 'The agent payment step is not built. Nothing was charged and nothing was held.

            '
        '503':
          description: Agent payment is not enabled for this store. The order was priced and is still available.
      tags:
      - Buy
components:
  schemas:
    QuoteRequest:
      type: object
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true
    Quote:
      type: object
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true
    CompleteRequest:
      type: object
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true