Operator-integration-controller

Operators are employees of the company for whom different accesses to the administrative part (backoffice) can be assigned. For example, a graphic designer will have access to the CMS area, and the seller will have access to sales and customers.
⚠️
More about operator management can be found here

Table of contents

Glossary

Name
Explanation
clientId
Identifier of Client
additionalEmail
additional e-mail
branchId
Identifier of branch
cartDefaultClientId
default client
cartDefaultWarehouseId
default warehouse identifier
email
operator e-mail
externalId
operator external identifier
isAccountManager
whether the operator is an account manager
isActive
Possible choose between true or false (default: true)
isAppliedDefaultClientFromBranch
whether the warehouse set in the branch is to be the default client for the operator. Possible choose between true or false
isAppliedDefaultWarehouseFromBranch
whether the warehouse set in the branch is to be the default warehouse for the operator. You can choose between true or false
landlinePhone
landline phone number
name
operator name
phone
phone number

GET operators

In order to get information about all operators use GET /api/v1/catalog/integrations/auth-required/operators. The diagram below shows the dependence of communicating with the API:
Image without caption
Use the parameter in query below to get list with information about all operators:
  • pageNumber
  • pageSize
json
curl -X GET "https://api-preprod.one.unity.pl/api/v1/authserver/integrations/auth-required/roles?clientId=org%3A838bed9a-8063-4e4c-93c3-f74b59fcaa5a" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive list of operators
Example response:
json
{ "listElement": [ { "id": "00e9e304-e5df-450a-a861-0211c471096b", "externalId": "ID", "email": "test@b2b.one", "additionalEmail": "new@b2b.one", "name": "Nowy", "phone": "987654321", "landlinePhone": "111111111111111", "cartDefaultWarehouseId": "WRO", "cartDefaultClientId": "org:838bed9a-8063-4e4c-93c3-f74b59fcaa5a", "role": { "id": "00000000-0000-0000-0000-000000000002", "name": "Księgowa" }, "isAccountManager": true, "isActive": true, "branchId": "c47fc334-9611-4876-be20-03b93252a431", "isAppliedDefaultClientFromBranch": false, "isAppliedDefaultWarehouseFromBranch": false }, { "id": "7b8cac11-dc09-403d-9737-c14962eb3510", "externalId": null, "email": "one-admin@one.unity.pl", "additionalEmail": null, "name": "one-admin", "phone": "048 111 222 333", "landlinePhone": null, "cartDefaultWarehouseId": null, "cartDefaultClientId": null, "role": { "id": "00000000-0000-0000-0000-000000000000", "name": "Administrator" }, "isAccountManager": true, "isActive": true, "branchId": null, "isAppliedDefaultClientFromBranch": false, "isAppliedDefaultWarehouseFromBranch": false } ], "totalElement": 2, "items": [ { "id": "00e9e304-e5df-450a-a861-0211c471096b", "externalId": "ID", "email": "operator@b2b.one", "additionalEmail": "new@b2b.one", "name": "Nowy", "phone": "987654321", "landlinePhone": "111111111111111", "cartDefaultWarehouseId": "WRO", "cartDefaultClientId": "org:838bed9a-8063-4e4c-93c3-f74b59fcaa5a", "role": { "id": "00000000-0000-0000-0000-000000000002", "name": "Księgowa" }, "isAccountManager": true, "isActive": true, "branchId": "c47fc334-9611-4876-be20-03b93252a431", "isAppliedDefaultClientFromBranch": false, "isAppliedDefaultWarehouseFromBranch": false }, { "id": "7b8cac11-dc09-403d-9737-c14962eb3510", "externalId": null, "email": "admin@b2b.one", "additionalEmail": null, "name": "Admin", "phone": "048 111 222 333", "landlinePhone": null, "cartDefaultWarehouseId": null, "cartDefaultClientId": null, "role": { "id": "00000000-0000-0000-0000-000000000000", "name": "Administrator" }, "isAccountManager": true, "isActive": true, "branchId": null, "isAppliedDefaultClientFromBranch": false, "isAppliedDefaultWarehouseFromBranch": false } ], "totalItems": 2, "pageNumber": 1, "totalPages": 1, "pageSize": 100, "nextPage": null }

