The response will list only a single child post for every post ID as offset is set to 1 in the sample request query params:
{
"_id": "LX8LQC",
"audio_data": null,
"audio_text": null,
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/EWT3IROKZEaud1.m4a",
"category_ids": [],
"chatgpt_query_id": null,
"child_posts": [
{
"_id": "H9998M",
"audio_data": null,
"audio_text": null,
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/C4738WZB8Caud1.m4a",
"category_ids": [],
"chatgpt_query_id": null,
"data": {},
"is_active": true,
"parent_post_id": "LX8LQC",
"text": "dummy text",
"user_id": "EQOKSU",
"whisper_id": null
}
],
"child_posts_details": {
"current_start": 0,
"cursor": 0,
"next_offset": 2,
"total": 2
},
"data": {},
"is_active": true,
"parent_post_id": null,
"text": "dummy text",
"user_id": "EQOKSU",
"whisper_id": null
}
Status Code: 🔴404 (404 denotes 'Not found')
{
"message": "Ain't no cake like that."
}
Get Posts by Category
Get posts by a specific category filter.
Params
Query Parameter ⬇️
Query Parameter
Data Type
Description
category_id (required)
String
A unique identifier for a category to find relevant posts.
organization_id (required)
String
A unique identifier for identifying psts under an organization
Header Parameter ⬇️
Header Parameter
Data Type
Description
Bearer {{access_token}} (required)
String
Access tokens enable secure access to Matar Resources.
Sample Request ⬇️️
curl --location --request GET 'https://matar.in.ngrok.io/api/v1/get_post?category_id=TFTWNI&organization_id=129487316' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjkyOTQzNDY0LCJqdGkiOiJmNTY2MWMzMC00YWNkLTRjNDUtYmU2NS03ZmQyOGM2OTJiYzMiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMzk1MDFUIiwibmJmIjoxNjkyOTQzNDY0LCJleHAiOjE2OTM4MDc0NjR9.soJepZDtTK3JLfvMjl_XL5jwQr9sP8oTOiA43Fi7VZs'
Responses ⬇️
Status Code: 🟢200 (200 denotes 'ok')
The response will list all the posts in an organization by filtering to a specific category ID provided. Note that there are a total of 15 posts in the response below for a specified category.
Note: The response below is shortened for formatting purposes.
{
"page_details": {
"current_start": 0,
"next_offset": 10,
"total": 15
},
"posts": [
{
"_id": "VAGDWM8YZP",
"audio_data": null,
"audio_text": "हमें अपनी अच्छी सेहत के लिए क्या करना चाहिए?",
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/RLOCWGZWM5v2Sehat_Question.flac",
"category_ids": [
"TFTWNI"
],
"chatgpt_query_id": null,
"child_posts": [],
"child_posts_details": {
"current_start": 0,
"cursor": 0,
"next_offset": 0,
"total": 0
},
"created_at": "25/08/2023 , 06:05 AM",
"data": {
"duration": 4.56,
"like": 1
},
"is_active": true,
"is_chatgpt_enabled": false,
"organization_id": "129487316",
"parent_post_id": null,
"sort_order": null,
"text": "हमें अपनी अच्छी सेहत के लिए क्या करना चाहिए?",
"user": {
"_id": "39501T",
"image_url": "https://listapp-images.s3.ap-south-1.amazonaws.com/matar_profile_05.png",
"name": "Sri"
},
"user_id": "39501T",
"user_post_activities": {
"like": true
},
"whisper_id": null
},
{
"_id": "CONYLC",
"audio_data": null,
"audio_text": "श्रीमान एक किसान के तौर पर आपका सवाल है कि हम खेती लेकर किस तरह करियर बना सकते हैं और इसमें सफल होने के लिए कौनसी कदम उठाने होंगे खेती में अगर संभव हो तो कृपया उत्तर हिंदी में दें धन्यवाद",
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/53WL1YSXP4v208DY48PDIF.mp3",
"category_ids": [
"TFTWNI"
],
"chatgpt_query_id": null,
"child_posts": [
{
"_id": "GSYRNH",
"audio_data": null,
"audio_text": null,
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/O9AYC2TLXHv2storage_emulated_0_Android_data_com.mutter_files_DCIM_answer_recording.mp3",
"category_ids": [
"TFTWNI"
],
"chatgpt_query_id": null,
"created_at": "17/05/2023 , 06:06 AM",
"data": {
"block": 0,
"dislike": 1,
"downvote": 0,
"like": 4,
"view": 4
},
"is_active": true,
"is_chatgpt_enabled": true,
"organization_id": "129487316",
"parent_post_id": "CONYLC",
"sort_order": null,
"text": null,
"user": {
"_id": "XUEWT6",
"image_url": "https://listapp-images.s3.ap-south-1.amazonaws.com/matar_profile_05.png",
"name": "shantanu"
},
"user_id": "XUEWT6",
"user_post_activities": {},
"whisper_id": null
}
Status Code: 🔴404 (404 denotes 'Not found')
{
"message": "Ain't no cake like that."
}
Get User Posts
Get questions/posts asked by the specific user.
Params
Query Parameter ⬇️
Query Parameter
Data Type
Description
user_questions (required)
Boolean
A unique boolean for a category to find relevant posts only related to user. Set to true to get only user posted questions.
organization_id (required)
String
A unique identifier for identifying relevant posts under an organization
Header Parameter ⬇️
Header Parameter
Data Type
Description
Bearer {{access_token}} (required)
String
Access tokens enable secure access to Matar Server Resources.
The response will list all the posts/questions in an organization by filtering to a specific user.
{
"page_details": {
"current_start": 0,
"next_offset": 1,
"total": 1
},
"posts": [
{
"_id": "ZNF04X",
"audio_data": null,
"audio_text": null,
"audio_translation": null,
"audio_url": "https://matar-audio.s3.ap-south-1.amazonaws.com/8Z3IK53SUBaud1.m4a",
"category_ids": [
"TFTWNI"
],
"chatgpt_query_id": null,
"child_posts": [],
"child_posts_details": {
"current_start": 0,
"cursor": 0,
"next_offset": 0,
"total": 0
},
"data": {},
"is_active": true,
"parent_post_id": null,
"text": null,
"user_id": "EQOKSU",
"whisper_id": null
}
]
}
Response Parameters Description Table
Response Parameter
Description
page_details_current_start
Current post page number.
page_details_next_offset
Set a particular page number to start for post-viewing via offset.
page_details _total
Total number of post pages available on network
post_id
A unique identifier linked to posted audio question.
post_audio_text
Contains transcribed version of audio post.
post_audio_url
URL of where audio post is stored.
category_ids
A unique identifier linked the category in which question is posted.
child_posts
Contains list of child posts. A child post is a answer/reply post to the parent/question post.
child_posts_current_start
Current child post page number.
child_posts_cursor
child_posts_next_offset
Set a particular page number to start from for child post-viewing.
total
Total number of child posts
chatgpt_query_id
A chatgpt unique dentifier linked to audio question asked by users.
created_at
Post creation date
duration
Duration of audio post in minutes and seconds.
like
Total number of likes for the post.
is_active
Is organization active or not.
is_chatgpt_enabled
Is chat gpt enabled to answer to question post in an organization
organization_id
Organization in which the question is posted.
parent_post_id
If question post has replies or child post then the question has a valid parent_post_id. parent_post_id is set to null when question post has no replies.
sort_order
When there are multiple posts to display they are sorted by sort order and has a number assigned to it. If there is a single post to display the sort_order will be set to null.
text
Contains post text transcribed from audio.
user_id
User ID of the account from which audio is posted.