The Swiss Code of Obligations (SR/RS 22, German: Obligationenrecht; French: Code des obligations; Italian: Diritto delle obbligazioni; Romansh: Dretg d'obligaziuns), the 5th part of the Swiss civil code, is a federal law that regulates contract law and corporations (Aktiengesellschaft). It was first adopted in 1911 (effective since 1 January 1912).
 The code of obligations is a portion of the private law (SR/RS 2) of the internal Swiss law. It is also known by its full name as Federal Act on the Amendment of the Swiss Civil Code (Part Five: The Code of Obligations).
 Swiss law is often used to regulate international contracts, as it is deemed neutral with respect to the parties. 
 In Switzerland, private law was originally left to the individual Swiss cantons, which enacted codifications such as the Zurich Law of Obligations of 1855.
 In 1864, the Bernese jurist Walther Munzinger was assigned a task to draft a unified code of obligations. This early project came to nothing, as it was not yet considered to fall under federal jurisdiction. Four years later, the Federal Council agreed to the unification of the law of obligations, and Munzinger was put in charge of thee effort. After Munzinger's death in 1873, the project fell to Heinrich Fick.
 The earliest version of the Code of Obligations was adopted in 1881, and came into force on 1 January 1883. Munzinger, the main drafter of the 1881 Code, was influenced by the Dresdner Draft and the work of Johann Caspar Bluntschli.
 The current Code of Obligations was adopted on 30 March 1911, becoming the fifth book of the Swiss Civil Code. Changes enacted in 1911 are relatively minor, mostly reflecting the influence of the German Civil Code. The Code of Obligations was drafted in a strikingly understandable style, without many instances of abstract legal terminology, so that it could be readily understood by the common population.
 Company law was subsequently revised in 1938, and the law regulating contracts of employment in 1972. The Code was revised in 2011, so that in the future requirements for book-keeping and accounting will not depend on a company's legal form, but on its financial size.
 The Code of Obligations includes five divisions. The Code of Obligations is part of the Civil Code, but its provisions are numbered individually.
 Includes general contract law, tort law, unjust enrichment.
 Includes specific contracts, including the purchase contract (184-236), employment contract (363-379), mandate contract (394-406).
 Corporate law.
 Types of business associations:
 Commercial papers.
 The contract law of the Code of Obligations is based on Roman Law traditions, and it was particularly influenced by the Pandectist school. It was also heavily influenced by the Code Napoleon of 1804.
 Swiss contract law discriminates between general and special contract rules. The general rules are based on legal theory developed in the 17th and 18th centuries, while special rules are based on Roman law traditions. It is divided into a general part, which applies to all contracts, and a special part, which applies to specific types of contracts, such as sales of goods or loans.
 The Code is governed by the principle of the freedom to contract, which includes freedom as to the content and type of the contract, and the freedom of the parties to enter into agreements which are not governed by the special part of the Code.
 One major difference compared to contract law in Common Law jurisdictions is the lack of a requirement of consideration. The concept of frustration of purpose is also not part of the Swiss legal tradition.
 The first version of the Swiss Code of Obligations influenced parts of the German Civil Code, the Chinese Code of Taiwan (Book II), the Code of South Korea (Part III) and the Code of Thailand (Book II). The Turkish Civil Code, adopted in 1926, is based on the Swiss Civil Code, which also includes the Code of Obligations.