REST API v2

Create products, submit orders, track shipments, and manage your catalogue programmatically. Everything you need to integrate Tshirtgang into your own platform.

API key auth JSON request/response REST over HTTPS Download Claude skill

Authentication & conventions

All endpoints accept JSON over HTTPS. Put your api_key inside the request body (not a header) and send every request as a POST with Content-Type: application/json. Generate / rotate your key in the seller control panel.

https://www.tshirtgang.com
Method
All endpoints use POST.
Content-Type
application/json — UTF-8 only.
Auth
api_key field inside the JSON body.
Success shape
{ "status": "success", ...endpoint-specific... }
Failure shape
{ "response": { "failure": { "code": "3", "message": "Invalid Authorization key" } } }
Max payload
10 MB (CreateOrder: 50 MB).
Rate limits
~60 requests / minute / API key. Contact support to raise.

Using Claude or another LLM in your project?

Drop our tshirtgang-api skill file into your Claude Code / Claude Desktop / Claude Agent SDK project and your LLM will know every endpoint, parameter, and common integration pattern documented on this page.

Download SKILL.md

Orders

POST /api/v2/CreateOrder/ CreateOrder

Submit one or more orders for fulfillment. Accepts existing `product_id`s or a new-product payload inline. Returns a shiplist ID that groups the orders for batch tracking.

Orders are processed idempotently on `market_id1` — sending the same `market_id1` twice returns the original `order_id` instead of creating a duplicate. Batch payloads can be up to 50 MB.
Request parameters
FieldTypeDescription
api_key required string Your API key from /cp/api.
shipping.fullname required string Recipient's full name.
shipping.address1 required string Street address (must include house number).
shipping.address2 optional string Apartment / unit number (optional).
shipping.city required string City.
shipping.state required string State/province. 2-letter code for US/CA.
shipping.zip required string Postal/zip code.
shipping.country required string 2-letter country code (US, CA, GB, …).
shipping.phone optional string Recipient's phone — required by some carriers.
shipping.email optional string Recipient's email — used for shipping notifications if your store relay is enabled.
order required array Single order object OR an array of order objects for batch submission.
order[].product_id optional integer Existing product ID (from CreateProduct). Omit if supplying `order[].product.*` inline.
order[].product.title optional string If creating on the fly: product title.
order[].product.url optional string If creating on the fly: design image URL (HTTPS PNG).
order[].size required string Size code (S, M, L, XL, 2XL…).
order[].color required string Colour name.
order[].quantity required integer Quantity — at least 1.
order[].backprint optional boolean `true` if back-print artwork was supplied with the product. Default `false`.
order[].priority_shipping optional boolean Priority lane (costs more, ships in 1–2 business days).
order[].comments optional string Free-text note passed through to production.
order[].market_id1 optional string Your internal order ID — stored for reference and returned on CheckStatus.
Example request
curl -X POST https://www.tshirtgang.com/api/v2/CreateOrder/ \
  -H "Content-Type: application/json" \
  -d '{"api_key":"YOUR_API_KEY","shipping":{"fullname":"Jane Doe","address1":"123 Main St","city":"Toronto","state":"ON","zip":"M5V 2T6","country":"CA"},"order":[{"product_id":98765,"size":"M","color":"Black","quantity":1}]}'
Example response
{
    "status": "success",
    "shiplist": "SL-554321",
    "orders": [
        {
            "order_id": 554321,
            "product_id": 98765,
            "estimated_ship": "2026-04-19"
        }
    ]
}
Response fields
FieldTypeDescription
status string `success` on a valid response.
shiplist string Grouping ID — pass to CheckStatus to track every order in this batch.
orders array Per-order details; indexes match the request `order[]` order.
orders[].order_id integer Our order ID.
orders[].product_id integer The product that was (or was created) and ordered.
orders[].estimated_ship string Estimated ship date (YYYY-MM-DD).
POST /api/v2/CheckStatus/ CheckStatus

Get the production / shipping status for every order in a shiplist. Returns an array (one row per order) with tracking numbers once shipped.

Poll no more than once every 15 minutes per shiplist. Most orders ship within 3–5 business days; set up a webhook via /cp/api/webhooks if you need push notifications instead.
Request parameters
FieldTypeDescription
api_key required string Your API key from /cp/api.
shiplist required string Shiplist ID returned by CreateOrder (e.g. `SL-554321`).
Example request
curl -X POST https://www.tshirtgang.com/api/v2/CheckStatus/ \
  -H "Content-Type: application/json" \
  -d '{"api_key":"YOUR_API_KEY","shiplist":"SL-554321"}'
Example response
[
    {
        "order_id": "YOUR-ORDER-123",
        "status": "shipped",
        "tracking": "1Z999AA10123456784",
        "dates": {
            "paid": "2026-04-15",
            "printed": "2026-04-17",
            "shipped": "2026-04-18"
        }
    }
]
Response fields
FieldTypeDescription
response array Array of per-order status rows.
response[].order_id string Your internal order ID (the `market_id1` you sent on CreateOrder).
response[].status string One of: `unpaid`, `paid`, `printing`, `shipped`, `cancelled`.
response[].tracking string Tracking number; empty string until the order ships.
response[].dates object Timestamps for paid/printed/shipped transitions.
POST /api/v2/LookupOrder/ LookupOrder

