Writing different test scripts for each data set while running API based on data driven test

Hi Team,

I am running a api request based on the data.json file which is having different data set. I am forming the dataset for post API where

  1. first dataset will process the request and status code is 201. Test cases should be like a) status code 201,
    b) response has tranId.

  2. Second dataset is for Bad request. API will throw 400 Bad Request for wrong data. Test cases should be like
    a) Response code should be 400
    b) responseBody.has(“Instrument type should contain only characters”)

Problem statement:
API request is iterated i.e 2 times requested but test scripts are varied with dataset and test tab is common for each dataset . I am not able to write the different testcases for each dataset. Please provide the solution or idea to implement .

Request body
{
“acctNumber” : “{{acctNumber}}”,
“instrumentType” : “{{instrumentType}}”,
“instrumentNumber” : “{{instrumentNumber}}”
}

data.json
{
{
“acctNumber” : “ACCT01”,
“instrumentType” : “SLIP”,
“instrumentNumber” : “67878”

},
{
“acctNumber” : “ACCT01”,
“instrumentType” : “11Slip11”,
“instrumentNumber” : “988989”
}
}