Integration API for connecting Celerp ERP to external commerce and business platforms, managing connector credentials, and running data synchronization.
Generated from the Celerp 2.9.0 OpenAPI schema, .
POST/connector-items/{connector_name}/sync
Set Item Sync
Turn product synchronization on or off for selected items on one connected channel.
Parameters
Name
In
Required
Type
Description
connector_name
path
yes
string
Connector name identifying the external integration.
Request body
Field
Type
Required
Description
entity_ids
array of string
yes
Entity Ids
action
string
yes
Action
confirm_link
object
--
Confirm Link
Responses
Status
Description
Body
200
Returns the number of items updated and any items that could not be changed, with the reason.
object
422
The request failed validation. The response lists each invalid field and why.
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
Name
In
Required
Type
Description
connector_name
path
yes
string
Connector name identifying the external integration.
force
query
--
boolean
Disconnect even when the store's webhooks cannot be confirmed removed.
Responses
Status
Description
Body
200
Returns `ok: true` when the connector is disconnected, or `ok: false` with an error code and detail when it could not be.
object
422
The request failed validation. The response lists each invalid field and why.
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
Name
In
Required
Type
Description
connector_name
path
yes
string
Connector name identifying the external integration.
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
Name
In
Required
Type
Description
connector_name
path
yes
string
Connector name identifying the external integration.
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
Name
In
Required
Type
Description
connector_name
path
yes
string
Connector name identifying the external integration.
orders_from
query
--
string, optional
Preview orders created on or after this date (YYYY-MM-DD). Today when not given.
Responses
Status
Description
Body
200
Successful Response
object
422
Validation Error
HTTPValidationError
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
Name
In
Required
Type
Description
connector_name
path
yes
string
Connector name identifying the external integration.
Responses
Status
Description
Body
200
Successful Response
object
422
Validation Error
HTTPValidationError
Example
curl -X POST http://localhost:8000/connectors/:connector_name/first-sync/retry \
-H "Authorization: Bearer $TOKEN"
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
Name
In
Required
Type
Description
connector_name
path
yes
string
Connector name identifying the external integration.
Responses
Status
Description
Body
200
Successful Response
object
422
Validation Error
HTTPValidationError
Example
curl -X GET http://localhost:8000/connectors/:connector_name/first-sync/summary \
-H "Authorization: Bearer $TOKEN"
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
Name
In
Required
Type
Description
connector_name
path
yes
string
Connector name identifying the external integration.
Responses
Status
Description
Body
200
Successful Response
object
422
Validation Error
HTTPValidationError
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
Name
In
Required
Type
Description
connector_name
path
yes
string
Connector name identifying the external integration.
Responses
Status
Description
Body
200
Successful Response
object
422
Validation Error
HTTPValidationError
Example
curl -X POST http://localhost:8000/connectors/:connector_name/outbound/retry \
-H "Authorization: Bearer $TOKEN"
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
Name
In
Required
Type
Description
connector_name
path
yes
string
Connector name identifying the external integration.
record_id
path
yes
string
Attention record id of the product whose conflicting store edit is being resolved.
Start a synchronization run for a connected channel.
Parameters
Name
In
Required
Type
Description
connector_name
path
yes
string
Connector name identifying the external integration.
Responses
Status
Description
Body
200
Returns `ok: true` once the run is started.
object
422
The 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
Name
In
Required
Type
Description
connector_name
path
yes
string
Connector name identifying the external integration.
force
query
--
boolean
Disconnect even when the store's webhooks cannot be confirmed removed.
Responses
Status
Description
Body
200
Returns `ok: true` when the connector is disconnected, or `ok: false` with an error code and detail when it could not be.
object
422
The request failed validation. The response lists each invalid field and why.