---
title: "Import Primavera P6 XER Schedule"
method: POST
path: "/api/v1/import/xer"
tags: ["Import"]
---

# Import Primavera P6 XER Schedule

`POST /api/v1/import/xer`

## Request

- Base URL: `https://api.bellatorsi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.bellatorsi.com/api/v1/import/xer`
- Auth: none declared

Parses a Primavera P6 XER file and returns a Normalized Schedule JSON object compatible with all analysis APIs.

**Tier access:** Starter and above.

**File size limit:** 100 MB.

**Input:** XER file content as a UTF-8 or Latin-1 string in the `file_content` field.

**Multi-project XER:** If the XER file contains multiple projects, specify `options.project_id` to select the target project. Omitting `project_id` when multiple projects are present returns a 422 error listing available project IDs.

**Output:** `normalized_schedule` (ready to submit to `/health/score`, `/forensics/dcma-14-point`, etc.) plus `parse_summary`, `mapping_stats`, `warnings`, and `processing_metadata`.

## Headers

- `x-api-key` string, nullable
- `authorization` string, nullable
- `x-bellator-internal-dispatch` string, nullable

## Request body

- XerImportRequest: Request model for POST /api/v1/import/xer.
  - `file_content` string, required: P6 XER file content (text, any encoding — auto-detected)
  - `options` XerImportOptions: Options controlling P6 XER import behavior.
    - `project_id` string, nullable: Select a specific project from a multi-project XER. Required if XER contains more than one project.
    - `strict_validation` boolean
    - `auto_detect_start_finish` boolean
    - `auto_classify_task_types` boolean
    - `use_prefix_classification` boolean: Detect task type from name prefix (e.g., 'SM-Buffer', 'PP-FuturePh3', 'AE-Engineering'). Fires only when native P6 task_type is not already set. See Import API Common Patterns § Prefix Classification.
    - `include_warnings` boolean
    - `use_activity_id` boolean: Use task_code (Activity ID) as task id instead of numeric task_id.

## Response `200`

Schedule successfully parsed and normalized

