{"openapi":"3.1.0","info":{"title":"CoParent Circle Platform API","version":"1.0.0","description":"Deterministic co-parenting tools. Results are arithmetic, seal checks and advisory tone screening, never legal advice."},"servers":[{"url":"https://thecoparentcircle.com"}],"components":{"securitySchemes":{"partnerKey":{"type":"http","scheme":"bearer","description":"cpc_live_ partner key"}}},"paths":{"/api/public/v1/calculate_parenting_time":{"post":{"operationId":"calculate_parenting_time","summary":"Partner-key tool: Counts yearly overnights and hours for two parents from a repeating 14-night cycle and checks the state's verified overnight threshold, if one exists.","security":[{"partnerKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pattern":{"minItems":14,"maxItems":14,"type":"array","items":{"type":"string","enum":["A","B"]},"description":"14 nights starting Monday night; A or B for who has the child that night."},"state_code":{"description":"Two-letter state code, e.g. FL. Omit for counts only.","type":"string","pattern":"^[A-Z]{2}$"},"days_in_year":{"anyOf":[{"type":"number","const":365},{"type":"number","const":366}]},"shift_to_b":{"description":"Extra overnights per year moved to B (holidays/summer); negative moves to A.","type":"integer","minimum":-366,"maximum":366},"weekly_day_hours_a":{"type":"number","minimum":0,"maximum":168},"weekly_day_hours_b":{"type":"number","minimum":0,"maximum":168}},"required":["pattern"]}}}},"responses":{"200":{"description":"Result"},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid partner key"},"429":{"description":"Daily or monthly limit reached"}}}},"/api/public/v1/verify_court_report":{"post":{"operationId":"verify_court_report","summary":"Partner-key tool: Looks up a CoParent Circle report by its printed record ID or by the SHA-256 of the PDF and says whether that file is unchanged and not revoked.","security":[{"partnerKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"record_id":{"description":"Record ID printed on the report.","type":"string","minLength":4,"maxLength":40,"pattern":"^[A-Za-z0-9-]+$"},"sha256":{"description":"Hex SHA-256 of the exact PDF file.","type":"string","pattern":"^[0-9a-fA-F]{64}$"}}}}}},"responses":{"200":{"description":"Result"},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid partner key"},"429":{"description":"Daily or monthly limit reached"}}}},"/api/public/v1/net_child_expenses":{"post":{"operationId":"net_child_expenses","summary":"Partner-key tool: nets two parents' shared child expenses and recorded payments into one balance. Arithmetic only; never confirms a payment.","security":[{"partnerKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO currency code; all amounts must use it."},"expenses":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"paid_by":{"type":"string","enum":["A","B"]},"amount_cents":{"type":"integer","minimum":0,"maximum":100000000},"share_a_percent":{"type":"number","minimum":0,"maximum":100,"description":"Parent A's share of this expense."}},"required":["paid_by","amount_cents","share_a_percent"]}},"payments":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","enum":["A","B"]},"amount_cents":{"type":"integer","minimum":0,"maximum":100000000}},"required":["from","amount_cents"]}}},"required":["currency","expenses"]}}}},"responses":{"200":{"description":"Result"},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid partner key"},"429":{"description":"Daily or monthly limit reached"}}}},"/api/public/v1/screen_communication_tone":{"post":{"operationId":"screen_communication_tone","summary":"Partner-key tool: rates a draft co-parenting message (calm/tense/hostile) and suggests neutral rewrites. Advisory only; the original is returned unchanged and nothing is stored. Max 1,500 characters.","security":[{"partnerKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":2,"maxLength":1500,"description":"The draft message to screen."},"language":{"default":"en","type":"string","enum":["en","es"]}},"required":["text"]}}}},"responses":{"200":{"description":"Result"},"400":{"description":"Invalid input"},"401":{"description":"Missing or invalid partner key"},"429":{"description":"Daily or monthly limit reached"}}}}}}