If we need to temporarily disable a user's account, we can block it. We have three types of locks that we can apply. It is Trade Credit, Sale, or Client for an explanation of these types of blockade, see the glossary. From a business point of view, it is an effective form of payment by customers.
Assigning a type of blockade to clients is possible using an external system or the ONe platform. It is not possible to assign the type of blockade simultaneously using the external system and the ONe platform
Table of contents
Table of contentsGlossaryGET account blockade by organization idPUT account blockade to organizationDELETE account blockade from organization
Glossary
Name | Explanation |
type | Type of customer account blockade (possible to choose TRADE_CREDIT, SALE, CLIENT).
- TRADE_CREDIT - type of blockade consisting of he use of trade credit by the client
- SALE - type of blockade consisting of the client's order placement
- CLIENT - type of blockade consisting of blocking access to platform |
clientId | Client ID to which we want to add a block |
externalId | External block ID - information from the external system (e.g. ERP) on the basis of which blockades are configured and set on customers |
GET account blockade by organization id
Information about imposed locks is also returned at the client data level. In this endpoint
In the case of adding a blockade in ONe platform, you can receive the data using GET
/api/v1/account/integrations/auth-required/client-blockades/{clientId}
. The sequence diagram below shows the process: Use the parameter below to find the blockade for a specific client:
clientId
- Client ID to which we want to add a block
Example request:
jsoncurl -X GET "https://api-preprod.one.unity.pl/api/v1/account/integrations/auth-required/client-blockades/{clientid}" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response you will receive information about client blockade with the following data:
id
externalId
type
label
message
Example response:
json{ "id": "3b01ee6-89b8-47bf-aa39-1f4910ddbe02", -- Client ID to which we want to add a block "externalId": "1001", -- account blockade external identifier (placed in the ONe platofrm) - required in bacoffice "type": "CLIENT", -- type of blockade (possible TRADE_CREDIT, SALE, CLIENT) - required in bacoffice "label": "Client blockade", -- blockade description - required in bacoffice "message": "You have been blocked due to unpaid invoices" -- blockade message }
PUT account blockade to organization
First of all, we must start by defining the type of blockade in ONe platform. In this article, you'll learn how to do it.
Important! In the settings in the lock settings (backoffice -> settings -> general -> account -> Account blockade provider set: EXTERNAL
Now let's see what the process looks like when we want to add a blockade to customer using an external system. The sequence diagram below shows the process
Use PUT
/api/v1/account/integrations/auth-required/client-blockades/{clientId}
to add blockade to the Client. Then you need in request put the following data:clientId
(query)
externalId
(body)
Example response:
jsoncurl -X PUT "https://api-preprod.one.unity.pl/api/v1/account/integrations/auth-required/client-blockades/org%3Ae3b01ee6-89b8-47bf-aa39-1f4910ddbe02" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}" -H "Content-Type: application/json" -d "{ \ "externalId": "{string}" }"
DELETE account blockade from organization
At the end you have the option to delete blockade from Client. Use DELETE
/api/v1/account/integrations/auth-required/client-blockades/{clientId}
to delete existing blokade from Client. The sequence diagram below shows the dependency of communicating with the API:
Use the parameter below to find the blockade for a specific client:
clientId
Example request:
jsoncurl -X DELETE "https://api-preprod.one.unity.pl/api/v1/account/integrations/auth-required/client-blockades/org%3Ab4c8ce61-d434-4645-b338-f0e2d27e78a8" -H "accept: */*" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"