Integrations

Connections with other systems, such as Bsale, and the synchronization of their data.

Create a connection

POSThttps://api.drometra.com/v1/integrations/connections

Requires the access token of a person in your company.

Headers

x-tenant-idmandatorystring · uuid
Your company's identifier. The server checks that you are still an active member of it.

Response · 201

  • idstring · uuidalways
  • tenantIdstring · uuidalways
  • namestringalways
  • environmentenum: sandbox | productionalways
  • providerKindenum: sandbox-v1 | bsale-chile-v1always
  • instanceKeystring o nullalways
  • capabilitiesarray de enum: catalog.import | stock.import | crm.customers.import | invoices.issue | invoices.query_by_correlation | invoices.idempotent_issuealways
  • activebooleanalways
  • versionintegeralways
  • createdAtstring · date-timealways
  • updatedAtstring · date-timealways
  • needsReconnectboolean

It can respond with error 400, 401, 403, 404, 409, 410, 413, 415, 422, 429, 503. The error body is explained in Concepts.

request
curl -X POST "https://api.drometra.com/v1/integrations/connections" \
  -H "Authorization: Bearer $DROMETRA _ TOKEN"\
  -H "x-tenant-id: $DROMETRA_TENANT" \
  -H "Content-Type: application/json" \ -d '{}'
response · 201
{
  "id": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "tenantId": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "name": "…",
  "environment": "sandbox",
  "providerKind": "sandbox-v1",
  "instanceKey": "…",
  "capabilities": [
    "catalog.import"
  ],
  "active": true,
  "version": 1,
  "createdAt": "2026-10-21T14:02:31Z",
  "updatedAt": "2026-10-21T14:02:31Z",
  "needsReconnect": true
}

List connections

GEThttps://api.drometra.com/v1/integrations/connections

Requires the access token of a person in your company.

Headers

x-tenant-idmandatorystring · uuid
Your company's identifier. The server checks that you are still an active member of it.

Response · 200

  • idstring · uuidalways
  • tenantIdstring · uuidalways
  • namestringalways
  • environmentenum: sandbox | productionalways
  • providerKindenum: sandbox-v1 | bsale-chile-v1always
  • instanceKeystring o nullalways
  • capabilitiesarray de enum: catalog.import | stock.import | crm.customers.import | invoices.issue | invoices.query_by_correlation | invoices.idempotent_issuealways
  • activebooleanalways
  • versionintegeralways
  • createdAtstring · date-timealways
  • updatedAtstring · date-timealways
  • needsReconnectboolean

It can respond with error 400, 401, 403, 404, 409, 410, 413, 415, 422, 429, 503. The error body is explained in Concepts.

request
curl -X GET "https://api.drometra.com/v1/integrations/connections" \
  -H "Authorization: Bearer $DROMETRA _ TOKEN"\
  -H "x-tenant-id: $DROMETRA_TENANT" \
  -H "Accept: application / json"
response · 200
[
  {
    "id": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
    "tenantId": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
    "name": "…",
    "environment": "sandbox",
    "providerKind": "sandbox-v1",
    "instanceKey": "…",
    "capabilities": [
      "catalog.import"
    ],
    "active": true,
    "version": 1,
    "createdAt": "2026-10-21T14:02:31Z",
    "updatedAt": "2026-10-21T14:02:31Z",
    "needsReconnect": true
  }
]

Update a connection

PATCHhttps://api.drometra.com/v1/integrations/connections/{id}

Requires the access token of a person in your company.

Headers

x-tenant-idmandatorystring · uuid
Your company's identifier. The server checks that you are still an active member of it.

Road parameters

idmandatorystring · uuid
e. g. 0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d

Body

versionmandatoryinteger
activemandatoryboolean

