# Contract Geek API NAV
Shell Python JavaScript C#

Contract Geek

Authentication

Introduction

Welcome to the Contract Geek APIs.

Our APIs can be accessed from two separate environments:

How to Request an API Key

To request an API key, simply log in to the platform and navigate to the organization/API page. From this page, you can manage the API keys for the logged-in user.

What are API Users?

An API user is an internal user within the Organization who can operate exclusively via API. They have access to the web app solely for managing their own API Keys. They are not counted towards the maximum number of users in the Organization.

How To

Add an External User

  1. Create a Controparte: Create a Controparte where you can add the new user using CreateControparte.

    • Have you already created the Controparte? Retrieve its ID using GetControparti
  2. Add the User: Use AddUserToControparte to add the User to the desired Controparte.

Create a Workflow

  1. Create a Draft: Create a Draft using CreateWorkflowDraft.

  2. Update the Draft: Modify your draft using UpdateWorkflowDraft.

    • Hint: We suggest using GetWorkflow to get the correct schema of the data to be passed via UpdateWorkflowDraft
    • Warning: Make sure to set the status to 2: Draft Ok before starting the Workflow.
  3. Start the Workflow: Call StartWorkflowDraft to start the Workflow.

Sign a Workflow

  1. Initiate a Signing Session: Start a signing session using SignOpenSession. Make sure to store the returned session_key for future steps.

  2. Send an OTP to the Current User: Depending on your preferred method of verification, send an OTP to the current user. Make sure to store the returned verify_id for future steps.

    • SMS Verification: If you need to sign using the SMS verification, call SignOTPSMSSend.
    • Email Verification: If you need to sign using the email verification, call SignOTPMailSend.
  3. Sign the Workflow: Use the previously stored session_key and verify_id, along with the received OTP, to sign the Workflow.

    • SMS Verification: If you need to sign using the SMS verification, call SignOTPSMS.
    • Email Verification: If you need to sign using the email verification, call SignOTPMail.

Controparte

GetControparti

Code samples

# You can also use wget
curl -X GET /Controparte \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Controparte', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Controparte',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Controparte";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Controparte

Retrieves a list of all Controparti within the Organization.

Example responses

200 Response

[{"controparte_id":0,"controparte_name":"string","controparte_nation":"string","controparte_city":"string","controparte_mail":"string","controparte_address":"string","controparte_last_edit":"2019-08-24T14:15:22Z","controparte_piva":"string","controparte_webpage":"string"}]
[
  {
    "controparte_id": 0,
    "controparte_name": "string",
    "controparte_nation": "string",
    "controparte_city": "string",
    "controparte_mail": "string",
    "controparte_address": "string",
    "controparte_last_edit": "2019-08-24T14:15:22Z",
    "controparte_piva": "string",
    "controparte_webpage": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Controparti. Inline
403 Forbidden The user does not have permission to access the Controparti. ProblemDetails

Response Schema

Status Code 200

Name Type Nullable
Controparte [Controparte] false
» controparte_id integer(int32) false
» controparte_name string false
» controparte_nation string false
» controparte_city string false
» controparte_mail string false
» controparte_address string false
» controparte_last_edit string(date-time) false
» controparte_piva string false
» controparte_webpage string true

CreateControparte

Code samples

# You can also use wget
curl -X POST /Controparte \
  -H 'Content-Type: application/json' \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.post('/Controparte', headers = headers)

print(r.json())

const inputBody = '{
  "controparte_id": 0,
  "controparte_name": "string",
  "controparte_nation": "string",
  "controparte_city": "string",
  "controparte_mail": "string",
  "controparte_address": "string",
  "controparte_last_edit": "2019-08-24T14:15:22Z",
  "controparte_piva": "string",
  "controparte_webpage": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Controparte',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }


    /// Make a dummy request
    public async Task MakePostRequest()
    {
      string url = "/Controparte";

      string json = @"{
  ""controparte_id"": 0,
  ""controparte_name"": ""string"",
  ""controparte_nation"": ""string"",
  ""controparte_city"": ""string"",
  ""controparte_mail"": ""string"",
  ""controparte_address"": ""string"",
  ""controparte_last_edit"": ""2019-08-24T14:15:22Z"",
  ""controparte_piva"": ""string"",
  ""controparte_webpage"": ""string""
}";
      Controparte content = JsonConvert.DeserializeObject(json);
      await PostAsync(content, url);


    }

    /// Performs a POST Request
    public async Task PostAsync(Controparte content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute POST request
        HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
    }



    /// Serialize an object to Json
    private StringContent SerializeObject(Controparte content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

POST /Controparte

Creates a new Controparte within the Organization.

Body parameter

{
  "controparte_id": 0,
  "controparte_name": "string",
  "controparte_nation": "string",
  "controparte_city": "string",
  "controparte_mail": "string",
  "controparte_address": "string",
  "controparte_last_edit": "2019-08-24T14:15:22Z",
  "controparte_piva": "string",
  "controparte_webpage": "string"
}

Parameters

Name In Type Required Description
body body Controparte true Controparte Object with the information of the new Controparte.

Example responses

201 Response

{"controparte_id":0,"controparte_name":"string","controparte_nation":"string","controparte_city":"string","controparte_mail":"string","controparte_address":"string","controparte_last_edit":"2019-08-24T14:15:22Z","controparte_piva":"string","controparte_webpage":"string"}
{
  "controparte_id": 0,
  "controparte_name": "string",
  "controparte_nation": "string",
  "controparte_city": "string",
  "controparte_mail": "string",
  "controparte_address": "string",
  "controparte_last_edit": "2019-08-24T14:15:22Z",
  "controparte_piva": "string",
  "controparte_webpage": "string"
}

Responses

Status Meaning Description Schema
201 Created The newly created Controparte. Controparte
400 Bad Request Something went wrong. Refer to the error message for more details. ProblemDetails
403 Forbidden The user does not have permission to create a new Controparte. ProblemDetails

EditControparte

Code samples

# You can also use wget
curl -X PUT /Controparte \
  -H 'Content-Type: application/json' \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.put('/Controparte', headers = headers)

print(r.json())

const inputBody = '{
  "controparte_id": 0,
  "controparte_name": "string",
  "controparte_nation": "string",
  "controparte_city": "string",
  "controparte_mail": "string",
  "controparte_address": "string",
  "controparte_last_edit": "2019-08-24T14:15:22Z",
  "controparte_piva": "string",
  "controparte_webpage": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Controparte',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }



    /// Make a dummy request
    public async Task MakePutRequest()
    {
      int id = 1;
      string url = "/Controparte";


      string json = @"{
  ""controparte_id"": 0,
  ""controparte_name"": ""string"",
  ""controparte_nation"": ""string"",
  ""controparte_city"": ""string"",
  ""controparte_mail"": ""string"",
  ""controparte_address"": ""string"",
  ""controparte_last_edit"": ""2019-08-24T14:15:22Z"",
  ""controparte_piva"": ""string"",
  ""controparte_webpage"": ""string""
}";
      Controparte content = JsonConvert.DeserializeObject(json);
      var result = await PutAsync(id, content, url);


    }

    /// Performs a PUT Request
    public async Task PutAsync(int id, Controparte content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute PUT request
        HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);

        //Return response
        return await DeserializeObject(response);
    }


    /// Serialize an object to Json
    private StringContent SerializeObject(Controparte content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

PUT /Controparte

Updates the information of an existing Controparte.

Body parameter

{
  "controparte_id": 0,
  "controparte_name": "string",
  "controparte_nation": "string",
  "controparte_city": "string",
  "controparte_mail": "string",
  "controparte_address": "string",
  "controparte_last_edit": "2019-08-24T14:15:22Z",
  "controparte_piva": "string",
  "controparte_webpage": "string"
}

Parameters

Name In Type Required Description
body body Controparte true Controparte Object with the new information of the Controparte.

Example responses

403 Response

{"type":"string","title":"string","status":0,"detail":"string","instance":"string","property1":null,"property2":null}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}

Responses

Status Meaning Description Schema
204 No Content The informations was updated successfully. None
403 Forbidden The user does not have permission to update the information. ProblemDetails

