This is a documentation of Annytab Dox Contract v1
, our own royalty-free standard that represent a contract/agreement that can be used to regulate terms in a relationship between two or more parties. This standard is flexible and can be used for all types of contracts/agreements.
This standard is based on JSON, a compact and text-based format that is used to exchange data. It’s easy to serialize objects to JSON and it’s easy to deserialize JSON to objects. This standard is available in a NuGet package: a-dox-standards (NuGet Gallery).
AnnytabDoxContract [Model]
Property
Type
Description
id
string
An identity of the agreement, this id can be used for references to this contract in other agreements, for example.
title
string
A title that in short describes what the contract is about. Examples: Apartment Lease Contract, Bill Of Sale, Letter Of Gift.
issue_date
string
The date the document was created. The date should be entered as yyyy-MM-dd (2017-09-31).
parties
IList<PartyInformation>
A list of parties involved in the contract, see the description for PartyInformation below.
articles
IList<ContractPoint>
A list of contract points (articles), see the description of ContractPoint below.
PartyInformation [Model]
Property
Type
Description
person_id
string
An identity number for the person. For example: company id or social security number. It is used with the country code (country_code) to identify a natural or legal person.
person_name
string
The name of the natural or legal person.
address_line_1
string
The first address line. May contain a C/O reference, a street name, a building number and an apartment number and more.
address_line_2
string
The second address line. May contain a C/O reference, a street name, a building number and an apartment number and more.
address_line_3
string
The third address line. May contain a C/O reference, a street name, a building number and an apartment number and more.
postcode
string
A postcode (zip-code) for the party, an alphanumeric combination that is used to identify a geographic area.
city_name
string
The city name for the party, a geographic area with its own postal address.
country_name
string
A country name for the party.
country_code
string
A 2-letter country code in accordance with ISO 3166-1 that represents the country.
state_code
string
A 2-letter code indicating the state for the party.
contact_name
string
The name of the party’s contact person, the contact’s name may differ from the party’s name.
phone_number
string
The telephone number of the party or the party’s contact person.
email
string
An email address for the party or party’s contact person.
vat_number
string
The VAT-number or sales tax number for the party.
ContractPoint [Model]
Property
Type
Description
id
string
An id for the item, can be a number, a letter or a sequence of numbers. The main points of an agreement are usually identified by numbers, while sections in the main points usually are identified with letters.
title
string
A title that in short describes the intent of the point. Example: Explanation, Transfer Date, Purchase Price.
text_html
string
The contents of the paragraph, the rule text. Html can be used for structure and presentation.
sections
IList<ContractPoint>
A list of sub-items. A point can be nested down in infinity.
JSON Example
{
"id": "9dcbfd1b-d52e-4e76-9162-2fbf137e1a1f",
"title": "Example Agreement",
"issue_date": "2018-01-19",
"parties": [
{
"person_id": "888888-7777",
"person_name": "Nils Nilsson",
"address_line_1": "Contractstreet",
"address_line_2": "",
"address_line_3": null,
"postcode": "33333",
"city_name": "City",
"country_name": "Sweden",
"country_code": "SE",
"state_code": "",
"contact_name": "Nils Nilsson",
"phone_number": "",
"email": "noemail@gmail.com",
"vat_number": ""
},
{
"person_id": "43545354354",
"person_name": "Glenn Testman",
"address_line_1": "address line 1",
"address_line_2": "address line 2",
"address_line_3": null,
"postcode": "Postcode",
"city_name": "City",
"country_name": "USA",
"country_code": "US",
"state_code": "CA",
"contact_name": "Contact name",
"phone_number": "Phonenumber",
"email": "email@email.com",
"vat_number": ""
}
],
"articles": [
{
"id": "1.",
"title": "Explanation",
"text_html": "This example agreement is intended to regulate a trade between Nils Nilsson and Glenn Testman.",
"sections": [
{
"id": "1.1.",
"title": null,
"text_html": "Nils Nilsson is referred to as the Seller in this agreement.",
"sections": []
},
{
"id": "1.2.",
"title": null,
"text_html": "Glenn Testman is referred to as the Buyer in this agreement.",
"sections": []
}
]
},
{
"id": "2.",
"title": "Transfer",
"text_html": "The seller should transfer the following object to the buyer on the date specified below if the buyer has paid the price specified below before this date.",
"sections": [
{
"id": "2.1.",
"title": null,
"text_html": "Object: Nissan Micra.",
"sections": []
},
{
"id": "2.2.",
"title": null,
"text_html": "Transfer date: 2018-10-31.",
"sections": []
},
{
"id": "2.3.",
"title": null,
"text_html": "Price: 5 000 SEK.",
"sections": []
}
]
}
]
}
Code Example
// Create a contract
AnnytabDoxContract post = new AnnytabDoxContract();
post.id = Guid.NewGuid().ToString();
post.title = "Example";
post.issue_date = DateTime.UtcNow.ToString("yyyy-MM-dd");
post.parties = new List<PartyInformation>
{
new PartyInformation
{
person_id = "888888-7777",
person_name = "Nils Nilsson",
address_line_1 = "Contractstreet",
address_line_2 = "",
postcode = "33333",
city_name = "City",
country_name = "Sweden",
country_code = "SE",
state_code = "",
contact_name = "Nils Nilsson",
phone_number = "",
email = "noemail@gmail.com",
vat_number = ""
},
new PartyInformation
{
person_id = "43545354354",
person_name = "Glenn Testman",
address_line_1 = "address line 1",
address_line_2 = "address line 2",
postcode = "Postcode",
city_name = "City",
country_name = "USA",
country_code = "US",
state_code = "CA",
contact_name = "Contact name",
phone_number = "Phonenumber",
email = "email@email.com",
vat_number = ""
}
};
post.articles = new List<ContractPoint>()
{
new ContractPoint
{
id = "1.",
title = "Explanation",
text_html = "The <b>first</b> point in the contract.",
sections = new List<ContractPoint>
{
new ContractPoint
{
id = "a)",
text_html = "Point 1.a in the contract.",
sections = new List<ContractPoint>{}
},
new ContractPoint
{
id = "b)",
text_html = "Point 1.b in the contract.",
sections = new List<ContractPoint>{}
}
}
},
new ContractPoint
{
id = "2.",
title = "Transfer Date",
text_html = "Point number 2 in the contract.",
sections = new List<ContractPoint>
{
new ContractPoint
{
id = "2.1.",
text_html = "Point 2.1 in the contract.",
sections = new List<ContractPoint>{}
},
new ContractPoint
{
id = "2.2.",
text_html = "Point 2.2 in the contract",
sections = new List<ContractPoint>{}
}
}
}
};
// Convert the object to a byte array
byte[] array = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(post));
// Write to the stream
stream.Write(array, 0, array.Length);