Response · 200

  • idstring · uuidalways
  • tenantIdstring · uuidalways
  • namestringalways
  • environmentenum: sandbox | productionalways
  • providerKindenum: sandbox-v1 | bsale-chile-v1always
  • instanceKeystring o nullalways
  • capabilitiesarray de enum: catalog.import | stock.import | crm.customers.import | invoices.issue | invoices.query_by_correlation | invoices.idempotent_issuealways
  • activebooleanalways
  • versionintegeralways
  • createdAtstring · date-timealways
  • updatedAtstring · date-timealways
  • needsReconnectboolean

It can respond with error 400, 401, 403, 404, 409, 410, 413, 415, 422, 429, 503. The error body is explained in Concepts.

request
curl -X PATCH "https://api.drometra.com/v1/integrations/connections/0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d" \
  -H "Authorization: Bearer $DROMETRA _ TOKEN"\
  -H "x-tenant-id: $DROMETRA_TENANT" \
  -H "Content-Type: application/json" \ -d '{
    "version": 0,
    "active": true
  }'
response · 200
{
  "id": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "tenantId": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "name": "…",
  "environment": "sandbox",
  "providerKind": "sandbox-v1",
  "instanceKey": "…",
  "capabilities": [
    "catalog.import"
  ],
  "active": true,
  "version": 1,
  "createdAt": "2026-10-21T14:02:31Z",
  "updatedAt": "2026-10-21T14:02:31Z",
  "needsReconnect": true
}

Get Bsale issuing options

GEThttps://api.drometra.com/v1/integrations/connections/{id}/bsale/issue-options

Requires the access token of a person in your company.

Headers

x-tenant-idmandatorystring · uuid
Your company's identifier. The server checks that you are still an active member of it.

Road parameters

idmandatorystring · uuid
e. g. 0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d

Response · 200

  • array de objectalways
  • array de objectalways
  • array de objectalways
  • object o nullalways

It can respond with error 400, 401, 403, 404, 409, 410, 413, 415, 422, 429, 503. The error body is explained in Concepts.

request
curl -X GET "https://api.drometra.com/v1/integrations/connections/0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d/bsale/issue-options" \
  -H "Authorization: Bearer $DROMETRA _ TOKEN"\
  -H "x-tenant-id: $DROMETRA_TENANT" \
  -H "Accept: application / json"
response · 200
{
  "offices": [
    {
      "id": "…",
      "name": "…"
    }
  ],
  "taxes": [
    {
      "id": "…",
      "name": "…",
      "percentage": 0,
      "code": "…"
    }
  ],
  "documentTypes": [
    {
      "id": "…",
      "name": "…",
      "codeSii": "…"
    }
  ],
  "current": {
    "officeId": "…",
    "vatTaxId": "…",
    "documentTypeIds": {
      "receipt": "…",
      "invoice": "…",
      "creditNote": "…"
    },
    "dispatchStock": true
  }
}

Save Bsale issuing settings

PUThttps://api.drometra.com/v1/integrations/connections/{id}/bsale/issue-settings

Requires the access token of a person in your company.

Headers

x-tenant-idmandatorystring · uuid
Your company's identifier. The server checks that you are still an active member of it.

Road parameters

idmandatorystring · uuid
e. g. 0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d

Body

versionmandatoryinteger
officeIdmandatorystring
vatTaxIdmandatorystring
documentTypeIdsmandatoryobject
dispatchStockboolean

Response · 200

  • idstring · uuidalways
  • tenantIdstring · uuidalways
  • namestringalways
  • environmentenum: sandbox | productionalways
  • providerKindenum: sandbox-v1 | bsale-chile-v1always
  • instanceKeystring o nullalways
  • capabilitiesarray de enum: catalog.import | stock.import | crm.customers.import | invoices.issue | invoices.query_by_correlation | invoices.idempotent_issuealways
  • activebooleanalways
  • versionintegeralways
  • createdAtstring · date-timealways
  • updatedAtstring · date-timealways
  • needsReconnectboolean

It can respond with error 400, 401, 403, 404, 409, 410, 413, 415, 422, 429, 503. The error body is explained in Concepts.

