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

# Shiprocket

> Connect Shiprocket to Ocular using a dedicated API user email and the API key emailed to that user to sync shipments, courier costs, and RTO data.

**Required fields in Ocular:**

* **Email** – the API user email you registered in Shiprocket
* **API Key** – the key sent to that email after creating the API user

Follow the steps below to grab those two items and paste them into **Data Management → Connectors → Add connector → Shiprocket**.

<CardGroup cols={2}>
  <Card title="What you need" icon="key">
    A dedicated API-user email (different from your main Shiprocket login) and the API key emailed to it.
  </Card>

  <Card title="What it unlocks" icon="truck">
    The Fulfilment data model — AWB-level data, courier costs, RTO status, pincode performance, and cost-discrepancy reconciliation.
  </Card>
</CardGroup>

***

## <Icon icon="user-plus" /> Step 1 · Create an API User in Shiprocket

Follow these steps to create an API user and receive your API key.

<Steps>
  <Step title="Open the seller panel" icon="arrow-up-right-from-square">
    Log in to your Shiprocket seller panel.
  </Step>

  <Step title="Navigate to API Users" icon="users-gear">
    Navigate to **Settings → API Users**.
  </Step>

  <Step title="Navigate to API Users" icon="users-gear">
    Navigate to **Settings → API Users**.

    <Frame caption="Settings → API Users">
      <img src="https://mintcdn.com/ocular/q-V-PFkPr0MOCSrr/images/ship-(1).png?fit=max&auto=format&n=q-V-PFkPr0MOCSrr&q=85&s=1537e41342a7c3ad2af25578007ac156" alt="Ship (1)" width="1918" height="865" data-path="images/ship-(1).png" />
    </Frame>
  </Step>

  <Step title="Add new API User" icon="user-plus">
    Click **Add new API User**.

    Enter the required details (email, password, etc.).

    <Warning>
      Enter a **unique email address** that is different from the one used for your main Shiprocket login. Using the same email will cause the API user creation to fail.
    </Warning>
  </Step>

  <Step title="Add new API User" icon="user-plus">
    Click **Add new API User**.

    <Frame caption="API Users → Add new API User">
      <img src="https://mintcdn.com/ocular/q-V-PFkPr0MOCSrr/images/ship2.png?fit=max&auto=format&n=q-V-PFkPr0MOCSrr&q=85&s=ca78d5781971eaf0d8d4759a2cfcb006" alt="Ship2" width="1918" height="871" data-path="images/ship2.png" />
    </Frame>

    Enter the required details (email, password, etc.).

    <Warning>
      Enter a **unique email address** that is different from the one used for your main Shiprocket login. Using the same email will cause the API user creation to fail.
    </Warning>
  </Step>

  <Step title="Create User and receive the API key" icon="envelope">
    Click **Create User**. The entered email address will receive an **API Key** from Shiprocket. Copy this key — you will paste it into Ocular.

    <Tip>
      Save the API key securely. If you lose it, you may need to create a new API user to generate a fresh key.
    </Tip>
  </Step>

  <Step title="Create User and receive the API key" icon="envelope">
    Click **Create User**. The entered email address will receive an **API Key** from Shiprocket. Copy this key — you will paste it into Ocular.

    <Tip>
      Save the API key securely. If you lose it, you may need to create a new API user to generate a fresh key.
    </Tip>

    <Frame caption="Add New User → Create User">
      <img src="https://mintcdn.com/ocular/q-V-PFkPr0MOCSrr/images/ship3.png?fit=max&auto=format&n=q-V-PFkPr0MOCSrr&q=85&s=601afd1e6838a52b86e3175d821a74ca" alt="Ship3" width="1918" height="865" data-path="images/ship3.png" />
    </Frame>
  </Step>
</Steps>

***

## <Icon icon="plug" /> Step 2 · Plug the credentials into Ocular

