const response = await fetch('https://api.transactionlink.io/cases', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"firstName": "Jan",
"lastName": "Nowak",
"personalNumber": 17300211234,
"email": "jn@mail.com",
"phone": {
"countryCode": 48,
"number": 666666666
},
"companyName": "Company name",
"companyNumber": "Company number",
"companyAddress": "Company address",
"documents": [
{
"resourceId": "20fd5007-008d-447c-8378-6f81ea48fe65",
"resourceName": "File name.pdf",
"resourcePath": "resources/e1413f5b-acb0-4995-919a-3fc60c9592c5/20fd5007-008d-447c-8378-6f81ea48fe65/File name.pdf"
},
{
"resourceId": "20fd5007-008d-447c-8378-6f81ea48fe65",
"resourceName": "File name.pdf",
"resourcePath": "resources/e1413f5b-acb0-4995-919a-3fc60c9592c5/20fd5007-008d-447c-8378-6f81ea48fe65/File name.pdf"
}
]
}),
});
const data = await response.json();