Fetch a single order by either Tshirtgang `order_id` or your own `market_id1`. Returns full details (address, item, status, tracking, receipts).

Address fields are AES-256 encrypted at rest and only returned to the API key that placed the order. Exactly one lookup key must be supplied.
Request parameters
FieldTypeDescription
api_key required string Your API key from /cp/api.
order_id optional integer Our numeric order ID. Exactly one of `order_id` / `market_id1` must be supplied.
market_id1 optional string Your internal order ID.
Example request
curl -X POST https://www.tshirtgang.com/api/v2/LookupOrder/ \
  -H "Content-Type: application/json" \
  -d '{"api_key":"YOUR_API_KEY","market_id1":"YOUR-ORDER-123"}'
Example response
{
    "status": "success",
    "order": {
        "order_id": 554321,
        "market_id1": "YOUR-ORDER-123",
        "status": "printing",
        "shipping": {
            "fullname": "Jane Doe",
            "city": "Toronto",
            "country": "CA"
        },
        "item": {
            "product_id": 98765,
            "size": "M",
            "color": "Black",
            "quantity": 1,
            "price": "$11.95"
        }
    }
}
Response fields
FieldTypeDescription
status string `success` on a valid response.
order object Full order record.
order.order_id integer Our order ID.
order.market_id1 string Your internal order ID.
order.status string See CheckStatus for valid values.
order.shipping object Shipping address on file.
order.item object Ordered SKU snapshot (frozen at purchase time).
POST /api/v2/GetSellerHistory/ GetSellerHistory

Retrieve your order history, paginated and filterable by status. Returns order summaries (IDs, dates, totals, status).

For high-volume stores, combine `since` with periodic sync rather than paging through history every time.
Request parameters
FieldTypeDescription
api_key required string Your API key from /cp/api.
page optional integer Page number (1-based). Default `1`.
limit optional integer Results per page (max 100, default 50).
status optional string Filter by status: `pending` | `paid` | `printing` | `shipped` | `cancelled`.
since optional string ISO-8601 date — only orders created after this are returned.
Example request
curl -X POST https://www.tshirtgang.com/api/v2/GetSellerHistory/ \
  -H "Content-Type: application/json" \
  -d '{"api_key":"YOUR_API_KEY","page":1,"status":"shipped"}'
Example response
{
    "status": "success",
    "total": 89,
    "orders": [
        {
            "order_id": 554321,
            "shiplist": "SL-554321",
            "status": "shipped",
            "total": "$14.95",
            "date": "2026-04-17"
        }
    ]
}
Response fields
FieldTypeDescription
status string `success` on a valid response.
total integer Total matching orders (across all pages).
orders array Page of order summary rows.
orders[].order_id integer Our order ID.
orders[].shiplist string Shiplist grouping ID.
orders[].status string Current order status.
orders[].total string Order total in USD.
orders[].date string Order creation date (YYYY-MM-DD).

Products

POST /api/v2/GetAvailableProducts/ GetAvailableProducts

Retrieve the current blank catalogue (style / colour / size combinations) available for printing. Supports incremental sync via `filter.lastcheck`.

Use `filter.lastcheck` to sync incrementally. Store the highest `last_updated` seen and pass it on the next poll to fetch only changes. Calls without filters can return thousands of rows.
Request parameters
FieldTypeDescription
api_key required string Your API key from /cp/api.
filter.style optional string Style name (e.g. "Gildan 5000") or numeric style ID.
filter.color optional string Colour name (e.g. "Black"). Partial matches not accepted.
filter.size optional string Size code (S, M, L, XL, 2XL, 3XL, 4XL, 5XL, 6XL).
filter.region optional string `us`, `ca`, or `europe`. Returns the catalogue for that fulfillment region.
filter.available optional boolean `true` = only in-stock rows, `false` = only unavailable rows. Omit for all.
filter.lastcheck optional integer Unix timestamp — only return products whose pricing row was updated since.
filter.unreleased optional boolean Include products not yet released to the public (default `false`).
Example request
curl -X POST https://www.tshirtgang.com/api/v2/GetAvailableProducts/ \
  -H "Content-Type: application/json" \
  -d '{"api_key":"YOUR_API_KEY","filter":{"region":"us","available":"true"}}'
Example response
{
    "status": "success",
    "products": [
        {
            "style_id": 42,
            "name": "Gildan 5000",
            "colors": [
                "Black",
                "White",
                "Navy"
            ],
            "sizes": [
                "S",
                "M",
                "L",
                "XL"
            ]
        }
    ]
}
Response fields
FieldTypeDescription
status string `success` on a valid response.
products array List of blank products matching the filter.
products[].style_id integer Numeric style ID — pass to CreateProduct / CreateOrder.
products[].name string Human-readable style name.
products[].colors string[] Available colour names.
products[].sizes string[] Available size codes.
POST /api/v2/GetProductList/ GetProductList

