Skip to content

AskBrendan

Purchase a personal recommendation

POST /api/ask-brendan/orders/{offerId}

x402 v2 exact payment through Monetization Gateway. No request body. PAYMENT-SIGNATURE is a client authorization; PAYMENT-CONTEXT is supplied and verified at the origin only. One generation attempt per offer; ambiguous outcomes require reconciliation, not another payment. No automatic retries.

Markdown · Authoritative OpenAPI

Request policy

Operation
purchaseAskBrendan
Access
x402
Automatic retries
None
Redirects
Returned to the caller without following
Request body limit
No request body
Pagination
No collection iterator

Parameters

offerId string required (uuid)

Responses

200

Recommendation after Gateway settlement; PAYMENT-RESPONSE carries the receipt

application/json

object

Schema details

authorship unknown required

generatedAt string required (date-time)

city string required

occasion string required

limitations string[] required

Schema details

string

selections object[] required

Schema details

object

Schema details

canonicalId string required

title string required

url string required (uri)

role string required

Allowed: "first-choice" | "alternative"

evidence string required

reason string required

400

Request failed; never automatically retry a purchase. Retain the order reference for reconciliation.

application/problem+json

ProblemDetails

Schema details

type string required (uri)

Problem type URI (see /problems/)

title string required

Short human-readable summary

status number required

HTTP status code

detail string required

Human-readable explanation

instance string (uri)

URI reference for this occurrence

402

Gateway payment challenge. PAYMENT-REQUIRED contains Base64-encoded x402 v2 requirements. A direct origin request without context is rejected and cannot issue a Gateway challenge.

Response headers
{
  "PAYMENT-REQUIRED": {
    "schema": {
      "type": "string"
    }
  }
}

403

Request failed; never automatically retry a purchase. Retain the order reference for reconciliation.

application/problem+json

ProblemDetails

Schema details

type string required (uri)

Problem type URI (see /problems/)

title string required

Short human-readable summary

status number required

HTTP status code

detail string required

Human-readable explanation

instance string (uri)

URI reference for this occurrence

409

Request failed; never automatically retry a purchase. Retain the order reference for reconciliation.

application/problem+json

ProblemDetails

Schema details

type string required (uri)

Problem type URI (see /problems/)

title string required

Short human-readable summary

status number required

HTTP status code

detail string required

Human-readable explanation

instance string (uri)

URI reference for this occurrence

410

Request failed; never automatically retry a purchase. Retain the order reference for reconciliation.

application/problem+json

ProblemDetails

Schema details

type string required (uri)

Problem type URI (see /problems/)

title string required

Short human-readable summary

status number required

HTTP status code

detail string required

Human-readable explanation

instance string (uri)

URI reference for this occurrence

413

Request failed; never automatically retry a purchase. Retain the order reference for reconciliation.

application/problem+json

ProblemDetails

Schema details

type string required (uri)

Problem type URI (see /problems/)

title string required

Short human-readable summary

status number required

HTTP status code

detail string required

Human-readable explanation

instance string (uri)

URI reference for this occurrence

415

Request failed; never automatically retry a purchase. Retain the order reference for reconciliation.

application/problem+json

ProblemDetails

Schema details

type string required (uri)

Problem type URI (see /problems/)

title string required

Short human-readable summary

status number required

HTTP status code

detail string required

Human-readable explanation

instance string (uri)

URI reference for this occurrence

422

Request failed; never automatically retry a purchase. Retain the order reference for reconciliation.

application/problem+json

ProblemDetails

Schema details

type string required (uri)

Problem type URI (see /problems/)

title string required

Short human-readable summary

status number required

HTTP status code

detail string required

Human-readable explanation

instance string (uri)

URI reference for this occurrence

429

Request failed; never automatically retry a purchase. Retain the order reference for reconciliation.

application/problem+json

ProblemDetails

Schema details

type string required (uri)

Problem type URI (see /problems/)

title string required

Short human-readable summary

status number required

HTTP status code

detail string required

Human-readable explanation

instance string (uri)

URI reference for this occurrence

502

Request failed; never automatically retry a purchase. Retain the order reference for reconciliation.

application/problem+json

ProblemDetails

Schema details

type string required (uri)

Problem type URI (see /problems/)

title string required

Short human-readable summary

status number required

HTTP status code

detail string required

Human-readable explanation

instance string (uri)

URI reference for this occurrence

503

Request failed; never automatically retry a purchase. Retain the order reference for reconciliation.

application/problem+json

ProblemDetails

Schema details

type string required (uri)

Problem type URI (see /problems/)

title string required

Short human-readable summary

status number required

HTTP status code

detail string required

Human-readable explanation

instance string (uri)

URI reference for this occurrence

504

Request failed; never automatically retry a purchase. Retain the order reference for reconciliation.

application/problem+json

ProblemDetails

Schema details

type string required (uri)

Problem type URI (see /problems/)

title string required

Short human-readable summary

status number required

HTTP status code

detail string required

Human-readable explanation

instance string (uri)

URI reference for this occurrence

Examples

Examples use synthetic fixture values. Replace fixture identifiers with public IDs returned by the service. Request bodies and precise locations are transient; keep them out of logs.

curl

curl --fail-with-body --max-time 30 --max-filesize 16777216 --request POST 'https://irvinebroque.com/api/ask-brendan/orders/00000000-0000-4000-8000-000000000000' --header 'Accept: application/json'

TypeScript

import { PublicApi } from '@irvinebroque/public-api';
const api = new PublicApi();
const result = await api.askBrendan.purchase({
  "offerId": "00000000-0000-4000-8000-000000000000"
});
console.log(result.status, result.headers.get('content-type')); // Keep transient capabilities in memory.

CLI

irvinebroque askBrendan purchase --offer-id '00000000-0000-4000-8000-000000000000'

The SDK preserves status, headers, and the server envelope. A 304 has no fresh body. Errors retain structured problem details; ordinary error messages omit response details. Responses are limited to 16 MiB and requests time out after 30 seconds by default.