Channels

A channel is the connection between Fenicia and a place where you sell: a Shopify store, a MercadoLibre account, an Amazon seller. Fenicia stores that account's credentials and, from then on, imports orders, publishes products and syncs inventory against the marketplace on your behalf.

That phrase — "on your behalf" — governs the design of this whole API, and explains its two least obvious rules:

The channel object

{
  "id": "65f3a1b2c4d5e6f7a8b9c0d1",
  "tenantId": "65f2a0b1c4d5e6f7a8b9c0aa",
  "name": "Mi tienda Shopify",
  "handle": "mi-tienda-shopify",
  "type": "shopify",
  "status": "active",
  "settings": {
    "locationId": "65f2a0b1c4d5e6f7a8b9c0bb",
    "imports": {
      "orders": { "enabled": true, "createCustomers": true },
      "products": { "syncMode": "bind" }
    }
  },
  "health": {
    "lastSuccessfulCallAt": "2026-08-19T03:12:44.000Z",
    "consecutiveAuthFailures": 0,
    "refreshTokenInvalid": false
  },
  "lastActivity": {
    "lastSyncAt": "2026-08-19T03:12:44.000Z",
    "lastSyncStatus": "success"
  },
  "store": {
    "plan": "shopify_plus",
    "countryCode": "MX",
    "currencyCode": "MXN",
    "enabledPresentmentCurrencies": ["MXN", "USD"]
  },
  "paymentGateways": [
    { "name": "shopify_payments", "percentageFee": 2.9, "fixedFee": 3, "currency": "MXN", "isEstimated": false },
    { "name": "paypal", "percentageFee": 3.95, "fixedFee": 4, "currency": "MXN", "isEstimated": true }
  ],
  "createdAt": "2026-06-02T18:40:01.000Z",
  "updatedAt": "2026-08-19T03:12:44.000Z"
}
idstring

24-character ObjectId. Fenicia assigns it when the channel is created; it is the channelId you use in every other route. Do NOT send it in the body of POST /channels: setup is not where an identifier gets chosen. To modify an existing channel, use PUT /channels/{channelId}.

namestring

Display name of the channel. You choose it; it does not have to match the store name on the marketplace.

handlestring

Readable identifier derived from the name. Not unique on its own: uniqueness is per tenant.

typeenum

Which marketplace this is. Determines the shape of the credentials and which integration requests are routed to, and CANNOT be changed afterwards: a Shopify channel does not become an Amazon one. Values creatable through POST /channels: shopify, mercado-libre, walmart, coppel, claro-shop, woo-commerce, t1-comercios, sears, sanborns, tienda-nube. amazon and shein are valid platform types with working reads, but their setup does not exist yet: they return 422.

statusenum

Connection state. One of: active (operating), inactive (turned off by you), error (authentication failure observed by Fenicia), locked (blocked by the system). The last two are determined by Fenicia from what it observes; the ones that are yours are active and inactive.

settingsobject

Channel configuration: inventory location, preparation times, and the imports sub-tree that controls what is pulled from the marketplace. This is where everything you configure lives.

settings.locationIdstring

Fenicia location where this channel's orders land and its inventory comes from.

settings.importsobject

Which inbound flows are on.

settings.imports.ordersobject

Order import from the channel.

settings.imports.orders.enabledboolean

Turns on order ingestion from the channel.

settings.imports.orders.createCustomersboolean

Creates customer records for new buyers when importing an order.

settings.imports.productsobject

Product import and synchronization.

settings.imports.products.syncModeenum

What the integration does with the channel's products on connect. Accepted values: none (neither pull nor push), bind (link Fenicia products to channel SKUs, without importing the catalog), import (pull the channel's catalog into Fenicia).

settings.imports.products.importExistingCatalogboolean

Pulls the channel's catalog on connect.

settings.imports.products.overrideIfExistboolean

When importing, overwrites Fenicia products that match by SKU.

settings.imports.inventoryobject

Inventory mirroring.

settings.imports.inventory.enabledboolean

Mirrors inventory changes that happen on the channel into Fenicia.

healthobject

Authentication telemetry. Fenicia writes it after EVERY call to the marketplace; it is read-only. This is what you check to know whether a channel needs reconnecting.

health.lastSuccessfulCallAtstring

ISO 8601 timestamp of the last successful call to the marketplace.

health.lastAuthErrorKindenum

Nature of the last authentication failure. One of: invalid_creds, token_expired, rate_limited, unknown.

health.consecutiveAuthFailuresnumber

Back-to-back authentication failures. Resets to 0 as soon as one call succeeds.

health.lastAuthErrorAtstring

ISO 8601 timestamp of the last authentication failure. Compared against lastSuccessfulCallAt it tells you whether the problem is current or already resolved itself.

health.tokenExpiresAtstring

ISO 8601 timestamp of when the current token expires. Fenicia renews it on its own while the refresh token is alive; it is for anticipating, not for acting.

health.refreshTokenInvalidboolean

When true, the refresh token is dead and NO operation will work until the merchant reconnects. This is the actionable signal, not consecutiveAuthFailures.

lastActivityobject

Sync telemetry, also read-only.

lastActivity.lastSyncAtstring

ISO 8601 timestamp of the last synchronization, successful or not.

lastActivity.lastSyncStatusenum

Outcome of the last synchronization. One of: success, partial, failed.

lastActivity.lastInboundEventAtstring

ISO 8601 timestamp of the last event received from the channel (webhook).

storeobject

