> ## Documentation Index
> Fetch the complete documentation index at: https://docs-mx.taxo.ws/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started with Taxo API

> Universal guide to integrating with Taxo's multi-country tax document extraction API

## Welcome to Taxo API

Taxo API provides enterprise-grade automation for tax document extraction across multiple countries and tax authorities. Our unified API interface allows you to integrate once and expand to new jurisdictions seamlessly.

## How It Works

<Steps>
  <Step title="Get API Credentials">
    Obtain your API key and configure authentication
  </Step>

  <Step title="Prepare Tax Credentials">
    Gather the necessary credentials for your target tax authority
  </Step>

  <Step title="Configure Extraction">
    Set up document extraction with appropriate filters and parameters
  </Step>

  <Step title="Monitor & Download">
    Track job progress and download completed documents
  </Step>
</Steps>

## Supported Countries

<CardGroup cols={2}>
  <Card title="Mexico (SAT)" icon="flag" href="/countries/mx/overview">
    Extract CFDI invoices, tax status certificates, and retention documents from SAT
  </Card>

  <Card title="More Countries" icon="globe" color="#6b7280">
    **Request** - Contact us for additional country support
  </Card>
</CardGroup>

## Universal API Concepts

### Job-Based Processing

All document extractions use asynchronous job processing:

<AccordionGroup>
  <Accordion title="Job Lifecycle" icon="cogs">
    1. **Create Job**: Submit extraction request with credentials and filters
    2. **Processing**: System validates credentials and extracts documents
    3. **Completion**: Job finishes with success or failure status
    4. **Download**: Retrieve individual documents using job results
  </Accordion>

  <Accordion title="Job Tracking" icon="search">
    Every job gets a unique `publicId` for tracking:

    ```json theme={null}
    {
      "publicId": "JOB20250104123456789A",
      "status": "PROCESSING",
      "progress": {
        "discoveryCount": 1500,
        "completedCount": 750,
        "percentage": 50
      }
    }
    ```
  </Accordion>
</AccordionGroup>

### Universal Status Codes

| Status       | Description                          | Next Action                       |
| ------------ | ------------------------------------ | --------------------------------- |
| `PENDING`    | Job queued for processing            | Wait or check status periodically |
| `PROCESSING` | Actively extracting documents        | Monitor progress                  |
| `COMPLETED`  | All documents extracted successfully | Download documents                |
| `FAILED`     | Job failed due to error              | Check error details and retry     |

### Common Error Patterns

<AccordionGroup>
  <Accordion title="Authentication Errors" icon="key">
    * **Invalid API Key**: Check your API key configuration
    * **Expired Credentials**: Renew tax authority credentials
    * **Permission Denied**: Verify account permissions for the requested operation
  </Accordion>

  <Accordion title="Request Errors" icon="exclamation-triangle">
    * **Invalid Parameters**: Check request format and required fields
    * **Date Range Too Large**: Reduce the time period for extraction
    * **Unsupported Document Type**: Verify document type is available for the country
  </Accordion>

  <Accordion title="System Errors" icon="server">
    * **Rate Limit Exceeded**: Implement backoff strategy
    * **Service Unavailable**: Tax authority system maintenance
    * **Timeout**: Large extractions may need more time
  </Accordion>
</AccordionGroup>

## Integration Architecture

### Recommended Flow

```mermaid theme={null}
graph TD
    A[Choose Country] --> B[Get API Key]
    B --> C[Prepare Tax Credentials]
    C --> D[Create Extraction Job]
    D --> E[Monitor Progress]
    E --> F{Job Complete?}
    F -->|No| E
    F -->|Yes| G[Download Documents]
    G --> H[Process Documents]
```

### Security Best Practices

<Checklist>
  <Check>Store API keys in environment variables or secure vaults</Check>
  <Check>Encrypt tax authority credentials at rest</Check>
  <Check>Use HTTPS for all API communications</Check>
  <Check>Implement proper error handling without exposing credentials</Check>
  <Check>Set up webhook endpoints with signature verification</Check>
  <Check>Follow rate limiting guidelines to avoid service interruption</Check>
</Checklist>

## Next Steps

<CardGroup cols={2}>
  <Card title="Choose Your Country" icon="flag">
    Start with Mexico, our most mature integration

    [Mexico SAT Guide →](/countries/mx/overview)
  </Card>

  <Card title="Integration Best Practices" icon="lightbulb">
    Learn production-ready patterns and security practices

    [Best Practices →](/global/integration-guides/best-practices)
  </Card>

  <Card title="Get API Key" icon="key">
    Contact our team to get started with API access

    [Contact Sales →](mailto:sales@taxo.co)
  </Card>

  <Card title="Troubleshooting" icon="wrench">
    Common issues and solutions across all countries

    [Troubleshooting →](/global/troubleshooting/common-errors)
  </Card>
</CardGroup>

## Support

<Card>
  <Icon icon="headset" size={32} />

  **Need Help Getting Started?**

  * **General Support**: [support@taxo.co](mailto:support@taxo.co)
  * **Sales Inquiries**: [sales@taxo.co](mailto:sales@taxo.co)
  * **API Status**: [status.taxo.co](https://status.taxo.co)
  * **Documentation Feedback**: We're always improving our docs
</Card>

***

<Note>
  This documentation follows our country-first architecture. Each country has its own section with specific implementation details, while global concepts apply across all integrations.
</Note>
