Skip to content

Commit 65083a1

Browse files
authored
Merge pull request #1764 from codatio/oas-sync
Automated PR created by OAS bot
2 parents fddb71f + dd1203e commit 65083a1

File tree

1 file changed

+180
-0
lines changed

1 file changed

+180
-0
lines changed

static/oas/Codat-Sync-Payables.json

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,6 +1790,186 @@
17901790
}
17911791
}
17921792
},
1793+
"/companies/{companyId}/connections/{connectionId}/payables/bills/{billId}": {
1794+
"parameters": [
1795+
{
1796+
"$ref": "#/components/parameters/companyId"
1797+
},
1798+
{
1799+
"$ref": "#/components/parameters/connectionId"
1800+
},
1801+
{
1802+
"$ref": "#/components/parameters/billId"
1803+
}
1804+
],
1805+
"put": {
1806+
"summary": "Update bill",
1807+
"description": "The *Update bill* endpoint updates an existing [bill](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company's connection.\n\n[Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services.\n\n### Supported Integrations\n\n| Integration | Supported |\n|-------------------------------|-----------|\n| FreeAgent | Yes |\n| QuickBooks Online | Yes |\n| Xero | Yes |\n| Oracle NetSuite | No |\n| Sage Intacct | No |\n| Zoho Books | No |\n",
1808+
"operationId": "update-bill",
1809+
"tags": [
1810+
"Bills"
1811+
],
1812+
"parameters": [
1813+
{
1814+
"in": "header",
1815+
"name": "Idempotency-Key",
1816+
"description": "A unique identifier to ensure idempotent behaviour for subsequent requests.",
1817+
"schema": {
1818+
"type": "string"
1819+
}
1820+
}
1821+
],
1822+
"requestBody": {
1823+
"content": {
1824+
"application/json": {
1825+
"schema": {
1826+
"$ref": "#/components/schemas/Bill/definitions/billPrototype"
1827+
},
1828+
"examples": {
1829+
"Update bill": {
1830+
"value": {
1831+
"reference": "bill_updated_ref",
1832+
"supplierRef": {
1833+
"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af"
1834+
},
1835+
"issueDate": "2023-04-23T00:00:00",
1836+
"dueDate": "2023-05-23T00:00:00",
1837+
"currency": "GBP",
1838+
"currencyRate": 1,
1839+
"lineItems": [
1840+
{
1841+
"description": "Updated line item - Microsoft Office training",
1842+
"unitAmount": 2000,
1843+
"quantity": 1,
1844+
"taxAmount": 400,
1845+
"totalAmount": 2400,
1846+
"accountRef": {
1847+
"id": "46f9461e-788b-4906-8b74-d1ea17f6dc10"
1848+
},
1849+
"taxRateRef": {
1850+
"id": "INPUT2"
1851+
}
1852+
},
1853+
{
1854+
"description": "Desktop/network support via email & phone - updated rate",
1855+
"unitAmount": 4500,
1856+
"quantity": 1,
1857+
"taxAmount": 900,
1858+
"totalAmount": 5400,
1859+
"accountRef": {
1860+
"id": "f96c9458-d724-47bf-8f74-a9d5726465ce"
1861+
},
1862+
"taxRateRef": {
1863+
"id": "INPUT2"
1864+
},
1865+
"trackingRefs": [
1866+
{
1867+
"id": "dba3d4da-f9ed-4eee-8e0b-452d11fdb1fa",
1868+
"dataType": "trackingCategories"
1869+
}
1870+
]
1871+
}
1872+
],
1873+
"status": "Open"
1874+
}
1875+
}
1876+
}
1877+
}
1878+
}
1879+
},
1880+
"responses": {
1881+
"200": {
1882+
"description": "Success",
1883+
"content": {
1884+
"application/json": {
1885+
"schema": {
1886+
"$ref": "#/components/schemas/Bill"
1887+
},
1888+
"examples": {
1889+
"Updated bill": {
1890+
"value": {
1891+
"id": "bill-1029932",
1892+
"reference": "bill_updated_ref",
1893+
"supplierRef": {
1894+
"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af",
1895+
"supplierName": "DIISR - Small Business Services"
1896+
},
1897+
"issueDate": "2023-04-23T00:00:00",
1898+
"dueDate": "2023-05-23T00:00:00",
1899+
"currency": "GBP",
1900+
"lineItems": [
1901+
{
1902+
"description": "Updated line item - Microsoft Office training",
1903+
"unitAmount": 2000,
1904+
"quantity": 1,
1905+
"taxAmount": 400,
1906+
"totalAmount": 2400,
1907+
"accountRef": {
1908+
"id": "46f9461e-788b-4906-8b74-d1ea17f6dc10"
1909+
},
1910+
"taxRateRef": {
1911+
"id": "INPUT2"
1912+
}
1913+
},
1914+
{
1915+
"description": "Desktop/network support via email & phone - updated rate",
1916+
"unitAmount": 4500,
1917+
"quantity": 1,
1918+
"taxAmount": 900,
1919+
"totalAmount": 5400,
1920+
"accountRef": {
1921+
"id": "f96c9458-d724-47bf-8f74-a9d5726465ce"
1922+
},
1923+
"taxRateRef": {
1924+
"id": "INPUT2"
1925+
},
1926+
"trackingRefs": [
1927+
{
1928+
"id": "dba3d4da-f9ed-4eee-8e0b-452d11fdb1fa",
1929+
"dataType": "trackingCategories"
1930+
}
1931+
]
1932+
}
1933+
],
1934+
"status": "Open",
1935+
"totalAmount": 7800,
1936+
"amountDue": 7800
1937+
}
1938+
}
1939+
}
1940+
}
1941+
}
1942+
},
1943+
"400": {
1944+
"$ref": "#/components/responses/BadRequest"
1945+
},
1946+
"401": {
1947+
"$ref": "#/components/responses/Unauthorized"
1948+
},
1949+
"402": {
1950+
"$ref": "#/components/responses/Payment-Required"
1951+
},
1952+
"403": {
1953+
"$ref": "#/components/responses/Forbidden"
1954+
},
1955+
"404": {
1956+
"$ref": "#/components/responses/Not-Found"
1957+
},
1958+
"409": {
1959+
"$ref": "#/components/responses/Idempotency-Conflict"
1960+
},
1961+
"429": {
1962+
"$ref": "#/components/responses/Too-Many-Requests"
1963+
},
1964+
"500": {
1965+
"$ref": "#/components/responses/Internal-Server-Error"
1966+
},
1967+
"503": {
1968+
"$ref": "#/components/responses/Service-Unavailable"
1969+
}
1970+
}
1971+
}
1972+
},
17931973
"/companies/{companyId}/connections/{connectionId}/payables/bills/{billId}/attachments": {
17941974
"parameters": [
17951975
{

0 commit comments

Comments
 (0)