Legal blocks

A legal or judicial block is a block that is placed on an account for legal reasons. A legal block prevents or limits financial movement within the account. The Pismo platform offers both total and partial legal blocks.

Total legal blocks

If a total legal block is placed on an account, the Pismo platform blocks all financial movement into or out of the account. A total legal block is also called a levy.

Get the current status

To find out if an account is totally blocked, you need to get its current status. You do this using the Get account details endpoint. The account is totally blocked if the status field of the response is set to "BLOCKED". The following sample response shows that the account in question is blocked.

Sample response

{
  "available_limit": 11.0,
  "program_type": "DEBIT",
  "current_cicle": null,
  "org": "TN-f60b5e18-9f53-46ce-953b-b81ddf123456",
  "document_number": "97835021234",
  "program_name": "Pismo-Prog-Debit",
  "entity_type": "PHYSICAL",
  "current_balance": null,
  "name": "Test Name",
  "acquisition_id": 16468012,
  "email": "[email protected]",
  "status": "BLOCKED"
}

Place a total legal block

📘

The Pismo platform does not distinguish between total legal blocks and other types of total blocks. In both cases, the account status is simply changed to "BLOCKED". If you need to clarify that an account is blocked for legal reasons, you can do so by adding a reason for the block.

You place a total legal block on an account by changing its status to "BLOCKED". You do this by calling the Update account status endpoint and passing the following payload in the body of the request:

{
  "status": "BLOCKED"
}

Add a reason for a total legal block

There is currently no endpoint for adding reasons, but you can contact Pismo to implement status change reasons for you. See Account status change reasons for more info.

Remove a total legal block

The act of removing a total legal block on an account is called a full legal unlock. You perform a full legal unlock by calling the Update account status endpoint and passing the following payload in the body of the request:

{  
  "status": "NORMAL"  
}

Partial legal blocks

A partial legal block transfers a specified amount of money out of an account and holds it in reserve, so that the account holder no longer has access to it. They can view the amount of money blocked, but cannot withdraw any of the blocked funds.

Place a partial legal block

You can place a partial block on an account using an adjustment. There are three types of adjustments that result in a partial legal block. They are identified by their transaction type ID:

  • 807 – Judicial Block
  • 808 – Judicial Block Reversion
  • 909 – Judicial Transfer

Use the Create adjustment endpoint to place a partial block. The following sample code shows an example of a payload that you could pass in the body of this request to place a Judicial Block on an account:

{  
  "account_id": 16785123,  
  "amount": 1000.0,  
  "event_date": "2018-10-10T15:30:29.999Z",  
  "description": "Partial block for case num. 123-45 SP-JUS",  
  "adjustment_type": {  
    "id": 896  
  }  
}

Remove a partial legal block

To remove a partial legal block, you need to reverse the adjustment that created the block. You do this by sending a Create adjustment request with the reversal adjustment type. You can get a list of the reversal adjustment types using the Get reversal types endpoint.

Get the information for an adjustment

To get information about the adjustment associated with a partial block on an account, use the Get adjustment endpoint.

📘

You don't need to pass the transaction type ID in the request. Each adjustment type has a transaction type associated with it. The platform can get it from there.

The following sample response shows that a legal block has been placed on the account:

{
  "id": 165123,
  "account_id": 16785123,
  "authorization_id": null,
  "amount": 1000.00,
  "event_date": "2019-07-03T16:43:05.000",
  "soft_descriptor": null,
  "adjustment_type": {
    "id": 896,
    "org_id": "08102A0B-D4F8-42A2-8B0E-2052D1231111",
    "description": "BLOQUEIO JUDICIAL",
    "affects_credit_limit": true,
    "affects_balance": true,
    "is_sent_to_timeline": false,
    "is_sent_to_accounting": true,
    "transaction_type": {
      "id": 503,
      "description": "CANCELAMENTO DE COMPRA",
      "is_credit": true
    }
  },
  "details": {
    "id": 165123,
    "requester_email": "[email protected]",
    "creation_date_time": "2019-07-03T19:43:05.277Z",
    "correlation_id": "38a51739-be8b-99d3-868e-6523f429abcd",
    "transactions": [
      {
        "id": 165717,
        "transaction": {
          "id": 12648125,
          "authorization_id": null,
          "network_authorization_id": null,
          "org_id": "08102A0B-D4F8-42A2-8B0E-2052D1231111",
          "account_id": 16785413,
          "transaction_type": {
            "id": 807,
            "description": "BLOQUEIO JUDICIAL",
            "is_credit": false
          },
          "amount": 1000.00,
          "event_date": "2019-07-03T16:43:05.000",
          "soft_descriptor": "BLOQUEIO JUDICIAL"
        },
        "adjustment_type": {
          "id": 896,
          "org_id": "08102A0B-D4F8-42A2-8B0E-2052D1231111",
          "description": "BLOQUEIO JUDICIAL",
          "affects_credit_limit": true,
          "affects_balance": false,
          "is_sent_to_timeline": true,
          "is_sent_to_accounting": true,
          "transaction_type": {
            "id": 807,
            "description": "BLOQUEIO JUDICIAL",
            "is_credit": false
          }
        },
        "status": "CREATED"
      }
    ]
  },
  "timeline_metadata": null,
  "description": "Bloqueio por determinação judicial num. 123-45 SP-JUS"
}