---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.2
alternate:
  - https://sourcecraft.dev/portal/docs/en/api-ref/Repository-or-PullRequest/GetMergeChecksByID.md
  - https://sourcecraft.dev/portal/docs/ru/api-ref/Repository-or-PullRequest/GetMergeChecksByID.md
  - href: en/api-ref/Repository-or-PullRequest/GetMergeChecksByID.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/en/llms.txt

<div class="openapi">

# Get Merge Checks (By ID)

<!-- markdownlint-disable-file -->

Returns comprehensive information about merge requirements:
- Code review status and approval rules
- Merge conflicts detection
- CI workflow execution status
- Configuration validation results

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-get);margin-bottom: 12px">

<div class="openapi__request">

GET {.openapi__method}
```text translate=no
https://api.sourcecraft.tech/pulls/id:{pull_request_id}/merge-checks
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_pull_request_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
|#{.json-schema-properties}

### Query parameters

#|
|| **Name** | **Description** ||
||

_pull_request_slug_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
|#{.json-schema-properties}

## Responses

<div class="openapi__response__code__200">

## 200 OK

A successful response.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "code_review": {
    "status": "in_progress",
    "disabled": true,
    "total_approves": 0,
    "need_approves": 0,
    "rules": [
      {
        "approves": 0,
        "need_approves": 0,
        "completed": true,
        "reviewers": [
          {}
        ]
      }
    ]
  },
  "conflicts": {
    "status": null,
    "created_at": "2025-01-01T00:00:00Z",
    "conflicts": [
      {
        "conflict_type": "example",
        "path": "example",
        "message": "example"
      }
    ],
    "error": "example"
  },
  "ci_workflows": [
    {
      "status": "created",
      "disabled": true,
      "created_at": "2025-01-01T00:00:00Z",
      "run_id": "example",
      "run_slug": "example",
      "workflow_id": "example",
      "workflow_slug": "example"
    }
  ],
  "config_validations": [
    {
      "status": null,
      "created_at": "2025-01-01T00:00:00Z",
      "file_path": "example",
      "error_message": "example"
    }
  ],
  "status": null
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_ci_workflows_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [CIWorkflowCheck](#entity-CIWorkflowCheck)[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "status": "created",
    "disabled": true,
    "created_at": "2025-01-01T00:00:00Z",
    "run_id": "example",
    "run_slug": "example",
    "workflow_id": "example",
    "workflow_slug": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_code_review_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [CodeReviewCheck](#entity-CodeReviewCheck)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "status": "in_progress",
  "disabled": true,
  "total_approves": 0,
  "need_approves": 0,
  "rules": [
    {
      "approves": 0,
      "need_approves": 0,
      "completed": true,
      "reviewers": [
        {
          "id": "example",
          "slug": "example"
        }
      ]
    }
  ]
}
```

{% endcut %}
{.table-cell}
||
||

