{"openapi":"3.1.0","info":{"title":"Legal Fournier Agent Commerce API","version":"1.1.0","description":"Purchase a written legal consultation or a 45-minute consultation from Legal Fournier. Submitting or paying does not create an attorney-client relationship. Professional services begin only after Legal Fournier expressly accepts the engagement.","contact":{"name":"Legal Fournier","url":"https://legalfournier.com/","email":"info@legalfournier.com"},"x-guidance":"This API offers exactly two payable operations: a USD 60 written consultation and a USD 100 45-minute consultation. For a written consultation, POST the intake to /api/commerce/email-consultations/quote, save the returned quoteToken and orderAccessToken, then POST that quoteToken to /api/commerce/email-consultations/submit. For a call, first GET live availability, POST the selected slot and intake to /api/commerce/consultations/45min/quote, save both returned tokens, then POST the quoteToken to /api/commerce/consultations/45min/request. A quote is valid for 10 minutes. Call availability can change, so create the quote immediately before payment. On either payable POST, omit payment credentials on the first attempt to receive HTTP 402. Choose either x402 with USDC on Base or MPP tempo charge with USDC on Tempo, then retry the identical quoteToken request with the protocol credential from the challenge. Keep orderAccessToken private; it is the bearer credential for checking that order. Submit only information needed to answer the legal question and never send identity-document images, passport numbers, complete street addresses, secrets, or emergency matters. Submitting or paying does not create an attorney-client relationship. Professional services begin only after Legal Fournier expressly accepts the engagement."},"servers":[{"url":"https://legalfournier.com","description":"Production"}],"security":[],"tags":[{"name":"Consultations","description":"Quote and purchase Legal Fournier consultations"}],"paths":{"/api/commerce/consultations/45min/availability":{"get":{"tags":["Consultations"],"operationId":"getConsultationAvailability","summary":"Fetch live availability for a 45-minute consultation","security":[],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time"},"description":"Inclusive beginning of the search window"},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time"},"description":"Exclusive end of the search window"},{"name":"timezone","in":"query","required":true,"schema":{"type":"string","example":"Europe/Madrid"},"description":"IANA timezone for returned availability"}],"responses":{"200":{"description":"Available slots and fulfillment mode","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Availability"}}}},"400":{"description":"Invalid date range or timezone"}}}},"/api/commerce/consultations/45min/quote":{"post":{"tags":["Consultations"],"operationId":"quoteCallConsultation","summary":"Create a free quote for a USD 100.00 45-minute consultation","description":"Create the quote only after selecting a currently available slot.","security":[],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallQuoteInput"}}}},"responses":{"201":{"description":"Short-lived signed quote created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"description":"Invalid intake or unavailable slot"},"503":{"description":"Paid calls are temporarily disabled"}}}},"/api/commerce/consultations/45min/request":{"post":{"tags":["Consultations"],"operationId":"payAndRequestCallConsultation","summary":"Pay USD 100.00 and request the quoted 45-minute consultation","description":"Your paid 45-minute consultation is booked. Legal Fournier will email the Cal.com confirmation and next steps.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"100.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}]},"parameters":[{"$ref":"#/components/parameters/PaymentSignature"},{"$ref":"#/components/parameters/MppAuthorization"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteSubmission"}}}},"responses":{"200":{"description":"Payment settled and service completed or durably accepted","headers":{"PAYMENT-RESPONSE":{"schema":{"type":"string"},"description":"Base64-encoded x402 settlement response when x402 was used"},"Payment-Receipt":{"schema":{"type":"string"},"description":"MPP receipt when MPP was used"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaidResult"}}}},"202":{"description":"Payment settled; fulfillment is pending manual completion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaidResult"}}}},"402":{"description":"Payment Required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 v2 payment requirements for USDC on Base"},"WWW-Authenticate":{"schema":{"type":"string"},"description":"MPP Payment challenge for a one-time USDC charge on Tempo"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}}}}},"/api/commerce/email-consultations/quote":{"post":{"tags":["Consultations"],"operationId":"quoteEmailConsultation","summary":"Create a free quote for a USD 60.00 written consultation","description":"Legal Fournier aims to reply within two Monday-Friday business days in Europe/Madrid; public holidays are not excluded.","security":[],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailQuoteInput"}}}},"responses":{"201":{"description":"Short-lived signed quote created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"description":"Invalid intake"},"503":{"description":"Paid written consultations are temporarily disabled"}}}},"/api/commerce/email-consultations/submit":{"post":{"tags":["Consultations"],"operationId":"payAndSubmitEmailConsultation","summary":"Pay USD 60.00 and submit the quoted written consultation","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"60.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}]},"parameters":[{"$ref":"#/components/parameters/PaymentSignature"},{"$ref":"#/components/parameters/MppAuthorization"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteSubmission"}}}},"responses":{"200":{"description":"Payment settled and service completed or durably accepted","headers":{"PAYMENT-RESPONSE":{"schema":{"type":"string"},"description":"Base64-encoded x402 settlement response when x402 was used"},"Payment-Receipt":{"schema":{"type":"string"},"description":"MPP receipt when MPP was used"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaidResult"}}}},"202":{"description":"Payment settled; fulfillment is pending manual completion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaidResult"}}}},"402":{"description":"Payment Required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"Base64-encoded x402 v2 payment requirements for USDC on Base"},"WWW-Authenticate":{"schema":{"type":"string"},"description":"MPP Payment challenge for a one-time USDC charge on Tempo"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}}}}},"/api/commerce/orders/{id}":{"get":{"tags":["Consultations"],"operationId":"getCommerceOrder","summary":"Check a quoted or paid order","security":[{"orderAccessToken":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"orderId returned by a quote or paid operation"}],"responses":{"200":{"description":"Redacted order status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"description":"Missing or invalid order access token"},"404":{"description":"Order not found"}}}}},"components":{"securitySchemes":{"orderAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Send `Bearer <orderAccessToken>` using the opaque orderAccessToken returned when the quote was created"}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":200,"example":"quote-unique-key-0001"},"description":"A unique stable value for safely retrying quote creation"},"PaymentSignature":{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"type":"string"},"description":"x402 credential; omit on the first request to receive the HTTP 402 challenge"},"MppAuthorization":{"name":"Authorization","in":"header","required":false,"schema":{"type":"string","pattern":"^Payment "},"description":"MPP Payment credential; omit on the first request to receive the HTTP 402 challenge"}},"schemas":{"Consent":{"type":"object","additionalProperties":false,"properties":{"explicitConsent":{"type":"boolean","const":true},"acceptsTerms":{"type":"boolean","const":true},"acknowledgesUsdcOnBase":{"type":"boolean","const":true},"acknowledgesNonEmergency":{"type":"boolean","const":true},"acknowledgesNoAttorneyClientRelationship":{"type":"boolean","const":true},"confirmsDataMinimization":{"type":"boolean","const":true}},"required":["explicitConsent","acceptsTerms","acknowledgesUsdcOnBase","acknowledgesNonEmergency","acknowledgesNoAttorneyClientRelationship","confirmsDataMinimization"]},"Availability":{"type":"object","additionalProperties":false,"properties":{"success":{"type":"boolean","const":true},"timezone":{"type":"string"},"durationMinutes":{"type":"integer","const":45},"bookingEnabled":{"type":"boolean"},"fulfillmentMode":{"type":"string","enum":["cal_api","manual"]},"fulfillmentNotice":{"type":"string"},"slots":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}},"required":["start","end"]}}},"required":["success","timezone","durationMinutes","bookingEnabled","fulfillmentMode","fulfillmentNotice","slots"]},"EmailQuoteInput":{"type":"object","additionalProperties":false,"properties":{"customerName":{"type":"string","minLength":2,"maxLength":120},"customerEmail":{"type":"string","format":"email","maxLength":254},"question":{"type":"string","minLength":20,"maxLength":5000,"description":"Do not submit passport numbers, identity-document images, complete street addresses, or other unnecessary sensitive data."},"jurisdiction":{"type":"string","minLength":2,"maxLength":120},"consent":{"$ref":"#/components/schemas/Consent"}},"required":["customerName","customerEmail","question","consent"]},"CallQuoteInput":{"type":"object","additionalProperties":false,"properties":{"customerName":{"type":"string","minLength":2,"maxLength":120},"customerEmail":{"type":"string","format":"email","maxLength":254},"start":{"type":"string","format":"date-time"},"timezone":{"type":"string","example":"Europe/Madrid"},"consent":{"$ref":"#/components/schemas/Consent"}},"required":["customerName","customerEmail","start","timezone","consent"]},"QuoteSubmission":{"type":"object","additionalProperties":false,"properties":{"quoteToken":{"type":"string","minLength":20,"description":"Short-lived token returned by the matching quote operation"}},"required":["quoteToken"]},"Quote":{"type":"object","additionalProperties":false,"properties":{"success":{"type":"boolean","const":true},"orderId":{"type":"string","format":"uuid"},"orderAccessToken":{"type":"string"},"quoteToken":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"network":{"type":"string","const":"eip155:8453"},"amountUsd":{"type":"string"},"amountAtomic":{"type":"string","description":"USDC token atomic units for x402"},"currency":{"type":"string","const":"USDC"},"paymentEndpoint":{"type":"string","format":"uri"}},"required":["success","orderId","orderAccessToken","quoteToken","expiresAt","network","amountUsd","amountAtomic","currency","paymentEndpoint"]},"PaymentRequired":{"type":"object","description":"x402 payment requirements; the equivalent MPP challenge is returned in WWW-Authenticate","additionalProperties":true},"PaidResult":{"type":"object","additionalProperties":true,"properties":{"success":{"type":"boolean"},"orderId":{"type":"string","format":"uuid"},"network":{"type":"string","enum":["eip155:8453","tempo:4217"]},"amount":{"type":"string"},"settlementTransactionHash":{"type":"string"},"baseScanUrl":{"type":"string","format":"uri"},"receiptUrl":{"type":"string","format":"uri"},"fulfillmentStatus":{"type":"string"},"fulfillmentNotice":{"type":"string"}},"required":["success","orderId","network","amount","settlementTransactionHash","receiptUrl","fulfillmentStatus"]},"Order":{"type":"object","additionalProperties":true,"properties":{"success":{"type":"boolean","const":true},"order":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["email","call"]},"state":{"type":"string"},"network":{"type":"string"},"amountUsd":{"type":"string"},"transactionHash":{"type":"string"},"receiptUrl":{"type":"string","format":"uri"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","kind","state","network","amountUsd","createdAt","updatedAt"]}},"required":["success","order"]}}}}