Connections

Synchronization state

Shows how each Connection resource is kept current.

GET
/v1/connections/{id}/sync-state

Returns one entry per synchronized resource. Today there is only listings. It is a safe technical view: it never contains tokens, credentials or raw marketplace responses. Use it to tell whether a Connection is up to date and when the next check happens.

A resource the marketplace neither notifies nor lets us enumerate has no entry. On Mercado Livre, listings has no entry until its listing read exists.

Mode

  • push: the marketplace notifies changes.
  • poll: marketapi enumerates the resource periodically.
  • hybrid: both. The mock adapter is hybrid.

Automatic reconciliation

Every 6 hours, for each active Connection, marketapi enumerates the listings at the marketplace and updates observed on the ones that already exist locally, using the same rule as the inbound notification. The listing.external_changed event is emitted only when the observed state changed.

  • A listing with no local record is not imported. It counts in unknownExternalCount. To bring it in, use import listings.
  • If a pass fails, lastError holds a safe message and the next pass follows the normal schedule. If the marketplace says the seller's access has ended, the Connection is deactivated, as with any other call.
  • With syncPolicy.inbound.mode = disabled, the listing does not change, and listing.external_changed is sent with behavior: observed_only on every pass while the marketplace differs from the stored observed. To store what is out there and stop the notice, import or reconcile.
  • An import or reconciliation you requested that finishes sets lastFullSyncAt and pushes nextReconciliationAt back 6 hours.
  • It is an internal job: it does not appear in /v1/jobs and emits no job.* events.

Connecting and reconnecting

Connecting or reconnecting sets nextReconciliationAt to "now". The first pass recovers what changed while the Connection was revoked.

A notification that arrives while the Connection is inactive is not applied: its time is kept in deferredInboundAt. Compare it with lastFullSyncAt to see whether reconciliation has recovered it.

lastInboundAt is the last notification for the resource received while the Connection was active.

Caveats

  • checkpoint is opaque and changes per marketplace. Do not parse it.
  • To know whether a specific request succeeded, the record is the Job returned by import or reconcile. For an offer's state, read the Listing and its observed.

Authorization

api_key
headerAuthorizationBearer <token>

API key (mk_...)

Path Parameters

id*string

Identifier of the resource, as returned by the API.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

One entry per synchronized resource: mode, last complete pass, last notification and next periodic reconciliation. No credentials and no raw marketplace responses.

application/json
  1. response

How each resource type of this connection is kept current. Technical state: no credentials and no raw marketplace responses.

connectionId*string

The connection this state belongs to.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
resources*

One entry per resource type this connection synchronizes. A resource the marketplace neither notifies nor lets us enumerate has no entry.

curl -X GET "https://example.com/v1/connections/3d1c8a52-7f0e-4b0a-8a65-9c1b2f6d7e01/sync-state"
{  "connectionId": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",  "resources": {    "listings": {      "mode": "hybrid",      "lastFullSyncAt": "2026-10-12T06:00:00.000Z",      "checkpoint": "2026-10-12T05:58:41.000Z",      "lastInboundAt": "2026-10-12T09:14:03.000Z",      "deferredInboundAt": null,      "nextReconciliationAt": "2026-10-12T12:00:00.000Z",      "lastError": null,      "unknownExternalCount": 2    },    "orders": {      "mode": "hybrid",      "lastFullSyncAt": "2026-10-12T06:00:00.000Z",      "checkpoint": "2026-10-12T05:58:41.000Z",      "lastInboundAt": "2026-10-12T09:14:03.000Z",      "deferredInboundAt": null,      "nextReconciliationAt": "2026-10-12T12:00:00.000Z",      "lastError": null,      "unknownExternalCount": 2    }  }}