From 15b209631fc0834345b44056fcb2667fce79a03c Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Wed, 20 Apr 2022 19:05:32 +0100 Subject: [PATCH 1/2] Add getJournalByNumber call --- xero_accounting.yaml | 75 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/xero_accounting.yaml b/xero_accounting.yaml index aa742d1b6..fe68eeb99 100644 --- a/xero_accounting.yaml +++ b/xero_accounting.yaml @@ -10242,6 +10242,70 @@ paths: } ] }' + '/Journals/{JournalNumber}': + parameters: + - $ref: '#/components/parameters/requiredHeader' + get: + security: + - OAuth2: [accounting.journals.read] + tags: + - Accounting + operationId: getJournalByNumber + summary: Retrieves a specific journal using a unique journal number. + parameters: + - $ref: '#/components/parameters/JournalNumber' + responses: + '200': + description: Success - return response of type Journals array with specified Journal + content: + application/json: + schema: + $ref: '#/components/schemas/Journals' + example: '{ + "Id": "39ab8367-eb14-420d-83a9-e01ddddd21f8", + "Status": "OK", + "ProviderName": "Provider Name Example", + "DateTimeUTC": "\/Date(1552335613002)\/", + "Journals": [ + { + "JournalID": "1b31feeb-aa23-404c-8c19-24c827c53661", + "JournalDate": "\/Date(1539993600000+0000)\/", + "JournalNumber": 1, + "CreatedDateUTC": "\/Date(1541176243467+0000)\/", + "Reference": "Red Fish, Blue Fish", + "JournalLines": [ + { + "JournalLineID": "81e6b1bf-d812-4f87-8dc4-698558ae043e", + "AccountID": "b94495d0-44ab-4199-a1d0-427a4877e100", + "AccountCode": "610", + "AccountType": "CURRENT", + "AccountName": "Accounts Receivable", + "Description": "", + "NetAmount": 40.00, + "GrossAmount": 40.00, + "TaxAmount": 0.00, + "TaxType": "", + "TaxName": "", + "TrackingCategories": [] + }, + { + "JournalLineID": "ad221a8c-ebee-4c1b-88ed-d574e27e8803", + "AccountID": "e0a5d892-9f9f-44f0-a153-5cb7db125170", + "AccountCode": "200", + "AccountType": "REVENUE", + "AccountName": "Sales", + "Description": "Acme Tires", + "NetAmount": -40.00, + "GrossAmount": -40.00, + "TaxAmount": 0.00, + "TaxType": "NONE", + "TaxName": "No GST", + "TrackingCategories": [] + } + ] + } + ] + }' /LinkedTransactions: parameters: - $ref: '#/components/parameters/requiredHeader' @@ -22617,6 +22681,15 @@ components: schema: type: string format: uuid + JournalNumber: + required: true + in: path + name: JournalNumber + x-snake: journal_number + description: Number of a Journal + example: 1000 + schema: + type: integer LinkedTransactionID: required: true in: path @@ -27695,4 +27768,4 @@ components: Message: description: Validation error message type: string - type: object \ No newline at end of file + type: object From 15dd510a7c3a9b110afdf080a95b4951691449fb Mon Sep 17 00:00:00 2001 From: Rett Behrens Date: Fri, 29 Apr 2022 10:34:00 -0600 Subject: [PATCH 2/2] bump version number --- xero-app-store.yaml | 2 +- xero-finance.yaml | 2 +- xero-identity.yaml | 2 +- xero-payroll-au.yaml | 2 +- xero-payroll-nz.yaml | 2 +- xero-payroll-uk.yaml | 2 +- xero-projects.yaml | 2 +- xero_accounting.yaml | 2 +- xero_assets.yaml | 2 +- xero_bankfeeds.yaml | 2 +- xero_files.yaml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/xero-app-store.yaml b/xero-app-store.yaml index 30de564e8..ebc17c8b9 100644 --- a/xero-app-store.yaml +++ b/xero-app-store.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: "2.21.0" + version: "2.22.0" title: Xero AppStore API description: These endpoints are for Xero Partners to interact with the App Store Billing platform termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" diff --git a/xero-finance.yaml b/xero-finance.yaml index ebc94f2fa..80a755616 100644 --- a/xero-finance.yaml +++ b/xero-finance.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: "2.21.0" + version: "2.22.0" title: Xero Finance API description: The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" diff --git a/xero-identity.yaml b/xero-identity.yaml index aad46b990..b3f2788b7 100644 --- a/xero-identity.yaml +++ b/xero-identity.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: "2.21.0" + version: "2.22.0" title: Xero OAuth 2 Identity Service API description: These endpoints are related to managing authentication tokens and identity for Xero API termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" diff --git a/xero-payroll-au.yaml b/xero-payroll-au.yaml index 364283397..9e72a9738 100644 --- a/xero-payroll-au.yaml +++ b/xero-payroll-au.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: '2.21.0' + version: '2.22.0' title: 'Xero Payroll AU API' description: 'This is the Xero Payroll API for orgs in Australia region.' termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" diff --git a/xero-payroll-nz.yaml b/xero-payroll-nz.yaml index 69720c25a..4faa76ff6 100644 --- a/xero-payroll-nz.yaml +++ b/xero-payroll-nz.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: '2.21.0' + version: '2.22.0' title: 'Xero Payroll NZ' description: 'This is the Xero Payroll API for orgs in the NZ region.' termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" diff --git a/xero-payroll-uk.yaml b/xero-payroll-uk.yaml index 632371649..c1b5f54d6 100644 --- a/xero-payroll-uk.yaml +++ b/xero-payroll-uk.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: '2.21.0' + version: '2.22.0' title: 'Xero Payroll UK' description: 'This is the Xero Payroll API for orgs in the UK region.' termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" diff --git a/xero-projects.yaml b/xero-projects.yaml index b5f7bccb7..95bbebd06 100644 --- a/xero-projects.yaml +++ b/xero-projects.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: "2.21.0" + version: "2.22.0" title: Xero Projects API description: This is the Xero Projects API termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" diff --git a/xero_accounting.yaml b/xero_accounting.yaml index fe68eeb99..189a6bcd4 100644 --- a/xero_accounting.yaml +++ b/xero_accounting.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: Xero Accounting API - version: "2.21.0" + version: "2.22.0" termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" contact: name: "Xero Platform Team" diff --git a/xero_assets.yaml b/xero_assets.yaml index c9d094d63..9ffcf4ac8 100644 --- a/xero_assets.yaml +++ b/xero_assets.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: "2.21.0" + version: "2.22.0" title: Xero Assets API description: The Assets API exposes fixed asset related functions of the Xero Accounting application and can be used for a variety of purposes such as creating assets, retrieving asset valuations etc. termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" diff --git a/xero_bankfeeds.yaml b/xero_bankfeeds.yaml index f4ce8ed28..1f50f9d27 100644 --- a/xero_bankfeeds.yaml +++ b/xero_bankfeeds.yaml @@ -1,6 +1,6 @@ openapi: 3.0.0 info: - version: "2.21.0" + version: "2.22.0" title: Xero Bank Feeds API description: The Bank Feeds API is a closed API that is only available to financial institutions that have an established financial services partnership with Xero. If you're an existing financial services partner that wants access, contact your local Partner Manager. diff --git a/xero_files.yaml b/xero_files.yaml index 066cdb786..30491ce09 100644 --- a/xero_files.yaml +++ b/xero_files.yaml @@ -4,7 +4,7 @@ servers: url: https://api.xero.com/files.xro/1.0/ info: title: Xero Files API - version: "2.21.0" + version: "2.22.0" description: "These endpoints are specific to Xero Files API" termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/" contact: