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

# Patch

> Integration details and setup guide for the Patch connector in Alloy Automation.

## Pre-Built Tooling

| Category                            | Details                    |
| ----------------------------------- | -------------------------- |
| **Authentication**                  | Bearer Token (HTTP Bearer) |
| **Two-Way Sync**                    | No                         |
| **Events Supported**                | No                         |
| **Realtime**                        | Polling                    |
| **Supports Rate Limiting**          | Yes                        |
| **Authentication Scopes Supported** | N/A (Bearer Token)         |

***

## Objects Supported

Alloy Automation supports syncing the following objects from **Patch**:

* **Projects**
* **Estimates**
* **Orders**
* **Allocations**

***

## Set Up Guide

### Trial Access

| Question                                           | Answer                                                                                                      |
| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| **Offers free trial?**                             | Yes. Patch offers sandbox/demo accounts for testing. [Request sandbox access](https://www.patch.io/contact) |
| **Requires paid sandbox?**                         | No. Contact Patch to request sandbox access for development.                                                |
| **Requires partnership to obtain authentication?** | No, but you need an active Patch account to generate API keys.                                              |

***

### Authentication (Bearer Token)

For customers who want to completely whitelabel their authentication experience, you can provide your own developer keys instead of using Alloy Automation's.

<steps>
  <step title="Create Patch Account">
    Sign up for a Patch account at [https://www.patch.io](https://www.patch.io) or log in to your existing account
  </step>

  <step title="Access API Keys Dashboard">
    1. Navigate to [https://dashboard.patch.io/api\_keys](https://dashboard.patch.io/api_keys)
    2. Log in with your Patch credentials
    3. You'll see your API keys management dashboard
  </step>

  <step title="Generate API Key">
    1. Click **Create New API Key** or similar button
    2. Give your key a descriptive name (e.g., "Alloy Automation Integration")
    3. Select the appropriate environment (Production or Sandbox)
    4. Copy the generated Bearer token immediately (it may not be displayed again)
  </step>

  <step title="Configure in Alloy Automation">
    1. In Alloy Automation, enter your Patch Bearer token
    2. The token will be sent in the `Authorization: Bearer <token>` header
    3. Test the connection to verify authentication
  </step>
</steps>

For additional information, refer to the [Patch API documentation](https://docs.patch.io/).

***

## Use Cases

### 1) Carbon offset automation

Automatically calculate and purchase carbon offsets for e-commerce orders, shipping activities, or business operations by integrating Patch's carbon offset API with your platform.

### 2) Sustainability reporting

Pull carbon offset data and project allocations from Patch into your analytics or reporting systems to track your organization's environmental impact and progress toward sustainability goals.

### 3) Customer carbon neutrality

Offer customers the option to make their purchases carbon neutral at checkout by integrating Patch's carbon offset calculations and purchasing into your e-commerce flow.

### 4) Supply chain carbon tracking

Calculate the carbon footprint of your supply chain activities and automatically purchase offsets through Patch to maintain carbon neutrality across your operations.

### 5) Corporate sustainability programs

Integrate Patch into your corporate sustainability platform to manage carbon offset purchases, track environmental impact, and generate reports for stakeholders and ESG compliance.

***

## API Gotchas

* **Environment separation:** Patch has separate API endpoints and keys for sandbox and production environments. Make sure you're using the correct credentials for your environment to avoid accidentally creating real orders during testing.

* **Bearer token security:** Store your Bearer token securely and never expose it in client-side code or version control systems. The token provides full access to your Patch account and can be used to make purchases.

* **Estimate before ordering:** Always create an estimate before placing an order to get accurate pricing and project information. Estimates are free and help you understand costs before committing to a purchase.

* **Project availability:** Carbon offset projects may have limited availability. Implement fallback logic to handle cases where your preferred project type is not available for allocation.

> For questions or troubleshooting, contact **[support@runalloy.com](mailto:support@runalloy.com)**.
