Skip to main content

JTL Developers

Build on JTLGO dropshipping

A REST API for your own systems: import 1688 factory products, get landed-cost quotes, place orders paid from your JTLGO wallet and receive tracking numbers by webhook. Test keys never buy or charge anything.

JTLGO Dropshipping API — Developer Guide

Status: pilot (2026-11-23). API v1 is available to accounts JTLGO has enabled for the pilot. Fields may still be added (see §15). The machine-readable contract is openapi.yaml.

The JTLGO Dropshipping API lets your own system (ERP, OMS, a custom storefront, a marketplace connector) do what the JTLGO Shopify and WooCommerce apps do:

  1. Import a product from a 1688 factory seller and get its landed cost to your buyer’s country.
  2. Quote an order before you sell.
  3. Place an order with your buyer’s address. It is paid from your JTLGO wallet.
  4. Track it: we buy from the factory, receive and weigh the parcel at our warehouse in China, and ship it duties-paid. You get the tracking number by webhook or by polling.

You pay the landed cost only: goods + China domestic freight + international freight (duties included on DDP lines). There is no service fee and no subscription.


Contents

  1. Quick start
  2. Authentication and keys
  3. Requests, responses and errors
  4. Idempotency
  5. Products
  6. Quotes and pricing
  7. Orders
  8. Wallet and payment
  9. Weight settlement
  10. Webhooks
  11. Test mode (sandbox)
  12. Rate limits
  13. Error codes
  14. Going live checklist
  15. Changelog and versioning

1. Quick start

Base URL: https://api.jtlgo.com/open/v1

# 1. Which countries can I ship to?
curl https://api.jtlgo.com/open/v1/destinations \
  -H "Authorization: Bearer $JTLGO_KEY"

# 2. Import a 1688 product for the US
curl -X POST https://api.jtlgo.com/open/v1/products \
  -H "Authorization: Bearer $JTLGO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source":"https://detail.1688.com/offer/731464528956.html","destination_country":"US"}'

# 3. Place an order (use a variant "sku" from step 2)
curl -X POST https://api.jtlgo.com/open/v1/orders \
  -H "Authorization: Bearer $JTLGO_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "external_order_id": "SO-10023",
    "recipient": {
      "name": "Jane Doe", "phone": "+1 415 555 0100",
      "address1": "1 Market St", "city": "San Francisco", "state": "CA",
      "postal_code": "94105", "country": "US"
    },
    "lines": [{ "sku": "JTL-731464528956-5177745329683", "quantity": 1 }]
  }'

Start with a test key (jtl_test_…): nothing is bought and nothing is charged. See Test mode.


2. Authentication and keys

The Open API is enabled per account during the pilot: contact JTLGO to join. Once enabled, create keys yourself in jtlgo.com → Account → Developers. A key is shown once, when it is created. We store only a hash; if you lose it, revoke it there and create a new one. Up to 10 active keys per account (expired keys do not count). We email the account owner whenever a key is created or revoked; if you get one you did not expect, revoke the key and change your password. Changing your password does not revoke keys — revoke them yourself.

Authorization: Bearer jtl_live_8Hk2…
Prefix Mode Effect
jtl_live_ live Real purchases, real wallet charges
jtl_test_ test Orders are marked test, never bought, paid from a test balance

Each key has scopes. Keys get all six unless you untick some under More settings when you create the key on the account page. Give each system only what it needs.

Scope Allows
catalog:read GET /destinations, GET /products…
catalog:write POST /products, PATCH /products/{id}/variants/{sku_id}
orders:read GET /orders…, POST /quotes, GET /events
orders:write POST /orders, /pay, /cancel
wallet:read GET /wallet
webhooks:manage /webhook-endpoints…

Optional per key (also under More settings): an IP allowlist (up to 20 single addresses; IPv6 is compared in normalised form) and an expiry date. Treat the allowlist as a second lock, not the only one: keep the key itself secret.

Test keys and your live catalog. Imported products are shared by both modes, so a test key can import and read products, but it cannot change what your live orders are charged: PATCH /products/{id}/variants/{sku_id} and POST /products with "refresh": true need a jtl_live_ key (403 live_key_required).