- BellatorResponseImportData
  - `status` 'pass' | 'fail' | 'warning' | 'info', required: Top-level result status — always present in every response.
  - `score` number, nullable
  - `grade` 'A' | 'B' | 'C' | 'D' | 'F': Letter grade derived from a 0–100 score. Null on non-scoring endpoints.
  - `summary` string, nullable
  - `breakdown` object, nullable
  - `findings` Finding[]
    - `code` string, required: Stable machine-readable identifier e.g. DCMA_CHECK_8_HIGH_DURATION
    - `severity` 'critical' | 'high' | 'medium' | 'low' | 'info', required: Severity level for findings; reused as priority level for recommendations.
    - `title` string, required: Short human-readable label
    - `description` string, required: Full explanation of the issue
    - `standard` string, nullable: Standard citation e.g. 'DCMA PAM 200.1 Check #8'
    - `affected_tasks` string[]: Task IDs implicated by this finding
    - `metric_value` number, nullable: Observed measurement e.g. 60.0 days
    - `threshold` number, nullable: Threshold that was violated e.g. 44.0 days
  - `recommendations` Recommendation[]
    - `priority` 'critical' | 'high' | 'medium' | 'low' | 'info', required: Severity level for findings; reused as priority level for recommendations.
    - `action` string, required: What to do — specific and actionable
    - `standard` string, nullable: Supporting standard citation
    - `finding_codes` string[]: Finding.code values this recommendation addresses
  - `data` ImportData: Data payload for all Import API endpoints.
    - `normalized_schedule` NormalizedSchedule, required: The canonical schedule representation produced by all Import APIs. Compatible with ScheduleRequest (can be passed directly to analysis endpoints). Extends ScheduleRequest with task-type exclusion arrays and calendar metadata per normalized-schedule-schema.md v1.4.0.
      - `tasks` Task[], required: Normalized task list
        - `id` string, required: Unique task identifier
        - `duration_days` number: Task duration in days
        - `predecessors` union[]: List of predecessor task IDs or dependency links. Supports: 'T1', 'T1FS+5 d', 'T2SS-2 d', or DependencyLink objects
          - union
            - string
            - object
            - DependencyLink: Rich dependency link with relationship type and lag/lead. Supports parsing from various scheduling tool formats including: - MS Project: "10FS+5 d", "/path/file.mpp/10FS+5 d" - Primavera P6: Similar format with XER encoding - Server-based: "<ServerFile>10FS+5 d" - Simple: "10" (defaults to FS with zero lag) Examples: >>> DependencyLink(task_id="10", relationship_type="FS", lag_days=5.0) >>> DependencyLink.from_string("10FS+5 d") >>> DependencyLink.from_string("15SS-2 d")
              - …
        - `name` string, nullable: Task name
        - `resource` string, nullable: Resource assigned to task
        - `resources` string[]: List of resources assigned (for multi-resource tasks)
        - `percent_complete` number: Percent complete (0-100)
        - `physical_percent_complete` number, nullable: Physical percent complete (0-100). Manual EVM entry by scheduler (MSP PhysicalPercentComplete). Authoritative for BCWP calculations. Captured separately from percent_complete on MSP imports.
        - `planned_start` string, date, nullable: Planned start date (ISO 8601)
        - `planned_finish` string, date, nullable: Planned finish date (ISO 8601)
        - `actual_start` string, date, nullable: Actual start date (ISO 8601)
        - `actual_finish` string, date, nullable: Actual finish date (ISO 8601)
        - `baseline_start` string, date, nullable: Baseline start date (ISO 8601)
        - `baseline_finish` string, date, nullable: Baseline finish date (ISO 8601)
        - `constraint_type` string, nullable: Constraint type: ASAP, ALAP, SNET, SNLT, FNET, FNLT, MSO, MFO
        - `constraint_date` string, date, nullable: Constraint date if applicable (ISO 8601)
        - `task_type` string, nullable: Task type classification. Valid values: task (default), milestone, loe, summary, schedule_margin, planning_package, slpp, schedule_visibility. Drives DCMA check exclusions per PAM 200.1 § 3.2.
        - `wbs_code` string, nullable: WBS code (e.g., '1.2.3')
        - `organization_code` string, nullable: Org/dept identifier for anomaly categorization (Progress Audit)
        - `custom_field_map` object, nullable: All WBS/OBS-pattern custom fields discovered in this MS Project file, keyed by alias (e.g., 'CWBS', 'OBS'). Null for XER imports or when no matching aliases exist.
        - `forecast_start` string, date, nullable: Current forecast start date (ISO 8601)
        - `forecast_finish` string, date, nullable: Current forecast finish date (ISO 8601)
        - `total_float_days` number, nullable: Pre-computed total float in days. Auto-computed by CPM if absent.
        - `baseline_duration_days` number, nullable: Baseline duration in days. Auto-computed from baseline dates if absent.
        - `delay_category` string, nullable: Delay attribution category. Valid values: owner, contractor, design, procurement, weather, force_majeure.
        - `earned_value` number, nullable: Earned Value (BCWP) in cost units. Requires options.include_ev_validation.
        - `budgeted_cost` number, nullable: Budgeted Cost of Work Scheduled (BCWS) in cost units.
        - `approval_required` boolean, nullable: Whether this task requires explicit approval before it can start.
        - `approval_status` string, nullable: Approval workflow state. Valid values: not_required, pending, approved, rejected.
      - `start_task_ids` string[]
      - `finish_task_ids` string[]
      - `status_date` string, date, nullable
      - `target_finish_date` string, date, nullable
      - `baseline_approved_date` string, date, nullable
      - `milestone_task_ids` string[]
      - `loe_task_ids` string[]
      - `apportioned_effort_task_ids` string[]
      - `schedule_margin_task_ids` string[]
      - `summary_task_ids` string[]
      - `planning_package_task_ids` string[]
      - `summary_level_pp_task_ids` string[]
      - `schedule_visibility_task_ids` string[]
      - `resource_availability` ResourceAvailabilityOutput[]
        - `resource_name` string, required: Resource name (must match tasks[*].resources)
        - `available_from` string, date, nullable: Start of availability window (ISO 8601). Null = project start.
        - `available_to` string, date, nullable: End of availability window (ISO 8601). Null = project finish.
        - `units_per_day` number: Available resource-units per working day (default: 1.0 = 100%)
      - `working_hours_per_day` number
      - `working_days_per_week` number
      - `holidays` string[]
    - `parse_summary` ParseSummary, required: Summary statistics for a completed import parse operation.
      - `source_format` string, required: Source format: mpp-xml, p6-xer
      - `source_version` string, nullable: Source application version string
      - `tasks_imported` integer, required
      - `dependencies_imported` integer
      - `fields_populated` string[]
      - `fields_missing` string[]
      - `auto_detected` AutoDetected
        - `start_task_ids` string[]
        - `finish_task_ids` string[]
        - `working_hours_per_day` number, nullable
      - `custom_fields_discovered` string[]: Aliases of WBS/OBS-pattern custom fields found in the project's ExtendedAttributes or OutlineCodes. Empty list when none discovered (e.g., XER imports or projects using only native <WBS>).
    - `mapping_stats` MappingStats, required: Field mapping statistics for an import operation.
      - `constraint_mappings` object
      - `relationship_mappings` object
      - `duration_conversion` DurationConversion
        - `source_unit` string, required
        - `target_unit` string
        - `conversion_factor` number, required
      - `calendar_info` CalendarInfo
        - `working_hours_per_day` number, required
        - `working_days_per_week` number, required
        - `holidays_detected` integer
    - `warnings` ParseWarning[]
      - `type` string, required: Warning type: missing_field, ambiguous_mapping, data_loss
      - `severity` string: Severity: info, warning, error
      - `task_id` string, nullable: Task ID associated with the warning
      - `message` string, required: Human-readable warning message
      - `details` unknown
    - `processing_metadata` AppModelsSchemasProcessingMetadata, required: Timing and version metadata for an import operation.
      - `import_timestamp` string, required: ISO 8601 timestamp
      - `processing_time_ms` number, required
      - `api_version` string
      - `parser_version` string, required
    - `msp_resource_table` MspResource[], nullable: Full resource pool from <Resources> table. MSP imports only. Includes resource_type (0=Work, 1=Material, 2=Cost) for EVM eligibility checks.
      - `uid` string, required: Resource UID (XML <UID>)
      - `display_id` string, nullable: User-facing resource ID (XML <ID>)
      - `name` string, required: Resource display name
      - `initials` string, nullable: Resource initials
      - `group` string, nullable: Resource pool / org grouping
      - `resource_type` integer: Resource type: 0=Work (EVM-bearing), 1=Material (EVM-bearing), 2=Cost (expense only)
      - `max_units` number, nullable: Maximum availability (1.0 = 100%)
      - `calendar_uid` string, nullable: Resource calendar UID
    - `msp_assignment_table` MspAssignment[], nullable: Full assignment records from <Assignments> table. MSP imports only. actual_work_hours drives the resource progression compliance check.
      - `uid` string, required: Assignment UID
      - `task_uid` string, required: Parent task UID (join key to Task)
      - `resource_uid` string, required: Assigned resource UID (join key to MspResource)
      - `units` number, nullable: Allocation fraction (0.5 = 50%)
      - `work_hours` number, nullable: Scheduled work in hours
      - `actual_work_hours` number, nullable: Actual work recorded in hours. Zero on a progressed task indicates 'Updating task status updates resource status' is disabled.
      - `remaining_work_hours` number, nullable: Remaining work in hours
      - `percent_work_complete` number, nullable: Assignment-level percent work complete (distinct from task-level)
      - `cost` number, nullable: Scheduled cost
      - `actual_cost` number, nullable: Actual cost incurred
      - `start` string, date, nullable: Assignment scheduled start
      - `finish` string, date, nullable: Assignment scheduled finish
      - `actual_start` string, date, nullable: Assignment actual start
      - `actual_finish` string, date, nullable: Assignment actual finish
      - `baseline_start` string, date, nullable: Baseline scheduled start (from <Baseline><Number>N><Start>)
      - `baseline_finish` string, date, nullable: Baseline scheduled finish (from <Baseline><Number>N><Finish>)
      - `baseline_work_hours` number, nullable: Baseline budgeted work in hours (PT format → hours, from <Baseline><Number>N><Work>). Drives BCWS for labor EVM analysis.
      - `baseline_cost` number, nullable: Baseline cost at time of baseline save (from <Baseline><Number>N><Cost>). Drives BCWS for cost accounts.
  - `simulation` SimulationEnvelope: Probabilistic simulation outputs for Tier 3 endpoints. Null on all Tier 1 and Tier 2 responses. When Tier 3 launches, this field transitions from null to populated without changing any other envelope field — existing consumers are unaffected.
    - `method` string, required: Simulation method: monte_carlo | latin_hypercube
    - `trial_count` integer, required
    - `duration_days` PercentileResult: Percentile distribution across simulation trials. Reserved for Tier 3 Monte Carlo / risk simulation endpoints (v0.3.0+).
      - `p10` number, required: 10th percentile outcome
      - `p50` number, required: 50th percentile (median)
      - `p80` number, required: 80th percentile — common contract delivery threshold
      - `p90` number, required: 90th percentile
      - `mean` number, required
      - `std_dev` number, required
    - `cost` PercentileResult: Percentile distribution across simulation trials. Reserved for Tier 3 Monte Carlo / risk simulation endpoints (v0.3.0+).
      - `p10` number, required: 10th percentile outcome
      - `p50` number, required: 50th percentile (median)
      - `p80` number, required: 80th percentile — common contract delivery threshold
      - `p90` number, required: 90th percentile
      - `mean` number, required
      - `std_dev` number, required
    - `completion_date` object, nullable: Map of p-value strings to ISO completion dates e.g. {'p50': '2027-04-15'}
  - `metadata` ResponseMetadata, required: Audit trail and processing context — always present, never null.
    - `task_count` integer, required: Number of tasks in the submitted schedule
    - `processing_time_ms` integer, nullable: Wall-clock processing time in milliseconds
    - `api_version` string: API version that produced this response
    - `endpoint` string, required: Endpoint path e.g. /api/v1/health/score
    - `standards_applied` string[]: Standards consulted during analysis e.g. ['DCMA PAM 200.1', 'GAO BP-2']
    - `confidence` number, nullable: Confidence in the result (0–1). Present on scoring endpoints.
    - `status_date` string, nullable: ISO date used as analysis reference point. Present on time-aware analyses.

## Other responses

- `400`: Missing required field (file_content)
- `402`: Tier limit exceeded — Starter tier or above required
- `422`: Semantic parse error — malformed XER, multi-project ambiguity, circular dependency, or duplicate task IDs
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/bellatorsi/apis/bellator-schedule-intelligence-apis.md) · [All operations](https://skmtc.dev/bellatorsi/apis/bellator-schedule-intelligence-apis/llms.txt) · [OpenAPI document](https://skmtc.dev/bellatorsi/apis/bellator-schedule-intelligence-apis/revisions/03e7b786e43b?raw)