_config_validations_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [ConfigValidationCheck](#entity-ConfigValidationCheck)[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "status": "in_progress",
    "created_at": "2025-01-01T00:00:00Z",
    "file_path": "example",
    "error_message": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_conflicts_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [ConflictsCheck](#entity-ConflictsCheck)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "status": "in_progress",
  "created_at": "2025-01-01T00:00:00Z",
  "conflicts": [
    {
      "conflict_type": "example",
      "path": "example",
      "message": "example"
    }
  ],
  "error": "example"
}
```

{% endcut %}
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [MergeChecks.Status](#entity-MergeChecks.Status)

_Enum:_{.json-schema-reset .json-schema-value} `in_progress`, `success`, `failure`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### MergeChecks.Status {#entity-MergeChecks.Status}

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `in_progress`, `success`, `failure`

</div>

<div class="openapi-entity">

### UserEmbedded {#entity-UserEmbedded}

#|
|| **Name** | **Description** ||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_slug_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": "example",
  "slug": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ReviewRule {#entity-ReviewRule}

#|
|| **Name** | **Description** ||
||

_approves_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer
{.table-cell}
||
||

_completed_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
||

_need_approves_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer
{.table-cell}
||
||

_reviewers_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [UserEmbedded](#entity-UserEmbedded)[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "id": "example",
    "slug": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "approves": 0,
  "need_approves": 0,
  "completed": true,
  "reviewers": [
    {
      "id": "example",
      "slug": "example"
    }
  ]
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### CodeReviewCheck {#entity-CodeReviewCheck}

#|
|| **Name** | **Description** ||
||

_disabled_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
||

_need_approves_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer
{.table-cell}
||
||

_rules_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [ReviewRule](#entity-ReviewRule)[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "approves": 0,
    "need_approves": 0,
    "completed": true,
    "reviewers": [
      {
        "id": "example",
        "slug": "example"
      }
    ]
  }
]
```

{% endcut %}
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [MergeChecks.Status](#entity-MergeChecks.Status)

_Enum:_{.json-schema-reset .json-schema-value} `in_progress`, `success`, `failure`
{.table-cell}
||
||

_total_approves_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "status": "in_progress",
  "disabled": true,
  "total_approves": 0,
  "need_approves": 0,
  "rules": [
    {
      "approves": 0,
      "need_approves": 0,
      "completed": true,
      "reviewers": [
        {
          "id": "example",
          "slug": "example"
        }
      ]
    }
  ]
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### Conflict {#entity-Conflict}

#|
|| **Name** | **Description** ||
||

_conflict_type_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_path_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "conflict_type": "example",
  "path": "example",
  "message": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ConflictsCheck {#entity-ConflictsCheck}

#|
|| **Name** | **Description** ||
||

_conflicts_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [Conflict](#entity-Conflict)[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "conflict_type": "example",
    "path": "example",
    "message": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_created_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_error_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [MergeChecks.Status](#entity-MergeChecks.Status)

_Enum:_{.json-schema-reset .json-schema-value} `in_progress`, `success`, `failure`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "status": "in_progress",
  "created_at": "2025-01-01T00:00:00Z",
  "conflicts": [
    {
      "conflict_type": "example",
      "path": "example",
      "message": "example"
    }
  ],
  "error": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### Run.Status {#entity-Run.Status}

 - prepared: Status `prepared` may only appear as a Run status.
It's a stage between creation and startup during which the Run is populated with workflows.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `created`, `prepared`, `processing`, `success`, `failed`, `canceled`, `timeout`, `skipped`, `awaiting_approval`

</div>

<div class="openapi-entity">

### CIWorkflowCheck {#entity-CIWorkflowCheck}

Different CI workflows may have different corresponding CI runs due to restarts.
To get detailed information about each workflow, use `/{org_slug}/{repo_slug}/cicd/runs/{run_slug}/{workflow_slug}`.

#|
|| **Name** | **Description** ||
||

_created_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_disabled_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: boolean
{.table-cell}
||
||

_run_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_run_slug_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [Run.Status](#entity-Run.Status)

 - prepared: Status `prepared` may only appear as a Run status.
It's a stage between creation and startup during which the Run is populated with workflows.

_Enum:_{.json-schema-reset .json-schema-value} `created`, `prepared`, `processing`, `success`, `failed`, `canceled`, `timeout`, `skipped`, `awaiting_approval`
{.table-cell}
||
||

_workflow_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_workflow_slug_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "status": "created",
  "disabled": true,
  "created_at": "2025-01-01T00:00:00Z",
  "run_id": "example",
  "run_slug": "example",
  "workflow_id": "example",
  "workflow_slug": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### ConfigValidationCheck {#entity-ConfigValidationCheck}

#|
|| **Name** | **Description** ||
||

_created_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_error_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_file_path_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [MergeChecks.Status](#entity-MergeChecks.Status)

_Enum:_{.json-schema-reset .json-schema-value} `in_progress`, `success`, `failure`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "status": "in_progress",
  "created_at": "2025-01-01T00:00:00Z",
  "file_path": "example",
  "error_message": "example"
}
```

{% endcut %}

</div>

</div>

<div class="openapi__response__code__default">

## default

Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error_code": "example",
  "message": "example",
  "request_id": "example",
  "details": null
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: unknown

_Example:_{.json-schema-reset .json-schema-example} `null`
{.table-cell}
||
||

_error_code_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_request_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.