GetControparte

Code samples

# You can also use wget
curl -X GET /Controparte/{controparte_id} \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Controparte/{controparte_id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Controparte/{controparte_id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Controparte/{controparte_id}";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Controparte/{controparte_id}

Retrieves a Controparte within the Organization.

Parameters

Name In Type Required Description
controparte_id path integer(int32) true The ID of the Controparte to retrieve.

Example responses

200 Response

{"controparte_id":0,"controparte_name":"string","controparte_nation":"string","controparte_city":"string","controparte_mail":"string","controparte_address":"string","controparte_last_edit":"2019-08-24T14:15:22Z","controparte_piva":"string","controparte_webpage":"string"}
{
  "controparte_id": 0,
  "controparte_name": "string",
  "controparte_nation": "string",
  "controparte_city": "string",
  "controparte_mail": "string",
  "controparte_address": "string",
  "controparte_last_edit": "2019-08-24T14:15:22Z",
  "controparte_piva": "string",
  "controparte_webpage": "string"
}

Responses

Status Meaning Description Schema
200 OK Returns the requested Controparte Object. Controparte
403 Forbidden The user does not have permission to access the Controparti. ProblemDetails
404 Not Found A Controparte with the specified ID was not found. ProblemDetails

DeleteControparte

Code samples

# You can also use wget
curl -X DELETE /Controparte/{controparte_id} \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.delete('/Controparte/{controparte_id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Controparte/{controparte_id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }




    /// Make a dummy request
    public async Task MakeDeleteRequest()
    {
      int id = 1;
      string url = "/Controparte/{controparte_id}";

      await DeleteAsync(id, url);
    }

    /// Performs a DELETE Request
    public async Task DeleteAsync(int id, string url)
    {
        //Execute DELETE request
        HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");

        //Return response
        await DeserializeObject(response);
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

DELETE /Controparte/{controparte_id}

Deletes a specified Controparte from the Organization.

Parameters

Name In Type Required Description
controparte_id path integer(int32) true The ID of the Controparte to delete.

Example responses

403 Response

{"type":"string","title":"string","status":0,"detail":"string","instance":"string","property1":null,"property2":null}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}

Responses

Status Meaning Description Schema
204 No Content The Controparte was deleted successfully. None
403 Forbidden The user does not have permission to delete a Controparte. ProblemDetails

GetExternalUsers

Code samples

# You can also use wget
curl -X GET /Controparte/User \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Controparte/User', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Controparte/User',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Controparte/User";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Controparte/User

Retrives a list of all External User within the Organization and the Workspace.

An External User is a user that does not have access to the webapp of the application but can approve and sign a Workflow.

Example responses

200 Response

[{"id":0,"name":"string","surname":"string","mail":"string","phone":"string","cf":"string"}]
[
  {
    "id": 0,
    "name": "string",
    "surname": "string",
    "mail": "string",
    "phone": "string",
    "cf": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Users. Inline
403 Forbidden The user does not have permission to access the Users. ProblemDetails

Response Schema

Status Code 200

Name Type Nullable
User [User] false
» id integer(int32) false
» name string false
» surname string false
» mail string false
» phone string true
» cf string true

EditControparteUser

Code samples

# You can also use wget
curl -X PUT /Controparte/User \
  -H 'Content-Type: application/json' \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.put('/Controparte/User', headers = headers)

print(r.json())

const inputBody = '{
  "id": 0,
  "name": "string",
  "surname": "string",
  "mail": "string",
  "phone": "string",
  "cf": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Controparte/User',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }



    /// Make a dummy request
    public async Task MakePutRequest()
    {
      int id = 1;
      string url = "/Controparte/User";


      string json = @"{
  ""id"": 0,
  ""name"": ""string"",
  ""surname"": ""string"",
  ""mail"": ""string"",
  ""phone"": ""string"",
  ""cf"": ""string""
}";
      User content = JsonConvert.DeserializeObject(json);
      var result = await PutAsync(id, content, url);


    }

    /// Performs a PUT Request
    public async Task PutAsync(int id, User content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute PUT request
        HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);

        //Return response
        return await DeserializeObject(response);
    }


    /// Serialize an object to Json
    private StringContent SerializeObject(User content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

PUT /Controparte/User

Updates the information of an existing external User.

Please note that this method does not support modifying a user's email address. If you need to change the email address, please send an email to assistenza@contractgeek.it with the old and new addresses.

Body parameter

{
  "id": 0,
  "name": "string",
  "surname": "string",
  "mail": "string",
  "phone": "string",
  "cf": "string"
}

Parameters

Name In Type Required Description
body body User true User Object with the new information of the User.

Example responses

403 Response

{"type":"string","title":"string","status":0,"detail":"string","instance":"string","property1":null,"property2":null}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}

Responses

Status Meaning Description Schema
204 No Content The informations was updated successfully. None
403 Forbidden The user does not have permission to update the information. ProblemDetails

GetContropartiAssociatedToUser

Code samples

# You can also use wget
curl -X GET /Controparte/User/{user_id} \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Controparte/User/{user_id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Controparte/User/{user_id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Controparte/User/{user_id}";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Controparte/User/{user_id}

Retrives a list of all Controparti associated with an External User.

Parameters

Name In Type Required Description
user_id path integer(int32) true The ID of the User.

Example responses

200 Response

[{"controparte_id":0,"controparte_name":"string","controparte_nation":"string","controparte_city":"string","controparte_mail":"string","controparte_address":"string","controparte_last_edit":"2019-08-24T14:15:22Z","controparte_piva":"string","controparte_webpage":"string"}]
[
  {
    "controparte_id": 0,
    "controparte_name": "string",
    "controparte_nation": "string",
    "controparte_city": "string",
    "controparte_mail": "string",
    "controparte_address": "string",
    "controparte_last_edit": "2019-08-24T14:15:22Z",
    "controparte_piva": "string",
    "controparte_webpage": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Controparti. Inline
403 Forbidden The user does not have permission to access the Controparti. ProblemDetails

Response Schema

Status Code 200

Name Type Nullable
Controparte [Controparte] false
» controparte_id integer(int32) false
» controparte_name string false
» controparte_nation string false
» controparte_city string false
» controparte_mail string false
» controparte_address string false
» controparte_last_edit string(date-time) false
» controparte_piva string false
» controparte_webpage string true

GetControparteUsers

Code samples

# You can also use wget
curl -X GET /Controparte/{controparte_id}/User \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Controparte/{controparte_id}/User', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Controparte/{controparte_id}/User',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Controparte/{controparte_id}/User";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Controparte/{controparte_id}/User

Retrives a list of all External Users associated with Controparte.

Parameters

Name In Type Required Description
controparte_id path integer(int32) true The ID of the Controparte to retrieve.

Example responses

200 Response

[{"id":0,"name":"string","surname":"string","mail":"string","phone":"string","cf":"string"}]
[
  {
    "id": 0,
    "name": "string",
    "surname": "string",
    "mail": "string",
    "phone": "string",
    "cf": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Users. Inline
403 Forbidden The user does not have permission to access the Users. ProblemDetails

Response Schema

Status Code 200

Name Type Nullable
User [User] false
» id integer(int32) false
» name string true
» surname string true
» mail string true
» phone string true
» cf string true

AddUserToControparte

Code samples

# You can also use wget
curl -X POST /Controparte/{controparte_id}/User \
  -H 'Content-Type: application/json' \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.post('/Controparte/{controparte_id}/User', headers = headers)

print(r.json())

const inputBody = '{
  "id": 0,
  "name": "string",
  "surname": "string",
  "mail": "string",
  "phone": "string",
  "cf": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Controparte/{controparte_id}/User',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }


    /// Make a dummy request
    public async Task MakePostRequest()
    {
      string url = "/Controparte/{controparte_id}/User";

      string json = @"{
  ""id"": 0,
  ""name"": ""string"",
  ""surname"": ""string"",
  ""mail"": ""string"",
  ""phone"": ""string"",
  ""cf"": ""string""
}";
      User content = JsonConvert.DeserializeObject(json);
      await PostAsync(content, url);


    }

    /// Performs a POST Request
    public async Task PostAsync(User content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute POST request
        HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
    }



    /// Serialize an object to Json
    private StringContent SerializeObject(User content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

POST /Controparte/{controparte_id}/User

Creates a new User and associates it with the specified Controparte.

The 202 response indicates that the User is already present in our system. In this case, the AddExistingUserToControparte method should be used to associate the existing User with the specified Controparte

The 409 response indicates that the User is already present in our system but it is not associated with another Organization. Write a mail to assistenza@contractgeek.it for more details.

Body parameter

{
  "id": 0,
  "name": "string",
  "surname": "string",
  "mail": "string",
  "phone": "string",
  "cf": "string"
}

Parameters

Name In Type Required Description
controparte_id path integer(int32) true ID of the Controparte to which the new User will be associated.
body body User false User Object with the information of the new User.

Example responses

201 Response

{"id":0,"name":"string","surname":"string","mail":"string","phone":"string","cf":"string"}
{
  "id": 0,
  "name": "string",
  "surname": "string",
  "mail": "string",
  "phone": "string",
  "cf": "string"
}

Responses

Status Meaning Description Schema
201 Created The newly created User. User
202 Accepted The User is already present in our system and it associated with your Organization. None
400 Bad Request Something went wrong. Refer to the error message for more details. ProblemDetails
403 Forbidden The user does not have permission to create a new User. ProblemDetails
409 Conflict The User is already present in our system but it is associated with another Organization. ProblemDetails

AddExistingUserToControparte

Code samples

# You can also use wget
curl -X POST /Controparte/{controparte_id}/User/{user_id} \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.post('/Controparte/{controparte_id}/User/{user_id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Controparte/{controparte_id}/User/{user_id}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }


    /// Make a dummy request
    public async Task MakePostRequest()
    {
      string url = "/Controparte/{controparte_id}/User/{user_id}";


      await PostAsync(null, url);

    }

    /// Performs a POST Request
    public async Task PostAsync(undefined content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute POST request
        HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
    }



    /// Serialize an object to Json
    private StringContent SerializeObject(undefined content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

POST /Controparte/{controparte_id}/User/{user_id}

Associates an existing User with the specified Controparte.

Parameters

Name In Type Required Description
controparte_id path integer(int32) true ID of the Controparte to which the existing User will be associated.
user_id path integer(int32) true ID of the User to associate

Example responses

403 Response

{"type":"string","title":"string","status":0,"detail":"string","instance":"string","property1":null,"property2":null}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}

Responses

Status Meaning Description Schema
204 No Content The association was created successfully. None
403 Forbidden The user does not have permission to update the specified Controparte. ProblemDetails
409 Conflict The User is already associated with the specified Controparte. ProblemDetails

DeleteControparteUser

Code samples

# You can also use wget
curl -X DELETE /Controparte/{controparte_id}/User/{user_id} \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.delete('/Controparte/{controparte_id}/User/{user_id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Controparte/{controparte_id}/User/{user_id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }




    /// Make a dummy request
    public async Task MakeDeleteRequest()
    {
      int id = 1;
      string url = "/Controparte/{controparte_id}/User/{user_id}";

      await DeleteAsync(id, url);
    }

    /// Performs a DELETE Request
    public async Task DeleteAsync(int id, string url)
    {
        //Execute DELETE request
        HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");

        //Return response
        await DeserializeObject(response);
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

DELETE /Controparte/{controparte_id}/User/{user_id}

Deletes a specified User from a Controparte.

This method allows for the removal of a User from a specific Controparte. If the controparte_id param is set to 0 delete the User from every Controparte.

Parameters

Name In Type Required Description
user_id path integer(int32) true The ID of the User to delete.
controparte_id path integer(int32) true The ID of the Controparte from which the User will be deleted. If set to 0 it will delete the user from every Controparte.

Example responses

403 Response

{"type":"string","title":"string","status":0,"detail":"string","instance":"string","property1":null,"property2":null}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}

Responses

Status Meaning Description Schema
204 No Content The User was deleted successfully. None
403 Forbidden The user does not have permission to delete an User. ProblemDetails

Information

whoami

Code samples

# You can also use wget
curl -X GET /whoami \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/whoami', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/whoami',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/whoami";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /whoami

Validates the current user's API key and retrieves associated user information.

This method performs two primary checks:

Example responses

200 Response

{"id":0,"name":"string","surname":"string","mail":"string","phone":"string","cf":"string"}
{
  "id": 0,
  "name": "string",
  "surname": "string",
  "mail": "string",
  "phone": "string",
  "cf": "string"
}

Responses

Status Meaning Description Schema
200 OK A User object containing the details of the associated user if the API key is valid. User
400 Bad Request An error message detailing the issue. ProblemDetails

GetRole

Code samples

# You can also use wget
curl -X GET /Information/Role \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Information/Role', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Information/Role',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Information/Role";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Information/Role

Retrieves a collection of all defined user roles.

Example responses

200 Response

[{"role_id":0,"role_name_primary":"string","role_name_secondary":"string","description":"string","ws_can_create":true,"ws_can_invite":true,"doc_can_upload":true,"doc_can_edit":true,"doc_can_share":true}]
[
  {
    "role_id": 0,
    "role_name_primary": "string",
    "role_name_secondary": "string",
    "description": "string",
    "ws_can_create": true,
    "ws_can_invite": true,
    "doc_can_upload": true,
    "doc_can_edit": true,
    "doc_can_share": true
  }
]

Responses

Status Meaning Description Schema
200 OK Returns the collection of user roles. Inline

Response Schema

Status Code 200

Name Type Nullable
Role [Role] false
» role_id integer(int32) false
» role_name_primary string false
» role_name_secondary string true
» description string true
» ws_can_create boolean false
» ws_can_invite boolean false
» doc_can_upload boolean false
» doc_can_edit boolean false
» doc_can_share boolean false

GetStatus

Code samples

# You can also use wget
curl -X GET /Information/Status \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Information/Status', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Information/Status',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Information/Status";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Information/Status

Retrieves a collection of all possible workflow statuses.

Example responses

200 Response

[{"status_id":0,"title":"string","color":"string"}]
[
  {
    "status_id": 0,
    "title": "string",
    "color": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK Returns the collection of workflow statuses. Inline

Response Schema

Status Code 200

Name Type Nullable
Status [Status] false
» status_id integer(int32) false
» title string true
» color string true

GetCategory

Code samples

# You can also use wget
curl -X GET /Information/Category \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Information/Category', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Information/Category',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Information/Category";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Information/Category

Retrieves a collection of all document categories.

Example responses

200 Response

[{"category_id":0,"category_name":"string"}]
[
  {
    "category_id": 0,
    "category_name": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK Returns the collection of document categories. Inline

Response Schema

Status Code 200

Name Type Nullable
DocumentCategory [DocumentCategory] false
» category_id integer(int32) false
» category_name string false

GetSignOption

Code samples

# You can also use wget
curl -X GET /Information/SignOption \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Information/SignOption', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Information/SignOption',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Information/SignOption";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Information/SignOption

Retrieves a collection of all sign options.

Example responses

200 Response

[{"sign_option_id":0,"sign_name":"string","required_data":"string"}]
[
  {
    "sign_option_id": 0,
    "sign_name": "string",
    "required_data": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK Returns the collection of sign options. Inline

Response Schema

Status Code 200

Name Type Nullable
SignOption [SignOption] false
» sign_option_id integer(int32) false
» sign_name string false
» required_data string true

Organization

GetOrganization

Code samples

# You can also use wget
curl -X GET /Organization \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Organization', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Organization',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Organization";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Organization

Retrieves detailed information about current Organization.

Example responses

200 Response

{"organization_id":0,"organization_name":"string","master_account_id":0,"workspaces":[0],"workspace_max_number":0,"organization_logo":"string","accesses":{"property1":true,"property2":true}}
{
  "organization_id": 0,
  "organization_name": "string",
  "master_account_id": 0,
  "workspaces": [
    0
  ],
  "workspace_max_number": 0,
  "organization_logo": "string",
  "accesses": {
    "property1": true,
    "property2": true
  }
}

Responses

Status Meaning Description Schema
200 OK An Organization Object with the information of the Organization. Organization

GetOrganizationWorkspace

Code samples

# You can also use wget
curl -X GET /Organization/Workspace \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Organization/Workspace', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Organization/Workspace',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Organization/Workspace";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Organization/Workspace

Retrieves a list of all Workspaces within the current Organization to which the User has access.

Example responses

200 Response

[{"workspace_id":0,"workspace_name":"string","logo":"string"}]
[
  {
    "workspace_id": 0,
    "workspace_name": "string",
    "logo": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Workspaces. Inline

Response Schema

Status Code 200

Name Type Nullable
Workspace [Workspace] false
» workspace_id integer(int32) false
» workspace_name string false
» logo string(byte) true

GetOrganizationWorkspaceUser

Code samples

# You can also use wget
curl -X GET /Organization/User \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Organization/User', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Organization/User',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Organization/User";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Organization/User

Retrieves a list of all Users within the current Organization and Workspace.

If the Workspace-ID authentication header is set to 0, the method will retrieve all Users within the Organization.

Example responses

200 Response

[{"id":0,"name":"string","surname":"string","mail":"string","phone":"string","cf":"string","userRoles":[0],"userAuthorization":{"document":{"read":true,"write":{"property1":true,"property2":true}},"workflow":{"read":true,"write":{"property1":true,"property2":true}}},"deleted":true}]
[
  {
    "id": 0,
    "name": "string",
    "surname": "string",
    "mail": "string",
    "phone": "string",
    "cf": "string",
    "userRoles": [
      0
    ],
    "userAuthorization": {
      "document": {
        "read": true,
        "write": {
          "property1": true,
          "property2": true
        }
      },
      "workflow": {
        "read": true,
        "write": {
          "property1": true,
          "property2": true
        }
      }
    },
    "deleted": true
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Users. Inline

Response Schema

Status Code 200

Name Type Nullable
WorkspaceUser [WorkspaceUser] false
» id integer(int32) false
» name string false
» surname string false
» mail string false
» phone string true
» cf string true
» userRoles [integer] true
» userAuthorization UserAuthorization false
»» document AuthObject false
»»» read boolean false
»»» write object true
»»»» additionalProperties boolean false
»» workflow AuthObject false
» deleted boolean false

UpdateInternalUser

Code samples

# You can also use wget
curl -X PUT /Organization/User \
  -H 'Content-Type: application/json' \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.put('/Organization/User', headers = headers)

print(r.json())

const inputBody = '{
  "id": 0,
  "name": "string",
  "surname": "string",
  "mail": "string",
  "phone": "string",
  "cf": "string",
  "userRoles": [
    0
  ],
  "userAuthorization": {
    "document": {
      "read": true,
      "write": {
        "property1": true,
        "property2": true
      }
    },
    "workflow": {
      "read": true,
      "write": {
        "property1": true,
        "property2": true
      }
    }
  },
  "deleted": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Organization/User',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }



    /// Make a dummy request
    public async Task MakePutRequest()
    {
      int id = 1;
      string url = "/Organization/User";


      string json = @"{
  ""id"": 0,
  ""name"": ""string"",
  ""surname"": ""string"",
  ""mail"": ""string"",
  ""phone"": ""string"",
  ""cf"": ""string"",
  ""userRoles"": [
    0
  ],
  ""userAuthorization"": {
    ""document"": {
      ""read"": true,
      ""write"": {
        ""property1"": true,
        ""property2"": true
      }
    },
    ""workflow"": {
      ""read"": true,
      ""write"": {
        ""property1"": true,
        ""property2"": true
      }
    }
  },
  ""deleted"": true
}";
      WorkspaceUser content = JsonConvert.DeserializeObject(json);
      var result = await PutAsync(id, content, url);


    }

    /// Performs a PUT Request
    public async Task PutAsync(int id, WorkspaceUser content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute PUT request
        HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);

        //Return response
        return await DeserializeObject(response);
    }


    /// Serialize an object to Json
    private StringContent SerializeObject(WorkspaceUser content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

PUT /Organization/User

Updates the information of an existing internal User.

To update the User's information at the Organization level, set the Workspace-ID authentication header to 0.

Please note that this method does not support modifying a user's email address. If you need to change the email address, please send an email to assistenza@contractgeek.it with the old and new addresses.

Body parameter

{
  "id": 0,
  "name": "string",
  "surname": "string",
  "mail": "string",
  "phone": "string",
  "cf": "string",
  "userRoles": [
    0
  ],
  "userAuthorization": {
    "document": {
      "read": true,
      "write": {
        "property1": true,
        "property2": true
      }
    },
    "workflow": {
      "read": true,
      "write": {
        "property1": true,
        "property2": true
      }
    }
  },
  "deleted": true
}

Parameters

Name In Type Required Description
body body WorkspaceUser false User Object with the new information of the User.

Example responses

403 Response

{"type":"string","title":"string","status":0,"detail":"string","instance":"string","property1":null,"property2":null}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}

Responses

Status Meaning Description Schema
204 No Content The informations was updated successfully. None
403 Forbidden The user does not have permission to update the information. ProblemDetails

Ping

GetPing

Code samples

# You can also use wget
curl -X GET /Ping \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Ping', headers = headers)

print(r.json())


const headers = {
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Ping',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Ping";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Ping

Executes a GET request to verify the server's ability to respond.

This function is typically used for health checks or ping operations.

Responses

Status Meaning Description Schema
200 OK The current UTC timestamp. string

PostPing

Code samples

# You can also use wget
curl -X POST /Ping \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.post('/Ping', headers = headers)

print(r.json())


const headers = {
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Ping',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }


    /// Make a dummy request
    public async Task MakePostRequest()
    {
      string url = "/Ping";


      await PostAsync(null, url);

    }

    /// Performs a POST Request
    public async Task PostAsync(undefined content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute POST request
        HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
    }



    /// Serialize an object to Json
    private StringContent SerializeObject(undefined content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

POST /Ping

Executes a POST request to verify the server's ability to respond.

This function is typically used for health checks or ping operations.

Responses

Status Meaning Description Schema
200 OK The current UTC timestamp. string

PutPing

Code samples

# You can also use wget
curl -X PUT /Ping \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.put('/Ping', headers = headers)

print(r.json())


const headers = {
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Ping',
{
  method: 'PUT',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }



    /// Make a dummy request
    public async Task MakePutRequest()
    {
      int id = 1;
      string url = "/Ping";



      var result = await PutAsync(id, null, url);

    }

    /// Performs a PUT Request
    public async Task PutAsync(int id, undefined content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute PUT request
        HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);

        //Return response
        return await DeserializeObject(response);
    }


    /// Serialize an object to Json
    private StringContent SerializeObject(undefined content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

PUT /Ping

Executes a PUT request to verify the server's ability to respond.

This function is typically used for health checks or ping operations.

Responses

Status Meaning Description Schema
200 OK The current UTC timestamp. string

PatchPing

Code samples

# You can also use wget
curl -X PATCH /Ping \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.patch('/Ping', headers = headers)

print(r.json())


const headers = {
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Ping',
{
  method: 'PATCH',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }





    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

PATCH /Ping

Executes a PATCH request to verify the server's ability to respond.

This function is typically used for health checks or ping operations.

Responses

Status Meaning Description Schema
200 OK The current UTC timestamp. string

DeletePing

Code samples

# You can also use wget
curl -X DELETE /Ping \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.delete('/Ping', headers = headers)

print(r.json())


const headers = {
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Ping',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }




    /// Make a dummy request
    public async Task MakeDeleteRequest()
    {
      int id = 1;
      string url = "/Ping";

      await DeleteAsync(id, url);
    }

    /// Performs a DELETE Request
    public async Task DeleteAsync(int id, string url)
    {
        //Execute DELETE request
        HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");

        //Return response
        await DeserializeObject(response);
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

DELETE /Ping

Executes a DELETE request to verify the server's ability to respond.

This function is typically used for health checks or ping operations.

Responses

Status Meaning Description Schema
200 OK The current UTC timestamp. string

Sign

SignOpenSession

Code samples

# You can also use wget
curl -X GET /Workflow/{workflow_id}/Sign/OpenSession \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Workflow/{workflow_id}/Sign/OpenSession', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow/{workflow_id}/Sign/OpenSession',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Workflow/{workflow_id}/Sign/OpenSession";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Workflow/{workflow_id}/Sign/OpenSession

Starts a Sign Session for the specified Workflow.

Parameters

Name In Type Required Description
workflow_id path integer(int32) true ID of the Workflow to Sign.

Example responses

200 Response

"string"

Responses

Status Meaning Description Schema
200 OK The session_key of the started session. string
400 Bad Request Something went wrong. Refer to the error message for more details. ProblemDetails

SignOTPSMSSend

Code samples

# You can also use wget
curl -X GET /Workflow/{workflow_id}/Sign/{session_key}/OTP/SMS/Send \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Workflow/{workflow_id}/Sign/{session_key}/OTP/SMS/Send', headers = headers)

print(r.json())


const headers = {
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow/{workflow_id}/Sign/{session_key}/OTP/SMS/Send',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Workflow/{workflow_id}/Sign/{session_key}/OTP/SMS/Send";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Workflow/{workflow_id}/Sign/{session_key}/OTP/SMS/Send

Sends an SMS to the current User with an OTP to Sign a Workflow.

Prior to using this method, ensure to call the SignOpenSession method to obtain a session_key for your Workflow.

Parameters

Name In Type Required Description
workflow_id path integer(int32) true ID of the Workflow to Sign.
session_key path string true Current session_key of the Workflow to Sign.

Responses

Status Meaning Description Schema
200 OK The verify_id associated with the OTP. string

SignOTPSMS

Code samples

# You can also use wget
curl -X POST /Workflow/{workflow_id}/Sign/{session_key}/OTP/SMS?verify_id=string&OTP=string \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.post('/Workflow/{workflow_id}/Sign/{session_key}/OTP/SMS', params={
  'verify_id': 'string',  'OTP': 'string'
}, headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow/{workflow_id}/Sign/{session_key}/OTP/SMS?verify_id=string&OTP=string',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }


    /// Make a dummy request
    public async Task MakePostRequest()
    {
      string url = "/Workflow/{workflow_id}/Sign/{session_key}/OTP/SMS";


      await PostAsync(null, url);

    }

    /// Performs a POST Request
    public async Task PostAsync(undefined content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute POST request
        HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
    }



    /// Serialize an object to Json
    private StringContent SerializeObject(undefined content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

POST /Workflow/{workflow_id}/Sign/{session_key}/OTP/SMS

Signs a Workflow using an OTP received via SMS.

Ensure to use the same session_key that was used to call the SignOTPSMSSend method.

Parameters

Name In Type Required Description
workflow_id path integer(int32) true ID of the Workflow to Sign.
session_key path string(uuid) true Current session_key of the Workflow to Sign.
verify_id query string true Security Code associated with the OTP, recevied after a successfull call to the SignOTPSMSSend method.
OTP query string true OTP received by the User via SMS.

Example responses

200 Response

{"user_id":0,"username":"string","is_internal":true,"document_id":0,"document_name":"string","sign_id":0,"workflow_id":0,"status_id":0,"retry_url":"string","donwload_guid":"aae2db4a-3557-4b6a-ad3d-15691ece8fd5"}
{
  "user_id": 0,
  "username": "string",
  "is_internal": true,
  "document_id": 0,
  "document_name": "string",
  "sign_id": 0,
  "workflow_id": 0,
  "status_id": 0,
  "retry_url": "string",
  "donwload_guid": "aae2db4a-3557-4b6a-ad3d-15691ece8fd5"
}

Responses

Status Meaning Description Schema
200 OK Information about the signed Workflow. WorkflowOKDTO
400 Bad Request Something went wrong. Refer to the error message for more details. ProblemDetails

SignOTPMailSend

Code samples

# You can also use wget
curl -X GET /Workflow/{workflow_id}/Sign/{session_key}/OTP/Mail/Send \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Workflow/{workflow_id}/Sign/{session_key}/OTP/Mail/Send', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow/{workflow_id}/Sign/{session_key}/OTP/Mail/Send',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Workflow/{workflow_id}/Sign/{session_key}/OTP/Mail/Send";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Workflow/{workflow_id}/Sign/{session_key}/OTP/Mail/Send

Sends a Mail to the current User with an OTP to Sign a Workflow.

Prior to using this method, ensure to call the SignOpenSession method to obtain a session_key for your Workflow.

Parameters

Name In Type Required Description
workflow_id path integer(int32) true ID of the Workflow to Sign.
session_key path string true Current session_key of the Workflow to Sign.

Example responses

200 Response

"string"

Responses

Status Meaning Description Schema
200 OK The verify_id associated with the OTP. string

SignOTPMail

Code samples

# You can also use wget
curl -X POST /Workflow/{workflow_id}/Sign/{session_key}/OTP/Mail?verify_id=string&OTP=string \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.post('/Workflow/{workflow_id}/Sign/{session_key}/OTP/Mail', params={
  'verify_id': 'string',  'OTP': 'string'
}, headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow/{workflow_id}/Sign/{session_key}/OTP/Mail?verify_id=string&OTP=string',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }


    /// Make a dummy request
    public async Task MakePostRequest()
    {
      string url = "/Workflow/{workflow_id}/Sign/{session_key}/OTP/Mail";


      await PostAsync(null, url);

    }

    /// Performs a POST Request
    public async Task PostAsync(undefined content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute POST request
        HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
    }



    /// Serialize an object to Json
    private StringContent SerializeObject(undefined content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

POST /Workflow/{workflow_id}/Sign/{session_key}/OTP/Mail

Signs a Workflow using an OTP received via Mail.

Ensure to use the same session_key that was used to call the SignOTPMailSend method.

Parameters

Name In Type Required Description
workflow_id path integer(int32) true ID of the Workflow to Sign.
session_key path string(uuid) true Current session_key of the Workflow to Sign.
verify_id query string true Security Code associated with the OTP, recevied after a successfull call to the SignOTPMailSend method.
OTP query string true OTP received by the User via Mail.

Example responses

200 Response

{"user_id":0,"username":"string","is_internal":true,"document_id":0,"document_name":"string","sign_id":0,"workflow_id":0,"status_id":0,"retry_url":"string","donwload_guid":"aae2db4a-3557-4b6a-ad3d-15691ece8fd5"}
{
  "user_id": 0,
  "username": "string",
  "is_internal": true,
  "document_id": 0,
  "document_name": "string",
  "sign_id": 0,
  "workflow_id": 0,
  "status_id": 0,
  "retry_url": "string",
  "donwload_guid": "aae2db4a-3557-4b6a-ad3d-15691ece8fd5"
}

Responses

Status Meaning Description Schema
200 OK Information about the signed Workflow. WorkflowOKDTO
400 Bad Request Something went wrong. Refer to the error message for more details. ProblemDetails

Workflow

GetWorkflows

Code samples

# You can also use wget
curl -X GET /Workflow \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Workflow', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Workflow";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Workflow

Retrieves a List of Workflows that the current user can see.

Example responses

200 Response

[{"workflow_id":0,"status_id":0}]
[
  {
    "workflow_id": 0,
    "status_id": 0
  }
]

Responses

Status Meaning Description Schema
200 OK A list of Workflows. Inline
403 Forbidden The user does not have permission to access the requested Workflow. ProblemDetails

Response Schema

Status Code 200

Name Type Nullable
WorkflowGatewayDTO [WorkflowGatewayDTO] false
» workflow_id integer(int32) false
» status_id integer(int32) false

CreateWorkflowDraft

Code samples

# You can also use wget
curl -X POST /Workflow \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.post('/Workflow', headers = headers)

print(r.json())

const inputBody = '{
  "ContentType": "string",
  "ContentDisposition": "string",
  "Headers": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  },
  "Length": 0,
  "Name": "string",
  "FileName": "string"
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }


    /// Make a dummy request
    public async Task MakePostRequest()
    {
      string url = "/Workflow";


      await PostAsync(null, url);

    }

    /// Performs a POST Request
    public async Task PostAsync(undefined content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute POST request
        HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
    }



    /// Serialize an object to Json
    private StringContent SerializeObject(undefined content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

POST /Workflow

Creates a Workflow with the "Draft" Status.

Ensure to select a Controparte as you will not have the opportunity to change this selection later in the process.

Body parameter

ContentType: string
ContentDisposition: string
Headers:
  property1:
    - string
  property2:
    - string
Length: 0
Name: string
FileName: string

Parameters

Name In Type Required Description
controparte_id query integer(int32) true ID of the to be associated with the Workflow. If set to 0, the Workflow will not be associated with any Controparte.
body body object true IFormFile with the Principale Document
» ContentType body string false none
» ContentDisposition body string false none
» Headers body object false none
»» additionalProperties body [string] false none
» Length body integer(int64) false none
» Name body string false none
» FileName body string false none

Example responses

201 Response

0
0

Responses

Status Meaning Description Schema
201 Created ID of the newly created Workflow. integer
403 Forbidden The user does not have permission to create a Workflow. ProblemDetails

UpdateWorkflowDraft

Code samples

# You can also use wget
curl -X PUT /Workflow \
  -H 'Content-Type: application/json' \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.put('/Workflow', headers = headers)

print(r.json())

const inputBody = '{
  "workflow_id": 0,
  "controparte_id": 0,
  "status_id": 0,
  "approvers": [
    0
  ],
  "sequential_approval": true,
  "signers": [
    0
  ],
  "sequential_sign": true,
  "sign_option_id": 0,
  "temp_link_delta_days_expire": 0,
  "workflow_documents": [
    {
      "document_id": 0,
      "filename": "string",
      "signBoxes": [
        {
          "user": 0,
          "page": 0,
          "page_height": 0,
          "x": 0,
          "y": 0,
          "width": 0,
          "height": 0,
          "rotation_degree": 0
        }
      ],
      "document_type": 0
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }



    /// Make a dummy request
    public async Task MakePutRequest()
    {
      int id = 1;
      string url = "/Workflow";


      string json = @"{
  ""workflow_id"": 0,
  ""controparte_id"": 0,
  ""status_id"": 0,
  ""approvers"": [
    0
  ],
  ""sequential_approval"": true,
  ""signers"": [
    0
  ],
  ""sequential_sign"": true,
  ""sign_option_id"": 0,
  ""temp_link_delta_days_expire"": 0,
  ""workflow_documents"": [
    {
      ""document_id"": 0,
      ""filename"": ""string"",
      ""signBoxes"": [
        {
          ""user"": 0,
          ""page"": 0,
          ""page_height"": 0,
          ""x"": 0,
          ""y"": 0,
          ""width"": 0,
          ""height"": 0,
          ""rotation_degree"": 0
        }
      ],
      ""document_type"": 0
    }
  ]
}";
      Workflow content = JsonConvert.DeserializeObject(json);
      var result = await PutAsync(id, content, url);


    }

    /// Performs a PUT Request
    public async Task PutAsync(int id, Workflow content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute PUT request
        HttpResponseMessage response = await Client.PutAsync(url + $"/{id}", jsonContent);

        //Return response
        return await DeserializeObject(response);
    }


    /// Serialize an object to Json
    private StringContent SerializeObject(Workflow content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

PUT /Workflow

Updates the information of a Workflow in a Draft Status.

This method performs several formal checks with the Approvers/Signers array. It verifies if each Approver/Signer is an approver/signer in the Workspace or is an External User of the associated Controparte. It also checks if each signer has at least one signbox in at least one document of the Workflow and verifies if each user of a signbox is in the Signers array.

Body parameter

{
  "workflow_id": 0,
  "controparte_id": 0,
  "status_id": 0,
  "approvers": [
    0
  ],
  "sequential_approval": true,
  "signers": [
    0
  ],
  "sequential_sign": true,
  "sign_option_id": 0,
  "temp_link_delta_days_expire": 0,
  "workflow_documents": [
    {
      "document_id": 0,
      "filename": "string",
      "signBoxes": [
        {
          "user": 0,
          "page": 0,
          "page_height": 0,
          "x": 0,
          "y": 0,
          "width": 0,
          "height": 0,
          "rotation_degree": 0
        }
      ],
      "document_type": 0
    }
  ]
}

Parameters

Name In Type Required Description
body body Workflow false Workflow Object with the new information of the Workflow.

Example responses

400 Response

{"type":"string","title":"string","status":0,"detail":"string","instance":"string","property1":null,"property2":null}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}

Responses

Status Meaning Description Schema
204 No Content The information was updated successfully. None
400 Bad Request Something went wrong. Refer to the error message for more details. ProblemDetails
403 Forbidden The user does not have permission to update the requested Workflow. ProblemDetails

GetWorkflow

Code samples

# You can also use wget
curl -X GET /Workflow/{workflow_id} \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Workflow/{workflow_id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow/{workflow_id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Workflow/{workflow_id}";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Workflow/{workflow_id}

Retrieves a Workflow within the Organization.

Parameters

Name In Type Required Description
workflow_id path integer(int32) true ID of the Workflow to retrieve.

Example responses

200 Response

{"workflow_id":0,"controparte_id":0,"status_id":0,"approvers":[0],"sequential_approval":true,"signers":[0],"sequential_sign":true,"sign_option_id":0,"temp_link_delta_days_expire":0,"workflow_documents":[{"document_id":0,"filename":"string","signBoxes":[{"user":0,"page":0,"page_height":0,"x":0,"y":0,"width":0,"height":0,"rotation_degree":0}],"document_type":0}]}
{
  "workflow_id": 0,
  "controparte_id": 0,
  "status_id": 0,
  "approvers": [
    0
  ],
  "sequential_approval": true,
  "signers": [
    0
  ],
  "sequential_sign": true,
  "sign_option_id": 0,
  "temp_link_delta_days_expire": 0,
  "workflow_documents": [
    {
      "document_id": 0,
      "filename": "string",
      "signBoxes": [
        {
          "user": 0,
          "page": 0,
          "page_height": 0,
          "x": 0,
          "y": 0,
          "width": 0,
          "height": 0,
          "rotation_degree": 0
        }
      ],
      "document_type": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The requested Workflow Object. Workflow
403 Forbidden The user does not have permission to access the requested Workflow. ProblemDetails
404 Not Found A Workflow with the specified ID was not found. ProblemDetails

DeleteWorkflow

Code samples

# You can also use wget
curl -X DELETE /Workflow/{workflow_id} \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.delete('/Workflow/{workflow_id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow/{workflow_id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }




    /// Make a dummy request
    public async Task MakeDeleteRequest()
    {
      int id = 1;
      string url = "/Workflow/{workflow_id}";

      await DeleteAsync(id, url);
    }

    /// Performs a DELETE Request
    public async Task DeleteAsync(int id, string url)
    {
        //Execute DELETE request
        HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");

        //Return response
        await DeserializeObject(response);
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

DELETE /Workflow/{workflow_id}

Deletes a Workflow that is in a Draft status.

Parameters

Name In Type Required Description
workflow_id path integer(int32) true ID of the Workflow to be deleted.

Example responses

403 Response

{"type":"string","title":"string","status":0,"detail":"string","instance":"string","property1":null,"property2":null}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}

Responses

Status Meaning Description Schema
204 No Content The workflow was deleted successfully. None
403 Forbidden The user does not have permission to delete the Workflow. ProblemDetails

DownloadWorkflow

Code samples

# You can also use wget
curl -X GET /Workflow/{workflow_id}/Download \
  -H 'Accept: application/pdf' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'application/pdf',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Workflow/{workflow_id}/Download', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/pdf',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow/{workflow_id}/Download',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Workflow/{workflow_id}/Download";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Workflow/{workflow_id}/Download

Downloads a file containing all Documents of a specified Workflow.

The 200 response returns a .pdf file if a document_id is specified or there is only one file within the Workflow.

Otherwise, it returns a .zip folder containing all the documents.

Parameters

Name In Type Required Description
workflow_id path integer(int32) true ID of the Workflow where the file are located.
document_id query integer(int32) false If specified, only the requested Document will be downloaded.

Example responses

403 Response

Responses

Status Meaning Description Schema
200 OK A file containing all requested Documents. array(byte)
403 Forbidden The user does not have permission to access the requested Workflow. ProblemDetails
404 Not Found A Workflow or a Document with the specified ID was not found. ProblemDetails

DownloadWorkflowCertificate

Code samples

# You can also use wget
curl -X GET /Workflow/{workflow_id}/Download/Certificate \
  -H 'Accept: application/pdf' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'application/pdf',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.get('/Workflow/{workflow_id}/Download/Certificate', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/pdf',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow/{workflow_id}/Download/Certificate',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }

    /// Make a dummy request
    public async Task MakeGetRequest()
    {
      string url = "/Workflow/{workflow_id}/Download/Certificate";
      var result = await GetAsync(url);
    }

    /// Performs a GET Request
    public async Task GetAsync(string url)
    {
        //Start the request
        HttpResponseMessage response = await Client.GetAsync(url);

        //Validate result
        response.EnsureSuccessStatusCode();

    }




    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

GET /Workflow/{workflow_id}/Download/Certificate

Downloads the Certificate linked to a completed Workflow.

A workflow is considered completed if is in Status 5 Approvato or 8 Firmato.

Parameters

Name In Type Required Description
workflow_id path integer(int32) true ID of the completed Workflow.

Example responses

400 Response

Responses

Status Meaning Description Schema
200 OK The Certificate as a .pdf file. array(byte)
400 Bad Request Something went wrong. Refer to the error message for more details. ProblemDetails
403 Forbidden The user does not have permission to access the requested Workflow. ProblemDetails
404 Not Found A Workflow with the specified ID was not found. ProblemDetails

AddWorkflowAttachment

Code samples

# You can also use wget
curl -X POST /Workflow/{workflow_id}/Attachment \
  -H 'Content-Type: multipart/form-data' \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.post('/Workflow/{workflow_id}/Attachment', headers = headers)

print(r.json())

const inputBody = '{
  "ContentType": "string",
  "ContentDisposition": "string",
  "Headers": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  },
  "Length": 0,
  "Name": "string",
  "FileName": "string"
}';
const headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow/{workflow_id}/Attachment',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }


    /// Make a dummy request
    public async Task MakePostRequest()
    {
      string url = "/Workflow/{workflow_id}/Attachment";


      await PostAsync(null, url);

    }

    /// Performs a POST Request
    public async Task PostAsync(undefined content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute POST request
        HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
    }



    /// Serialize an object to Json
    private StringContent SerializeObject(undefined content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

POST /Workflow/{workflow_id}/Attachment

Adds an "Attachment" file to the selected Workflow.

Body parameter

ContentType: string
ContentDisposition: string
Headers:
  property1:
    - string
  property2:
    - string
Length: 0
Name: string
FileName: string

Parameters

Name In Type Required Description
workflow_id path integer(int32) true ID of the Workflow to which the Attachment will be added.
body body object false IFormFile with the Attachment Document
» ContentType body string false none
» ContentDisposition body string false none
» Headers body object false none
»» additionalProperties body [string] false none
» Length body integer(int64) false none
» Name body string false none
» FileName body string false none

Example responses

200 Response

0
0

Responses

Status Meaning Description Schema
201 Created ID of the newly added Document. None
403 Forbidden The user does not have permission to create a Workflow. None

StartWorkflowDraft

Code samples

# You can also use wget
curl -X POST /Workflow/Start/{workflow_id} \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.post('/Workflow/Start/{workflow_id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow/Start/{workflow_id}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }


    /// Make a dummy request
    public async Task MakePostRequest()
    {
      string url = "/Workflow/Start/{workflow_id}";


      await PostAsync(null, url);

    }

    /// Performs a POST Request
    public async Task PostAsync(undefined content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute POST request
        HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
    }



    /// Serialize an object to Json
    private StringContent SerializeObject(undefined content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

POST /Workflow/Start/{workflow_id}

Starts a Workflow that is currently in the "Bozza OK" status and allows for the addition of a reminder.

The Bozza Ok status corresponds to status_id = 2.

To add a reminder, specify the number of days between each reminder (days_between_reminders) and the total number of reminders to send (total_reminders_to_send). If the value of either of these parameters is less than or equal to 0, the reminder will not be set.

Parameters

Name In Type Required Description
workflow_id path integer(int32) true ID of the Workflow to be started.
days_between_reminders query integer(int32) false Number of days that should pass between each reminder. If this value is less than or equal to 0, the reminder is not set.
total_reminders_to_send query integer(int32) false Total number of reminders that should be sent. If this value is less than or equal to 0, the reminder is not set.

Example responses

400 Response

{"type":"string","title":"string","status":0,"detail":"string","instance":"string","property1":null,"property2":null}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}

Responses

Status Meaning Description Schema
200 OK The new Status ID of the Workflow. integer(int32)
400 Bad Request Something went wrong. Refer to the error message for more details. ProblemDetails
403 Forbidden The user does not have permission to access the start the requested Workflow. ProblemDetails

ArchiveWorkflow

Code samples

# You can also use wget
curl -X POST /Workflow/Archive/{workflow_id} \
  -H 'Accept: text/plain' \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'Accept': 'text/plain',
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.post('/Workflow/Archive/{workflow_id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'text/plain',
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow/Archive/{workflow_id}',
{
  method: 'POST',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }


    /// Make a dummy request
    public async Task MakePostRequest()
    {
      string url = "/Workflow/Archive/{workflow_id}";


      await PostAsync(null, url);

    }

    /// Performs a POST Request
    public async Task PostAsync(undefined content, string url)
    {
        //Serialize Object
        StringContent jsonContent = SerializeObject(content);

        //Execute POST request
        HttpResponseMessage response = await Client.PostAsync(url, jsonContent);
    }



    /// Serialize an object to Json
    private StringContent SerializeObject(undefined content)
    {
        //Serialize Object
        string jsonObject = JsonConvert.SerializeObject(content);

        //Create Json UTF8 String Content
        return new StringContent(jsonObject, Encoding.UTF8, "application/json");
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

POST /Workflow/Archive/{workflow_id}

Archives a completed Workflow.

A workflow is considered completed if is in Status 5 Approvato or 8 Firmato.

Parameters

Name In Type Required Description
workflow_id path integer(int32) true ID of the Workflow to Archive.

Example responses

201 Response

{"archive_id":0,"folder_id":0,"document_id":0}
{
  "archive_id": 0,
  "folder_id": 0,
  "document_id": 0
}

Responses

Status Meaning Description Schema
201 Created Information about the newly created Archive. ArchiveSmallDTO
400 Bad Request Something went wrong. Refer to the error message for more details. ProblemDetails
403 Forbidden The user does not have permission to access the archive the requested Workflow. ProblemDetails

DeleteWorkflowAttachment

Code samples

# You can also use wget
curl -X DELETE /Workflow/{workflow_id}/Attachment/{attachment_id} \
  -H 'X-api-key: API_KEY' \
  -H 'Organization-ID: API_KEY' \
  -H 'Workspace-ID: API_KEY'

import requests
headers = {
  'X-api-key': 'API_KEY',
  'Organization-ID': 'API_KEY',
  'Workspace-ID': 'API_KEY'
}

r = requests.delete('/Workflow/{workflow_id}/Attachment/{attachment_id}', headers = headers)

print(r.json())


const headers = {
  'X-api-key':'API_KEY',
  'Organization-ID':'API_KEY',
  'Workspace-ID':'API_KEY'
};

fetch('/Workflow/{workflow_id}/Attachment/{attachment_id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

/// <<summary>>
/// Example of Http Client
/// <</summary>>
public class HttpExample
{
    private HttpClient Client { get; set; }

    /// <<summary>>
    /// Setup http client
    /// <</summary>>
    public HttpExample()
    {
      Client = new HttpClient();
    }




    /// Make a dummy request
    public async Task MakeDeleteRequest()
    {
      int id = 1;
      string url = "/Workflow/{workflow_id}/Attachment/{attachment_id}";

      await DeleteAsync(id, url);
    }

    /// Performs a DELETE Request
    public async Task DeleteAsync(int id, string url)
    {
        //Execute DELETE request
        HttpResponseMessage response = await Client.DeleteAsync(url + $"/{id}");

        //Return response
        await DeserializeObject(response);
    }

    /// Deserialize object from request response
    private async Task DeserializeObject(HttpResponseMessage response)
    {
        //Read body 
        string responseBody = await response.Content.ReadAsStringAsync();

        //Deserialize Body to object
        var result = JsonConvert.DeserializeObject(responseBody);
    }
}

DELETE /Workflow/{workflow_id}/Attachment/{attachment_id}

Removes an Attachment from a Workflow.

Parameters

Name In Type Required Description
workflow_id path integer(int32) true ID of the Workflow from which the Attachment will be removed.
attachment_id path integer(int32) true The ID of the Attachment to be removed.

Responses

Status Meaning Description Schema
204 No Content The Attachment was removed successfully. None

Schemas

ArchiveSmallDTO

{
  "archive_id": 0,
  "folder_id": 0,
  "document_id": 0
}

Properties

Name Type Nullable Required
archive_id integer(int32) false
folder_id integer(int32) false
document_id integer(int32) false

AuthObject

{
  "read": true,
  "write": {
    "property1": true,
    "property2": true
  }
}

Properties

Name Type Nullable Required
read boolean false
write object true
» additionalProperties boolean false

Controparte

{
  "controparte_id": 0,
  "controparte_name": "string",
  "controparte_nation": "string",
  "controparte_city": "string",
  "controparte_mail": "string",
  "controparte_address": "string",
  "controparte_last_edit": "2019-08-24T14:15:22Z",
  "controparte_piva": "string",
  "controparte_webpage": "string"
}

Properties

Name Type Nullable Required
controparte_id integer(int32) false
controparte_name string true
controparte_nation string true
controparte_city string true
controparte_mail string true
controparte_address string true
controparte_last_edit string(date-time) false
controparte_piva string true
controparte_webpage string true

DocType

0

Properties

Name Type Nullable Required
anonymous integer(int32) false

Enumerated Values

Property Value
anonymous 0
anonymous 1

Document

{
  "document_id": 0,
  "filename": "string",
  "signBoxes": [
    {
      "user": 0,
      "page": 0,
      "page_height": 0,
      "x": 0,
      "y": 0,
      "width": 0,
      "height": 0,
      "rotation_degree": 0
    }
  ],
  "document_type": 0
}

Properties

Name Type Nullable Required
document_id integer(int32) false
filename string true
signBoxes [SignBox] true
document_type DocType false

DocumentCategory

{
  "category_id": 0,
  "category_name": "string"
}

Properties

Name Type Nullable Required
category_id integer(int32) false
category_name string true

Organization

{
  "organization_id": 0,
  "organization_name": "string",
  "master_account_id": 0,
  "workspaces": [
    0
  ],
  "workspace_max_number": 0,
  "organization_logo": "string",
  "accesses": {
    "property1": true,
    "property2": true
  }
}

Properties

Name Type Nullable Required
organization_id integer(int32) false
organization_name string true
master_account_id integer(int32) false
workspaces [integer] true
workspace_max_number integer(int32) false
organization_logo string(byte) true
accesses object true
» additionalProperties boolean false

ProblemDetails

{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}

Properties

Name Type Nullable Required
additionalProperties any false
type string true
title string true
status integer(int32) true
detail string true
instance string true

Role

{
  "role_id": 0,
  "role_name_primary": "string",
  "role_name_secondary": "string",
  "description": "string",
  "ws_can_create": true,
  "ws_can_invite": true,
  "doc_can_upload": true,
  "doc_can_edit": true,
  "doc_can_share": true
}

Properties

Name Type Nullable Required
role_id integer(int32) false
role_name_primary string true
role_name_secondary string true
description string true
ws_can_create boolean false
ws_can_invite boolean false
doc_can_upload boolean false
doc_can_edit boolean false
doc_can_share boolean false

SignBox

{
  "user": 0,
  "page": 0,
  "page_height": 0,
  "x": 0,
  "y": 0,
  "width": 0,
  "height": 0,
  "rotation_degree": 0
}

Properties

Name Type Nullable Required
user integer(int32) false
page integer(int32) false
page_height integer(int32) false
x integer(int32) false
y integer(int32) false
width integer(int32) false
height integer(int32) false
rotation_degree integer(int32) true

SignOption

{
  "sign_option_id": 0,
  "sign_name": "string",
  "required_data": "string"
}

Properties

Name Type Nullable Required
sign_option_id integer(int32) false
sign_name string true
required_data string true

Status

{
  "status_id": 0,
  "title": "string",
  "color": "string"
}

Properties

Name Type Nullable Required
status_id integer(int32) false
title string true
color string true

User

{
  "id": 0,
  "name": "string",
  "surname": "string",
  "mail": "string",
  "phone": "string",
  "cf": "string"
}

Properties

Name Type Nullable Required
id integer(int32) false
name string true
surname string true
mail string true
phone string true
cf string true

UserAuthorization

{
  "document": {
    "read": true,
    "write": {
      "property1": true,
      "property2": true
    }
  },
  "workflow": {
    "read": true,
    "write": {
      "property1": true,
      "property2": true
    }
  }
}

Properties

Name Type Nullable Required
document AuthObject false
workflow AuthObject false

Workflow

{
  "workflow_id": 0,
  "controparte_id": 0,
  "status_id": 0,
  "approvers": [
    0
  ],
  "sequential_approval": true,
  "signers": [
    0
  ],
  "sequential_sign": true,
  "sign_option_id": 0,
  "temp_link_delta_days_expire": 0,
  "workflow_documents": [
    {
      "document_id": 0,
      "filename": "string",
      "signBoxes": [
        {
          "user": 0,
          "page": 0,
          "page_height": 0,
          "x": 0,
          "y": 0,
          "width": 0,
          "height": 0,
          "rotation_degree": 0
        }
      ],
      "document_type": 0
    }
  ]
}

Properties

Name Type Nullable Required
workflow_id integer(int32) false
controparte_id integer(int32) false
status_id integer(int32) false
approvers [integer] true
sequential_approval boolean false
signers [integer] true
sequential_sign boolean false
sign_option_id integer(int32) false
temp_link_delta_days_expire integer(int32) false
workflow_documents [Document] true

WorkflowGatewayDTO

{
  "workflow_id": 0,
  "status_id": 0
}

Properties

Name Type Nullable Required
workflow_id integer(int32) false
status_id integer(int32) false

WorkflowOKDTO

{
  "user_id": 0,
  "username": "string",
  "is_internal": true,
  "document_id": 0,
  "document_name": "string",
  "sign_id": 0,
  "workflow_id": 0,
  "status_id": 0,
  "retry_url": "string",
  "donwload_guid": "aae2db4a-3557-4b6a-ad3d-15691ece8fd5"
}

Properties

Name Type Nullable Required
user_id integer(int32) false
username string true
is_internal boolean false
document_id integer(int32) false
document_name string true
sign_id integer(int32) false
workflow_id integer(int32) false
status_id integer(int32) false
retry_url string true
donwload_guid string(uuid) false

Workspace

{
  "workspace_id": 0,
  "workspace_name": "string",
  "logo": "string"
}

Properties

Name Type Nullable Required
workspace_id integer(int32) false
workspace_name string true
logo string(byte) true

WorkspaceUser

{
  "id": 0,
  "name": "string",
  "surname": "string",
  "mail": "string",
  "phone": "string",
  "cf": "string",
  "userRoles": [
    0
  ],
  "userAuthorization": {
    "document": {
      "read": true,
      "write": {
        "property1": true,
        "property2": true
      }
    },
    "workflow": {
      "read": true,
      "write": {
        "property1": true,
        "property2": true
      }
    }
  },
  "deleted": true
}

Properties

Name Type Nullable Required
id integer(int32) false
name string true
surname string true
mail string true
phone string true
cf string true
userRoles [integer] true
userAuthorization UserAuthorization false
deleted boolean false

Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The kitten requested is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access a kitten with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The kitten requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.