REST API

Connectors API

Integration API for connecting Celerp ERP to external commerce and business platforms, managing connector credentials, and running data synchronization.

Generated from the Celerp 2.8.0 OpenAPI schema, 2 November 2026.

POST /connector-items/{connector_name}/sync

Set Item Sync

Turn product synchronization on or off for selected items on one connected channel.

Parameters

NameInRequiredTypeDescription
connector_namepathyesstringConnector name identifying the external integration.

Request body

FieldTypeRequiredDescription
entity_idsarray of stringyesEntity Ids
actionstringyesAction
confirm_linkobject--Confirm Link

Responses

StatusDescriptionBody
200Returns the number of items updated and any items that could not be changed, with the reason.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/connector-items/:connector_name/sync \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /connector-media/{token}

Connector Media

One product image a sync sent a store, while its token is valid. HEAD answers from the file's size without reading it.

Parameters

NameInRequiredTypeDescription
tokenpathyesstringSigned, short-lived media token naming one product image being sent to a store.

Responses

StatusDescriptionBody
200Successful Response--
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/connector-media/:token \
  -H "Authorization: Bearer $TOKEN"

GET /connectors/

List External Connectors

List the external connectors available to this Celerp installation and their current connection state.

Responses

StatusDescriptionBody
200Returns the requested external connectors.array of ConnectorInfo

Example

curl -X GET http://localhost:8000/connectors/ \
  -H "Authorization: Bearer $TOKEN"

POST /connectors/woocommerce/orders/{order_id}/reconciled

Mark Order Reconciled

Mark a changed WooCommerce order as reconciled by hand. The import leaves the order alone until it changes in WooCommerce again.

Parameters

NameInRequiredTypeDescription
order_idpathyesstringWooCommerce order ID.

Request body

FieldTypeRequiredDescription
signaturestringyesSignature

Responses

StatusDescriptionBody
200Returns the updated reconciliation entry.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/connectors/woocommerce/orders/:order_id/reconciled \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

DELETE /connectors/woocommerce/orders/{order_id}/reconciled

Unmark Order Reconciled

Remove the reconciled mark, so the order is flagged for reconciliation again.

Parameters

NameInRequiredTypeDescription
order_idpathyesstringWooCommerce order ID.

Responses

StatusDescriptionBody
200Returns the updated reconciliation entry.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X DELETE http://localhost:8000/connectors/woocommerce/orders/:order_id/reconciled \
  -H "Authorization: Bearer $TOKEN"

POST /connectors/{connector_name}/credentials

Save Connector Credentials

Validate and save credentials for the selected external integration, then return whether the connector was successfully connected.

Parameters

NameInRequiredTypeDescription
connector_namepathyesstringConnector name identifying the external integration.

Request body

FieldTypeRequiredDescription
consumer_keystringyesConnector consumer or API key supplied for the external store.
consumer_secretstringyesConnector consumer or API secret supplied for the external store.
store_urlstring, optional--Base URL of the external store or service.

Responses

StatusDescriptionBody
200Returns `ok: true` when the connection works, or `ok: false` with an error code and detail explaining why it failed.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/connectors/:connector_name/credentials \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

DELETE /connectors/{connector_name}/credentials

Disconnect External Connector

Disconnect a connector and clear its local sync state. Records it already imported are kept. Pass `force` to disconnect even when the store's webhooks cannot be confirmed removed.

Parameters

NameInRequiredTypeDescription
connector_namepathyesstringConnector name identifying the external integration.
forcequery--booleanDisconnect even when the store's webhooks cannot be confirmed removed.

Responses

StatusDescriptionBody
200Returns `ok: true` when the connector is disconnected, or `ok: false` with an error code and detail when it could not be.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X DELETE http://localhost:8000/connectors/:connector_name/credentials \
  -H "Authorization: Bearer $TOKEN"

POST /connectors/{connector_name}/directions

Set Connector Direction

Set the direction one kind of record syncs in, under the company lock and the connection's row lock taken after the ownership fence. A direction the connector cannot sync that record in is refused, naming both. A store whose webhooks follow the directions has them marked for reconciling; the execution holding the webhooks changes them, never this request.

Parameters

NameInRequiredTypeDescription
connector_namepathyesstringConnector name identifying the external integration.

Request body

FieldTypeRequiredDescription
entitystringyesEntity
directionstringyesDirection

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/connectors/:connector_name/directions \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /connectors/{connector_name}/first-sync

Start First Sync

Start a connection's first sync with the choices reviewed on its preview: the directions, the earliest order date and how SKU matches link. The preview is read again, outside every lock, with those choices; when it is no longer the version the person reviewed (the store, the catalog or the connection changed since), Start is refused and the page shows the preview again. It runs once, in the background, and only on the store products the person reviewed: it first sets up the store's webhooks, and when the store refuses, the first sync needs attention with the store's reason.

Parameters

NameInRequiredTypeDescription
connector_namepathyesstringConnector name identifying the external integration.

Request body

