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

# GoodDay - Integration instructions

> Connect GoodDay with a read-only API token to land purchase orders with landed-cost inputs, receipts, inbound shipments, items, and daily inventory as raw tables.

> [!NOTE]
>
> Raw data only. GoodDay lands as raw warehouse tables, not modeled dashboards or AI analysis. Pick its tables under [**Warehouse → Raw data**](https://docs.sourcemedium.com/docs/data-activation/managed-data-warehouse/raw-data.md) in your SourceMedium workspace. Raw data is available on every paid plan. See [Foundation and Pro](https://docs.sourcemedium.com/docs/data-activation/managed-data-warehouse/overview.md#foundation-and-pro).

GoodDay is an ERP for Shopify brands that runs inventory, purchasing, and cost of goods. SourceMedium reads your GoodDay purchase orders, receipts, inbound shipments, items, locations, channels, and inventory every six hours and lands them in your warehouse.

> [!NOTE]
>
> Sign in to [SourceMedium](https://urchin.sourcemedium.com), open your store, then choose **Data sources → Connect data source** and select the platform. You need an **Admin** or **Editor** workspace role.
>
> [After you connect](https://docs.sourcemedium.com/docs/data-inputs/platform-integration-instructions/after-you-connect.md) explains the first sync and connection statuses.

## Vendor documentation

| Topic | Official guide |
| - | - |
| Creating an API token and scopes | [Authentication](https://api.gooddayai.com/docs/guides/authentication) |
| API reference | [GoodDay API](https://api.gooddayai.com/docs/reference) |

## What you need

* **Access to GoodDay's settings in Shopify.** API tokens are created in the GoodDay app inside your Shopify admin.
* **A read-only API token.** Use the **Read only** shortcut, which grants every `read:` scope. SourceMedium only reads; every request it makes is a read.

## How to connect

**1. Create an API token**

In Shopify, open the GoodDay app and go to **Settings → API tokens**. Click **Create token**, name it (for example `sourcemedium-read-only`), choose **Read only**, and click **Create**. Copy the token, which starts with `gd_`: GoodDay shows it once.

**2. Add the token in SourceMedium**

Find **GoodDay** in the connector picker and click **Connect**. Paste the token, then click **Save**.

**3. Confirm it is connected**

SourceMedium checks the token with GoodDay before saving it, so a token GoodDay rejects is not saved. A token missing one of the read scopes is saved, and the connection names the scope to add. The connection reads **Awaiting first data** until the first sync lands, then **Connected**.

To rotate the token, create a new one, save it in SourceMedium, then revoke the old one in the same GoodDay screen. Revoking a token before you replace it stops the sync.

> [!NOTE]
>
> SourceMedium only ever reads from your connected platforms. It does not create, change, or delete anything, so create the key with **read-only** access wherever the platform offers it. Treat it like a password: keep it confidential and avoid sharing it over email or in spreadsheets. If the credential is rotated or revoked, follow this guide's connection method to update SourceMedium.

## What data syncs

| Table | Grain |
| - | - |
| `goodday__purchase_orders` | One row per purchase order, with its blocks and lines as JSON |
| `goodday__purchase_order_line_items` | One row per purchase-order line: vendor price, freight and fees per unit, tariff and duty rates, ordered and received units, expected dates, and the inbound shipment |
| `goodday__purchase_order_receipts` | One row per receipt, with its received items |
| `goodday__purchase_order_shipments` | One row per inbound shipment, with departure, expected and actual arrival, and cost |
| `goodday__items` | One row per item, with default cost and per-currency prices |
| `goodday__inventory_levels_daily` | One row per item, location, channel, and UTC day: on hand, available, and committed |
| `goodday__locations` | One row per location |
| `goodday__channels` | One row per channel |

GoodDay documents how its line costs combine: vendor price excludes freight, duty, and fees; freight and fees are per unit; tariff and duty rates apply to the vendor price. Landed cost per unit is vendor price × (1 + tariff rate + duty rate) + freight + fees.

Select the tables you want under [**Warehouse → Raw data**](https://docs.sourcemedium.com/docs/data-activation/managed-data-warehouse/raw-data.md) in your SourceMedium workspace to receive them in `your_project.sm_sources`.

## Refresh and history

* **Refresh:** every six hours. Items and purchase orders changed since the last sync are read again, and every draft or open purchase order is re-read in full, because a line edit does not change its order's update time. Receipts from the last 90 days are re-read. Inbound shipments are read in full. Locations and channels refresh once a day.
* **History:** the first sync loads every item, purchase order, receipt, and inbound shipment.
* **Inventory:** GoodDay's API serves current inventory, so SourceMedium records it on every sync and keeps one row per item, location, channel, and day, holding that day's last reading. Inventory history starts the day you connect.

## Known gaps

* **FIFO cost of goods.** GoodDay's FIFO ledger has no API. If you write GoodDay's FIFO cost into Shopify, SourceMedium already reads it from your Shopify products.
* **Item-level duty and other landed cost estimates** are not imported; purchase-order lines carry the actual cost inputs.
* **Deleted records.** GoodDay does not report deletions, so a deleted item or receipt stops updating; it is not removed.
* **Not included:** sales orders, transfers, and inventory adjustments.

## Troubleshooting

* **Token rejected?** Check that you copied the whole token and that it has not been revoked in GoodDay.
* **The connection names a missing scope?** In GoodDay, open **Settings → API tokens**, add the scope to the token (or choose **Read only**), and save. The token keeps working, so you do not need to paste it again.


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