Obtén la página anterior de objetos listados.
En la práctica, la función NEXT, trae los valores previos por lo que debes considerar este elemento para conectar correctamente tus llamadas a la API de manera exitosa.
Argumentos
Tipo | Descripción | |
---|---|---|
limit | string | Tamaño de la página. Máximo 20 registros por página |
next | string as Valor especifico | Último id en la página. los Id´s dependen de lo que se esta paginando |
Ejemplos de Urls de paginación, pensado en colocar algunas variables como variables de entorno:
Paginación, ejemplos prácticos
Clientes: https://api.conekta.io/customers?limit={{limit_value}}&next={{customer_id}}
Ordenes: https://api.conekta.io/orders?limit={{limit_value}}&next={{order_id}}
curl -H "Accept: application/vnd.conekta-v2.0.0+json" \
-H "Content-type: application/json" \
-u key_eYvWV7gSDkNYXsmr: \
-X GET https://api.conekta.io/customers?limit=5&next=cus_zzmjKsnM9oacyCwV3
//Orders sample JSON response:
{
"next_page_url": "https://api.conekta.io/orders?limit=20&next=ord_2hyyAMFUjroKwPR7L",
"previous_page_url": "https://api.conekta.io/orders?limit=20&previous=ord_2j9NfCf4xs5qzpUrf",
"has_more": true,
"total": 8505,
"object": "list",
"data": [
{
"livemode": false,
"amount": 4480,
"currency": "USD",
"payment_status": "pre_authorized",
"amount_refunded": 0,
"customer_info": {
"email": "[email protected]",
"phone": "55 1234 5678",
"name": "test conekta",
"corporate": false,
"object": "customer_info"
},
"shipping_contact": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"residential": true,
"object": "shipping_address",
"postal_code": "01000"
},
"id": "ship_cont_2j9NgPyuUXHixVdUZ",
"object": "shipping_contact",
"created_at": 0
},
"fiscal_entity": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"object": "fiscal_entity_address",
"postal_code": "01000"
},
"id": "fis_ent_2j9NgPyuUXHixVdUX",
"object": "fiscal_entity",
"created_at": 0
},
"object": "order",
"id": "ord_2j9NfCf4xs5qzpUrf",
"metadata": {},
"created_at": 1535064813,
"updated_at": 1535064902,
"charges": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "5b7f3aededbb6e730ff16cf4",
"livemode": false,
"created_at": 1535064813,
"currency": "MXN",
"device_fingerprint": "eUBNjNE3KJCgGtmjZUaZZGFxP5EkcnQ6",
"payment_method": {
"name": "info gen",
"exp_month": "12",
"exp_year": "23",
"auth_code": "081783",
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"zip": "01000",
"country": "MX",
"object": "address"
},
"object": "card_payment",
"type": "credit",
"last4": "4242",
"brand": "visa",
"issuer": "",
"account_type": "",
"country": "US",
"fraud_score": 24.0,
"fraud_indicators": []
},
"object": "charge",
"reference_id": "c5113069764702.3",
"status": "pre_authorized",
"amount": 82966,
"fee": 3081,
"customer_id": "",
"order_id": "ord_2j9NfCf4xs5qzpUrf"
}
]
}
}
//Cliente sample JSON response:
{
"next_page_url": "https://api.conekta.io/customers?limit=20&next=cus_2k6HrxWCNiMEQsWUF",
"previous_page_url": "https://api.conekta.io/customers?limit=20&previous=cus_2oQVKiYcAEeFQXmVb",
"has_more": true,
"total": 5143,
"object": "list",
"data": [
{
"livemode": false,
"name": "Juan Perez",
"email": "[email protected]",
"phone": "+525514014109",
"id": "cus_2oQVKiYcAEeFQXmVb",
"object": "customer",
"created_at": 1600373525,
"corporate": false,
"custom_reference": "",
"payment_sources": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "off_ref_2oQVKiYcAEeFQXmVc",
"object": "payment_source",
"type": "spei_recurrent",
"reference": "646180111812345678",
"created_at": 1600373525,
"parent_id": "cus_2oQVKiYcAEeFQXmVb"
}
]
}
}
object_window = Conekta::Customer.where()
object_window.next()
#Orders sample JSON response:
{
"next_page_url": "https://api.conekta.io/orders?limit=20&next=ord_2hyyAMFUjroKwPR7L",
"previous_page_url": "https://api.conekta.io/orders?limit=20&previous=ord_2j9NfCf4xs5qzpUrf",
"has_more": true,
"total": 8505,
"object": "list",
"data": [
{
"livemode": false,
"amount": 4480,
"currency": "USD",
"payment_status": "pre_authorized",
"amount_refunded": 0,
"customer_info": {
"email": "[email protected]",
"phone": "55 1234 5678",
"name": "test conekta",
"corporate": false,
"object": "customer_info"
},
"shipping_contact": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"residential": true,
"object": "shipping_address",
"postal_code": "01000"
},
"id": "ship_cont_2j9NgPyuUXHixVdUZ",
"object": "shipping_contact",
"created_at": 0
},
"fiscal_entity": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"object": "fiscal_entity_address",
"postal_code": "01000"
},
"id": "fis_ent_2j9NgPyuUXHixVdUX",
"object": "fiscal_entity",
"created_at": 0
},
"object": "order",
"id": "ord_2j9NfCf4xs5qzpUrf",
"metadata": {},
"created_at": 1535064813,
"updated_at": 1535064902,
"charges": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "5b7f3aededbb6e730ff16cf4",
"livemode": false,
"created_at": 1535064813,
"currency": "MXN",
"device_fingerprint": "eUBNjNE3KJCgGtmjZUaZZGFxP5EkcnQ6",
"payment_method": {
"name": "info gen",
"exp_month": "12",
"exp_year": "23",
"auth_code": "081783",
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"zip": "01000",
"country": "MX",
"object": "address"
},
"object": "card_payment",
"type": "credit",
"last4": "4242",
"brand": "visa",
"issuer": "",
"account_type": "",
"country": "US",
"fraud_score": 24.0,
"fraud_indicators": []
},
"object": "charge",
"reference_id": "c5113069764702.3",
"status": "pre_authorized",
"amount": 82966,
"fee": 3081,
"customer_id": "",
"order_id": "ord_2j9NfCf4xs5qzpUrf"
}
]
}
}
#Client sample JSON response:
{
"next_page_url": "https://api.conekta.io/customers?limit=20&next=cus_2k6HrxWCNiMEQsWUF",
"previous_page_url": "https://api.conekta.io/customers?limit=20&previous=cus_2oQVKiYcAEeFQXmVb",
"has_more": true,
"total": 5143,
"object": "list",
"data": [
{
"livemode": false,
"name": "Juan Perez",
"email": "[email protected]",
"phone": "+525514014109",
"id": "cus_2oQVKiYcAEeFQXmVb",
"object": "customer",
"created_at": 1600373525,
"corporate": false,
"custom_reference": "",
"payment_sources": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "off_ref_2oQVKiYcAEeFQXmVc",
"object": "payment_source",
"type": "spei_recurrent",
"reference": "646180111812345678",
"created_at": 1600373525,
"parent_id": "cus_2oQVKiYcAEeFQXmVb"
}
]
}
}
$object_window = \Conekta\Customer::where();
$object_window->next();
//Orders sample JSON response:
{
"next_page_url": "https://api.conekta.io/orders?limit=20&next=ord_2hyyAMFUjroKwPR7L",
"previous_page_url": "https://api.conekta.io/orders?limit=20&previous=ord_2j9NfCf4xs5qzpUrf",
"has_more": true,
"total": 8505,
"object": "list",
"data": [
{
"livemode": false,
"amount": 4480,
"currency": "USD",
"payment_status": "pre_authorized",
"amount_refunded": 0,
"customer_info": {
"email": "[email protected]",
"phone": "55 1234 5678",
"name": "test conekta",
"corporate": false,
"object": "customer_info"
},
"shipping_contact": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"residential": true,
"object": "shipping_address",
"postal_code": "01000"
},
"id": "ship_cont_2j9NgPyuUXHixVdUZ",
"object": "shipping_contact",
"created_at": 0
},
"fiscal_entity": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"object": "fiscal_entity_address",
"postal_code": "01000"
},
"id": "fis_ent_2j9NgPyuUXHixVdUX",
"object": "fiscal_entity",
"created_at": 0
},
"object": "order",
"id": "ord_2j9NfCf4xs5qzpUrf",
"metadata": {},
"created_at": 1535064813,
"updated_at": 1535064902,
"charges": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "5b7f3aededbb6e730ff16cf4",
"livemode": false,
"created_at": 1535064813,
"currency": "MXN",
"device_fingerprint": "eUBNjNE3KJCgGtmjZUaZZGFxP5EkcnQ6",
"payment_method": {
"name": "info gen",
"exp_month": "12",
"exp_year": "23",
"auth_code": "081783",
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"zip": "01000",
"country": "MX",
"object": "address"
},
"object": "card_payment",
"type": "credit",
"last4": "4242",
"brand": "visa",
"issuer": "",
"account_type": "",
"country": "US",
"fraud_score": 24.0,
"fraud_indicators": []
},
"object": "charge",
"reference_id": "c5113069764702.3",
"status": "pre_authorized",
"amount": 82966,
"fee": 3081,
"customer_id": "",
"order_id": "ord_2j9NfCf4xs5qzpUrf"
}
]
}
}
//Client sample JSON response:
{
"next_page_url": "https://api.conekta.io/customers?limit=20&next=cus_2k6HrxWCNiMEQsWUF",
"previous_page_url": "https://api.conekta.io/customers?limit=20&previous=cus_2oQVKiYcAEeFQXmVb",
"has_more": true,
"total": 5143,
"object": "list",
"data": [
{
"livemode": false,
"name": "Juan Perez",
"email": "[email protected]",
"phone": "+525514014109",
"id": "cus_2oQVKiYcAEeFQXmVb",
"object": "customer",
"created_at": 1600373525,
"corporate": false,
"custom_reference": "",
"payment_sources": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "off_ref_2oQVKiYcAEeFQXmVc",
"object": "payment_source",
"type": "spei_recurrent",
"reference": "646180111812345678",
"created_at": 1600373525,
"parent_id": "cus_2oQVKiYcAEeFQXmVb"
}
]
}
}
object_window = conekta.Customer.where()
object_window.next()
#Orders sample JSON response:
{
"next_page_url": "https://api.conekta.io/orders?limit=20&next=ord_2hyyAMFUjroKwPR7L",
"previous_page_url": "https://api.conekta.io/orders?limit=20&previous=ord_2j9NfCf4xs5qzpUrf",
"has_more": true,
"total": 8505,
"object": "list",
"data": [
{
"livemode": false,
"amount": 4480,
"currency": "USD",
"payment_status": "pre_authorized",
"amount_refunded": 0,
"customer_info": {
"email": "[email protected]",
"phone": "55 1234 5678",
"name": "test conekta",
"corporate": false,
"object": "customer_info"
},
"shipping_contact": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"residential": true,
"object": "shipping_address",
"postal_code": "01000"
},
"id": "ship_cont_2j9NgPyuUXHixVdUZ",
"object": "shipping_contact",
"created_at": 0
},
"fiscal_entity": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"object": "fiscal_entity_address",
"postal_code": "01000"
},
"id": "fis_ent_2j9NgPyuUXHixVdUX",
"object": "fiscal_entity",
"created_at": 0
},
"object": "order",
"id": "ord_2j9NfCf4xs5qzpUrf",
"metadata": {},
"created_at": 1535064813,
"updated_at": 1535064902,
"charges": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "5b7f3aededbb6e730ff16cf4",
"livemode": false,
"created_at": 1535064813,
"currency": "MXN",
"device_fingerprint": "eUBNjNE3KJCgGtmjZUaZZGFxP5EkcnQ6",
"payment_method": {
"name": "info gen",
"exp_month": "12",
"exp_year": "23",
"auth_code": "081783",
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"zip": "01000",
"country": "MX",
"object": "address"
},
"object": "card_payment",
"type": "credit",
"last4": "4242",
"brand": "visa",
"issuer": "",
"account_type": "",
"country": "US",
"fraud_score": 24.0,
"fraud_indicators": []
},
"object": "charge",
"reference_id": "c5113069764702.3",
"status": "pre_authorized",
"amount": 82966,
"fee": 3081,
"customer_id": "",
"order_id": "ord_2j9NfCf4xs5qzpUrf"
}
]
}
}
#Client sample JSON response:
{
"next_page_url": "https://api.conekta.io/customers?limit=20&next=cus_2k6HrxWCNiMEQsWUF",
"previous_page_url": "https://api.conekta.io/customers?limit=20&previous=cus_2oQVKiYcAEeFQXmVb",
"has_more": true,
"total": 5143,
"object": "list",
"data": [
{
"livemode": false,
"name": "Juan Perez",
"email": "[email protected]",
"phone": "+525514014109",
"id": "cus_2oQVKiYcAEeFQXmVb",
"object": "customer",
"created_at": 1600373525,
"corporate": false,
"custom_reference": "",
"payment_sources": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "off_ref_2oQVKiYcAEeFQXmVc",
"object": "payment_source",
"type": "spei_recurrent",
"reference": "646180111812345678",
"created_at": 1600373525,
"parent_id": "cus_2oQVKiYcAEeFQXmVb"
}
]
}
}
conekta.Customer.find(function(err, customer) {
customer.previousPage(function(err, res) {
// Handle result
});
});
//Orders sample JSON response:
{
"next_page_url": "https://api.conekta.io/orders?limit=20&next=ord_2hyyAMFUjroKwPR7L",
"previous_page_url": "https://api.conekta.io/orders?limit=20&previous=ord_2j9NfCf4xs5qzpUrf",
"has_more": true,
"total": 8505,
"object": "list",
"data": [
{
"livemode": false,
"amount": 4480,
"currency": "USD",
"payment_status": "pre_authorized",
"amount_refunded": 0,
"customer_info": {
"email": "[email protected]",
"phone": "55 1234 5678",
"name": "test conekta",
"corporate": false,
"object": "customer_info"
},
"shipping_contact": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"residential": true,
"object": "shipping_address",
"postal_code": "01000"
},
"id": "ship_cont_2j9NgPyuUXHixVdUZ",
"object": "shipping_contact",
"created_at": 0
},
"fiscal_entity": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"object": "fiscal_entity_address",
"postal_code": "01000"
},
"id": "fis_ent_2j9NgPyuUXHixVdUX",
"object": "fiscal_entity",
"created_at": 0
},
"object": "order",
"id": "ord_2j9NfCf4xs5qzpUrf",
"metadata": {},
"created_at": 1535064813,
"updated_at": 1535064902,
"charges": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "5b7f3aededbb6e730ff16cf4",
"livemode": false,
"created_at": 1535064813,
"currency": "MXN",
"device_fingerprint": "eUBNjNE3KJCgGtmjZUaZZGFxP5EkcnQ6",
"payment_method": {
"name": "info gen",
"exp_month": "12",
"exp_year": "23",
"auth_code": "081783",
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"zip": "01000",
"country": "MX",
"object": "address"
},
"object": "card_payment",
"type": "credit",
"last4": "4242",
"brand": "visa",
"issuer": "",
"account_type": "",
"country": "US",
"fraud_score": 24.0,
"fraud_indicators": []
},
"object": "charge",
"reference_id": "c5113069764702.3",
"status": "pre_authorized",
"amount": 82966,
"fee": 3081,
"customer_id": "",
"order_id": "ord_2j9NfCf4xs5qzpUrf"
}
]
}
}
//Client sample JSON response:
{
"next_page_url": "https://api.conekta.io/customers?limit=20&next=cus_2k6HrxWCNiMEQsWUF",
"previous_page_url": "https://api.conekta.io/customers?limit=20&previous=cus_2oQVKiYcAEeFQXmVb",
"has_more": true,
"total": 5143,
"object": "list",
"data": [
{
"livemode": false,
"name": "Juan Perez",
"email": "[email protected]",
"phone": "+525514014109",
"id": "cus_2oQVKiYcAEeFQXmVb",
"object": "customer",
"created_at": 1600373525,
"corporate": false,
"custom_reference": "",
"payment_sources": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "off_ref_2oQVKiYcAEeFQXmVc",
"object": "payment_source",
"type": "spei_recurrent",
"reference": "646180111812345678",
"created_at": 1600373525,
"parent_id": "cus_2oQVKiYcAEeFQXmVb"
}
]
}
}
ConektaList orders = Order.where(
new JSONObject("{ 'amount': 35000 }")
);
orders.next();
//Orders sample JSON response:
{
"next_page_url": "https://api.conekta.io/orders?limit=20&next=ord_2hyyAMFUjroKwPR7L",
"previous_page_url": "https://api.conekta.io/orders?limit=20&previous=ord_2j9NfCf4xs5qzpUrf",
"has_more": true,
"total": 8505,
"object": "list",
"data": [
{
"livemode": false,
"amount": 4480,
"currency": "USD",
"payment_status": "pre_authorized",
"amount_refunded": 0,
"customer_info": {
"email": "[email protected]",
"phone": "55 1234 5678",
"name": "test conekta",
"corporate": false,
"object": "customer_info"
},
"shipping_contact": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"residential": true,
"object": "shipping_address",
"postal_code": "01000"
},
"id": "ship_cont_2j9NgPyuUXHixVdUZ",
"object": "shipping_contact",
"created_at": 0
},
"fiscal_entity": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"object": "fiscal_entity_address",
"postal_code": "01000"
},
"id": "fis_ent_2j9NgPyuUXHixVdUX",
"object": "fiscal_entity",
"created_at": 0
},
"object": "order",
"id": "ord_2j9NfCf4xs5qzpUrf",
"metadata": {},
"created_at": 1535064813,
"updated_at": 1535064902,
"charges": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "5b7f3aededbb6e730ff16cf4",
"livemode": false,
"created_at": 1535064813,
"currency": "MXN",
"device_fingerprint": "eUBNjNE3KJCgGtmjZUaZZGFxP5EkcnQ6",
"payment_method": {
"name": "info gen",
"exp_month": "12",
"exp_year": "23",
"auth_code": "081783",
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"zip": "01000",
"country": "MX",
"object": "address"
},
"object": "card_payment",
"type": "credit",
"last4": "4242",
"brand": "visa",
"issuer": "",
"account_type": "",
"country": "US",
"fraud_score": 24.0,
"fraud_indicators": []
},
"object": "charge",
"reference_id": "c5113069764702.3",
"status": "pre_authorized",
"amount": 82966,
"fee": 3081,
"customer_id": "",
"order_id": "ord_2j9NfCf4xs5qzpUrf"
}
]
}
}
//Client sample JSON response:
{
"next_page_url": "https://api.conekta.io/customers?limit=20&next=cus_2k6HrxWCNiMEQsWUF",
"previous_page_url": "https://api.conekta.io/customers?limit=20&previous=cus_2oQVKiYcAEeFQXmVb",
"has_more": true,
"total": 5143,
"object": "list",
"data": [
{
"livemode": false,
"name": "Juan Perez",
"email": "[email protected]",
"phone": "+525514014109",
"id": "cus_2oQVKiYcAEeFQXmVb",
"object": "customer",
"created_at": 1600373525,
"corporate": false,
"custom_reference": "",
"payment_sources": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "off_ref_2oQVKiYcAEeFQXmVc",
"object": "payment_source",
"type": "spei_recurrent",
"reference": "646180111812345678",
"created_at": 1600373525,
"parent_id": "cus_2oQVKiYcAEeFQXmVb"
}
]
}
}
//get all elements
Customer[] object_window = new Customer().where(new JObject());
//Orders sample JSON response:
{
"next_page_url": "https://api.conekta.io/orders?limit=20&next=ord_2hyyAMFUjroKwPR7L",
"previous_page_url": "https://api.conekta.io/orders?limit=20&previous=ord_2j9NfCf4xs5qzpUrf",
"has_more": true,
"total": 8505,
"object": "list",
"data": [
{
"livemode": false,
"amount": 4480,
"currency": "USD",
"payment_status": "pre_authorized",
"amount_refunded": 0,
"customer_info": {
"email": "[email protected]",
"phone": "55 1234 5678",
"name": "test conekta",
"corporate": false,
"object": "customer_info"
},
"shipping_contact": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"residential": true,
"object": "shipping_address",
"postal_code": "01000"
},
"id": "ship_cont_2j9NgPyuUXHixVdUZ",
"object": "shipping_contact",
"created_at": 0
},
"fiscal_entity": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"object": "fiscal_entity_address",
"postal_code": "01000"
},
"id": "fis_ent_2j9NgPyuUXHixVdUX",
"object": "fiscal_entity",
"created_at": 0
},
"object": "order",
"id": "ord_2j9NfCf4xs5qzpUrf",
"metadata": {},
"created_at": 1535064813,
"updated_at": 1535064902,
"charges": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "5b7f3aededbb6e730ff16cf4",
"livemode": false,
"created_at": 1535064813,
"currency": "MXN",
"device_fingerprint": "eUBNjNE3KJCgGtmjZUaZZGFxP5EkcnQ6",
"payment_method": {
"name": "info gen",
"exp_month": "12",
"exp_year": "23",
"auth_code": "081783",
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"zip": "01000",
"country": "MX",
"object": "address"
},
"object": "card_payment",
"type": "credit",
"last4": "4242",
"brand": "visa",
"issuer": "",
"account_type": "",
"country": "US",
"fraud_score": 24.0,
"fraud_indicators": []
},
"object": "charge",
"reference_id": "c5113069764702.3",
"status": "pre_authorized",
"amount": 82966,
"fee": 3081,
"customer_id": "",
"order_id": "ord_2j9NfCf4xs5qzpUrf"
}
]
}
}
//Client sample JSON response:
{
"next_page_url": "https://api.conekta.io/customers?limit=20&next=cus_2k6HrxWCNiMEQsWUF",
"previous_page_url": "https://api.conekta.io/customers?limit=20&previous=cus_2oQVKiYcAEeFQXmVb",
"has_more": true,
"total": 5143,
"object": "list",
"data": [
{
"livemode": false,
"name": "Juan Perez",
"email": "[email protected]",
"phone": "+525514014109",
"id": "cus_2oQVKiYcAEeFQXmVb",
"object": "customer",
"created_at": 1600373525,
"corporate": false,
"custom_reference": "",
"payment_sources": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "off_ref_2oQVKiYcAEeFQXmVc",
"object": "payment_source",
"type": "spei_recurrent",
"reference": "646180111812345678",
"created_at": 1600373525,
"parent_id": "cus_2oQVKiYcAEeFQXmVb"
}
]
}
}
curl -H "Accept: application/vnd.conekta-v2.0.0+json" \
-H "Content-type: application/json" \
-u key_eYvWV7gSDkNYXsmr: \
-X GET https://api.conekta.io/customers?limit=5&next=cus_zzmjKsnM9oacyCwV3
//Orders sample JSON response:
{
"next_page_url": "https://api.conekta.io/orders?limit=20&next=ord_2hyyAMFUjroKwPR7L",
"previous_page_url": "https://api.conekta.io/orders?limit=20&previous=ord_2j9NfCf4xs5qzpUrf",
"has_more": true,
"total": 8505,
"object": "list",
"data": [
{
"livemode": false,
"amount": 4480,
"currency": "USD",
"payment_status": "pre_authorized",
"amount_refunded": 0,
"customer_info": {
"email": "[email protected]",
"phone": "55 1234 5678",
"name": "test conekta",
"corporate": false,
"object": "customer_info"
},
"shipping_contact": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"residential": true,
"object": "shipping_address",
"postal_code": "01000"
},
"id": "ship_cont_2j9NgPyuUXHixVdUZ",
"object": "shipping_contact",
"created_at": 0
},
"fiscal_entity": {
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"country": "mx",
"object": "fiscal_entity_address",
"postal_code": "01000"
},
"id": "fis_ent_2j9NgPyuUXHixVdUX",
"object": "fiscal_entity",
"created_at": 0
},
"object": "order",
"id": "ord_2j9NfCf4xs5qzpUrf",
"metadata": {},
"created_at": 1535064813,
"updated_at": 1535064902,
"charges": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "5b7f3aededbb6e730ff16cf4",
"livemode": false,
"created_at": 1535064813,
"currency": "MXN",
"device_fingerprint": "eUBNjNE3KJCgGtmjZUaZZGFxP5EkcnQ6",
"payment_method": {
"name": "info gen",
"exp_month": "12",
"exp_year": "23",
"auth_code": "081783",
"address": {
"street1": "dfsdfsdf",
"city": "sfda",
"state": "MEX",
"zip": "01000",
"country": "MX",
"object": "address"
},
"object": "card_payment",
"type": "credit",
"last4": "4242",
"brand": "visa",
"issuer": "",
"account_type": "",
"country": "US",
"fraud_score": 24.0,
"fraud_indicators": []
},
"object": "charge",
"reference_id": "c5113069764702.3",
"status": "pre_authorized",
"amount": 82966,
"fee": 3081,
"customer_id": "",
"order_id": "ord_2j9NfCf4xs5qzpUrf"
}
]
}
}
//Client sample JSON response:
{
"next_page_url": "https://api.conekta.io/customers?limit=20&next=cus_2k6HrxWCNiMEQsWUF",
"previous_page_url": "https://api.conekta.io/customers?limit=20&previous=cus_2oQVKiYcAEeFQXmVb",
"has_more": true,
"total": 5143,
"object": "list",
"data": [
{
"livemode": false,
"name": "Juan Perez",
"email": "[email protected]",
"phone": "+525514014109",
"id": "cus_2oQVKiYcAEeFQXmVb",
"object": "customer",
"created_at": 1600373525,
"corporate": false,
"custom_reference": "",
"payment_sources": {
"object": "list",
"has_more": false,
"total": 1,
"data": [
{
"id": "off_ref_2oQVKiYcAEeFQXmVc",
"object": "payment_source",
"type": "spei_recurrent",
"reference": "646180111812345678",
"created_at": 1600373525,
"parent_id": "cus_2oQVKiYcAEeFQXmVb"
}
]
}
}