diff --git a/static/oas/Codat-Accounting.json b/static/oas/Codat-Accounting.json index f848dcfab..7f6be3d62 100644 --- a/static/oas/Codat-Accounting.json +++ b/static/oas/Codat-Accounting.json @@ -142733,14 +142733,6 @@ "description": "A phone number." }, "type": { - "$ref": "#/components/schemas/CompanyDataset/properties/phoneNumbers/items/definitions/phoneNumberType" - } - }, - "required": [ - "type" - ], - "definitions": { - "phoneNumberType": { "description": "The type of phone number", "type": "string", "enum": [ @@ -142751,7 +142743,10 @@ "Unknown" ] } - } + }, + "required": [ + "type" + ] } }, "webLinks": { diff --git a/static/oas/Codat-Commerce.json b/static/oas/Codat-Commerce.json index 415e432bc..e2a573382 100644 --- a/static/oas/Codat-Commerce.json +++ b/static/oas/Codat-Commerce.json @@ -9137,14 +9137,6 @@ "description": "A phone number." }, "type": { - "$ref": "#/components/schemas/PhoneNumber/definitions/phoneNumberType" - } - }, - "required": [ - "type" - ], - "definitions": { - "phoneNumberType": { "description": "The type of phone number", "type": "string", "enum": [ @@ -9155,7 +9147,10 @@ "Unknown" ] } - } + }, + "required": [ + "type" + ] }, "Product": { "title": "Commerce: Product", diff --git a/static/oas/Codat-Lending.json b/static/oas/Codat-Lending.json index f2335b036..9c344893a 100644 --- a/static/oas/Codat-Lending.json +++ b/static/oas/Codat-Lending.json @@ -121277,14 +121277,6 @@ "description": "A phone number." }, "type": { - "$ref": "#/components/schemas/PhoneNumber/definitions/phoneNumberType" - } - }, - "required": [ - "type" - ], - "definitions": { - "phoneNumberType": { "description": "The type of phone number", "type": "string", "enum": [ @@ -121295,7 +121287,10 @@ "Unknown" ] } - } + }, + "required": [ + "type" + ] }, "ProjectRef": { "title": "Accounting: Project reference", diff --git a/static/oas/Codat-Spend-Insights.json b/static/oas/Codat-Spend-Insights.json index 9dd095b50..f836af8a7 100644 --- a/static/oas/Codat-Spend-Insights.json +++ b/static/oas/Codat-Spend-Insights.json @@ -109,6 +109,10 @@ { "name": "Spend analysis", "description": "Get and download spend insights report data." + }, + { + "name": "Company info", + "description": "View company information fetched from the source platform." } ], "paths": { @@ -399,6 +403,345 @@ } } } + }, + "/companies/{companyId}/data/info": { + "parameters": [ + { + "$ref": "#/components/parameters/companyId" + } + ], + "get": { + "summary": "Get company info", + "description": "Gets the latest basic info for a company.", + "operationId": "get-company-info", + "x-speakeasy-name-override": "get-company-info", + "tags": [ + "Company info" + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "title": "Company information", + "description": "Company info provides standard details about a linked company such as their address, phone number, and company registration.", + "type": "object", + "properties": { + "companyName": { + "type": "string", + "nullable": true, + "description": "Name of the linked company." + }, + "accountingPlatformRef": { + "type": "string", + "nullable": true, + "description": "Identifier or reference for the company in the accounting software." + }, + "companyLegalName": { + "type": "string", + "nullable": true, + "description": "Registered legal name of the linked company." + }, + "addresses": { + "type": "array", + "nullable": true, + "description": "An array of Addresses.", + "items": { + "title": "Commerce: Address", + "x-internal": true, + "type": "object", + "properties": { + "type": { + "description": "The type of the address", + "type": "string", + "enum": [ + "Billing", + "Delivery", + "Order", + "Inventory", + "Unknown" + ] + }, + "line1": { + "description": "The first line of the address", + "type": "string" + }, + "line2": { + "description": "The second line of the address", + "type": "string" + }, + "city": { + "description": "The third line of the address, or city", + "type": "string" + }, + "region": { + "description": "The fourth line of the address, or region", + "type": "string" + }, + "country": { + "description": "The country for the address", + "type": "string" + }, + "postalCode": { + "description": "The postal (or zip) code for the address", + "type": "string" + } + } + } + }, + "phoneNumbers": { + "type": "array", + "nullable": true, + "description": "An array of phone numbers.", + "items": { + "title": "Phone", + "type": "object", + "x-internal": true, + "properties": { + "number": { + "type": "string", + "nullable": true, + "examples": [ + "+44 25691 154789", + "(877) 492-8687", + "01224 658 999" + ], + "description": "A phone number." + }, + "type": { + "description": "The type of phone number", + "type": "string", + "enum": [ + "Primary", + "Landline", + "Mobile", + "Fax", + "Unknown" + ] + } + }, + "required": [ + "type" + ] + } + }, + "webLinks": { + "type": "array", + "nullable": true, + "description": "An array of weblinks.", + "items": { + "title": "Weblink", + "description": "Weblink associated with the company.", + "type": "object", + "properties": { + "type": { + "description": "The type of the weblink.", + "type": "string", + "enum": [ + "Website", + "Social", + "Unknown" + ] + }, + "url": { + "description": "The full URL for the weblink.", + "type": "string", + "format": "url" + } + }, + "example": { + "type": "Website", + "url": "https://codat.io" + } + } + }, + "ledgerLockDate": { + "$ref": "#/components/schemas/DateTime", + "description": "If set in the accounting software, the date (in the ISO 8601 date/time format) after which accounting transactions cannot be edited. Commonly used when books are closed at year-end." + }, + "registrationNumber": { + "type": "string", + "nullable": true, + "description": "Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House." + }, + "taxNumber": { + "type": "string", + "nullable": true, + "description": "Company tax number." + }, + "financialYearStartDate": { + "$ref": "#/components/schemas/DateTime", + "description": "Start date of the financial year for the company." + }, + "baseCurrency": { + "type": "string", + "nullable": true, + "description": "Currency set in the accounting software of the linked company. Used by the currency rate." + }, + "sourceUrls": { + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "nullable": true, + "description": "URL addresses for the accounting source.\n\nFor example, for Xero integrations two URLs are returned. These have many potential use cases, such as [deep linking](https://developer.xero.com/documentation/api-guides/deep-link-xero)." + }, + "createdDate": { + "$ref": "#/components/schemas/DateTime", + "description": "Date the linked company was created in the accounting software." + }, + "supplementalData": { + "title": "Supplemental data", + "type": "object", + "x-internal": true, + "description": "Supplemental data is additional data you can include in our standard data types. \n\nIt is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data.", + "properties": { + "content": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": true + }, + "nullable": true + } + } + } + }, + "examples": [ + { + "companyName": "ACME Corporation", + "accountingPlatformRef": "4444e827-401b-4925-92cb-d79086bf3b6b", + "companyLegalName": "ACME Corporation Ltd.", + "addresses": [ + { + "type": "Billing", + "line1": "Warner House", + "line2": "98 Theobald's Road", + "city": "London", + "region": "", + "country": "United Kingdom", + "postalcode": "WC1X 8WB" + }, + { + "type": "Unknown", + "line1": "123 Sierra Way", + "line2": "", + "city": "San Pablo", + "region": "CA", + "country": "", + "postalCode": "87999" + } + ], + "phoneNumbers": [ + { + "number": "010 1234 5678", + "type": "Landline" + } + ], + "webLinks": [ + { + "type": "Website", + "url": "https://www.wbsl.com/" + } + ], + "ledgerLockDate": "2019-03-04T12:08:01.881Z", + "registrationNumber": "1234567890", + "taxNumber": "GB 123456789", + "financialYearStartDate": "2019-04-01T00:00:00Z", + "baseCurrency": "USD", + "sourceUrls": { + "url1": "https://go.xero.com/organisationlogin/default.aspx?shortcode=!rxs0Q", + "url2": "https://reporting.xero.com/!rxs0Q" + }, + "createdDate": "2020-02-03T16:42:02Z" + } + ] + }, + "examples": { + "Company info": { + "value": { + "companyName": "Codat", + "addresses": [ + { + "type": "Billing", + "line1": "301 Ink Rooms", + "line2": "28 Easton Street", + "city": "London", + "region": "England", + "country": "United Kingdom", + "postalCode": "WC1X 0BE" + }, + { + "type": "Delivery", + "line1": "28 Easton Street", + "line2": "", + "city": "London", + "region": "", + "country": "UK", + "postalCode": "WC1X 0BE" + } + ], + "phoneNumbers": [ + { + "number": "020 12345678", + "type": "Landline" + }, + { + "number": "071 23456789", + "type": "Mobile" + }, + { + "number": "020 12345678", + "type": "Fax" + } + ], + "webLinks": [ + { + "type": "Website", + "url": "https://www.codat.io/" + }, + { + "type": "Social", + "url": "https://www.linkedin.com/company/codat-limited/" + } + ], + "registrationNumber": "5590111724", + "taxNumber": "74111622555799035846", + "baseCurrency": "GBP" + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "402": { + "$ref": "#/components/responses/Payment-Required" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/Not-Found" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "429": { + "$ref": "#/components/responses/Too-Many-Requests" + }, + "500": { + "$ref": "#/components/responses/Internal-Server-Error" + }, + "503": { + "$ref": "#/components/responses/Service-Unavailable" + } + } + } } }, "webhooks": { diff --git a/static/oas/Codat-Sync-Commerce-v1.json b/static/oas/Codat-Sync-Commerce-v1.json index 8f979d67c..79249490e 100644 --- a/static/oas/Codat-Sync-Commerce-v1.json +++ b/static/oas/Codat-Sync-Commerce-v1.json @@ -14070,14 +14070,6 @@ "description": "A phone number." }, "type": { - "$ref": "#/components/schemas/AccountingCompanyDataset/properties/phoneNumbers/items/definitions/phoneNumberType" - } - }, - "required": [ - "type" - ], - "definitions": { - "phoneNumberType": { "description": "The type of phone number", "type": "string", "enum": [ @@ -14088,7 +14080,10 @@ "Unknown" ] } - } + }, + "required": [ + "type" + ] } }, "webLinks": { diff --git a/static/oas/Codat-Sync-Expenses.json b/static/oas/Codat-Sync-Expenses.json index 1c15fac6d..f34a6adeb 100644 --- a/static/oas/Codat-Sync-Expenses.json +++ b/static/oas/Codat-Sync-Expenses.json @@ -15674,14 +15674,6 @@ "description": "A phone number." }, "type": { - "$ref": "#/components/schemas/CompanyInformation/properties/phoneNumbers/items/definitions/phoneNumberType" - } - }, - "required": [ - "type" - ], - "definitions": { - "phoneNumberType": { "description": "The type of phone number", "type": "string", "enum": [ @@ -15692,7 +15684,10 @@ "Unknown" ] } - } + }, + "required": [ + "type" + ] } }, "webLinks": { diff --git a/static/oas/Codat-Sync-Payables-v1.json b/static/oas/Codat-Sync-Payables-v1.json index 4686d6c06..f09bed6ab 100644 --- a/static/oas/Codat-Sync-Payables-v1.json +++ b/static/oas/Codat-Sync-Payables-v1.json @@ -47427,14 +47427,6 @@ "description": "A phone number." }, "type": { - "$ref": "#/components/schemas/PhoneNumber/definitions/phoneNumberType" - } - }, - "required": [ - "type" - ], - "definitions": { - "phoneNumberType": { "description": "The type of phone number", "type": "string", "enum": [ @@ -47445,7 +47437,10 @@ "Unknown" ] } - } + }, + "required": [ + "type" + ] }, "PullOperation": { "title": "Pull operation", diff --git a/static/oas/Codat-Sync-Payroll.json b/static/oas/Codat-Sync-Payroll.json index 0c2cf2913..b7d595421 100644 --- a/static/oas/Codat-Sync-Payroll.json +++ b/static/oas/Codat-Sync-Payroll.json @@ -16271,14 +16271,6 @@ "description": "A phone number." }, "type": { - "$ref": "#/components/schemas/PhoneNumber/definitions/phoneNumberType" - } - }, - "required": [ - "type" - ], - "definitions": { - "phoneNumberType": { "description": "The type of phone number", "type": "string", "enum": [ @@ -16289,7 +16281,10 @@ "Unknown" ] } - } + }, + "required": [ + "type" + ] }, "PullOperation": { "title": "Pull operation",