Overview
Every screen in Podgene runs on a JSON REST API. Anything you can do in the app with your role, you can script with the same permissions: list and update orders, push tracking numbers, search the print-shop catalog, follow design tasks and check your balance.
| Base URL | https://podgene.net/api/ |
|---|---|
| Format | JSON in and out (Content-Type: application/json). Dates use YYYY-MM-DD; timestamps are ISO 8601. |
| Trailing slash | Required on every path, e.g. /api/orders/. |
| Permissions | Same as in the app: a seller only sees their own orders, a designer only their tasks, an Org Lead sees the whole workspace. |
Your first request
curl "https://podgene.net/api/orders/?status=Ready&page_size=20" \
-H "Authorization: Token <your-token>" \
-H "X-Organization-Slug: <workspace-slug>"Authentication
Send two headers with every request:
| Header | Value |
|---|---|
Authorization | Token <your-token> |
X-Organization-Slug | Your workspace slug. If you belong to the workspace the call runs there; a slug you are not a member of returns 403. |
API token and sign-in tokens
- API token: use this one in your scripts. You have at most one, and signing out of the app does not affect it. Regenerating it stops the old one immediately. It expires after 365 days without use.
- Sign-in tokens: every sign-in gets its own token, whether in the app, the browser extension or through
POST /api/login/. Each one expires after 30 days without use. - An expired token returns
401with"Token has expired. Please log in again."— sign in again, or create a new API token. - Changing your password or resetting it by email revokes all your tokens, including the API token. Do this if a token leaks, then create a new API token.
POST /api/logout/deletes only the token sent with the request and returns204.POST /api/logout-all/deletes all your sign-in tokens and returns204, which signs you out of every browser and extension. Your API token keeps working.GET /api/api-token/returns your API token (nullif you have none) andPOST /api/api-token/creates or replaces it. Both need a sign-in token: called with the API token itself they return403.
Getting a token from a script
POST /api/login/ accepts a username or email plus password and returns a new sign-in token. After 10 wrong passwords in 5 minutes the account is locked for a few minutes (429). For scheduled scripts, use your API token instead of signing in on every run.
curl -X POST "https://podgene.net/api/login/" \
-H "Content-Type: application/json" \
-d '{"username": "you@example.com", "password": "••••••••"}'
# → 200
{ "token": "9f1c…", "user": { "id": 12, "username": "…", "organization": { "slug": "…" } } }Pagination & filters
List endpoints that paginate return a page envelope. Use ?page= and ?page_size=; follow next until it is null.
{
"count": 248,
"next": "https://podgene.net/api/orders/?page=2&page_size=20&status=Ready",
"previous": null,
"results": [
{
"id": 5121,
"order_id": "6789468160177",
"order_id_str": "6789468160177-Shopify",
"status": "Ready",
"account": "acc_01",
"account_name": "testAcc001",
"customer_full_name": "Evelyn Bravo",
"tracking_code": null,
"order_items": [ { "id": 9001, "item_name": "Classic Tee", "size": "L", "color": "Black", "quantity": 1 } ]
}
]
}| Endpoint | Default page size | Max |
|---|---|---|
/api/orders/ | 50 | 200 |
/api/accounts/ | 50 | 200 |
/api/tasks-design/ | 10 | 200 |
/api/designs/ | 10 | 200 |
/api/print-shop-products/ | 10 | 100 |
/api/notifications/ | 20 | 100 |
Some small lists (print shops, order items) are not paginated and return a plain JSON array. Where supported, ?search= does a text search and ?ordering= sorts (prefix with - for descending, e.g. ?ordering=-created_at).
Errors
Errors use standard HTTP status codes and a JSON body with a machine-readable error code:
{
"error": "VALIDATION_ERROR",
"message": "Invalid data. Please check and try again.",
"details": { "status": ["\"Shiped\" is not a valid choice."] }
}| Status | Meaning |
|---|---|
| 400 | Invalid input — see details (field → messages). In a list such as order_items, only the wrong items appear, keyed by their position from 0: {"order_items": {"1": {"quantity": ["A valid integer is required."]}}}. |
| 401 | Missing, invalid or expired token. |
| 402 | Not enough balance (insufficient_balance / INSUFFICIENT_BALANCE) — top up on the Billing page. |
| 403 | Your role can't do this, or the workspace slug isn't yours. |
| 404 | Not found — or not visible to your role. |
| 409 | Conflict: DUPLICATE_ORDER (order ID already exists), PRINT_AREAS_CONFLICT (someone changed the design meanwhile — reload and retry), IN_PROGRESS (the order is already being sent). |
| 429 | Rate limited — wait Retry-After seconds. |
Rate limits
Limits apply per user (per IP for anonymous calls). Going over returns 429 with a Retry-After header.
| Scope | Limit |
|---|---|
| All requests | 300 / minute per user, and 30 / second per IP |
| Writes (POST, PUT, PATCH, DELETE) | 120 / minute |
| Send order to print shop | 60 / minute |
| Bulk update / bulk create | 10 / minute |
| Exports | 10 / minute |
| Create support ticket | 10 / hour |
| Chat messages (task and ticket replies) | 30 / minute |
| Sign-in endpoints | 30 / minute per IP |
import-update, up to 1,000 rows) instead of one PATCH per order. Orders
Orders are addressed by order_id_str: the marketplace order ID plus the source, e.g. 100245-Etsy. It is built automatically from order_id and order_source.
| Endpoint | Description |
|---|---|
GET /api/orders/ | List orders visible to you (newest first). |
GET /api/orders/{order_id_str}/ | One order with its items. |
POST /api/orders/ | Create an order (see below). Charges the order fee to your balance. |
PATCH /api/orders/{order_id_str}/ | Update fields, status, tracking. |
GET /api/orders/status-counts/ | Number of orders per status: {"Ready": 4, …, "all": 31}. |
POST /api/orders/{order_id_str}/claim/ | Fulfillers: claim a Ready order (→ Inprogress). |
POST /api/orders/{order_id_str}/split/ | Split into several orders: {"splits": [{"new_order_id": "100245-p1", "order_item_ids": [1, 2]}, …]}. The original order is replaced. |
List filters
| Parameter | Example |
|---|---|
status | ?status=Ready |
account__name | ?account__name=testAcc001 |
seller, designer, fulfiller | Username, e.g. ?seller=jane |
created_at__gte, created_at__lte | ?created_at__gte=2026-10-01 |
search | Order ID, customer name/email/phone, item name, task ID, print-shop order ID, tracking code |
ordering | order_date, order_dispatch, order_fulfill_date, created_at, last_updated_at (default -created_at) |
Create an order
Required: account (selling account ID), order_id, order_source (e.g. Etsy, Ebay, Shopify, Walmart) and at least one item in order_items with an item_name. Optional customer and address fields use the same names you get back from GET.
curl -X POST "https://podgene.net/api/orders/" \
-H "Authorization: Token <your-token>" \
-H "X-Organization-Slug: <workspace-slug>" \
-H "Content-Type: application/json" \
-d '{
"account": "<account-id>",
"order_id": "100245",
"order_source": "Etsy",
"customer_full_name": "Jane Doe",
"order_items": [
{
"item_name": "Classic Tee",
"size": "L",
"color": "Black",
"quantity": 1,
"price": 24.5,
"image_attachments": [
"https://i.etsystatic.com/ipf/abc123/987654/ipf_2000x2000.987654_xyz.jpg"
]
}
]
}'- Org Leads can create orders directly with their API token.
- Sellers must add
"from_seller_ui": trueto the body; the order is then created in Approval and waits for an Org Lead, exactly like orders a seller creates in the app. - An order ID that already exists returns
409 DUPLICATE_ORDER, with theorder_idandorder_sourceyou sent indetails. Order ID + source is unique across all of Podgene: only when the existing order is in your workspace doesdetailsalso includeexisting_order_info(itsorder_id_str,status,customer_full_name,created_at,sellerandaccount_name). - Each new order is charged the order fee; with too little balance the call returns
402.
Update an order
curl -X PATCH "https://podgene.net/api/orders/100245-Etsy/" \
-H "Authorization: Token <your-token>" \
-H "X-Organization-Slug: <workspace-slug>" \
-H "Content-Type: application/json" \
-d '{"status": "Ready", "note": "Design approved"}'curl -X PATCH "https://podgene.net/api/orders/100245-Etsy/" \
-H "Authorization: Token <your-token>" \
-H "X-Organization-Slug: <workspace-slug>" \
-H "Content-Type: application/json" \
-d '{"tracking_code": "9400111899223344556677", "shipping_company": "USPS"}'- Sellers can edit their orders while they are Pending, Ready, Inprogress or Shipped; fulfillers while they are Inprogress through Intransit. Org Leads can edit any order.
- The first tracking number on a Fulfilled order, or on an Inprogress order with no print payment due, moves it to Shipped unless the same request sets another status.
- If you send
order_items, send the full list: items with anidare updated, items without one are added, and items you leave out are removed. To change only order fields, don't sendorder_itemsat all.
Item price and customer images
Each item in order_items has two optional fields. POST /api/orders/ and PATCH /api/orders/{order_id_str}/ accept them, and order responses include them. They usually come from a marketplace page, so a bad value never rejects the order: it is dropped and the request still succeeds.
| Field | Rules |
|---|---|
price | Unit price in the order's currency, as a number or string. Rounded to 2 decimals and returned as a string, e.g. "24.50". Empty, negative or unreadable values are stored as null, which means unknown. |
image_attachments | URLs of the images the customer attached. Default []. Only https URLs on etsystatic.com are kept; any other URL is dropped. Duplicates are removed. An item holds up to 50 URLs, up to 1,000 characters each. In the app they show on the order page and can be added to a design task's Input Images. |
- On update, leave a field out to keep its value. Sending
image_attachmentsreplaces the whole list, so[], or a list with no accepted URL, clears it. POST /api/orders/bulk-create/doesn't accept these fields.
Status values
The API always uses these values. The app shows one of them under a clearer name, noted below.
| status | Meaning |
|---|---|
Pending | New order, not ready to fulfill yet (default). |
Approval | Waiting for an Org Lead to approve (seller-created orders, refund requests). |
Ready | Ready to be picked up by a fulfiller. |
Inprogress | Claimed by a fulfiller, or sent in Auto mode and waiting for payment. |
Fulfilled | Sent to the print shop. |
Shipped | Shown as "Has Tracking" in the app: the print shop sent a tracking number. |
Tracking Added | The tracking number is on your store. |
Intransit | On the way to the customer. |
Delivered | Delivered to the customer. |
Reorder | Waiting for approval to be re-made. |
Refund | Refunded. |
Cancelled | Cancelled. |
Tracking & bulk tools
Look up tracking for many orders
POST /api/orders/tracking-lookup/ takes up to 500 IDs (either order_id or order_id_str) and returns tracking for each, plus the IDs it could not find.
curl -X POST "https://podgene.net/api/orders/tracking-lookup/" \
-H "Authorization: Token <your-token>" \
-H "X-Organization-Slug: <workspace-slug>" \
-H "Content-Type: application/json" \
-d '{"order_ids": ["100245", "6789468160177-Shopify"]}'
# → 200
{
"count": 2,
"results": [
{ "requested_id": "100245", "order_id_str": "100245-Etsy", "has_tracking": true,
"tracking_code": "9400111899223344556677", "shipping_company": "USPS", "tracking_url": "…" }
],
"not_found": []
}Bulk update
POST /api/orders/import-update/ is what the Import button uses. It updates up to 1,000 existing orders per call — it never creates orders. Run it with "dry_run": true first to see what would change. GET /api/orders/import-fields/ lists the fields you can update (status, dispatch date, note, tags, tracking, customer and address fields).
curl -X POST "https://podgene.net/api/orders/import-update/" \
-H "Authorization: Token <your-token>" \
-H "X-Organization-Slug: <workspace-slug>" \
-H "Content-Type: application/json" \
-d '{
"dry_run": true,
"scope": "all",
"rows": [
{ "row_number": 2, "order_id": "100245-Etsy",
"fields": { "tracking_code": "9400111899223344556677", "shipping_company": "USPS" } }
]
}'Bulk create
POST /api/orders/bulk-create/ creates up to 1,000 orders per call (workspace owner only). GET /api/orders/bulk-create-fields/ lists the accepted columns. It also supports dry_run.
Export to CSV
POST /api/orders/export/ streams a CSV — either by date range ("mode": "filters", start_date and end_date required, optional status list and account) or for chosen orders ("mode": "selected", "order_id_strs": [...]).
curl -X POST "https://podgene.net/api/orders/export/" \
-H "Authorization: Token <your-token>" \
-H "X-Organization-Slug: <workspace-slug>" \
-H "Content-Type: application/json" \
-d '{"mode": "filters", "start_date": "2026-10-01", "end_date": "2026-10-24", "status": ["Shipped"]}' \
-o orders.csvSelling accounts
/api/accounts/ lists the marketplace stores in your workspace (sellers see their own). Filters: status (Alive, Suspended, Holiday, Appeal, Approval), seller, name, search. The account id is what you pass as account when creating an order. GET /api/accounts/status-counts/ returns counts per status.
Print shops & catalog
| Endpoint | Description |
|---|---|
GET /api/print-shops/ | Active print shops (id, code, name, is_custom), including your workspace's custom print shops. |
GET /api/custom-print-shops/ | Your workspace's custom print shops (name only, with order_count). Org lead: POST {"name"}, PATCH /{id}/ to rename, DELETE /{id}/ (409 while orders use it). Orders on a custom print shop are fulfilled manually — send-to-printshop returns 400 MANUAL_PRINT_SHOP. |
GET /api/print-shop-products/ | Catalog of products and variants with base cost for Auto (base_cost_auto) and Custom (base_cost_custom). Read-only: the catalog is shared by every workspace and maintained by Podgene. |
GET /api/print-shop-products/distinct-options/ | Available sizes, colors and lines. |
Catalog filters: print_shop (ID), size, color, line, is_active, product_name__icontains (use | for OR), search.
curl "https://podgene.net/api/print-shop-products/?product_name__icontains=t-shirt|tee&size=L&page_size=50" \
-H "Authorization: Token <your-token>" \
-H "X-Organization-Slug: <workspace-slug>"Design tasks
| Endpoint | Description |
|---|---|
GET /api/tasks-design/ | Tasks visible to you. Filters: status (Pending, Inprogress, Review, Completed), assigned_to, maker (user IDs), search (task ID). |
GET /api/tasks-design/{id}/ | One task with its print areas and request details. |
GET /api/tasks-design/counts/ | Tasks per status. |
GET /api/tasks-design/subtasks/ | Design types — the value to send as typeDesign when creating a task. |
GET /api/designs/ | Your Design Store; search by name or tag. |
Billing & workspace
| Endpoint | Description |
|---|---|
GET /api/billing/ | Balance, trial status, orders this month, next order fee, storage used. |
GET /api/billing/transactions/ | Balance history (?limit=, ?offset=, ?type=). Org Lead only. |
GET /api/billing/pricing/ | Current price tiers (public, no token needed). |
GET /api/organizations/current/ | Your workspace: name, slug, balance, timezone, fulfillment mode (auto / custom). |
GET /api/notifications/ | Your notifications (?is_read=false); GET …/unread-count/. |
curl "https://podgene.net/api/billing/" \
-H "Authorization: Token <your-token>" \
-H "X-Organization-Slug: <workspace-slug>"Support tickets
Tickets go to the Podgene team. You see the tickets you opened; Org Leads and the workspace owner see every ticket of the workspace. Status is open (waiting for Podgene), answered (Podgene replied) or closed.
| Endpoint | Description |
|---|---|
GET /api/support/tickets/ | List (?status=, ?search=, ?mine=1), newest activity first. |
POST /api/support/tickets/ | Open a ticket: subject, category (billing, order, design, account, bug, other), message, optional order_id_str and attachments (up to 5 image URLs uploaded through /api/generate-upload-url/). |
GET /api/support/tickets/{id}/ | The ticket with all messages. |
POST …/{id}/reply/ | {"message": "...", "attachments": []}. Replying to a closed ticket reopens it. |
POST …/{id}/close/ | Close the ticket. |
GET …/status_counts/ | Number of tickets per status. |
Real-time events
GET /api/events/ is a Server-Sent Events stream. Authenticate with the same headers (header only — browsers' EventSource can't send them, so use fetch or a server-side client).
- Each event is one
data:line of JSON with atype. Lines starting with:are keep-alives (every 25 s). - Events are signals only — when you get one, call the API to read the new data.
- Types:
notification(new notification for the listed usernames),design-chat(new message on a design task),fulfill-taskandfulfill-chat(fulfillment cases),support-ticket(a ticket changed, withticket_id). Order changes are not streamed — poll/api/orders/for those. - The stream closes if your token is revoked or expires; reconnect with a valid token.
curl -N "https://podgene.net/api/events/" \
-H "Authorization: Token <your-token>" \
-H "X-Organization-Slug: <workspace-slug>"
: connected
data: {"type": "notification", "recipients": ["jane"], "organization": 7}
: ping