GET operator

In order to get information about operator use GET /api/v1/catalog/integrations/auth-required/operators/{operatorId} using specific ID of operator. The diagram below shows the dependence of communicating with the API:
Image without caption
Use the parameter in query below to get information about specified operator
  • operatorId
json
curl -X GET "https://api-preprod.one.unity.pl/api/v1/authserver/integrations/auth-required/operators/00e9e304-e5df-450a-a861-0211c471096b" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive information about operator
Example response:
json
{ "id": "00e9e304-e5df-450a-a861-0211c471096b", "externalId": "ID", "email": "test@b2b.one", "additionalEmail": "new@b2b.one", "name": "New Operator", "phone": "987654321", "landlinePhone": "111111111111111", "cartDefaultWarehouseId": "WRO", "cartDefaultClientId": "org:838bed9a-8063-4e4c-93c3-f74b59fcaa5a", "role": { "id": "00000000-0000-0000-0000-000000000002", "name": "Księgowa" }, "isAccountManager": true, "isActive": true, "branchId": "c47fc334-9611-4876-be20-03b93252a431", "isAppliedDefaultClientFromBranch": false, "isAppliedDefaultWarehouseFromBranch": false }

PUT - Update operator by id

In order to change information about specific operator use PUT /api/v1/catalog/integrations/auth-required/operators/{operatorId}. The sequence diagram below shows the process:
Image without caption
Use the parameter in query below to update specified operator:
  • operatorId
Example request:
json
curl -X PUT "https://api-preprod.one.unity.pl/api/v1/authserver/integrations/auth-required/operators/00e9e304-e5df-450a-a861-0211c471096b" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}" -d { "additionalEmail": "Admin@b2b.one", "branchId": "c47fc334-9611-4876-be20-03b93252a431", "cartDefaultClientId": "org:838bed9a-8063-4e4c-93c3-f74b59fcaa5a", "cartDefaultWarehouseId": "WRO", "email": "test2@b2b.one", "externalId": "test", "isAccountManager": true, "isActive": true, "isAppliedDefaultClientFromBranch": true, "isAppliedDefaultWarehouseFromBranch": true, "landlinePhone": "123145433", "name": "Test operator", -- required "phone": "123456789" -- required }

POST - Create operator

In order to create operator use POST /api/v1/catalog/integrations/auth-required/operators/create. The diagram below shows the dependency of communicating with the API:
Image without caption
Example request:
json
curl -X POST "https://api-preprod.one.unity.pl/api/v1/authserver/integrations/auth-required/operators/create" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}" -d " { "additionalEmail": "test@b2b.one", "branchId": "c47fc334-9611-4876-be20-03b93252a431", "cartDefaultClientId": "org:838bed9a-8063-4e4c-93c3-f74b59fcaa5a", "cartDefaultWarehouseId": "WRO", "email": "test1@b2b.one", -- required "externalId": "test", "isAccountManager": true, "isActive": true, "isAppliedDefaultClientFromBranch": true, "isAppliedDefaultWarehouseFromBranch": true, "landlinePhone": "123145433", "name": "Test operator", -- required "phone": "123456789" -- required }
In response you will receive identifier of created operator
Example response:
json
{ "operatorId": "25d1e890-001f-4a01-8534-b9af4e1de8cd" }

GET operators for synchronization

In order to find the events of the operator use GET /api/v1/catalog/integrations/auth-required/operators/synchronization using specific ID of Client. The diagram below shows the dependence of communicating with the API:
Image without caption
Use the following query parameters to find the events of the operator:
  • startId
json
curl -X GET "https://api-preprod.one.unity.pl/api/v1/authserver/integrations/auth-required/operators/synchronization?contexts=INTEGRATIONS&startId=9" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive a information about next step ID along operator ID and type
Example response:
json
{ "nextId": 12, "events": [ { "operatorId": "25d1e890-001f-4a01-8534-b9af4e1de8cd", "type": "CREATE" } ] }