A key belongs to your JTLGO account. Products and orders made with it are the same ones you see in your account page, so your team can follow them there too.

Never put a key in a browser, mobile app or public repository. Call the API from your server.


3. Requests, responses and errors

  • JSON in, JSON out, UTF-8. Send Content-Type: application/json on requests with a body.
  • Field names are snake_case.
  • Money is an object with a decimal string: {"amount": "25.04", "currency": "USD"}. Do not parse it into a float for accounting; use a decimal type.
  • Timestamps are ISO 8601 UTC: 2026-11-20T08:15:00Z.
  • Single resources come back as {"data": {…}}; lists as {"data": […], "next_cursor": "…"}.
  • Pagination: pass next_cursor back as ?cursor= until it is null. limit is 1–100 (default 20). Treat the cursor as opaque; its format may change.
  • Request bodies are limited to 64 KB (413 payload_too_large).
  • Every response carries X-Request-Id. Quote it when you contact us.

Errors use HTTP status codes and one body shape:

{
  "error": {
    "type": "invalid_request",
    "code": "recipient_incomplete",
    "message": "The buyer address is missing: phone, postal_code",
    "fields": ["phone", "postal_code"],
    "request_id": "req_7f3c2a9d"
  }
}
HTTP type Meaning
400 invalid_request Bad input. Fix and resend.
401 authentication Missing, wrong, revoked or expired key
402 payment_required Wallet balance too low
403 permission Key lacks the scope, or IP not allowed
404 not_found No such resource in your account
409 conflict State does not allow it (already shipped, product not ready, price changed)
413 invalid_request Request body over 64 KB
429 rate_limit Slow down; see Retry-After. The code is rate_limited
502/503 upstream 1688 or a carrier is not answering; retry with backoff
500 internal Our bug; retry with backoff and tell us the request_id

Branch on error.code, never on message (messages may be reworded).


4. Idempotency

Network failures happen. Every POST accepts an Idempotency-Key header (8–128 chars of A-Z a-z 0-9 . _ : -). It is honoured on POST /products, POST /orders, POST /orders/{id}/pay and POST /orders/{id}/cancel; other endpoints ignore it. Resending the same key with the same body within 24 hours returns the first response instead of doing the work again — including a 4xx answer. For example, if /pay answered 402 insufficient_balance, top up and retry with a new key. 5xx answers are not stored, so you can retry those with the same key. The same key with a different body (compared byte for byte as JSON, so keep the field order stable) is refused with 409 idempotency_key_reused.

If the first request is still running you get 409 idempotency_in_progress; retry after a few seconds. If our side dropped that request (for example during a restart), the key is released after at most 2 minutes.

POST /orders is additionally idempotent on external_order_id, permanently: one external_order_id = one JTLGO order, forever. A replay returns 200 with the original order; the first creation returns 201. This is what protects you from paying twice — always send your own order id.


5. Products

Import

POST /products
{ "source": "731464528956", "destination_country": "US" }

source is a 1688 offer id or a detail.1688.com / m.1688.com URL. Other sites are refused.

What import does:

  1. Reads the live listing: title, images, variants, stock, prices, weights, minimum order.
  2. Supplier check — we only take 1688 factory sellers, no pre-sale listings, dispatch promised within 72 hours. Others are blocked with supplier_not_factory, supplier_preorder or supplier_slow_dispatch.
  3. Compliance — prohibited goods and brand-risk checks. Unclear cases go to needs_review; our team decides within one business day.
  4. Landed cost for every variant to the destination country (see §6).
  5. English title and option names.

A product is imported per destination country. To sell the same item in the US and Germany, import it twice (destination_country: "US" and "DE"). Each import has its own id.

Importing the same offer and country again returns the existing product with "reused": true. Send "refresh": true to re-read 1688 and re-price.

Product images come from the 1688 listing as they are. They may show Chinese text.

Product status

status Can order? What to do
ready yes —
needs_weight variants with a weight, yes Supply the missing weights
needs_review no Wait for product.blocked or a status change
blocked no See block_reasons; pick another supplier
unavailable no Delisted on 1688 or no variant can ship

Variants and SKUs

Each variant has a stable sku like JTL-731464528956-5177745329683. Use it as the SKU in your own catalog; you can then order with just {"sku": "...", "quantity": 1}.

Missing weights

Some factories do not state a variant’s weight. Those variants have weight_source: "none" and cost.available: false. Give us your best estimate:

PATCH /products/{product_id}/variants/{sku_id}
{ "weight_kg": 0.42, "length_cm": 20, "width_cm": 15, "height_cm": 5 }

Use _ as sku_id for a product without variants. You can only set weights the supplier did not give. The parcel is weighed at our warehouse anyway — see §9.

Price lock and daily refresh

Variant costs are guaranteed until price_locked_until (24 hours after pricing). Every night we re-read every product you have imported:

  • cost up by more than 3%, a variant out of stock, or the listing delisted → product.price_changed or product.unavailable webhook, and an email to you;
  • the supplier no longer passes the supplier check → product.blocked.

If you order after the lock has expired, the order is re-priced at current cost. Use expected_total on POST /orders to refuse silently higher prices.


6. Quotes and pricing

POST /quotes
{ "lines": [ { "sku": "JTL-731464528956-5177745329683", "quantity": 2 } ] }

The quote is exactly what POST /orders would charge right now. Nothing is stored.

How an order is priced:

Part How
Goods 1688 unit price × quantity, converted to USD at the day’s rate
China domestic freight Once per supplier in the order, from the supplier’s freight template
International freight All lines ship as one parcel; priced on the combined chargeable weight on the destination’s line, duties included on DDP lines
Service fee none

Rules:

  • All lines in one order must have the same destination country (they share a parcel and a line). Otherwise: 409 mixed_destinations.
  • Each line must meet the product’s min_order_qty.
  • Chargeable weight is the larger of actual and volumetric weight where the line bills on volume.
  • Worked example (Nov 2026, phone stand, 1688 offer 731464528956, to the US): goods $4.01 + China freight $1.28 + US DDP freight $18.75 + $1.00 parcel handling (part of international freight) = $25.04.

7. Orders

Create

POST /orders
{
  "external_order_id": "SO-10023",
  "external_order_name": "#10023",
  "recipient": { "name": "...", "phone": "...", "address1": "...", "address2": "",
                 "city": "...", "state": "CA", "postal_code": "...", "country": "US" },
  "lines": [ { "sku": "JTL-731464528956-5177745329683", "quantity": 1 } ],
  "payment": { "auto_pay": true },
  "expected_total": { "amount": "26.00", "currency": "USD" },
  "metadata": { "channel": "my-store-eu" }
}
  • recipient is your buyer. It is used only for shipping and is never saved to your address book. phone is required by every carrier we use; if it is empty we use the phone on your JTLGO account (in both modes). recipient.email is accepted but not used yet. If fields are missing, 400 recipient_incomplete lists them in fields using the names above (name, phone, address1, city, postal_code, country).
  • Country codes must be exactly two letters ("US", not "USA").
  • recipient.country must equal the products’ destination country (409 destination_mismatch).
  • expected_total (optional): if our total is higher, the order is refused with 409 price_changed and the current total in the error; nothing is created. amount must be a decimal string or number such as "26.00" (anything else is 400 invalid_request).
  • payment.auto_pay must be true or false (a string such as "false" is 400).
  • If a product’s 7-day price lock has expired, the order (or quote) refreshes the price first. If 1688 cannot be read, you get 502 source_unavailable; we do not try that product again for 30 minutes, so retry after that or re-import it.
  • metadata: up to 20 string pairs of your own, echoed on the order and in webhooks.

Invoices and payment notices go to you, never to your buyer.

Order status

awaiting_payment → processing → ready_to_ship → shipped → delivered
                         ↘ awaiting_top_up ↗
any unpaid state → cancelled
status Meaning Your action
awaiting_payment Created; not paid Top up wallet, then POST /orders/{id}/pay
processing Paid; buying from the factory, receiving, packing —
awaiting_top_up Weighed heavier than quoted Pay the difference (account page) to release the parcel
ready_to_ship Weighed and settled —
shipped Handed to carrier; shipment.tracking_number set Pass tracking to your buyer
delivered Carrier reports delivery —
cancelled Cancelled —

Typical timing: supplier dispatch ≤ 72 h, warehouse receive + pack 1–2 days, then the line’s transit time (transit_text on /destinations).

Read

GET /orders/ORD-20261120-BDFAA
GET /orders/ext:SO-10023              # by your own id
GET /orders?status=shipped&updated_after=2026-11-20T00:00:00Z

With status, a page can hold fewer than limit orders; keep following next_cursor.

Cancel

POST /orders/{id}/cancel   { "reason": "Buyer changed mind" }
  • Not paid yet → cancelled immediately.
  • Paid, not shipped → the goods may already be bought. The order gets cancellation.status: "requested"; our team answers within one business day with order.cancelled (refund to wallet, minus any non-refundable supplier cost we tell you about) or order.cancellation_rejected.
  • Shipped → 409 order_not_cancellable.

8. Wallet and payment

Orders are paid from your JTLGO wallet (USD). GET /wallet returns your balance and top_up_url.

Topping up: open top_up_url (Account → Wallet → Top up by bank transfer). Send a bank transfer to the account shown there, then enter the amount, the payer name and the bank reference. We match it against our bank statement and add the amount that actually arrived (after any bank fees) to your wallet. The minimum is shown on that page (USD 50 at launch). Wallet funds can only be spent on orders; they cannot be withdrawn. There is no API for top-ups.

When a top-up is added, orders that are still awaiting_payment are paid automatically, oldest first, until the balance runs out — except orders you created with payment.auto_pay: false, which stay for you to pay. With payment.auto_pay (default true) a new order is paid the moment it is created.

If the balance is not enough, the order is still created, stays awaiting_payment, and you get order.payment_failed with failure_reason: "insufficient_balance" (plus one email per order per day). After topping up, call POST /orders/{id}/pay.

Unpaid orders are not bought. Cancel orders you no longer want (POST /orders/{id}/cancel).

Refunds (cancellations, weight refunds) go back to the wallet.


9. Weight settlement

We quote on the weight we know (supplier’s figure, or yours). At our warehouse the packed parcel is weighed:

Result What happens Event
Within tolerance Nothing order.weight_settled
Lighter Difference refunded to your wallet order.weight_settled (negative difference)
Heavier Order goes to awaiting_top_up; parcel held until paid order.top_up_due

During the pilot a top-up is paid from your JTLGO account page or arranged with JTLGO; POST /orders/{id}/pay answers 409 top_up_pay_unsupported for it.


10. Webhooks

Register an HTTPS endpoint:

POST /webhook-endpoints
{ "url": "https://erp.example.com/hooks/jtlgo", "events": ["order.paid","order.shipped","order.top_up_due"] }

The response contains secret (whsec_…) — shown once. Up to 5 endpoints per account. Send an Idempotency-Key so a retried registration does not create a second endpoint.

POST /webhook-endpoints/{id}/rotate-secret   → new secret, shown once; the old one stops at once
POST /webhook-endpoints/{id}/enable           → turn a disabled endpoint back on

To rotate without losing events: call rotate-secret, then deploy the new secret. Deliveries that fail verification in between are retried (first retry after 1 minute), so nothing is lost.

Event types

Event When
order.created Order created (any channel: API, your account page)
order.paid Payment recorded
order.payment_failed Auto-pay failed (e.g. insufficient_balance)
order.top_up_due Weighed heavier; pay to release
order.weight_settled Weighed; no difference or refunded
order.shipped Tracking number available
order.delivered Delivered
order.cancelled Cancelled (by you, by timeout, or accepted cancellation)
order.cancellation_rejected Paid-order cancellation refused
product.price_changed Nightly refresh: cost up >3% or a variant can no longer ship
product.unavailable Delisted / nothing can ship
product.blocked Supplier or compliance check now fails
ping POST /webhook-endpoints/{id}/test

Payload

{
  "id": "evt_01JD2X8M3K9Q",
  "type": "order.shipped",
  "created_at": "2026-11-26T03:12:44Z",
  "mode": "live",
  "data": { "order": { "id": "ORD-20261120-BDFAA", "status": "shipped", "shipment": { "carrier": "USPS", "tracking_number": "9400…" }, "…": "…" } }
}

data holds the full resource as GET would return it at that moment.

Verifying the signature

Every delivery has:

JTLGO-Signature: t=1764126764,v1=5c1e…
JTLGO-Event-Id: evt_01JD2X8M3K9Q

v1 is HMAC-SHA256(secret, t + "." + raw_body) in hex. Verify against the raw body bytes, compare in constant time, and reject if t is more than 5 minutes old.

// Node.js (Express): app.post('/hooks/jtlgo', express.raw({ type: 'application/json' }), handler)
const crypto = require('node:crypto');
function verify(rawBody, header, secret, toleranceSec = 300) {
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
  const t = Number(parts.t);
  if (!t || Math.abs(Date.now() / 1000 - t) > toleranceSec) return false;
  const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
  const a = Buffer.from(expected, 'hex');
  const b = Buffer.from(parts.v1 || '', 'hex');
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}
# Python
import hmac, hashlib, time
def verify(raw_body: bytes, header: str, secret: str, tolerance=300) -> bool:
    parts = dict(p.split("=", 1) for p in header.split(","))
    t = int(parts.get("t", "0"))
    if abs(time.time() - t) > tolerance:
        return False
    expected = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts.get("v1", ""))
// PHP
function jtlgo_verify(string $raw, string $header, string $secret, int $tol = 300): bool {
  parse_str(str_replace(',', '&', $header), $p);
  if (abs(time() - (int)($p['t'] ?? 0)) > $tol) return false;
  $expected = hash_hmac('sha256', $p['t'] . '.' . $raw, $secret);
  return hash_equals($expected, $p['v1'] ?? '');
}

Delivery rules

  • Answer 2xx within 10 seconds (this is a hard limit for the whole request, including the response body); do the work afterwards (queue it).
  • Webhooks are per mode: endpoints created with a test key receive test events only, and live endpoints live events only. "*" in events subscribes to everything. Order events are detected by a scan that runs every minute, so expect up to a few minutes of delay.
  • POST /webhook-endpoints/{id}/test is limited to 5 per minute per account. Its error field is a category: timeout, unreachable, tls_error, address_not_allowed or http_<status>.
  • Anything else is retried with backoff: 1 min, 5 min, 30 min, 2 h, 6 h, 12 h (7 tries over about 21 h).
  • After 3 days of continuous failure the endpoint is disabled. Fix your receiver, then call POST /webhook-endpoints/{id}/enable (the secret stays the same).
  • If the Open API is turned off for your account, queued deliveries are dropped and no new order events are made; when it is turned back on, events resume.
  • Delivery is at least once and not ordered. De-duplicate on id, and treat the data.order.status / updated_at in the payload (or a fresh GET) as the truth.
  • Missed something? GET /events?created_after=… lists the last 30 days.

11. Test mode (sandbox)

Keys starting jtl_test_ run in test mode on the same host:

  • Imports read real 1688 data (and count toward your import quota).
  • Orders are created with mode: "test" and an id starting TEST-, are never bought or shipped, and are paid from a test balance of $1,000 per order (a larger order is insufficient_balance, so you can test that path too).
  • Quotes and prices are real: they come from products you really imported.
  • Test orders are invisible to live keys and vice versa, and are deleted 90 days after creation.
  • Move a test order through its life and get the real webhooks:
POST /sandbox/orders/{id}/advance   { "to": "shipped" }
POST /sandbox/orders/{id}/advance   { "to": "awaiting_top_up", "weight_difference_usd": "1.20" }

12. Rate limits

What Limit
All requests 120 / minute per key
POST /products (import) 10 / minute and 300 / day per account
POST /orders 60 / minute per account
POST /webhook-endpoints/{id}/test 5 / minute per account
Requests that fail authentication 30 / minute per IP address

Rate-limited responses carry RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset. A 429 carries Retry-After: the seconds until that limit resets (for the daily import limit, the time left in the current day window). Back off exponentially with jitter on 429 and 5xx.

Imports are limited because each one reads the live 1688 listing and runs compliance checks. Re-reading a product you already imported (GET /products/{id}) is free.


13. Error codes

code HTTP Meaning
missing_api_key 401 No Authorization: Bearer header
invalid_api_key 401 Key unknown, revoked or expired
api_not_enabled 403 The account is not enabled for the Open API
account_unavailable 403 The JTLGO account is not active
insufficient_scope 403 Key lacks the scope
ip_not_allowed 403 Request IP outside the key’s allowlist
invalid_source 400 source is not a 1688 offer id/URL
destination_unsupported 400 No line to that country
destination_unavailable 503 The country’s line is paused
source_not_found 404 The 1688 listing does not exist or was removed
source_unavailable 502 1688 did not answer (also when an expired price cannot be refreshed: retry after 30 minutes)
temporarily_unavailable 503 A dependency is briefly unavailable; retry with backoff
product_not_found 404 No such product in your account
product_not_ready 409 Product is needs_review, blocked or unavailable
variant_not_found 400 sku_id / sku is not on that product
variant_unpriced 409 Variant needs a weight or cannot ship
weight_not_editable 409 Supplier already gave that weight
invalid_quantity 400 Quantity is not a whole number from 1 to 999
invalid_weight 400 Weight not between 0.01 and 30 kg, or dimensions out of range
parcel_too_heavy 409 The combined parcel is over the line’s weight limit
mixed_destinations 409 Lines for different countries in one order
destination_mismatch 409 recipient.country ≠ products’ destination
recipient_incomplete 400 Missing address fields (see fields)
price_changed 409 Total above expected_total
insufficient_balance 402 Wallet too low
order_not_found 404 —
order_not_payable 409 Already paid or cancelled
top_up_pay_unsupported 409 Weight top-ups are paid from the account page for now
payment_failed 409 The wallet refused the payment for another reason (see message)
order_not_cancellable 409 Already shipped
idempotency_key_reused 409 Same key, different body
idempotency_in_progress 409 The first request with this key is still running; retry shortly
invalid_idempotency_key 400 Key not 8-128 chars of A-Z a-z 0-9 . _ : -
invalid_cursor 400 cursor was not one we returned
test_mode_only 403 /sandbox/* needs a jtl_test_ key
invalid_transition 409 Sandbox: the test order is already at or past that stage
rate_limited 429 —
live_key_required 403 That change affects live orders; use a jtl_live_ key
payload_too_large 413 Request body over 64 KB
invalid_json 400 The body is not valid JSON
invalid_request 400 A parameter is missing or malformed (see param)
not_found 404 No such endpoint (check the method and path)
internal_error 500 Our bug; quote request_id
webhook_url_invalid 400 Not https, not public, or not port 443
webhook_limit_reached 409 5 endpoints already (per mode)
webhook_not_found 404 No such endpoint in this account and mode

14. Going live checklist

  • Built and tested end-to-end with a jtl_test_ key, including /sandbox/.../advance.
  • Always send external_order_id; retry POST /orders on timeouts with the same id.
  • Webhook signature verified on the raw body; events de-duplicated on id.
  • Handling order.payment_failed and order.top_up_due (otherwise parcels wait).
  • Handling product.price_changed / unavailable / blocked in your catalog.
  • Recipient phone always sent.
  • Live key stored server-side only, with only the scopes it needs and an IP allowlist if your servers have fixed IPs.
  • Rotating a key: create a new one, deploy it, then revoke the old one.
  • Wallet topped up, or auto_pay: false and your own payment flow via /pay.

15. Changelog and versioning

The version is in the path (/open/v1). Within v1 we only make additive changes: new endpoints, new optional fields, new event types, new enum values, new error codes. Your code must ignore unknown fields and tolerate unknown enum values. Breaking changes go to /v2, with at least 6 months of overlap and email notice.

Date Change
2026-11-23 v1 pilot: self-service keys on the account page, test mode, webhooks
2026-11-23 Webhook rotate-secret and enable; key emails; test orders kept 90 days; recipient fields lose control characters
2026-11-23 Security pass: 64 KB body limit, hard 10 s webhook deadline, test keys cannot change live prices or weights, live orders fall back to the account phone, idempotency keys released 2 min after a dropped request