Paginación

La paginación permite obtener los elementos de una lista muy grande de manera más eficiente, reduciendo los tempos de respuesta y el consumo de recursos. La lista que se obtiene representa una colección de objetos en un formato que nos permite paginar de una manera eficiente.

Objeto Lista

Atributos

TipoDescripción
next_page_urlstringURL de la siguiente página.
previous_page_urlstringUrl de la página anterior.
has_morebooleanTrue, si hay más paginas.
totalstringNúmero de la cantidad de registros en la lista
objectstringEl tipo de objeto en este caso, lista
dataarrayArreglo con los resultados de página.
//Ejemplo de paginación con valores especificos

{
  "next_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5",
  "previous_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5",
  "has_more": true,
  "object": "list",
  "total": 1,
  "data": [{
    "id": "src_2fw8YeLSqoaGEYTn3",
    "object": "source",
    "type": "card",
    "created_at": 1597069683,
    "last4": "4242",
    "exp_month": "12",
    "exp_year": "19",
    "brand": "VISA",
    "name": "Jorge Lopez",
    "parent_id": "cus_zzmjKsnM9oacyCwV3"
  }]
}
#Ejemplo de paginación con valores especificos

{
  next_page_url: "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5",
  previous_page_url: "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5",
  has_more: true,
  object: "list",
  total: 1,
  data: [{
    id: "src_2fw8YeLSqoaGEYTn3",
    object: "source",
    type: "card",
    created_at: 1597069683,
    last4: "4242",
    exp_month: "12",
    exp_year: "19",
    brand: "VISA",
    name: "Jorge Lopez",
    parent_id: "cus_zzmjKsnM9oacyCwV3"
  }]
}
//Ejemplo de paginación con valores especificos

{
  "next_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5",
  "previous_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5",
  "has_more": true,
  "object": "list",
  "total": 1,
  "data": [{
    "id": "src_2fw8YeLSqoaGEYTn3",
    "object": "source",
    "type": "card",
    "created_at": 1597069683,
    "last4": "4242",
    "exp_month": "12",
    "exp_year": "19",
    "brand": "VISA",
    "name": "Jorge Lopez",
    "parent_id": "cus_zzmjKsnM9oacyCwV3"
  }]
}
#Ejemplo de paginación con valores especificos

{
  "next_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5",
  "previous_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5",
  "has_more": true,
  "object": "list",
  "total": 1,
  "data": [{
    "id": "src_2fw8YeLSqoaGEYTn3",
    "object": "source",
    "type": "card",
    "created_at": 1597069683,
    "last4": "4242",
    "exp_month": "12",
    "exp_year": "19",
    "brand": "VISA",
    "name": "Jorge Lopez",
    "parent_id": "cus_zzmjKsnM9oacyCwV3"
  }]
}
//Ejemplo de paginación con valores especificos

{
  "next_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5",
  "previous_page_url": "https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5",
  "has_more": true,
  "object": "list",
  "total": 1,
  "data": [{
    "id": "src_2fw8YeLSqoaGEYTn3",
    "object": "source",
    "type": "card",
    "created_at": 1597069683,
    "last4": "4242",
    "exp_month": "12",
    "exp_year": "19",
    "brand": "VISA",
    "name": "Jorge Lopez",
    "parent_id": "cus_zzmjKsnM9oacyCwV3"
  }]
}
//Ejemplo de paginación con valores especificos

{
  next_page_url = https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5,
  previous_page_url = https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5,
  has_more = true,
  object = list,
  total = 1,
  data = [{
    id = src_2fw8YeLSqoaGEYTn3,
    object = source,
    type = card,
    created_at = 1597069683,
    last4 = 4242,
    exp_month = 12,
    exp_year = 19,
    brand = VISA,
    name = Jorge Lopez,
    parent_id = cus_zzmjKsnM9oacyCwV3
  }]
}
//Ejemplo de paginación con valores especificos

"{
  \"next_page_url\": \"https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5\",
  \"previous_page_url\": \"https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5\",
  \"has_more\": true,
  \"object\": \"list\",
  \"total\": 1,
  \"data\": [{
    \"id\": \"src_2fw8YeLSqoaGEYTn3\",
    \"object\": \"source\",
    \"type\": \"card\",
    \"created_at\": 1597069683,
    \"last4\": \"4242\",
    \"exp_month\": \"12\",
    \"exp_year\": \"19\",
    \"brand\": \"VISA\",
    \"name\": \"Jorge Lopez\",
    \"default\": null,
    \"parent_id\": \"cus_zzmjKsnM9oacyCwV3\"
  }]
}"
//Ejemplo de paginación con valores especificos

{
  next_page_url = https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?next=src_43EDwrLSqoaRE3We2&limit=5,
  previous_page_url = https://api.conekta.io/customers/cus_zzmjKsnM9oacyCwV3/sources?previous=src_2fw8YeLSqoaGEYTn3&limit=5,
  has_more = true,
  object = list,
  total = 1,
  data = [{
    id = src_2fw8YeLSqoaGEYTn3,
    object = source,
    type = card,
    created_at = 1597069683,
    last4 = 4242,
    exp_month = 12,
    exp_year = 19,
    brand = VISA,
    name = Jorge Lopez,
    parent_id = cus_zzmjKsnM9oacyCwV3
  }]
}