request
curl -X PUT "https://api.drometra.com/v1/integrations/connections/0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d/bsale/issue-settings" \
  -H "Authorization: Bearer $DROMETRA _ TOKEN"\
  -H "x-tenant-id: $DROMETRA_TENANT" \
  -H "Content-Type: application/json" \ -d '{
    "version": 0,
    "officeId": "…",
    "vatTaxId": "…",
    "documentTypeIds": {}
  }'
response · 200
{
  "id": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "tenantId": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "name": "…",
  "environment": "sandbox",
  "providerKind": "sandbox-v1",
  "instanceKey": "…",
  "capabilities": [
    "catalog.import"
  ],
  "active": true,
  "version": 1,
  "createdAt": "2026-10-21T14:02:31Z",
  "updatedAt": "2026-10-21T14:02:31Z",
  "needsReconnect": true
}

Disconnect an integration

POSThttps://api.drometra.com/v1/integrations/connections/{id}/disconnect

Requires the access token of a person in your company.

Headers

x-tenant-idmandatorystring · uuid
Your company's identifier. The server checks that you are still an active member of it.

Road parameters

idmandatorystring · uuid
e. g. 0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d

Body

versionmandatoryinteger

Response · 200

  • idstring · uuidalways
  • tenantIdstring · uuidalways
  • namestringalways
  • environmentenum: sandbox | productionalways
  • providerKindenum: sandbox-v1 | bsale-chile-v1always
  • instanceKeystring o nullalways
  • capabilitiesarray de enum: catalog.import | stock.import | crm.customers.import | invoices.issue | invoices.query_by_correlation | invoices.idempotent_issuealways
  • activebooleanalways
  • versionintegeralways
  • createdAtstring · date-timealways
  • updatedAtstring · date-timealways
  • needsReconnectboolean

It can respond with error 400, 401, 403, 404, 409, 410, 413, 415, 422, 429, 503. The error body is explained in Concepts.

request
curl -X POST "https://api.drometra.com/v1/integrations/connections/0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d/disconnect" \
  -H "Authorization: Bearer $DROMETRA _ TOKEN"\
  -H "x-tenant-id: $DROMETRA_TENANT" \
  -H "Content-Type: application/json" \ -d '{
    "version": 0
  }'
response · 200
{
  "id": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "tenantId": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "name": "…",
  "environment": "sandbox",
  "providerKind": "sandbox-v1",
  "instanceKey": "…",
  "capabilities": [
    "catalog.import"
  ],
  "active": true,
  "version": 1,
  "createdAt": "2026-10-21T14:02:31Z",
  "updatedAt": "2026-10-21T14:02:31Z",
  "needsReconnect": true
}

Start the Bsale authorization

POSThttps://api.drometra.com/v1/integrations/bsale/authorizations

Requires the access token of a person in your company.

Headers

x-tenant-idmandatorystring · uuid
Your company's identifier. The server checks that you are still an active member of it.

Body

clientCodemandatorystring
namemandatorystring

Response · 201

  • idstring · uuidalways
  • clientCodestringalways
  • namestringalways
  • expiresAtstring · date-timealways
  • bindingSecretstringalways
  • authorizeUrlstring · urialways

It can respond with error 400, 401, 403, 404, 409, 410, 413, 415, 422, 429, 503. The error body is explained in Concepts.

request
curl -X POST "https://api.drometra.com/v1/integrations/bsale/authorizations" \
  -H "Authorization: Bearer $DROMETRA _ TOKEN"\
  -H "x-tenant-id: $DROMETRA_TENANT" \
  -H "Content-Type: application/json" \ -d '{
    "clientCode": "…",
    "name": "…"
  }'
response · 201
{
  "id": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "clientCode": "…",
  "name": "…",
  "expiresAt": "2026-10-21T14:02:31Z",
  "bindingSecret": "…",
  "authorizeUrl": "https://empresa.cl/webhooks/drometra"
}

Complete the Bsale authorization

POSThttps://api.drometra.com/v1/integrations/bsale/authorizations/{id}/complete

Requires the access token of a person in your company.

