Ⓜ️
Matar
  • ✍️About Matar
  • 📁Concept
    • 📄Understanding Matar
  • 📁Matar For Communities
    • 📄Hosting on Matar
    • 📄Trial Pilot
    • 📄Community Management
  • 📁🚀 Get Started
    • 📄Language Selection
    • 📄Organization Onboarding
    • 📄Signing Up
  • 📁Matar Features
    • 📄Browsing the App
    • 📄View Questions
    • 📄Changing Subjects
    • 📄Answer Questions
    • 📄Ask a Question
    • 📄Share a Question
    • 📄Like an Answer
    • 📄See Liked Answers
    • 📄Dislike an Answer
    • 📄See Recorded Questions
    • 📄See Recorded Answers
    • 📄Troubleshooting
    • 📄Version
    • 📄FAQ
  • 📁Developer Reference
    • 🗄️Architecture
      • 📄Overview
      • 📄Backend
      • 📄Frontend
      • 📄API Layer
    • 📜Guides
      • 📄Add/delete posts
    • 🛠️API
      • 📄API Flow
      • 📁User Login
        • 📄Login
        • 📄Submit OTP
        • 📄Get Current User
        • 📄Edit User
        • 📄Logout
      • 📄Organization Selection
      • 📄Language and Categories
      • 📄Activity Types
      • 📁Posts
        • 📄Post a New Question
        • 📄Delete a Post
        • 📄Post Activity Type
        • 📄Post Information
        • 📄Post GPT Processing
    • 📶DB Tables and Structure
      • 📄Matar DB tables
      • 📄Code Structure
    • 💻Backend Code
      • 📄Response on a Post from AI
      • 📄Post Sorting
      • 📄User Registration
      • 📄Org Based Code
    • 💻Frontend Code
      • 📄Overview
      • 📄Setting up Project
      • 📄Project Structure
      • 📄Code Directories
        • 📄Broadcast Directory
        • 📄Core Directory
        • 📄Data Directory
        • 📄di Directory
        • 📄domain/repository Directory
        • 📄model Directory
        • 📄retrofit Directory
        • 📄ui Directory
          • 📄dialog
          • 📄features
          • 📄service
  • 🤝Support
Powered by GitBook
On this page
  • Get All Languages
  • Params
  • Get All Categories
  • Params
  1. Developer Reference
  2. API

Language and Categories

PreviousOrganization SelectionNextActivity Types

Last updated 1 year ago

Matar supports P2P audio conversations in various languages and categories. Get a list of languages and categories via API Endpoints below.

Get All Languages

Get a list of languages by Language ID

Params

Body Parameter ⬇️

Body Parameter
Data Type
Description

Bearer {{access_token}} (required)

String

Access token helps secure access to Matar resources.


Sample Request ⬇️️ (Body Parameter)

curl --location 'https://matar.in.ngrok.io/api/v1/languages' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjkyODcyNDIxLCJqdGkiOiIyZmNiODJiYi0zMDYzLTQzNGUtOGM5OS00NTVjMDhhY2Y3MmMiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMzk1MDFUIiwibmJmIjoxNjkyODcyNDIxLCJleHAiOjE2OTM3MzY0MjF9.ovz0ItiPsYG_rqT3vEYl42WZBonX52NXf-oWE4DuGmQ'

Responses ⬇️

Status Code: 🟢200 (200 denotes 'ok')

{
    "languages": {
        "hi-IN": "हिंदी",
        "kn-IN": "ಕನ್ನಡ",
        "ur-IN": "اردو",
        "mr-IN": "मराठी",
        "ta-IN": "தமிழ்",
        "te-IN": "తెలుగు",
        "en-IN": "English"
    }
}

Status Code: 🔴404 (404 denotes 'Not found')

{
      "message": "Ain't no cake like that."
}

Response Parameters Description:

In the response, the language code is mapped to the language name which is used in various Matar API endpoints


Get All Categories

Get Question Categories by Category ID for an organization

Params

Query Parameter ⬇️

Body Parameter
Data Type
Description

organization_id (required)

String

An organization ID can be fetched via Get all Organizations API endpoint.

Header Parameter ⬇️

Header Parameter
Data Type
Description

Bearer {{access_token}} (required)

String

Access token helps secure access to Matar resources.


Sample Request ⬇️️ (Body Parameter)

curl --location 'https://matar.in.ngrok.io/api/v1/categories?organization_id=129487316' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6dHJ1ZSwiaWF0IjoxNjkyODcyNDIxLCJqdGkiOiIyZmNiODJiYi0zMDYzLTQzNGUtOGM5OS00NTVjMDhhY2Y3MmMiLCJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMzk1MDFUIiwibmJmIjoxNjkyODcyNDIxLCJleHAiOjE2OTM3MzY0MjF9.ovz0ItiPsYG_rqT3vEYl42WZBonX52NXf-oWE4DuGmQ'

Responses ⬇️

Status Code: 🟢200 (200 denotes 'ok')

{
    "categories": [
        {
            "_id": "AK9OPI",
            "is_active": true,
            "parent_category_id": null,
            "sort_order": 8,
            "title": "काम काज"
        },
        {
            "_id": "B8KIKL",
            "is_active": true,
            "parent_category_id": null,
            "sort_order": 7,
            "title": "सपने और ख्वाइशें"
        },
        {
            "_id": "WJ6BWG",
            "is_active": true,
            "parent_category_id": null,
            "sort_order": 6,
            "title": "सेहत"
        },
        {
            "_id": "LP4LJ2",
            "is_active": true,
            "parent_category_id": null,
            "sort_order": 5,
            "title": "खाना ख़ज़ाना"
        },
        {
            "_id": "KL9WNO",
            "is_active": true,
            "parent_category_id": null,
            "sort_order": 4,
            "title": "मनोरंजन"
        },
        {
            "_id": "P0OKL3",
            "is_active": true,
            "parent_category_id": null,
            "sort_order": 3,
            "title": "सबसे बड़ा रुपया"
        },
        {
            "_id": "ZESAJZ",
            "is_active": true,
            "parent_category_id": null,
            "sort_order": 2,
            "title": "समाज"
        },
        {
            "_id": "TFTWNI",
            "is_active": true,
            "parent_category_id": null,
            "sort_order": 1,
            "title": "कृषि"
        }
    ]
}

Response Parameters Description:

Response Parameter
Description

_id

Six-digit alphanumerical ID mapped to a certain question category in an organization.

is_active

Denotes whether the category is active.

parent_category_id

Every sub-category(child) has a parent category id.

sort_order

Order in which categories are sorted and listed.

title

Category Title.

📁
🛠️
📄
Drawing
API: -
Drawing
API: -
https://matar.in.ngrok.io/api/v1/languages
https://matar.in.ngrok.io/api/v1/categories?organization_id=<ORG_ID>