openapi: 3.2.0 info: title: SNHP Evolution Arena Par API description: watch AI negotiators evolve, live version: 0.1.0 tags: - name: Par paths: /par/today: get: summary: Today operationId: today_par_today_get parameters: - name: day in: query required: false schema: anyOf: - type: integer - type: 'null' title: Day responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Today Par Today Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Par /par/house_move: post: summary: Move description: 'The House''s move this round — played by the SNHP equilibrium. Never leaks the House''s reservation; returns only its action + offer + message.' operationId: move_par_house_move_post requestBody: content: application/json: schema: $ref: '#/components/schemas/MoveReq' required: true responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Move Par House Move Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Par /par/grade: post: summary: Grade description: 'Reveal: par (the number a perfect player reaches) and what was left on the table. Only here is the House''s reservation surfaced — at the end, never before. Returns the SAME shape whether or not a deal closed (deal is null on a walk).' operationId: grade_par_grade_post requestBody: content: application/json: schema: $ref: '#/components/schemas/GradeReq' required: true responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Grade Par Grade Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Par /par/submit: post: summary: Submit description: 'Grade AND record a finished game, then return the reveal payload plus the board: streak, percentile vs. everyone today, and the distribution. The score is recomputed here and the close is validated against par + the transcript — the board can''t be gamed by POSTing a fake number. The transcript lands in `plays` (the data moat).' operationId: submit_par_submit_post requestBody: content: application/json: schema: $ref: '#/components/schemas/SubmitReq' required: true responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Submit Par Submit Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Par /par/stats: get: summary: Stats description: 'Anonymous day rollup — drives the landing''s live social proof (''N hit par today'') and the empty-state histogram before the player has finished.' operationId: stats_par_stats_get parameters: - name: day in: query required: false schema: anyOf: - type: integer - type: 'null' title: Day responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Stats Par Stats Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Par /par/group/join: post: summary: Group Join description: 'Join a friend group. The group id rides in on a shared link (par.game/?g=); opening a friend''s link is what seeds the group.' operationId: group_join_par_group_join_post requestBody: content: application/json: schema: $ref: '#/components/schemas/JoinReq' required: true responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Group Join Par Group Join Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Par /par/group: get: summary: Group description: Today's ranked leaderboard for one friend group. operationId: group_par_group_get parameters: - name: group in: query required: true schema: type: string title: Group - name: day in: query required: false schema: anyOf: - type: integer - type: 'null' title: Day responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Group Par Group Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Par /par/waitlist: post: summary: Waitlist description: Join the product waitlist (the CTA's real destination). Idempotent per user. operationId: waitlist_par_waitlist_post requestBody: content: application/json: schema: $ref: '#/components/schemas/WaitReq' required: true responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Waitlist Par Waitlist Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Par /par/event: post: summary: Event description: A funnel event. Fire-and-forget from the client so we can see where it leaks. operationId: event_par_event_post requestBody: content: application/json: schema: $ref: '#/components/schemas/EventReq' required: true responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Event Par Event Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Par /par/funnel: get: summary: Funnel Stats description: 'The funnel: unique users per step + step-over-step conversion (the k-factor lens).' operationId: funnel_stats_par_funnel_get responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Funnel Stats Par Funnel Get tags: - Par /par/advise: post: summary: Advise description: 'The agent advising your live negotiation — the SAME SNHP equilibrium the game runs, now pointed at a real deal. Advisory MVP (a move at a time) before full agent-to-agent; it''s the conversion the game''s ''the agent beat you by $X'' has been earning.' operationId: advise_par_advise_post requestBody: content: application/json: schema: $ref: '#/components/schemas/AdviseReq' required: true responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Advise Par Advise Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Par /par/bundle_move: post: summary: Bundle Move description: 'Multi-issue: the House proposes the SNHP package; par is the Pareto/Nash optimal it returns. The front end renders this as the logroll diagonal (see SPEC.md).' operationId: bundle_move_par_bundle_move_post requestBody: content: application/json: schema: $ref: '#/components/schemas/BundleReq' required: true responses: '200': description: Successful Response content: application/json: schema: additionalProperties: true type: object title: Response Bundle Move Par Bundle Move Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' tags: - Par components: schemas: SubmitReq: properties: day: type: integer title: Day user_id: type: string maxLength: 64 title: User Id close: anyOf: - type: number - type: 'null' title: Close your_offers: items: type: number type: array maxItems: 100 title: Your Offers default: [] house_offers: items: type: number type: array maxItems: 100 title: House Offers default: [] type: object required: - day - user_id title: SubmitReq MoveReq: properties: day: type: integer title: Day your_offers: items: type: number type: array maxItems: 100 title: Your Offers house_offers: items: type: number type: array maxItems: 100 title: House Offers default: [] rounds_left: type: integer title: Rounds Left type: object required: - day - your_offers - rounds_left title: MoveReq GradeReq: properties: day: type: integer title: Day close: anyOf: - type: number - type: 'null' title: Close type: object required: - day title: GradeReq EventReq: properties: user_id: type: string maxLength: 64 title: User Id name: type: string maxLength: 32 title: Name meta: anyOf: - additionalProperties: true type: object - type: 'null' title: Meta type: object required: - user_id - name title: EventReq JoinReq: properties: group: type: string maxLength: 64 title: Group user_id: type: string maxLength: 64 title: User Id name: anyOf: - type: string maxLength: 40 - type: 'null' title: Name type: object required: - group - user_id title: JoinReq WaitReq: properties: user_id: type: string maxLength: 64 title: User Id scenario: type: string maxLength: 64 title: Scenario contact: anyOf: - type: string maxLength: 128 - type: 'null' title: Contact type: object required: - user_id - scenario title: WaitReq HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError AdviseReq: properties: side: type: string maxLength: 8 title: Side walk_away: type: number title: Walk Away target: type: number title: Target counterparty_offers: items: type: number type: array maxItems: 100 title: Counterparty Offers default: [] my_previous_offers: items: type: number type: array maxItems: 100 title: My Previous Offers default: [] rounds_left: type: integer title: Rounds Left default: 4 type: object required: - side - walk_away - target title: AdviseReq BundleReq: properties: issues: items: additionalProperties: true type: object type: array title: Issues their_offers: anyOf: - items: additionalProperties: true type: object type: array - type: 'null' title: Their Offers my_priorities: anyOf: - additionalProperties: true type: object - type: 'null' title: My Priorities type: object required: - issues title: BundleReq ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError