Skip to navigation

API: Import

What It Does

The Import API brings products into a tieback workspace from your own system. It works like the CSV import: nothing reaches your catalogue until you commit, and you can see what will come in, and what will be left out, before you do.

StepRouteWhat happens
1. OpenPOST /v1/importsOpens an import and returns its id.
2. AddPOST /v1/imports/{id}/productsAdds up to 500 products a call, as many calls as you need.
3. CheckPOST /v1/imports/{id}/validateChecks every product and lists what is ready and what is not.
4. CommitPOST /v1/imports/{id}/commitBrings the ready products in.
FollowGET /v1/imports/{id}Status, counts and issues, at any time.
DiscardDELETE /v1/imports/{id}Discards an import nothing has been committed from.

Who It’s For

Developers connecting an ERP, a PIM or a store to tieback.

Before You Start

  • Create an API key with Import products in Settings → API Credentials, and swap it for a token (see API: Credentials). Every call below sends Authorization: Bearer <token>.
  • A key with Read products only is refused on every import route (403).
  • Every product arrives as Draft, whatever you send. Draft products don’t count toward your plan’s product limit until someone activates them in tieback.
  • A SKU your workspace already has is not overwritten: only its empty fields are filled, and the rest are listed as skipped.

Limits

LimitValue
Products per call500
Products per import50,000
Request body5 MB
Checked and committed in the requestUp to 100 products. More are checked and committed in the background: the call answers 202, and you follow progress with GET /v1/imports/{id}
CallsYour key’s rate limit (see GET /v1/me)

POST /v1/imports

Opens an import. Send an idempotency key (8 to 128 visible characters, no spaces) so a retry never opens a 2nd import.

curl -X POST https://api.tieback.io/v1/imports \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"idempotency_key": "erp-sync-2026-11-12"}'
{ "id": "6f1c…", "status": "draft" }

201 when opened. The same idempotency key again returns the same import with 200. A workspace that is suspended or ended gets 402.

POST /v1/imports/{id}/products

Adds up to 500 products. Call it as many times as you need, up to 50,000 products in the import.

curl -X POST https://api.tieback.io/v1/imports/$IMPORT_ID/products \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"products": [
{
"sku": "TEE-RED-M",
"name": { "en": "Red tee", "fr": "T-shirt rouge" },
"gtin": "5014500990315",
"core_field_values": {
"core.product_information.target_market_countries": ["GB", "France"],
"core.performance.expected_lifetime_years": "5 years"
}
}
]
}'
{ "staged": 1, "total_staged": 1, "left_out_fields": [] }

Product fields you can send:

FieldTypeNotes
skutextRequired.
name, descriptiontext, or text by language ({ "en": "…" })
gtintext or numberChecked for a valid check digit, and that no other product holds it.
hs_code, traceability_modetext
audiencelist of text
core_field_valuesobject of field key to valueField keys come from GET /v1/schema.
family_keytext, up to 200 charactersProducts sent with the same key share 1 family_id. Set on new products only.
external_idtext, up to 200 charactersYour own id for the product. Find it later with POST /v1/products/lookup. Set on new products only.
custom_fieldsobject of custom.<key> to valueYour workspace’s own product fields. See Custom fields below.
product_typetextThe product type’s key or its name as shown in tieback, for example Textile apparel. See Product type below.
contains_batterytrue or false, or "yes" or "no"Whether the product contains a battery. Battery types always do.

Any other field is left out and listed in left_out_fields by product position. Status, visibility and source fields are always set by tieback.

Custom fields: each key is a custom field your workspace has set up for products (custom.fabric_note). Values are text (up to 5,000 characters), a number, true or false, a date (2026-10-17) or an https:// address, to match the field. A key with a badly formed name, or a value that is a list or an object, is listed in left_out_fields as custom_fields.<key>. When the import is committed, a value for a field the workspace doesn’t have (or that is for lots only), or of the wrong type, is left out with a value_left_out warning (unknown_field, wrong_type or bad_date); read them with GET /v1/imports/{id}. For a SKU already in your workspace, custom fields are only filled where empty; a field that already holds a value keeps it, with a value_present_skipped warning.

Product type: a type that allows only 1 traceability mode also sets that mode, with a traceability_mode_set_by_type warning when you sent another. A type that is not recognised leaves the product without a type, with a product_type_unknown warning. A product that already has a type and passports keeps its type, with a product_type_locked warning. A new product sent without a type gets a product_type_missing warning. None of these stops the product.

Adding products after a check sends the import back to draft: check it again before you commit. Once committing has started, the import takes no more products (409).

POST /v1/imports/{id}/validate

Checks every product. Up to 100 products, the answer comes straight back:

{
"id": "6f1c…",
"status": "validated",
"counts": { "ready": 98, "warnings": 1, "errors": 1 },
"issues": [
{
"product_index": 3,
"code": "value_left_out",
"field": "core.performance.expected_lifetime_years",
"reason": "not_whole_number",
"severity": "warning"
},
{ "product_index": 7, "code": "gtin_in_use", "severity": "error" }
],
"more_issues": false
}

More than 100 products: 202 { "id": "…", "status": "validating" }. Follow it with GET /v1/imports/{id} until the status is validated.

Warnings and errors:

  • A warning (value_left_out) means 1 value is left out and the rest of the product comes in. reason says why: not_whole_number, wrong_type, bad_date, not_in_list or unknown_field.
  • An error means the product won’t come in. Fix it, add it again in a new import, or commit the rest without it.
  • Codes for identifiers: gtin_in_use (another product in your workspace holds this GTIN), gtin_duplicate_in_import (2 new products in this import share a GTIN; the 2nd is refused), sku_in_use and identifier_in_use (found at commit).

How values are read:

Field typeAccepted
Whole number5, "5", "5.0", "5 years", or the unit’s code ("5 ANN"). "5.5" is left out.
Number, percentageA number, with the field’s unit or % (percentages). No range is enforced.
Date2026-10-17, or a date and time (the date is kept as written).
ListA listed value, in any case. Countries and regions: the code (GB) or the full name (United Kingdom); the code is stored.
Multi-value listEach item as above. If any item fails, the whole field is left out and the items listed.

POST /v1/imports/{id}/commit

Brings in every ready product. The import must have been checked (409 otherwise).

{ "id": "6f1c…", "status": "committed", "committed": 98, "skipped": 0, "errors": 1, "warnings": 1 }

More than 100 products: 202 { "id": "…", "status": "committing" }, then follow with GET /v1/imports/{id}. Committing runs as your key: if the key is revoked or the workspace is suspended, it stops.

GET /v1/imports/{id}

{
"id": "6f1c…",
"status": "committing",
"source": "API",
"reason": null,
"created_at": "2026-11-12T10:00:00Z",
"updated_at": "2026-11-12T10:02:00Z",
"counts": { "products": 1200, "pending": 400, "committed": 800, "skipped": 0, "errors": 0 },
"issues": [],
"next_cursor": null
}

Issues come 100 products at a time: pass ?cursor=<next_cursor> for the next page.

StatusMeaning
draftTaking products; not checked yet.
validatingBeing checked in the background.
validatedChecked; ready to commit.
committingBeing committed in the background.
committedDone.
failedStopped; reason says why. Check it again to retry the products still pending.
cancelledDiscarded.

DELETE /v1/imports/{id}

Discards an import nothing has been committed from (204). An import with committed products can’t be discarded (409).


Errors

Errors are application/problem+json with title, status, detail and request_id (also in the X-Request-Id header; quote it to support). Another workspace’s import is always 404.