diff --git a/static/oas/Codat-Accounting.json b/static/oas/Codat-Accounting.json index 7b1b0ca69..99a3c0658 100644 --- a/static/oas/Codat-Accounting.json +++ b/static/oas/Codat-Accounting.json @@ -142640,8 +142640,8 @@ } }, "CompanyDataset": { - "title": "Accounting: Company profile", - "description": "Company info provides standard details about a linked company such as their address, phone number, and company registration.\n\n> **Company information or companies?**\n> \n> Company profile is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.", + "title": "Accounting: Company information", + "description": "Company info provides standard details about a linked company such as their address, phone number, and company registration.\n\n> **Company information or companies?**\n> \n> Company information is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.", "type": "object", "properties": { "companyName": { diff --git a/static/oas/Codat-Lending.json b/static/oas/Codat-Lending.json index 35186ba82..b00f747ba 100644 --- a/static/oas/Codat-Lending.json +++ b/static/oas/Codat-Lending.json @@ -112621,8 +112621,8 @@ } }, "AccountingCompanyInfo": { - "title": "Accounting: Company profile", - "description": "Company info provides standard details about a linked company such as their address, phone number, and company registration.\n\n> **Company information or companies?**\n> \n> Company profile is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.", + "title": "Accounting: Company information", + "description": "Company info provides standard details about a linked company such as their address, phone number, and company registration.\n\n> **Company information or companies?**\n> \n> Company information is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.", "type": "object", "properties": { "companyName": { diff --git a/static/oas/Codat-Sync-Commerce-v1.json b/static/oas/Codat-Sync-Commerce-v1.json index a7a8a5355..d06a7d10f 100644 --- a/static/oas/Codat-Sync-Commerce-v1.json +++ b/static/oas/Codat-Sync-Commerce-v1.json @@ -13878,8 +13878,8 @@ ] }, "AccountingCompanyDataset": { - "title": "Accounting: Company profile", - "description": "Company info provides standard details about a linked company such as their address, phone number, and company registration.\n\n> **Company information or companies?**\n> \n> Company profile is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.", + "title": "Accounting: Company information", + "description": "Company info provides standard details about a linked company such as their address, phone number, and company registration.\n\n> **Company information or companies?**\n> \n> Company information is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.", "type": "object", "properties": { "companyName": { diff --git a/static/oas/Codat-Sync-Expenses.json b/static/oas/Codat-Sync-Expenses.json index 88ac3955a..d87144c5c 100644 --- a/static/oas/Codat-Sync-Expenses.json +++ b/static/oas/Codat-Sync-Expenses.json @@ -106,64 +106,68 @@ "description": "Create new and manage existing data connections for a company." }, { - "name": "Configuration", - "description": "View and manage mapping configuration and defaults for expense transactions." + "name": "Company info", + "description": "View the company information of your customers' linked accounting software." }, { - "name": "Sync", - "description": "Monitor the status of data syncs." + "name": "Manage data", + "description": "Control and monitor the retrieval of data from an integration." }, { - "name": "Expenses", - "description": "Create and update transactions that represent your customers' spend." + "name": "Mapping options", + "description": "Get accounts, trackingCategories and taxRates that can be used in your create and update requests." }, { - "name": "Transfers", - "description": "Create and update transactions that represent the movement of your customers' money." + "name": "Accounts", + "description": "Create accounts and view create account options." }, { - "name": "Adjustments", - "description": "Create transactions that represent your adjustments to your customers' spend." + "name": "Bank accounts", + "description": "Create bank accounts and view create bank account options." }, { - "name": "Reimbursements", - "description": "Create and update transactions that represent your customers' repayable spend." + "name": "Customers", + "description": "Get, create, and update customers." }, { - "name": "Attachments", - "description": "Attach receipts to a transaction for a complete audit trail." + "name": "Suppliers", + "description": "Get, create, and update suppliers." }, { - "name": "Transaction status", - "description": "Monitor the status of individual transactions in data syncs." + "name": "Push operations", + "description": "View historic push operations." }, { - "name": "Manage data", - "description": "Control and monitor the retrieval of data from an integration." + "name": "Configuration", + "description": "View and manage mapping configuration and defaults for expense transactions." }, { - "name": "Mapping options", - "description": "Get accounts, trackingCategories and taxRates that can be used in your create and update requests." + "name": "Expenses", + "description": "Create and update transactions that represent your customers' spend." }, { - "name": "Push operations", - "description": "View historic push operations." + "name": "Reimbursements", + "description": "Create and update transactions that represent your customers' repayable spend." }, { - "name": "Accounts", - "description": "Create accounts and view create account options." + "name": "Transfers", + "description": "Create and update transactions that represent the movement of your customers' money." }, { - "name": "Bank accounts", - "description": "Create bank accounts and view create bank account options." + "name": "Adjustments", + "description": "Create transactions that represent your adjustments to your customers' spend." }, { - "name": "Customers", - "description": "Get, create, and update customers." + "name": "Attachments", + "description": "Attach receipts to a transaction for a complete audit trail." }, { - "name": "Suppliers", - "description": "Get, create, and update suppliers." + "name": "Sync", + "description": "Monitor the status of data syncs." + }, + { + "name": "Transaction status", + "description": "Monitor the status of individual transactions in data syncs." } ], "servers": [ @@ -1159,6 +1163,116 @@ } } }, + "/companies/{companyId}/data/info": { + "get": { + "tags": [ + "Company info" + ], + "summary": "Get company info", + "description": "Gets the latest basic info for a company.", + "operationId": "get-company-info", + "parameters": [ + { + "$ref": "#/components/parameters/companyId" + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CompanyInformation" + }, + "examples": { + "Example 1": { + "value": { + "companyName": "Codat", + "accountingPlatformRef": "1700060034_ETD", + "companyLegalName": "Codat Ltd", + "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", + "city": "London", + "country": "UK", + "postalCode": "WC1X 0BE" + } + ], + "phoneNumbers": [ + { + "number": "02012 345678", + "type": "Landline" + }, + { + "number": "07123 456789", + "type": "Mobile" + }, + { + "number": "02012 345678", + "type": "Fax" + } + ], + "webLinks": [ + { + "type": "Website", + "url": "https://www.codat.io/" + }, + { + "type": "Social", + "url": "https://www.linkedin.com/company/codat-limited/" + } + ], + "registrationNumber": "5590111724", + "taxNumber": "74111622555799035846", + "financialYearStartDate": "2023-04-01T00:00:00", + "baseCurrency": "GBP", + "sourceUrls": { + "Api": "https://api.codat.io" + }, + "createdDate": "2020-03-09T15:19:26" + } + } + } + } + } + }, + "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" + } + } + } + }, "/companies/{companyId}/sync/expenses/config": { "get": { "tags": [ @@ -14727,6 +14841,11 @@ "validTransactionTypes": [ "Payment", "Refund" + ], + "validFor": [ + "expense-transactions.Payment", + "expense-transactions.Refund", + "reimbursable-expense-transactions" ] } }, @@ -14781,6 +14900,10 @@ "validTransactionTypes": { "$ref": "#/components/schemas/validTransactionTypes", "description": "Supported transaction types for the account." + }, + "validFor": { + "$ref": "#/components/schemas/validFor", + "description": "Supported endpoints for the account." } } }, @@ -15523,6 +15646,246 @@ } } }, + "CompanyInformation": { + "title": "Accounting: Company information", + "description": "Company info provides standard details about a linked company such as their address, phone number, and company registration.\n\n> **Company information or companies?**\n> \n> Company information is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.", + "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": "Accounting: Address", + "x-internal": true, + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/CompanyInformation/properties/addresses/items/definitions/accountingAddressType" + }, + "line1": { + "type": "string", + "nullable": true, + "description": "Line 1 of the customer address." + }, + "line2": { + "type": "string", + "nullable": true, + "description": "Line 2 of the customer address." + }, + "city": { + "type": "string", + "nullable": true, + "description": "City of the customer address." + }, + "region": { + "type": "string", + "nullable": true, + "description": "Region of the customer address." + }, + "country": { + "type": "string", + "nullable": true, + "description": "Country of the customer address." + }, + "postalCode": { + "type": "string", + "nullable": true, + "description": "Postal code or zip code." + } + }, + "required": [ + "type" + ], + "definitions": { + "accountingAddressType": { + "description": "The type of the address", + "type": "string", + "enum": [ + "Unknown", + "Billing", + "Delivery" + ] + } + } + } + }, + "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": { + "$ref": "#/components/schemas/CompanyInformation/properties/phoneNumbers/items/definitions/phoneNumberType" + } + }, + "required": [ + "type" + ], + "definitions": { + "phoneNumberType": { + "description": "The type of phone number", + "type": "string", + "enum": [ + "Primary", + "Landline", + "Mobile", + "Fax", + "Unknown" + ] + } + } + } + }, + "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/TransferTransactionRequest/properties/date/allOf/1", + "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/TransferTransactionRequest/properties/date/allOf/1", + "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/TransferTransactionRequest/properties/date/allOf/1", + "description": "Date the linked company was created in the accounting software." + }, + "supplementalData": { + "$ref": "#/components/schemas/SupplementalData" + } + }, + "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" + } + ] + }, "CompanyRequestBody": { "title": "Create company request", "x-internal": true, @@ -15992,58 +16355,7 @@ "nullable": true, "description": "An array of Addresses.", "items": { - "title": "Accounting: Address", - "x-internal": true, - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/Customer/allOf/0/properties/addresses/items/definitions/accountingAddressType" - }, - "line1": { - "type": "string", - "nullable": true, - "description": "Line 1 of the customer address." - }, - "line2": { - "type": "string", - "nullable": true, - "description": "Line 2 of the customer address." - }, - "city": { - "type": "string", - "nullable": true, - "description": "City of the customer address." - }, - "region": { - "type": "string", - "nullable": true, - "description": "Region of the customer address." - }, - "country": { - "type": "string", - "nullable": true, - "description": "Country of the customer address." - }, - "postalCode": { - "type": "string", - "nullable": true, - "description": "Postal code or zip code." - } - }, - "required": [ - "type" - ], - "definitions": { - "accountingAddressType": { - "description": "The type of the address", - "type": "string", - "enum": [ - "Unknown", - "Billing", - "Delivery" - ] - } - } + "$ref": "#/components/schemas/CompanyInformation/properties/addresses/items" } }, "contacts": { @@ -16129,44 +16441,11 @@ "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": { - "$ref": "#/components/schemas/Customer/definitions/contact/properties/phone/items/definitions/phoneNumberType" - } - }, - "required": [ - "type" - ], - "definitions": { - "phoneNumberType": { - "description": "The type of phone number", - "type": "string", - "enum": [ - "Primary", - "Landline", - "Mobile", - "Fax", - "Unknown" - ] - } - } + "$ref": "#/components/schemas/CompanyInformation/properties/phoneNumbers/items" } }, "address": { - "$ref": "#/components/schemas/Customer/allOf/0/properties/addresses/items", + "$ref": "#/components/schemas/CompanyInformation/properties/addresses/items", "description": "An object of Address information." }, "status": { @@ -17558,7 +17837,7 @@ "nullable": true, "description": "An array of Addresses.", "items": { - "$ref": "#/components/schemas/Customer/allOf/0/properties/addresses/items" + "$ref": "#/components/schemas/CompanyInformation/properties/addresses/items" } }, "registrationNumber": { @@ -18380,6 +18659,26 @@ } ] }, + "validFor": { + "title": "Valid endpoints", + "x-internal": true, + "type": "array", + "description": "Supported endpoints for the account.", + "nullable": false, + "items": { + "type": "string", + "enum": [ + "expense-transactions.Payment", + "expense-transactions.Refund", + "expense-transactions.Reward", + "expense-transactions.Chargeback", + "reimbursable-expense-transactions", + "transfer-transactions", + "adjustment-transactions" + ], + "example": "expense-transactions.Payment" + } + }, "validTransactionTypes": { "title": "Valid transaction types", "x-internal": true, diff --git a/static/oas/Codat-Sync-Payables-v1.json b/static/oas/Codat-Sync-Payables-v1.json index 7afa21680..d5eabff9a 100644 --- a/static/oas/Codat-Sync-Payables-v1.json +++ b/static/oas/Codat-Sync-Payables-v1.json @@ -46246,8 +46246,8 @@ ] }, "CompanyInfo": { - "title": "Accounting: Company profile", - "description": "Company info provides standard details about a linked company such as their address, phone number, and company registration.\n\n> **Company information or companies?**\n> \n> Company profile is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.", + "title": "Accounting: Company information", + "description": "Company info provides standard details about a linked company such as their address, phone number, and company registration.\n\n> **Company information or companies?**\n> \n> Company information is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.", "type": "object", "properties": { "companyName": { diff --git a/static/oas/Codat-Sync-Payroll.json b/static/oas/Codat-Sync-Payroll.json index a2f029205..0845df565 100644 --- a/static/oas/Codat-Sync-Payroll.json +++ b/static/oas/Codat-Sync-Payroll.json @@ -15089,8 +15089,8 @@ ] }, "CompanyInfo": { - "title": "Accounting: Company profile", - "description": "Company info provides standard details about a linked company such as their address, phone number, and company registration.\n\n> **Company information or companies?**\n> \n> Company profile is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.", + "title": "Accounting: Company information", + "description": "Company info provides standard details about a linked company such as their address, phone number, and company registration.\n\n> **Company information or companies?**\n> \n> Company information is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources.", "type": "object", "properties": { "companyName": {