FieldTypeRequiredDescription
directionsobjectyesDirections
matchstringyesMatch
orders_fromstring, optional--Orders From
preview_versionstring--Preview Version

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/connectors/:connector_name/first-sync \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /connectors/{connector_name}/first-sync/preview

Preview First Sync

What starting the first sync in the connection's current directions would do, importing orders from ``orders_from`` (the company's today when not given). Reads both sides and writes to neither.

Parameters

NameInRequiredTypeDescription
connector_namepathyesstringConnector name identifying the external integration.
orders_fromquery--string, optionalPreview orders created on or after this date (YYYY-MM-DD). Today when not given.

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/connectors/:connector_name/first-sync/preview \
  -H "Authorization: Bearer $TOKEN"

POST /connectors/{connector_name}/first-sync/retry

Retry First Sync

Start a first sync that needs attention again, with the choices, import batch and order cutoff it started with; it runs only what did not complete.

Parameters

NameInRequiredTypeDescription
connector_namepathyesstringConnector name identifying the external integration.

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/connectors/:connector_name/first-sync/retry \
  -H "Authorization: Bearer $TOKEN"

GET /connectors/{connector_name}/first-sync/summary

First Sync Summary

What the first sync did and how to undo it: its state (with the reason when it needs attention), the import of the products it created, each link it made (with its undo's outcome and what that undo kept), and the invoices whose creation names it (first_sync_metadata), newest first. Invoices are voided one by one, which keeps their audit trail.

Parameters

NameInRequiredTypeDescription
connector_namepathyesstringConnector name identifying the external integration.

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X GET http://localhost:8000/connectors/:connector_name/first-sync/summary \
  -H "Authorization: Bearer $TOKEN"

POST /connectors/{connector_name}/first-sync/undo-links

Undo First Sync Links

Undo the links the first sync made to items Celerp already had, as far as each is still the first sync's (celerp_inventory.services.undo_external_link): a value or file changed since, or a link the item no longer holds, is kept and listed in ``kept``. Each link's outcome is saved on the undo record in the same transaction, so a failed undo changes nothing and its repeat settles only the links still open. The items the first sync created are undone in Import History.

Parameters

NameInRequiredTypeDescription
connector_namepathyesstringConnector name identifying the external integration.

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/connectors/:connector_name/first-sync/undo-links \
  -H "Authorization: Bearer $TOKEN"

POST /connectors/{connector_name}/outbound/retry

Retry Outbound

Try the changes waiting to be sent to the store now: every wait of the connection's deferred work ends (execution.resume_reruns), and the queue sends them at its next pass.

Parameters

NameInRequiredTypeDescription
connector_namepathyesstringConnector name identifying the external integration.

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/connectors/:connector_name/outbound/retry \
  -H "Authorization: Bearer $TOKEN"

POST /connectors/{connector_name}/products/{record_id}/resolve

Resolve Product Conflict

A person chose between the two values of a product field changed in both systems. Either way the link now agrees on the store's value, so a later pull leaves the field alone; keeping Celerp's value sends it out at the next sync when products go out. Taking the store's is an ordinary item edit, undone by editing the item back.

Parameters

NameInRequiredTypeDescription
connector_namepathyesstringConnector name identifying the external integration.
record_idpathyesstringAttention record id of the product whose conflicting store edit is being resolved.

Request body

FieldTypeRequiredDescription
keepstringyesKeep

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

curl -X POST http://localhost:8000/connectors/:connector_name/products/:record_id/resolve \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /connectors/{connector_name}/sync

Sync External Connector

Run a synchronization operation for the selected external connector.

Parameters

NameInRequiredTypeDescription
connector_namepathyesstringConnector name identifying the external integration.

Request body

FieldTypeRequiredDescription
entitySyncEntityyesConnector entity or data domain to synchronize.

Responses

StatusDescriptionBody
200Returns how many records were created, updated, skipped or failed during the sync.SyncResponse
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/connectors/:connector_name/sync \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

POST /connectors/{connector_name}/sync-plan

Sync Connector Plan

Start a synchronization run for a connected channel.

Parameters

NameInRequiredTypeDescription
connector_namepathyesstringConnector name identifying the external integration.

Responses

StatusDescriptionBody
200Returns `ok: true` once the run is started.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/connectors/:connector_name/sync-plan \
  -H "Authorization: Bearer $TOKEN"

DELETE /connectors/{connector_name}/unassigned

Reset Unassigned Connector

Disconnect a connector that was set up before each company had its own connectors. No company becomes its owner; the company that should use it connects it again afterwards.

Parameters

NameInRequiredTypeDescription
connector_namepathyesstringConnector name identifying the external integration.
forcequery--booleanDisconnect even when the store's webhooks cannot be confirmed removed.

Responses

StatusDescriptionBody
200Returns `ok: true` when the connector is disconnected, or `ok: false` with an error code and detail when it could not be.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X DELETE http://localhost:8000/connectors/:connector_name/unassigned \
  -H "Authorization: Bearer $TOKEN"