PUT/DELETE - Unable to call output of Get operation parameter values in the payload (Delete Body)
First used GET Method:-
{"GetCustomerPartNumbersResp": {"CustomerPartNumberRelationshipCollection": {"CustomerPartNumberRelationship": [{
"ProductNumber": "100074",
"CustomerPartNumber": "TEST"
}]}}}
Expected - Want use the same out of GET operation in the Request Body of DELETE Method.
Tried below code in the Request Pay Load Body of the DELETE but it give an error that is too long Prod Number and Part Number.
{
"DeleteCustomerPartNumbersReq": {
"ProductNumber": "$['GetCustomerPartNumbersResp']['CustomerPartNumberRelationshipCollection']['CustomerPartNumberRelationship'][0]['ProductNumber']",
"CustomerPartNumber": "$['GetCustomerPartNumbersResp']['CustomerPartNumberRelationshipCollection']['CustomerPartNumberRelationship'][0]['CustomerPartNumber']"
}
}
Note: The code is working fine if i get it from Data Source but not from Output of any other operation.
Thanks for the help but with below code was able to get desired results..
Just required to enter this in the payload:-
{
"DeleteCustomerPartNumbersReq": {
"ProductNumber": "${PUT-GET#Response#$['GetCustomerPartNumbersResp']['CustomerPartNumberRelationshipCollection']['CustomerPartNumberRelationship'][0]['ProductNumber']}",
"CustomerPartNumber": "${PUT-GET#Response#$['GetCustomerPartNumbersResp']['CustomerPartNumberRelationshipCollection']['CustomerPartNumberRelationship'][0]['CustomerPartNumber']}"
}
}