{
    "info": {
        "name": "Okta Partners API",
        "description": "Partner-app runtime API. Set the {{token}} collection variable to your installation token.",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "value": "{{token}}",
                "type": "string"
            }
        ]
    },
    "variable": [
        {
            "key": "baseUrl",
            "value": "https://getokta.io/api/apps",
            "type": "string"
        },
        {
            "key": "token",
            "value": "",
            "type": "string"
        }
    ],
    "item": [
        {
            "name": "الهوية",
            "item": [
                {
                    "name": "من أنا",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/whoami",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "whoami"
                            ]
                        },
                        "description": "معلومات الـ installation الحالي (المستأجر، التطبيق، النطاقات)."
                    }
                }
            ]
        },
        {
            "name": "الطلاب",
            "item": [
                {
                    "name": "قائمة الطلاب",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/education/students",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "education",
                                "students"
                            ],
                            "query": [
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "رقم الصفحة (يبدأ من 1).",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "عدد العناصر لكل صفحة (حد أقصى 100).",
                                    "disabled": true
                                },
                                {
                                    "key": "search",
                                    "value": "",
                                    "description": "بحث نصّي اختياري.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "قائمة الطلاب (مُرقّمة)."
                    }
                },
                {
                    "name": "طالب واحد",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/education/students/{id}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "education",
                                "students",
                                "{id}"
                            ]
                        },
                        "description": "طالب واحد."
                    }
                },
                {
                    "name": "إنشاء طالب",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/education/students",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "education",
                                "students"
                            ]
                        },
                        "description": "إنشاء طالب.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"full_name\": \"Sara Al-Otaibi\",\n    \"national_id\": \"1098765432\",\n    \"birth_date\": \"2012-04-18\",\n    \"gender\": \"female\",\n    \"grade_id\": 7,\n    \"section_id\": 3\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "تعديل طالب",
                    "request": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/education/students/{id}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "education",
                                "students",
                                "{id}"
                            ]
                        },
                        "description": "تعديل طالب.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"section_id\": 4\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "أولياء الأمور",
            "item": [
                {
                    "name": "قائمة أولياء الأمور",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/education/guardians",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "education",
                                "guardians"
                            ],
                            "query": [
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "رقم الصفحة (يبدأ من 1).",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "عدد العناصر لكل صفحة (حد أقصى 100).",
                                    "disabled": true
                                },
                                {
                                    "key": "search",
                                    "value": "",
                                    "description": "بحث نصّي اختياري.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "قائمة أولياء الأمور."
                    }
                },
                {
                    "name": "وليّ أمر واحد",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/education/guardians/{id}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "education",
                                "guardians",
                                "{id}"
                            ]
                        },
                        "description": "وليّ أمر واحد."
                    }
                },
                {
                    "name": "إنشاء وليّ أمر",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/education/guardians",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "education",
                                "guardians"
                            ]
                        },
                        "description": "إنشاء وليّ أمر.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"full_name\": \"Khaled Al-Otaibi\",\n    \"phone\": \"+966500000000\",\n    \"email\": \"khaled@example.com\",\n    \"relation\": \"father\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "تعديل وليّ أمر",
                    "request": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/education/guardians/{id}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "education",
                                "guardians",
                                "{id}"
                            ]
                        },
                        "description": "تعديل وليّ أمر.",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"phone\": \"+966511111111\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "المنهج الدراسي",
            "item": [
                {
                    "name": "قائمة المواد",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/education/subjects",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "education",
                                "subjects"
                            ],
                            "query": [
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "رقم الصفحة (يبدأ من 1).",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "عدد العناصر لكل صفحة (حد أقصى 100).",
                                    "disabled": true
                                },
                                {
                                    "key": "search",
                                    "value": "",
                                    "description": "بحث نصّي اختياري.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "المواد."
                    }
                },
                {
                    "name": "إنشاء مادة",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/education/subjects",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "education",
                                "subjects"
                            ]
                        },
                        "description": "إنشاء مادة (idempotent).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"Mathematics\",\n    \"code\": \"MATH\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                },
                {
                    "name": "قائمة الصفوف",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/education/grades",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "education",
                                "grades"
                            ],
                            "query": [
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "رقم الصفحة (يبدأ من 1).",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "عدد العناصر لكل صفحة (حد أقصى 100).",
                                    "disabled": true
                                },
                                {
                                    "key": "search",
                                    "value": "",
                                    "description": "بحث نصّي اختياري.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "الصفوف."
                    }
                },
                {
                    "name": "قائمة الشُعب",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/education/sections",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "education",
                                "sections"
                            ],
                            "query": [
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "رقم الصفحة (يبدأ من 1).",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "عدد العناصر لكل صفحة (حد أقصى 100).",
                                    "disabled": true
                                },
                                {
                                    "key": "search",
                                    "value": "",
                                    "description": "بحث نصّي اختياري.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "الشُعب."
                    }
                },
                {
                    "name": "الأعوام الدراسية",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/education/academic-years",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "education",
                                "academic-years"
                            ],
                            "query": [
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "رقم الصفحة (يبدأ من 1).",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "عدد العناصر لكل صفحة (حد أقصى 100).",
                                    "disabled": true
                                },
                                {
                                    "key": "search",
                                    "value": "",
                                    "description": "بحث نصّي اختياري.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "الأعوام الدراسية."
                    }
                },
                {
                    "name": "الفصول الدراسية",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/education/terms",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "education",
                                "terms"
                            ],
                            "query": [
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "رقم الصفحة (يبدأ من 1).",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "عدد العناصر لكل صفحة (حد أقصى 100).",
                                    "disabled": true
                                },
                                {
                                    "key": "search",
                                    "value": "",
                                    "description": "بحث نصّي اختياري.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "الفصول الدراسية."
                    }
                }
            ]
        },
        {
            "name": "الموظفون",
            "item": [
                {
                    "name": "دليل الموظفين",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/employees/directory",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "employees",
                                "directory"
                            ],
                            "query": [
                                {
                                    "key": "page",
                                    "value": "",
                                    "description": "رقم الصفحة (يبدأ من 1).",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "",
                                    "description": "عدد العناصر لكل صفحة (حد أقصى 100).",
                                    "disabled": true
                                },
                                {
                                    "key": "search",
                                    "value": "",
                                    "description": "بحث نصّي اختياري.",
                                    "disabled": true
                                }
                            ]
                        },
                        "description": "دليل الموظفين."
                    }
                },
                {
                    "name": "موظف واحد",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/employees/directory/{id}",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "employees",
                                "directory",
                                "{id}"
                            ]
                        },
                        "description": "موظف واحد."
                    }
                },
                {
                    "name": "إضافة موظف",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/employees/directory",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "employees",
                                "directory"
                            ]
                        },
                        "description": "إضافة موظف (idempotent).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"full_name\": \"Mona Al-Harbi\",\n    \"job_title\": \"Teacher\",\n    \"email\": \"mona@example.com\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "التقارير",
            "item": [
                {
                    "name": "كتالوج التقارير",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/reports/builder",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "reports",
                                "builder"
                            ]
                        },
                        "description": "كتالوج التقارير المتاحة."
                    }
                },
                {
                    "name": "تنفيذ تقرير",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/reports/builder/{key}/run",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "reports",
                                "builder",
                                "{key}",
                                "run"
                            ]
                        },
                        "description": "تنفيذ تقرير (idempotent).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"parameters\": {\n        \"term_id\": 5\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        },
        {
            "name": "الإشعارات",
            "item": [
                {
                    "name": "قدرات الإشعار",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/notifications/capabilities",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "notifications",
                                "capabilities"
                            ]
                        },
                        "description": "قدرات قناة الإشعار."
                    }
                },
                {
                    "name": "إرسال إشعار",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{baseUrl}}/notifications/send",
                            "host": [
                                "{{baseUrl}}"
                            ],
                            "path": [
                                "notifications",
                                "send"
                            ]
                        },
                        "description": "إرسال رسالة (idempotent).",
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"recipient\": \"+966500000000\",\n    \"message\": \"Welcome to Okta!\",\n    \"channel\": \"whatsapp\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    }
                }
            ]
        }
    ]
}