|### 1) Create account
|
|Create an account as described in Step 5 of section [Onboarding a user](#Onboarding-a-user)
|
|### 2) Create a view
|
|Action:
|
| POST https://obp-api-sandbox.nmbbank.co.tz/obp/v3.0.0/banks/BANK_ID/accounts/your-account-id-from-step-1/views
|
|Body:
|
| { "name":"_test", "description":"This view is for family", "metadata_view":"_test", "is_public":true, "which_alias_to_use":"family", "hide_metadata_if_alias_used":false, "allowed_actions":[can_see_transaction_this_bank_account,can_see_transaction_other_bank_account,can_see_transaction_metadata,,can_see_transaction_amount,can_see_transaction_type,can_see_transaction_currency,can_see_transaction_start_date,can_see_transaction_finish_date,can_see_transaction_balance,can_see_comments,can_see_tags,can_see_images,can_see_bank_account_owners,can_see_bank_account_type,can_see_bank_account_balance,can_see_bank_account_currency,can_see_bank_account_label,can_see_bank_account_national_identifier,can_see_bank_account_swift_bic,can_see_bank_account_iban,can_see_bank_account_number,can_see_bank_account_bank_name,can_see_other_account_national_identifier,can_see_other_account_swift_bic,can_see_other_account_iban,can_see_other_account_bank_name,can_see_other_account_number,can_see_other_account_metadata,can_see_other_account_kind,can_see_more_info,can_see_url,can_see_image_url,can_see_open_corporates_url,can_see_corporate_location,can_see_physical_location,can_see_public_alias,can_see_private_alias,can_add_more_info,can_add_url,can_add_image_url,can_add_open_corporates_url,can_add_corporate_location,can_add_physical_location,can_add_public_alias,can_add_private_alias,can_delete_corporate_location,can_delete_physical_location,can_add_comment,can_delete_comment,can_add_tag,can_delete_tag,can_add_image,can_delete_image,can_add_where_tag,can_see_where_tag,can_delete_where_tag,can_see_bank_routing_scheme,can_see_bank_routing_address,can_see_bank_account_routing_scheme,can_see_bank_account_routing_address,can_see_other_bank_routing_scheme,can_see_other_bank_routing_address,can_see_other_account_routing_scheme,can_see_other_account_routing_address,can_query_available_funds,can_add_transaction_request_to_own_account,can_add_transaction_request_to_any_account,can_see_bank_account_credit_limit,can_create_direct_debit,can_create_standing_order]} |
| Headers:
|
| Content-Type: application/json
|
| DirectLogin: token="your-token"
|
|### 3) Grant user access to view
|
|Action:
|
| POST https://obp-api-sandbox.nmbbank.co.tz/obp/v3.0.0/banks/BANK_ID/accounts/your-account-id-from-step-1/permissions/PROVIDER/PROVIDER_ID/views/view-id-from-step-2
|
|Body:
|
| { "json_string":"{}"}
|
| Headers:
|
| Content-Type: application/json
|
| DirectLogin: token="your-token"
|