Update a customer
curl --request PUT \
--url https://api.timbrix.mx/organizations/{organizationId}/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"legalName": "Dunder Mifflin",
"taxId": "ABC101010111",
"taxSystem": "601",
"email": "email@example.com",
"phone": "6474010101",
"defaultInvoiceUse": "G01",
"addressStreet": "<string>",
"addressExterior": "<string>",
"addressInterior": "<string>",
"addressNeighborhood": "<string>",
"addressCity": "<string>",
"addressMunicipality": "<string>",
"addressZip": "<string>",
"addressState": "<string>",
"addressCountry": "<string>"
}
'import requests
url = "https://api.timbrix.mx/organizations/{organizationId}/customers/{customerId}"
payload = {
"legalName": "Dunder Mifflin",
"taxId": "ABC101010111",
"taxSystem": "601",
"email": "email@example.com",
"phone": "6474010101",
"defaultInvoiceUse": "G01",
"addressStreet": "<string>",
"addressExterior": "<string>",
"addressInterior": "<string>",
"addressNeighborhood": "<string>",
"addressCity": "<string>",
"addressMunicipality": "<string>",
"addressZip": "<string>",
"addressState": "<string>",
"addressCountry": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
legalName: 'Dunder Mifflin',
taxId: 'ABC101010111',
taxSystem: '601',
email: 'email@example.com',
phone: '6474010101',
defaultInvoiceUse: 'G01',
addressStreet: '<string>',
addressExterior: '<string>',
addressInterior: '<string>',
addressNeighborhood: '<string>',
addressCity: '<string>',
addressMunicipality: '<string>',
addressZip: '<string>',
addressState: '<string>',
addressCountry: '<string>'
})
};
fetch('https://api.timbrix.mx/organizations/{organizationId}/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.timbrix.mx/organizations/{organizationId}/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'legalName' => 'Dunder Mifflin',
'taxId' => 'ABC101010111',
'taxSystem' => '601',
'email' => 'email@example.com',
'phone' => '6474010101',
'defaultInvoiceUse' => 'G01',
'addressStreet' => '<string>',
'addressExterior' => '<string>',
'addressInterior' => '<string>',
'addressNeighborhood' => '<string>',
'addressCity' => '<string>',
'addressMunicipality' => '<string>',
'addressZip' => '<string>',
'addressState' => '<string>',
'addressCountry' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.timbrix.mx/organizations/{organizationId}/customers/{customerId}"
payload := strings.NewReader("{\n \"legalName\": \"Dunder Mifflin\",\n \"taxId\": \"ABC101010111\",\n \"taxSystem\": \"601\",\n \"email\": \"email@example.com\",\n \"phone\": \"6474010101\",\n \"defaultInvoiceUse\": \"G01\",\n \"addressStreet\": \"<string>\",\n \"addressExterior\": \"<string>\",\n \"addressInterior\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressMunicipality\": \"<string>\",\n \"addressZip\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressCountry\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.timbrix.mx/organizations/{organizationId}/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"legalName\": \"Dunder Mifflin\",\n \"taxId\": \"ABC101010111\",\n \"taxSystem\": \"601\",\n \"email\": \"email@example.com\",\n \"phone\": \"6474010101\",\n \"defaultInvoiceUse\": \"G01\",\n \"addressStreet\": \"<string>\",\n \"addressExterior\": \"<string>\",\n \"addressInterior\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressMunicipality\": \"<string>\",\n \"addressZip\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressCountry\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.timbrix.mx/organizations/{organizationId}/customers/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"legalName\": \"Dunder Mifflin\",\n \"taxId\": \"ABC101010111\",\n \"taxSystem\": \"601\",\n \"email\": \"email@example.com\",\n \"phone\": \"6474010101\",\n \"defaultInvoiceUse\": \"G01\",\n \"addressStreet\": \"<string>\",\n \"addressExterior\": \"<string>\",\n \"addressInterior\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressMunicipality\": \"<string>\",\n \"addressZip\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressCountry\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "590ce6c56d04f840aa8438af",
"organizationId": "org-uuid",
"legalName": "Dunder Mifflin",
"taxId": "ABC101010111",
"taxSystem": "601",
"email": "email@example.com",
"defaultInvoiceUse": "G01",
"address": {
"street": "Blvd. Atardecer",
"exterior": "142",
"neighborhood": "Centro",
"city": "Huatabampo",
"municipality": "Huatabampo",
"zip": "86500",
"state": "Sonora",
"country": "MEX",
"interior": "4"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"phone": "6474010101"
}Customers
Update Customer
PUT
/
organizations
/
{organizationId}
/
customers
/
{customerId}
Update a customer
curl --request PUT \
--url https://api.timbrix.mx/organizations/{organizationId}/customers/{customerId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"legalName": "Dunder Mifflin",
"taxId": "ABC101010111",
"taxSystem": "601",
"email": "email@example.com",
"phone": "6474010101",
"defaultInvoiceUse": "G01",
"addressStreet": "<string>",
"addressExterior": "<string>",
"addressInterior": "<string>",
"addressNeighborhood": "<string>",
"addressCity": "<string>",
"addressMunicipality": "<string>",
"addressZip": "<string>",
"addressState": "<string>",
"addressCountry": "<string>"
}
'import requests
url = "https://api.timbrix.mx/organizations/{organizationId}/customers/{customerId}"
payload = {
"legalName": "Dunder Mifflin",
"taxId": "ABC101010111",
"taxSystem": "601",
"email": "email@example.com",
"phone": "6474010101",
"defaultInvoiceUse": "G01",
"addressStreet": "<string>",
"addressExterior": "<string>",
"addressInterior": "<string>",
"addressNeighborhood": "<string>",
"addressCity": "<string>",
"addressMunicipality": "<string>",
"addressZip": "<string>",
"addressState": "<string>",
"addressCountry": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
legalName: 'Dunder Mifflin',
taxId: 'ABC101010111',
taxSystem: '601',
email: 'email@example.com',
phone: '6474010101',
defaultInvoiceUse: 'G01',
addressStreet: '<string>',
addressExterior: '<string>',
addressInterior: '<string>',
addressNeighborhood: '<string>',
addressCity: '<string>',
addressMunicipality: '<string>',
addressZip: '<string>',
addressState: '<string>',
addressCountry: '<string>'
})
};
fetch('https://api.timbrix.mx/organizations/{organizationId}/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.timbrix.mx/organizations/{organizationId}/customers/{customerId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'legalName' => 'Dunder Mifflin',
'taxId' => 'ABC101010111',
'taxSystem' => '601',
'email' => 'email@example.com',
'phone' => '6474010101',
'defaultInvoiceUse' => 'G01',
'addressStreet' => '<string>',
'addressExterior' => '<string>',
'addressInterior' => '<string>',
'addressNeighborhood' => '<string>',
'addressCity' => '<string>',
'addressMunicipality' => '<string>',
'addressZip' => '<string>',
'addressState' => '<string>',
'addressCountry' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.timbrix.mx/organizations/{organizationId}/customers/{customerId}"
payload := strings.NewReader("{\n \"legalName\": \"Dunder Mifflin\",\n \"taxId\": \"ABC101010111\",\n \"taxSystem\": \"601\",\n \"email\": \"email@example.com\",\n \"phone\": \"6474010101\",\n \"defaultInvoiceUse\": \"G01\",\n \"addressStreet\": \"<string>\",\n \"addressExterior\": \"<string>\",\n \"addressInterior\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressMunicipality\": \"<string>\",\n \"addressZip\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressCountry\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.timbrix.mx/organizations/{organizationId}/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"legalName\": \"Dunder Mifflin\",\n \"taxId\": \"ABC101010111\",\n \"taxSystem\": \"601\",\n \"email\": \"email@example.com\",\n \"phone\": \"6474010101\",\n \"defaultInvoiceUse\": \"G01\",\n \"addressStreet\": \"<string>\",\n \"addressExterior\": \"<string>\",\n \"addressInterior\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressMunicipality\": \"<string>\",\n \"addressZip\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressCountry\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.timbrix.mx/organizations/{organizationId}/customers/{customerId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"legalName\": \"Dunder Mifflin\",\n \"taxId\": \"ABC101010111\",\n \"taxSystem\": \"601\",\n \"email\": \"email@example.com\",\n \"phone\": \"6474010101\",\n \"defaultInvoiceUse\": \"G01\",\n \"addressStreet\": \"<string>\",\n \"addressExterior\": \"<string>\",\n \"addressInterior\": \"<string>\",\n \"addressNeighborhood\": \"<string>\",\n \"addressCity\": \"<string>\",\n \"addressMunicipality\": \"<string>\",\n \"addressZip\": \"<string>\",\n \"addressState\": \"<string>\",\n \"addressCountry\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "590ce6c56d04f840aa8438af",
"organizationId": "org-uuid",
"legalName": "Dunder Mifflin",
"taxId": "ABC101010111",
"taxSystem": "601",
"email": "email@example.com",
"defaultInvoiceUse": "G01",
"address": {
"street": "Blvd. Atardecer",
"exterior": "142",
"neighborhood": "Centro",
"city": "Huatabampo",
"municipality": "Huatabampo",
"zip": "86500",
"state": "Sonora",
"country": "MEX",
"interior": "4"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"phone": "6474010101"
}Updates a customer’s information. All fields are optional — only send what you want to change.
Use
Authentication
Requires a valid Bearer token. The authenticated user must be a member of the organization.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organizationId | string (UUID) | Yes | Organization ID |
customerId | string | Yes | Customer ID |
Request Body
All fields are optional.| Field | Type | Description |
|---|---|---|
legalName | string | Legal name (Razón Social) |
taxId | string | RFC del receptor |
taxSystem | string | SAT tax system code |
email | string | Customer email |
phone | string | Phone number |
defaultInvoiceUse | string | Default CFDI use code |
addressStreet | string | Street name |
addressExterior | string | Exterior number |
addressInterior | string | Interior number |
addressNeighborhood | string | Neighborhood (Colonia) |
addressCity | string | City |
addressMunicipality | string | Municipality |
addressZip | string | 5-digit ZIP code |
addressState | string | State |
addressCountry | string | Country code |
Example Request
curl -X PUT https://api.timbrix.mx/organizations/550e8400-e29b-41d4-a716-446655440000/customers/590ce6c56d04f840aa8438af \
-H "Authorization: Bearer <your_token>" \
-H "Content-Type: application/json" \
-d '{
"email": "new-billing@dundermifflin.com",
"phone": "6474019999"
}'
Example Response
{
"id": "590ce6c56d04f840aa8438af",
"organizationId": "550e8400-e29b-41d4-a716-446655440000",
"legalName": "Dunder Mifflin",
"taxId": "DUM901231AB3",
"taxSystem": "601",
"email": "new-billing@dundermifflin.com",
"phone": "6474019999",
"defaultInvoiceUse": "G01",
"address": {
"street": "Blvd. Atardecer",
"exterior": "142",
"interior": null,
"neighborhood": "Centro",
"city": "Huatabampo",
"municipality": "Huatabampo",
"zip": "86500",
"state": "Sonora",
"country": "MEX"
},
"createdAt": "2025-01-26T10:00:00Z",
"updatedAt": "2025-01-26T10:05:00Z"
}
Common Errors
400 Bad Request
Invalid field value (e.g. wrong RFC format or ZIP code).Fiscal validation error (CFDI 4.0)
WhentaxId, taxSystem, or defaultInvoiceUse are updated, the API re-validates the full taxId + taxSystem + defaultInvoiceUse combination against SAT CFDI 4.0 rules. RFC length determines persona type: 12 characters = persona moral, 13 characters = persona física. The régimen and uso CFDI must both be valid for that persona type, and the (uso, régimen) pair must exist in the SAT compatibility matrix.
{
"statusCode": 400,
"message": "El uso de CFDI \"D01\" no aplica para persona moral (RFC de 12 caracteres)",
"error": "BAD_REQUEST"
}
GET /sat/regimenes-fiscales and GET /sat/usos-cfdi to look up valid codes and compatible combinations.
401 Unauthorized
Authentication required.403 Forbidden
User is not a member of this organization.404 Not Found
Customer not found.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Customer legal name
Example:
"Dunder Mifflin"
Mexican RFC
Example:
"ABC101010111"
SAT tax system code
Example:
"601"
Customer email
Example:
"email@example.com"
Customer phone
Example:
"6474010101"
Default CFDI use code
Example:
"G01"
Street name
Exterior number
Interior number
Neighborhood
City
Municipality
ZIP code
State
Country code
Response
200 - application/json
Example:
"590ce6c56d04f840aa8438af"
Example:
"org-uuid"
Example:
"Dunder Mifflin"
Example:
"ABC101010111"
Example:
"601"
Example:
"email@example.com"
Example:
"G01"
Show child attributes
Show child attributes
Example:
"6474010101"
⌘I