> For the complete documentation index, see [llms.txt](https://api.drugnet.com.gh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.drugnet.com.gh/create-mcredit-case.md).

# Create mCredit Case

<mark style="color:green;">`POST`</mark> `/`create\_mcredit\_case

Creates a mcredit endpoint

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | x-api-key          |

**Body**

| Name               | Type       | Description         |
| ------------------ | ---------- | ------------------- |
| institution\_name  | string[^1] | Name of institution |
| full\_name         | string[^1] | Full name           |
| phone              | string[^1] | Phone number        |
| prescription\_file | file       | Prescription file   |
| agent\_code        | string[^2] | Agent Code          |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "code": 200,
    "success": true,
    "message": "M-CrediT case created successfully",
    "data": {
        "id": 6,
        "case_number": "MCW23062026D55CF9",
        "status": "Prescription Received - Awaiting Pharmacist Review",
        "pre_screen_result": "passed_prescreening",
        "review_flags": []
    }
}
```

{% endtab %}

{% tab title="409" %}

```json
{
    "code": 409,
    "success": false,
    "message": "M-CrediT case already exists for this phone and full name",
    "data": {
        "id": 3,
        "case_number": "MCW230620265AEF7D",
        "status": "Prescription Received - Awaiting Pharmacist Review",
        "pre_screen_result": "passed_prescreening"
    }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "code": 400,
    "success": false,
    "message": "Invalid Request"
}
```

{% endtab %}
{% endtabs %}

[^1]: required

[^2]: optional
