Update customer
Changed onYou can update customer-related data
Request
- Base URLhttps://api.conekta.io
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Identifier of the resource
Headers
Use for knowing which language to use
In the case of a holding company, the company id of the child company to which will process the request.
Request body
Example request
{
"antifraud_info": {
"account_created_at": 1484040996,
"first_paid_at": 1485151007
},
"date_of_birth": "24/07/1992",
"default_payment_source_id": "src_1a2b3c4d5e6f7g8h",
"email": "miguel@gmail.com",
"name": "miguel",
"phone": "+5215555555555",
"plan_id": "plan_987234823",
"default_shipping_contact_id": "ship_cont_1a2b3c4d5e6f7g8h",
"fiscal_entities": [
{
"address": {
"street1": "Nuevo Leon 254",
"street2": "Departamento 404",
"postal_code": "06100",
"city": "Ciudad de Mexico",
"state": "Ciudad de Mexico",
"country": "MX"
},
"company_name": "conekta"
}
],
"national_id": "HEGG560427MVZRRL04",
"payment_sources": [
{
"type": "card | cash | spei | bnpl | pay_by_bank",
"token_id": "tok_32hj4g234as"
}
],
"shipping_contacts": [
{
"phone": "+525511223344",
"receiver": "Marvin Fuller",
"between_streets": "Ackerman Crescent",
"address": {
"street1": "Nuevo Leon 254",
"street2": "Departamento 404",
"postal_code": "06100",
"city": "Ciudad de Mexico",
"state": "Ciudad de Mexico",
"country": "MX",
"residential": true
}
}
],
"subscription": {
"plan_id": "f84gdgf5g48r15fd21g8w424fd1",
"card_id": "src_2qUCNd5AyQqfPMBuV",
"trial_end": 1484040996
}
}Response
successful operation
Example response
{
"antifraud_info": {
"first_paid_at": 1485151007,
"account_created_at": 1484040996
},
"created_at": 1485151007,
"custom_reference": "custom_reference",
"date_of_birth": "24/07/1992",
"default_fiscal_entity_id": "fis_ent_2tKqqAfqPi21oCmEJ",
"default_shipping_contact_id": "ship_cont_2tKZsTYcsryyu7Ah8",
"default_payment_source_id": "src_2tHJfJ79KyUwpxTio",
"email": "Felipe@gmail.com",
"fiscal_entities": {
"object": "list",
"data": [
{
"address": {
"street1": "Nuevo Leon 254",
"street2": "Departamento 404",
"postal_code": "06100",
"city": "Ciudad de Mexico",
"state": "Ciudad de Mexico",
"country": "MX"
},
"company_name": "conekta",
"id": "ship_cont_2tKZsTYcsryyu7Ah8",
"object": "shipping_contact",
"created_at": 1675715413,
"parent_id": "cus_2tKcHxhTz7xU5SymF"
}
]
},
"id": "cus_2tHJfJ79KyUwpxTik",
"livemode": true,
"name": "Felipe",
"national_id": "HEGG560427MVZRRL04",
"object": "customer",
"payment_sources": {
"object": "list",
"next_page_url": "https://api.conekta.io/resources?limit=10&next=chrg_1",
"previous_page_url": "https://api.conekta.io/resources?limit=10&previous=chrg_1",
"data": [
{
"id": "src_2s8K1B3PBKDontpi9",
"object": "payment_source",
"created_at": 1675715413,
"parent_id": "cus_2s8K1B3PBKDontpi8",
"agreements": [
{
"agreement": "2409526",
"provider": "bbva_cash_in"
}
],
"reference": "93000262276908",
"barcode": "93000262276908",
"barcode_url": "https://barcodes.conekta.com/644ebf80f2243197aad6cd8810375b905b613dbe.png",
"expires_at": 1742483424,
"provider": "Cash"
}
]
},
"phone": "+5215555555555",
"shipping_contacts": {
"object": "list",
"data": [
{
"phone": "+525511223344",
"receiver": "Marvin Fuller",
"between_streets": "Ackerman Crescent",
"address": {
"street1": "Nuevo Leon 254",
"street2": "Departamento 404",
"postal_code": "06100",
"city": "Ciudad de Mexico",
"state": "Ciudad de Mexico",
"country": "MX",
"residential": true
},
"id": "ship_cont_2tKZsTYcsryyu7Ah8",
"object": "shipping_contact",
"created_at": 1675715413
}
]
},
"subscription": {
"billing_cycle_start": 1677626827,
"billing_cycle_end": 1677626827,
"canceled_at": 1678258162,
"canceled_reason": "user_cancelation",
"card_id": "src_2tKcHxhTz7xU5SymL",
"charge_id": "2tKcHxhTz7xU5SymL",
"created_at": 1677626837,
"customer_custom_reference": "dotnet_123456",
"customer_id": "cus_2tKcHxhTz7xU5SymF",
"id": "gold-plan",
"last_billing_cycle_order_id": "ord_2tSoMP7bZJbLiq4z8",
"object": "subscription",
"paused_at": 1678258162,
"plan_id": "plan_2tXx672QLQ68CkmMn",
"status": "past_due",
"subscription_start": 1677626837,
"trial_start": 1677626837,
"trial_end": 1677626837
}
}Changes
- breaking
added
subschema #1: shipping_contact_addressto the//request propertyallOflist - breaking
added the pattern
[A-Za-z]{2}to the request property// - breaking
the
//request property type changed from no type toobject - breaking
the
/////response's property type changed from no type toobjectfor status - warning
the
//request property's maxLength was set to249 - warning
removed the request property
//// - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the request property
/// - warning
removed the optional property
///////from the response with the status - warning
removed the optional property
//////from the response with the status - warning
removed the optional property
//////from the response with the status - warning
removed the optional property
//////from the response with the status - warning
removed the optional property
//////from the response with the status - warning
removed the optional property
//////from the response with the status - warning
removed the optional property
//////from the response with the status - warning
removed the optional property
//////from the response with the status - info
added
subschema #1: shipping_contact_addressto the/////response propertyallOflist for the response status - info
the
/////response's property pattern[A-Za-z]{2}was added for the status
- breaking