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

# Connect CargoWise

> Set up the two directions of the connection: CargoWise to Transitive, and Transitive to CargoWise.

The connection has two directions. Set up both. Do this for each CargoWise company.

| Direction | What it does | Where you set it up |
| - | - | - |
| CargoWise to Transitive | CargoWise sends documents to Transitive. | **CargoWise to Stamping** |
| Transitive to CargoWise | Transitive sends the stamped files to CargoWise. | **Stamping to CargoWise** |

## Before you start

* Transitive must confirm the company first. Then the company status is **Active** on the **Info** page. A company that is **Detected** has no CargoWise controls yet.
* You need the **Enterprise ID** and the **Server ID** of your CargoWise enterprise.
* A CargoWise administrator must be available to enter values in CargoWise.

## Open the CargoWise settings

<Steps>
  <Step title="Open Settings">Select **Settings** in the sidebar.</Step>
  <Step title="Select the company">Select the company in the list of companies.</Step>
  <Step title="Select CargoWise">Select **CargoWise**.</Step>
</Steps>

## Set up CargoWise to Transitive

<Steps>
  <Step title="Save the CargoWise identity">
    In **CargoWise identity**, enter the **Enterprise ID** and the **Server ID**. Select **Save
    identity**.
  </Step>

  <Step title="Create the ingress credential">
    In **CargoWise to Stamping**, select **Create** next to **Ingress credential**. The app shows a
    username and a password.
  </Step>

  <Step title="Save the credential">
    Copy the username and the password now. The app does not show the password again.
  </Step>

  <Step title="Give the values to CargoWise">
    Give the CargoWise administrator the values in the table below. The administrator enters them in
    the CargoWise outbound integration.
  </Step>
</Steps>

| Value | Entry in CargoWise |
| - | - |
| URL | `https://api.transitive.app/v1/ingress/cargowise` |
| Method | `POST` |
| Authentication | Basic. Use the username and password from step 2. |
| Content type | `application/xml` |

### Change the credential

| Action | Result |
| - | - |
| **Rotate** | Transitive creates a new credential. The old credential works for 24 more hours. |
| **Revoke** | The credential stops working. CargoWise cannot send documents until you create a new one. |

Under **Ingress credential**, the app shows **Active**, **Not configured**, or the time when the old credential expires.

## Set up Transitive to CargoWise

Transitive sends files to the eAdaptor of CargoWise. In **Stamping to CargoWise**, enter these values. The CargoWise administrator gives them to you.

| Field | What to enter |
| - | - |
| **eAdaptor inbound URL** | The URL where CargoWise receives files. |
| **Azure client ID** | The client ID of the CargoWise connection. |
| **Azure tenant ID** | The tenant ID of the CargoWise connection. |
| **Certificate PEM** | The certificate file (`.pem`, `.crt` or `.cer`). |
| **Private-key PEM** | The private-key file (`.pem` or `.key`). |
| **XML document type** | The CargoWise document type for the stamped XML. The default is `CFD`. |
| **Cancellation document type** | The CargoWise document type for the cancellation receipt. Optional. |
| **PDF document type** | The CargoWise document type for the PDF. The default is `CIV`. |

Select **Save outbound credentials**. Each file must be 24 KB or smaller. You must select the certificate and the private key each time you save.

## Check the connection

<Steps>
  <Step title="Send a document">Send one document from CargoWise.</Step>
  <Step title="Open Events">Open **Events** in the sidebar. The message shows in the list.</Step>

  <Step title="Read the status">
    The status **OK** means that Transitive used the message. Refer to [Check what CargoWise
    sent](/cargowise/events).
  </Step>
</Steps>

<Note>
  Do the first checks in the test environment. Refer to [Environments](/concepts/environments).
</Note>

## Next

<Columns cols={2}>
  <Card title="Send an update from CargoWise" icon="rotate" href="/cargowise/send-updates">
    What occurs when CargoWise sends a document again.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/get-started/quickstart">
    Stamp your first document.
  </Card>
</Columns>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.