Skip to content

Commit

Permalink
Updates to Accounting, Assets and addition of BankFeeds
Browse files Browse the repository at this point in the history
Add terms of service and contact

Improve numeric data types.
Add the format for numbers that are floats
Use of integer instead of number where appropriate.
Add descriptions for Assets and AssetTypes
Update any numeric data types
  • Loading branch information
SidneyAllen committed Nov 20, 2018
1 parent 3abc35f commit 6ac9986
Show file tree
Hide file tree
Showing 7 changed files with 1,827 additions and 200 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ OpenAPI spec 3.0
* [Fixed Assets API - yaml](https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/oas3/spec/v3/Xero_assets_1.0.0_swagger.yaml)
* [Fixed Assets API - json](https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/oas3/spec/v3/Xero_assets_1.0.0_swagger.json)


OpenAPI spec 2.0 (Swagger)
* [Accounting API - yaml](https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/oas3/spec/v2/accounting2.yaml)
* [Accounting API - json](https://raw.githubusercontent.com/XeroAPI/Xero-OpenAPI/oas3/spec/v2/accounting2.json)
Expand Down
102 changes: 61 additions & 41 deletions spec/v3/Xero_accounting_2.0.0_swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
} ],
"info" : {
"title" : "Accounting API",
"version" : "2.0.0"
"version" : "2.0.0",
"termsOfService" : "https://developer.xero.com/xero-developer-platform-terms-conditions/",
"contact" : {
"name" : "Xero Platform Team",
"email" : "[email protected]",
"url" : "https://developer.xero.com"
}
},
"paths" : {
"/Accounts" : {
Expand Down Expand Up @@ -685,7 +691,7 @@
"name" : "page",
"description" : "e.g. page=1 – Up to 100 bank transactions will be returned in a single API call with line items shown for each bank transaction",
"schema" : {
"type" : "number"
"type" : "integer"
}
} ]
},
Expand Down Expand Up @@ -1854,7 +1860,7 @@
"name" : "page",
"description" : "e.g. page=1 - Up to 100 contacts will be returned in a single API call.",
"schema" : {
"type" : "number"
"type" : "integer"
}
}, {
"in" : "query",
Expand Down Expand Up @@ -2678,7 +2684,7 @@
"name" : "page",
"description" : "e.g. page=1 – Up to 100 credit notes will be returned in a single API call with line items shown for each credit note",
"schema" : {
"type" : "number"
"type" : "integer"
}
} ]
},
Expand Down Expand Up @@ -3798,7 +3804,7 @@
"name" : "page",
"description" : "e.g. page=1 – Up to 100 invoices will be returned in a single API call with line items shown for each invoice",
"schema" : {
"type" : "number"
"type" : "integer"
}
}, {
"in" : "query",
Expand Down Expand Up @@ -4738,7 +4744,7 @@
"in" : "query",
"name" : "offset",
"schema" : {
"type" : "number"
"type" : "integer"
}
}, {
"in" : "query",
Expand Down Expand Up @@ -4811,7 +4817,7 @@
"name" : "page",
"description" : "Up to 100 linked transactions will be returned in a single API call. Use the page parameter to specify the page to be returned e.g. page=1.",
"schema" : {
"type" : "number"
"type" : "integer"
}
}, {
"in" : "query",
Expand Down Expand Up @@ -5040,7 +5046,7 @@
"name" : "page",
"description" : "e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment",
"schema" : {
"type" : "number"
"type" : "integer"
}
} ]
},
Expand Down Expand Up @@ -5547,7 +5553,7 @@
"name" : "page",
"description" : "e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment",
"schema" : {
"type" : "number"
"type" : "integer"
}
} ]
}
Expand Down Expand Up @@ -6056,7 +6062,7 @@
"name" : "page",
"description" : "e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment",
"schema" : {
"type" : "number"
"type" : "integer"
}
} ]
},
Expand Down Expand Up @@ -6239,7 +6245,7 @@
"name" : "page",
"description" : "To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned.",
"schema" : {
"type" : "number"
"type" : "integer"
}
} ]
},
Expand Down Expand Up @@ -7561,14 +7567,14 @@
"in" : "query",
"name" : "periods",
"schema" : {
"type" : "number"
"type" : "integer"
}
}, {
"in" : "query",
"name" : "timeframe",
"description" : "The period size to compare to (1=month, 3=quarter, 12=year)",
"schema" : {
"type" : "number"
"type" : "integer"
}
}, {
"in" : "query",
Expand Down Expand Up @@ -7632,14 +7638,14 @@
"name" : "period",
"description" : "The number of periods to compare (integer between 1 and 12)",
"schema" : {
"type" : "number"
"type" : "integer"
}
}, {
"in" : "query",
"name" : "timeframe",
"description" : "The period size to compare to (1=month, 3=quarter, 12=year)",
"schema" : {
"type" : "number"
"type" : "integer"
}
} ]
}
Expand Down Expand Up @@ -7775,14 +7781,15 @@
"name" : "periods",
"description" : "The number of periods to compare (integer between 1 and 12)",
"schema" : {
"type" : "number"
"type" : "integer"
}
}, {
"in" : "query",
"name" : "timeframe",
"description" : "The period size to compare to (1=month, 3=quarter, 12=year)",
"schema" : {
"type" : "number"
"type" : "string",
"enum" : [ "MONTH", "QUARTER", "YEAR" ]
}
}, {
"in" : "query",
Expand Down Expand Up @@ -8643,7 +8650,8 @@
},
"CurrencyRate" : {
"description" : "Exchange rate to base currency when money is spent or received. e.g. 0.7500 Only used for bank transactions in non base currency. If this isn’t specified for non base currency accounts then either the user-defined rate (preference) or the XE.com day rate will be used. Setting currency is only supported on overpayments.",
"type" : "number"
"type" : "number",
"format" : "float"
},
"Url" : {
"description" : "URL link to a source document – shown as “Go to App Name”",
Expand All @@ -8660,15 +8668,18 @@
},
"SubTotal" : {
"description" : "Total of bank transaction excluding taxes",
"type" : "number"
"type" : "number",
"format" : "float"
},
"TotalTax" : {
"description" : "Total tax on bank transaction",
"type" : "number"
"type" : "number",
"format" : "float"
},
"Total" : {
"description" : "Total of bank transaction tax inclusive",
"type" : "number"
"type" : "number",
"format" : "float"
},
"BankTransactionID" : {
"description" : "Xero generated unique identifier for bank transaction",
Expand Down Expand Up @@ -8718,11 +8729,13 @@
},
"Quantity" : {
"description" : "LineItem Quantity",
"type" : "string"
"type" : "number",
"format" : "float"
},
"UnitAmount" : {
"description" : "LineItem Unit Amount",
"type" : "number"
"type" : "number",
"format" : "float"
},
"ItemCode" : {
"description" : "See Items",
Expand All @@ -8738,11 +8751,13 @@
},
"TaxAmount" : {
"description" : "The tax amount is auto calculated as a percentage of the line amount (see below) based on the tax rate. This value can be overriden if the calculated <TaxAmount> is not correct.",
"type" : "number"
"type" : "number",
"format" : "float"
},
"LineAmount" : {
"description" : "If you wish to omit either of the <Quantity> or <UnitAmount> you can provide a LineAmount and Xero will calculate the missing amount for you. The line amount reflects the discounted price if a DiscountRate has been used . i.e LineAmount = Quantity * Unit Amount * ((100 – DiscountRate)/100)",
"type" : "number"
"type" : "number",
"format" : "float"
},
"Tracking" : {
"description" : "Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 <TrackingCategory> elements.",
Expand Down Expand Up @@ -8926,7 +8941,8 @@
},
"Amount" : {
"description" : "The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice e.g. 200.00",
"type" : "number"
"type" : "number",
"format" : "float"
},
"Payments" : {
"type" : "array",
Expand Down Expand Up @@ -8989,8 +9005,7 @@
},
"SortOrder" : {
"description" : "Integer – ranked order of branding theme. The default branding theme has a value of 0",
"type" : "number",
"format" : "double"
"type" : "integer"
},
"CreatedDateUTC" : {
"description" : "UTC timestamp of creation date of branding theme",
Expand Down Expand Up @@ -9301,7 +9316,7 @@
},
"Rate" : {
"description" : "CIS Deduction rate for the contact if he is a subcontractor. If the contact is not CISEnabled, then the rate is not returned",
"type" : "number"
"type" : "integer"
}
}
},
Expand Down Expand Up @@ -9534,7 +9549,8 @@
},
"Amount" : {
"description" : "the amount being applied to the invoice",
"type" : "number"
"type" : "number",
"format" : "float"
},
"Date" : {
"description" : "the date the prepayment is applied YYYY-MM-DD (read-only). This will be the latter of the invoice date and the prepayment date.",
Expand Down Expand Up @@ -10058,7 +10074,8 @@
"properties" : {
"UnitPrice" : {
"description" : "Unit Price of the item. By default UnitPrice is rounded to two decimal places. You can use 4 decimal places by adding the unitdp=4 querystring parameter to your request.",
"type" : "number"
"type" : "number",
"format" : "float"
},
"AccountCode" : {
"description" : "Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items",
Expand Down Expand Up @@ -10684,11 +10701,13 @@
},
"CurrencyRate" : {
"description" : "Exchange rate when payment is received. Only used for non base currency invoices and credit notes e.g. 0.7500",
"type" : "number"
"type" : "number",
"format" : "float"
},
"Amount" : {
"description" : "The amount of the payment. Must be less than or equal to the outstanding amount owing on the invoice e.g. 200.00",
"type" : "number"
"type" : "number",
"format" : "float"
},
"Reference" : {
"description" : "An optional description for the payment e.g. Direct Debit",
Expand Down Expand Up @@ -11449,17 +11468,15 @@
"properties" : {
"Period" : {
"description" : "Integer used with the unit e.g. 1 (every 1 week), 2 (every 2 months)",
"type" : "number",
"format" : "double"
"type" : "integer"
},
"Unit" : {
"description" : "One of the following : WEEKLY or MONTHLY",
"type" : "string"
},
"DueDate" : {
"description" : "Integer used with due date type e.g 20 (of following month), 31 (of current month)",
"type" : "number",
"format" : "double"
"type" : "integer"
},
"DueDateType" : {
"allOf" : [ {
Expand Down Expand Up @@ -11556,12 +11573,14 @@
"DisplayTaxRate" : {
"description" : "Tax Rate (decimal to 4dp) e.g 12.5000",
"readOnly" : true,
"type" : "number"
"type" : "number",
"format" : "float"
},
"EffectiveRate" : {
"description" : "Effective Tax Rate (decimal to 4dp) e.g 12.5000",
"readOnly" : true,
"type" : "number"
"type" : "number",
"format" : "float"
}
},
"required" : [ "ReportTaxType" ],
Expand All @@ -11578,7 +11597,8 @@
},
"Rate" : {
"description" : "Tax Rate (up to 4dp)",
"type" : "number"
"type" : "number",
"format" : "float"
},
"IsCompound" : {
"description" : "Boolean to describe if Tax rate is compounded.",
Expand Down Expand Up @@ -11724,7 +11744,7 @@
"properties" : {
"ErrorNumber" : {
"description" : "Exception number",
"type" : "number"
"type" : "integer"
},
"Type" : {
"description" : "Exception type",
Expand Down
Loading

0 comments on commit 6ac9986

Please sign in to comment.