# Fetch Courses

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/api/courses`

#### Headers

| Name           | Type   | Description                                                    |
| -------------- | ------ | -------------------------------------------------------------- |
| Authentication | string | Authentication token to track down who is emptying our stocks. |

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

```json
{
    "status": 200,
    "response_code": 0,
    "success": true,
    "errors": [],
    "message": "Courses retrieved successfully",
    "data": [
        {
            "id": 9,
            "title": "Understanding loans",
            "is_free": true,
            "price": 0.0,
            "description": "<div data-oe-version=\"1.2\">Learn how borrowing money from Pezesha can help your business grow</div>",
            "image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQE…..",
            "users_enrolled": 101,
            "likes_count": 10,
            "rating": 0.0,
            "completion_status": "in_progress",
            "is_liked": true,
            "payment_status": "free",
            "can_access": true,
            "payment_message": "This course is free",
            "payment_id": null
        }
 ]
}
```

{% endtab %}

{% tab title="401 Authentication Failed" %}

```json
{
  "status": 401,
  "response_code": 0,
  "success": false,
  "errors": [
    "No token provided"
  ],
  "message": "No token, Authorization denied"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.patascore.com/financial-education-1/courses/fetch-modules-by-program-identifier.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