Headers

x-tenant-idmandatorystring · uuid
Your company's identifier. The server checks that you are still an active member of it.

Road parameters

idmandatorystring · uuid
e. g. 0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d

Body

codemandatorystring
bindingSecretmandatorystring

Response · 201

  • idstring · uuidalways
  • tenantIdstring · uuidalways
  • namestringalways
  • environmentenum: sandbox | productionalways
  • providerKindenum: sandbox-v1 | bsale-chile-v1always
  • instanceKeystring o nullalways
  • capabilitiesarray de enum: catalog.import | stock.import | crm.customers.import | invoices.issue | invoices.query_by_correlation | invoices.idempotent_issuealways
  • activebooleanalways
  • versionintegeralways
  • createdAtstring · date-timealways
  • updatedAtstring · date-timealways
  • needsReconnectboolean

It can respond with error 400, 401, 403, 404, 409, 410, 413, 415, 422, 429, 503. The error body is explained in Concepts.

request
curl -X POST "https://api.drometra.com/v1/integrations/bsale/authorizations/0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d/complete" \
  -H "Authorization: Bearer $DROMETRA _ TOKEN"\
  -H "x-tenant-id: $DROMETRA_TENANT" \
  -H "Content-Type: application/json" \ -d '{
    "code": "…",
    "bindingSecret": "…"
  }'
response · 201
{
  "id": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "tenantId": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "name": "…",
  "environment": "sandbox",
  "providerKind": "sandbox-v1",
  "instanceKey": "…",
  "capabilities": [
    "catalog.import"
  ],
  "active": true,
  "version": 1,
  "createdAt": "2026-10-21T14:02:31Z",
  "updatedAt": "2026-10-21T14:02:31Z",
  "needsReconnect": true
}

Save a data stream mapping

PUThttps://api.drometra.com/v1/integrations/connections/{id}/mappings/{stream}

Requires the access token of a person in your company.

Headers

x-tenant-idmandatorystring · uuid
Your company's identifier. The server checks that you are still an active member of it.

Road parameters

idmandatorystring · uuid
e. g. 0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d
streammandatoryenum: catalog | stock | customers

Body

domainmandatoryenum: catalog | stock | customers
versionmandatoryinteger
profilemandatoryenum: sandbox-v1 | bsale-chile-v1
rulesmandatoryobject

Response · 200

  • idstring · uuidalways
  • tenantIdstring · uuidalways
  • connectionIdstring · uuidalways
  • domainenum: catalog | stock | customersalways
  • versionintegeralways
  • profileenum: sandbox-v1 | bsale-chile-v1always
  • rulesobjectalways
  • activebooleanalways
  • createdAtstring · date-timealways

It can respond with error 400, 401, 403, 404, 409, 410, 413, 415, 422, 429, 503. The error body is explained in Concepts.

request
curl -X PUT "https://api.drometra.com/v1/integrations/connections/0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d/mappings/<stream>" \
  -H "Authorization: Bearer $DROMETRA _ TOKEN"\
  -H "x-tenant-id: $DROMETRA_TENANT" \
  -H "Content-Type: application/json" \ -d '{
    "domain": "…",
    "version": 0,
    "profile": "…",
    "rules": {}
  }'
response · 200
{
  "id": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "tenantId": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "connectionId": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "domain": "catalog",
  "version": 1,
  "profile": "sandbox-v1",
  "rules": {},
  "active": true,
  "createdAt": "2026-10-21T14:02:31Z"
}

Import a data stream

POSThttps://api.drometra.com/v1/integrations/connections/{id}/imports/{stream}

Requires the access token of a person in your company.

Headers

x-tenant-idmandatorystring · uuid
Your company's identifier. The server checks that you are still an active member of it.

Road parameters

idmandatorystring · uuid
e. g. 0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d
streammandatoryenum: catalog | stock | customers

