RacePlans

Orchestrate course import, segmentation, runner import, estimation, and optional PDF export

Optional convenience workflow for AI agents and simpler API clients. Creates one top-level async job that composes the CRSProf import, segment generation, USRProf import, estimate, and race-plan PDF export capabilities. Atomic endpoints remain the canonical API surface.

Personalized race plans require runner input. CourseProfiler does not create meaningful pacing estimates from a course alone. Before calling this endpoint, make sure the user provides one runner input: a USRProf artifact ID, a public HTTPS URL to a USRProf file, local GPX/FIT/CRSProf evidence files uploaded through /api/artifact-uploads then imported with /api/usrprof/imports, public HTTPS URLs to runner evidence files, or a USRProf profile created through CourseProfiler's Strava import feature. Strava import requires browser-based user authentication and consent; direct the user to authenticate in the CourseProfiler web app, then use the resulting USRProf artifact/profile when available. If no runner profile or evidence is available, import/analyze the course only and ask the user for runner evidence before creating a race plan.

post/api/race-plans

Request

  • Base URL: https://courseprofiler.com
  • URL: https://courseprofiler.com/api/race-plans
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer
    • none

Request body

Response

Async job accepted

request_idstring

Current HTTP request correlation ID, also X-Request-Id; not an idempotency key.

job_persistence'not_persisted' | 'confirmed' | 'unknown'

Latest job metadata write outcome, not a current retrievability guarantee. Do not blindly retry unknown writes.

submission_request_idstring

Original allocation request ID; omitted in legacy job metadata.

job_idstring required
status'queued' | 'running' | 'succeeded' | 'failed' | 'expired' | 'cancelled' required
status_urlstring required
created_atstring date-time required
started_atstring date-time
completed_atstring date-time
expires_atstring date-time required
progressobject

Example response

{
  "job_id": "job_01JABCDEF",
  "status_url": "/api/jobs/job_01JABCDEF",
  "result_artifacts": [
    {
      "artifact_id": "art_01JABCDEF",
      "content_type": "application/vnd.courseprof+json",
      "warnings": [
        {
          "code": "missing_elevation"
        }
      ]
    }
  ],
  "warnings": [
    {
      "code": "missing_elevation"
    }
  ],
  "errors": [
    {
      "code": "missing_elevation"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.