Skip to content

Commit e45e20c

Browse files
committed
Add OAS 3 files
moved spec files into v2 and v3 folders - OAS for Accounting, Assets and BankFeeds added
1 parent fcd3cd0 commit e45e20c

8 files changed

+14381
-0
lines changed

spec/v3/Xero_accounting_2.0.0_swagger.json

Lines changed: 11776 additions & 0 deletions
Large diffs are not rendered by default.

spec/v3/Xero_assets_1.0.0_swagger.json

Lines changed: 509 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 384 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,384 @@
1+
openapi: 3.0.0
2+
info:
3+
version: "1.0.0"
4+
title: Xero Assets API
5+
description: This the Xero Assets API
6+
contact:
7+
name: Xero API team
8+
9+
license:
10+
name: MIT
11+
url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE'
12+
servers:
13+
# Added by API Auto Mocking Plugin
14+
- description: SwaggerHub API Auto Mocking
15+
url: https://virtserver.swaggerhub.com/Xero/assets/1.0.0
16+
- description: Xero API servers
17+
url: https://api.xero.com/assets.xro/1.0/
18+
paths:
19+
/Assets:
20+
get:
21+
tags:
22+
- Asset
23+
summary: searches fixed asset
24+
operationId: getAssets
25+
description: |
26+
By passing in the appropriate options, you can search for
27+
available fixed asset in the system
28+
parameters:
29+
- name: status
30+
in: query
31+
description: Required when retrieving a collection of assets. See Asset Status Codes
32+
schema:
33+
type: string
34+
enum: [Draft,Registered,Disposed]
35+
example: Draft
36+
- name: page
37+
in: query
38+
description: Results are paged. This specifies which page of the results to return. The default page is 1.
39+
schema:
40+
type: integer
41+
example: 1
42+
- name: pageSize
43+
in: query
44+
description: The number of records returned per page. By default the number of records returned is 10.
45+
schema:
46+
type: integer
47+
example: 5
48+
- name: orderBy
49+
in: query
50+
description: Requests can be ordered by AssetType, AssetName, AssetNumber, PurchaseDate and PurchasePrice. If the asset status is DISPOSED it also allows DisposalDate and DisposalPrice.
51+
schema:
52+
type: string
53+
enum: [AssetType, AssetName,AssetNumber,PurchaseDate, PurchasePrice,DisposalDate,DisposalPrice]
54+
example: AssetName
55+
- name: sortDirection
56+
in: query
57+
description: ASC or DESC
58+
schema:
59+
type: string
60+
enum: [asc, desc]
61+
example: ASC
62+
- name: filterBy
63+
in: query
64+
description: A string that can be used to filter the list to only return assets containing the text. Checks it against the AssetName, AssetNumber, Description and AssetTypeName fields.
65+
schema:
66+
type: string
67+
example: Draft
68+
security:
69+
- apiKey: []
70+
responses:
71+
'200':
72+
description: search results matching criteria
73+
content:
74+
application/json:
75+
schema:
76+
$ref: '#/components/schemas/Assets'
77+
'400':
78+
description: bad input parameter
79+
post:
80+
tags:
81+
- Asset
82+
summary: adds a fixed asset
83+
operationId: createAsset
84+
description: Adds an asset to the system
85+
security:
86+
- apiKey: []
87+
responses:
88+
'200':
89+
description: search results matching criteria
90+
content:
91+
application/json:
92+
schema:
93+
$ref: '#/components/schemas/Asset'
94+
'400':
95+
description: 'invalid input, object invalid'
96+
requestBody:
97+
required: true
98+
content:
99+
application/json:
100+
schema:
101+
$ref: '#/components/schemas/Asset'
102+
description: Fixed asset to add
103+
/Assets/{id}:
104+
get:
105+
tags:
106+
- Asset
107+
summary: retrieves fixed asset by id
108+
operationId: getAssetById
109+
description: |
110+
By passing in the appropriate asset id, you can search for
111+
a specific fixed asset in the system
112+
parameters:
113+
- name: id
114+
in: path
115+
required: true
116+
description: fixed asset id for single object
117+
schema:
118+
type: string
119+
format: uuid
120+
example: xxxx
121+
security:
122+
- apiKey: []
123+
responses:
124+
'200':
125+
description: search results matching criteria
126+
content:
127+
application/json:
128+
schema:
129+
$ref: '#/components/schemas/Asset'
130+
'400':
131+
description: bad input parameter
132+
/AssetTypes:
133+
get:
134+
tags:
135+
- Asset
136+
summary: searches fixed asset types
137+
operationId: getAssetTypes
138+
description: |
139+
By passing in the appropriate options, you can search for
140+
available fixed asset types in the system
141+
security:
142+
- apiKey: []
143+
responses:
144+
'200':
145+
description: search results matching criteria
146+
content:
147+
application/json:
148+
schema:
149+
type: array
150+
items:
151+
$ref: '#/components/schemas/AssetType'
152+
'400':
153+
description: bad input parameter
154+
post:
155+
tags:
156+
- Asset
157+
summary: adds a fixed asset type
158+
operationId: createAssetType
159+
description: Adds an fixed asset type to the system
160+
security:
161+
- apiKey: []
162+
responses:
163+
'200':
164+
description: search results matching criteria
165+
content:
166+
application/json:
167+
schema:
168+
$ref: '#/components/schemas/AssetType'
169+
'400':
170+
description: 'invalid input, object invalid'
171+
'409':
172+
description: an existing type already exists
173+
requestBody:
174+
content:
175+
application/json:
176+
schema:
177+
$ref: '#/components/schemas/AssetType'
178+
description: Asset type to add
179+
/Settings:
180+
get:
181+
tags:
182+
- Asset
183+
summary: searches fixed asset settings
184+
operationId: getAssetSettings
185+
description: |
186+
By passing in the appropriate options, you can search for
187+
available fixed asset types in the system
188+
security:
189+
- apiKey: []
190+
responses:
191+
'200':
192+
description: search results matching criteria
193+
content:
194+
application/json:
195+
schema:
196+
$ref: '#/components/schemas/Setting'
197+
'400':
198+
description: bad input parameter
199+
components:
200+
securitySchemes:
201+
ApiKeyAuth:
202+
type: apiKey
203+
in: header
204+
name: X-API-Key
205+
schemas:
206+
Assets:
207+
type: object
208+
properties:
209+
pagination:
210+
$ref: '#/components/schemas/Pagination'
211+
items:
212+
type: array
213+
items:
214+
$ref: '#/components/schemas/Asset'
215+
Pagination:
216+
properties:
217+
page:
218+
type: integer
219+
example: 1
220+
pageSize:
221+
type: integer
222+
example: 10
223+
pageCount:
224+
type: integer
225+
example: 1
226+
itemCount:
227+
type: integer
228+
example: 2
229+
Asset:
230+
type: object
231+
required:
232+
- assetId
233+
- assetName
234+
- bookDepreciationSetting
235+
properties:
236+
assetId:
237+
type: string
238+
format: uuid
239+
example: "3b5b3a38-5649-495f-87a1-14a4e5918634"
240+
assetName:
241+
type: string
242+
example: "Awesome Truck 3"
243+
assetNumber:
244+
type: string
245+
format: string
246+
example: "FA-0013"
247+
purchaseDate:
248+
type: string
249+
format: date
250+
example: "2015-07-01T00:00:00"
251+
purchasePrice:
252+
type: integer
253+
example: "1000"
254+
disposalPrice:
255+
type: integer
256+
example: 0
257+
assetStatus:
258+
type: string
259+
example: "Draft"
260+
warrantyExpiryDate:
261+
type: string
262+
format: string
263+
example: "ca4c6b39-4f4f-43e8-98da-5e1f350a6694"
264+
serialNumber:
265+
type: string
266+
format: string
267+
example: "ca4c6b39-4f4f-43e8-98da-5e1f350a6694"
268+
bookDepreciationSetting:
269+
$ref: '#/components/schemas/BookDepreciationSetting'
270+
bookDepreciationDetail:
271+
$ref: '#/components/schemas/BookDepreciationDetail'
272+
canRollBack:
273+
type: boolean
274+
example: true
275+
AccountingBookValue:
276+
type: integer
277+
example: 0
278+
AssetType:
279+
type: object
280+
required:
281+
- assetTypeId
282+
- assetTypeName
283+
- bookDepreciationSetting
284+
properties:
285+
assetTypeId:
286+
type: string
287+
format: uuid
288+
example: "5da209c5-5e19-4a43-b925-71b776c49ced"
289+
assetTypeName:
290+
type: string
291+
example: "Computer Equipment"
292+
fixedAssetAccountId:
293+
type: string
294+
format: string
295+
example: "24e260f1-bfc4-4766-ad7f-8a8ce01de879"
296+
depreciationExpenseAccountId:
297+
type: string
298+
format: string
299+
example: "b23fc79b-d66b-44b0-a240-e138e086fcbc"
300+
accumulatedDepreciationAccountId:
301+
type: string
302+
format: string
303+
example: "ca4c6b39-4f4f-43e8-98da-5e1f350a6694"
304+
bookDepreciationSetting:
305+
$ref: '#/components/schemas/BookDepreciationSetting'
306+
locks:
307+
type: integer
308+
example: 33
309+
BookDepreciationSetting:
310+
required:
311+
- name
312+
properties:
313+
depreciationMethod:
314+
type: string
315+
enum: [NoDepreciation,StraightLine,DiminishingValue100,DiminishingValue150,DiminishingValue200,FullDepreciation]
316+
example: "StraightLine"
317+
averagingMethod:
318+
type: string
319+
enum: [FullMonth,ActualDays]
320+
example: "ActualDays"
321+
depreciationRate:
322+
type: integer
323+
example: 33
324+
effectiveLifeYears:
325+
type: integer
326+
example: 5
327+
depreciationCalculationMethod:
328+
type: string
329+
enum: [Rate,Life,None]
330+
example: "None"
331+
BookDepreciationDetail:
332+
required:
333+
- name
334+
properties:
335+
currentCapitalGain:
336+
type: integer
337+
example: 0
338+
currentGainLoss:
339+
type: integer
340+
example: 0
341+
depreciationStartDate:
342+
type: string
343+
example: "2015-07-01T00:00:00"
344+
costLimit:
345+
type: integer
346+
example: 100000
347+
residualValue:
348+
type: integer
349+
example: 10000
350+
priorAccumDepreciationAmount:
351+
type: integer
352+
example: 0
353+
currentAccumDepreciationAmount:
354+
type: integer
355+
example: 0
356+
Setting:
357+
required:
358+
- name
359+
properties:
360+
assetNumberPrefix:
361+
type: string
362+
example: "StraightLine"
363+
assetNumberSequence:
364+
type: integer
365+
example: "StraightLine"
366+
assetStartDate:
367+
type: string
368+
example: "StraightLine"
369+
lastDepreciationDate:
370+
type: string
371+
example: "StraightLine"
372+
defaultGainOnDisposalAccountId:
373+
type: string
374+
example: "StraightLine"
375+
defaultLossOnDisposalAccountId:
376+
type: string
377+
example: "StraightLine"
378+
defaultCapitalGainOnDisposalAccount:
379+
type: string
380+
example: "StraightLine"
381+
optInForTax:
382+
type: boolean
383+
example: false
384+
type: object

0 commit comments

Comments
 (0)