Pagination - Languages

Overview

When retrieving languages through the Venddor API, you can control how many results are returned and which page of results to display using pagination parameters.

Base URL: https://www.venddor.com.br/api

Pagination Parameters

Add these parameters to your API requests to control the pagination of language data:

Parameter Default Value Description
page 1 Determines which page of languages to display. The response to GET /api/languages/ is a page with a limited number of installed languages. This parameter specifies the page number to be returned.
items_per_page 10 Controls how many languages are included on each page.
Tip: Pagination is valuable even for languages, as large multilingual systems may support dozens of language options.

Example

GET /api/languages/?page=2&items_per_page=2

This request will return an array with information about 2 languages from the 2nd page of the list of installed languages.

Response Format

Let's examine a sample request to understand the response format:

GET /api/languages/

This request retrieves a list of installed languages.

If the request is successful, you'll receive HTTP/1.1 200 OK with the following JSON response:

{
  "languages": {
    "en": {
      "lang_id": "1",
      "lang_code": "en",
      "name": "English",
      "status": "A",
      "country_code": "US",
      "direction": "ltr"
    },
    "ru": {
      "lang_id": "2",
      "lang_code": "ru",
      "name": "Русский",
      "status": "A",
      "country_code": "RU",
      "direction": "ltr"
    }
  },
  "params": {
    "items_per_page": "10",
    "page": 1,
    "total_items": 2
  }