User-related API environment
Pre-live user-related API docs
These pages describe the Pre-live user-related API stack.
Use pre-live OAuth credentials, pre-live API base URLs, and pre-live app URLs when following this documentation. Keep your OAuth flow, API requests, callback URLs, and manual testing within the pre-live environment.
- Use prelive.quran.com for auth-related testing.
- Use prelive.quranreflect.org for Quran Reflect paths where applicable.
- Do not mix production sessions or production user data with pre-live testing.
Get today's goal plan
Get today's goal plan. When a goal exists, goalId is the reading goal id to use with update/delete goal endpoints, while id is the activity day id.
Query Parameters
Possible values: [QURAN_TIME, QURAN_PAGES, QURAN_RANGE]
The type of the goal.
Possible values: [1, 2, 3, 4, 5, 6, 7, 11, 19]
The id of the Mushaf being used.
1 = QCFV2
2 = QCFV1
3 = Indopak
4 = UthmaniHafs
5 = KFGQPCHAFS
6 = Indopak15Lines
7 = Indopak16Lines
11 = Tajweeed
19 = QCFTajweedV4
Header Parameters
The current timezone of the user. Not providing the value might affect the accuracy of how we calculate days and streaks.
- 200
- 400
- 401
- 403
- 404
- 422
- 429
- 500
- 502
- 503
- 504
Request has been handled successfully.
Schema
data object
The Mushaf used to read on that day (will be included only when the type is QURAN)
The id of the Mushaf being used.
1 = QCFV2
2 = QCFV1
3 = Indopak
4 = UthmaniHafs
5 = KFGQPCHAFS
6 = Indopak15Lines
7 = Indopak16Lines
11 = Tajweeed
19 = QCFTajweedV4
The id of the activity day.
Possible values: Value must match regular expression ^\d{4}-\d{2}-\d{2}$
The date of the activity day.
Possible values: <= 1
The progress of the reading goal of that activity day (if the user has a reading goal on that day).
Possible values: [QURAN, LESSON, QURAN_READING_PROGRAM]
The activity category. Use QURAN for Quran reading progress; other values are for lessons and Quran reading programs.
ranges object
The ranges read on that day (will be included only when the type is QURAN)
array
The ranges read on that day (will be included only when the type is QURAN)
pagesRead object
The number of pages read on that day (will be included only when the type is QURAN)
number
The number of pages read on that day (will be included only when the type is QURAN)
secondsRead object
The number of seconds spent reading on that day (will be included only when the type is QURAN)
integer
The number of seconds spent reading on that day (will be included only when the type is QURAN)
versesRead object
The number of Ayahs read on that day (will be included only when the type is QURAN)
integer
The number of Ayahs read on that day (will be included only when the type is QURAN)
manuallyAddedSeconds object
The number of seconds spent reading that was manually input by the user and not auto-tracked (will be included only when the type is QURAN)
integer
The number of seconds spent reading that was manually input by the user and not auto-tracked (will be included only when the type is QURAN)
dailyTargetPages object
The number of pages user should read on that day to meet their goal's target if a goal was set (will be included only when the type is QURAN)
number
The number of pages user should read on that day to meet their goal's target if a goal was set (will be included only when the type is QURAN)
dailyTargetSeconds object
The number of seconds user should read on that day to meet their goal's target if a goal was set (will be included only when the type is QURAN)
integer
The number of seconds user should read on that day to meet their goal's target if a goal was set (will be included only when the type is QURAN)
dailyTargetRanges object
The range of Ayahs user should read on that day to meet their goal's target if a goal was set (will be included only when the type is QURAN)
array
The range of Ayahs user should read on that day to meet their goal's target if a goal was set (will be included only when the type is QURAN)
remainingDailyTargetRanges object
The remaining range of Ayahs user should read on that day to meet their goal's target if a goal was set (will be included only when the type is QURAN)
array
The remaining range of Ayahs user should read on that day to meet their goal's target if a goal was set (will be included only when the type is QURAN)
Possible values: [1, 2, 3, 4, 5, 6, 7, 11, 19]
The id of the Mushaf being used.
1 = QCFV2
2 = QCFV1
3 = Indopak
4 = UthmaniHafs
5 = KFGQPCHAFS
6 = Indopak15Lines
7 = Indopak16Lines
11 = Tajweeed
19 = QCFTajweedV4
Whether the user has a goal.
The id of the reading goal. Present when hasGoal is true. Use this id with PUT /v1/goals/{id} and DELETE /v1/goals/{id}.
{
"success": true,
"data": {
"hasGoal": true,
"goalId": "cmpcenuxy000imc4e3lyg69id",
"id": "cmpcenuxy000jmc4egg9q9m2v",
"date": "2023-09-30",
"progress": 0.695,
"type": "QURAN",
"ranges": [
"1:1-1:2"
],
"pagesRead": 1.637041020126048,
"secondsRead": 417,
"versesRead": 24,
"manuallyAddedSeconds": 24,
"dailyTargetPages": 1.637041020126048,
"dailyTargetSeconds": 5,
"dailyTargetRanges": [
"1:1-1:2"
],
"remainingDailyTargetRanges": [
"1:1-1:2"
],
"mushafId": 4
}
}
{
"success": true,
"data": {
"hasGoal": true,
"goalId": "cmpcenuxy000imc4e3lyg69id",
"id": "cmpcenuxy000jmc4egg9q9m2v",
"date": "2023-09-30",
"progress": 0.695,
"type": "QURAN",
"ranges": [
"1:1-1:2"
],
"pagesRead": 1.637041020126048,
"secondsRead": 417,
"versesRead": 24,
"manuallyAddedSeconds": 24,
"dailyTargetPages": 1.637041020126048,
"dailyTargetSeconds": 5,
"dailyTargetRanges": [
"1:1-1:2"
],
"remainingDailyTargetRanges": [
"1:1-1:2"
],
"mushafId": 4
}
}
The request is missing required parameters or is invalid.
Schema
{
"message": "The request is missing required headers or is invalid",
"type": "invalid_request",
"success": false
}
The request is unauthorized.
Schema
{
"message": "The request requires user authentication",
"type": "unauthorized",
"success": false
}
Forbidden error. Can either be due to access token not being passed, having been expired or the caller trying to access a resource without enough permissions.
Schema
{
"message": "The server understood the request, but refuses to authorize it",
"type": "forbidden",
"success": false
}
Not Found. The resource being accessed does not exist.
Schema
{
"message": "The requested resource could not be found",
"type": "not_found",
"success": false
}
Validation Error. The request includes one or more invalid params. Please check the request params and try again.
Schema
{
"message": "The request was well-formed but was unable to be followed due to semantic errors",
"type": "unprocessable_entity",
"success": false
}
Too many requests, please try again later.
Schema
{
"message": "Too many requests, please try again later",
"type": "rate_limit_exceeded",
"success": false
}
Server Error. Something went wrong, try again later.
Schema
{
"message": "The server encountered an internal error and was unable to complete your request",
"type": "internal_server_error",
"success": false
}
Invalid response from the upstream server
Schema
{
"message": "The server was acting as a gateway or proxy and received an invalid response from the upstream server",
"type": "bad_gateway",
"success": false
}
The server is currently unable to handle the request due to a temporary overload or scheduled maintenance
Schema
{
"message": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance",
"type": "service_unavailable",
"success": false
}
The server did not receive a timely response from the upstream server.
Schema
{
"message": "The server was acting as a gateway or proxy and did not receive a timely response from the upstream server",
"type": "gateway_timeout",
"success": false
}