Hello im trying to test an api with a body:
{
"customerAttributes": [
{
"customerId": 0,
"id": 0,
"name": "string",
"value": "string"
}
],
"emailAddress": "string",
"firstName": "string",
"id": 0,
"lastName": "string",
"registered": true
}
Since it has more than one object i dont know how to make it work. this is what i have til the moment :
*** Settings ***
Library RequestsLibrary
*** Variables ***
${Base_URL}= http://localhost:8082 /api/v1
*** Test Cases ***
TC_004_POST_Customer
Create session customer ${Base_URL}
${body}= create dictionary customerId=100 id=100 name=test value=0 emailAdress=blabla@gmailcom firstName=algo id=101 lastName=testt registered=true
${header}= create dictionary Content-Type=application/json
${response}= Post On Session customer /customer data=${body} headers=${header}
log to console ${response.status_code}
log to console ${response.content}
Can someone give me a help? thanks!