<Steps>
  <Step title="Open the connector form" icon="window">
    In Ocular, navigate to **Data Management → Connectors → Add connector → Shiprocket**.
  </Step>

  <Step title="Open the connector form" icon="window">
    In Ocular, navigate to **Data Management → Connectors → Add connector → Shiprocket**.

    <Frame caption="Add connector → Shiprocket">
      <img src="https://mintcdn.com/ocular/q-V-PFkPr0MOCSrr/images/shipocular.png?fit=max&auto=format&n=q-V-PFkPr0MOCSrr&q=85&s=ab4d6848f7aa9f6eeed45c59fe7f5b97" alt="Shipocular" width="1896" height="867" data-path="images/shipocular.png" />
    </Frame>
  </Step>

  <Step title="Fill the fields" icon="pen-to-square">
    <CardGroup cols={2}>
      <Card title="Connector Name" icon="tag">
        Free-form label.
      </Card>

      <Card title="Connector Identifier" icon="hashtag">
        Auto-generated by Ocular.
      </Card>

      <Card title="Start Date" icon="calendar">
        YYYY-MM-DD — how far back in time Ocular should pull data from your Shiprocket account. Choose a date from which you want to begin analyzing your shipping data.
      </Card>

      <Card title="Lookback Days" icon="clock-rotate-left">
        The number of past days from which data will be fetched during synchronization. This ensures that recent historical data is included and kept up to date. Default is 30 days.
      </Card>

      <Card title="Schedule Frequency" icon="repeat">
        Defines how often the connector will automatically sync data. Configured using a numeric value (frequency) along with a time unit (e.g., hours), determining the interval between each sync cycle.
      </Card>

      <Card title="Auto Sync" icon="toggle-on">
        Automatically triggers synchronization when the connector is enabled.
      </Card>

      <Card title="Email" icon="envelope">
        The API user email you registered in Shiprocket.
      </Card>

      <Card title="API Key" icon="key">
        The key you received via email.
      </Card>
    </CardGroup>
  </Step>

  <Step title="Fill the fields" icon="pen-to-square">
    <CardGroup cols={2}>
      <Card title="Connector Name" icon="tag">
        Free-form label.
      </Card>

      <Card title="Connector Identifier" icon="hashtag">
        Auto-generated by Ocular.
      </Card>

      <Card title="Start Date" icon="calendar">
        YYYY-MM-DD — how far back in time Ocular should pull data from your Shiprocket account. Choose a date from which you want to begin analyzing your shipping data.
      </Card>

      <Card title="Lookback Days" icon="clock-rotate-left">
        The number of past days from which data will be fetched during synchronization. This ensures that recent historical data is included and kept up to date. Default is 30 days.
      </Card>

      <Card title="Schedule Frequency" icon="repeat">
        Defines how often the connector will automatically sync data. Configured using a numeric value (frequency) along with a time unit (e.g., hours), determining the interval between each sync cycle.
      </Card>

      <Card title="Auto Sync" icon="toggle-on">
        Automatically triggers synchronization when the connector is enabled.
      </Card>

      <Card title="Email" icon="envelope">
        The API user email you registered in Shiprocket.
      </Card>

      <Card title="API Key" icon="key">
        The key you received via email.
      </Card>
    </CardGroup>

    <Frame caption="Shiprocket connector form — enter Email and API Key">
      <img src="https://mintcdn.com/ocular/q-V-PFkPr0MOCSrr/images/shipocc1.png?fit=max&auto=format&n=q-V-PFkPr0MOCSrr&q=85&s=d6cd4504814750322b37cd1feca6eeac" alt="Shipocc1" width="1917" height="867" data-path="images/shipocc1.png" />
    </Frame>
  </Step>

  <Step title="Create the connector" icon="circle-check">
    Click **Create Connector**. Ocular stores the credentials in its encrypted vault and triggers the first sync.

    {/* TODO: image asset missing — /images/image-(152)-(1).png not present in repo. Re-add when available. */}
  </Step>

  <Step title="Create the connector" icon="circle-check">
    Click **Create Connector**. Ocular stores the credentials in its encrypted vault and triggers the first sync.

    <Frame caption="Connector created — data will begin syncing shortly">
      <img src="https://mintcdn.com/ocular/q-V-PFkPr0MOCSrr/images/image-152.png?fit=max&auto=format&n=q-V-PFkPr0MOCSrr&q=85&s=9fb22f1ccc2e43830e46f256ce70ae2c" alt="Image 152" width="1603" height="753" data-path="images/image-152.png" />
    </Frame>
  </Step>
</Steps>

***

## <Icon icon="life-ring" /> Troubleshooting

<AccordionGroup>
  <Accordion title="API user creation fails" icon="triangle-exclamation">
    Almost always because the email you entered matches your main Shiprocket login. Use a unique address — e.g., `ocular-api@your-domain.com`.
  </Accordion>

  <Accordion title="Didn't receive the API key email" icon="envelope-open">
    Check spam and confirm the email address is correct. If the key still doesn't arrive, regenerate by deleting and recreating the API user in **Settings → API Users**.
  </Accordion>

  <Accordion title="Authentication errors after a key rotation" icon="lock">
    If you've created a new API user or rotated the key, update both **Email** and **API Key** in the connector form and re-test.
  </Accordion>
</AccordionGroup>

<Note>
  For ticket-writing format when filing a connector issue, see [Working with the Ocular team → Connector-not-working tickets](/overview/working-with-the-ocular-team).
</Note>
