Use the FileId and the PartyId to add a document to a case.
The DocumentData parameter is the Base64 string representation of the document content
var client = new RestClient("https://api.medicys-conventionnel.fr/api/document/AddDocument");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddParameter("text/plain", "{\"FileId\": \"27FF7826-0DED-4101-9FB4-81991117B656\",\"PartyId\": \"4B2D72C1-5B55-441F-BA03-3F4383219DCC\",\"Title\": \"Mon document\",\"Name\": \"Mon document personnel\",\"Format\": \"pdf\",\"Type\": \"Evidence\",\"Description\": \"Preuves de litiges\",\"Reference\": \"\",\"DocumentData\": \"/eHBhY2tldCBlbmQ9InciPz4NCmVuZHN0cmVhbQ0KZW5kb2JqDQoyMSAwIG9iag0KPDwvRGlzcGxheURvY1RpdGxlIHRydWU+Pg0KZW5kb2JqDQoyMiAwIG9iag0KPDwvVHlwZS9YUmVmL1NpemUgMjIvV1sgMSA0IDJdIC9Sb290IDEgMCBSL0luZm8gOSAwIFIvSURbPDhCNDE3Mzg3RTgyQ0JFNDdBRTIwNzk5NTY5MEEyOENCPjw4QjQxNzM4N0U4MkNCRTQ3QUUyMDc5OTU2OTBBMjhDQj5dIC9GaWx0ZXIvRmxhdGVEZWNvZGUvTGVuZ3RoIDg2Pj4NCnN0cmVhbQ0KeJwty7sVQFAQhOHZ+3KE+pDTmAIcDahCDapQAplID9eascF+yfyAX63mvwM+NnESu0kcxEXSQXIUIxCYBxFFElmY+JfFu9Izb3bSLmRayfwAL6UXC0UNCmVuZHN0cmVhbQ0KZW5kb2JqDQp4cmVmDQowIDIzDQowMDAwMDAwMDEwIDY1NTM1IGYNCjAwMDAwMDAwMTcgMDAwMDAgbg0KMDAwMDAwMDE2NiAwMDAwMCBuDQowMDAwMDAwMjIyIDAwMDAwIG4NCjAwMDAwMDA0ODYgMDAwMDAgbg0KMDAwMDAwMDgyMyAwMDAwMCBuDQowMDAwMDAwOTkxIDAwMDAwIG4NCjAwMDAwMDEyMzAgMDAwMDAgbg0KMDAwMDAwMTI4MyAwMDAwMCBuDQowMDAwMDAxMzM2IDAwMDAwIG4NCjAwMDAwMDAwMTEgNjU1MzUgZg0KMDAwMDAwMDAxMiA2NTUzNSBmDQowMDAwMDAwMDEzIDY1NTM1IGYNCjAwMDAwMDAwMTQgNjU1MzUgZg0KMDAwMDAwMDAxNSA2NTUzNSBmDQowMDAwMDAwMDE2IDY1NTM1IGYNCjAwMDAwMDAwMTcgNjU1MzUgZg0KMDAwMDAwMDAwMCA2NTUzNSBmDQowMDAwMDAxOTc2IDAwMDAwIG4NCjAwMDAwMDI0MzUgMDAwMDAgbg0KMDAwMDAzMDA5NiAwMDAwMCBuDQowMDAwMDMzMjYwIDAwMDAwIG4NCjAwMDAwMzMzMDUgMDAwMDAgbg0KdHJhaWxlcg0KPDwvU2l6ZSAyMy9Sb290IDEgMCBSL0luZm8gOSAwIFIvSURbPDhCNDE3Mzg3RTgyQ0JFNDdBRTIwNzk5NTY5MEEyOENCPjw4QjQxNzM4N0U4MkNCRTQ3QUUyMDc5OTU2OTBBMjhDQj5dID4+DQpzdGFydHhyZWYNCjMzNTkwDQolJUVPRg0KeHJlZg0KMCAwDQp0cmFpbGVyDQo8PC9TaXplIDIzL1Jvb3QgMSAwIFIvSW5mbyA5IDAgUi9JRFs8OEI0MTczODdFODJDQkU0N0FFMjA3OTk1NjkwQTI4Q0I+PDhCNDE3Mzg3RTgyQ0JFNDdBRTIwNzk5NTY5MEEyOENCPl0gL1ByZXYgMzM1OTAvWFJlZlN0bSAzMzMwNT4+DQpzdGFydHhyZWYNCjM0MjA2DQolJUVPRg==\",\r\n \"Attributes\": [{\"Key\": \"Special attribute\",\"Value\": \"test\"}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
var client = new RestClient("https://staging-api.medicys-conventionnel.fr/api/document/AddDocument");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddParameter("text/plain", "{\"FileId\": \"27FF7826-0DED-4101-9FB4-81991117B656\",\"PartyId\": \"4B2D72C1-5B55-441F-BA03-3F4383219DCC\",\"Title\": \"Mon document\",\"Name\": \"Mon document personnel\",\"Format\": \"pdf\",\"Type\": \"Evidence\",\"Description\": \"Preuves de litiges\",\"Reference\": \"\",\"DocumentData\": \"/eHBhY2tldCBlbmQ9InciPz4NCmVuZHN0cmVhbQ0KZW5kb2JqDQoyMSAwIG9iag0KPDwvRGlzcGxheURvY1RpdGxlIHRydWU+Pg0KZW5kb2JqDQoyMiAwIG9iag0KPDwvVHlwZS9YUmVmL1NpemUgMjIvV1sgMSA0IDJdIC9Sb290IDEgMCBSL0luZm8gOSAwIFIvSURbPDhCNDE3Mzg3RTgyQ0JFNDdBRTIwNzk5NTY5MEEyOENCPjw4QjQxNzM4N0U4MkNCRTQ3QUUyMDc5OTU2OTBBMjhDQj5dIC9GaWx0ZXIvRmxhdGVEZWNvZGUvTGVuZ3RoIDg2Pj4NCnN0cmVhbQ0KeJwty7sVQFAQhOHZ+3KE+pDTmAIcDahCDapQAplID9eascF+yfyAX63mvwM+NnESu0kcxEXSQXIUIxCYBxFFElmY+JfFu9Izb3bSLmRayfwAL6UXC0UNCmVuZHN0cmVhbQ0KZW5kb2JqDQp4cmVmDQowIDIzDQowMDAwMDAwMDEwIDY1NTM1IGYNCjAwMDAwMDAwMTcgMDAwMDAgbg0KMDAwMDAwMDE2NiAwMDAwMCBuDQowMDAwMDAwMjIyIDAwMDAwIG4NCjAwMDAwMDA0ODYgMDAwMDAgbg0KMDAwMDAwMDgyMyAwMDAwMCBuDQowMDAwMDAwOTkxIDAwMDAwIG4NCjAwMDAwMDEyMzAgMDAwMDAgbg0KMDAwMDAwMTI4MyAwMDAwMCBuDQowMDAwMDAxMzM2IDAwMDAwIG4NCjAwMDAwMDAwMTEgNjU1MzUgZg0KMDAwMDAwMDAxMiA2NTUzNSBmDQowMDAwMDAwMDEzIDY1NTM1IGYNCjAwMDAwMDAwMTQgNjU1MzUgZg0KMDAwMDAwMDAxNSA2NTUzNSBmDQowMDAwMDAwMDE2IDY1NTM1IGYNCjAwMDAwMDAwMTcgNjU1MzUgZg0KMDAwMDAwMDAwMCA2NTUzNSBmDQowMDAwMDAxOTc2IDAwMDAwIG4NCjAwMDAwMDI0MzUgMDAwMDAgbg0KMDAwMDAzMDA5NiAwMDAwMCBuDQowMDAwMDMzMjYwIDAwMDAwIG4NCjAwMDAwMzMzMDUgMDAwMDAgbg0KdHJhaWxlcg0KPDwvU2l6ZSAyMy9Sb290IDEgMCBSL0luZm8gOSAwIFIvSURbPDhCNDE3Mzg3RTgyQ0JFNDdBRTIwNzk5NTY5MEEyOENCPjw4QjQxNzM4N0U4MkNCRTQ3QUUyMDc5OTU2OTBBMjhDQj5dID4+DQpzdGFydHhyZWYNCjMzNTkwDQolJUVPRg0KeHJlZg0KMCAwDQp0cmFpbGVyDQo8PC9TaXplIDIzL1Jvb3QgMSAwIFIvSW5mbyA5IDAgUi9JRFs8OEI0MTczODdFODJDQkU0N0FFMjA3OTk1NjkwQTI4Q0I+PDhCNDE3Mzg3RTgyQ0JFNDdBRTIwNzk5NTY5MEEyOENCPl0gL1ByZXYgMzM1OTAvWFJlZlN0bSAzMzMwNT4+DQpzdGFydHhyZWYNCjM0MjA2DQolJUVPRg==\",\r\n \"Attributes\": [{\"Key\": \"Special attribute\",\"Value\": \"test\"}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);