Skip to main content

Create Contract

POST 

https://[AccountName].logeto.com/api/v2/Contracts

Create Contract

Request

Body

required

    Name stringrequired

    Possible values: non-empty and <= 250 characters

    Code stringnullable

    Possible values: <= 15 characters

    StartDate datenullable
    EndDate datenullable
    Description stringnullable

    Possible values: <= 500 characters

    Billable

    object

    nullable

    oneOf

    string

    Possible values: [None, Billable, ChangeAllowed, BillableChangeAllowed]

    CustomFields objectnullable
    Example: {"MyCustomField":"value","MyNestedObject":{"MyNestedProperty":"value"}}
    ExternalKey stringnullable

    Possible values: <= 100 characters

    Note stringnullable
    States string[]nullable
    ContactPerson stringnullable

    Possible values: <= 50 characters

    ContactPhone stringnullable

    Possible values: <= 30 characters

    ContactEmail stringnullable

    Possible values: <= 65 characters

    CompletionDate date-timenullable
    ResponsiblePerson guidnullable
    Customer guidnullable
    Branch guidnullable

Responses

Successfully created

Schema

    Guid guidnullable
    ExternalKey stringnullable

Authorization: AccessKey

name: AccessKeytype: apiKeyin: header
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://[AccountName].logeto.com/api/v2/Contracts");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("AccessKey", "<API_KEY_VALUE>");
var content = new StringContent("{\n \"Name\": \"string\",\n \"Code\": \"string\",\n \"StartDate\": \"2024-07-29\",\n \"EndDate\": \"2024-07-29\",\n \"Description\": \"string\",\n \"Billable\": \"None\",\n \"CustomFields\": {\n \"MyCustomField\": \"value\",\n \"MyNestedObject\": {\n \"MyNestedProperty\": \"value\"\n }\n },\n \"ExternalKey\": \"string\",\n \"Note\": \"string\",\n \"States\": [\n \"string\"\n ],\n \"ContactPerson\": \"string\",\n \"ContactPhone\": \"string\",\n \"ContactEmail\": \"string\",\n \"CompletionDate\": \"2024-07-29T15:51:28.071Z\",\n \"ResponsiblePerson\": \"string\",\n \"Customer\": \"string\",\n \"Branch\": \"string\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://[AccountName].logeto.com
Auth
Body required
{
  "Name": "string",
  "Code": "string",
  "StartDate": "2024-07-29",
  "EndDate": "2024-07-29",
  "Description": "string",
  "Billable": "None",
  "CustomFields": {
    "MyCustomField": "value",
    "MyNestedObject": {
      "MyNestedProperty": "value"
    }
  },
  "ExternalKey": "string",
  "Note": "string",
  "States": [
    "string"
  ],
  "ContactPerson": "string",
  "ContactPhone": "string",
  "ContactEmail": "string",
  "CompletionDate": "2024-07-29T15:51:28.071Z",
  "ResponsiblePerson": "string",
  "Customer": "string",
  "Branch": "string"
}
ResponseClear

Click the Send API Request button above and see the response here!