Return the full attribute catalogue — every colour (with hex code and PMS reference) and every size code Tshirtgang carries across all styles.

Cache the response; the attribute table changes rarely. Colour IDs are stable across the platform — the same ID returned here can be used directly in CreateProduct `product.colors`.
Request parameters
FieldTypeDescription
api_key required string Your API key from /cp/api.
Example request
curl -X POST https://www.tshirtgang.com/api/v2/GetProductList/ \
  -H "Content-Type: application/json" \
  -d '{"api_key":"YOUR_API_KEY"}'
Example response
{
    "status": "success",
    "colors": [
        {
            "id": 1,
            "name": "Black",
            "hex": "#000000"
        }
    ],
    "sizes": [
        "S",
        "M",
        "L",
        "XL",
        "2XL"
    ]
}
Response fields
FieldTypeDescription
status string `success` on a valid response.
colors array Every colour in the attribute table.
colors[].id integer Pricing_Attributes row ID — use when calling CreateProduct.
colors[].name string Canonical colour name.
colors[].hex string Hex colour code for previewing swatches.
sizes string[] Short size codes available system-wide.
POST /api/v2/CreateProduct/ CreateProduct

Create a new product in your catalogue from a design image URL. The system generates SKUs and mockups for every colour/size combination in your request.

Images must be publicly reachable over HTTPS at request time — we fetch them synchronously. PNG with transparency is strongly recommended; JPG is rejected with error 93.
Request parameters
FieldTypeDescription
api_key required string Your API key from /cp/api.
product.title required string Product name. Shown on invoices and order summaries.
product.url required string Design image URL (PNG, minimum 2400×3200 recommended for DTG). Must begin with `https://`.
product.style required integer Style ID from GetAvailableProducts.
product.colors required integer[] Array of colour IDs from GetProductList.
product.sizes required string[] Array of size codes (S, M, L, XL, 2XL, 3XL, 4XL, 5XL, 6XL).
product.backprint optional boolean Set `true` if the design has a back print. Defaults to `false`.
Example request
curl -X POST https://www.tshirtgang.com/api/v2/CreateProduct/ \
  -H "Content-Type: application/json" \
  -d '{"api_key":"YOUR_API_KEY","product":{"title":"Summer Vibes Tee","url":"https://example.com/design.png","style":42,"colors":[1,5,12],"sizes":["S","M","L","XL"]}}'
Example response
{
    "status": "success",
    "product_id": 98765,
    "skus_created": 12
}
Response fields
FieldTypeDescription
status string `success` on a valid response.
product_id integer Product ID — use as `product_id` in CreateOrder.
skus_created integer Number of SKUs generated (colours × sizes).
POST /api/v2/GetSellerProducts/ GetSellerProducts

Retrieve your product catalogue with pagination. Returns product details, SKU counts, and listing status.

Iterate `page` until `page * limit >= total`. The `limit` parameter is capped server-side at 100.
Request parameters
FieldTypeDescription
api_key required string Your API key from /cp/api.
page optional integer Page number (1-based). Default `1`.
limit optional integer Results per page. Max `100`. Default `50`.
Example request
curl -X POST https://www.tshirtgang.com/api/v2/GetSellerProducts/ \
  -H "Content-Type: application/json" \
  -d '{"api_key":"YOUR_API_KEY","page":1,"limit":25}'
Example response
{
    "status": "success",
    "total": 142,
    "page": 1,
    "products": [
        {
            "product_id": 98765,
            "title": "Summer Vibes Tee",
            "skus": 12,
            "created": "2026-03-15"
        }
    ]
}
Response fields
FieldTypeDescription
status string `success` on a valid response.
total integer Total products in your catalogue (across all pages).
page integer Current page number echoed back.
products array Page of product rows.
products[].product_id integer Product ID.
products[].title string Product name.
products[].skus integer Number of SKUs on this product.
products[].created string Creation date (YYYY-MM-DD).
POST /api/v2/GetProductLatency/ GetProductLatency

Estimated production turnaround (in business days) for a given style, before shipping. Use this to display "Ships in X days" on your product pages.

Latency is a live estimate, recalculated from the production queue. Retry this once per day for cached "estimated ship date" displays.
Request parameters
FieldTypeDescription
api_key required string Your API key from /cp/api.
style_id required integer Style ID from GetAvailableProducts.
Example request
curl -X POST https://www.tshirtgang.com/api/v2/GetProductLatency/ \
  -H "Content-Type: application/json" \
  -d '{"api_key":"YOUR_API_KEY","style_id":42}'
Example response
{
    "status": "success",
    "style_id": 42,
    "production_days": 3,
    "region": "us"
}
Response fields
FieldTypeDescription
status string `success` on a valid response.
style_id integer Echoed style ID.
production_days integer Expected in-house production time (excludes shipping).
region string Fulfillment region the latency applies to.

Ready to build?

Free to create, pay-as-you-go on orders. Be live in minutes.

  1. 1
    Create an account Free Tshirtgang seller account — no card required.
  2. 2
    Grab your API key Generate from the control panel at /cp/api.
  3. 3
    Integrate & launch POST your first product or order — done.