Response · 200

  • attemptIdstring · uuidalways
  • connectionIdstring · uuidalways
  • streamenum: catalog | stock | customersalways
  • previousCursorstring o nullalways
  • nextCursorstring o nullalways
  • insertedintegeralways
  • updatedintegeralways
  • duplicatesintegeralways
  • conflictsintegeralways
  • completedAtstring · date-timealways

It can respond with error 400, 401, 403, 404, 409, 410, 413, 415, 422, 429, 503. The error body is explained in Concepts.

request
curl -X POST "https://api.drometra.com/v1/integrations/connections/0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d/imports/<stream>" \
  -H "Authorization: Bearer $DROMETRA _ TOKEN"\
  -H "x-tenant-id: $DROMETRA_TENANT" \
  -H "Accept: application / json"
response · 200
{
  "attemptId": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "connectionId": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
  "stream": "catalog",
  "previousCursor": "…",
  "nextCursor": "…",
  "inserted": 0,
  "updated": 0,
  "duplicates": 0,
  "conflicts": 0,
  "completedAt": "2026-10-21T14:02:31Z"
}

Read synchronized records

GEThttps://api.drometra.com/v1/integrations/canonical/{stream}

Requires the access token of a person in your company.

Headers

x-tenant-idmandatorystring · uuid
Your company's identifier. The server checks that you are still an active member of it.

Road parameters

streammandatoryenum: catalog | stock | customers

Reference parameters

afterstring · uuid
limitinteger
connectionIdstring · uuid
qstring

Response · 200

  • array de object o object o object o object o object o objectalways
  • nextCursorstring · uuid o nullalways

It can respond with error 400, 401, 403, 404, 409, 410, 413, 415, 422, 429, 503. The error body is explained in Concepts.

request
curl -X GET "https://api.drometra.com/v1/integrations/canonical/<stream>" \
  -H "Authorization: Bearer $DROMETRA _ TOKEN"\
  -H "x-tenant-id: $DROMETRA_TENANT" \
  -H "Accept: application / json"
response · 200
{
  "items": [
    {
      "id": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
      "connectionId": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
      "externalId": "…",
      "observationVersion": 1,
      "mappingVersion": 1,
      "origin": "sandbox-v1",
      "causationId": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
      "importedAt": "2026-10-21T14:02:31Z",
      "sku": "…",
      "name": "…",
      "unit": "…",
      "parentExternalId": "…",
      "barCode": "…",
      "active": true,
      "externalVersion": "…",
      "versionKind": "provider_monotonic"
    }
  ],
  "nextCursor": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d"
}

List synchronization conflicts

GEThttps://api.drometra.com/v1/integrations/connections/{id}/conflicts

Requires the access token of a person in your company.

Headers

x-tenant-idmandatorystring · uuid
Your company's identifier. The server checks that you are still an active member of it.

Road parameters

idmandatorystring · uuid
e. g. 0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d

Reference parameters

afterstring · uuid
limitinteger

Response · 200

  • array de objectalways
  • nextCursorstring · uuid o nullalways

It can respond with error 400, 401, 403, 404, 409, 410, 413, 415, 422, 429, 503. The error body is explained in Concepts.

request
curl -X GET "https://api.drometra.com/v1/integrations/connections/0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d/conflicts" \
  -H "Authorization: Bearer $DROMETRA _ TOKEN"\
  -H "x-tenant-id: $DROMETRA_TENANT" \
  -H "Accept: application / json"
response · 200
{
  "items": [
    {
      "id": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
      "connectionId": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
      "stream": "catalog",
      "externalId": "…",
      "currentVersion": "…",
      "incomingVersion": "…",
      "currentVersionKind": "provider_monotonic",
      "incomingVersionKind": "provider_monotonic",
      "currentSha256": "…",
      "incomingSha256": "…",
      "kind": "same_version_different_payload",
      "origin": "sandbox-v1",
      "causationId": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d",
      "createdAt": "2026-10-21T14:02:31Z"
    }
  ],
  "nextCursor": "0b6f8c2e-4a1d-4e5b-9c3f-2d7e8a9b1c4d"
}