Get organization by ID
curl --request GET \
--url https://api.example.com/organizations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/organizations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/organizations/{id}', 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.example.com/organizations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/organizations/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/organizations/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/organizations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "5a2a307be93a2f00129ea035",
"slug": "mi-empresa",
"timezone": "America/Mexico_City",
"created_at": "2017-05-05T20:55:33.468Z",
"updated_at": "2017-05-05T20:55:33.468Z",
"is_production_ready": true,
"legal": {
"name": "Mi Empresa",
"legal_name": "Mi Empresa SA de CV",
"tax_system": "601",
"website": "https://miempresa.com",
"phone": "+52 555 123 4567",
"rfc": "EKU9003173C9",
"zip": "86500",
"address": {
"street": "Blvd. Atardecer",
"exterior": "142",
"interior": "4",
"neighborhood": "Centro",
"city": "Huatabampo",
"municipality": "Huatabampo",
"zip": "86500",
"state": "Sonora"
}
},
"customization": {
"has_logo": true,
"color": "BADA55",
"next_folio_number": 123,
"next_folio_number_test": 123,
"pdf_extra": {
"codes": true,
"address_codes": true,
"product_key": true,
"round_unit_price": false,
"tax_breakdown": true,
"ieps_breakdown": true,
"render_carta_porte": false,
"repeat_signature": false
}
},
"certificate": {
"has_certificate": true,
"updated_at": "2023-05-05T20:55:33.468Z",
"expires_at": "2025-05-05T20:55:33.468Z",
"serial_number": "30001000000300000101"
},
"fiel": {
"has_fiel": true,
"updated_at": "2023-05-05T20:55:33.468Z",
"expires_at": "2025-05-05T20:55:33.468Z",
"serial_number": "30001000000300000101"
},
"receipts": {
"periodicity": "day",
"duration_days": 7,
"next_folio_number": 123,
"next_folio_number_test": 123
},
"self_invoice": {
"allowed_cfdi_uses": [
"G01",
"G03"
],
"apply_resico_isr": true,
"support_email": "soporte@miempresa.com",
"support_email_verified": true
},
"closed_at": null,
"retained_until": null,
"data_purge_at": null,
"data_purged_at": null,
"logo_url": "https://storage.example.com/organization/logo.jpg",
"pending_steps": [
{
"type": "legal",
"description": "Complete legal information"
}
]
}Organizations
Get Organization
Retrieves organization details with normalized structure. User must be a member (owner, admin, or member) to access.
GET
/
organizations
/
{id}
Get organization by ID
curl --request GET \
--url https://api.example.com/organizations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/organizations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/organizations/{id}', 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.example.com/organizations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/organizations/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/organizations/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/organizations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "5a2a307be93a2f00129ea035",
"slug": "mi-empresa",
"timezone": "America/Mexico_City",
"created_at": "2017-05-05T20:55:33.468Z",
"updated_at": "2017-05-05T20:55:33.468Z",
"is_production_ready": true,
"legal": {
"name": "Mi Empresa",
"legal_name": "Mi Empresa SA de CV",
"tax_system": "601",
"website": "https://miempresa.com",
"phone": "+52 555 123 4567",
"rfc": "EKU9003173C9",
"zip": "86500",
"address": {
"street": "Blvd. Atardecer",
"exterior": "142",
"interior": "4",
"neighborhood": "Centro",
"city": "Huatabampo",
"municipality": "Huatabampo",
"zip": "86500",
"state": "Sonora"
}
},
"customization": {
"has_logo": true,
"color": "BADA55",
"next_folio_number": 123,
"next_folio_number_test": 123,
"pdf_extra": {
"codes": true,
"address_codes": true,
"product_key": true,
"round_unit_price": false,
"tax_breakdown": true,
"ieps_breakdown": true,
"render_carta_porte": false,
"repeat_signature": false
}
},
"certificate": {
"has_certificate": true,
"updated_at": "2023-05-05T20:55:33.468Z",
"expires_at": "2025-05-05T20:55:33.468Z",
"serial_number": "30001000000300000101"
},
"fiel": {
"has_fiel": true,
"updated_at": "2023-05-05T20:55:33.468Z",
"expires_at": "2025-05-05T20:55:33.468Z",
"serial_number": "30001000000300000101"
},
"receipts": {
"periodicity": "day",
"duration_days": 7,
"next_folio_number": 123,
"next_folio_number_test": 123
},
"self_invoice": {
"allowed_cfdi_uses": [
"G01",
"G03"
],
"apply_resico_isr": true,
"support_email": "soporte@miempresa.com",
"support_email_verified": true
},
"closed_at": null,
"retained_until": null,
"data_purge_at": null,
"data_purged_at": null,
"logo_url": "https://storage.example.com/organization/logo.jpg",
"pending_steps": [
{
"type": "legal",
"description": "Complete legal information"
}
]
}Retrieves organization details by ID.
Authentication
This endpoint requires authentication via Bearer token:- Authorization:
Bearer <token>
Permissions
User must be a member of the organization (owner, admin, or member role).Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Organization UUID |
Response Fields
The response includes:| Field | Type | Description |
|---|---|---|
id | string | Organization UUID |
name | string | Organization name |
slug | string | URL-friendly identifier |
logo | string | Logo URL (if set) |
plan | string | Subscription plan (free, pro, enterprise) |
ownerId | string | Owner user UUID |
stripeCustomerId | string | Stripe customer ID (if exists) |
subscriptionStatus | string | Current subscription status |
createdAt | string | ISO 8601 timestamp |
updatedAt | string | ISO 8601 timestamp |
closed_at | string | null | When the organization was closed; null if active |
retained_until | string | null | Until when a closed organization’s CFDI are retained |
Example Request
curl -X GET https://api.timbrix.mx/organizations/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer <your_token>"
import { Timbrix } from "@timbrix/sdk"
const client = new Timbrix({ bearerToken: "<your_token>" })
const organization = await client.organizations.get(
"550e8400-e29b-41d4-a716-446655440000"
)
console.log(organization)
Example Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corp",
"slug": "acme-corp",
"logo": "https://example.com/logo.png",
"plan": "pro",
"ownerId": "123e4567-e89b-12d3-a456-426614174000",
"stripeCustomerId": "cus_ABC123",
"subscriptionStatus": "active",
"subscriptionPeriodEnd": "2026-01-26T10:00:00Z",
"createdAt": "2025-01-26T10:00:00Z",
"updatedAt": "2025-12-26T10:00:00Z"
}
Common Errors
404 Not Found
The organization with the specified ID does not exist.{
"statusCode": 404,
"message": "Organization not found"
}
403 Forbidden
User is not a member of the organization.{
"statusCode": 403,
"message": "Access denied. User is not a member of this organization"
}
Use Cases
- Display organization details in dashboard
- Verify organization membership before allowing access
- Show organization settings to users
- Check subscription status and plan
- Display organization branding (logo, name)
Authorizations
Response
Organization retrieved successfully with details.