Skip to content

Commit 786dea9

Browse files
authored
Merge pull request #152 from XeroAPI/sid-development
Fix several methods
2 parents b2d6245 + a2c688b commit 786dea9

File tree

1 file changed

+81
-93
lines changed

1 file changed

+81
-93
lines changed

accounting-yaml/Xero_accounting_2.0.0_swagger.yaml

Lines changed: 81 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: 3.0.0
22
info:
33
title: Accounting API
4-
version: "2.0.0"
4+
version: "2.0.1"
55
termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
66
contact:
77
name: "Xero Platform Team"
@@ -4966,18 +4966,11 @@ paths:
49664966
schema:
49674967
type: string
49684968
format: uuid
4969-
- required: true
4970-
in: header
4971-
name: contentType
4972-
description: The mime type of the attachment file you are retrieving i.e application/pdf
4973-
example: application/pdf
4974-
schema:
4975-
type: string
49764969
responses:
49774970
'200':
49784971
description: Success - return response of binary data from the Attachment to a Credit Note
49794972
content:
4980-
application/octet-stream:
4973+
application/pdf:
49814974
schema:
49824975
type: string
49834976
format: binary
@@ -5237,6 +5230,8 @@ paths:
52375230
- Accounting
52385231
operationId: createEmployees
52395232
summary: Allows you to create new employees used in Xero payrun
5233+
parameters:
5234+
- $ref: '#/components/parameters/summarizeErrors'
52405235
responses:
52415236
'200':
52425237
description: Success - return response of type Employees array with new Employee
@@ -5288,9 +5283,10 @@ paths:
52885283
- OAuth2: [accounting.settings]
52895284
tags:
52905285
- Accounting
5291-
operationId: createEmployee
5286+
operationId: updateOrCreateEmployees
52925287
summary: Allows you to create a single new employees used in Xero payrun
5293-
x-method: PUT
5288+
parameters:
5289+
- $ref: '#/components/parameters/summarizeErrors'
52945290
responses:
52955291
'200':
52965292
description: Success - return response of type Employees array with new Employee
@@ -5321,12 +5317,22 @@ paths:
53215317
$ref: '#/components/responses/400Error'
53225318
requestBody:
53235319
required: true
5324-
description: Employee object in body of request
5320+
description: Employees with array of Employee object in body of request
53255321
content:
53265322
application/json:
53275323
schema:
5328-
$ref: '#/components/schemas/Employee'
5329-
example: '{ firstName:"Nick", lastName:"Fury", externalLink:{ url:"http://twitter.com/#!/search/Nick+Fury" } }'
5324+
$ref: '#/components/schemas/Employees'
5325+
example: '{
5326+
employees:[
5327+
{
5328+
firstName:"Nick",
5329+
lastName:"Fury",
5330+
externalLink:{
5331+
url:"http://twitter.com/#!/search/Nick+Fury"
5332+
}
5333+
}
5334+
]
5335+
}'
53305336
'/Employees/{EmployeeID}':
53315337
parameters:
53325338
- $ref: '#/components/parameters/requiredHeader'
@@ -6704,18 +6710,11 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
67046710
schema:
67056711
type: string
67066712
format: uuid
6707-
- required: true
6708-
in: header
6709-
name: contentType
6710-
description: The mime type of the attachment file you are retrieving
6711-
example: application/pdf
6712-
schema:
6713-
type: string
67146713
responses:
67156714
'200':
67166715
description: Success - return response of byte array pdf version of specified Invoices
67176716
content:
6718-
application/octet-stream:
6717+
application/pdf:
67196718
schema:
67206719
type: string
67216720
format: binary
@@ -8092,6 +8091,8 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
80928091
- Accounting
80938092
operationId: createManualJournals
80948093
summary: Allows you to create one or more manual journals
8094+
parameters:
8095+
- $ref: '#/components/parameters/summarizeErrors'
80958096
responses:
80968097
'200':
80978098
description: Success - return response of type ManualJournals array with newly created ManualJournal
@@ -8193,9 +8194,10 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
81938194
- OAuth2: [accounting.transactions]
81948195
tags:
81958196
- Accounting
8196-
operationId: createManualJournal
8197+
operationId: updateOrCreateManualJournals
81978198
summary: Allows you to create a single manual journal
8198-
x-method: PUT
8199+
parameters:
8200+
- $ref: '#/components/parameters/summarizeErrors'
81998201
responses:
82008202
'200':
82018203
description: Success - return response of type ManualJournals array with newly created ManualJournal
@@ -8261,12 +8263,37 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
82618263
$ref: '#/components/responses/400Error'
82628264
requestBody:
82638265
required: true
8264-
description: ManualJournal object in body of request
8266+
description: ManualJournals array with ManualJournal object in body of request
82658267
content:
82668268
application/json:
82678269
schema:
8268-
$ref: '#/components/schemas/ManualJournal'
8269-
example: '{ narration:"Foo bar", journalLines:[ { lineAmount:100.0, accountCode:"400", description:"Hello there" }, { lineAmount:-100.0, accountCode:"400", description:"Goodbye", tracking:[ { name:"Simpsons", option:"Bart" } ] } ], date:"2019-03-14" }'
8270+
$ref: '#/components/schemas/ManualJournals'
8271+
example: '{
8272+
manualJournals:[
8273+
{
8274+
narration:"Foo bar",
8275+
journalLines:[
8276+
{
8277+
lineAmount:100.0,
8278+
accountCode:"400",
8279+
description:"Hello there"
8280+
},
8281+
{
8282+
lineAmount:-100.0,
8283+
accountCode:"400",
8284+
description:"Goodbye",
8285+
tracking:[
8286+
{
8287+
name:"Simpsons",
8288+
option:"Bart"
8289+
}
8290+
]
8291+
}
8292+
],
8293+
date:"2019-03-14"
8294+
}
8295+
]
8296+
}'
82708297
'/ManualJournals/{ManualJournalID}':
82718298
parameters:
82728299
- $ref: '#/components/parameters/requiredHeader'
@@ -9112,6 +9139,7 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
91129139
schema:
91139140
type: string
91149141
format: uuid
9142+
- $ref: '#/components/parameters/summarizeErrors'
91159143
responses:
91169144
'200':
91179145
description: Success - return response of type Allocations array with all Allocation for Overpayments
@@ -9168,69 +9196,6 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
91689196
}
91699197
]
91709198
}'
9171-
post:
9172-
security:
9173-
- OAuth2: [accounting.transactions]
9174-
tags:
9175-
- Accounting
9176-
operationId: createOverpaymentAllocation
9177-
summary: Allows you to create a single allocations for overpayments
9178-
x-method: PUT
9179-
parameters:
9180-
- required: true
9181-
in: path
9182-
name: OverpaymentID
9183-
description: Unique identifier for a Overpayment
9184-
example: "00000000-0000-0000-000-000000000000"
9185-
schema:
9186-
type: string
9187-
format: uuid
9188-
responses:
9189-
'200':
9190-
description: Success - return response of type Allocations array with all Allocation for Overpayments
9191-
content:
9192-
application/json:
9193-
schema:
9194-
$ref: '#/components/schemas/Allocations'
9195-
example: '{
9196-
"Id": "3b7f7be2-384a-4703-bcfb-c56e9116c914",
9197-
"Status": "OK",
9198-
"ProviderName": "Java Partner Example",
9199-
"DateTimeUTC": "\/Date(1552428952968)\/",
9200-
"Allocations": [
9201-
{
9202-
"Amount": 1.00,
9203-
"Date": "\/Date(1552348800000+0000)\/",
9204-
"Invoice": {
9205-
"InvoiceID": "c45720a1-ade3-4a38-a064-d15489be6841",
9206-
"Payments": [],
9207-
"CreditNotes": [],
9208-
"Prepayments": [],
9209-
"Overpayments": [],
9210-
"HasErrors": false,
9211-
"IsDiscounted": false,
9212-
"LineItems": [],
9213-
"ValidationErrors": []
9214-
},
9215-
"Overpayment": {
9216-
"OverpaymentID": "ed7f6041-c915-4667-bd1d-54c48e92161e",
9217-
"ID": "ed7f6041-c915-4667-bd1d-54c48e92161e",
9218-
"LineItems": []
9219-
},
9220-
"ValidationErrors": []
9221-
}
9222-
]
9223-
}'
9224-
'400':
9225-
$ref: '#/components/responses/400Error'
9226-
requestBody:
9227-
required: true
9228-
description: Allocation object in body of request
9229-
content:
9230-
application/json:
9231-
schema:
9232-
$ref: '#/components/schemas/Allocation'
9233-
example: '{ invoice:{ invoiceID:"00000000-0000-0000-000-000000000000", lineItems:[], contact: {}, type: Invoice.TypeEnum.ACCPAY }, amount:1.0, date:"2019-03-12" }'
92349199
'/Overpayments/{OverpaymentID}/History':
92359200
parameters:
92369201
- $ref: '#/components/parameters/requiredHeader'
@@ -9526,8 +9491,7 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
95269491
tags:
95279492
- Accounting
95289493
operationId: createPayment
9529-
summary: Allows you to create a single payment for invoices or credit notes
9530-
x-method: PUT
9494+
summary: Allows you to create a single payment for invoices or credit notes
95319495
responses:
95329496
'200':
95339497
description: Success - return response of type Payments array for newly created Payment
@@ -10226,7 +10190,7 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
1022610190
- OAuth2: [accounting.transactions]
1022710191
tags:
1022810192
- Accounting
10229-
operationId: createPrepaymentAllocation
10193+
operationId: createPrepaymentAllocations
1023010194
summary: Allows you to create an Allocation for prepayments
1023110195
parameters:
1023210196
- required: true
@@ -10237,6 +10201,7 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
1023710201
schema:
1023810202
type: string
1023910203
format: uuid
10204+
- $ref: '#/components/parameters/summarizeErrors'
1024010205
responses:
1024110206
'200':
1024210207
description: Success - return response of type Allocations array of Allocation for all Prepayment
@@ -18870,6 +18835,15 @@ components:
1887018835
type: string
1887118836
format: date-time
1887218837
example: 2019-11-12T00:00:00
18838+
StatusAttributeString:
18839+
description: A string to indicate if a invoice status
18840+
type: string
18841+
example: ERROR
18842+
ValidationErrors:
18843+
description: Displays array of validation error messages from the API
18844+
type: array
18845+
items:
18846+
$ref: '#/components/schemas/ValidationError'
1887318847
type: object
1887418848
ExpenseClaims:
1887518849
type: object
@@ -19162,6 +19136,11 @@ components:
1916219136
type: array
1916319137
items:
1916419138
$ref: '#/components/schemas/ValidationError'
19139+
Warnings:
19140+
description: Displays array of warning messages from the API
19141+
type: array
19142+
items:
19143+
$ref: '#/components/schemas/ValidationError'
1916519144
type: object
1916619145
OnlineInvoices:
1916719146
type: object
@@ -19551,6 +19530,10 @@ components:
1955119530
description: The Xero identifier for a Manual Journal
1955219531
type: string
1955319532
format: uuid
19533+
StatusAttributeString:
19534+
description: A string to indicate if a invoice status
19535+
type: string
19536+
example: ERROR
1955419537
Warnings:
1955519538
description: Displays array of warning messages from the API
1955619539
type: array
@@ -20808,6 +20791,11 @@ components:
2080820791
type: array
2080920792
items:
2081020793
$ref: '#/components/schemas/ValidationError'
20794+
Warnings:
20795+
description: Displays array of warning messages from the API
20796+
type: array
20797+
items:
20798+
$ref: '#/components/schemas/ValidationError'
2081120799
Attachments:
2081220800
description: Displays array of attachments from the API
2081320801
type: array

0 commit comments

Comments
 (0)