Shopify channels only. Store data Fenicia read from Shopify itself. Refreshed by POST /channels/{channelId}/shopify/refresh-store-info; you do not write it.

store.planstring

The plan contracted with Shopify, named the way Shopify names it. For example shopify_plus.

store.countryCodestring

The store's country, ISO 3166-1 alpha-2.

store.currencyCodestring

The currency the store settles in, ISO 4217.

store.enabledPresentmentCurrenciesstring[]

Currencies the store can display prices in. May include several beyond currencyCode; an order placed in one of them is charged in that currency and settled in the store's.

paymentGatewaysarray

Shopify channels only. Each payment gateway's fee, so an order's margin is computed with the real figure. Written through their own route: PUT /channels/{channelId}/shopify/payment-gateways.

paymentGateways.namestring

The gateway's identifier as Shopify names it. For example shopify_payments or paypal.

paymentGateways.percentageFeenumber

The percentage the gateway charges on the total. 2.9 means 2.9%, not 0.029.

paymentGateways.fixedFeenumber

Flat per-transaction charge, in the currency given by currency.

paymentGateways.currencystring

Currency of fixedFee, ISO 4217. Defaults to MXN.

paymentGateways.isEstimatedboolean

true if Fenicia inferred the figure from Shopify's published rates; false if the merchant typed it. See below for why it matters.

Credentials are not readable

A channel's credentials are handed over once, when it is created. From then on no API read returns them: neither GET /channels nor GET /channels/{channelId} includes the field. Fenicia resolves them internally on every call to the marketplace.

This is a deliberate guarantee. Access to a merchant's sales channels — their tokens, their API keys, their portal passwords — does not travel in HTTP responses, and does not end up in client logs, network traces or support screenshots.

To replace them, the channel is reconnected through the marketplace's authorization flow: that is the only write door.

`GET /channels` returns fewer fields than `GET /channels/{channelId}`

The list returns id, name, handle, type and status. It does not include settings, health or lastActivity; for those you have to fetch each channel's detail.

Status and health are two different things

They are two different fields and they look alike enough to be confused: status is a declaration — someone said the channel should be this way — and health is a measurement — what happened on the last call to the marketplace. A channel can sit at active and have been unable to authenticate for hours.

You want to know…Read it from
Whether the merchant turned the channel off on purposestatus === "inactive"
Whether the channel is broken and needs reconnectinghealth.refreshTokenInvalid === true
Whether the channel is having intermittent troublehealth.consecutiveAuthFailures > 0 with a recent lastSuccessfulCallAt
Whether the channel simply has not been usedold lastActivity.lastSyncAt, clean health

status: "error" exists and Fenicia writes it when it detects an authentication failure, but do not write it yourself: the values that are yours are active and inactive. Declaring "this channel is in error" asserts a fact only Fenicia could have observed. You declare intent; Fenicia declares what happened.

Channel types, and the naming trap

The channel type and the URL segment are NOT always spelled the same

Two cases, and both bite:

  • Type mercado-libre (hyphenated) → routes /channels/{channelId}/**mercadolibre**/… (no hyphen)
  • Type t1-comercios → routes /channels/{channelId}/**t1**/…

Building the URL by interpolating channel.type works for Shopify, Amazon, Walmart, Shein and Coppel, and fails silently with a 404 for those two. Do not interpolate the type: map it.

These are the eight types you connect from this API with your own credentials:

walmart · coppel · woo-commerce · t1-comercios · sears · sanborns · claro-shop · shopify

Shopify also has a second route — the install intent — where you never touch a credential.

The other real platform types are not created here, each for its own reason:

  • mercado-libre and tienda-nube — their setup accepts only an authorization code from Fenicia's application, so they are connected from the portal. Once created you operate them through this API as usual.
  • tiktok-shop — completes its setup through its own OAuth callback. Sending it here returns 400 bad-request/invalid-channel-type.
  • amazon and shein — their reads work, but the setup token exchange is not built yet. They do appear in typesSupported, which returns twelve values, and setup still fails.

The detail for each is in Connect a channel.

Async jobs

Almost anything you ask a marketplace for takes longer than an HTTP request will tolerate: syncing inventory, linking catalogs, publishing products. Fenicia responds with a job and you poll its progress.

Authentication and permissions

Every route requires an API key in the header:

curl https://api.fenicia.io/channels \
  -H "Authorization: Bearer fkapi_tu_api_key"
PermissionCovers
channels:readEvery read: list, detail, settings, job status, categories
channels:createPOST /channels
channels:updateEditing the channel, its settings, reconnecting, and marketplace-specific operations
channels:deleteDeleting a channel, and querying the deletion impact
channels:syncEverything that moves data: import, export, sync, and cancelling jobs
products:updateBatch attribute resolution and manual attribute saving

Every route is scoped to your tenant. Requesting a channel from another one returns 403 with code Unauthorized.

Response shape

Channels does NOT use the Orders `data` envelope

If you are coming from the Orders API, take note: there, everything is wrapped in { "data": … }. Channels has no envelope. Responses are the object itself, or a named key:

  • GET /channels → { "channels": [ … ] }
  • GET /channels/{channelId} → the channel, at the root
  • POST /channels → { "channel": { … } }

Errors are flat too: { "code": "…", "message": "…" }, not { "error": { … } }. Smoothing this over in the documentation would be a lie; a client written assuming uniformity breaks.

Next steps

  • Connect a channel — setup, reconnection, and why there is no credentials endpoint.
  • Errors — the domain's full code catalog.