diff --git a/xero-app-store.yaml b/xero-app-store.yaml
index 8f5a7eca..dec279a4 100644
--- a/xero-app-store.yaml
+++ b/xero-app-store.yaml
@@ -1,233 +1,214 @@
openapi: 3.0.0
info:
- version: "6.3.0"
+ version: 6.3.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/"
+ termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/
contact:
- name: "Xero Platform Team"
- email: "api@xero.com"
- url: "https://developer.xero.com"
+ name: Xero Platform Team
+ email: api@xero.com
+ url: https://developer.xero.com
license:
name: MIT
- url: "https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE"
+ url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE
servers:
- description: Xero App Store API
- url: "https://api.xero.com/appstore/2.0"
+ url: https://api.xero.com/appstore/2.0
paths:
- "/subscriptions/{subscriptionId}":
+ /subscriptions/{subscriptionId}:
get:
tags:
- AppStore
operationId: getSubscription
summary: Retrieves a subscription for a given subscriptionId
parameters:
- - $ref: "#/components/parameters/subscriptionId"
+ - $ref: '#/components/parameters/subscriptionId'
responses:
"200":
description: Success - return response of unique Subscription object
content:
application/json:
schema:
- $ref: "#/components/schemas/Subscription"
- example: {
- "currentPeriodEnd": "2021-07-20T03:13:48",
- "endDate": "2021-07-20T03:13:48",
- "id": "01b5a6f4-8936-4bfa-b703-830702312b87",
- "testMode": true,
- "organisationId": "fdc5be44-9b3e-4ebb-a0e9-11b9737f9a28",
- "plans": [
- {
- "id": "f617dd59-462f-46a1-9519-1765fd38b160",
- "name": "Small",
- "status": "ACTIVE",
- "subscriptionItems": [
- {
- "endDate": "2021-07-20T03:13:48",
- "id": "c7336bf6-8a47-4f13-9fc0-82420e6922c8",
- "testMode": true,
- "price": {
- "amount": 50,
- "currency": "AUD",
- "id": "31acefbe-bdb7-4329-84d6-51e9afd95327"
- },
- "product": {
- "id": "56d66073-ff78-497b-a726-ca9d56fdafa3",
- "name": "Small",
- "type": "FIXED"
- },
- "quantity": 1,
- "startDate": "2021-07-20T03:13:48"
- },
- {
- "endDate": "2021-07-20T03:13:48",
- "id": "1a25bc96-141a-4e42-a0fa-55ed51844da4",
- "testMode": true,
- "price": {
- "amount": 0.20,
- "currency": "AUD",
- "id": "15c65048-1b48-4d9f-81c0-4e1cd3a4f49c"
- },
- "product": {
- "id": "e8d8ac02-01b3-47f7-8a22-99cfe9035cf7",
- "name": "Texts",
- "type": "METERED",
- "usageUnit": "txt"
- },
- }
- ]
- }
- ],
- "startDate": "2021-07-20T03:13:48",
- "status": "ACTIVE"
- }
+ $ref: '#/components/schemas/Subscription'
+ example:
+ currentPeriodEnd: 2021-07-20T03:13:48
+ endDate: 2021-07-20T03:13:48
+ id: 01b5a6f4-8936-4bfa-b703-830702312b87
+ testMode: true
+ organisationId: fdc5be44-9b3e-4ebb-a0e9-11b9737f9a28
+ plans:
+ - id: f617dd59-462f-46a1-9519-1765fd38b160
+ name: Small
+ status: ACTIVE
+ subscriptionItems:
+ - endDate: 2021-07-20T03:13:48
+ id: c7336bf6-8a47-4f13-9fc0-82420e6922c8
+ testMode: true
+ price:
+ amount: 50
+ currency: AUD
+ id: 31acefbe-bdb7-4329-84d6-51e9afd95327
+ product:
+ id: 56d66073-ff78-497b-a726-ca9d56fdafa3
+ name: Small
+ type: FIXED
+ quantity: 1
+ startDate: 2021-07-20T03:13:48
+ - endDate: 2021-07-20T03:13:48
+ id: 1a25bc96-141a-4e42-a0fa-55ed51844da4
+ testMode: true
+ price:
+ amount: 0.20
+ currency: AUD
+ id: 15c65048-1b48-4d9f-81c0-4e1cd3a4f49c
+ product:
+ id: e8d8ac02-01b3-47f7-8a22-99cfe9035cf7
+ name: Texts
+ type: METERED
+ usageUnit: txt
+ startDate: 2021-07-20T03:13:48
+ status: ACTIVE
"404":
content:
application/json:
schema:
- $ref: "#/components/schemas/ProblemDetails"
- description: "When a failure occurs in the endpoint"
+ $ref: '#/components/schemas/ProblemDetails'
+ description: When a failure occurs in the endpoint
security:
- - OAuth2: [marketplace.billing]
- "/subscriptions/{subscriptionId}/items/{subscriptionItemId}/usage-records":
+ - OAuth2:
+ - marketplace.billing
+ /subscriptions/{subscriptionId}/items/{subscriptionItemId}/usage-records:
post:
tags:
- AppStore
operationId: postUsageRecords
- summary: "Send metered usage belonging to this subscription and subscription item"
+ summary: Send metered usage belonging to this subscription and subscription item
parameters:
- $ref: '#/components/parameters/idempotencyKey'
- - $ref: "#/components/parameters/subscriptionId"
- - $ref: "#/components/parameters/subscriptionItemId"
+ - $ref: '#/components/parameters/subscriptionId'
+ - $ref: '#/components/parameters/subscriptionItemId'
responses:
"200":
description: Success - return response of the record submitted
content:
application/json:
schema:
- $ref: "#/components/schemas/UsageRecord"
- example: {
- "usageRecordId": "2a90f7d9-4c10-4a23-9c34-b47225167a48",
- "subscriptionId": "391be708-878a-4741-acfb-c0bc9a165bdb",
- "subscriptionItemId": "b22b150f-a0db-447d-9117-d922110add64",
- "productId": "d2b133d9-95d8-4446-807a-ae7ebc7353f6",
- "pricePerUnit": 0.10,
- "quantity": 22,
- "testMode": true,
- "recordedAt": "2022-09-13T02:11:22"
- }
+ $ref: '#/components/schemas/UsageRecord'
+ example:
+ usageRecordId: 2a90f7d9-4c10-4a23-9c34-b47225167a48
+ subscriptionId: 391be708-878a-4741-acfb-c0bc9a165bdb
+ subscriptionItemId: b22b150f-a0db-447d-9117-d922110add64
+ productId: d2b133d9-95d8-4446-807a-ae7ebc7353f6
+ pricePerUnit: 0.10
+ quantity: 22
+ testMode: true
+ recordedAt: 2022-09-13T02:11:22
"404":
content:
application/json:
schema:
- $ref: "#/components/schemas/ProblemDetails"
- description: "When a failure occurs in the endpoint"
+ $ref: '#/components/schemas/ProblemDetails'
+ description: When a failure occurs in the endpoint
security:
- - OAuth2: [marketplace.billing]
+ - OAuth2:
+ - marketplace.billing
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/CreateUsageRecord"
- example: {
- "timestamp": "2022-01-21T13:01:00",
- "quantity": 10
- }
+ $ref: '#/components/schemas/CreateUsageRecord'
+ example:
+ timestamp: 2022-01-21T13:01:00
+ quantity: 10
description: Contains the quantity for the usage record to create
required: true
- "/subscriptions/{subscriptionId}/items/{subscriptionItemId}/usage-records/{usageRecordId}":
+ /subscriptions/{subscriptionId}/items/{subscriptionItemId}/usage-records/{usageRecordId}:
put:
tags:
- AppStore
operationId: putUsageRecords
- summary: "Update and existing metered usage belonging to this subscription and subscription item"
+ summary: Update and existing metered usage belonging to this subscription and subscription item
parameters:
- $ref: '#/components/parameters/idempotencyKey'
- - $ref: "#/components/parameters/subscriptionId"
- - $ref: "#/components/parameters/subscriptionItemId"
- - $ref: "#/components/parameters/usageRecordId"
+ - $ref: '#/components/parameters/subscriptionId'
+ - $ref: '#/components/parameters/subscriptionItemId'
+ - $ref: '#/components/parameters/usageRecordId'
responses:
"200":
description: Success - return response of the modified record
content:
application/json:
schema:
- $ref: "#/components/schemas/UsageRecord"
- example: {
- "usageRecordId": "2a90f7d9-4c10-4a23-9c34-b47225167a48",
- "subscriptionId": "391be708-878a-4741-acfb-c0bc9a165bdb",
- "subscriptionItemId": "b22b150f-a0db-447d-9117-d922110add64",
- "productId": "d2b133d9-95d8-4446-807a-ae7ebc7353f6",
- "pricePerUnit": 0.10,
- "quantity": 22,
- "testMode": true,
- "recordedAt": "2022-09-13T02:11:22"
- }
+ $ref: '#/components/schemas/UsageRecord'
+ example:
+ usageRecordId: 2a90f7d9-4c10-4a23-9c34-b47225167a48
+ subscriptionId: 391be708-878a-4741-acfb-c0bc9a165bdb
+ subscriptionItemId: b22b150f-a0db-447d-9117-d922110add64
+ productId: d2b133d9-95d8-4446-807a-ae7ebc7353f6
+ pricePerUnit: 0.10
+ quantity: 22
+ testMode: true
+ recordedAt: 2022-09-13T02:11:22
"404":
content:
application/json:
schema:
- $ref: "#/components/schemas/ProblemDetails"
- description: "When a failure occurs in the endpoint"
+ $ref: '#/components/schemas/ProblemDetails'
+ description: When a failure occurs in the endpoint
security:
- - OAuth2: [marketplace.billing]
+ - OAuth2:
+ - marketplace.billing
requestBody:
content:
application/json:
schema:
- $ref: "#/components/schemas/UpdateUsageRecord"
- example: {
- "quantity": 10
- }
+ $ref: '#/components/schemas/UpdateUsageRecord'
+ example:
+ quantity: 10
description: Contains the quantity for the usage record to update
required: true
- "/subscriptions/{subscriptionId}/usage-records":
+ /subscriptions/{subscriptionId}/usage-records:
get:
tags:
- AppStore
operationId: getUsageRecords
- summary: "Gets all usage records related to the subscription"
+ summary: Gets all usage records related to the subscription
parameters:
- - $ref: "#/components/parameters/subscriptionId"
+ - $ref: '#/components/parameters/subscriptionId'
responses:
"200":
description: Success - return a list of all usage record submitted against this subscription for this subscription period
content:
application/json:
schema:
- $ref: "#/components/schemas/UsageRecordsList"
- example: {
- "usageRecords": [
- {
- "usageRecordId": "206100d3-e18b-4c59-9372-e98e4367a73f",
- "subscriptionId": "7c7684cf-bbfa-4fa8-8f44-eba8d1acdc5d",
- "subscriptionItemId": "264f6fa2-65e6-48f4-8a92-57cde5499742",
- "productId": "b040838b-f85e-4e7c-8dba-5a8501e5d312",
- "pricePerUnit": 2.0,
- "quantity": 12,
- "testMode": false,
- "recordedAt": "2022-01-01T00:00:00"
- },
- {
- "usageRecordId": "47d61dc9-3c99-4587-8d55-0985f47df4a6",
- "subscriptionId": "7c7684cf-bbfa-4fa8-8f44-eba8d1acdc5d",
- "subscriptionItemId": "264f6fa2-65e6-48f4-8a92-57cde5499742",
- "productId": "ec8033e8-5e3c-4795-bfb4-bfb85fa4557e",
- "pricePerUnit": 5.0,
- "quantity": 2,
- "testMode": false,
- "recordedAt": "2022-01-01T00:00:00"
- }
- ]
- }
+ $ref: '#/components/schemas/UsageRecordsList'
+ example:
+ usageRecords:
+ - usageRecordId: 206100d3-e18b-4c59-9372-e98e4367a73f
+ subscriptionId: 7c7684cf-bbfa-4fa8-8f44-eba8d1acdc5d
+ subscriptionItemId: 264f6fa2-65e6-48f4-8a92-57cde5499742
+ productId: b040838b-f85e-4e7c-8dba-5a8501e5d312
+ pricePerUnit: 2.0
+ quantity: 12
+ testMode: false
+ recordedAt: 2022-01-01T00:00:00
+ - usageRecordId: 47d61dc9-3c99-4587-8d55-0985f47df4a6
+ subscriptionId: 7c7684cf-bbfa-4fa8-8f44-eba8d1acdc5d
+ subscriptionItemId: 264f6fa2-65e6-48f4-8a92-57cde5499742
+ productId: ec8033e8-5e3c-4795-bfb4-bfb85fa4557e
+ pricePerUnit: 5.0
+ quantity: 2
+ testMode: false
+ recordedAt: 2022-01-01T00:00:00
"404":
content:
application/json:
schema:
- $ref: "#/components/schemas/ProblemDetails"
- description: "When a failure occurs in the endpoint"
+ $ref: '#/components/schemas/ProblemDetails'
+ description: When a failure occurs in the endpoint
security:
- - OAuth2: [marketplace.billing]
+ - OAuth2:
+ - marketplace.billing
components:
securitySchemes:
OAuth2:
@@ -235,7 +216,7 @@ components:
description: For more information
flows:
clientCredentials:
- tokenUrl: "https://identity.xero.com/connect/token"
+ tokenUrl: https://identity.xero.com/connect/token
scopes:
marketplace.billing: Grant read-only access to fixed assets
parameters:
@@ -245,7 +226,7 @@ components:
name: subscriptionId
x-snake: subscription_id
description: Unique identifier for Subscription object
- example: "00000000-0000-0000-0000-000000000000"
+ example: 00000000-0000-0000-0000-000000000000
x-example-java: UUID.fromString("00000000-0000-0000-0000-000000000000")
x-example-php: '"00000000-0000-0000-0000-000000000000"'
x-example-csharp: Guid.Parse("00000000-0000-0000-0000-000000000000");
@@ -258,7 +239,7 @@ components:
name: subscriptionItemId
x-snake: subscription_item_id
description: The unique identifier of the subscriptionItem
- example: "00000000-0000-0000-0000-000000000000"
+ example: 00000000-0000-0000-0000-000000000000
x-example-java: UUID.fromString("00000000-0000-0000-0000-000000000000")
x-example-php: '"00000000-0000-0000-0000-000000000000"'
x-example-csharp: Guid.Parse("00000000-0000-0000-0000-000000000000");
@@ -271,7 +252,7 @@ components:
name: usageRecordId
x-snake: usage_record_id
description: The unique identifier of the usage record
- example: "00000000-0000-0000-0000-000000000000"
+ example: 00000000-0000-0000-0000-000000000000
x-example-java: UUID.fromString("00000000-0000-0000-0000-000000000000")
x-example-php: '"00000000-0000-0000-0000-000000000000"'
x-example-csharp: Guid.Parse("00000000-0000-0000-0000-000000000000");
@@ -283,7 +264,7 @@ components:
name: Idempotency-Key
x-snake: idempotency_key
description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
- example: "KEY_VALUE"
+ example: KEY_VALUE
schema:
type: string
schemas:
@@ -313,7 +294,7 @@ components:
description: List of plans for the subscription.
type: array
items:
- $ref: "#/components/schemas/Plan"
+ $ref: '#/components/schemas/Plan'
startDate:
description: Date when the subscription was first created.
format: date-time
@@ -323,9 +304,9 @@ components:
description: Status of the subscription. Available statuses are ACTIVE, CANCELED, and PAST_DUE.
type: string
enum:
- - ACTIVE
- - CANCELED
- - PAST_DUE
+ - ACTIVE
+ - CANCELED
+ - PAST_DUE
testMode:
description: Boolean used to indicate if the subscription is in test mode
type: boolean
@@ -354,15 +335,15 @@ components:
PENDING_ACTIVATION.
type: string
enum:
- - ACTIVE
- - CANCELED
- - PENDING_ACTIVATION
+ - ACTIVE
+ - CANCELED
+ - PENDING_ACTIVATION
subscriptionItems:
description: |
List of the subscription items belonging to the plan. It does not
include cancelled subscription items.
items:
- $ref: "#/components/schemas/SubscriptionItem"
+ $ref: '#/components/schemas/SubscriptionItem'
type: array
required:
- id
@@ -417,10 +398,10 @@ components:
type: string
price:
description: The price of the product subscribed to.
- $ref: "#/components/schemas/Price"
+ $ref: '#/components/schemas/Price'
product:
description: The product subscribed to.
- $ref: "#/components/schemas/Product"
+ $ref: '#/components/schemas/Product'
quantity:
description: The quantity of the item. For a fixed product, it is 1. For a per-seat product, it is a positive integer. For metered products, it is always null.
type: integer
@@ -437,9 +418,9 @@ components:
PENDING_ACTIVATION.
type: string
enum:
- - ACTIVE
- - CANCELED
- - PENDING_ACTIVATION
+ - ACTIVE
+ - CANCELED
+ - PENDING_ACTIVATION
testMode:
description: If the subscription is a test subscription
type: boolean
@@ -469,9 +450,9 @@ components:
* METERED: Customers are charged per use of this product
type: string
enum:
- - FIXED
- - PER_SEAT
- - METERED
+ - FIXED
+ - PER_SEAT
+ - METERED
usageUnit:
description: The unit of the usage product. e.g. "user", "minutes", "SMS", etc
type: string
@@ -534,8 +515,7 @@ components:
description: Data transfer object for public create usage end point
properties:
quantity:
- description: The initial quantity for the usage record. Must be a whole number
- that is greater than or equal to 0
+ description: The initial quantity for the usage record. Must be a whole number that is greater than or equal to 0
format: int32
type: integer
timestamp:
@@ -551,10 +531,9 @@ components:
description: Data transfer object for public update usage end point
properties:
quantity:
- description: The new quantity for the usage record. Must be a whole number that
- is greater than or equal to 0
+ description: The new quantity for the usage record. Must be a whole number that is greater than or equal to 0
format: int32
type: integer
required:
- quantity
- type: object
\ No newline at end of file
+ type: object
diff --git a/xero-finance.yaml b/xero-finance.yaml
index c84df4a1..101948b0 100644
--- a/xero-finance.yaml
+++ b/xero-finance.yaml
@@ -1,16 +1,16 @@
openapi: 3.0.0
info:
- version: "6.3.0"
+ version: 6.3.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/"
+ termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/
contact:
- name: "Xero Platform Team"
- email: "api@xero.com"
- url: "https://developer.xero.com"
+ name: Xero Platform Team
+ email: api@xero.com
+ url: https://developer.xero.com
license:
- name: MIT
- url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE'
+ name: MIT
+ url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE
servers:
- description: Xero API servers
url: https://api.xero.com/finance.xro/1.0
@@ -20,73 +20,50 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [finance.cashvalidation.read]
+ - OAuth2:
+ - finance.cashvalidation.read
tags:
- Finance
summary: Get cash validation
operationId: getCashValidation
description: Summarizes the total cash position for each account for an org
- parameters:
+ parameters:
- name: balanceDate
x-snake: balance_date
in: query
- description: "date, yyyy-MM-dd \r\n\r\nIf no parameter is provided, the current
- date will be used.\r\n\r\nThe ‘balance date’ will return transactions based
- on the accounting date entered by the user. Transactions before the balanceDate
- will be included.\r\nThe user has discretion as to which accounting period
- the transaction relates to.\r\n\r\nThe ‘balance date’ will control the
- latest maximum date of transactions included in the aggregate numbers. Balance
- date does not affect the CurrentStatement object, as this will always return
- the most recent statement before asAtSystemDate (if specified)"
- schema:
+ description: "date, yyyy-MM-dd \r\n\r\nIf no parameter is provided, the current date will be used.\r\n\r\nThe ‘balance date’ will return transactions based on the accounting date entered by the user. Transactions before the balanceDate will be included.\r\nThe user has discretion as to which accounting period the transaction relates to.\r\n\r\nThe ‘balance date’ will control the latest maximum date of transactions included in the aggregate numbers. Balance date does not affect the CurrentStatement object, as this will always return the most recent statement before asAtSystemDate (if specified)"
+ schema:
type: string
example: "2021-09-15"
- name: asAtSystemDate
x-snake: as_at_system_date
in: query
- description: "date, yyyy-MM-dd \r\n\r\nIf no parameter is provided, the current
- date will be used.\r\n\r\nThe ‘as at’ date will return transactions based
- on the creation date. It reflects the date the transactions were entered
- into Xero, not the accounting date.\r\nThe ‘as at’ date can not be overridden
- by the user. This can be used to estimate a ‘historical frequency of reconciliation’.\r\n\r\nThe
- ‘as at’ date will affect the current statement in the response, as any candidate
- statements created after this date will be filtered out. Thus the current
- statement returned will be the most recent statement prior to the specified
- ‘as at’ date. Be aware that neither the begin date, nor the balance date,
- will affect the current statement.\r\n\r\nNote; information is only presented
- when system architecture allows, meaning historical cash validation information
- will be an estimate. In addition, delete events are not aware of the ‘as
- at’ functionality in this endpoint, meaning that transactions deleted at
- the time the API is accessed will be considered to always have been deleted."
- schema:
+ description: "date, yyyy-MM-dd \r\n\r\nIf no parameter is provided, the current date will be used.\r\n\r\nThe ‘as at’ date will return transactions based on the creation date. It reflects the date the transactions were entered into Xero, not the accounting date.\r\nThe ‘as at’ date can not be overridden by the user. This can be used to estimate a ‘historical frequency of reconciliation’.\r\n\r\nThe ‘as at’ date will affect the current statement in the response, as any candidate statements created after this date will be filtered out. Thus the current statement returned will be the most recent statement prior to the specified ‘as at’ date. Be aware that neither the begin date, nor the balance date, will affect the current statement.\r\n\r\nNote; information is only presented when system architecture allows, meaning historical cash validation information will be an estimate. In addition, delete events are not aware of the ‘as at’ functionality in this endpoint, meaning that transactions deleted at the time the API is accessed will be considered to always have been deleted."
+ schema:
type: string
example: "2021-09-15"
- name: beginDate
x-snake: begin_date
in: query
- description: "date, yyyy-MM-dd \r\n\r\nIf no parameter is provided, the aggregate
- results will be drawn from the user’s total history.\r\n\r\nThe ‘begin date’
- will return transactions based on the accounting date entered by the user.
- Transactions after the beginDate will be included.\r\nThe user has discretion
- as to which accounting period the transaction relates to."
- schema:
+ description: "date, yyyy-MM-dd \r\n\r\nIf no parameter is provided, the aggregate results will be drawn from the user’s total history.\r\n\r\nThe ‘begin date’ will return transactions based on the accounting date entered by the user. Transactions after the beginDate will be included.\r\nThe user has discretion as to which accounting period the transaction relates to."
+ schema:
type: string
example: "2021-09-15"
responses:
- '200':
+ "200":
description: Success
content:
application/json:
schema:
type: array
items:
- $ref: "#/components/schemas/CashValidationResponse"
- example:
+ $ref: '#/components/schemas/CashValidationResponse'
+ example:
- accountId: 73151de8-3676-4887-a021-edec960dd537
statementBalance:
value: 100
type: DEBIT
- statementBalanceDate: '2021-03-01'
+ statementBalanceDate: "2021-03-01"
bankStatement:
statementLines:
unreconciledAmountPos: 4577
@@ -94,8 +71,8 @@ paths:
unreconciledLines: 8
avgDaysUnreconciledPos: 112.265531
avgDaysUnreconciledNeg: 149.298992
- earliestUnreconciledTransaction: '2019-03-01'
- latestUnreconciledTransaction: '2021-03-01'
+ earliestUnreconciledTransaction: "2019-03-01"
+ latestUnreconciledTransaction: "2021-03-01"
deletedAmount: 50
totalAmount: 189
dataSource:
@@ -114,19 +91,19 @@ paths:
otherPos: 0
otherNeg: 0
other: 100
- earliestReconciledTransaction: '2019-03-01'
- latestReconciledTransaction: '2020-03-01'
+ earliestReconciledTransaction: "2019-03-01"
+ latestReconciledTransaction: "2020-03-01"
reconciledAmountPos: 0
reconciledAmountNeg: -288
reconciledLines: 3
totalAmountPos: 2245
totalAmountNeg: -1995
currentStatement:
- startDate: '2021-03-01'
- endDate: '2021-03-01'
+ startDate: "2021-03-01"
+ endDate: "2021-03-01"
startBalance: 0
endBalance: 0
- importedDateTimeUtc: '2021-03-09T05:22:14.3Z'
+ importedDateTimeUtc: "2021-03-09T05:22:14.3Z"
importSourceType: Manual
cashAccount:
unreconciledAmountPos: 1440
@@ -134,413 +111,407 @@ paths:
startingBalance: 0
accountBalance: 0
balanceCurrency: NZD
- '400':
+ "400":
description: BadRequest
content:
application/json:
schema:
- $ref: "#/components/schemas/Problem"
+ $ref: '#/components/schemas/Problem'
example:
type: invalid-request
title: InvalidRequest
status: 400
detail: 'Invalid BalanceDate: ''2020-01'''
- "/AccountingActivities/AccountUsage":
+ /AccountingActivities/AccountUsage:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [finance.accountingactivity.read]
+ - OAuth2:
+ - finance.accountingactivity.read
tags:
- - Finance
+ - Finance
summary: Get account usage
operationId: getAccountingActivityAccountUsage
- description: 'A summary of how each account is being transacted on exposing the level of detail and amounts attributable to manual adjustments.'
+ description: A summary of how each account is being transacted on exposing the level of detail and amounts attributable to manual adjustments.
parameters:
- - name: startMonth
- x-snake: start_month
- in: query
- description: "date, yyyy-MM \r\n \r\nIf no parameter is provided,
- the month 12 months prior to the end month will be used.\r\n \r\nAccount
- usage for up to 12 months from this date will be returned."
- schema:
- type: string
- example: "2020-09"
- - name: endMonth
- x-snake: end_month
- in: query
- description: "date, yyyy-MM \r\n \r\nIf no parameter is provided,
- the current month will be used.\r\n \r\nAccount usage for up
- to 12 months prior to this date will be returned."
- schema:
- type: string
- example: "2021-09"
+ - name: startMonth
+ x-snake: start_month
+ in: query
+ description: "date, yyyy-MM \r\n \r\nIf no parameter is provided, the month 12 months prior to the end month will be used.\r\n \r\nAccount usage for up to 12 months from this date will be returned."
+ schema:
+ type: string
+ example: 2020-09
+ - name: endMonth
+ x-snake: end_month
+ in: query
+ description: "date, yyyy-MM \r\n \r\nIf no parameter is provided, the current month will be used.\r\n \r\nAccount usage for up to 12 months prior to this date will be returned."
+ schema:
+ type: string
+ example: 2021-09
responses:
- '200':
+ "200":
description: Success
content:
application/json:
schema:
- $ref: "#/components/schemas/AccountUsageResponse"
+ $ref: '#/components/schemas/AccountUsageResponse'
example:
organisationId: 73151de8-3676-4887-a021-edec960dd537
startMonth: 2010-03
endMonth: 2010-03
accountUsage:
- - month: 2010-03
- accountId: 12345678-876b-4eff-901d-e8f4d517453e
- currencyCode: CURR/NZD
- totalReceived: 0
- countReceived: 0
- totalPaid: 0
- countPaid: 0
- totalManualJournal: 0
- countManualJournal: 0
- accountName: ACME Drawings
- reportingCode: ABC
- reportingCodeName: ABC funds
- - month: 2010-03
- accountId: 12345678-9d21-43bc-b20e-d96a370cf31e
- currencyCode: CURR/NZD
- totalReceived: 0
- countReceived: 0
- totalPaid: 0
- countPaid: 0
- totalManualJournal: 0
- countManualJournal: 0
- accountName: Electricity & Heating
- reportingCode: ELC
- reportingCodeName: Expense
- '400':
+ - month: 2010-03
+ accountId: 12345678-876b-4eff-901d-e8f4d517453e
+ currencyCode: CURR/NZD
+ totalReceived: 0
+ countReceived: 0
+ totalPaid: 0
+ countPaid: 0
+ totalManualJournal: 0
+ countManualJournal: 0
+ accountName: ACME Drawings
+ reportingCode: ABC
+ reportingCodeName: ABC funds
+ - month: 2010-03
+ accountId: 12345678-9d21-43bc-b20e-d96a370cf31e
+ currencyCode: CURR/NZD
+ totalReceived: 0
+ countReceived: 0
+ totalPaid: 0
+ countPaid: 0
+ totalManualJournal: 0
+ countManualJournal: 0
+ accountName: Electricity & Heating
+ reportingCode: ELC
+ reportingCodeName: Expense
+ "400":
description: BadRequest
content:
application/json:
schema:
- $ref: "#/components/schemas/Problem"
+ $ref: '#/components/schemas/Problem'
example:
type: invalid-request
title: InvalidRequest
status: 400
- detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not
- exist
- "/AccountingActivities/LockHistory":
+ detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not exist
+ /AccountingActivities/LockHistory:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [finance.accountingactivity.read]
+ - OAuth2:
+ - finance.accountingactivity.read
tags:
- - Finance
+ - Finance
operationId: getAccountingActivityLockHistory
- description: 'Provides a history of locking of accounting books. Locking may be an indicator of good accounting practices that could reduce the risk of changes to accounting records in prior periods.'
+ description: Provides a history of locking of accounting books. Locking may be an indicator of good accounting practices that could reduce the risk of changes to accounting records in prior periods.
summary: Get lock history
parameters:
- - name: endDate
- x-snake: end_date
- in: query
- description: "date, yyyy-MM-dd \r\n \r\nIf no parameter is provided,
- the current date will be used.\r\n \r\nAny changes to hard or soft lock dates that were made within the period up to 12 months before this date will be returned.\r\n \r\nPlease be aware that there may be a delay of up to 3 days before a change is visible from this API."
- schema:
- type: string
- example: "2021-09-15"
+ - name: endDate
+ x-snake: end_date
+ in: query
+ description: "date, yyyy-MM-dd \r\n \r\nIf no parameter is provided, the current date will be used.\r\n \r\nAny changes to hard or soft lock dates that were made within the period up to 12 months before this date will be returned.\r\n \r\nPlease be aware that there may be a delay of up to 3 days before a change is visible from this API."
+ schema:
+ type: string
+ example: "2021-09-15"
responses:
- '200':
+ "200":
description: Success
content:
application/json:
schema:
- $ref: "#/components/schemas/LockHistoryResponse"
+ $ref: '#/components/schemas/LockHistoryResponse'
example:
organisationId: 73151de8-3676-4887-a021-edec960dd537
- endDate: '2019-06-20'
+ endDate: "2019-06-20"
lockDates:
- - hardLockDate: '2019-01-20'
- softLockDate: '2019-01-20'
- updatedDateUtc: '2019-01-20T10:50:03Z'
- - hardLockDate: '2019-01-21'
- softLockDate: '2019-01-21'
- updatedDateUtc: '2019-01-21T10:59:33Z'
- - hardLockDate: '2019-01-22'
- softLockDate: '2019-01-22'
- updatedDateUtc: '2019-01-22T10:24:12Z'
- '400':
+ - hardLockDate: "2019-01-20"
+ softLockDate: "2019-01-20"
+ updatedDateUtc: "2019-01-20T10:50:03Z"
+ - hardLockDate: "2019-01-21"
+ softLockDate: "2019-01-21"
+ updatedDateUtc: "2019-01-21T10:59:33Z"
+ - hardLockDate: "2019-01-22"
+ softLockDate: "2019-01-22"
+ updatedDateUtc: "2019-01-22T10:24:12Z"
+ "400":
description: BadRequest
content:
application/json:
schema:
- $ref: "#/components/schemas/Problem"
+ $ref: '#/components/schemas/Problem'
example:
type: invalid-request
title: InvalidRequest
status: 400
- detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not
- exist
- "/AccountingActivities/ReportHistory":
+ detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not exist
+ /AccountingActivities/ReportHistory:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [finance.accountingactivity.read]
+ - OAuth2:
+ - finance.accountingactivity.read
tags:
- - Finance
+ - Finance
operationId: getAccountingActivityReportHistory
- description: 'For a specified organisation, provides a summary of all the reports published within a given period, which may be an indicator for good business management and oversight.'
+ description: For a specified organisation, provides a summary of all the reports published within a given period, which may be an indicator for good business management and oversight.
summary: Get report history
parameters:
- - name: endDate
- x-snake: end_date
- in: query
- description: "date, yyyy-MM-dd \r\n \r\nIf no parameter is provided,
- the current date will be used.\r\n \r\nAny reports that were published within the period up to 12 months before this date will be returned.\r\n \r\nPlease be aware that there may be a delay of up to 3 days before a published report is visible from this API."
- schema:
- type: string
- example: "2021-09-15"
+ - name: endDate
+ x-snake: end_date
+ in: query
+ description: "date, yyyy-MM-dd \r\n \r\nIf no parameter is provided, the current date will be used.\r\n \r\nAny reports that were published within the period up to 12 months before this date will be returned.\r\n \r\nPlease be aware that there may be a delay of up to 3 days before a published report is visible from this API."
+ schema:
+ type: string
+ example: "2021-09-15"
responses:
- '200':
+ "200":
description: Success
content:
application/json:
schema:
- $ref: "#/components/schemas/ReportHistoryResponse"
+ $ref: '#/components/schemas/ReportHistoryResponse'
example:
organisationId: 73151de8-3676-4887-a021-edec960dd537
- endDate: '2019-10-20'
+ endDate: "2019-10-20"
reports:
- - reportName: VATReturn
- reportDateText: April 2019 to June 2019
- publishedDateUtc: '2019-09-23T00:30:17.407+00:00'
- '400':
+ - reportName: VATReturn
+ reportDateText: April 2019 to June 2019
+ publishedDateUtc: "2019-09-23T00:30:17.407+00:00"
+ "400":
description: BadRequest
content:
application/json:
schema:
- $ref: "#/components/schemas/Problem"
+ $ref: '#/components/schemas/Problem'
example:
type: invalid-request
title: InvalidRequest
status: 400
- detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not
- exist
- "/AccountingActivities/UserActivities":
+ detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not exist
+ /AccountingActivities/UserActivities:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [finance.accountingactivity.read]
+ - OAuth2:
+ - finance.accountingactivity.read
tags:
- - Finance
+ - Finance
operationId: getAccountingActivityUserActivities
- description: 'For a specified organisation, provides a list of all the users registered, and a history of their accounting transactions. Also identifies the existence of an external accounting advisor and the level of interaction.'
+ description: For a specified organisation, provides a list of all the users registered, and a history of their accounting transactions. Also identifies the existence of an external accounting advisor and the level of interaction.
summary: Get user activities
parameters:
- - name: dataMonth
- x-snake: data_month
- in: query
- description: "date, yyyy-MM \r\n \r\nThe specified month must be complete (in the past); The current month cannot be specified since it is not complete.\r\n \r\nIf no parameter is provided,
- the month immediately previous to the current month will be used.\r\n \r\nAny user activities occurring within the specified month will be returned.\r\n \r\nPlease be aware that there may be a delay of up to 3 days before a user activity is visible from this API."
- schema:
- type: string
- example: "2021-09"
+ - name: dataMonth
+ x-snake: data_month
+ in: query
+ description: "date, yyyy-MM \r\n \r\nThe specified month must be complete (in the past); The current month cannot be specified since it is not complete.\r\n \r\nIf no parameter is provided, the month immediately previous to the current month will be used.\r\n \r\nAny user activities occurring within the specified month will be returned.\r\n \r\nPlease be aware that there may be a delay of up to 3 days before a user activity is visible from this API."
+ schema:
+ type: string
+ example: 2021-09
responses:
- '200':
+ "200":
description: Success
content:
application/json:
schema:
- $ref: "#/components/schemas/UserActivitiesResponse"
+ $ref: '#/components/schemas/UserActivitiesResponse'
example:
organisationId: 73151de8-3676-4887-a021-edec960dd537
dataMonth: 2020-01
users:
- - userId: bf3108f9-7449-4b2d-a1d1-41342dc1c991
- userCreatedDateUtc: '2016-04-15T04:01:42.8Z'
- lastLoginDateUtc: '2020-02-12T23:59:06.42Z'
- isExternalPartner: true
- hasAccountantRole: true
- monthPeriod: 2020-01
- numberOfLogins: 0
- numberOfDocumentsCreated: 10
- netValueDocumentsCreated: -100.99
- absoluteValueDocumentsCreated: 100.99
- attachedPractices:
- - xeroPartnerSince: 2017
- tier: Silver
- location: New Zealand
- organisationCount: 40
- staffCertified: true
- historyRecords:
- - changes: Approved
- dateUTCString: '2008-12-19T01:37:59'
- dateUTC: '2008-12-18T14:37:59.057+00:00'
- user: John Doe
- details: ''
- - changes: Created
- dateUTCString: '2008-12-19T01:37:58'
- dateUTC: '2008-12-18T14:37:58.057+00:00'
- user: John Doe
- details: ''
- - changes: Reconciled
- dateUTCString: '2008-12-20T22:50:55'
- dateUTC: '2008-12-20T11:50:55.09+00:00'
- user: John Doe
- details: Debit payment to ACME Banking Corporation on 10 October
- 2008 for -10.00
- - changes: Created
- dateUTCString: '2008-12-20T16:44:19'
- dateUTC: '2008-12-20T05:44:19.467+00:00'
- user: John Doe
- details: ''
- '400':
+ - userId: bf3108f9-7449-4b2d-a1d1-41342dc1c991
+ userCreatedDateUtc: "2016-04-15T04:01:42.8Z"
+ lastLoginDateUtc: "2020-02-12T23:59:06.42Z"
+ isExternalPartner: true
+ hasAccountantRole: true
+ monthPeriod: 2020-01
+ numberOfLogins: 0
+ numberOfDocumentsCreated: 10
+ netValueDocumentsCreated: -100.99
+ absoluteValueDocumentsCreated: 100.99
+ attachedPractices:
+ - xeroPartnerSince: 2017
+ tier: Silver
+ location: New Zealand
+ organisationCount: 40
+ staffCertified: true
+ historyRecords:
+ - changes: Approved
+ dateUTCString: 2008-12-19T01:37:59
+ dateUTC: "2008-12-18T14:37:59.057+00:00"
+ user: John Doe
+ details: ""
+ - changes: Created
+ dateUTCString: 2008-12-19T01:37:58
+ dateUTC: "2008-12-18T14:37:58.057+00:00"
+ user: John Doe
+ details: ""
+ - changes: Reconciled
+ dateUTCString: 2008-12-20T22:50:55
+ dateUTC: "2008-12-20T11:50:55.09+00:00"
+ user: John Doe
+ details: Debit payment to ACME Banking Corporation on 10 October 2008 for -10.00
+ - changes: Created
+ dateUTCString: 2008-12-20T16:44:19
+ dateUTC: "2008-12-20T05:44:19.467+00:00"
+ user: John Doe
+ details: ""
+ "400":
description: BadRequest
content:
application/json:
schema:
- $ref: "#/components/schemas/Problem"
+ $ref: '#/components/schemas/Problem'
example:
type: invalid-request
title: InvalidRequest
status: 400
- detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not
- exist
- "/FinancialStatements/BalanceSheet":
+ detail: Organisation 73151de8-3676-4887-a021-edec960dd537 does not exist
+ /FinancialStatements/BalanceSheet:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [finance.statements.read]
+ - OAuth2:
+ - finance.statements.read
tags:
- Finance
operationId: getFinancialStatementBalanceSheet
- summary: "Get Balance Sheet report"
- description: "The balance sheet report is a standard financial report which describes the financial position of an organisation at a point in time."
+ summary: Get Balance Sheet report
+ description: The balance sheet report is a standard financial report which describes the financial position of an organisation at a point in time.
parameters:
- - name: "balanceDate"
+ - name: balanceDate
x-snake: balance_date
- in: "query"
+ in: query
description: "Specifies the date for balance sheet report.\r\n\r\nFormat yyyy-MM-dd. If no parameter is provided, the current date will be used."
schema:
type: string
example: "2020-06-30"
responses:
200:
- description: "Success"
+ description: Success
content:
application/json:
schema:
- $ref: "#/components/schemas/BalanceSheetResponse"
+ $ref: '#/components/schemas/BalanceSheetResponse'
example:
balanceDate: "2021-05-12"
asset:
accountTypes:
- - accountType: "INVENTORY"
+ - accountType: INVENTORY
accounts:
- code: "630"
- accountID: "abcdeabc-80bb-47f5-9418-d1fc2241b838"
- name: "Inventory"
- reportingCode: "ASS.CUR.INY"
+ accountID: abcdeabc-80bb-47f5-9418-d1fc2241b838
+ name: Inventory
+ reportingCode: ASS.CUR.INY
total: 3
total: 3
- - accountType: "CURRENT"
+ - accountType: CURRENT
accounts:
- code: "610"
- accountID: "abcdeabc-b4d1-45a5-82f7-19deda692a31"
- name: "Accounts Receivable"
- reportingCode: "ASS.CUR.REC.TRA"
+ accountID: abcdeabc-b4d1-45a5-82f7-19deda692a31
+ name: Accounts Receivable
+ reportingCode: ASS.CUR.REC.TRA
total: 100
total: 100
- - accountType: "BANK"
+ - accountType: BANK
accounts:
- - accountID: "abcdeabc-3a6d-4c53-ba82-ea1c92d02ef4"
- name: "Buz Acc"
- reportingCode: "ASS"
+ - accountID: abcdeabc-3a6d-4c53-ba82-ea1c92d02ef4
+ name: Buz Acc
+ reportingCode: ASS
total: -42.3
total: -42.3
total: 60.7
liability:
accountTypes:
- - accountType: "CURRLIAB"
+ - accountType: CURRLIAB
accounts:
- code: "820"
- accountID: "abcdeabc-40f7-49f1-ad89-1930c1366e5b"
- name: "GST"
- reportingCode: "LIA.CUR.TAX.GST"
+ accountID: abcdeabc-40f7-49f1-ad89-1930c1366e5b
+ name: GST
+ reportingCode: LIA.CUR.TAX.GST
total: 1.59
- code: "860"
- accountID: "abcdeabc-2877-4c00-be7d-475b1ded30d7"
- name: "Rounding"
- reportingCode: "LIA.CUR"
+ accountID: abcdeabc-2877-4c00-be7d-475b1ded30d7
+ name: Rounding
+ reportingCode: LIA.CUR
total: -0.1
- code: "800"
- accountID: "abcdeabc-80ba-4b58-8d72-f8e9ca0f2f00"
- name: "Accounts Payable"
- reportingCode: "LIA.CUR.PAY.TRA"
+ accountID: abcdeabc-80ba-4b58-8d72-f8e9ca0f2f00
+ name: Accounts Payable
+ reportingCode: LIA.CUR.PAY.TRA
total: 44.4
total: 45.89
total: 45.89
equity:
accountTypes:
- - accountType: "EQUITY"
+ - accountType: EQUITY
accounts:
- - accountID: "00000000-0000-0000-0000-000000000000"
- name: "Current Year Earnings"
+ - accountID: 00000000-0000-0000-0000-000000000000
+ name: Current Year Earnings
total: 14.81
total: 14.81
total: 14.81
400:
- description: "Bad Request"
+ description: Bad Request
content:
application/json:
schema:
- $ref: "#/components/schemas/Problem"
+ $ref: '#/components/schemas/Problem'
example:
- type: "invalid-request"
- title: "InvalidRequest"
+ type: invalid-request
+ title: InvalidRequest
status: 400
- detail: "Organisation xxx does not exist"
+ detail: Organisation xxx does not exist
503:
- description: "Server Error"
+ description: Server Error
content:
application/json:
schema:
- $ref: "#/components/schemas/Problem"
+ $ref: '#/components/schemas/Problem'
example:
- type: "service-unavailable"
- title: "ServiceUnavailable"
+ type: service-unavailable
+ title: ServiceUnavailable
status: 503
- detail: "Cannot process org xxx at this time. Apologies for inconvenience."
- "/FinancialStatements/Cashflow":
+ detail: Cannot process org xxx at this time. Apologies for inconvenience.
+ /FinancialStatements/Cashflow:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [finance.statements.read]
+ - OAuth2:
+ - finance.statements.read
tags:
- Finance
operationId: getFinancialStatementCashflow
- summary: "Get Cash flow report"
- description: "The statement of cash flows - direct method, provides the year to date changes in operating, financing and investing cash flow activities for an organisation. Cashflow statement is not available in US region at this stage."
+ summary: Get Cash flow report
+ description: The statement of cash flows - direct method, provides the year to date changes in operating, financing and investing cash flow activities for an organisation. Cashflow statement is not available in US region at this stage.
parameters:
- - name: "startDate"
+ - name: startDate
x-snake: start_date
- in: "query"
+ in: query
description: "Date e.g. yyyy-MM-dd\r\n\r\nSpecifies the start date for cash flow report.\r\n\r\nIf no parameter is provided, the date of 12 months before the end date will be used."
schema:
type: string
example: "2020-09-15"
- - name: "endDate"
+ - name: endDate
x-snake: end_date
- in: "query"
+ in: query
description: "Date e.g. yyyy-MM-dd\r\n\r\nSpecifies the end date for cash flow report.\r\n\r\nIf no parameter is provided, the current date will be used."
schema:
type: string
example: "2021-09-15"
responses:
200:
- description: "Success"
+ description: Success
content:
application/json:
schema:
- $ref: "#/components/schemas/CashflowResponse"
+ $ref: '#/components/schemas/CashflowResponse'
example:
startDate: "2018-07-01"
endDate: "2019-06-30"
@@ -549,151 +520,152 @@ paths:
closingCashBalance: -50000
netCashMovement: -55000
cashflowActivities:
- - name: "Operating Activities"
+ - name: Operating Activities
total: -41000
cashflowTypes:
- - name: "Receipts from customers"
+ - name: Receipts from customers
total: 34000
accounts:
- - accountId: "abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2"
- accountType: "REVENUE"
- accountClass: "REVENUE"
+ - accountId: abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2
+ accountType: REVENUE
+ accountClass: REVENUE
code: "455"
- name: "Cellar Door - Till Variance"
- reportingCode: "EXP"
+ name: Cellar Door - Till Variance
+ reportingCode: EXP
total: -1000
- - accountId: "abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2"
- accountType: "CURRENT"
- accountClass: "ASSET"
+ - accountId: abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2
+ accountType: CURRENT
+ accountClass: ASSET
code: "123"
- name: "Loan - Darleen's"
- reportingCode: "ASS"
+ name: Loan - Darleen's
+ reportingCode: ASS
total: 35000
- - name: "Payments to suppliers and employees"
+ - name: Payments to suppliers and employees
total: -75000
accounts:
- - accountId: "abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2"
- accountType: "CURRENT"
- accountClass: "ASSET"
+ - accountId: abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2
+ accountType: CURRENT
+ accountClass: ASSET
code: "123"
- name: "Loan - Darleen's"
- reportingCode: "ASS"
+ name: Loan - Darleen's
+ reportingCode: ASS
total: -75000
- - name: "Investing Activities"
+ - name: Investing Activities
total: -35000
cashflowTypes:
- - name: "Payment for property, plant and equipment"
+ - name: Payment for property, plant and equipment
total: -36000
accounts:
- - accountId: "abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2"
- accountType: "FIXED"
- accountClass: "ASSET"
+ - accountId: abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2
+ accountType: FIXED
+ accountClass: ASSET
code: "138"
- name: "Motor Vehicles at Cost"
- reportingCode: "ASS"
+ name: Motor Vehicles at Cost
+ reportingCode: ASS
total: -1000
- - accountId: "abcdefab-5353-9d4b-7cad-51b2c2a2754a"
- accountType: "FIXED"
- accountClass: "ASSET"
+ - accountId: abcdefab-5353-9d4b-7cad-51b2c2a2754a
+ accountType: FIXED
+ accountClass: ASSET
code: "140"
- name: "Equipment at cost"
- reportingCode: "ASS"
+ name: Equipment at cost
+ reportingCode: ASS
total: -35000
- - name: "Proceeds from sale of property, plant and equipment"
+ - name: Proceeds from sale of property, plant and equipment
total: 1000
accounts:
- - accountId: "abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2"
- accountType: "FIXED"
- accountClass: "ASSET"
+ - accountId: abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2
+ accountType: FIXED
+ accountClass: ASSET
code: "138"
- name: "Motor Vehicles at Cost"
- reportingCode: "ASS"
+ name: Motor Vehicles at Cost
+ reportingCode: ASS
total: 1000
- - accountId: "abcdefab-5353-9d4b-7cad-51b2c2a2754a"
- accountType: "FIXED"
- accountClass: "ASSET"
+ - accountId: abcdefab-5353-9d4b-7cad-51b2c2a2754a
+ accountType: FIXED
+ accountClass: ASSET
code: "140"
- name: "Equipment at cost"
- reportingCode: "ASS"
+ name: Equipment at cost
+ reportingCode: ASS
total: 0
- - name: "Financing Activities"
+ - name: Financing Activities
total: -14000
cashflowTypes:
- - name: "Proceeds from borrowings"
+ - name: Proceeds from borrowings
total: 1000.5
accounts:
- - accountId: "abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2"
- accountType: "TERMLIAB"
- accountClass: "LIABILITY"
+ - accountId: abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2
+ accountType: TERMLIAB
+ accountClass: LIABILITY
code: "244"
- name: "Loan - Shellcoll Distribution 2019"
- reportingCode: "LIA.CUR.LOA"
+ name: Loan - Shellcoll Distribution 2019
+ reportingCode: LIA.CUR.LOA
total: 1000.5
- - name: "Repayment of borrowings"
+ - name: Repayment of borrowings
total: -15000.5
accounts:
- - accountId: "abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2"
- accountType: "TERMLIAB"
- accountClass: "LIABILITY"
+ - accountId: abcdefab-4d1e-4d1a-9e4c-68b2c2a278e2
+ accountType: TERMLIAB
+ accountClass: LIABILITY
code: "244"
- name: "Loan - Shellcoll Distribution 2019"
- reportingCode: "LIA.CUR.LOA"
+ name: Loan - Shellcoll Distribution 2019
+ reportingCode: LIA.CUR.LOA
total: -15000.5
400:
- description: "Bad Request"
+ description: Bad Request
content:
application/json:
schema:
- $ref: "#/components/schemas/Problem"
+ $ref: '#/components/schemas/Problem'
example:
- type: "invalid-request"
- title: "InvalidRequest"
+ type: invalid-request
+ title: InvalidRequest
status: 400
- detail: "Organisation xxx does not exist"
+ detail: Organisation xxx does not exist
503:
- description: "Server Error"
+ description: Server Error
content:
application/json:
schema:
- $ref: "#/components/schemas/Problem"
+ $ref: '#/components/schemas/Problem'
example:
- type: "service-unavailable"
- title: "ServiceUnavailable"
+ type: service-unavailable
+ title: ServiceUnavailable
status: 503
- detail: "Cannot process org xxx at this time. Apologies for inconvenience."
- "/FinancialStatements/ProfitAndLoss":
+ detail: Cannot process org xxx at this time. Apologies for inconvenience.
+ /FinancialStatements/ProfitAndLoss:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [finance.statements.read]
+ - OAuth2:
+ - finance.statements.read
tags:
- Finance
operationId: getFinancialStatementProfitAndLoss
- summary: "Get Profit & Loss report"
- description: "The profit and loss statement is a standard financial report providing detailed year to date income and expense detail for an organisation."
+ summary: Get Profit & Loss report
+ description: The profit and loss statement is a standard financial report providing detailed year to date income and expense detail for an organisation.
parameters:
- - name: "startDate"
+ - name: startDate
x-snake: start_date
- in: "query"
+ in: query
description: "Date e.g. yyyy-MM-dd\r\n\r\nSpecifies the start date for profit and loss report\r\n\r\nIf no parameter is provided, the date of 12 months before the end date will be used."
schema:
type: string
example: "2020-09-15"
- - name: "endDate"
+ - name: endDate
x-snake: end_date
- in: "query"
+ in: query
description: "Date e.g. yyyy-MM-dd\r\n\r\nSpecifies the end date for profit and loss report \r\n\r\nIf no parameter is provided, the current date will be used."
schema:
type: string
example: "2021-09-15"
responses:
200:
- description: "Success"
+ description: Success
content:
application/json:
schema:
- $ref: "#/components/schemas/ProfitAndLossResponse"
+ $ref: '#/components/schemas/ProfitAndLossResponse'
example:
startDate: "2020-07-01"
endDate: "2021-06-30"
@@ -702,128 +674,127 @@ paths:
total: 20922.46
accountTypes:
- total: 20825.41
- title: "Trading Income"
+ title: Trading Income
accounts:
- - accountID: "abcdefab-2006-43c2-a5da-3c0e5f43b452"
- accountType: "REVENUE"
+ - accountID: abcdefab-2006-43c2-a5da-3c0e5f43b452
+ accountType: REVENUE
code: "200"
- name: "Sales"
- reportingCode: "REV"
+ name: Sales
+ reportingCode: REV
total: 20825.41
- total: 97.05
- title: "Other Income"
+ title: Other Income
accounts:
- - accountID: "abcdefab-4d63-4af8-937f-04087ae2e36e"
- accountType: "OTHERINCOME"
+ - accountID: abcdefab-4d63-4af8-937f-04087ae2e36e
+ accountType: OTHERINCOME
code: "270"
- name: "Interest Income"
- reportingCode: "REV.OTH"
+ name: Interest Income
+ reportingCode: REV.OTH
total: 97.05
expense:
total: 1282.06
accountTypes:
- total: 1137.59
- title: "Direct Cost"
+ title: Direct Cost
accounts:
- - accountID: "abcdefab-d381-4bd6-ba47-7af927d25825"
- accountType: "DIRECTCOSTS"
+ - accountID: abcdefab-d381-4bd6-ba47-7af927d25825
+ accountType: DIRECTCOSTS
code: "300"
- name: "Purchases"
- reportingCode: "EXP.DC"
+ name: Purchases
+ reportingCode: EXP.DC
total: 1137.59
- total: 144.47
- title: "Operating Expenses"
+ title: Operating Expenses
accounts:
- - accountID: "abcdefab-f897-4168-b5d1-2279bf74bb82"
- accountType: "EXPENSE"
+ - accountID: abcdefab-f897-4168-b5d1-2279bf74bb82
+ accountType: EXPENSE
code: "453"
- name: "Office Expenses"
- reportingCode: "EXP"
+ name: Office Expenses
+ reportingCode: EXP
total: 144.47
400:
- description: "Bad Request"
+ description: Bad Request
content:
application/json:
schema:
- $ref: "#/components/schemas/Problem"
+ $ref: '#/components/schemas/Problem'
example:
- type: "invalid-request"
- title: "InvalidRequest"
+ type: invalid-request
+ title: InvalidRequest
status: 400
- detail: "Organisation xxx does not exist"
- "/FinancialStatements/TrialBalance":
+ detail: Organisation xxx does not exist
+ /FinancialStatements/TrialBalance:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
- security:
- - OAuth2: [finance.statements.read]
+ security:
+ - OAuth2:
+ - finance.statements.read
tags:
- Finance
operationId: getFinancialStatementTrialBalance
- summary: "Get Trial Balance report"
- description: "The trial balance provides a detailed list of all accounts of an organisation at a point in time, with revenue and expense items being year to date."
+ summary: Get Trial Balance report
+ description: The trial balance provides a detailed list of all accounts of an organisation at a point in time, with revenue and expense items being year to date.
parameters:
- - name: "endDate"
+ - name: endDate
x-snake: end_date
- in: "query"
+ in: query
description: "Date e.g. yyyy-MM-dd \r\n\r\nSpecifies the end date for trial balance report \r\n\r\nIf no parameter is provided, the current date will be used."
schema:
type: string
example: "2021-09-15"
responses:
200:
- description: "Success"
+ description: Success
content:
application/json:
schema:
- $ref: "#/components/schemas/TrialBalanceResponse"
+ $ref: '#/components/schemas/TrialBalanceResponse'
example:
startDate: "2020-07-01"
endDate: "2021-06-30"
accounts:
- - accountId: "abcdefab-3bbf-4f2a-9e4c-20ec7b8e6b41"
- accountType: "ASSET"
- accountCode: "ASS"
- accountClass: "BANK"
- status: "ACTIVE"
- reportingCode: "ASS"
- accountName: "Everyday transactions"
+ - accountId: abcdefab-3bbf-4f2a-9e4c-20ec7b8e6b41
+ accountType: ASSET
+ accountCode: ASS
+ accountClass: BANK
+ status: ACTIVE
+ reportingCode: ASS
+ accountName: Everyday transactions
balance:
value: 100
- entryType: "DEBIT"
+ entryType: DEBIT
signedBalance: -23
accountMovement:
debits: 0
credits: 0
movement:
value: 123
- entryType: "CREDIT"
+ entryType: CREDIT
signedMovement: 0
400:
- description: "Bad Request"
+ description: Bad Request
content:
application/json:
schema:
- $ref: "#/components/schemas/Problem"
+ $ref: '#/components/schemas/Problem'
example:
- type: "invalid-request"
- title: "InvalidRequest"
+ type: invalid-request
+ title: InvalidRequest
status: 400
- detail: "Organisation xxx does not exist"
+ detail: Organisation xxx does not exist
/FinancialStatements/contacts/revenue:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [finance.statements.read]
+ - OAuth2:
+ - finance.statements.read
tags:
- Finance
operationId: getFinancialStatementContactsRevenue
summary: Get revenue by contacts report
- description: >-
- The revenue by contact report provides a year to date profit and loss
- for customers and suppliers for a given organisation, including detailed
- contact information.
+ description: The revenue by contact report provides a year to date profit and loss for customers and suppliers for a given organisation, including detailed contact information.
parameters:
- name: contactIds
x-snake: contact_ids
@@ -831,7 +802,9 @@ paths:
description: "Specifies the customer contacts to be included in the report.\r\n\r\nIf no parameter is provided, all customer contacts will be included"
schema:
type: array
- example: [00000000-0000-0000-0000-000000000000, 00000000-0000-0000-0000-000000000000]
+ example:
+ - 00000000-0000-0000-0000-000000000000
+ - 00000000-0000-0000-0000-000000000000
items:
type: string
format: uuid
@@ -858,15 +831,15 @@ paths:
schema:
type: string
responses:
- '200':
+ "200":
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/IncomeByContactResponse'
example:
- startDate: '2019-10-17'
- endDate: '2020-10-16'
+ startDate: "2019-10-17"
+ endDate: "2020-10-16"
total: 1200
totalDetail:
totalPaid: 400
@@ -892,7 +865,7 @@ paths:
accountCodes:
- "090"
- "200"
- - "09-BANK"
+ - 09-BANK
- id: 20e94281-4751-fb7e-ee5e-96b43ae93c8a
name: SecondContact
total: -200
@@ -909,7 +882,7 @@ paths:
- "900"
manualJournals:
total: -100
- '400':
+ "400":
description: Bad Request
content:
application/json:
@@ -925,15 +898,13 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [finance.statements.read]
+ - OAuth2:
+ - finance.statements.read
tags:
- Finance
operationId: getFinancialStatementContactsExpense
summary: Get expense by contacts report
- description: >-
- The expense by contact report provides a year to date profit and loss
- for customers and suppliers for a given organisation, including detailed
- contact information.
+ description: The expense by contact report provides a year to date profit and loss for customers and suppliers for a given organisation, including detailed contact information.
parameters:
- name: contactIds
x-snake: contact_ids
@@ -941,7 +912,9 @@ paths:
description: "Specifies the customer contacts to be included in the report.\r\n\r\nIf no parameter is provided, all customer contacts will be included"
schema:
type: array
- example: [00000000-0000-0000-0000-000000000000, 00000000-0000-0000-0000-000000000000]
+ example:
+ - 00000000-0000-0000-0000-000000000000
+ - 00000000-0000-0000-0000-000000000000
items:
type: string
format: uuid
@@ -968,15 +941,15 @@ paths:
schema:
type: string
responses:
- '200':
+ "200":
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/IncomeByContactResponse'
example:
- startDate: '2019-10-17'
- endDate: '2020-10-16'
+ startDate: "2019-10-17"
+ endDate: "2020-10-16"
total: 1200
totalDetail:
totalPaid: 400
@@ -1002,7 +975,7 @@ paths:
accountCodes:
- "090"
- "200"
- - "09-BANK"
+ - 09-BANK
- id: 20e94281-4751-fb7e-ee5e-96b43ae93c8a
name: SecondContact
total: -200
@@ -1019,7 +992,7 @@ paths:
- "900"
manualJournals:
total: -100
- '400':
+ "400":
description: Bad Request
content:
application/json:
@@ -1035,18 +1008,13 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [finance.bankstatementsplus.read]
+ - OAuth2:
+ - finance.bankstatementsplus.read
tags:
- Finance
operationId: getBankStatementAccounting
summary: Get Bank Statement Accounting
- description: >-
- For lenders that prefer using bank statement data as the source of
- truth. We provide a data point that will allow access to customer
- bank statements, plus for reconciled bank transactions the matching
- accounting, invoice and billing data as well. As customers reconcile
- bank statements to invoices and bills, this transaction detail will
- provide valuable insight for lender's assessment measures.
+ description: 'For lenders that prefer using bank statement data as the source of truth. We provide a data point that will allow access to customer bank statements, plus for reconciled bank transactions the matching accounting, invoice and billing data as well. As customers reconcile bank statements to invoices and bills, this transaction detail will provide valuable insight for lender''s assessment measures. '
parameters:
- name: BankAccountID
x-snake: bank_account_id
@@ -1063,8 +1031,8 @@ paths:
required: true
schema:
type: string
- example: '2020-07-01'
- example: '2020-07-01'
+ example: "2020-07-01"
+ example: "2020-07-01"
- name: ToDate
x-snake: to_date
in: query
@@ -1072,8 +1040,8 @@ paths:
required: true
schema:
type: string
- example: '2021-06-30'
- example: '2021-06-30'
+ example: "2021-06-30"
+ example: "2021-06-30"
- name: SummaryOnly
x-snake: summary_only
in: query
@@ -1083,29 +1051,139 @@ paths:
schema:
type: boolean
responses:
- '200':
+ "200":
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/BankStatementAccountingResponse'
- example: {"bankAccountId":"1234eee9-47f0-4179-bd46-9adb4f21cc7f","bankAccountName":"ANZ BANK","bankAccountCurrencyCode":"NZD","statements":[{"statementId":"7c29eee9-47f0-4179-bd46-9adb4f21cc7f","startDate":"2021-01-01","endDate":"2021-01-02","importedDateTimeUtc":"2021-01-02T12:00:00Z","importSource":"STMTIMPORTSRC/MANUAL", "startBalance":10.0,"endBalance":200.0, "indicativeStartBalance":10.0, "indicativeEndBalance":200.0, "statementLines":[{"statementLineId":"1234eee9-47f0-4179-bd46-9adb4f21cc7f","postedDate":"2021-01-01", "payee":"ACME Thneeds ABC1234567890 SYDNEY", "reference":"Eft","notes":"payment to bank","chequeNo":"123","amount":100.0,"transactionDate":"2021-01-01","type":"Debit","isReconciled":true,"isDuplicate":false,"isDeleted":false,"payments":[{"paymentId":"47ec8431-23c2-4ef9-90e5-b440fe55d086","batchPaymentId":"ecc83387-ffaa-4023-b111-b3fd9e3e4a8e","date":"2021-01-01","amount":80.0,"bankAmount":80.0,"currencyRate":1.0,"invoice":{"invoiceId":"c01dd6ac-8835-4bf2-af8b-841db9534d7f","contact":{"contactId":"1234eee9-47f0-4179-bd46-9adb4f21cc7f","contactName":"Bob"},"total":80.0,"lineItems":[{"accountId":"f7fe1049-d1cf-4d10-9df1-67a6e363015f","reportingCode":"REV.OTH","lineAmount":80.0,"accountType":"REVENUE"}]}},{"paymentId":"54e8eee0-91a7-4a4d-bb9b-957302a2760a","batchPaymentId":"ecc83387-ffaa-4023-b111-b3fd9e3e4a8e","date":"2021-01-01","amount":15.0,"bankAmount":15.0,"currencyRate":1.0,"creditNote":{"creditNoteId":"c346d6a5-f013-4207-bc70-f2dd80a5f37f","contact":{"contactId":"1234eee9-47f0-4179-bd46-9adb4f21cc7f","contactName":"Bob"},"total":15.0,"lineItems":[{"accountId":"f7fe1049-d1cf-4d10-9df1-67a6e363015f","reportingCode":"REV.OTH","lineAmount":15.0,"accountType":"REVENUE"}]}},{"paymentId":"f94dad64-658c-491f-b901-05d38e9e8702","date":"2021-01-01","amount":5.0,"bankAmount":5.0,"currencyRate":1.0,"prepayment":{"prepaymentId":"995f81ae-0afd-4c84-bbe1-90bc7dfa4372","contact":{"contactId":"1234eee9-47f0-4179-bd46-9adb4f21cc7f","contactName":"Bob"},"total":5.0,"lineItems":[{"accountId":"f7fe1049-d1cf-4d10-9df1-67a6e363015f","reportingCode":"REV.OTH","lineAmount":5.0,"accountType":"REVENUE"}]}},{"paymentId":"6ffbe999-04c8-42d2-bf16-13947c5f1036","date":"2021-01-01","amount":5.0,"bankAmount":5.0,"currencyRate":1.0,"overpayment":{"overpaymentId":"06575718-5100-4e02-8fbf-c2731a112836","contact":{"contactId":"1234eee9-47f0-4179-bd46-9adb4f21cc7f","contactName":"Bob"},"total":5.0,"lineItems":[{"accountId":"f7fe1049-d1cf-4d10-9df1-67a6e363015f","reportingCode":"REV.OTH","lineAmount":5.0,"accountType":"REVENUE"}]}}],"bankTransactions":[{"bankTransactionId":"55edf88c-6bf6-459a-bd9b-7f250df62eb2","batchPaymentId":"2dce9b39-0427-41af-9739-9510e3b68211","contact":{"contactId":"1234eee9-47f0-4179-bd46-9adb4f21cc7f","contactName":"Bob"},"date":"2021-01-01","amount":20.0,"lineItems":[{"accountId":"f7fe1049-d1cf-4d10-9df1-67a6e363015f","reportingCode":"REV.OTH","lineAmount":20.0,"accountType":"REVENUE"}]}]}]}]}
- '400':
+ example:
+ bankAccountId: 1234eee9-47f0-4179-bd46-9adb4f21cc7f
+ bankAccountName: ANZ BANK
+ bankAccountCurrencyCode: NZD
+ statements:
+ - statementId: 7c29eee9-47f0-4179-bd46-9adb4f21cc7f
+ startDate: "2021-01-01"
+ endDate: "2021-01-02"
+ importedDateTimeUtc: "2021-01-02T12:00:00Z"
+ importSource: STMTIMPORTSRC/MANUAL
+ startBalance: 10.0
+ endBalance: 200.0
+ indicativeStartBalance: 10.0
+ indicativeEndBalance: 200.0
+ statementLines:
+ - statementLineId: 1234eee9-47f0-4179-bd46-9adb4f21cc7f
+ postedDate: "2021-01-01"
+ payee: ACME Thneeds ABC1234567890 SYDNEY
+ reference: Eft
+ notes: payment to bank
+ chequeNo: "123"
+ amount: 100.0
+ transactionDate: "2021-01-01"
+ type: Debit
+ isReconciled: true
+ isDuplicate: false
+ isDeleted: false
+ payments:
+ - paymentId: 47ec8431-23c2-4ef9-90e5-b440fe55d086
+ batchPaymentId: ecc83387-ffaa-4023-b111-b3fd9e3e4a8e
+ date: "2021-01-01"
+ amount: 80.0
+ bankAmount: 80.0
+ currencyRate: 1.0
+ invoice:
+ invoiceId: c01dd6ac-8835-4bf2-af8b-841db9534d7f
+ contact:
+ contactId: 1234eee9-47f0-4179-bd46-9adb4f21cc7f
+ contactName: Bob
+ total: 80.0
+ lineItems:
+ - accountId: f7fe1049-d1cf-4d10-9df1-67a6e363015f
+ reportingCode: REV.OTH
+ lineAmount: 80.0
+ accountType: REVENUE
+ - paymentId: 54e8eee0-91a7-4a4d-bb9b-957302a2760a
+ batchPaymentId: ecc83387-ffaa-4023-b111-b3fd9e3e4a8e
+ date: "2021-01-01"
+ amount: 15.0
+ bankAmount: 15.0
+ currencyRate: 1.0
+ creditNote:
+ creditNoteId: c346d6a5-f013-4207-bc70-f2dd80a5f37f
+ contact:
+ contactId: 1234eee9-47f0-4179-bd46-9adb4f21cc7f
+ contactName: Bob
+ total: 15.0
+ lineItems:
+ - accountId: f7fe1049-d1cf-4d10-9df1-67a6e363015f
+ reportingCode: REV.OTH
+ lineAmount: 15.0
+ accountType: REVENUE
+ - paymentId: f94dad64-658c-491f-b901-05d38e9e8702
+ date: "2021-01-01"
+ amount: 5.0
+ bankAmount: 5.0
+ currencyRate: 1.0
+ prepayment:
+ prepaymentId: 995f81ae-0afd-4c84-bbe1-90bc7dfa4372
+ contact:
+ contactId: 1234eee9-47f0-4179-bd46-9adb4f21cc7f
+ contactName: Bob
+ total: 5.0
+ lineItems:
+ - accountId: f7fe1049-d1cf-4d10-9df1-67a6e363015f
+ reportingCode: REV.OTH
+ lineAmount: 5.0
+ accountType: REVENUE
+ - paymentId: 6ffbe999-04c8-42d2-bf16-13947c5f1036
+ date: "2021-01-01"
+ amount: 5.0
+ bankAmount: 5.0
+ currencyRate: 1.0
+ overpayment:
+ overpaymentId: 06575718-5100-4e02-8fbf-c2731a112836
+ contact:
+ contactId: 1234eee9-47f0-4179-bd46-9adb4f21cc7f
+ contactName: Bob
+ total: 5.0
+ lineItems:
+ - accountId: f7fe1049-d1cf-4d10-9df1-67a6e363015f
+ reportingCode: REV.OTH
+ lineAmount: 5.0
+ accountType: REVENUE
+ bankTransactions:
+ - bankTransactionId: 55edf88c-6bf6-459a-bd9b-7f250df62eb2
+ batchPaymentId: 2dce9b39-0427-41af-9739-9510e3b68211
+ contact:
+ contactId: 1234eee9-47f0-4179-bd46-9adb4f21cc7f
+ contactName: Bob
+ date: "2021-01-01"
+ amount: 20.0
+ lineItems:
+ - accountId: f7fe1049-d1cf-4d10-9df1-67a6e363015f
+ reportingCode: REV.OTH
+ lineAmount: 20.0
+ accountType: REVENUE
+ "400":
description: BadRequest
content:
application/json:
schema:
$ref: '#/components/schemas/Problem'
- example: {"type":"invalid-request","title":"InvalidRequest","status":400,"detail":"AccountId was not supplied"}
+ example:
+ type: invalid-request
+ title: InvalidRequest
+ status: 400
+ detail: AccountId was not supplied
components:
securitySchemes:
OAuth2:
type: oauth2
description: For more information
- flows:
+ flows:
authorizationCode:
- authorizationUrl: 'https://login.xero.com/identity/connect/authorize'
- tokenUrl: 'https://identity.xero.com/connect/token'
+ authorizationUrl: https://login.xero.com/identity/connect/authorize
+ tokenUrl: https://identity.xero.com/connect/token
scopes:
email: Grant read-only access to your email
openid: Grant read-only access to your open id
@@ -1115,7 +1193,7 @@ components:
finance.cashvalidation.read: Grant read-only access to bank statement and reconcilation data
finance.bankstatementsplus.read: Grant read-only access to bank statements accounting data
parameters:
- requiredHeader:
+ requiredHeader:
in: header
name: xero-tenant-id
x-snake: xero_tenant_id
@@ -1195,7 +1273,7 @@ components:
accountUsage:
type: array
items:
- $ref: "#/components/schemas/AccountUsage"
+ $ref: '#/components/schemas/AccountUsage'
additionalProperties: false
HistoryRecordResponse:
type: object
@@ -1247,7 +1325,7 @@ components:
lockDates:
type: array
items:
- $ref: "#/components/schemas/LockHistoryModel"
+ $ref: '#/components/schemas/LockHistoryModel'
additionalProperties: false
PracticeResponse:
type: object
@@ -1274,7 +1352,7 @@ components:
type: object
properties:
type:
- $ref: "#/components/schemas/ProblemType"
+ $ref: '#/components/schemas/ProblemType'
title:
type: string
status:
@@ -1285,17 +1363,17 @@ components:
additionalProperties: false
ProblemType:
enum:
- - NotSet
- - bank-account-not-found
- - internal-error
- - invalid-application
- - invalid-request
- - organisation-not-found
- - organisation-offline
- - request-timeout
- - service-unavailable
- - unauthorized
- - rate-limit-error
+ - NotSet
+ - bank-account-not-found
+ - internal-error
+ - invalid-application
+ - invalid-request
+ - organisation-not-found
+ - organisation-offline
+ - request-timeout
+ - service-unavailable
+ - unauthorized
+ - rate-limit-error
type: string
ReportHistoryModel:
type: object
@@ -1325,7 +1403,7 @@ components:
reports:
type: array
items:
- $ref: "#/components/schemas/ReportHistoryModel"
+ $ref: '#/components/schemas/ReportHistoryModel'
additionalProperties: false
UserActivitiesResponse:
type: object
@@ -1340,7 +1418,7 @@ components:
users:
type: array
items:
- $ref: "#/components/schemas/UserResponse"
+ $ref: '#/components/schemas/UserResponse'
additionalProperties: false
UserResponse:
type: object
@@ -1387,39 +1465,36 @@ components:
attachedPractices:
type: array
items:
- $ref: "#/components/schemas/PracticeResponse"
+ $ref: '#/components/schemas/PracticeResponse'
historyRecords:
type: array
items:
- $ref: "#/components/schemas/HistoryRecordResponse"
+ $ref: '#/components/schemas/HistoryRecordResponse'
additionalProperties: false
BankStatementResponse:
type: object
properties:
statementLines:
- $ref: "#/components/schemas/StatementLinesResponse"
+ $ref: '#/components/schemas/StatementLinesResponse'
currentStatement:
- $ref: "#/components/schemas/CurrentStatementResponse"
+ $ref: '#/components/schemas/CurrentStatementResponse'
additionalProperties: false
CashAccountResponse:
type: object
properties:
unreconciledAmountPos:
type: number
- description: Total value of transactions in the journals which are not reconciled
- to bank statement lines, and have a positive (debit) value.
+ description: Total value of transactions in the journals which are not reconciled to bank statement lines, and have a positive (debit) value.
format: double
x-is-money: true
unreconciledAmountNeg:
type: number
- description: Total value of transactions in the journals which are not reconciled
- to bank statement lines, and have a negative (credit) value.
+ description: Total value of transactions in the journals which are not reconciled to bank statement lines, and have a negative (credit) value.
format: double
x-is-money: true
startingBalance:
type: number
- description: Starting (or historic) balance from the journals (manually
- keyed in by users on account creation - unverified).
+ description: Starting (or historic) balance from the journals (manually keyed in by users on account creation - unverified).
format: double
x-is-money: true
accountBalance:
@@ -1439,57 +1514,44 @@ components:
description: The Xero identifier for an account
format: uuid
statementBalance:
- $ref: "#/components/schemas/StatementBalanceResponse"
+ $ref: '#/components/schemas/StatementBalanceResponse'
statementBalanceDate:
type: string
- description: UTC Date when the last bank statement item was entered into
- Xero. This date is represented in ISO 8601 format.
+ description: UTC Date when the last bank statement item was entered into Xero. This date is represented in ISO 8601 format.
format: date
bankStatement:
- $ref: "#/components/schemas/BankStatementResponse"
+ $ref: '#/components/schemas/BankStatementResponse'
cashAccount:
- $ref: "#/components/schemas/CashAccountResponse"
+ $ref: '#/components/schemas/CashAccountResponse'
additionalProperties: false
CurrentStatementResponse:
type: object
properties:
startDate:
type: string
- description: Looking at the most recent bank statement, this field indicates
- the first date which transactions on this statement pertain to. This date
- is represented in ISO 8601 format.
+ description: Looking at the most recent bank statement, this field indicates the first date which transactions on this statement pertain to. This date is represented in ISO 8601 format.
format: date
endDate:
type: string
- description: Looking at the most recent bank statement, this field indicates
- the last date which transactions on this statement pertain to. This date
- is represented in ISO 8601 format.
+ description: Looking at the most recent bank statement, this field indicates the last date which transactions on this statement pertain to. This date is represented in ISO 8601 format.
format: date
startBalance:
type: number
- description: Looking at the most recent bank statement, this field indicates
- the balance before the transactions on the statement are applied (note,
- this is not always populated by the bank in every single instance (~10%)).
+ description: Looking at the most recent bank statement, this field indicates the balance before the transactions on the statement are applied (note, this is not always populated by the bank in every single instance (~10%)).
format: double
x-is-money: true
endBalance:
type: number
- description: Looking at the most recent bank statement, this field indicates
- the balance after the transactions on the statement are applied (note,
- this is not always populated by the bank in every single instance (~10%)).
+ description: Looking at the most recent bank statement, this field indicates the balance after the transactions on the statement are applied (note, this is not always populated by the bank in every single instance (~10%)).
format: double
x-is-money: true
importedDateTimeUtc:
type: string
- description: Looking at the most recent bank statement, this field indicates
- when the document was imported into Xero. This date is represented in
- ISO 8601 format.
+ description: Looking at the most recent bank statement, this field indicates when the document was imported into Xero. This date is represented in ISO 8601 format.
format: date-time
importSourceType:
type: string
- description: Looking at the most recent bank statement, this field indicates
- the source of the data (direct bank feed, indirect bank feed, file upload,
- or manual keying).
+ description: Looking at the most recent bank statement, this field indicates the source of the data (direct bank feed, indirect bank feed, file upload, or manual keying).
additionalProperties: false
DataSourceResponse:
type: object
@@ -1578,120 +1640,90 @@ components:
properties:
value:
type: number
- description: Total closing balance of the account. This includes both reconciled
- and unreconciled bank statement lines. The closing balance will always
- be represented as a positive number, with it’s debit/credit status defined
- in the statementBalanceDebitCredit field.
+ description: Total closing balance of the account. This includes both reconciled and unreconciled bank statement lines. The closing balance will always be represented as a positive number, with it’s debit/credit status defined in the statementBalanceDebitCredit field.
format: double
x-is-money: true
type:
type: string
- description: The DEBIT or CREDIT status of the account. Cash accounts in
- credit have a negative balance.
+ description: The DEBIT or CREDIT status of the account. Cash accounts in credit have a negative balance.
additionalProperties: false
StatementLinesResponse:
type: object
properties:
unreconciledAmountPos:
type: number
- description: Sum of the amounts of all statement lines where both the reconciled
- flag is set to FALSE, and the amount is positive.
+ description: Sum of the amounts of all statement lines where both the reconciled flag is set to FALSE, and the amount is positive.
format: double
x-is-money: true
unreconciledAmountNeg:
type: number
- description: Sum of the amounts of all statement lines where both the reconciled
- flag is set to FALSE, and the amount is negative.
+ description: Sum of the amounts of all statement lines where both the reconciled flag is set to FALSE, and the amount is negative.
format: double
x-is-money: true
unreconciledLines:
type: integer
- description: Count of all statement lines where the reconciled flag is set
- to FALSE.
+ description: Count of all statement lines where the reconciled flag is set to FALSE.
format: int32
avgDaysUnreconciledPos:
type: number
- description: Sum-product of age of statement line in days multiplied by
- transaction amount, divided by the sum of transaction amount - in for
- those statement lines in which the reconciled flag is set to FALSE, and
- the amount is positive. Provides an indication of the age of unreconciled
- transactions.
+ description: Sum-product of age of statement line in days multiplied by transaction amount, divided by the sum of transaction amount - in for those statement lines in which the reconciled flag is set to FALSE, and the amount is positive. Provides an indication of the age of unreconciled transactions.
format: double
x-is-money: true
avgDaysUnreconciledNeg:
type: number
- description: Sum-product of age of statement line in days multiplied by
- transaction amount, divided by the sum of transaction amount - in for
- those statement lines in which the reconciled flag is set to FALSE, and
- the amount is negative. Provides an indication of the age of unreconciled
- transactions.
+ description: Sum-product of age of statement line in days multiplied by transaction amount, divided by the sum of transaction amount - in for those statement lines in which the reconciled flag is set to FALSE, and the amount is negative. Provides an indication of the age of unreconciled transactions.
format: double
x-is-money: true
earliestUnreconciledTransaction:
type: string
- description: UTC Date which is the earliest transaction date of a statement
- line for which the reconciled flag is set to FALSE. This date is represented
- in ISO 8601 format.
+ description: UTC Date which is the earliest transaction date of a statement line for which the reconciled flag is set to FALSE. This date is represented in ISO 8601 format.
format: date
latestUnreconciledTransaction:
type: string
- description: UTC Date which is the latest transaction date of a statement
- line for which the reconciled flag is set to FALSE. This date is represented
- in ISO 8601 format.
+ description: UTC Date which is the latest transaction date of a statement line for which the reconciled flag is set to FALSE. This date is represented in ISO 8601 format.
format: date
deletedAmount:
type: number
- description: Sum of the amounts of all deleted statement lines. Transactions
- may be deleted due to duplication or otherwise.
+ description: Sum of the amounts of all deleted statement lines. Transactions may be deleted due to duplication or otherwise.
format: double
x-is-money: true
totalAmount:
type: number
- description: Sum of the amounts of all statement lines. This is used as
- a metric of comparison to the unreconciled figures above.
+ description: Sum of the amounts of all statement lines. This is used as a metric of comparison to the unreconciled figures above.
format: double
x-is-money: true
dataSource:
- $ref: "#/components/schemas/DataSourceResponse"
+ $ref: '#/components/schemas/DataSourceResponse'
earliestReconciledTransaction:
type: string
- description: UTC Date which is the earliest transaction date of a statement
- line for which the reconciled flag is set to TRUE. This date is represented
- in ISO 8601 format.
+ description: UTC Date which is the earliest transaction date of a statement line for which the reconciled flag is set to TRUE. This date is represented in ISO 8601 format.
format: date
latestReconciledTransaction:
type: string
- description: UTC Date which is the latest transaction date of a statement
- line for which the reconciled flag is set to TRUE. This date is represented
- in ISO 8601 format.
+ description: UTC Date which is the latest transaction date of a statement line for which the reconciled flag is set to TRUE. This date is represented in ISO 8601 format.
format: date
reconciledAmountPos:
type: number
- description: Sum of the amounts of all statement lines where both the reconciled
- flag is set to TRUE, and the amount is positive.
+ description: Sum of the amounts of all statement lines where both the reconciled flag is set to TRUE, and the amount is positive.
format: double
x-is-money: true
reconciledAmountNeg:
type: number
- description: Sum of the amounts of all statement lines where both the reconciled
- flag is set to TRUE, and the amount is negative.
+ description: Sum of the amounts of all statement lines where both the reconciled flag is set to TRUE, and the amount is negative.
format: double
x-is-money: true
reconciledLines:
type: integer
- description: Count of all statement lines where the reconciled flag is set
- to TRUE
+ description: Count of all statement lines where the reconciled flag is set to TRUE
format: int32
totalAmountPos:
type: number
- description: Sum of the amounts of all statement lines where the amount
- is positive
+ description: Sum of the amounts of all statement lines where the amount is positive
format: double
x-is-money: true
totalAmountNeg:
type: number
- description: Sum of the amounts of all statement lines where the amount
- is negative.
+ description: Sum of the amounts of all statement lines where the amount is negative.
format: double
x-is-money: true
additionalProperties: false
@@ -1700,20 +1732,20 @@ components:
properties:
code:
type: string
- description: "Accounting code"
+ description: Accounting code
accountID:
type: string
- description: "ID of the account"
+ description: ID of the account
format: uuid
name:
type: string
- description: "Account name"
+ description: Account name
reportingCode:
type: string
- description: "Reporting code"
+ description: Reporting code
total:
type: number
- description: "Total movement on this account"
+ description: Total movement on this account
format: double
x-is-money: true
additionalProperties: false
@@ -1723,10 +1755,10 @@ components:
accountTypes:
type: array
items:
- $ref: "#/components/schemas/BalanceSheetAccountType"
+ $ref: '#/components/schemas/BalanceSheetAccountType'
total:
type: number
- description: "Total value of all the accounts in this type"
+ description: Total value of all the accounts in this type
format: double
x-is-money: true
additionalProperties: false
@@ -1735,15 +1767,15 @@ components:
properties:
accountType:
type: string
- description: "The type of the account. See Account Types"
+ description: The type of the account. See Account Types
accounts:
type: array
items:
- $ref: "#/components/schemas/BalanceSheetAccountDetail"
- description: "A list of all accounts of this type. Refer to the Account section below for each account element detail."
+ $ref: '#/components/schemas/BalanceSheetAccountDetail'
+ description: A list of all accounts of this type. Refer to the Account section below for each account element detail.
total:
type: number
- description: "Total value of all the accounts in this type"
+ description: Total value of all the accounts in this type
format: double
x-is-money: true
additionalProperties: false
@@ -1753,30 +1785,30 @@ components:
balanceDate:
type: string
format: date
- description: "Balance date of the report"
+ description: Balance date of the report
asset:
- $ref: "#/components/schemas/BalanceSheetAccountGroup"
+ $ref: '#/components/schemas/BalanceSheetAccountGroup'
liability:
- $ref: "#/components/schemas/BalanceSheetAccountGroup"
+ $ref: '#/components/schemas/BalanceSheetAccountGroup'
equity:
- $ref: "#/components/schemas/BalanceSheetAccountGroup"
+ $ref: '#/components/schemas/BalanceSheetAccountGroup'
additionalProperties: false
CashBalance:
type: object
properties:
openingCashBalance:
type: number
- description: "Opening balance of cash and cash equivalents"
+ description: Opening balance of cash and cash equivalents
format: double
x-is-money: true
closingCashBalance:
type: number
- description: "Closing balance of cash and cash equivalents"
+ description: Closing balance of cash and cash equivalents
format: double
x-is-money: true
netCashMovement:
type: number
- description: "Net movement of cash and cash equivalents for the period"
+ description: Net movement of cash and cash equivalents for the period
format: double
x-is-money: true
readOnly: true
@@ -1786,26 +1818,26 @@ components:
properties:
accountId:
type: string
- description: "ID of the account"
+ description: ID of the account
format: uuid
accountType:
type: string
- description: "The type of the account. See Account Types"
+ description: The type of the account. See Account Types
accountClass:
type: string
- description: "The class of the account. See Account Class Types"
+ description: The class of the account. See Account Class Types
code:
type: string
- description: "Account code"
+ description: Account code
name:
type: string
- description: "Account name"
+ description: Account name
reportingCode:
type: string
- description: "Reporting code used for cash flow classification"
+ description: Reporting code used for cash flow classification
total:
type: number
- description: "Total amount for the account"
+ description: Total amount for the account
format: double
x-is-money: true
additionalProperties: false
@@ -1814,75 +1846,75 @@ components:
properties:
name:
type: string
- description: "Name of the cashflow activity type. It will be either Operating Activities, Investing Activities or Financing Activities"
+ description: Name of the cashflow activity type. It will be either Operating Activities, Investing Activities or Financing Activities
total:
type: number
- description: "Total value of the activity type"
+ description: Total value of the activity type
format: double
x-is-money: true
cashflowTypes:
type: array
items:
- $ref: "#/components/schemas/CashflowType"
+ $ref: '#/components/schemas/CashflowType'
additionalProperties: false
CashflowResponse:
type: object
properties:
startDate:
type: string
- description: "Start date of the report"
- format: "date"
+ description: Start date of the report
+ format: date
endDate:
type: string
- description: "End date of the report"
- format: "date"
+ description: End date of the report
+ format: date
cashBalance:
- $ref: "#/components/schemas/CashBalance"
+ $ref: '#/components/schemas/CashBalance'
cashflowActivities:
type: array
items:
- $ref: "#/components/schemas/CashflowActivity"
- description: "Break down of cash and cash equivalents for the period"
+ $ref: '#/components/schemas/CashflowActivity'
+ description: Break down of cash and cash equivalents for the period
additionalProperties: false
CashflowType:
type: object
properties:
name:
type: string
- description: "Name of the activity"
+ description: Name of the activity
total:
type: number
- description: "Total value of the activity"
+ description: Total value of the activity
format: double
x-is-money: true
accounts:
type: array
items:
- $ref: "#/components/schemas/CashflowAccount"
- description: "List of the accounts in this activity"
+ $ref: '#/components/schemas/CashflowAccount'
+ description: List of the accounts in this activity
additionalProperties: false
PnlAccount:
type: object
properties:
accountID:
type: string
- description: "ID of the account"
+ description: ID of the account
format: uuid
accountType:
type: string
- description: "The type of the account. See Account Types"
+ description: The type of the account. See Account Types
code:
type: string
- description: "Account code"
+ description: Account code
name:
type: string
- description: "Account name"
+ description: Account name
reportingCode:
type: string
- description: "Reporting code (Shown if set)"
+ description: Reporting code (Shown if set)
total:
type: number
- description: "Total movement on this account"
+ description: Total movement on this account
format: double
x-is-money: true
additionalProperties: false
@@ -1891,118 +1923,118 @@ components:
properties:
total:
type: number
- description: "Total revenue/expense value"
+ description: Total revenue/expense value
format: double
x-is-money: true
accountTypes:
type: array
items:
- $ref: "#/components/schemas/PnlAccountType"
- description: "Contains trading income and other income for revenue section / operating expenses and direct cost for expense section if the data is available for each section. Refer to the account type element below"
+ $ref: '#/components/schemas/PnlAccountType'
+ description: Contains trading income and other income for revenue section / operating expenses and direct cost for expense section if the data is available for each section. Refer to the account type element below
additionalProperties: false
PnlAccountType:
type: object
properties:
total:
type: number
- description: "Total movement on this account type"
+ description: Total movement on this account type
format: double
x-is-money: true
title:
type: string
- description: "Name of this account type, it will be either Trading Income or Other Income for Revenue section / Direct Cost or Operating Expenses for Expense section"
+ description: Name of this account type, it will be either Trading Income or Other Income for Revenue section / Direct Cost or Operating Expenses for Expense section
accounts:
type: array
items:
- $ref: "#/components/schemas/PnlAccount"
- description: "A list of the movement on each account detail during the query period. Refer to the account detail element below"
+ $ref: '#/components/schemas/PnlAccount'
+ description: A list of the movement on each account detail during the query period. Refer to the account detail element below
additionalProperties: false
ProfitAndLossResponse:
type: object
properties:
startDate:
type: string
- description: "Start date of the report"
- format: "date"
+ description: Start date of the report
+ format: date
endDate:
type: string
- description: "End date of the report"
- format: "date"
+ description: End date of the report
+ format: date
netProfitLoss:
type: number
- description: "Net profit loss value"
+ description: Net profit loss value
format: double
x-is-money: true
revenue:
- $ref: "#/components/schemas/PnlAccountClass"
+ $ref: '#/components/schemas/PnlAccountClass'
expense:
- $ref: "#/components/schemas/PnlAccountClass"
+ $ref: '#/components/schemas/PnlAccountClass'
additionalProperties: false
TrialBalanceAccount:
type: object
properties:
accountId:
type: string
- description: "ID of the account"
+ description: ID of the account
format: uuid
accountType:
type: string
- description: "The type of the account. See Account Types"
+ description: The type of the account. See Account Types
accountCode:
type: string
- description: "Customer defined alpha numeric account code e.g 200 or SALES"
+ description: Customer defined alpha numeric account code e.g 200 or SALES
accountClass:
type: string
- description: "The class of the account. See Account Class Types"
+ description: The class of the account. See Account Class Types
status:
type: string
- description: "Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes"
+ description: Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes
reportingCode:
type: string
- description: "Reporting code (Shown if set)"
+ description: Reporting code (Shown if set)
accountName:
type: string
- description: "Name of the account"
+ description: Name of the account
balance:
- $ref: "#/components/schemas/TrialBalanceEntry"
+ $ref: '#/components/schemas/TrialBalanceEntry'
signedBalance:
type: number
- description: "Value of balance. Expense and Asset accounts code debits as positive. Revenue, Liability, and Equity accounts code debits as negative"
+ description: Value of balance. Expense and Asset accounts code debits as positive. Revenue, Liability, and Equity accounts code debits as negative
format: double
x-is-money: true
accountMovement:
- $ref: "#/components/schemas/TrialBalanceMovement"
+ $ref: '#/components/schemas/TrialBalanceMovement'
additionalProperties: false
TrialBalanceEntry:
type: object
properties:
value:
type: number
- description: "Net movement or net balance in the account"
+ description: Net movement or net balance in the account
format: double
x-is-money: true
entryType:
type: string
- description: "Sign (Debit/Credit) of the movement of balance in the account"
+ description: Sign (Debit/Credit) of the movement of balance in the account
additionalProperties: false
TrialBalanceMovement:
type: object
properties:
debits:
type: number
- description: "Debit amount"
+ description: Debit amount
format: double
x-is-money: true
credits:
type: number
- description: "Credit amount"
+ description: Credit amount
format: double
x-is-money: true
movement:
- $ref: "#/components/schemas/TrialBalanceEntry"
+ $ref: '#/components/schemas/TrialBalanceEntry'
signedMovement:
type: number
- description: "Value of movement. Expense and Asset accounts code debits as positive. Revenue, Liability, and Equity accounts code debits as negative"
+ description: Value of movement. Expense and Asset accounts code debits as positive. Revenue, Liability, and Equity accounts code debits as negative
format: double
x-is-money: true
additionalProperties: false
@@ -2012,16 +2044,16 @@ components:
startDate:
type: string
format: date
- description: "Start date of the report"
+ description: Start date of the report
endDate:
type: string
format: date
- description: "End date of the report"
+ description: End date of the report
accounts:
type: array
items:
- $ref: "#/components/schemas/TrialBalanceAccount"
- description: "Refer to the accounts section below"
+ $ref: '#/components/schemas/TrialBalanceAccount'
+ description: Refer to the accounts section below
additionalProperties: false
IncomeByContactResponse:
type: object
@@ -2083,9 +2115,7 @@ components:
properties:
totalOutstandingAged:
type: number
- description: >-
- Total outstanding invoice value within the period where the invoices
- are more than 90 days old
+ description: Total outstanding invoice value within the period where the invoices are more than 90 days old
format: double
x-is-money: true
totalVoided:
@@ -2148,9 +2178,7 @@ components:
properties:
totalOutstandingAged:
type: number
- description: >-
- Total outstanding invoice value for the contact within the period
- where the invoices are more than 90 days old
+ description: Total outstanding invoice value for the contact within the period where the invoices are more than 90 days old
format: double
x-is-money: true
totalVoided:
@@ -2446,10 +2474,10 @@ components:
format: double
x-is-money: true
endBalance:
- type: number
- description: Closing balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. Where not supplied, the value will be 0.
- format: double
- x-is-money: true
+ type: number
+ description: Closing balance sourced from imported bank statements (if supplied). Note, for manually uploaded statements, this balance is also manual and usually not supplied. Where not supplied, the value will be 0.
+ format: double
+ x-is-money: true
indicativeStartBalance:
type: number
description: |
@@ -2458,8 +2486,7 @@ components:
x-is-money: true
indicativeEndBalance:
type: number
- description: |
- Closing statement balance calculated in Xero (= bank account conversion balance plus sum of imported bank statement lines). Note: If indicative statement balance doesn't match imported statement balance for the same date, either the conversion (opening at inception) balance in Xero is wrong or there's an error in the bank statement lines in Xero. Ref: https://central.xero.com/s/article/Compare-the-statement-balance-in-Xero-to-your-actual-bank-balance?userregion=true
+ description: "Closing statement balance calculated in Xero (= bank account conversion balance plus sum of imported bank statement lines). Note: If indicative statement balance doesn't match imported statement balance for the same date, either the conversion (opening at inception) balance in Xero is wrong or there's an error in the bank statement lines in Xero. Ref: https://central.xero.com/s/article/Compare-the-statement-balance-in-Xero-to-your-actual-bank-balance?userregion=true \n"
format: double
x-is-money: true
statementLines:
@@ -2467,4 +2494,4 @@ components:
items:
$ref: '#/components/schemas/StatementLineResponse'
description: List of statement lines
- additionalProperties: false
\ No newline at end of file
+ additionalProperties: false
diff --git a/xero-identity.yaml b/xero-identity.yaml
index 7a810976..6b41a11c 100644
--- a/xero-identity.yaml
+++ b/xero-identity.yaml
@@ -1,19 +1,19 @@
openapi: 3.0.0
info:
- version: "6.3.0"
+ version: 6.3.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/"
+ termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/
contact:
- name: "Xero Platform Team"
- email: "api@xero.com"
- url: "https://developer.xero.com"
+ name: Xero Platform Team
+ email: api@xero.com
+ url: https://developer.xero.com
license:
- name: MIT
- url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE'
+ name: MIT
+ url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE
servers:
- description: Xero Identity service API
- url: 'https://api.xero.com'
+ url: https://api.xero.com
paths:
/Connections:
get:
@@ -29,31 +29,22 @@ paths:
required: false
name: authEventId
description: Filter by authEventId
- example: "00000000-0000-0000-0000-000000000000"
+ example: 00000000-0000-0000-0000-000000000000
schema:
type: string
format: uuid
- x-basepath: 'https://api.xero.com'
+ x-basepath: https://api.xero.com
responses:
- '200':
- description: Success - return response of type Connections array with 0 to n Connection
+ "200":
+ description: Success - return response of type Connections array with 0 to n Connection
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Connection'
- example: '[
- {
- "id": "7cb59f93-2964-421d-bb5e-a0f7a4572a44",
- "tenantId": "fe79f7dd-b6d4-4a92-ba7b-538af6289c58",
- "tenantName": "Demo Company (NZ)",
- "tenantType": "ORGANISATION",
- "createdDateUtc": "2019-12-07T18:46:19.5165400",
- "updatedDateUtc": "2019-12-07T18:46:19.5187840"
- }
- ]'
- '/Connections/{id}':
+ example: '[ { "id": "7cb59f93-2964-421d-bb5e-a0f7a4572a44", "tenantId": "fe79f7dd-b6d4-4a92-ba7b-538af6289c58", "tenantName": "Demo Company (NZ)", "tenantType": "ORGANISATION", "createdDateUtc": "2019-12-07T18:46:19.5165400", "updatedDateUtc": "2019-12-07T18:46:19.5187840" } ]'
+ /Connections/{id}:
delete:
security:
- OAuth2: []
@@ -62,7 +53,7 @@ paths:
description: Override the base server url that include version
operationId: deleteConnection
summary: Deletes a connection for this user (i.e. disconnect a tenant)
- x-basepath: 'https://api.xero.com'
+ x-basepath: https://api.xero.com
parameters:
- required: true
in: path
@@ -72,15 +63,15 @@ paths:
type: string
format: uuid
responses:
- '204':
- description: Success - connection has been deleted no content returned
- '404':
+ "204":
+ description: Success - connection has been deleted no content returned
+ "404":
description: Resource not found
components:
schemas:
Connection:
externalDocs:
- url: 'http://developer.xero.com'
+ url: http://developer.xero.com
properties:
id:
description: Xero identifier
@@ -105,16 +96,16 @@ components:
type: string
format: date-time
x-is-datetime: true
- x-php-format: '\DateTime'
+ x-php-format: \DateTime
updatedDateUtc:
description: The date when the user most recently connected this tenant to your app. May differ to the created date if the user has disconnected and subsequently reconnected this tenant to your app.
type: string
format: date-time
x-is-datetime: true
- x-php-format: '\DateTime'
+ x-php-format: \DateTime
RefreshToken:
externalDocs:
- url: 'http://developer.xero.com'
+ url: http://developer.xero.com
type: object
properties:
grant_type:
@@ -131,7 +122,7 @@ components:
type: string
AccessToken:
externalDocs:
- url: 'http://developer.xero.com'
+ url: http://developer.xero.com
type: object
properties:
id_token:
@@ -151,17 +142,17 @@ components:
description: token used to refresh an expired access token
type: string
securitySchemes:
- BasicAuth:
+ BasicAuth:
type: http
scheme: basic
OAuth2:
type: oauth2
description: For more information
- flows:
+ flows:
authorizationCode:
- authorizationUrl: 'https://login.xero.com/identity/connect/authorize'
- tokenUrl: 'https://identity.xero.com/connect/token'
+ authorizationUrl: https://login.xero.com/identity/connect/authorize
+ tokenUrl: https://identity.xero.com/connect/token
scopes:
email: Grant read-only access to your email
openid: Grant read-only access to your open id
- profile: your profile information
\ No newline at end of file
+ profile: your profile information
diff --git a/xero-payroll-au.yaml b/xero-payroll-au.yaml
index a6b8d867..cac291a2 100644
--- a/xero-payroll-au.yaml
+++ b/xero-payroll-au.yaml
@@ -1,16 +1,16 @@
openapi: 3.0.0
info:
- version: "6.3.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/"
+ version: 6.3.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/
contact:
- name: "Xero Platform Team"
- email: "api@xero.com"
- url: "https://developer.xero.com"
+ name: Xero Platform Team
+ email: api@xero.com
+ url: https://developer.xero.com
license:
- name: MIT
- url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE'
+ name: MIT
+ url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE
servers:
- description: Xero Payroll AU API
url: https://api.xero.com/payroll.xro/1.0
@@ -23,7 +23,9 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollAu
operationId: getEmployees
@@ -55,52 +57,46 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Employees'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573621523465)/",
- "Employees": [
- {
- "EmployeeID": "b34e89ff-770d-4099-b7e5-f968767118bc",
- "FirstName": "Jack",
- "MiddleNames": "Johnson",
- "LastName": "Sparrow",
- "Status": "ACTIVE",
- "Email": "jack.sparrow@xero.com",
- "DateOfBirth": "/Date(572313600000+0000)/",
- "Gender": "M",
- "Phone": "4153332323",
- "Mobile": "415-1234567",
- "StartDate": "/Date(1547164800000+0000)/",
- "OrdinaryEarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "PayrollCalendarID": "22a05fc5-386d-4950-9842-3e7a6c812135",
- "UpdatedDateUTC": "/Date(1572915814000+0000)/",
- "IsSTP2Qualified": false
- },
- {
- "EmployeeID": "7aa04979-ded5-44d9-b09a-793749425844",
- "FirstName": "John",
- "LastName": "Smith",
- "Status": "ACTIVE",
- "Email": "john.smith@xero.com",
- "DateOfBirth": "/Date(315619200000+0000)/",
- "Gender": "M",
- "StartDate": "/Date(1572566400000+0000)/",
- "OrdinaryEarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "PayrollCalendarID": "78bb86b9-e1ea-47ac-b75d-f087a81931de",
- "UpdatedDateUTC": "/Date(1572916028000+0000)/",
- "IsSTP2Qualified": false
- }
- ]
- }
- '400':
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573621523465)/
+ Employees:
+ - EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc
+ FirstName: Jack
+ MiddleNames: Johnson
+ LastName: Sparrow
+ Status: ACTIVE
+ Email: jack.sparrow@xero.com
+ DateOfBirth: /Date(572313600000+0000)/
+ Gender: M
+ Phone: "4153332323"
+ Mobile: 415-1234567
+ StartDate: /Date(1547164800000+0000)/
+ OrdinaryEarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ PayrollCalendarID: 22a05fc5-386d-4950-9842-3e7a6c812135
+ UpdatedDateUTC: /Date(1572915814000+0000)/
+ IsSTP2Qualified: false
+ - EmployeeID: 7aa04979-ded5-44d9-b09a-793749425844
+ FirstName: John
+ LastName: Smith
+ Status: ACTIVE
+ Email: john.smith@xero.com
+ DateOfBirth: /Date(315619200000+0000)/
+ Gender: M
+ StartDate: /Date(1572566400000+0000)/
+ OrdinaryEarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de
+ UpdatedDateUTC: /Date(1572916028000+0000)/
+ IsSTP2Qualified: false
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -108,7 +104,8 @@ paths:
$ref: '#/components/schemas/APIException'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollAu
summary: Creates a payroll employee
@@ -125,18 +122,18 @@ paths:
object: employee
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2000, Month.OCTOBER, 28)"
- java: "LocalDate.of(2000, Month.OCTOBER, 28)"
- csharp: "new DateTime(2000, 10, 10)"
- php: "new DateTime('2000-10-28')"
- node: "'2000-10-28'"
- python: "dateutil.parser.parse('2000-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2000, Month.OCTOBER, 28)
+ java: LocalDate.of(2000, Month.OCTOBER, 28)
+ csharp: new DateTime(2000, 10, 10)
+ php: new DateTime('2000-10-28')
+ node: '''2000-10-28'''
+ python: dateutil.parser.parse('2000-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- homeAddress:
key: homeAddress
keyPascal: HomeAddress
keySnake: home_address
- is_object: true
+ is_object: true
- addressLine1:
key: addressLine1
keyPascal: AddressLine1
@@ -166,18 +163,18 @@ paths:
- employee:
key: employee
keyPascal: Employee
- is_object: true
+ is_object: true
- firstName:
key: firstName
keyPascal: FirstName
- keySnake: first_name
- default: "Adam"
+ keySnake: first_name
+ default: Adam
object: employee
- lastName:
key: lastName
keyPascal: LastName
keySnake: last_name
- default: "Adamson"
+ default: Adamson
object: employee
- dateOfBirth:
is_variable: true
@@ -198,49 +195,44 @@ paths:
default: homeAddress
python: home_address
ruby: home_address
- object: employee
+ object: employee
responses:
- '200':
+ "200":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/Employees'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573621524489)/",
- "Employees": [
- {
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "FirstName": "Albus",
- "MiddleNames": "Percival",
- "LastName": "Dumbledore",
- "Status": "ACTIVE",
- "Email": "albus39608@hogwarts.edu",
- "DateOfBirth": "/Date(321523200000+0000)/",
- "JobTitle": "Regional Manager",
- "Gender": "M",
- "HomeAddress": {
- "AddressLine1": "101 Green St",
- "City": "Island Bay",
- "Region": "NSW",
- "PostalCode": "6023",
- "Country": "AUSTRALIA"
- },
- "Phone": "444-2323",
- "Mobile": "555-1212",
- "StartDate": "/Date(321523200000+0000)/",
- "Classification": "corporate",
- "OrdinaryEarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "UpdatedDateUTC": "/Date(1573621524458+0000)/",
- "IsAuthorisedToApproveLeave": true,
- "IsAuthorisedToApproveTimesheets": true
- }
- ]
- }
- '400':
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573621524489)/
+ Employees:
+ - EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ FirstName: Albus
+ MiddleNames: Percival
+ LastName: Dumbledore
+ Status: ACTIVE
+ Email: albus39608@hogwarts.edu
+ DateOfBirth: /Date(321523200000+0000)/
+ JobTitle: Regional Manager
+ Gender: M
+ HomeAddress:
+ AddressLine1: 101 Green St
+ City: Island Bay
+ Region: NSW
+ PostalCode: "6023"
+ Country: AUSTRALIA
+ Phone: 444-2323
+ Mobile: 555-1212
+ StartDate: /Date(321523200000+0000)/
+ Classification: corporate
+ OrdinaryEarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ UpdatedDateUTC: /Date(1573621524458+0000)/
+ IsAuthorisedToApproveLeave: true
+ IsAuthorisedToApproveTimesheets: true
+ "400":
description: invalid input, object invalid - TODO
requestBody:
required: true
@@ -250,178 +242,127 @@ paths:
type: array
items:
$ref: '#/components/schemas/Employee'
- example: '[
- {
- "FirstName": "Albus",
- "LastName": "Dumbledore",
- "DateOfBirth": "/Date(321523200000+0000)/",
- "HomeAddress": {
- "AddressLine1": "101 Green St",
- "City": "Island Bay",
- "Region": "NSW",
- "PostalCode": "6023",
- "Country": "AUSTRALIA"
- },
- "StartDate": "/Date(321523200000+0000)/",
- "MiddleNames": "Percival",
- "Email": "albus39608@hogwarts.edu",
- "Gender": "M",
- "Phone": "444-2323",
- "Mobile": "555-1212",
- "IsAuthorisedToApproveLeave": true,
- "IsAuthorisedToApproveTimesheets": true,
- "JobTitle": "Regional Manager",
- "Classification": "corporate",
- "OrdinaryEarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "Status": "ACTIVE"
- }
- ]'
+ example: '[ { "FirstName": "Albus", "LastName": "Dumbledore", "DateOfBirth": "/Date(321523200000+0000)/", "HomeAddress": { "AddressLine1": "101 Green St", "City": "Island Bay", "Region": "NSW", "PostalCode": "6023", "Country": "AUSTRALIA" }, "StartDate": "/Date(321523200000+0000)/", "MiddleNames": "Percival", "Email": "albus39608@hogwarts.edu", "Gender": "M", "Phone": "444-2323", "Mobile": "555-1212", "IsAuthorisedToApproveLeave": true, "IsAuthorisedToApproveTimesheets": true, "JobTitle": "Regional Manager", "Classification": "corporate", "OrdinaryEarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4", "Status": "ACTIVE" } ]'
/Employees/{EmployeeID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollAu
summary: Retrieves an employee's detail by unique employee id
operationId: getEmployee
- parameters:
+ parameters:
- name: EmployeeID
x-snake: employee_id
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
- application/json:
+ application/json:
schema:
$ref: '#/components/schemas/Employees'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573623316150)/",
- "Employees": [
- {
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "Title": "Mr.",
- "FirstName": "Albus",
- "MiddleNames": "Frank",
- "LastName": "Dumbledore",
- "Status": "ACTIVE",
- "Email": "albus39608@hogwarts.edu",
- "DateOfBirth": "/Date(321494400000+0000)/",
- "JobTitle": "Regional Manager",
- "Gender": "M",
- "HomeAddress": {
- "AddressLine1": "101 Green St",
- "City": "Island Bay",
- "Region": "NSW",
- "PostalCode": "6023",
- "Country": "AUSTRALIA"
- },
- "Phone": "444-2323",
- "Mobile": "555-1212",
- "StartDate": "/Date(321494400000+0000)/",
- "Classification": "corporate",
- "OrdinaryEarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "PayrollCalendarID": "78bb86b9-e1ea-47ac-b75d-f087a81931de",
- "UpdatedDateUTC": "/Date(1573623306000+0000)/",
- "EmployeeGroupName": "foo",
- "IsAuthorisedToApproveLeave": true,
- "IsAuthorisedToApproveTimesheets": true,
- "TaxDeclaration": {
- "AustralianResidentForTaxPurposes": true,
- "TaxFreeThresholdClaimed": true,
- "HasHELPDebt": false,
- "HasSFSSDebt": false,
- "EligibleToReceiveLeaveLoading": false,
- "UpdatedDateUTC": "/Date(1573623306000+0000)/",
- "HasStudentStartupLoan": false,
- "ResidencyStatus": "AUSTRALIANRESIDENT"
- },
- "BankAccounts": [],
- "OpeningBalances": {
- "OpeningBalanceDate": "/Date(1573603200000+0000)/",
- "EarningsLines": [],
- "DeductionLines": [],
- "SuperLines": [],
- "ReimbursementLines": [],
- "LeaveLines": [
- {
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "NumberOfUnits": 10
- }
- ],
- "PaidLeaveEarningsLines": []
- },
- "PayTemplate": {
- "EarningsLines": [
- {
- "EarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "CalculationType": "USEEARNINGSRATE",
- "NormalNumberOfUnits": 3
- }
- ],
- "DeductionLines": [
- {
- "DeductionTypeID": "ed05ea82-e40a-4eb6-9c2e-4b3c03e7e938",
- "CalculationType": "FIXEDAMOUNT",
- "Amount": 4
- }
- ],
- "SuperLines": [
- {
- "ContributionType": "SGC",
- "CalculationType": "STATUTORY",
- "MinimumMonthlyEarnings": 450,
- "ExpenseAccountCode": "478",
- "LiabilityAccountCode": "826"
- }
- ],
- "ReimbursementLines": [
- {
- "ReimbursementTypeID": "aa8cfa40-d872-4be0-8a94-bb7f00962f74",
- "Description": "boo",
- "Amount": 55
- }
- ],
- "LeaveLines": [
- {
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "CalculationType": "FIXEDAMOUNTEACHPERIOD",
- "AnnualNumberOfUnits": 4,
- "EntitlementFinalPayPayoutType": "NOTPAIDOUT"
- }
- ]
- },
- "SuperMemberships": [],
- "LeaveBalances": [
- {
- "LeaveName": "Carer Leave (unpaid)",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "NumberOfUnits": 10,
- "TypeOfUnits": "Hours"
- }
- ]
- }
- ]
- }
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573623316150)/
+ Employees:
+ - EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ Title: Mr.
+ FirstName: Albus
+ MiddleNames: Frank
+ LastName: Dumbledore
+ Status: ACTIVE
+ Email: albus39608@hogwarts.edu
+ DateOfBirth: /Date(321494400000+0000)/
+ JobTitle: Regional Manager
+ Gender: M
+ HomeAddress:
+ AddressLine1: 101 Green St
+ City: Island Bay
+ Region: NSW
+ PostalCode: "6023"
+ Country: AUSTRALIA
+ Phone: 444-2323
+ Mobile: 555-1212
+ StartDate: /Date(321494400000+0000)/
+ Classification: corporate
+ OrdinaryEarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de
+ UpdatedDateUTC: /Date(1573623306000+0000)/
+ EmployeeGroupName: foo
+ IsAuthorisedToApproveLeave: true
+ IsAuthorisedToApproveTimesheets: true
+ TaxDeclaration:
+ AustralianResidentForTaxPurposes: true
+ TaxFreeThresholdClaimed: true
+ HasHELPDebt: false
+ HasSFSSDebt: false
+ EligibleToReceiveLeaveLoading: false
+ UpdatedDateUTC: /Date(1573623306000+0000)/
+ HasStudentStartupLoan: false
+ ResidencyStatus: AUSTRALIANRESIDENT
+ BankAccounts: []
+ OpeningBalances:
+ OpeningBalanceDate: /Date(1573603200000+0000)/
+ EarningsLines: []
+ DeductionLines: []
+ SuperLines: []
+ ReimbursementLines: []
+ LeaveLines:
+ - LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ NumberOfUnits: 10
+ PaidLeaveEarningsLines: []
+ PayTemplate:
+ EarningsLines:
+ - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ CalculationType: USEEARNINGSRATE
+ NormalNumberOfUnits: 3
+ DeductionLines:
+ - DeductionTypeID: ed05ea82-e40a-4eb6-9c2e-4b3c03e7e938
+ CalculationType: FIXEDAMOUNT
+ Amount: 4
+ SuperLines:
+ - ContributionType: SGC
+ CalculationType: STATUTORY
+ MinimumMonthlyEarnings: 450
+ ExpenseAccountCode: "478"
+ LiabilityAccountCode: "826"
+ ReimbursementLines:
+ - ReimbursementTypeID: aa8cfa40-d872-4be0-8a94-bb7f00962f74
+ Description: boo
+ Amount: 55
+ LeaveLines:
+ - LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ CalculationType: FIXEDAMOUNTEACHPERIOD
+ AnnualNumberOfUnits: 4
+ EntitlementFinalPayPayoutType: NOTPAIDOUT
+ SuperMemberships: []
+ LeaveBalances:
+ - LeaveName: Carer Leave (unpaid)
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ NumberOfUnits: 10
+ TypeOfUnits: Hours
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollAu
- summary: Updates an employee's detail
+ summary: Updates an employee's detail
operationId: updateEmployee
- description: Update properties on a single employee
+ description: Update properties on a single employee
x-example:
- dateOfBirthValue:
key: dateOfBirth
@@ -431,18 +372,18 @@ paths:
object: employee
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2000, Month.OCTOBER, 28)"
- java: "LocalDate.of(2000, Month.OCTOBER, 28)"
- csharp: "new DateTime(2000, 10, 10)"
- php: "new DateTime('2000-10-28')"
- node: "'2000-10-28'"
- python: "dateutil.parser.parse('2000-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2000, Month.OCTOBER, 28)
+ java: LocalDate.of(2000, Month.OCTOBER, 28)
+ csharp: new DateTime(2000, 10, 10)
+ php: new DateTime('2000-10-28')
+ node: '''2000-10-28'''
+ python: dateutil.parser.parse('2000-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- homeAddress:
key: homeAddress
keyPascal: HomeAddress
keySnake: home_address
- is_object: true
+ is_object: true
- addressLine1:
key: addressLine1
keyPascal: AddressLine1
@@ -472,18 +413,18 @@ paths:
- employee:
key: employee
keyPascal: Employee
- is_object: true
+ is_object: true
- firstName:
key: firstName
keyPascal: FirstName
- keySnake: first_name
- default: "Adam"
+ keySnake: first_name
+ default: Adam
object: employee
- lastName:
key: lastName
keyPascal: LastName
keySnake: last_name
- default: "Adamson"
+ default: Adamson
object: employee
- dateOfBirth:
is_variable: true
@@ -512,51 +453,46 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/Employees'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "3f93110a-df13-49c7-b82f-a069813df188",
- "DateTimeUTC": "/Date(1573621524786)/",
- "Employees": [
- {
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "FirstName": "Albus",
- "MiddleNames": "Frank",
- "LastName": "Dumbledore",
- "Status": "ACTIVE",
- "Email": "albus39608@hogwarts.edu",
- "DateOfBirth": "/Date(321523200000+0000)/",
- "JobTitle": "Regional Manager",
- "Gender": "M",
- "HomeAddress": {
- "AddressLine1": "101 Green St",
- "City": "Island Bay",
- "Region": "NSW",
- "PostalCode": "6023",
- "Country": "AUSTRALIA"
- },
- "Phone": "444-2323",
- "Mobile": "555-1212",
- "StartDate": "/Date(321523200000+0000)/",
- "Classification": "corporate",
- "OrdinaryEarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "UpdatedDateUTC": "/Date(1573621524755+0000)/",
- "IsAuthorisedToApproveLeave": true,
- "IsAuthorisedToApproveTimesheets": true
- }
- ]
- }
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: 3f93110a-df13-49c7-b82f-a069813df188
+ DateTimeUTC: /Date(1573621524786)/
+ Employees:
+ - EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ FirstName: Albus
+ MiddleNames: Frank
+ LastName: Dumbledore
+ Status: ACTIVE
+ Email: albus39608@hogwarts.edu
+ DateOfBirth: /Date(321523200000+0000)/
+ JobTitle: Regional Manager
+ Gender: M
+ HomeAddress:
+ AddressLine1: 101 Green St
+ City: Island Bay
+ Region: NSW
+ PostalCode: "6023"
+ Country: AUSTRALIA
+ Phone: 444-2323
+ Mobile: 555-1212
+ StartDate: /Date(321523200000+0000)/
+ Classification: corporate
+ OrdinaryEarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ UpdatedDateUTC: /Date(1573621524755+0000)/
+ IsAuthorisedToApproveLeave: true
+ IsAuthorisedToApproveTimesheets: true
requestBody:
required: true
content:
@@ -565,21 +501,19 @@ paths:
type: array
items:
$ref: '#/components/schemas/Employee'
- example: '[
- {
- "MiddleNames": "Frank"
- }
- ]'
+ example: '[ { "MiddleNames": "Frank" } ]'
/LeaveApplications:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollAu
operationId: getLeaveApplications
- summary: Retrieves leave applications
+ summary: Retrieves leave applications
parameters:
- in: header
name: If-Modified-Since
@@ -607,114 +541,89 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/LeaveApplications'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573679791199)/",
- "LeaveApplications": [
- {
- "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624",
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1573171200000+0000)/",
- "PayPeriodEndDate": "/Date(1573689600000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 0
- }
- ],
- "Title": "vacation",
- "StartDate": "/Date(1573516800000+0000)/",
- "EndDate": "/Date(1573516800000+0000)/",
- "UpdatedDateUTC": "/Date(1573623008000+0000)/",
- "PayOutType": "DEFAULT"
- },
- {
- "LeaveApplicationID": "3b934902-1e16-4c02-a3d3-68fa7d63e01d",
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1573171200000+0000)/",
- "PayPeriodEndDate": "/Date(1573689600000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 8
- }
- ],
- "Title": "Cashed Out",
- "StartDate": "/Date(1573516800000+0000)/",
- "EndDate": "/Date(1573516800000+0000)/",
- "UpdatedDateUTC": "/Date(1573623008000+0000)/",
- "PayOutType": "CASHED_OUT"
- },
- {
- "LeaveApplicationID": "62b90465-66e9-4c3a-8151-de1e6335554d",
- "EmployeeID": "b34e89ff-770d-4099-b7e5-f968767118bc",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1571961600000+0000)/",
- "PayPeriodEndDate": "/Date(1572480000000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 0
- },
- {
- "PayPeriodStartDate": "/Date(1572566400000+0000)/",
- "PayPeriodEndDate": "/Date(1573084800000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 0
- }
- ],
- "Title": "Yep Carer Leave",
- "Description": "My updated Description",
- "StartDate": "/Date(1572559200000+0000)/",
- "EndDate": "/Date(1572645600000+0000)/",
- "UpdatedDateUTC": "/Date(1573447344000+0000)/",
- "PayOutType": "DEFAULT"
- },
- {
- "LeaveApplicationID": "e8bd9eeb-18c9-4475-9c81-b298f9aa26c0",
- "EmployeeID": "b34e89ff-770d-4099-b7e5-f968767118bc",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1571961600000+0000)/",
- "PayPeriodEndDate": "/Date(1572480000000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 0
- },
- {
- "PayPeriodStartDate": "/Date(1572566400000+0000)/",
- "PayPeriodEndDate": "/Date(1573084800000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 0
- }
- ],
- "Title": "Hello World",
- "StartDate": "/Date(1572559200000+0000)/",
- "EndDate": "/Date(1572645600000+0000)/",
- "UpdatedDateUTC": "/Date(1573447343000+0000)/",
- "PayOutType": "DEFAULT"
- }
- ]
- }
- '400':
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573679791199)/
+ LeaveApplications:
+ - LeaveApplicationID: 1d4cd583-0107-4386-936b-672eb3d1f624
+ EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ LeavePeriods:
+ - PayPeriodStartDate: /Date(1573171200000+0000)/
+ PayPeriodEndDate: /Date(1573689600000+0000)/
+ LeavePeriodStatus: SCHEDULED
+ NumberOfUnits: 0
+ Title: vacation
+ StartDate: /Date(1573516800000+0000)/
+ EndDate: /Date(1573516800000+0000)/
+ UpdatedDateUTC: /Date(1573623008000+0000)/
+ PayOutType: DEFAULT
+ - LeaveApplicationID: 3b934902-1e16-4c02-a3d3-68fa7d63e01d
+ EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ LeavePeriods:
+ - PayPeriodStartDate: /Date(1573171200000+0000)/
+ PayPeriodEndDate: /Date(1573689600000+0000)/
+ LeavePeriodStatus: SCHEDULED
+ NumberOfUnits: 8
+ Title: Cashed Out
+ StartDate: /Date(1573516800000+0000)/
+ EndDate: /Date(1573516800000+0000)/
+ UpdatedDateUTC: /Date(1573623008000+0000)/
+ PayOutType: CASHED_OUT
+ - LeaveApplicationID: 62b90465-66e9-4c3a-8151-de1e6335554d
+ EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ LeavePeriods:
+ - PayPeriodStartDate: /Date(1571961600000+0000)/
+ PayPeriodEndDate: /Date(1572480000000+0000)/
+ LeavePeriodStatus: SCHEDULED
+ NumberOfUnits: 0
+ - PayPeriodStartDate: /Date(1572566400000+0000)/
+ PayPeriodEndDate: /Date(1573084800000+0000)/
+ LeavePeriodStatus: SCHEDULED
+ NumberOfUnits: 0
+ Title: Yep Carer Leave
+ Description: My updated Description
+ StartDate: /Date(1572559200000+0000)/
+ EndDate: /Date(1572645600000+0000)/
+ UpdatedDateUTC: /Date(1573447344000+0000)/
+ PayOutType: DEFAULT
+ - LeaveApplicationID: e8bd9eeb-18c9-4475-9c81-b298f9aa26c0
+ EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ LeavePeriods:
+ - PayPeriodStartDate: /Date(1571961600000+0000)/
+ PayPeriodEndDate: /Date(1572480000000+0000)/
+ LeavePeriodStatus: SCHEDULED
+ NumberOfUnits: 0
+ - PayPeriodStartDate: /Date(1572566400000+0000)/
+ PayPeriodEndDate: /Date(1573084800000+0000)/
+ LeavePeriodStatus: SCHEDULED
+ NumberOfUnits: 0
+ Title: Hello World
+ StartDate: /Date(1572559200000+0000)/
+ EndDate: /Date(1572645600000+0000)/
+ UpdatedDateUTC: /Date(1573447343000+0000)/
+ PayOutType: DEFAULT
+ "400":
description: validation error for a bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/APIException'
+ $ref: '#/components/schemas/APIException'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollAu
summary: Creates a leave application
@@ -730,13 +639,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- endDateValue:
key: endDate
keyPascal: EndDate
@@ -744,26 +653,26 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - leaveApplication:
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - leaveApplication:
key: leaveApplication
keyPascal: LeaveApplication
- is_object: true
+ is_object: true
- employeeId:
- is_uuid: true
+ is_uuid: true
key: employeeId
keyPascal: EmployeeId
keySnake: employee_id
object: leaveApplication
default: 00000000-0000-0000-0000-000000000000
- leaveTypeId:
- is_uuid: true
+ is_uuid: true
key: leaveTypeId
keyPascal: LeaveTypeId
keySnake: leave_type_id
@@ -786,7 +695,7 @@ paths:
ruby: start_date
object: leaveApplication
- endDate:
- is_last: true
+ is_last: true
is_variable: true
nonString: true
key: endDate
@@ -797,39 +706,32 @@ paths:
ruby: end_date
object: leaveApplication
responses:
- '200':
+ "200":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/LeaveApplications'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573679791917)/",
- "LeaveApplications": [
- {
- "LeaveApplicationID": "5f7097e4-51f2-46cc-921b-45bc73ea7831",
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1572566400000+0000)/",
- "PayPeriodEndDate": "/Date(1573084800000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 7.6
- }
- ],
- "Title": "Hello World",
- "StartDate": "/Date(1572559200000+0000)/",
- "EndDate": "/Date(1572645600000+0000)/",
- "UpdatedDateUTC": "/Date(1573679791897+0000)/",
- "PayOutType": "DEFAULT"
- }
- ]
- }
- '400':
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573679791917)/
+ LeaveApplications:
+ - LeaveApplicationID: 5f7097e4-51f2-46cc-921b-45bc73ea7831
+ EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ LeavePeriods:
+ - PayPeriodStartDate: /Date(1572566400000+0000)/
+ PayPeriodEndDate: /Date(1573084800000+0000)/
+ LeavePeriodStatus: SCHEDULED
+ NumberOfUnits: 7.6
+ Title: Hello World
+ StartDate: /Date(1572559200000+0000)/
+ EndDate: /Date(1572645600000+0000)/
+ UpdatedDateUTC: /Date(1573679791897+0000)/
+ PayOutType: DEFAULT
+ "400":
description: invalid input, object invalid - TODO
requestBody:
required: true
@@ -839,25 +741,19 @@ paths:
type: array
items:
$ref: '#/components/schemas/LeaveApplication'
- example: '[
- {
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "Title": "Hello World",
- "StartDate": "/Date(1572559200000+0000)/",
- "EndDate": "/Date(1572645600000+0000)/"
- }
- ]'
+ example: '[ { "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", "Title": "Hello World", "StartDate": "/Date(1572559200000+0000)/", "EndDate": "/Date(1572645600000+0000)/" } ]'
/LeaveApplications/v2:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollAu
operationId: getLeaveApplicationsV2
- summary: Retrieves leave applications including leave requests
+ summary: Retrieves leave applications including leave requests
parameters:
- in: header
name: If-Modified-Since
@@ -885,185 +781,150 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/LeaveApplications'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573679791199)/",
- "LeaveApplications": [
- {
- "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624",
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1573171200000+0000)/",
- "PayPeriodEndDate": "/Date(1573689600000+0000)/",
- "LeavePeriodStatus": "REQUESTED",
- "NumberOfUnits": 4
- }
- ],
- "Title": "vacation",
- "StartDate": "/Date(1573516800000+0000)/",
- "EndDate": "/Date(1573516800000+0000)/",
- "UpdatedDateUTC": "/Date(1573623008000+0000)/",
- "PayOutType": "DEFAULT"
- },
- {
- "LeaveApplicationID": "3b934902-1e16-4c02-a3d3-68fa7d63e01d",
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1573171200000+0000)/",
- "PayPeriodEndDate": "/Date(1573689600000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 8
- }
- ],
- "Title": "Cashed Out",
- "StartDate": "/Date(1573516800000+0000)/",
- "EndDate": "/Date(1573516800000+0000)/",
- "UpdatedDateUTC": "/Date(1573623008000+0000)/",
- "PayOutType": "CASHED_OUT"
- },
- {
- "LeaveApplicationID": "62b90465-66e9-4c3a-8151-de1e6335554d",
- "EmployeeID": "b34e89ff-770d-4099-b7e5-f968767118bc",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1571961600000+0000)/",
- "PayPeriodEndDate": "/Date(1572480000000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 8
- },
- {
- "PayPeriodStartDate": "/Date(1572566400000+0000)/",
- "PayPeriodEndDate": "/Date(1573084800000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 8
- }
- ],
- "Title": "Yep Carer Leave",
- "Description": "My updated Description",
- "StartDate": "/Date(1572559200000+0000)/",
- "EndDate": "/Date(1572645600000+0000)/",
- "UpdatedDateUTC": "/Date(1573447344000+0000)/",
- "PayOutType": "DEFAULT"
- },
- {
- "LeaveApplicationID": "e8bd9eeb-18c9-4475-9c81-b298f9aa26c0",
- "EmployeeID": "b34e89ff-770d-4099-b7e5-f968767118bc",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1571961600000+0000)/",
- "PayPeriodEndDate": "/Date(1572480000000+0000)/",
- "LeavePeriodStatus": "PROCESSED",
- "NumberOfUnits": 8
- },
- {
- "PayPeriodStartDate": "/Date(1572566400000+0000)/",
- "PayPeriodEndDate": "/Date(1573084800000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 8
- }
- ],
- "Title": "Hello World",
- "StartDate": "/Date(1572559200000+0000)/",
- "EndDate": "/Date(1572645600000+0000)/",
- "UpdatedDateUTC": "/Date(1573447343000+0000)/",
- "PayOutType": "DEFAULT"
- },
- {
- "LeaveApplicationID": "3f93110a-df13-49c7-b82f-a069813df188",
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1573171200000+0000)/",
- "PayPeriodEndDate": "/Date(1573689600000+0000)/",
- "LeavePeriodStatus": "REJECTED",
- "NumberOfUnits": 8
- }
- ],
- "Title": "vacation",
- "StartDate": "/Date(1573516800000+0000)/",
- "EndDate": "/Date(1573516800000+0000)/",
- "UpdatedDateUTC": "/Date(1573623008000+0000)/",
- "PayOutType": "DEFAULT"
- }
- ]
- }
- '400':
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573679791199)/
+ LeaveApplications:
+ - LeaveApplicationID: 1d4cd583-0107-4386-936b-672eb3d1f624
+ EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ LeavePeriods:
+ - PayPeriodStartDate: /Date(1573171200000+0000)/
+ PayPeriodEndDate: /Date(1573689600000+0000)/
+ LeavePeriodStatus: REQUESTED
+ NumberOfUnits: 4
+ Title: vacation
+ StartDate: /Date(1573516800000+0000)/
+ EndDate: /Date(1573516800000+0000)/
+ UpdatedDateUTC: /Date(1573623008000+0000)/
+ PayOutType: DEFAULT
+ - LeaveApplicationID: 3b934902-1e16-4c02-a3d3-68fa7d63e01d
+ EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ LeavePeriods:
+ - PayPeriodStartDate: /Date(1573171200000+0000)/
+ PayPeriodEndDate: /Date(1573689600000+0000)/
+ LeavePeriodStatus: SCHEDULED
+ NumberOfUnits: 8
+ Title: Cashed Out
+ StartDate: /Date(1573516800000+0000)/
+ EndDate: /Date(1573516800000+0000)/
+ UpdatedDateUTC: /Date(1573623008000+0000)/
+ PayOutType: CASHED_OUT
+ - LeaveApplicationID: 62b90465-66e9-4c3a-8151-de1e6335554d
+ EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ LeavePeriods:
+ - PayPeriodStartDate: /Date(1571961600000+0000)/
+ PayPeriodEndDate: /Date(1572480000000+0000)/
+ LeavePeriodStatus: SCHEDULED
+ NumberOfUnits: 8
+ - PayPeriodStartDate: /Date(1572566400000+0000)/
+ PayPeriodEndDate: /Date(1573084800000+0000)/
+ LeavePeriodStatus: SCHEDULED
+ NumberOfUnits: 8
+ Title: Yep Carer Leave
+ Description: My updated Description
+ StartDate: /Date(1572559200000+0000)/
+ EndDate: /Date(1572645600000+0000)/
+ UpdatedDateUTC: /Date(1573447344000+0000)/
+ PayOutType: DEFAULT
+ - LeaveApplicationID: e8bd9eeb-18c9-4475-9c81-b298f9aa26c0
+ EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ LeavePeriods:
+ - PayPeriodStartDate: /Date(1571961600000+0000)/
+ PayPeriodEndDate: /Date(1572480000000+0000)/
+ LeavePeriodStatus: PROCESSED
+ NumberOfUnits: 8
+ - PayPeriodStartDate: /Date(1572566400000+0000)/
+ PayPeriodEndDate: /Date(1573084800000+0000)/
+ LeavePeriodStatus: SCHEDULED
+ NumberOfUnits: 8
+ Title: Hello World
+ StartDate: /Date(1572559200000+0000)/
+ EndDate: /Date(1572645600000+0000)/
+ UpdatedDateUTC: /Date(1573447343000+0000)/
+ PayOutType: DEFAULT
+ - LeaveApplicationID: 3f93110a-df13-49c7-b82f-a069813df188
+ EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ LeavePeriods:
+ - PayPeriodStartDate: /Date(1573171200000+0000)/
+ PayPeriodEndDate: /Date(1573689600000+0000)/
+ LeavePeriodStatus: REJECTED
+ NumberOfUnits: 8
+ Title: vacation
+ StartDate: /Date(1573516800000+0000)/
+ EndDate: /Date(1573516800000+0000)/
+ UpdatedDateUTC: /Date(1573623008000+0000)/
+ PayOutType: DEFAULT
+ "400":
description: validation error for a bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/APIException'
+ $ref: '#/components/schemas/APIException'
/LeaveApplications/{LeaveApplicationID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollAu
summary: Retrieves a leave application by a unique leave application id
operationId: getLeaveApplication
- parameters:
+ parameters:
- name: LeaveApplicationID
x-snake: leave_application_id
in: path
required: true
description: Leave Application id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
- application/json:
+ application/json:
schema:
$ref: '#/components/schemas/LeaveApplications'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573679791457)/",
- "LeaveApplications": [
- {
- "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624",
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1573171200000+0000)/",
- "PayPeriodEndDate": "/Date(1573689600000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 7.6
- }
- ],
- "Title": "vacation",
- "StartDate": "/Date(1573516800000+0000)/",
- "EndDate": "/Date(1573516800000+0000)/",
- "UpdatedDateUTC": "/Date(1573623008000+0000)/",
- "PayOutType": "DEFAULT"
- }
- ]
- }
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573679791457)/
+ LeaveApplications:
+ - LeaveApplicationID: 1d4cd583-0107-4386-936b-672eb3d1f624
+ EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ LeavePeriods:
+ - PayPeriodStartDate: /Date(1573171200000+0000)/
+ PayPeriodEndDate: /Date(1573689600000+0000)/
+ LeavePeriodStatus: SCHEDULED
+ NumberOfUnits: 7.6
+ Title: vacation
+ StartDate: /Date(1573516800000+0000)/
+ EndDate: /Date(1573516800000+0000)/
+ UpdatedDateUTC: /Date(1573623008000+0000)/
+ PayOutType: DEFAULT
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollAu
summary: Updates a specific leave application
@@ -1076,13 +937,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- endDateValue:
key: endDate
keyPascal: EndDate
@@ -1090,26 +951,26 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - leaveApplication:
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - leaveApplication:
key: leaveApplication
keyPascal: LeaveApplication
- is_object: true
+ is_object: true
- employeeId:
- is_uuid: true
+ is_uuid: true
key: employeeId
keyPascal: EmployeeId
keySnake: employee_id
object: leaveApplication
default: 00000000-0000-0000-0000-000000000000
- leaveTypeId:
- is_uuid: true
+ is_uuid: true
key: leaveTypeId
keyPascal: LeaveTypeId
keySnake: leave_type_id
@@ -1132,7 +993,7 @@ paths:
ruby: start_date
object: leaveApplication
- endDate:
- is_last: true
+ is_last: true
is_variable: true
nonString: true
key: endDate
@@ -1149,45 +1010,38 @@ paths:
in: path
required: true
description: Leave Application id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/LeaveApplications'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "3f93110a-df13-49c7-b82f-a069813df188",
- "DateTimeUTC": "/Date(1573679792293)/",
- "LeaveApplications": [
- {
- "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624",
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1572566400000+0000)/",
- "PayPeriodEndDate": "/Date(1573084800000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 7.6
- }
- ],
- "Title": "vacation",
- "Description": "My updated Description",
- "StartDate": "/Date(1572559200000+0000)/",
- "EndDate": "/Date(1572645600000+0000)/",
- "UpdatedDateUTC": "/Date(1573679792293+0000)/",
- "PayOutType": "DEFAULT"
- }
- ]
- }
- '400':
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: 3f93110a-df13-49c7-b82f-a069813df188
+ DateTimeUTC: /Date(1573679792293)/
+ LeaveApplications:
+ - LeaveApplicationID: 1d4cd583-0107-4386-936b-672eb3d1f624
+ EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ LeavePeriods:
+ - PayPeriodStartDate: /Date(1572566400000+0000)/
+ PayPeriodEndDate: /Date(1573084800000+0000)/
+ LeavePeriodStatus: SCHEDULED
+ NumberOfUnits: 7.6
+ Title: vacation
+ Description: My updated Description
+ StartDate: /Date(1572559200000+0000)/
+ EndDate: /Date(1572645600000+0000)/
+ UpdatedDateUTC: /Date(1573679792293+0000)/
+ PayOutType: DEFAULT
+ "400":
description: invalid input, object invalid - TODO
requestBody:
required: true
@@ -1197,32 +1051,14 @@ paths:
type: array
items:
$ref: '#/components/schemas/LeaveApplication'
- example: '[
- {
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1572566400000+0000)/",
- "PayPeriodEndDate": "/Date(1573084800000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 7.6
- }
- ],
- "Title": "vacation",
- "Description": "My updated Description",
- "StartDate": "/Date(1572559200000+0000)/",
- "EndDate": "/Date(1572645600000+0000)/",
- "PayOutType": "DEFAULT"
- }
- ]'
+ example: '[ { "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e", "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624", "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca", "LeavePeriods": [ { "PayPeriodStartDate": "/Date(1572566400000+0000)/", "PayPeriodEndDate": "/Date(1573084800000+0000)/", "LeavePeriodStatus": "SCHEDULED", "NumberOfUnits": 7.6 } ], "Title": "vacation", "Description": "My updated Description", "StartDate": "/Date(1572559200000+0000)/", "EndDate": "/Date(1572645600000+0000)/", "PayOutType": "DEFAULT" } ]'
/LeaveApplications/{LeaveApplicationID}/approve:
parameters:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollAu
summary: Approve a requested leave application by a unique leave application id
@@ -1239,50 +1075,44 @@ paths:
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: Application successfully approved
content:
- application/json:
+ application/json:
schema:
$ref: '#/components/schemas/LeaveApplications'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573679791457)/",
- "LeaveApplications": [
- {
- "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624",
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1573171200000+0000)/",
- "PayPeriodEndDate": "/Date(1573689600000+0000)/",
- "LeavePeriodStatus": "SCHEDULED",
- "NumberOfUnits": 7.6
- }
- ],
- "Title": "Requested Leave",
- "StartDate": "/Date(1573516800000+0000)/",
- "EndDate": "/Date(1573516800000+0000)/",
- "UpdatedDateUTC": "/Date(1573623008000+0000)/",
- "PayOutType": "DEFAULT"
- }
- ]
- }
- '400':
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573679791457)/
+ LeaveApplications:
+ - LeaveApplicationID: 1d4cd583-0107-4386-936b-672eb3d1f624
+ EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ LeavePeriods:
+ - PayPeriodStartDate: /Date(1573171200000+0000)/
+ PayPeriodEndDate: /Date(1573689600000+0000)/
+ LeavePeriodStatus: SCHEDULED
+ NumberOfUnits: 7.6
+ Title: Requested Leave
+ StartDate: /Date(1573516800000+0000)/
+ EndDate: /Date(1573516800000+0000)/
+ UpdatedDateUTC: /Date(1573623008000+0000)/
+ PayOutType: DEFAULT
+ "400":
description: validation error for a bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/APIException'
+ $ref: '#/components/schemas/APIException'
/LeaveApplications/{LeaveApplicationID}/reject:
parameters:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollAu
summary: Reject a leave application by a unique leave application id
@@ -1299,50 +1129,45 @@ paths:
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: Application successfully rejected
content:
- application/json:
+ application/json:
schema:
$ref: '#/components/schemas/LeaveApplications'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573679791457)/",
- "LeaveApplications": [
- {
- "LeaveApplicationID": "1d4cd583-0107-4386-936b-672eb3d1f624",
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "LeavePeriods": [
- {
- "PayPeriodStartDate": "/Date(1573171200000+0000)/",
- "PayPeriodEndDate": "/Date(1573689600000+0000)/",
- "LeavePeriodStatus": "REJECTED",
- "NumberOfUnits": 7.6
- }
- ],
- "Title": "Requested Leave",
- "StartDate": "/Date(1573516800000+0000)/",
- "EndDate": "/Date(1573516800000+0000)/",
- "UpdatedDateUTC": "/Date(1573623008000+0000)/",
- "PayOutType": "DEFAULT"
- }
- ]
- }
- '400':
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573679791457)/
+ LeaveApplications:
+ - LeaveApplicationID: 1d4cd583-0107-4386-936b-672eb3d1f624
+ EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ LeavePeriods:
+ - PayPeriodStartDate: /Date(1573171200000+0000)/
+ PayPeriodEndDate: /Date(1573689600000+0000)/
+ LeavePeriodStatus: REJECTED
+ NumberOfUnits: 7.6
+ Title: Requested Leave
+ StartDate: /Date(1573516800000+0000)/
+ EndDate: /Date(1573516800000+0000)/
+ UpdatedDateUTC: /Date(1573623008000+0000)/
+ PayOutType: DEFAULT
+ "400":
description: validation error for a bad request
content:
application/json:
schema:
- $ref: '#/components/schemas/APIException'
+ $ref: '#/components/schemas/APIException'
/PayItems:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollAu
operationId: getPayItems
@@ -1374,163 +1199,136 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayItems'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573620869531)/",
- "PayItems": {
- "EarningsRates": [
- {
- "EarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "Name": "Ordinary Hours",
- "EarningsType": "ORDINARYTIMEEARNINGS",
- "RateType": "RATEPERUNIT",
- "AccountCode": "477",
- "TypeOfUnits": "Hours",
- "RatePerUnit": 3,
- "IsExemptFromTax": true,
- "IsExemptFromSuper": true,
- "IsReportableAsW1": true,
- "AllowanceContributesToAnnualLeaveRate": false,
- "AllowanceContributesToOvertimeRate": false,
- "UpdatedDateUTC": "/Date(1573620821000+0000)/",
- "CurrentRecord": true
- },
- {
- "EarningsRateID": "dc3ff92e-0e49-4967-aa4b-0bb21c0594ce",
- "Name": "Overtime Hours (exempt from super)",
- "EarningsType": "OVERTIMEEARNINGS",
- "RateType": "RATEPERUNIT",
- "AccountCode": "477",
- "TypeOfUnits": "Hours",
- "IsExemptFromTax": false,
- "IsExemptFromSuper": true,
- "IsReportableAsW1": false,
- "AllowanceContributesToAnnualLeaveRate": false,
- "AllowanceContributesToOvertimeRate": false,
- "UpdatedDateUTC": "/Date(1547500330000+0000)/",
- "CurrentRecord": true
- },
- {
- "EarningsRateID": "f59999ca-cd5c-4a54-a381-2d0c817f0c3e",
- "Name": "Redundancy",
- "EarningsType": "LUMPSUMD",
- "RateType": "FIXEDAMOUNT",
- "AccountCode": "477",
- "IsExemptFromTax": true,
- "IsExemptFromSuper": true,
- "IsReportableAsW1": true,
- "AllowanceContributesToAnnualLeaveRate": false,
- "AllowanceContributesToOvertimeRate": false,
- "UpdatedDateUTC": "/Date(1547500330000+0000)/",
- "CurrentRecord": true
- },
- {
- "EarningsRateID": "c97dafac-9d99-406f-9f6c-abfaf81c527d",
- "Name": "ETP Leave Earning",
- "EarningsType": "EMPLOYMENTTERMINATIONPAYMENT",
- "RateType": "RATEPERUNIT",
- "AccountCode": "477",
- "TypeOfUnits": "Hours",
- "IsExemptFromTax": false,
- "IsExemptFromSuper": true,
- "IsReportableAsW1": true,
- "AllowanceContributesToAnnualLeaveRate": false,
- "AllowanceContributesToOvertimeRate": false,
- "UpdatedDateUTC": "/Date(1573620791000+0000)/",
- "EmploymentTerminationPaymentType": "O",
- "CurrentRecord": true
- }
- ],
- "DeductionTypes": [
- {
- "DeductionTypeID": "727af5e8-b347-4ae7-85fc-9b82266d0aec",
- "DeductionCategory": "UNIONFEES",
- "Name": "Union Fees/Subscriptions",
- "AccountCode": "850",
- "ReducesTax": false,
- "ReducesSuper": false,
- "IsExemptFromW1": false,
- "UpdatedDateUTC": "/Date(1547500330000+0000)/",
- "CurrentRecord": true
- },
- {
- "DeductionTypeID": "04191cd3-7952-4a87-9911-9d8575280f6a",
- "DeductionCategory": "NONE",
- "Name": "Lease Payments",
- "AccountCode": "850",
- "ReducesTax": true,
- "ReducesSuper": true,
- "IsExemptFromW1": false,
- "UpdatedDateUTC": "/Date(1547500330000+0000)/",
- "CurrentRecord": true
- }
- ],
- "ReimbursementTypes": [
- {
- "ReimbursementTypeID": "98ba33b2-db5b-4204-bcac-5ddd98d63524",
- "Name": "Travel Costs",
- "AccountCode": "850",
- "UpdatedDateUTC": "/Date(1547500330000+0000)/",
- "CurrentRecord": true
- },
- {
- "ReimbursementTypeID": "aa8cfa40-d872-4be0-8a94-bb7f00962f74",
- "Name": "Other Reimbursable Costs",
- "AccountCode": "850",
- "UpdatedDateUTC": "/Date(1547500330000+0000)/",
- "CurrentRecord": true
- }
- ],
- "LeaveTypes": [
- {
- "LeaveTypeID": "fbcc9dab-6238-43d9-a3f4-d768423fdcfa",
- "Name": "Annual Leave",
- "TypeOfUnits": "Hours",
- "NormalEntitlement": 152,
- "LeaveLoadingRate": 1.0,
- "IsPaidLeave": true,
- "ShowOnPayslip": true,
- "UpdatedDateUTC": "/Date(1573620853000+0000)/",
- "CurrentRecord": true
- },
- {
- "LeaveTypeID": "74195ab2-1f2b-4136-8ddc-20387a0b1027",
- "Name": "Long Service Leave",
- "TypeOfUnits": "Hours",
- "IsPaidLeave": true,
- "ShowOnPayslip": false,
- "UpdatedDateUTC": "/Date(1547500330000+0000)/",
- "CurrentRecord": true
- },
- {
- "LeaveTypeID": "ff4d16da-ae8a-4f57-acb3-9ee593996bce",
- "Name": "Parental Leave (unpaid)",
- "TypeOfUnits": "Hours",
- "IsPaidLeave": false,
- "ShowOnPayslip": false,
- "UpdatedDateUTC": "/Date(1547500330000+0000)/",
- "CurrentRecord": true
- }
- ]
- }
- }
- '400':
- description: validation error for a bad request
- content:
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573620869531)/
+ PayItems:
+ EarningsRates:
+ - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ Name: Ordinary Hours
+ EarningsType: ORDINARYTIMEEARNINGS
+ RateType: RATEPERUNIT
+ AccountCode: "477"
+ TypeOfUnits: Hours
+ RatePerUnit: 3
+ IsExemptFromTax: true
+ IsExemptFromSuper: true
+ IsReportableAsW1: true
+ AllowanceContributesToAnnualLeaveRate: false
+ AllowanceContributesToOvertimeRate: false
+ UpdatedDateUTC: /Date(1573620821000+0000)/
+ CurrentRecord: true
+ - EarningsRateID: dc3ff92e-0e49-4967-aa4b-0bb21c0594ce
+ Name: Overtime Hours (exempt from super)
+ EarningsType: OVERTIMEEARNINGS
+ RateType: RATEPERUNIT
+ AccountCode: "477"
+ TypeOfUnits: Hours
+ IsExemptFromTax: false
+ IsExemptFromSuper: true
+ IsReportableAsW1: false
+ AllowanceContributesToAnnualLeaveRate: false
+ AllowanceContributesToOvertimeRate: false
+ UpdatedDateUTC: /Date(1547500330000+0000)/
+ CurrentRecord: true
+ - EarningsRateID: f59999ca-cd5c-4a54-a381-2d0c817f0c3e
+ Name: Redundancy
+ EarningsType: LUMPSUMD
+ RateType: FIXEDAMOUNT
+ AccountCode: "477"
+ IsExemptFromTax: true
+ IsExemptFromSuper: true
+ IsReportableAsW1: true
+ AllowanceContributesToAnnualLeaveRate: false
+ AllowanceContributesToOvertimeRate: false
+ UpdatedDateUTC: /Date(1547500330000+0000)/
+ CurrentRecord: true
+ - EarningsRateID: c97dafac-9d99-406f-9f6c-abfaf81c527d
+ Name: ETP Leave Earning
+ EarningsType: EMPLOYMENTTERMINATIONPAYMENT
+ RateType: RATEPERUNIT
+ AccountCode: "477"
+ TypeOfUnits: Hours
+ IsExemptFromTax: false
+ IsExemptFromSuper: true
+ IsReportableAsW1: true
+ AllowanceContributesToAnnualLeaveRate: false
+ AllowanceContributesToOvertimeRate: false
+ UpdatedDateUTC: /Date(1573620791000+0000)/
+ EmploymentTerminationPaymentType: O
+ CurrentRecord: true
+ DeductionTypes:
+ - DeductionTypeID: 727af5e8-b347-4ae7-85fc-9b82266d0aec
+ DeductionCategory: UNIONFEES
+ Name: Union Fees/Subscriptions
+ AccountCode: "850"
+ ReducesTax: false
+ ReducesSuper: false
+ IsExemptFromW1: false
+ UpdatedDateUTC: /Date(1547500330000+0000)/
+ CurrentRecord: true
+ - DeductionTypeID: 04191cd3-7952-4a87-9911-9d8575280f6a
+ DeductionCategory: NONE
+ Name: Lease Payments
+ AccountCode: "850"
+ ReducesTax: true
+ ReducesSuper: true
+ IsExemptFromW1: false
+ UpdatedDateUTC: /Date(1547500330000+0000)/
+ CurrentRecord: true
+ ReimbursementTypes:
+ - ReimbursementTypeID: 98ba33b2-db5b-4204-bcac-5ddd98d63524
+ Name: Travel Costs
+ AccountCode: "850"
+ UpdatedDateUTC: /Date(1547500330000+0000)/
+ CurrentRecord: true
+ - ReimbursementTypeID: aa8cfa40-d872-4be0-8a94-bb7f00962f74
+ Name: Other Reimbursable Costs
+ AccountCode: "850"
+ UpdatedDateUTC: /Date(1547500330000+0000)/
+ CurrentRecord: true
+ LeaveTypes:
+ - LeaveTypeID: fbcc9dab-6238-43d9-a3f4-d768423fdcfa
+ Name: Annual Leave
+ TypeOfUnits: Hours
+ NormalEntitlement: 152
+ LeaveLoadingRate: 1.0
+ IsPaidLeave: true
+ ShowOnPayslip: true
+ UpdatedDateUTC: /Date(1573620853000+0000)/
+ CurrentRecord: true
+ - LeaveTypeID: 74195ab2-1f2b-4136-8ddc-20387a0b1027
+ Name: Long Service Leave
+ TypeOfUnits: Hours
+ IsPaidLeave: true
+ ShowOnPayslip: false
+ UpdatedDateUTC: /Date(1547500330000+0000)/
+ CurrentRecord: true
+ - LeaveTypeID: ff4d16da-ae8a-4f57-acb3-9ee593996bce
+ Name: Parental Leave (unpaid)
+ TypeOfUnits: Hours
+ IsPaidLeave: false
+ ShowOnPayslip: false
+ UpdatedDateUTC: /Date(1547500330000+0000)/
+ CurrentRecord: true
+ "400":
+ description: validation error for a bad request
+ content:
application/json:
- schema:
- $ref: '#/components/schemas/APIException'
+ schema:
+ $ref: '#/components/schemas/APIException'
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollAu
summary: Creates a pay item
@@ -1542,7 +1340,7 @@ paths:
key: earningsRate
keyPascal: EarningsRate
keySnake: earnings_rate
- is_object: true
+ is_object: true
- earningsName:
key: name
keyPascal: Name
@@ -1567,7 +1365,7 @@ paths:
keySnake: is_exempt_from_tax
object: earningsRate
default: true
- nonString: true
+ nonString: true
- isExemptFromSuper:
key: isExemptFromSuper
keyPascal: IsExemptFromSuper
@@ -1592,7 +1390,7 @@ paths:
key: deductionType
keyPascal: DeductionType
keySnake: deduction_type
- is_object: true
+ is_object: true
- deductionTypeName:
key: name
keyPascal: Name
@@ -1619,12 +1417,12 @@ paths:
object: deductionType
default: true
nonString: true
- is_last: true
+ is_last: true
- leaveType:
key: leaveType
keyPascal: LeaveType
keySnake: leave_type
- is_object: true
+ is_object: true
- leaveTypeName:
key: name
keyPascal: Name
@@ -1650,13 +1448,13 @@ paths:
keySnake: show_on_payslip
object: leaveType
default: true
- is_last: true
+ is_last: true
nonString: true
- reimbursementType:
key: reimbursementType
keyPascal: ReimbursementType
keySnake: reimbursement_type
- is_object: true
+ is_object: true
- reimbursementTypeName:
key: name
keyPascal: Name
@@ -1668,17 +1466,17 @@ paths:
keyPascal: AccountCode
keySnake: account_code
object: reimbursementType
- is_last: true
- default: 850
+ is_last: true
+ default: 850
- earningsRates:
- is_list: true
+ is_list: true
key: earningsRates
keyPascal: EarningsRates
keySnake: earnings_rates
csharp: EarningsRate
java: EarningsRate
- addEarningsRates:
- is_list_add: true
+ is_list_add: true
key: earningsRates
keyPascal: EarningsRates
keySnake: earnings_rates
@@ -1686,7 +1484,7 @@ paths:
python: earnings_rate
ruby: earnings_rate
csharp: EarningsRate
- object: earningsRate
+ object: earningsRate
- deductionTypes:
is_list: true
key: deductionTypes
@@ -1695,7 +1493,7 @@ paths:
csharp: DeductionType
java: DeductionType
- leaveTypes:
- is_list: true
+ is_list: true
key: leaveTypes
keyPascal: LeaveTypes
keySnake: leave_types
@@ -1703,7 +1501,7 @@ paths:
java: LeaveType
- addLeaveTypes:
is_last: true
- is_list_add: true
+ is_list_add: true
key: leaveTypes
keyPascal: LeaveTypes
keySnake: leave_types
@@ -1711,17 +1509,17 @@ paths:
python: leave_type
ruby: leave_type
csharp: LeaveType
- object: leaveType
+ object: leaveType
- reimbursementTypes:
- is_list: true
+ is_list: true
key: reimbursementTypes
keyPascal: ReimbursementTypes
keySnake: reimbursement_types
csharp: ReimbursementType
java: ReimbursementType
- addReimbursementTypes:
- is_last: true
- is_list_add: true
+ is_last: true
+ is_list_add: true
key: reimbursementTypes
keyPascal: ReimbursementTypes
keySnake: reimbursement_types
@@ -1729,12 +1527,12 @@ paths:
python: reimbursement_type
ruby: reimbursement_type
csharp: ReimbursementType
- object: reimbursementType
+ object: reimbursementType
- payItem:
key: payItem
keyPascal: PayItem
keySnake: pay_item
- is_object: true
+ is_object: true
- setEarningsRates:
is_variable: true
nonString: true
@@ -1743,7 +1541,7 @@ paths:
default: earningsRates
python: earnings_rates
ruby: earnings_rates
- object: payItem
+ object: payItem
- setDeductionTypes:
is_variable: true
nonString: true
@@ -1752,7 +1550,7 @@ paths:
default: deductionTypes
python: deduction_types
ruby: deduction_types
- object: payItem
+ object: payItem
- setLeaveTypes:
is_variable: true
nonString: true
@@ -1761,81 +1559,72 @@ paths:
default: leaveTypes
python: leave_types
ruby: leave_types
- object: payItem
+ object: payItem
- setReimbursementTypes:
is_variable: true
nonString: true
key: reimbursementTypes
keyPascal: ReimbursementTypes
default: reimbursementTypes
- python: reimbursement_types
+ python: reimbursement_types
ruby: reimbursement_types
object: payItem
is_last: true
responses:
- '200':
- description: A successful request - currently returns empty array for JSON
+ "200":
+ description: A successful request - currently returns empty array for JSON
content:
application/json:
schema:
$ref: '#/components/schemas/PayItems'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1593448963288)/",
- "PayItems": {
- "EarningsRates": [
- {
- "EarningsRateID": "1fa4e226-b711-46ba-a8a7-4344c9c5fb87",
- "Name": "MyRate",
- "EarningsType": "ORDINARYTIMEEARNINGS",
- "RateType": "MULTIPLE",
- "AccountCode": "400",
- "Multiplier": 1.5,
- "IsExemptFromTax": true,
- "IsExemptFromSuper": true,
- "AccrueLeave": false,
- "IsReportableAsW1": false,
- "AllowanceContributesToAnnualLeaveRate": false,
- "AllowanceContributesToOvertimeRate": false,
- "UpdatedDateUTC": "/Date(1593448963210+0000)/",
- "CurrentRecord": true
- },
- {
- "EarningsRateID": "c6905c26-0716-4746-9098-608545e04dd2",
- "Name": "Redundancy",
- "EarningsType": "LUMPSUMD",
- "RateType": "FIXEDAMOUNT",
- "AccountCode": "477",
- "IsExemptFromTax": true,
- "IsExemptFromSuper": true,
- "IsReportableAsW1": true,
- "AllowanceContributesToAnnualLeaveRate": false,
- "AllowanceContributesToOvertimeRate": false,
- "UpdatedDateUTC": "/Date(1476729649000+0000)/",
- "CurrentRecord": true
- },
- {
- "EarningsRateID": "33820094-656e-4db3-b04b-8bd3e2db0a9b",
- "Name": "ETP Leave Earning",
- "EarningsType": "EMPLOYMENTTERMINATIONPAYMENT",
- "RateType": "RATEPERUNIT",
- "AccountCode": "477",
- "TypeOfUnits": "Hours",
- "IsExemptFromTax": false,
- "IsExemptFromSuper": true,
- "IsReportableAsW1": true,
- "AllowanceContributesToAnnualLeaveRate": false,
- "AllowanceContributesToOvertimeRate": false,
- "UpdatedDateUTC": "/Date(1520900705000+0000)/",
- "EmploymentTerminationPaymentType": "O",
- "CurrentRecord": true
- }
- ]
- }
- }
- '400':
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1593448963288)/
+ PayItems:
+ EarningsRates:
+ - EarningsRateID: 1fa4e226-b711-46ba-a8a7-4344c9c5fb87
+ Name: MyRate
+ EarningsType: ORDINARYTIMEEARNINGS
+ RateType: MULTIPLE
+ AccountCode: "400"
+ Multiplier: 1.5
+ IsExemptFromTax: true
+ IsExemptFromSuper: true
+ AccrueLeave: false
+ IsReportableAsW1: false
+ AllowanceContributesToAnnualLeaveRate: false
+ AllowanceContributesToOvertimeRate: false
+ UpdatedDateUTC: /Date(1593448963210+0000)/
+ CurrentRecord: true
+ - EarningsRateID: c6905c26-0716-4746-9098-608545e04dd2
+ Name: Redundancy
+ EarningsType: LUMPSUMD
+ RateType: FIXEDAMOUNT
+ AccountCode: "477"
+ IsExemptFromTax: true
+ IsExemptFromSuper: true
+ IsReportableAsW1: true
+ AllowanceContributesToAnnualLeaveRate: false
+ AllowanceContributesToOvertimeRate: false
+ UpdatedDateUTC: /Date(1476729649000+0000)/
+ CurrentRecord: true
+ - EarningsRateID: 33820094-656e-4db3-b04b-8bd3e2db0a9b
+ Name: ETP Leave Earning
+ EarningsType: EMPLOYMENTTERMINATIONPAYMENT
+ RateType: RATEPERUNIT
+ AccountCode: "477"
+ TypeOfUnits: Hours
+ IsExemptFromTax: false
+ IsExemptFromSuper: true
+ IsReportableAsW1: true
+ AllowanceContributesToAnnualLeaveRate: false
+ AllowanceContributesToOvertimeRate: false
+ UpdatedDateUTC: /Date(1520900705000+0000)/
+ EmploymentTerminationPaymentType: O
+ CurrentRecord: true
+ "400":
description: invalid input, object invalid - TODO
requestBody:
required: true
@@ -1843,33 +1632,31 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/PayItem'
- example: {
- "EarningsRates": [
- {
- "Name": "MyRate",
- "AccountCode": "400",
- "TypeOfUnits": "4.00",
- "IsExemptFromTax": true,
- "IsExemptFromSuper": true,
- "IsReportableAsW1": false,
- "AllowanceContributesToAnnualLeaveRate": false,
- "AllowanceContributesToOvertimeRate": false,
- "EarningsType": "ORDINARYTIMEEARNINGS",
- "EarningsRateID": "1fa4e226-b711-46ba-a8a7-4344c9c5fb87",
- "RateType": "MULTIPLE",
- "RatePerUnit": "10.0",
- "Multiplier": 1.5,
- "Amount": 5,
- "EmploymentTerminationPaymentType": "O"
- }
- ]
- }
+ example:
+ EarningsRates:
+ - Name: MyRate
+ AccountCode: "400"
+ TypeOfUnits: "4.00"
+ IsExemptFromTax: true
+ IsExemptFromSuper: true
+ IsReportableAsW1: false
+ AllowanceContributesToAnnualLeaveRate: false
+ AllowanceContributesToOvertimeRate: false
+ EarningsType: ORDINARYTIMEEARNINGS
+ EarningsRateID: 1fa4e226-b711-46ba-a8a7-4344c9c5fb87
+ RateType: MULTIPLE
+ RatePerUnit: "10.0"
+ Multiplier: 1.5
+ Amount: 5
+ EmploymentTerminationPaymentType: O
/PayrollCalendars:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollAu
operationId: getPayrollCalendars
@@ -1901,47 +1688,42 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayrollCalendars'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC":"/Date(1573611063408)/",
- "PayrollCalendars":[
- {
- "PayrollCalendarID":"78bb86b9-e1ea-47ac-b75d-f087a81931de",
- "Name":"Sid Weekly",
- "CalendarType":"WEEKLY",
- "StartDate":"/Date(1573171200000+0000)/",
- "PaymentDate":"/Date(1573776000000+0000)/",
- "UpdatedDateUTC":"/Date(1573077687000+0000)/",
- "ReferenceDate":"/Date(1573171200000+0000)/"
- },
- {
- "PayrollCalendarID":"22a05fc5-386d-4950-9842-3e7a6c812135",
- "Name":"Weekly",
- "CalendarType":"WEEKLY",
- "StartDate":"/Date(1546560000000+0000)/",
- "PaymentDate":"/Date(1547164800000+0000)/",
- "UpdatedDateUTC":"/Date(1572916157000+0000)/",
- "ReferenceDate":"/Date(1573171200000+0000)/"
- }
- ]
- }
- '400':
- description: validation error for a bad request
- content:
- application/json:
- schema:
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573611063408)/
+ PayrollCalendars:
+ - PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de
+ Name: Sid Weekly
+ CalendarType: WEEKLY
+ StartDate: /Date(1573171200000+0000)/
+ PaymentDate: /Date(1573776000000+0000)/
+ UpdatedDateUTC: /Date(1573077687000+0000)/
+ ReferenceDate: /Date(1573171200000+0000)/
+ - PayrollCalendarID: 22a05fc5-386d-4950-9842-3e7a6c812135
+ Name: Weekly
+ CalendarType: WEEKLY
+ StartDate: /Date(1546560000000+0000)/
+ PaymentDate: /Date(1547164800000+0000)/
+ UpdatedDateUTC: /Date(1572916157000+0000)/
+ ReferenceDate: /Date(1573171200000+0000)/
+ "400":
+ description: validation error for a bad request
+ content:
+ application/json:
+ schema:
$ref: '#/components/schemas/APIException'
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollAu
summary: Creates a Payroll Calendar
@@ -1957,13 +1739,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2000-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2000-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- paymentDateValue:
key: paymentDate
keyPascal: PaymentDate
@@ -1971,15 +1753,15 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 30)"
- php: "new DateTime('2020-10-30')"
- node: "'2000-10-30'"
- python: "dateutil.parser.parse('2000-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 30)
+ php: new DateTime('2020-10-30')
+ node: '''2000-10-30'''
+ python: dateutil.parser.parse('2000-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- payrollCalendar:
- is_object: true
+ is_object: true
key: payrollCalendar
keyPascal: PayrollCalendar
keySnake: payroll_calendar
@@ -1990,7 +1772,7 @@ paths:
default: Weekly
object: payrollCalendar
- calendarType:
- nonString: true
+ nonString: true
key: calendarType
keyPascal: CalendarType
keySnake: calendar_type
@@ -2013,7 +1795,7 @@ paths:
ruby: start_date
object: payrollCalendar
- setPaymentDate:
- is_last: true
+ is_last: true
is_variable: true
nonString: true
key: paymentDate
@@ -2022,17 +1804,17 @@ paths:
default: paymentDate
python: payment_date
ruby: payment_date
- object: payrollCalendar
+ object: payrollCalendar
- payrollCalendars:
- is_list: true
+ is_list: true
key: payrollCalendars
keyPascal: PayrollCalendars
keySnake: payroll_calendars
csharp: PayrollCalendar
java: PayrollCalendar
- addPayrollCalendars:
- is_last: true
- is_list_add: true
+ is_last: true
+ is_list_add: true
key: payrollCalendars
keyPascal: PayrollCalendars
keySnake: payroll_calendars
@@ -2040,31 +1822,27 @@ paths:
python: payroll_calendar
ruby: payroll_calendar
csharp: PayrollCalendar
- object: payrollCalendar
+ object: payrollCalendar
responses:
- '200':
+ "200":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/PayrollCalendars'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC":"/Date(1584125518649)/",
- "PayrollCalendars":[
- {
- "PayrollCalendarID":"57accbfe-f729-4be3-b3cb-8c3445c61d3a",
- "Name":"MyCal37127",
- "CalendarType":"WEEKLY",
- "StartDate":"/Date(1572998400000+0000)/",
- "PaymentDate":"/Date(1573516800000+0000)/",
- "UpdatedDateUTC":"/Date(1584125518633+0000)/"
- }
- ]
- }
- '400':
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1584125518649)/
+ PayrollCalendars:
+ - PayrollCalendarID: 57accbfe-f729-4be3-b3cb-8c3445c61d3a
+ Name: MyCal37127
+ CalendarType: WEEKLY
+ StartDate: /Date(1572998400000+0000)/
+ PaymentDate: /Date(1573516800000+0000)/
+ UpdatedDateUTC: /Date(1584125518633+0000)/
+ "400":
description: invalid input, object invalid - TODO
requestBody:
required: true
@@ -2074,21 +1852,15 @@ paths:
type: array
items:
$ref: '#/components/schemas/PayrollCalendar'
- example: '[
- {
- "PayrollCalendarID":"78bb86b9-e1ea-47ac-b75d-f087a81931de",
- "PayRunPeriodStartDate":"/Date(1572566400000+0000)/",
- "PayRunPeriodEndDate":"/Date(1573084800000+0000)/",
- "PayRunStatus":"DRAFT",
- "PaymentDate":"/Date(1573171200000+0000)/"
- }
- ]'
+ example: '[ { "PayrollCalendarID":"78bb86b9-e1ea-47ac-b75d-f087a81931de", "PayRunPeriodStartDate":"/Date(1572566400000+0000)/", "PayRunPeriodEndDate":"/Date(1573084800000+0000)/", "PayRunStatus":"DRAFT", "PaymentDate":"/Date(1573171200000+0000)/" } ]'
/PayrollCalendars/{PayrollCalendarID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollAu
operationId: getPayrollCalendar
@@ -2099,46 +1871,44 @@ paths:
in: path
required: true
description: Payroll Calendar id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayrollCalendars'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC":"/Date(1573611453008)/",
- "PayrollCalendars":[
- {
- "PayrollCalendarID":"78bb86b9-e1ea-47ac-b75d-f087a81931de",
- "Name":"Sid Weekly",
- "CalendarType":"WEEKLY",
- "StartDate":"/Date(1573171200000+0000)/",
- "PaymentDate":"/Date(1573776000000+0000)/",
- "UpdatedDateUTC":"/Date(1573077687000+0000)/",
- "ReferenceDate":"/Date(1573171200000+0000)/"
- }
- ]
- }
- '400':
- description: validation error for a bad request
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573611453008)/
+ PayrollCalendars:
+ - PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de
+ Name: Sid Weekly
+ CalendarType: WEEKLY
+ StartDate: /Date(1573171200000+0000)/
+ PaymentDate: /Date(1573776000000+0000)/
+ UpdatedDateUTC: /Date(1573077687000+0000)/
+ ReferenceDate: /Date(1573171200000+0000)/
+ "400":
+ description: validation error for a bad request
content:
- application/json:
- schema:
+ application/json:
+ schema:
$ref: '#/components/schemas/APIException'
/PayRuns:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.payruns, payroll.payruns.read]
+ - OAuth2:
+ - payroll.payruns
+ - payroll.payruns.read
tags:
- PayrollAu
operationId: getPayRuns
@@ -2170,44 +1940,41 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayRuns'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC":"/Date(1573611063074)/",
- "PayRuns":[
- {
- "PayRunID":"5de420bb-4ad2-405c-beb1-2610bcc2144e",
- "PayrollCalendarID":"78bb86b9-e1ea-47ac-b75d-f087a81931de",
- "PayRunPeriodStartDate":"/Date(1572566400000+0000)/",
- "PayRunPeriodEndDate":"/Date(1573084800000+0000)/",
- "PaymentDate":"/Date(1573171200000+0000)/",
- "Wages":200.00,
- "Deductions":33.00,
- "Tax":78.00,
- "Super":0.00,
- "Reimbursement":22.00,
- "NetPay":89.00,
- "PayRunStatus":"POSTED",
- "UpdatedDateUTC":"/Date(1573610970000+0000)/"
- }
- ]
- }
- '400':
- description: validation error for a bad request
- content:
- application/json:
- schema:
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573611063074)/
+ PayRuns:
+ - PayRunID: 5de420bb-4ad2-405c-beb1-2610bcc2144e
+ PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de
+ PayRunPeriodStartDate: /Date(1572566400000+0000)/
+ PayRunPeriodEndDate: /Date(1573084800000+0000)/
+ PaymentDate: /Date(1573171200000+0000)/
+ Wages: 200.00
+ Deductions: 33.00
+ Tax: 78.00
+ Super: 0.00
+ Reimbursement: 22.00
+ NetPay: 89.00
+ PayRunStatus: POSTED
+ UpdatedDateUTC: /Date(1573610970000+0000)/
+ "400":
+ description: validation error for a bad request
+ content:
+ application/json:
+ schema:
$ref: '#/components/schemas/APIException'
post:
security:
- - OAuth2: [payroll.payruns]
+ - OAuth2:
+ - payroll.payruns
tags:
- PayrollAu
summary: Creates a pay run
@@ -2215,45 +1982,41 @@ paths:
- $ref: '#/components/parameters/idempotencyKey'
operationId: createPayRun
x-hasPayrollAuProblem: true
- x-example:
+ x-example:
- payrun:
key: payRun
keyPascal: PayRun
keySnake: pay_run
- is_object: true
+ is_object: true
- payrollCalendarID:
- is_uuid: true
+ is_uuid: true
default: 00000000-0000-0000-0000-000000000000
key: payrollCalendarID
keyPascal: PayrollCalendarID
keySnake: payroll_calendar_id
object: payRun
- is_last: true
+ is_last: true
responses:
- '200':
+ "200":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/PayRuns'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573685818311)/",
- "PayRuns": [
- {
- "PayRunID": "d1348fab-f47a-4697-beea-922ee262407a",
- "PayrollCalendarID": "78bb86b9-e1ea-47ac-b75d-f087a81931de",
- "PayRunPeriodStartDate": "/Date(1572566400000+0000)/",
- "PayRunPeriodEndDate": "/Date(1573084800000+0000)/",
- "PaymentDate": "/Date(1573171200000+0000)/",
- "PayRunStatus": "DRAFT",
- "UpdatedDateUTC": "/Date(1573685818311+0000)/"
- }
- ]
- }
- '400':
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573685818311)/
+ PayRuns:
+ - PayRunID: d1348fab-f47a-4697-beea-922ee262407a
+ PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de
+ PayRunPeriodStartDate: /Date(1572566400000+0000)/
+ PayRunPeriodEndDate: /Date(1573084800000+0000)/
+ PaymentDate: /Date(1573171200000+0000)/
+ PayRunStatus: DRAFT
+ UpdatedDateUTC: /Date(1573685818311+0000)/
+ "400":
description: invalid input, object invalid - TODO
requestBody:
required: true
@@ -2263,116 +2026,102 @@ paths:
type: array
items:
$ref: '#/components/schemas/PayRun'
- example: '[
- {
- "PayrollCalendarID": "78bb86b9-e1ea-47ac-b75d-f087a81931de",
- "PayRunPeriodStartDate": "/Date(1572566400000+0000)/",
- "PayRunPeriodEndDate": "/Date(1573084800000+0000)/",
- "PayRunStatus": "DRAFT",
- "PaymentDate": "/Date(1573171200000+0000)/"
- }
- ]'
+ example: '[ { "PayrollCalendarID": "78bb86b9-e1ea-47ac-b75d-f087a81931de", "PayRunPeriodStartDate": "/Date(1572566400000+0000)/", "PayRunPeriodEndDate": "/Date(1573084800000+0000)/", "PayRunStatus": "DRAFT", "PaymentDate": "/Date(1573171200000+0000)/" } ]'
/PayRuns/{PayRunID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.payruns, payroll.payruns.read]
+ - OAuth2:
+ - payroll.payruns
+ - payroll.payruns.read
tags:
- PayrollAu
summary: Retrieves a pay run by using a unique pay run id
operationId: getPayRun
- parameters:
+ parameters:
- name: PayRunID
x-snake: pay_run_id
in: path
required: true
description: PayRun id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
- application/json:
+ application/json:
schema:
$ref: '#/components/schemas/PayRuns'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573692531699)/",
- "PayRuns": [
- {
- "PayRunID": "21d6317b-5319-4b3d-8d78-48904db6b665",
- "PayrollCalendarID": "78bb86b9-e1ea-47ac-b75d-f087a81931de",
- "PayRunPeriodStartDate": "/Date(1572566400000+0000)/",
- "PayRunPeriodEndDate": "/Date(1573084800000+0000)/",
- "PaymentDate": "/Date(1573171200000+0000)/",
- "Wages": 205.4,
- "Deductions": 37,
- "Tax": 0,
- "Super": 0,
- "Reimbursement": 77,
- "NetPay": 168.4,
- "PayRunStatus": "POSTED",
- "UpdatedDateUTC": "/Date(1573692155000+0000)/",
- "Payslips": [
- {
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "PayslipID": "c81e8bcc-56b0-4740-b46b-767753a6ee45",
- "FirstName": "Albus",
- "LastName": "Dumbledore",
- "EmployeeGroup": "foo",
- "Wages": 5.4,
- "Deductions": 4,
- "Tax": 0,
- "Super": 0,
- "Reimbursements": 55,
- "NetPay": 1.4,
- "UpdatedDateUTC": "/Date(1573692155000+0000)/"
- },
- {
- "EmployeeID": "7aa04979-ded5-44d9-b09a-793749425844",
- "PayslipID": "76b9cb4e-d024-47cf-b09a-4c9cea2870f1",
- "FirstName": "John",
- "LastName": "Smith",
- "Wages": 200,
- "Deductions": 33,
- "Tax": 0,
- "Super": 0,
- "Reimbursements": 22,
- "NetPay": 167,
- "UpdatedDateUTC": "/Date(1573692155000+0000)/"
- }
- ]
- }
- ]
- }
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573692531699)/
+ PayRuns:
+ - PayRunID: 21d6317b-5319-4b3d-8d78-48904db6b665
+ PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de
+ PayRunPeriodStartDate: /Date(1572566400000+0000)/
+ PayRunPeriodEndDate: /Date(1573084800000+0000)/
+ PaymentDate: /Date(1573171200000+0000)/
+ Wages: 205.4
+ Deductions: 37
+ Tax: 0
+ Super: 0
+ Reimbursement: 77
+ NetPay: 168.4
+ PayRunStatus: POSTED
+ UpdatedDateUTC: /Date(1573692155000+0000)/
+ Payslips:
+ - EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ PayslipID: c81e8bcc-56b0-4740-b46b-767753a6ee45
+ FirstName: Albus
+ LastName: Dumbledore
+ EmployeeGroup: foo
+ Wages: 5.4
+ Deductions: 4
+ Tax: 0
+ Super: 0
+ Reimbursements: 55
+ NetPay: 1.4
+ UpdatedDateUTC: /Date(1573692155000+0000)/
+ - EmployeeID: 7aa04979-ded5-44d9-b09a-793749425844
+ PayslipID: 76b9cb4e-d024-47cf-b09a-4c9cea2870f1
+ FirstName: John
+ LastName: Smith
+ Wages: 200
+ Deductions: 33
+ Tax: 0
+ Super: 0
+ Reimbursements: 22
+ NetPay: 167
+ UpdatedDateUTC: /Date(1573692155000+0000)/
post:
security:
- - OAuth2: [payroll.payruns]
+ - OAuth2:
+ - payroll.payruns
tags:
- PayrollAu
- summary: Updates a pay run
+ summary: Updates a pay run
operationId: updatePayRun
- description: Update properties on a single PayRun
- x-example:
+ description: Update properties on a single PayRun
+ x-example:
- payrun:
key: payRun
keyPascal: PayRun
keySnake: pay_run
- is_object: true
+ is_object: true
- payrollCalendarID:
- is_uuid: true
+ is_uuid: true
default: 00000000-0000-0000-0000-000000000000
key: payrollCalendarID
keyPascal: PayrollCalendarID
keySnake: payroll_calendar_id
object: payRun
- is_last: true
+ is_last: true
parameters:
- $ref: '#/components/parameters/idempotencyKey'
- name: PayRunID
@@ -2380,34 +2129,30 @@ paths:
in: path
required: true
description: PayRun id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/PayRuns'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573693093680)/",
- "PayRuns": [
- {
- "PayRunID": "f8fcda54-643f-4406-902a-d7b020d0a036",
- "PayrollCalendarID": "78bb86b9-e1ea-47ac-b75d-f087a81931de",
- "PayRunPeriodStartDate": "/Date(1572566400000+0000)/",
- "PayRunPeriodEndDate": "/Date(1573084800000+0000)/",
- "PaymentDate": "/Date(1573171200000+0000)/",
- "PayRunStatus": "POSTED",
- "UpdatedDateUTC": "/Date(1573693093000+0000)/"
- }
- ]
- }
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573693093680)/
+ PayRuns:
+ - PayRunID: f8fcda54-643f-4406-902a-d7b020d0a036
+ PayrollCalendarID: 78bb86b9-e1ea-47ac-b75d-f087a81931de
+ PayRunPeriodStartDate: /Date(1572566400000+0000)/
+ PayRunPeriodEndDate: /Date(1573084800000+0000)/
+ PaymentDate: /Date(1573171200000+0000)/
+ PayRunStatus: POSTED
+ UpdatedDateUTC: /Date(1573693093000+0000)/
requestBody:
required: true
content:
@@ -2416,163 +2161,137 @@ paths:
type: array
items:
$ref: '#/components/schemas/PayRun'
- example: '[
- {
- "PayRunStatus": "POSTED"
- }
- ]'
+ example: '[ { "PayRunStatus": "POSTED" } ]'
/Payslip/{PayslipID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.payslip, payroll.payslip.read]
+ - OAuth2:
+ - payroll.payslip
+ - payroll.payslip.read
tags:
- PayrollAu
summary: Retrieves for a payslip by a unique payslip id
operationId: getPayslip
- parameters:
+ parameters:
- name: PayslipID
x-snake: payslip_id
in: path
required: true
description: Payslip id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
- application/json:
+ application/json:
schema:
$ref: '#/components/schemas/PayslipObject'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573692677622)/",
- "Payslip": {
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "PayslipID": "c81e8bcc-56b0-4740-b46b-767753a6ee45",
- "FirstName": "Albus",
- "LastName": "Dumbledore",
- "Tax": 0,
- "NetPay": 1.4,
- "UpdatedDateUTC": "/Date(1573692155000+0000)/",
- "EarningsLines": [
- {
- "EarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "RatePerUnit": 3,
- "NumberOfUnits": 1.8
- }
- ],
- "LeaveEarningsLines": [
- {
- "EarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "RatePerUnit": 0,
- "NumberOfUnits": 0.6,
- "PayOutType": "DEFAULT"
- },
- {
- "EarningsRateID": "ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "RatePerUnit": 3,
- "NumberOfUnits": 0.6,
- "PayOutType": "CASHED_OUT"
- }
- ],
- "TimesheetEarningsLines": [],
- "DeductionLines": [
- {
- "Amount": 4,
- "CalculationType": "FIXEDAMOUNT",
- "DeductionTypeID": "ed05ea82-e40a-4eb6-9c2e-4b3c03e7e938"
- }
- ],
- "LeaveAccrualLines": [
- {
- "LeaveTypeID": "184ea8f7-d143-46dd-bef3-0c60e1aa6fca",
- "NumberOfUnits": 0.0769,
- "AutoCalculate": true
- }
- ],
- "ReimbursementLines": [
- {
- "ReimbursementTypeID": "aa8cfa40-d872-4be0-8a94-bb7f00962f74",
- "Description": "boo",
- "ExpenseAccount": "850",
- "Amount": 55
- }
- ],
- "SuperannuationLines": [
- {
- "ContributionType": "SGC",
- "CalculationType": "STATUTORY",
- "MinimumMonthlyEarnings": 450,
- "ExpenseAccountCode": "478",
- "LiabilityAccountCode": "826",
- "PaymentDateForThisPeriod": "/Date(1580169600000+0000)/",
- "Amount": 0
- }
- ],
- "TaxLines": [
- {
- "PayslipTaxLineID": "c129696e-36ef-4677-a54c-96095787ca20",
- "TaxTypeName": "PAYG Tax",
- "Description": "No tax file number (Australian resident)",
- "Amount": 0,
- "LiabilityAccount": "825"
- }
- ]
- }
- }
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573692677622)/
+ Payslip:
+ EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ PayslipID: c81e8bcc-56b0-4740-b46b-767753a6ee45
+ FirstName: Albus
+ LastName: Dumbledore
+ Tax: 0
+ NetPay: 1.4
+ UpdatedDateUTC: /Date(1573692155000+0000)/
+ EarningsLines:
+ - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ RatePerUnit: 3
+ NumberOfUnits: 1.8
+ LeaveEarningsLines:
+ - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ RatePerUnit: 0
+ NumberOfUnits: 0.6
+ PayOutType: DEFAULT
+ - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ RatePerUnit: 3
+ NumberOfUnits: 0.6
+ PayOutType: CASHED_OUT
+ TimesheetEarningsLines: []
+ DeductionLines:
+ - Amount: 4
+ CalculationType: FIXEDAMOUNT
+ DeductionTypeID: ed05ea82-e40a-4eb6-9c2e-4b3c03e7e938
+ LeaveAccrualLines:
+ - LeaveTypeID: 184ea8f7-d143-46dd-bef3-0c60e1aa6fca
+ NumberOfUnits: 0.0769
+ AutoCalculate: true
+ ReimbursementLines:
+ - ReimbursementTypeID: aa8cfa40-d872-4be0-8a94-bb7f00962f74
+ Description: boo
+ ExpenseAccount: "850"
+ Amount: 55
+ SuperannuationLines:
+ - ContributionType: SGC
+ CalculationType: STATUTORY
+ MinimumMonthlyEarnings: 450
+ ExpenseAccountCode: "478"
+ LiabilityAccountCode: "826"
+ PaymentDateForThisPeriod: /Date(1580169600000+0000)/
+ Amount: 0
+ TaxLines:
+ - PayslipTaxLineID: c129696e-36ef-4677-a54c-96095787ca20
+ TaxTypeName: PAYG Tax
+ Description: No tax file number (Australian resident)
+ Amount: 0
+ LiabilityAccount: "825"
post:
security:
- - OAuth2: [payroll.payslip]
+ - OAuth2:
+ - payroll.payslip
tags:
- PayrollAu
- summary: Updates a payslip
+ summary: Updates a payslip
operationId: updatePayslip
x-hasPayrollAuError: true
x-example:
- earningsLine:
- is_object: true
+ is_object: true
key: earningsLine
keyPascal: EarningsLine
keySnake: earnings_line
- earningsRateID:
- is_uuid: true
+ is_uuid: true
key: earningsRateID
keyPascal: EarningsRateID
keySnake: earnings_rate_id
default: 00000000-0000-0000-0000-000000000000
object: earningsLine
- ratePerUnit:
- nonString: true
+ nonString: true
key: ratePerUnit
keyPascal: RatePerUnit
keySnake: rate_per_unit
default: 20
object: earningsLine
- numberOfUnits:
- nonString: true
+ nonString: true
key: numberOfUnits
keyPascal: NumberOfUnits
keySnake: number_of_units
default: 1
object: earningsLine
- is_last: true
+ is_last: true
- earningsLines:
- is_list: true
+ is_list: true
key: earningsLines
keyPascal: EarningsLines
keySnake: earnings_lines
csharp: EarningsLine
java: EarningsLine
- addEarningsRates:
- is_last: true
- is_list_add: true
+ is_last: true
+ is_list_add: true
key: earningsLines
keyPascal: EarningsLines
keySnake: earnings_lines
@@ -2587,15 +2306,15 @@ paths:
keySnake: payslip_lines
python: payslip_line
ruby: payslip_line
- is_object: true
+ is_object: true
- setEarningsLines:
key: earningsLines
keyPascal: EarningsLines
keySnake: earnings_lines
object: payslipLine
- is_last: true
+ is_last: true
default: earningsLines
- nonString: true
+ nonString: true
- payslipLines:
is_list: true
key: payslipLines
@@ -2605,8 +2324,8 @@ paths:
java: PayslipLines
python: payslipLines
- addPayslipLines:
- is_last: true
- is_list_add: true
+ is_last: true
+ is_list_add: true
key: payslipLines
keyPayscal: PayslipLines
keySnake: payslip_lines
@@ -2615,7 +2334,7 @@ paths:
ruby: payslip_line
csharp: PayslipLine
object: payslipLine
- description: Update lines on a single payslips
+ description: Update lines on a single payslips
parameters:
- $ref: '#/components/parameters/idempotencyKey'
- name: PayslipID
@@ -2623,42 +2342,35 @@ paths:
in: path
required: true
description: Payslip id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: A successful request - currently returns empty array for JSON
content:
application/json:
schema:
$ref: '#/components/schemas/Payslips'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1589568253813)/",
- "Payslips": [
- {
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "PayslipID": "c81e8bcc-56b0-4740-b46b-767753a6ee45",
- "FirstName": "Albus",
- "LastName": "Dumbledore",
- "LastEdited": "/Date(1589568253735+0000)/",
- "Tax": 0,
- "NetPay": 1.4,
- "UpdatedDateUTC": "/Date(1589568253735+0000)/",
- "DeductionLines": [
- {
- "Amount": 4,
- "CalculationType": "FIXEDAMOUNT",
- "DeductionTypeID": "ed05ea82-e40a-4eb6-9c2e-4b3c03e7e938"
- }
- ]
- }
- ]
- }
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1589568253813)/
+ Payslips:
+ - EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ PayslipID: c81e8bcc-56b0-4740-b46b-767753a6ee45
+ FirstName: Albus
+ LastName: Dumbledore
+ LastEdited: /Date(1589568253735+0000)/
+ Tax: 0
+ NetPay: 1.4
+ UpdatedDateUTC: /Date(1589568253735+0000)/
+ DeductionLines:
+ - Amount: 4
+ CalculationType: FIXEDAMOUNT
+ DeductionTypeID: ed05ea82-e40a-4eb6-9c2e-4b3c03e7e938
requestBody:
required: true
content:
@@ -2667,99 +2379,80 @@ paths:
type: array
items:
$ref: '#/components/schemas/PayslipLines'
- example: {
- "Payslip": {
- "EmployeeID": "cdfb8371-0b21-4b8a-8903-1024df6c391e",
- "DeductionLines": [
- {
- "DeductionTypeID": "727af5e8-b347-4ae7-85fc-9b82266d0aec",
- "CalculationType": "FIXEDAMOUNT",
- "NumberOfUnits": 10
- }
- ]
- }
- }
+ example:
+ Payslip:
+ EmployeeID: cdfb8371-0b21-4b8a-8903-1024df6c391e
+ DeductionLines:
+ - DeductionTypeID: 727af5e8-b347-4ae7-85fc-9b82266d0aec
+ CalculationType: FIXEDAMOUNT
+ NumberOfUnits: 10
/Settings:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollAu
operationId: getSettings
summary: Retrieves payroll settings
responses:
- '200':
+ "200":
description: payroll settings
content:
application/json:
schema:
$ref: '#/components/schemas/SettingsObject'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC":"/Date(1573585252781)/",
- "Settings":{
- "Accounts":[
- {
- "AccountID":"85bd2954-7ef5-4fbe-9e40-a1990d0fd63f",
- "Type":"BANK",
- "Code":"094",
- "Name":"Bank of A"
- },
- {
- "AccountID":"7e65fa75-1c64-43d7-b0b4-c05f196e2190",
- "Type":"WAGESPAYABLELIABILITY",
- "Code":"804",
- "Name":"Wages Payable - Payroll"
- },
- {
- "AccountID":"dbc164fa-0cdf-4848-92d3-0d1dc864c53f",
- "Type":"PAYGLIABILITY",
- "Code":"825",
- "Name":"PAYG Withholdings Payable"
- },
- {
- "AccountID":"7dad84d4-bc7a-482e-99b1-d879e4856578",
- "Type":"SUPERANNUATIONEXPENSE",
- "Code":"478",
- "Name":"Superannuation"
- },
- {
- "AccountID":"df3679fe-5ebc-42ce-a7ac-b4d36b520795",
- "Type":"SUPERANNUATIONLIABILITY",
- "Code":"826",
- "Name":"Superannuation Payable"
- },
- {
- "AccountID":"7e130864-5864-4c60-94eb-3c53c95da138",
- "Type":"WAGESEXPENSE",
- "Code":"477",
- "Name":"Wages and Salaries"
- }
- ],
- "TrackingCategories":{
- "EmployeeGroups":{
- "TrackingCategoryID":"a28f419f-6ec3-4dcf-9be0-7959ea983630",
- "TrackingCategoryName":"Foo70317"
- },
- "TimesheetCategories":{
- "TrackingCategoryID":"89375aed-ed51-4624-9e5d-92db6bfa8974",
- "TrackingCategoryName":"Foo32551"
- }
- },
- "DaysInPayrollYear":"364",
- "EmployeesAreSTP2": false
- }
- }
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573585252781)/
+ Settings:
+ Accounts:
+ - AccountID: 85bd2954-7ef5-4fbe-9e40-a1990d0fd63f
+ Type: BANK
+ Code: "094"
+ Name: Bank of A
+ - AccountID: 7e65fa75-1c64-43d7-b0b4-c05f196e2190
+ Type: WAGESPAYABLELIABILITY
+ Code: "804"
+ Name: Wages Payable - Payroll
+ - AccountID: dbc164fa-0cdf-4848-92d3-0d1dc864c53f
+ Type: PAYGLIABILITY
+ Code: "825"
+ Name: PAYG Withholdings Payable
+ - AccountID: 7dad84d4-bc7a-482e-99b1-d879e4856578
+ Type: SUPERANNUATIONEXPENSE
+ Code: "478"
+ Name: Superannuation
+ - AccountID: df3679fe-5ebc-42ce-a7ac-b4d36b520795
+ Type: SUPERANNUATIONLIABILITY
+ Code: "826"
+ Name: Superannuation Payable
+ - AccountID: 7e130864-5864-4c60-94eb-3c53c95da138
+ Type: WAGESEXPENSE
+ Code: "477"
+ Name: Wages and Salaries
+ TrackingCategories:
+ EmployeeGroups:
+ TrackingCategoryID: a28f419f-6ec3-4dcf-9be0-7959ea983630
+ TrackingCategoryName: Foo70317
+ TimesheetCategories:
+ TrackingCategoryID: 89375aed-ed51-4624-9e5d-92db6bfa8974
+ TrackingCategoryName: Foo32551
+ DaysInPayrollYear: "364"
+ EmployeesAreSTP2: false
/Superfunds:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollAu
operationId: getSuperfunds
@@ -2791,43 +2484,38 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/SuperFunds'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC":"/Date(1573570941142)/",
- "SuperFunds":[
- {
- "SuperFundID":"fde8e070-bf59-4e56-b1d7-c75a09474b8d",
- "Name":"Accumulate Plus (Commonwealth Bank Group Super)",
- "Type":"REGULATED",
- "USI":"OSF0001AU",
- "UpdatedDateUTC":"/Date(1573510468000+0000)/"
- },
- {
- "SuperFundID":"69079de5-67ef-43bb-b5a5-3e7c2ccad7f0",
- "Name":"AMG Super",
- "Type":"REGULATED",
- "USI":"PTC0133AU",
- "UpdatedDateUTC":"/Date(1573490487000+0000)/"
- }
- ]
- }
- '400':
- description: validation error for a bad request
- content:
- application/json:
- schema:
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573570941142)/
+ SuperFunds:
+ - SuperFundID: fde8e070-bf59-4e56-b1d7-c75a09474b8d
+ Name: Accumulate Plus (Commonwealth Bank Group Super)
+ Type: REGULATED
+ USI: OSF0001AU
+ UpdatedDateUTC: /Date(1573510468000+0000)/
+ - SuperFundID: 69079de5-67ef-43bb-b5a5-3e7c2ccad7f0
+ Name: AMG Super
+ Type: REGULATED
+ USI: PTC0133AU
+ UpdatedDateUTC: /Date(1573490487000+0000)/
+ "400":
+ description: validation error for a bad request
+ content:
+ application/json:
+ schema:
$ref: '#/components/schemas/APIException'
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollAu
summary: Creates a superfund
@@ -2839,13 +2527,13 @@ paths:
key: superFund
keyPascal: SuperFund
keySnake: super_fund
- is_object: true
+ is_object: true
- type:
key: type
keyPascal: Type
keySnake: type
object: superfund
- nonString: true
+ nonString: true
default: REGULATED
php: XeroAPI\XeroPHP\Models\PayrollAu\SuperFundType::REGULATED
node: SuperFundType.REGULATED
@@ -2859,34 +2547,30 @@ paths:
keySnake: USI
default: 40022701955002
object: superfund
- is_last: true
+ is_last: true
x-hasPayrollAuProblem: true
responses:
- '200':
+ "200":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/SuperFunds'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC":"/Date(1573583393024)/",
- "SuperFunds":[
- {
- "SuperFundID":"e02e44eb-2dba-4d5e-84da-8a0c3a4a4fef",
- "Name":"AMG Super",
- "Type":"REGULATED",
- "ABN":"30099320583",
- "USI":"PTC0133AU",
- "AccountNumber":"FB36350",
- "AccountName":"Foo38428",
- "UpdatedDateUTC":"/Date(1573583393009+0000)/"
- }
- ]
- }
- '400':
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573583393024)/
+ SuperFunds:
+ - SuperFundID: e02e44eb-2dba-4d5e-84da-8a0c3a4a4fef
+ Name: AMG Super
+ Type: REGULATED
+ ABN: "30099320583"
+ USI: PTC0133AU
+ AccountNumber: FB36350
+ AccountName: Foo38428
+ UpdatedDateUTC: /Date(1573583393009+0000)/
+ "400":
description: invalid input, object invalid - TODO
requestBody:
required: true
@@ -2896,83 +2580,73 @@ paths:
type: array
items:
$ref: '#/components/schemas/SuperFund'
- example: '[
- {
- "usi":"PTC0133AU",
- "Type":"REGULATED",
- "Name":"Bar99359",
- "AccountNumber":"FB36350",
- "AccountName":"Foo38428",
- "USI":"PTC0133AU"
- }
- ]'
+ example: '[ { "usi":"PTC0133AU", "Type":"REGULATED", "Name":"Bar99359", "AccountNumber":"FB36350", "AccountName":"Foo38428", "USI":"PTC0133AU" } ]'
/Superfunds/{SuperFundID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollAu
summary: Retrieves a superfund by using a unique superfund ID
operationId: getSuperfund
- parameters:
+ parameters:
- name: SuperFundID
x-snake: super_fund_id
in: path
required: true
description: Superfund id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
- application/json:
+ application/json:
schema:
$ref: '#/components/schemas/SuperFunds'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC":"/Date(1573571518603)/",
- "SuperFunds":[
- {
- "SuperFundID":"540f4327-dda2-4b36-9c2f-2fe1c93a72b5",
- "Name":"My Self Managed one",
- "Type":"SMSF",
- "ABN":"53004085616",
- "EmployerNumber":"9876543",
- "BSB":"324324",
- "AccountNumber":"234234234",
- "AccountName":"My Checking",
- "UpdatedDateUTC":"/Date(1573571429000+0000)/",
- "ElectronicServiceAddress":"FG48739"
- }
- ]
- }
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573571518603)/
+ SuperFunds:
+ - SuperFundID: 540f4327-dda2-4b36-9c2f-2fe1c93a72b5
+ Name: My Self Managed one
+ Type: SMSF
+ ABN: "53004085616"
+ EmployerNumber: "9876543"
+ BSB: "324324"
+ AccountNumber: "234234234"
+ AccountName: My Checking
+ UpdatedDateUTC: /Date(1573571429000+0000)/
+ ElectronicServiceAddress: FG48739
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollAu
- summary: Updates a superfund
+ summary: Updates a superfund
operationId: updateSuperfund
- description: Update properties on a single Superfund
+ description: Update properties on a single Superfund
x-example:
- superfund:
key: superFund
keyPascal: SuperFund
keySnake: super_fund
- is_object: true
+ is_object: true
- type:
key: type
keyPascal: Type
keySnake: type
object: superfund
- nonString: true
+ nonString: true
default: REGULATED
php: XeroAPI\XeroPHP\Models\PayrollAu\SuperFundType::REGULATED
node: SuperFundType.REGULATED
@@ -2986,7 +2660,7 @@ paths:
keySnake: USI
default: 40022701955002
object: superfund
- is_last: true
+ is_last: true
parameters:
- $ref: '#/components/parameters/idempotencyKey'
- name: SuperFundID
@@ -2994,54 +2668,46 @@ paths:
in: path
required: true
description: Superfund id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/SuperFunds'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC":"/Date(1573570941547)/",
- "SuperFunds":[
- {
- "SuperFundID":"fde8e070-bf59-4e56-b1d7-c75a09474b8d",
- "Name":"Accumulate Plus (Commonwealth Bank Group Super)",
- "Type":"REGULATED",
- "ABN":"24248426878",
- "USI":"OSF0001AU",
- "UpdatedDateUTC":"/Date(1573510468000+0000)/"
- }
- ]
- }
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573570941547)/
+ SuperFunds:
+ - SuperFundID: fde8e070-bf59-4e56-b1d7-c75a09474b8d
+ Name: Accumulate Plus (Commonwealth Bank Group Super)
+ Type: REGULATED
+ ABN: "24248426878"
+ USI: OSF0001AU
+ UpdatedDateUTC: /Date(1573510468000+0000)/
requestBody:
required: true
content:
application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/SuperFund'
- example: '
- [
- {
- "Type":"REGULATED",
- "Name":"Nice23534"
- }
- ]'
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SuperFund'
+ example: ' [ { "Type":"REGULATED", "Name":"Nice23534" } ]'
/SuperfundProducts:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollAu
operationId: getSuperfundProducts
@@ -3060,37 +2726,35 @@ paths:
type: string
example: OSF0001AU
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/SuperFundProducts'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC":"/Date(1573570720295)/",
- "SuperFundProducts":[
- {
- "USI":"OSF0001AU",
- "ABN":"24248426878",
- "ProductName":"Accumulate Plus (Commonwealth Bank Group Super)"
- }
- ]
- }
- '400':
- description: validation error for a bad request
- content:
- application/json:
- schema:
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573570720295)/
+ SuperFundProducts:
+ - USI: OSF0001AU
+ ABN: "24248426878"
+ ProductName: Accumulate Plus (Commonwealth Bank Group Super)
+ "400":
+ description: validation error for a bad request
+ content:
+ application/json:
+ schema:
$ref: '#/components/schemas/APIException'
/Timesheets:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.timesheets, payroll.timesheets.read]
+ - OAuth2:
+ - payroll.timesheets
+ - payroll.timesheets.read
tags:
- PayrollAu
operationId: getTimesheets
@@ -3122,77 +2786,64 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Timesheets'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC":"/Date(1573516183708)/",
- "Timesheets":[
- {
- "TimesheetID":"863bbd31-0447-4419-80d5-d733d5e723ba",
- "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc",
- "StartDate":"/Date(1547769600000)/",
- "EndDate":"/Date(1548288000000)/",
- "Status":"APPROVED",
- "Hours":24.0000,
- "TimesheetLines":[
- {
- "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "NumberOfUnits":[
- 4.00,
- 4.00,
- 4.00,
- 4.00,
- 4.00,
- 4.00,
- 0.00
- ],
- "UpdatedDateUTC":"/Date(1572915827000+0000)/"
- }
- ],
- "UpdatedDateUTC":"/Date(1572915827000+0000)/"
- },
- {
- "TimesheetID":"544eb3a7-0d63-495b-90ae-f6aa3c26c2c8",
- "EmployeeID":"7aa04979-ded5-44d9-b09a-793749425844",
- "StartDate":"/Date(1572566400000)/",
- "EndDate":"/Date(1573084800000)/",
- "Status":"APPROVED",
- "Hours":10.0000,
- "TimesheetLines":[
- {
- "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "NumberOfUnits":[
- 2.00,
- 2.00,
- 2.00,
- 2.00,
- 2.00,
- 0.00,
- 0.00
- ],
- "UpdatedDateUTC":"/Date(1572916045000+0000)/"
- }
- ],
- "UpdatedDateUTC":"/Date(1572916045000+0000)/"
- }
- ]
- }
- '400':
- description: validation error for a bad request
- content:
- application/json:
- schema:
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573516183708)/
+ Timesheets:
+ - TimesheetID: 863bbd31-0447-4419-80d5-d733d5e723ba
+ EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc
+ StartDate: /Date(1547769600000)/
+ EndDate: /Date(1548288000000)/
+ Status: APPROVED
+ Hours: 24.0000
+ TimesheetLines:
+ - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ NumberOfUnits:
+ - 4.00
+ - 4.00
+ - 4.00
+ - 4.00
+ - 4.00
+ - 4.00
+ - 0.00
+ UpdatedDateUTC: /Date(1572915827000+0000)/
+ UpdatedDateUTC: /Date(1572915827000+0000)/
+ - TimesheetID: 544eb3a7-0d63-495b-90ae-f6aa3c26c2c8
+ EmployeeID: 7aa04979-ded5-44d9-b09a-793749425844
+ StartDate: /Date(1572566400000)/
+ EndDate: /Date(1573084800000)/
+ Status: APPROVED
+ Hours: 10.0000
+ TimesheetLines:
+ - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ NumberOfUnits:
+ - 2.00
+ - 2.00
+ - 2.00
+ - 2.00
+ - 2.00
+ - 0.00
+ - 0.00
+ UpdatedDateUTC: /Date(1572916045000+0000)/
+ UpdatedDateUTC: /Date(1572916045000+0000)/
+ "400":
+ description: validation error for a bad request
+ content:
+ application/json:
+ schema:
$ref: '#/components/schemas/APIException'
post:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollAu
summary: Creates a timesheet
@@ -3208,13 +2859,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 23)"
- java: "LocalDate.of(2020, Month.OCTOBER, 23)"
- csharp: "new DateTime(2020, 10, 23)"
- php: "new DateTime('2020-10-23')"
- node: "'2020-10-23'"
- python: "dateutil.parser.parse('2020-10-23T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 23)
+ java: LocalDate.of(2020, Month.OCTOBER, 23)
+ csharp: new DateTime(2020, 10, 23)
+ php: new DateTime('2020-10-23')
+ node: '''2020-10-23'''
+ python: dateutil.parser.parse('2020-10-23T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- endDateValue:
key: endDate
keyPascal: EndDate
@@ -3222,20 +2873,20 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 30)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 30)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- timesheet:
key: timesheet
keyPascal: Timesheet
keySnake: timesheet
- is_object: true
+ is_object: true
- EmployeeID:
- is_uuid: true
+ is_uuid: true
default: 00000000-0000-0000-0000-000000000000
key: employeeID
keyPascal: EmployeeID
@@ -3276,46 +2927,38 @@ paths:
csharp: TimesheetStatus.DRAFT
object: timesheet
responses:
- '200':
+ "200":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/Timesheets'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC":"/Date(1573516185143)/",
- "Timesheets":[
- {
- "TimesheetID":"a7eb0a79-8511-4ee7-b473-3a25f28abcb9",
- "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc",
- "StartDate":"/Date(1573171200000+0000)/",
- "EndDate":"/Date(1573689600000+0000)/",
- "Status":"DRAFT",
- "Hours":22.0,
- "TimesheetLines":[
- {
- "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "TrackingItemID":"af5e9ce2-2349-4136-be99-3561b189f473",
- "NumberOfUnits":[
- 2.0,
- 10.0,
- 0.0,
- 0.0,
- 5.0,
- 0.0,
- 5.0
- ],
- "UpdatedDateUTC":"/Date(1573516185127+0000)/"
- }
- ],
- "UpdatedDateUTC":"/Date(1573516185127+0000)/"
- }
- ]
- }
- '400':
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573516185143)/
+ Timesheets:
+ - TimesheetID: a7eb0a79-8511-4ee7-b473-3a25f28abcb9
+ EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc
+ StartDate: /Date(1573171200000+0000)/
+ EndDate: /Date(1573689600000+0000)/
+ Status: DRAFT
+ Hours: 22.0
+ TimesheetLines:
+ - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ TrackingItemID: af5e9ce2-2349-4136-be99-3561b189f473
+ NumberOfUnits:
+ - 2.0
+ - 10.0
+ - 0.0
+ - 0.0
+ - 5.0
+ - 0.0
+ - 5.0
+ UpdatedDateUTC: /Date(1573516185127+0000)/
+ UpdatedDateUTC: /Date(1573516185127+0000)/
+ "400":
description: invalid input, object invalid - TODO
requestBody:
required: true
@@ -3325,94 +2968,69 @@ paths:
type: array
items:
$ref: '#/components/schemas/Timesheet'
- example: '[
- {
- "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc",
- "StartDate":"/Date(1573171200000+0000)/",
- "EndDate":"/Date(1573689600000+0000)/",
- "Status":"DRAFT",
- "TimesheetLines":[
- {
- "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "TrackingItemID":"af5e9ce2-2349-4136-be99-3561b189f473",
- "NumberOfUnits":[
- 2.0,
- 10.0,
- 0.0,
- 0.0,
- 5.0,
- 0.0,
- 5.0
- ]
- }
- ]
- }
- ]'
+ example: '[ { "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc", "StartDate":"/Date(1573171200000+0000)/", "EndDate":"/Date(1573689600000+0000)/", "Status":"DRAFT", "TimesheetLines":[ { "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4", "TrackingItemID":"af5e9ce2-2349-4136-be99-3561b189f473", "NumberOfUnits":[ 2.0, 10.0, 0.0, 0.0, 5.0, 0.0, 5.0 ] } ] } ]'
/Timesheets/{TimesheetID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.timesheets, payroll.timesheets.read]
+ - OAuth2:
+ - payroll.timesheets
+ - payroll.timesheets.read
tags:
- PayrollAu
summary: Retrieves a timesheet by using a unique timesheet id
operationId: getTimesheet
- parameters:
+ parameters:
- name: TimesheetID
x-snake: timesheet_id
in: path
required: true
description: Timesheet id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
- application/json:
+ application/json:
schema:
$ref: '#/components/schemas/TimesheetObject'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC":"/Date(1573516184161)/",
- "Timesheet":{
- "TimesheetID":"df954ca3-3a70-47e9-9a3e-80711e7c5f90",
- "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc",
- "StartDate":"/Date(1547164800000+0000)/",
- "EndDate":"/Date(1547683200000+0000)/",
- "Status":"APPROVED",
- "Hours":15.0000,
- "TimesheetLines":[
- {
- "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "NumberOfUnits":[
- 3.00,
- 3.00,
- 3.00,
- 3.00,
- 0.00,
- 3.00,
- 0.00
- ],
- "UpdatedDateUTC":"/Date(1572915797000+0000)/"
- }
- ],
- "UpdatedDateUTC":"/Date(1572915797000+0000)/"
- }
- }
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573516184161)/
+ Timesheet:
+ TimesheetID: df954ca3-3a70-47e9-9a3e-80711e7c5f90
+ EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc
+ StartDate: /Date(1547164800000+0000)/
+ EndDate: /Date(1547683200000+0000)/
+ Status: APPROVED
+ Hours: 15.0000
+ TimesheetLines:
+ - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ NumberOfUnits:
+ - 3.00
+ - 3.00
+ - 3.00
+ - 3.00
+ - 0.00
+ - 3.00
+ - 0.00
+ UpdatedDateUTC: /Date(1572915797000+0000)/
+ UpdatedDateUTC: /Date(1572915797000+0000)/
post:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollAu
- summary: Updates a timesheet
+ summary: Updates a timesheet
operationId: updateTimesheet
- description: Update properties on a single timesheet
+ description: Update properties on a single timesheet
x-example:
- startDateValue:
key: startDate
@@ -3421,13 +3039,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 23)"
- java: "LocalDate.of(2020, Month.OCTOBER, 23)"
- csharp: "new DateTime(2020, 10, 23)"
- php: "new DateTime('2020-10-23')"
- node: "'2020-10-23'"
- python: "dateutil.parser.parse('2020-10-23T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 23)
+ java: LocalDate.of(2020, Month.OCTOBER, 23)
+ csharp: new DateTime(2020, 10, 23)
+ php: new DateTime('2020-10-23')
+ node: '''2020-10-23'''
+ python: dateutil.parser.parse('2020-10-23T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- endDateValue:
key: endDate
keyPascal: EndDate
@@ -3435,20 +3053,20 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 30)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 30)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- timesheet:
key: timesheet
keyPascal: Timesheet
keySnake: timesheet
- is_object: true
+ is_object: true
- EmployeeID:
- is_uuid: true
+ is_uuid: true
default: 00000000-0000-0000-0000-000000000000
key: employeeID
keyPascal: EmployeeID
@@ -3495,50 +3113,42 @@ paths:
in: path
required: true
description: Timesheet id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/Timesheets'
- example: {
- "Id": "00000000-0000-0000-0000-000000000000",
- "Status": "OK",
- "ProviderName":"3f93110a-df13-49c7-b82f-a069813df188",
- "DateTimeUTC":"/Date(1573516185258)/",
- "Timesheets":[
- {
- "TimesheetID":"a7eb0a79-8511-4ee7-b473-3a25f28abcb9",
- "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc",
- "StartDate":"/Date(1573171200000+0000)/",
- "EndDate":"/Date(1573689600000+0000)/",
- "Status":"APPROVED",
- "Hours":22.0,
- "TimesheetLines":[
- {
- "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "TrackingItemID":"af5e9ce2-2349-4136-be99-3561b189f473",
- "NumberOfUnits":[
- 2.0,
- 10.0,
- 0.0,
- 0.0,
- 5.0,
- 0.0,
- 5.0
- ],
- "UpdatedDateUTC":"/Date(1573516185227+0000)/"
- }
- ],
- "UpdatedDateUTC":"/Date(1573516185227+0000)/"
- }
- ]
- }
+ example:
+ Id: 00000000-0000-0000-0000-000000000000
+ Status: OK
+ ProviderName: 3f93110a-df13-49c7-b82f-a069813df188
+ DateTimeUTC: /Date(1573516185258)/
+ Timesheets:
+ - TimesheetID: a7eb0a79-8511-4ee7-b473-3a25f28abcb9
+ EmployeeID: b34e89ff-770d-4099-b7e5-f968767118bc
+ StartDate: /Date(1573171200000+0000)/
+ EndDate: /Date(1573689600000+0000)/
+ Status: APPROVED
+ Hours: 22.0
+ TimesheetLines:
+ - EarningsRateID: ab874dfb-ab09-4c91-954e-43acf6fc23b4
+ TrackingItemID: af5e9ce2-2349-4136-be99-3561b189f473
+ NumberOfUnits:
+ - 2.0
+ - 10.0
+ - 0.0
+ - 0.0
+ - 5.0
+ - 0.0
+ - 5.0
+ UpdatedDateUTC: /Date(1573516185227+0000)/
+ UpdatedDateUTC: /Date(1573516185227+0000)/
requestBody:
required: true
content:
@@ -3547,47 +3157,22 @@ paths:
type: array
items:
$ref: '#/components/schemas/Timesheet'
- example: '[
- {
- "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc",
- "StartDate":"/Date(1573171200000+0000)/",
- "EndDate":"/Date(1573689600000+0000)/",
- "Status":"APPROVED",
- "Hours":22.0,
- "TimesheetID":"a7eb0a79-8511-4ee7-b473-3a25f28abcb9",
- "TimesheetLines":[
- {
- "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4",
- "TrackingItemID":"af5e9ce2-2349-4136-be99-3561b189f473",
- "NumberOfUnits":[
- 2.0,
- 10.0,
- 0.0,
- 0.0,
- 5.0,
- 0.0,
- 5.0
- ],
- "UpdatedDateUTC":"/Date(1573516185127+0000)/"
- }
- ]
- }
- ]'
+ example: '[ { "EmployeeID":"b34e89ff-770d-4099-b7e5-f968767118bc", "StartDate":"/Date(1573171200000+0000)/", "EndDate":"/Date(1573689600000+0000)/", "Status":"APPROVED", "Hours":22.0, "TimesheetID":"a7eb0a79-8511-4ee7-b473-3a25f28abcb9", "TimesheetLines":[ { "EarningsRateID":"ab874dfb-ab09-4c91-954e-43acf6fc23b4", "TrackingItemID":"af5e9ce2-2349-4136-be99-3561b189f473", "NumberOfUnits":[ 2.0, 10.0, 0.0, 0.0, 5.0, 0.0, 5.0 ], "UpdatedDateUTC":"/Date(1573516185127+0000)/" } ] } ]'
components:
securitySchemes:
OAuth2:
type: oauth2
description: For more information visit https://developer.xero.com/documentation/oauth2/overview
- flows:
+ flows:
authorizationCode:
- authorizationUrl: 'https://login.xero.com/identity/connect/authorize'
- tokenUrl: 'https://identity.xero.com/connect/token'
+ authorizationUrl: https://login.xero.com/identity/connect/authorize
+ tokenUrl: https://identity.xero.com/connect/token
scopes:
email: Grant read-only access to your email
openid: Grant read-only access to your open id
profile: your profile information
payroll.employees: Grant read-write access to payroll employees
- payroll.employees.read: Grant read-only access to payroll employees
+ payroll.employees.read: Grant read-only access to payroll employees
payroll.payruns: Grant read-write access to payroll payruns
payroll.payruns.read: Grant read-only access to payroll payruns
payroll.payslip: Grant read-write access to payroll payslips
@@ -3597,20 +3182,20 @@ components:
payroll.timesheets: Grant read-write access to payroll timesheets
payroll.timesheets.read: Grant read-only access to payroll timesheets
parameters:
- requiredHeader:
+ requiredHeader:
in: header
name: Xero-Tenant-Id
x-snake: xero_tenant_id
description: Xero identifier for Tenant
schema:
type: string
- required: true
+ required: true
idempotencyKey:
in: header
name: Idempotency-Key
x-snake: idempotency_key
description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
- example: "KEY_VALUE"
+ example: KEY_VALUE
schema:
type: string
schemas:
@@ -3641,14 +3226,14 @@ components:
description: Date of birth of the employee (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
+ example: /Date(322560000000+0000)/
HomeAddress:
$ref: '#/components/schemas/HomeAddress'
StartDate:
description: Start date for an employee (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(320284900000+0000)/'
+ example: /Date(320284900000+0000)/
Title:
description: Title of the employee
type: string
@@ -3665,10 +3250,10 @@ components:
description: The employee’s gender. See Employee Gender
type: string
enum:
- - N
- - M
- - F
- - I
+ - N
+ - M
+ - F
+ - I
example: F
Phone:
description: Employee phone number
@@ -3721,7 +3306,7 @@ components:
description: Employee Termination Date (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(1584662400000+0000)/'
+ example: /Date(1584662400000+0000)/
TerminationReason:
description: |
* `V` Voluntary cessation - An employee resignation, retirement, domestic or pressing necessity or abandonment of employment
@@ -3733,13 +3318,13 @@ components:
* `T` Transfer - The administrative arrangements performed to transfer employees across payroll systems, move them temporarily to another employer (machinery of government for public servants), transfer of business, move them to outsourcing arrangements or other such technical activities.
type: string
enum:
- - V
- - I
- - D
- - R
- - F
- - C
- - T
+ - V
+ - I
+ - D
+ - R
+ - F
+ - C
+ - T
example: F
BankAccounts:
type: array
@@ -3749,11 +3334,11 @@ components:
$ref: '#/components/schemas/PayTemplate'
OpeningBalances:
$ref: '#/components/schemas/OpeningBalances'
- TaxDeclaration:
+ TaxDeclaration:
$ref: '#/components/schemas/TaxDeclaration'
- IncomeType:
+ IncomeType:
$ref: '#/components/schemas/IncomeType'
- EmploymentType:
+ EmploymentType:
$ref: '#/components/schemas/EmploymentType'
CountryOfResidence:
$ref: '#/components/schemas/CountryOfResidence'
@@ -3780,8 +3365,8 @@ components:
type: string
readOnly: true
x-is-msdate-time: true
- example: '/Date(1583967733054+0000)/'
- ValidationErrors:
+ example: /Date(1583967733054+0000)/
+ ValidationErrors:
description: Displays array of validation error messages from the API
type: array
items:
@@ -3820,12 +3405,12 @@ components:
description: Start date of the leave (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
+ example: /Date(322560000000+0000)/
EndDate:
description: End date of the leave (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
+ example: /Date(322560000000+0000)/
Description:
description: The Description of the Leave
type: string
@@ -3841,8 +3426,8 @@ components:
type: string
readOnly: true
x-is-msdate-time: true
- example: '/Date(1583967733054+0000)/'
- ValidationErrors:
+ example: /Date(1583967733054+0000)/
+ ValidationErrors:
description: Displays array of validation error messages from the API
type: array
items:
@@ -3866,21 +3451,21 @@ components:
description: The Pay Period End Date (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
+ example: /Date(322560000000+0000)/
PayPeriodStartDate:
description: The Pay Period Start Date (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
+ example: /Date(322560000000+0000)/
LeavePeriodStatus:
$ref: '#/components/schemas/LeavePeriodStatus'
LeavePeriodStatus:
type: string
enum:
- - SCHEDULED #The default status
- - PROCESSED #A LeavePeriod is set to the "Processed" status when the Payrun associated with the LeavePeriod is "POSTED"
- - REQUESTED
- - REJECTED
+ - SCHEDULED #The default status
+ - PROCESSED #A LeavePeriod is set to the "Processed" status when the Payrun associated with the LeavePeriod is "POSTED"
+ - REQUESTED
+ - REJECTED
PayItems:
type: object
x-objectArrayKey: pay_items
@@ -3927,12 +3512,12 @@ components:
description: The start date of the upcoming pay period. The end date will be calculated based upon this date, and the calendar type selected (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
+ example: /Date(322560000000+0000)/
PaymentDate:
description: The date on which employees will be paid for the upcoming pay period (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
+ example: /Date(322560000000+0000)/
PayrollCalendarID:
description: Xero identifier
type: string
@@ -3943,13 +3528,13 @@ components:
type: string
readOnly: true
x-is-msdate-time: true
- example: '/Date(1583967733054+0000)/'
+ example: /Date(1583967733054+0000)/
ReferenceDate:
description: Reference Date (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
- ValidationErrors:
+ example: /Date(322560000000+0000)/
+ ValidationErrors:
description: Displays array of validation error messages from the API
type: array
items:
@@ -3983,16 +3568,16 @@ components:
description: Period start date (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
+ example: /Date(322560000000+0000)/
EndDate:
description: Period end date (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
+ example: /Date(322560000000+0000)/
Status:
$ref: '#/components/schemas/TimesheetStatus'
Hours:
- description: Timesheet total hours
+ description: Timesheet total hours
type: number
format: double
x-is-money: true
@@ -4009,8 +3594,8 @@ components:
type: string
readOnly: true
x-is-msdate-time: true
- example: '/Date(1583967733054+0000)/'
- ValidationErrors:
+ example: /Date(1583967733054+0000)/
+ ValidationErrors:
description: Displays array of validation error messages from the API
type: array
items:
@@ -4033,7 +3618,7 @@ components:
format: uuid
example: ae777a87-5ef3-4fa0-a4f0-d10e1f13073a
NumberOfUnits:
- description: The number of units on a timesheet line
+ description: The number of units on a timesheet line
type: array
items:
description: Number of units of a Timesheet line
@@ -4045,7 +3630,7 @@ components:
type: string
readOnly: true
x-is-msdate-time: true
- example: '/Date(1583967733054+0000)/'
+ example: /Date(1583967733054+0000)/
PayRuns:
type: object
x-objectArrayKey: pay_runs
@@ -4060,32 +3645,32 @@ components:
- PayrollCalendarID
properties:
PayrollCalendarID:
- description: Xero identifier for pay run
+ description: Xero identifier for pay run
type: string
format: uuid
example: bfac31bd-ea62-4fc8-a5e7-7965d9504b15
PayRunID:
- description: Xero identifier for pay run
- type: string
+ description: Xero identifier for pay run
+ type: string
format: uuid
example: bba1d10f-63b1-4692-b5c5-a99f869523a4
PayRunPeriodStartDate:
- description: Period Start Date for the PayRun (YYYY-MM-DD)
+ description: Period Start Date for the PayRun (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
+ example: /Date(322560000000+0000)/
PayRunPeriodEndDate:
- description: Period End Date for the PayRun (YYYY-MM-DD)
+ description: Period End Date for the PayRun (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
+ example: /Date(322560000000+0000)/
PayRunStatus:
$ref: '#/components/schemas/PayRunStatus'
PaymentDate:
- description: Payment Date for the PayRun (YYYY-MM-DD)
+ description: Payment Date for the PayRun (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
+ example: /Date(322560000000+0000)/
PayslipMessage:
description: Payslip message for the PayRun
type: string
@@ -4095,7 +3680,7 @@ components:
type: string
readOnly: true
x-is-msdate-time: true
- example: '/Date(1583967733054+0000)/'
+ example: /Date(1583967733054+0000)/
Payslips:
description: The payslips in the payrun
type: array
@@ -4137,7 +3722,7 @@ components:
format: double
x-is-money: true
example: 862.5
- ValidationErrors:
+ ValidationErrors:
description: Displays array of validation error messages from the API
type: array
items:
@@ -4151,7 +3736,7 @@ components:
format: uuid
example: 4729f087-8eec-49c1-8294-4d11a5a0a37c
PayslipID:
- description: Xero identifier for the payslip
+ description: Xero identifier for the payslip
type: string
format: uuid
example: f3c0874d-7cdd-459a-a95c-d90d51decc42
@@ -4208,7 +3793,7 @@ components:
type: string
readOnly: true
x-is-msdate-time: true
- example: '/Date(1583967733054+0000)/'
+ example: /Date(1583967733054+0000)/
PayslipLines:
type: object
properties:
@@ -4266,7 +3851,7 @@ components:
format: uuid
example: 4729f087-8eec-49c1-8294-4d11a5a0a37c
PayslipID:
- description: Xero identifier for the payslip
+ description: Xero identifier for the payslip
type: string
format: uuid
example: f3c0874d-7cdd-459a-a95c-d90d51decc42
@@ -4351,7 +3936,7 @@ components:
type: string
readOnly: true
x-is-msdate-time: true
- example: '/Date(1583967733054+0000)/'
+ example: /Date(1583967733054+0000)/
LeaveAccrualLine:
type: object
properties:
@@ -4374,7 +3959,7 @@ components:
type: object
properties:
SuperMembershipID:
- description: Xero identifier for payroll super fund membership ID.
+ description: Xero identifier for payroll super fund membership ID.
type: string
format: uuid
example: e0eb6747-7c17-4075-b804-989f8d4e5d39
@@ -4383,7 +3968,7 @@ components:
CalculationType:
$ref: '#/components/schemas/SuperannuationCalculationType'
MinimumMonthlyEarnings:
- description: Superannuation minimum monthly earnings.
+ description: Superannuation minimum monthly earnings.
type: number
format: double
x-is-money: true
@@ -4397,12 +3982,12 @@ components:
type: string
example: 650
PaymentDateForThisPeriod:
- description: Superannuation payment date for the current period (YYYY-MM-DD)
+ description: Superannuation payment date for the current period (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
+ example: /Date(322560000000+0000)/
Percentage:
- description: Superannuation percentage
+ description: Superannuation percentage
type: number
format: double
x-is-money: true
@@ -4417,7 +4002,7 @@ components:
type: object
properties:
PayslipTaxLineID:
- description: Xero identifier for payslip tax line ID.
+ description: Xero identifier for payslip tax line ID.
type: string
format: uuid
example: e0eb6747-7c17-4075-b804-989f8d4e5d39
@@ -4471,19 +4056,19 @@ components:
type: object
properties:
Accounts:
- description: Payroll Account details for SuperExpense, SuperLiabilty, WagesExpense, PAYGLiability & WagesPayable.
+ description: Payroll Account details for SuperExpense, SuperLiabilty, WagesExpense, PAYGLiability & WagesPayable.
type: array
items:
$ref: '#/components/schemas/Account'
TrackingCategories:
- description: Tracking categories for Employees and Timesheets
+ description: Tracking categories for Employees and Timesheets
type: object
properties:
EmployeeGroups:
description: The tracking category used for employees
type: object
properties:
- TrackingCategoryID:
+ TrackingCategoryID:
description: The identifier for the tracking category
type: string
format: uuid
@@ -4495,7 +4080,7 @@ components:
description: The tracking category used for timesheets
type: object
properties:
- TrackingCategoryID:
+ TrackingCategoryID:
description: The identifier for the tracking category
type: string
format: uuid
@@ -4526,7 +4111,7 @@ components:
- Type
properties:
SuperFundID:
- description: Xero identifier for a super fund
+ description: Xero identifier for a super fund
type: string
format: uuid
example: bfac31bd-ea62-4fc8-a5e7-7965d9504b15
@@ -4547,7 +4132,7 @@ components:
AccountNumber:
description: The account number for the self managed super fund.
type: string
- example: 234234234
+ example: 234234234
AccountName:
description: The account name for the self managed super fund.
type: string
@@ -4561,7 +4146,7 @@ components:
type: string
example: 324324
SPIN:
- description: The SPIN of the Regulated SuperFund. This field has been deprecated. It will only be present for legacy superfunds. New superfunds will not have a SPIN value. The USI field should be used instead of SPIN.
+ description: The SPIN of the Regulated SuperFund. This field has been deprecated. It will only be present for legacy superfunds. New superfunds will not have a SPIN value. The USI field should be used instead of SPIN.
type: string
example: 4545445454
USI:
@@ -4573,8 +4158,8 @@ components:
type: string
readOnly: true
x-is-msdate-time: true
- example: '/Date(1583967733054+0000)/'
- ValidationErrors:
+ example: /Date(1583967733054+0000)/
+ ValidationErrors:
description: Displays array of validation error messages from the API
type: array
items:
@@ -4595,7 +4180,7 @@ components:
type: string
example: 839182848805
USI:
- description: The USI of the Regulated SuperFund
+ description: The USI of the Regulated SuperFund
type: string
example: 839182848805001
SPIN:
@@ -4697,7 +4282,7 @@ components:
type: string
readOnly: true
x-is-msdate-time: true
- example: '/Date(1583967733054+0000)/'
+ example: /Date(1583967733054+0000)/
CurrentRecord:
description: Is the current record
type: boolean
@@ -4740,7 +4325,7 @@ components:
type: string
readOnly: true
x-is-msdate-time: true
- example: '/Date(1583967733054+0000)/'
+ example: /Date(1583967733054+0000)/
DeductionCategory:
type: string
enum:
@@ -4783,7 +4368,7 @@ components:
type: string
readOnly: true
x-is-msdate-time: true
- example: '/Date(1583967733054+0000)/'
+ example: /Date(1583967733054+0000)/
IsPaidLeave:
description: Set this to indicate that an employee will be paid when taking this type of leave
type: boolean
@@ -4824,7 +4409,7 @@ components:
type: string
readOnly: true
x-is-msdate-time: true
- example: '/Date(1583967733054+0000)/'
+ example: /Date(1583967733054+0000)/
CurrentRecord:
description: Is the current record
type: boolean
@@ -4872,7 +4457,7 @@ components:
type: string
example: 123123123
ABN:
- description: 11-digit Australian Business Number e.g 21006819692 or an empty string ("") to unset a previously set value. Only applicable, and mandatory if income type is NONEMPLOYEE.
+ description: 11-digit Australian Business Number e.g 21006819692 or an empty string ("") to unset a previously set value. Only applicable, and mandatory if income type is NONEMPLOYEE.
type: string
example: 21006819692
AustralianResidentForTaxPurposes:
@@ -4927,7 +4512,7 @@ components:
type: boolean
example: true
HasLoanOrStudentDebt:
- description: "If the employee has any of the following loans or debts: Higher Education Loan Program (HELP/HECS), VET Student Loan (VSL), Financial Supplement (FS), Student Start-up Loan (SSL), or Trade Support Loan (TSL)"
+ description: 'If the employee has any of the following loans or debts: Higher Education Loan Program (HELP/HECS), VET Student Loan (VSL), Financial Supplement (FS), Student Start-up Loan (SSL), or Trade Support Loan (TSL)'
type: boolean
example: true
UpdatedDateUTC:
@@ -4935,7 +4520,7 @@ components:
type: string
readOnly: true
x-is-msdate-time: true
- example: '/Date(1583967733054+0000)/'
+ example: /Date(1583967733054+0000)/
type: object
BankAccount:
type: object
@@ -4992,7 +4577,7 @@ components:
EarningsLine:
type: object
required:
- - EarningsRateID
+ - EarningsRateID
properties:
EarningsRateID:
description: Xero unique id for earnings rate
@@ -5046,7 +4631,7 @@ components:
DeductionLine:
type: object
required:
- - DeductionTypeID
+ - DeductionTypeID
properties:
DeductionTypeID:
description: Xero deduction type identifier
@@ -5113,7 +4698,6 @@ components:
example: 10.00
ReimbursementLines:
type: object
-
x-objectArrayKey: reimbursement_lines
description: The reimbursement type lines
properties:
@@ -5219,7 +4803,7 @@ components:
x-is-money: true
example: 60.00
ResetSTPCategorisation:
- description: Reset the STP categorisations for the leave type. *Only applicable for Leave Types with Annual Leave Categories
+ description: Reset the STP categorisations for the leave type. *Only applicable for Leave Types with Annual Leave Categories
type: boolean
example: true
OpeningBalances:
@@ -5229,7 +4813,7 @@ components:
description: Opening Balance Date. (YYYY-MM-DD)
type: string
x-is-msdate: true
- example: '/Date(322560000000+0000)/'
+ example: /Date(322560000000+0000)/
Tax:
description: Opening Balance tax
type: string
@@ -5261,21 +4845,21 @@ components:
LeaveBalance:
type: object
properties:
- LeaveName :
+ LeaveName:
description: The name of the leave type
type: string
example: Annual Leave
- LeaveTypeID :
+ LeaveTypeID:
description: Identifier of the leave type (see PayItems)
type: string
example: 544d9292-4329-4512-bfff-a9f15236d776
- NumberOfUnits :
+ NumberOfUnits:
description: The balance of the leave available
type: number
format: double
x-is-money: true
example: 81.2602
- TypeOfUnits :
+ TypeOfUnits:
description: The type of units as specified by the LeaveType (see PayItems)
type: string
example: Hours
@@ -5299,474 +4883,474 @@ components:
RateType:
type: string
enum:
- - FIXEDAMOUNT
- - MULTIPLE #Multiple of Employee’s Ordinary Earnings Rate - an earnings rate which is derived from an employee’s ordinary earnings rate
- - RATEPERUNIT #An earnings rate allowing entry of a rate per unit
- EarningsType:
+ - FIXEDAMOUNT
+ - MULTIPLE #Multiple of Employee’s Ordinary Earnings Rate - an earnings rate which is derived from an employee’s ordinary earnings rate
+ - RATEPERUNIT #An earnings rate allowing entry of a rate per unit
+ EarningsType:
type: string
enum:
- - FIXED
- - ORDINARYTIMEEARNINGS
- - OVERTIMEEARNINGS
- - ALLOWANCE
- - LUMPSUMD
- - EMPLOYMENTTERMINATIONPAYMENT
- - LUMPSUMA
- - LUMPSUMB
- - BONUSESANDCOMMISSIONS
- - LUMPSUME
- - LUMPSUMW
- - DIRECTORSFEES
- - PAIDPARENTALLEAVE
- - WORKERSCOMPENSATION
- EmploymentTerminationPaymentType:
+ - FIXED
+ - ORDINARYTIMEEARNINGS
+ - OVERTIMEEARNINGS
+ - ALLOWANCE
+ - LUMPSUMD
+ - EMPLOYMENTTERMINATIONPAYMENT
+ - LUMPSUMA
+ - LUMPSUMB
+ - BONUSESANDCOMMISSIONS
+ - LUMPSUME
+ - LUMPSUMW
+ - DIRECTORSFEES
+ - PAIDPARENTALLEAVE
+ - WORKERSCOMPENSATION
+ EmploymentTerminationPaymentType:
type: string
enum:
- - O
- - R
- AllowanceType:
+ - O
+ - R
+ AllowanceType:
type: string
- enum:
- - CAR
- - TRANSPORT
- - LAUNDRY
- - MEALS
- - TRAVEL
- - OTHER
- - TOOLS
- - TASKS
- - QUALIFICATIONS
+ enum:
+ - CAR
+ - TRANSPORT
+ - LAUNDRY
+ - MEALS
+ - TRAVEL
+ - OTHER
+ - TOOLS
+ - TASKS
+ - QUALIFICATIONS
AllowanceCategory:
type: string
enum:
- - NONDEDUCTIBLE
- - UNIFORM
- - PRIVATEVEHICLE
- - HOMEOFFICE
- - TRANSPORT
- - GENERAL
- - OTHER
- CalendarType:
+ - NONDEDUCTIBLE
+ - UNIFORM
+ - PRIVATEVEHICLE
+ - HOMEOFFICE
+ - TRANSPORT
+ - GENERAL
+ - OTHER
+ CalendarType:
type: string
enum:
- - WEEKLY
- - FORTNIGHTLY
- - FOURWEEKLY
- - MONTHLY
- - TWICEMONTHLY
- - QUARTERLY
- EarningsRateCalculationType:
+ - WEEKLY
+ - FORTNIGHTLY
+ - FOURWEEKLY
+ - MONTHLY
+ - TWICEMONTHLY
+ - QUARTERLY
+ EarningsRateCalculationType:
type: string
enum:
- - USEEARNINGSRATE
- - ENTEREARNINGSRATE
- - ANNUALSALARY
- DeductionTypeCalculationType:
+ - USEEARNINGSRATE
+ - ENTEREARNINGSRATE
+ - ANNUALSALARY
+ DeductionTypeCalculationType:
type: string
enum:
- - FIXEDAMOUNT
- - PRETAX
- - POSTTAX
- LeaveLineCalculationType:
+ - FIXEDAMOUNT
+ - PRETAX
+ - POSTTAX
+ LeaveLineCalculationType:
description: Calculation type for leave line for Opening Balance on Employee
type: string
enum:
- - NOCALCULATIONREQUIRED
- - FIXEDAMOUNTEACHPERIOD
- - ENTERRATEINPAYTEMPLATE
- - BASEDONORDINARYEARNINGS
- SuperannuationContributionType:
+ - NOCALCULATIONREQUIRED
+ - FIXEDAMOUNTEACHPERIOD
+ - ENTERRATEINPAYTEMPLATE
+ - BASEDONORDINARYEARNINGS
+ SuperannuationContributionType:
type: string
enum:
- - SGC
- - SALARYSACRIFICE
- - EMPLOYERADDITIONAL
- - EMPLOYEE
- SuperannuationCalculationType:
+ - SGC
+ - SALARYSACRIFICE
+ - EMPLOYERADDITIONAL
+ - EMPLOYEE
+ SuperannuationCalculationType:
type: string
enum:
- - FIXEDAMOUNT
- - PERCENTAGEOFEARNINGS
- - STATUTORY
- PaymentFrequencyType:
+ - FIXEDAMOUNT
+ - PERCENTAGEOFEARNINGS
+ - STATUTORY
+ PaymentFrequencyType:
type: string
enum:
- - WEEKLY
- - MONTHLY
- - FORTNIGHTLY
- - QUARTERLY
- - TWICEMONTHLY
- - FOURWEEKLY
- - YEARLY
- LeaveTypeContributionType:
+ - WEEKLY
+ - MONTHLY
+ - FORTNIGHTLY
+ - QUARTERLY
+ - TWICEMONTHLY
+ - FOURWEEKLY
+ - YEARLY
+ LeaveTypeContributionType:
type: string
enum:
- - SGC
- - SALARYSACRIFICE
- - EMPLOYERADDITIONAL
- - EMPLOYEE
- EntitlementFinalPayPayoutType:
+ - SGC
+ - SALARYSACRIFICE
+ - EMPLOYERADDITIONAL
+ - EMPLOYEE
+ EntitlementFinalPayPayoutType:
type: string
enum:
- - NOTPAIDOUT
- - PAIDOUT
- PayRunStatus:
+ - NOTPAIDOUT
+ - PAIDOUT
+ PayRunStatus:
type: string
enum:
- - DRAFT
- - POSTED
- ManualTaxType:
+ - DRAFT
+ - POSTED
+ ManualTaxType:
type: string
enum:
- - PAYGMANUAL
- - ETPOMANUAL
- - ETPRMANUAL
- - SCHEDULE5MANUAL
- - SCHEDULE5STSLMANUAL
- - SCHEDULE4MANUAL
- SuperFundType:
+ - PAYGMANUAL
+ - ETPOMANUAL
+ - ETPRMANUAL
+ - SCHEDULE5MANUAL
+ - SCHEDULE5STSLMANUAL
+ - SCHEDULE4MANUAL
+ SuperFundType:
type: string
enum:
- - REGULATED
- - SMSF
- EmploymentType:
+ - REGULATED
+ - SMSF
+ EmploymentType:
type: string
enum:
- - EMPLOYEE
- - CONTRACTOR
+ - EMPLOYEE
+ - CONTRACTOR
CountryOfResidence:
description: Country of residence as a valid ISO 3166-1 alpha-2 country code e.g. "AU", "NZ", "CA". Only applicable, and mandatory if income type is WORKINGHOLIDAYMAKER.
type: string
- example: "AU"
+ example: AU
enum:
- - AF
- - AX
- - AL
- - DZ
- - AS
- - AD
- - AO
- - AI
- - AQ
- - AG
- - AR
- - AM
- - AW
- - AU
- - AT
- - AZ
- - BS
- - BH
- - BD
- - BB
- - BY
- - BE
- - BZ
- - BJ
- - BM
- - BT
- - BO
- - BA
- - BW
- - BV
- - BR
- - IO
- - BN
- - BG
- - BF
- - BI
- - KH
- - CM
- - CA
- - CV
- - KY
- - CF
- - TD
- - CL
- - CN
- - CX
- - CC
- - CO
- - KM
- - CG
- - CD
- - CK
- - CR
- - CI
- - HR
- - CU
- - CY
- - CZ
- - DK
- - DJ
- - DM
- - DO
- - EC
- - EG
- - SV
- - GQ
- - ER
- - EE
- - ET
- - FK
- - FO
- - FJ
- - FI
- - FR
- - GF
- - PF
- - TF
- - GA
- - GM
- - GE
- - DE
- - GH
- - GI
- - GR
- - GL
- - GD
- - GP
- - GU
- - GT
- - GG
- - GN
- - GW
- - GY
- - HT
- - HM
- - VA
- - HN
- - HK
- - HU
- - IS
- - IN
- - ID
- - IR
- - IQ
- - IE
- - IM
- - IL
- - IT
- - JM
- - JP
- - JE
- - JO
- - KZ
- - KE
- - KI
- - KP
- - KR
- - KW
- - KG
- - LA
- - LV
- - LB
- - LS
- - LR
- - LY
- - LI
- - LT
- - LU
- - MO
- - MK
- - MG
- - MW
- - MY
- - MV
- - ML
- - MT
- - MH
- - MQ
- - MR
- - MU
- - YT
- - MX
- - FM
- - MD
- - MC
- - MN
- - ME
- - MS
- - MA
- - MZ
- - MM
- - NA
- - NR
- - NP
- - NL
- - AN
- - NC
- - NZ
- - NI
- - NE
- - NG
- - NU
- - NF
- - MP
- - "NO"
- - OM
- - PK
- - PW
- - PS
- - PA
- - PG
- - PY
- - PE
- - PH
- - PN
- - PL
- - PT
- - PR
- - QA
- - RE
- - RO
- - RU
- - RW
- - BL
- - SH
- - KN
- - LC
- - MF
- - PM
- - VC
- - WS
- - SM
- - ST
- - SA
- - SN
- - RS
- - SC
- - SL
- - SG
- - SK
- - SI
- - SB
- - SO
- - ZA
- - GS
- - ES
- - LK
- - SD
- - SR
- - SJ
- - SZ
- - SE
- - CH
- - SY
- - TW
- - TJ
- - TZ
- - TH
- - TL
- - TG
- - TK
- - TO
- - TT
- - TN
- - TR
- - TM
- - TC
- - TV
- - UG
- - UA
- - AE
- - GB
- - US
- - UM
- - UY
- - UZ
- - VU
- - VE
- - VN
- - VG
- - VI
- - WF
- - EH
- - YE
- - ZM
- - ZW
- - BQ
- - CW
- - SX
- - SS
- IncomeType:
+ - AF
+ - AX
+ - AL
+ - DZ
+ - AS
+ - AD
+ - AO
+ - AI
+ - AQ
+ - AG
+ - AR
+ - AM
+ - AW
+ - AU
+ - AT
+ - AZ
+ - BS
+ - BH
+ - BD
+ - BB
+ - BY
+ - BE
+ - BZ
+ - BJ
+ - BM
+ - BT
+ - BO
+ - BA
+ - BW
+ - BV
+ - BR
+ - IO
+ - BN
+ - BG
+ - BF
+ - BI
+ - KH
+ - CM
+ - CA
+ - CV
+ - KY
+ - CF
+ - TD
+ - CL
+ - CN
+ - CX
+ - CC
+ - CO
+ - KM
+ - CG
+ - CD
+ - CK
+ - CR
+ - CI
+ - HR
+ - CU
+ - CY
+ - CZ
+ - DK
+ - DJ
+ - DM
+ - DO
+ - EC
+ - EG
+ - SV
+ - GQ
+ - ER
+ - EE
+ - ET
+ - FK
+ - FO
+ - FJ
+ - FI
+ - FR
+ - GF
+ - PF
+ - TF
+ - GA
+ - GM
+ - GE
+ - DE
+ - GH
+ - GI
+ - GR
+ - GL
+ - GD
+ - GP
+ - GU
+ - GT
+ - GG
+ - GN
+ - GW
+ - GY
+ - HT
+ - HM
+ - VA
+ - HN
+ - HK
+ - HU
+ - IS
+ - IN
+ - ID
+ - IR
+ - IQ
+ - IE
+ - IM
+ - IL
+ - IT
+ - JM
+ - JP
+ - JE
+ - JO
+ - KZ
+ - KE
+ - KI
+ - KP
+ - KR
+ - KW
+ - KG
+ - LA
+ - LV
+ - LB
+ - LS
+ - LR
+ - LY
+ - LI
+ - LT
+ - LU
+ - MO
+ - MK
+ - MG
+ - MW
+ - MY
+ - MV
+ - ML
+ - MT
+ - MH
+ - MQ
+ - MR
+ - MU
+ - YT
+ - MX
+ - FM
+ - MD
+ - MC
+ - MN
+ - ME
+ - MS
+ - MA
+ - MZ
+ - MM
+ - NA
+ - NR
+ - NP
+ - NL
+ - AN
+ - NC
+ - NZ
+ - NI
+ - NE
+ - NG
+ - NU
+ - NF
+ - MP
+ - "NO"
+ - OM
+ - PK
+ - PW
+ - PS
+ - PA
+ - PG
+ - PY
+ - PE
+ - PH
+ - PN
+ - PL
+ - PT
+ - PR
+ - QA
+ - RE
+ - RO
+ - RU
+ - RW
+ - BL
+ - SH
+ - KN
+ - LC
+ - MF
+ - PM
+ - VC
+ - WS
+ - SM
+ - ST
+ - SA
+ - SN
+ - RS
+ - SC
+ - SL
+ - SG
+ - SK
+ - SI
+ - SB
+ - SO
+ - ZA
+ - GS
+ - ES
+ - LK
+ - SD
+ - SR
+ - SJ
+ - SZ
+ - SE
+ - CH
+ - SY
+ - TW
+ - TJ
+ - TZ
+ - TH
+ - TL
+ - TG
+ - TK
+ - TO
+ - TT
+ - TN
+ - TR
+ - TM
+ - TC
+ - TV
+ - UG
+ - UA
+ - AE
+ - GB
+ - US
+ - UM
+ - UY
+ - UZ
+ - VU
+ - VE
+ - VN
+ - VG
+ - VI
+ - WF
+ - EH
+ - YE
+ - ZM
+ - ZW
+ - BQ
+ - CW
+ - SX
+ - SS
+ IncomeType:
type: string
enum:
- - SALARYANDWAGES
- - WORKINGHOLIDAYMAKER
- - NONEMPLOYEE
- - CLOSELYHELDPAYEES
- - LABOURHIRE
- TaxScaleType:
+ - SALARYANDWAGES
+ - WORKINGHOLIDAYMAKER
+ - NONEMPLOYEE
+ - CLOSELYHELDPAYEES
+ - LABOURHIRE
+ TaxScaleType:
type: string
enum:
- - REGULAR
- - ACTORSARTISTSENTERTAINERS
- - HORTICULTURISTORSHEARER
- - SENIORORPENSIONER
- - WORKINGHOLIDAYMAKER
- - FOREIGN
- WorkCondition:
+ - REGULAR
+ - ACTORSARTISTSENTERTAINERS
+ - HORTICULTURISTORSHEARER
+ - SENIORORPENSIONER
+ - WORKINGHOLIDAYMAKER
+ - FOREIGN
+ WorkCondition:
type: string
enum:
- - PROMOTIONAL
- - THREELESSPERFORMANCESPERWEEK
- - NONE
- SeniorMaritalStatus:
+ - PROMOTIONAL
+ - THREELESSPERFORMANCESPERWEEK
+ - NONE
+ SeniorMaritalStatus:
type: string
enum:
- - MEMBEROFCOUPLE
- - MEMBEROFILLNESSSEPARATEDCOUPLE
- - SINGLE
- EmploymentBasis:
+ - MEMBEROFCOUPLE
+ - MEMBEROFILLNESSSEPARATEDCOUPLE
+ - SINGLE
+ EmploymentBasis:
type: string
enum:
- - FULLTIME
- - PARTTIME
- - CASUAL
- - LABOURHIRE
- - SUPERINCOMESTREAM # Usage is deprecated.
- - NONEMPLOYEE
- TFNExemptionType:
+ - FULLTIME
+ - PARTTIME
+ - CASUAL
+ - LABOURHIRE
+ - SUPERINCOMESTREAM # Usage is deprecated.
+ - NONEMPLOYEE
+ TFNExemptionType:
type: string
enum:
- - NOTQUOTED
- - PENDING
- - PENSIONER
- - UNDER18
- ResidencyStatus:
+ - NOTQUOTED
+ - PENDING
+ - PENSIONER
+ - UNDER18
+ ResidencyStatus:
type: string
enum:
- - AUSTRALIANRESIDENT
- - FOREIGNRESIDENT
- - WORKINGHOLIDAYMAKER # Usage is deprecated.
- TimesheetStatus:
+ - AUSTRALIANRESIDENT
+ - FOREIGNRESIDENT
+ - WORKINGHOLIDAYMAKER # Usage is deprecated.
+ TimesheetStatus:
type: string
enum:
- - DRAFT
- - PROCESSED
- - APPROVED
- - REJECTED
- - REQUESTED
+ - DRAFT
+ - PROCESSED
+ - APPROVED
+ - REJECTED
+ - REQUESTED
EmployeeStatus:
type: string
description: Employee Status Types
enum:
- - ACTIVE #Employee with no Termination Date.
- - TERMINATED #Employee with a Termination Date.
+ - ACTIVE #Employee with no Termination Date.
+ - TERMINATED #Employee with a Termination Date.
State:
type: string
description: State abbreviation for employee home address
example: VIC
enum:
- - ACT
- - NSW
- - NT
- - QLD
- - SA
- - TAS
- - VIC
- - WA
+ - ACT
+ - NSW
+ - NT
+ - QLD
+ - SA
+ - TAS
+ - VIC
+ - WA
SuperMembership:
type: object
required:
@@ -5778,7 +5362,7 @@ components:
type: string
format: uuid
example: 4333d5cd-53a5-4c31-98e5-a8b4e5676b0b
- SuperFundID :
+ SuperFundID:
description: Xero identifier for super fund
type: string
format: uuid
@@ -5794,9 +5378,9 @@ components:
- BANK
- CURRENT
- CURRLIAB
- - DEPRECIATN
+ - DEPRECIATN
- DIRECTCOSTS
- - EQUITY
+ - EQUITY
- EXPENSE
- FIXED
- INVENTORY
@@ -5818,8 +5402,8 @@ components:
description: The object returned for a bad request
type: object
properties:
- ErrorNumber:
- description: The error number
+ ErrorNumber:
+ description: The error number
type: number
format: integer
example: 16
@@ -5827,15 +5411,15 @@ components:
description: The type of error
type: string
example: QueryParseException
- Message:
+ Message:
description: The message describing the error
type: string
example: No property or field 'hi' exists in type 'Employee' (at index 0)
ValidationError:
externalDocs:
- url: 'https://developer.xero.com/documentation/api/http-response-codes'
+ url: https://developer.xero.com/documentation/api/http-response-codes
properties:
Message:
description: Validation error message
type: string
- type: object
\ No newline at end of file
+ type: object
diff --git a/xero-payroll-nz.yaml b/xero-payroll-nz.yaml
index 6a25dc2a..383ef399 100644
--- a/xero-payroll-nz.yaml
+++ b/xero-payroll-nz.yaml
@@ -1,13 +1,13 @@
openapi: 3.0.0
info:
- version: "6.3.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/"
+ version: 6.3.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/
contact:
- name: "Xero Platform Team"
- email: "api@xero.com"
- url: "https://developer.xero.com"
+ name: Xero Platform Team
+ email: api@xero.com
+ url: https://developer.xero.com
tags:
- name: PayrollNz
servers:
@@ -17,9 +17,11 @@ paths:
/Employees:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollNz
operationId: getEmployees
@@ -39,84 +41,76 @@ paths:
type: integer
example: 5
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Employees'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-24T20:16:14.6198711",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 8
- },
- "problem": null,
- "employees": [
- {
- "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995",
- "firstName": "Casual",
- "lastName": "Worker",
- "dateOfBirth": "1990-12-01T00:00:00",
- "gender": "M",
- "email": null,
- "phoneNumber": null,
- "startDate": "2019-02-07T00:00:00",
- "address": {
- "addressLine1": "30 King ST",
- "addressLine2": null,
- "city": "Rangiora",
- "suburb": null,
- "countryName": "NEW ZEALAND",
- "postCode": "7400"
- },
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "updatedDateUTC": "2019-09-24T05:08:45",
- "createdDateUTC": "2019-09-22T23:58:23",
- "endDate": null,
- "engagementType": "Casual",
- "fixedTermEndDate": null
- },
- {
- "employeeID": "1c4f0c92-03ad-43f2-a690-ee51397ece6a",
- "firstName": "GST",
- "lastName": "Contractor",
- "dateOfBirth": null,
- "gender": null,
- "email": null,
- "phoneNumber": null,
- "startDate": "2019-01-30T00:00:00",
- "address": {
- "addressLine1": null,
- "addressLine2": null,
- "city": null,
- "suburb": null,
- "countryName": null,
- "postCode": null
- },
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "updatedDateUTC": "2019-09-23T00:16:25",
- "createdDateUTC": "2019-09-23T00:12:16",
- "endDate": null,
- "engagementType": null,
- "fixedTermEndDate": null
- }
- ]
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-24T20:16:14.6198711
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 8
+ problem: null
+ employees:
+ - employeeID: 68342973-c405-4b86-b5d3-d7b877c27995
+ firstName: Casual
+ lastName: Worker
+ dateOfBirth: 1990-12-01T00:00:00
+ gender: M
+ email: null
+ phoneNumber: null
+ startDate: 2019-02-07T00:00:00
+ address:
+ addressLine1: 30 King ST
+ addressLine2: null
+ city: Rangiora
+ suburb: null
+ countryName: NEW ZEALAND
+ postCode: "7400"
+ payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ updatedDateUTC: 2019-09-24T05:08:45
+ createdDateUTC: 2019-09-22T23:58:23
+ endDate: null
+ engagementType: Casual
+ fixedTermEndDate: null
+ - employeeID: 1c4f0c92-03ad-43f2-a690-ee51397ece6a
+ firstName: GST
+ lastName: Contractor
+ dateOfBirth: null
+ gender: null
+ email: null
+ phoneNumber: null
+ startDate: 2019-01-30T00:00:00
+ address:
+ addressLine1: null
+ addressLine2: null
+ city: null
+ suburb: null
+ countryName: null
+ postCode: null
+ payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ updatedDateUTC: 2019-09-23T00:16:25
+ createdDateUTC: 2019-09-23T00:12:16
+ endDate: null
+ engagementType: null
+ fixedTermEndDate: null
+ "400":
description: validation error for a bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Problem'
- post:
+ post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: createEmployee
@@ -130,18 +124,18 @@ paths:
object: employee
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2000, Month.OCTOBER, 28)"
- java: "LocalDate.of(2000, Month.OCTOBER, 28)"
- csharp: "new DateTime(2000, 10, 10)"
- php: "new DateTime('2000-10-28')"
- node: "'2000-10-28'"
- python: "dateutil.parser.parse('2000-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2000, Month.OCTOBER, 28)
+ java: LocalDate.of(2000, Month.OCTOBER, 28)
+ csharp: new DateTime(2000, 10, 10)
+ php: new DateTime('2000-10-28')
+ node: '''2000-10-28'''
+ python: dateutil.parser.parse('2000-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- Address:
key: address
keyPascal: Address
keySnake: address
- is_object: true
+ is_object: true
- addressLine1:
key: addressLine1
keyPascal: AddressLine1
@@ -170,18 +164,18 @@ paths:
- employee:
key: employee
keyPascal: Employee
- is_object: true
+ is_object: true
- firstName:
key: firstName
keyPascal: FirstName
- keySnake: first_name
- default: "Adam"
+ keySnake: first_name
+ default: Adam
object: employee
- lastName:
key: lastName
keyPascal: LastName
keySnake: last_name
- default: "Adamson"
+ default: Adamson
object: employee
- dateOfBirth:
is_variable: true
@@ -202,50 +196,47 @@ paths:
default: address
python: address
ruby: address
- object: employee
+ object: employee
summary: Creates an employees
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-24T20:27:22.5779577",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "employee": {
- "employeeID": "658be485-3feb-402e-9e77-ac17623aad42",
- "firstName": "Mike",
- "lastName": "Johntzxzpxhmkgson",
- "dateOfBirth": "2000-01-01T00:00:00",
- "gender": "M",
- "email": "83139@starkindustries.com",
- "phoneNumber": null,
- "startDate": null,
- "address": {
- "addressLine1": "101 Green St",
- "addressLine2": null,
- "city": "San Francisco",
- "suburb": null,
- "countryName": null,
- "postCode": "4351"
- },
- "payrollCalendarID": null,
- "updatedDateUTC": "2020-08-24T20:27:22",
- "createdDateUTC": "2020-08-24T20:27:22",
- "endDate": null,
- "engagementType": null,
- "fixedTermEndDate": null
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-24T20:27:22.5779577
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ employee:
+ employeeID: 658be485-3feb-402e-9e77-ac17623aad42
+ firstName: Mike
+ lastName: Johntzxzpxhmkgson
+ dateOfBirth: 2000-01-01T00:00:00
+ gender: M
+ email: 83139@starkindustries.com
+ phoneNumber: null
+ startDate: null
+ address:
+ addressLine1: 101 Green St
+ addressLine2: null
+ city: San Francisco
+ suburb: null
+ countryName: null
+ postCode: "4351"
+ payrollCalendarID: null
+ updatedDateUTC: 2020-08-24T20:27:22
+ createdDateUTC: 2020-08-24T20:27:22
+ endDate: null
+ engagementType: null
+ fixedTermEndDate: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -257,26 +248,26 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Employee'
- example: {
- "title": "Mr",
- "firstName": "Mike",
- "lastName": "Johntzxzpxhmkgson",
- "dateOfBirth": "2000-01-01",
- "address": {
- "addressLine1": "101 Green St",
- "city": "San Francisco",
- "postCode": "4351",
- "countryName": "United Kingdom"
- },
- "email": "83139@starkindustries.com",
- "gender": "M"
- }
+ example:
+ title: Mr
+ firstName: Mike
+ lastName: Johntzxzpxhmkgson
+ dateOfBirth: "2000-01-01"
+ address:
+ addressLine1: 101 Green St
+ city: San Francisco
+ postCode: "4351"
+ countryName: United Kingdom
+ email: 83139@starkindustries.com
+ gender: M
/Employees/{EmployeeID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollNz
operationId: getEmployee
@@ -288,52 +279,50 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-24T20:16:15.3542191",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "employee": {
- "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995",
- "firstName": "Casual",
- "lastName": "Worker",
- "dateOfBirth": "1990-12-01T00:00:00",
- "gender": "M",
- "email": null,
- "phoneNumber": null,
- "startDate": "2019-02-07T00:00:00",
- "address": {
- "addressLine1": "30 King ST",
- "addressLine2": null,
- "city": "Rangiora",
- "suburb": null,
- "countryName": "NEW ZEALAND",
- "postCode": "7400"
- },
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "updatedDateUTC": "2019-09-24T05:08:45",
- "createdDateUTC": "2019-09-22T23:58:23",
- "endDate": null,
- "engagementType": "FixedTerm",
- "fixedTermEndDate": "2026-01-01T00:00:00"
- }
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-24T20:16:15.3542191
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ employee:
+ employeeID: 68342973-c405-4b86-b5d3-d7b877c27995
+ firstName: Casual
+ lastName: Worker
+ dateOfBirth: 1990-12-01T00:00:00
+ gender: M
+ email: null
+ phoneNumber: null
+ startDate: 2019-02-07T00:00:00
+ address:
+ addressLine1: 30 King ST
+ addressLine2: null
+ city: Rangiora
+ suburb: null
+ countryName: NEW ZEALAND
+ postCode: "7400"
+ payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ updatedDateUTC: 2019-09-24T05:08:45
+ createdDateUTC: 2019-09-22T23:58:23
+ endDate: null
+ engagementType: FixedTerm
+ fixedTermEndDate: 2026-01-01T00:00:00
put:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: updateEmployee
@@ -347,18 +336,18 @@ paths:
object: employee
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2000, Month.OCTOBER, 28)"
- java: "LocalDate.of(2000, Month.OCTOBER, 28)"
- csharp: "new DateTime(2000, 10, 10)"
- php: "new DateTime('2000-10-28')"
- node: "'2000-10-28'"
- python: "dateutil.parser.parse('2000-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2000, Month.OCTOBER, 28)
+ java: LocalDate.of(2000, Month.OCTOBER, 28)
+ csharp: new DateTime(2000, 10, 10)
+ php: new DateTime('2000-10-28')
+ node: '''2000-10-28'''
+ python: dateutil.parser.parse('2000-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- Address:
key: address
keyPascal: Address
keySnake: address
- is_object: true
+ is_object: true
- addressLine1:
key: addressLine1
keyPascal: AddressLine1
@@ -387,18 +376,18 @@ paths:
- employee:
key: employee
keyPascal: Employee
- is_object: true
+ is_object: true
- firstName:
key: firstName
keyPascal: FirstName
- keySnake: first_name
- default: "Adam"
+ keySnake: first_name
+ default: Adam
object: employee
- lastName:
key: lastName
keyPascal: LastName
keySnake: last_name
- default: "Adamson"
+ default: Adamson
object: employee
- dateOfBirth:
is_variable: true
@@ -419,7 +408,7 @@ paths:
default: address
python: address
ruby: address
- object: employee
+ object: employee
summary: Updates an existing employee
parameters:
- $ref: '#/components/parameters/idempotencyKey'
@@ -428,50 +417,47 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: successful response
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-24T20:29:43.3452832",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "employee": {
- "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995",
- "firstName": "Tony",
- "lastName": "Starkgtrzgquusrson",
- "dateOfBirth": "1999-01-01T00:00:00",
- "gender": "M",
- "email": "58315@starkindustries.com",
- "phoneNumber": null,
- "startDate": "2019-02-07T00:00:00",
- "address": {
- "addressLine1": "101 Green St",
- "addressLine2": null,
- "city": "San Francisco",
- "suburb": null,
- "countryName": null,
- "postCode": "4432"
- },
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "updatedDateUTC": "2020-08-24T20:29:43",
- "createdDateUTC": "2019-09-22T23:58:23",
- "endDate": null,
- "engagementType": null,
- "fixedTermEndDate": null
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-24T20:29:43.3452832
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ employee:
+ employeeID: 68342973-c405-4b86-b5d3-d7b877c27995
+ firstName: Tony
+ lastName: Starkgtrzgquusrson
+ dateOfBirth: 1999-01-01T00:00:00
+ gender: M
+ email: 58315@starkindustries.com
+ phoneNumber: null
+ startDate: 2019-02-07T00:00:00
+ address:
+ addressLine1: 101 Green St
+ addressLine2: null
+ city: San Francisco
+ suburb: null
+ countryName: null
+ postCode: "4432"
+ payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ updatedDateUTC: 2020-08-24T20:29:43
+ createdDateUTC: 2019-09-22T23:58:23
+ endDate: null
+ engagementType: null
+ fixedTermEndDate: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -483,26 +469,25 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Employee'
- example: {
- "title": "Mr",
- "firstName": "Tony",
- "lastName": "Starkgtrzgquusrson",
- "dateOfBirth": "1999-01-01",
- "address": {
- "addressLine1": "101 Green St",
- "city": "San Francisco",
- "postCode": "4432",
- "countryName": "United Kingdom"
- },
- "email": "58315@starkindustries.com",
- "gender": "M"
- }
+ example:
+ title: Mr
+ firstName: Tony
+ lastName: Starkgtrzgquusrson
+ dateOfBirth: "1999-01-01"
+ address:
+ addressLine1: 101 Green St
+ city: San Francisco
+ postCode: "4432"
+ countryName: United Kingdom
+ email: 58315@starkindustries.com
+ gender: M
/Employees/{EmployeeID}/Employment:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- post:
+ post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: createEmployment
@@ -515,13 +500,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- employment:
key: employment
keyPascal: Employment
@@ -532,7 +517,7 @@ paths:
keyPascal: PayrollCalendarID
keySnake: payroll_calendar_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: employment
- startDate:
is_variable: true
@@ -557,7 +542,7 @@ paths:
keyPascal: FixedTermEndDate
keySnake: fixed_term_end_date
object: employment
- is_last: true
+ is_last: true
summary: Creates an employment detail for a specific employee
parameters:
- $ref: '#/components/parameters/idempotencyKey'
@@ -566,32 +551,30 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmploymentObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-24T20:53:58.8624623",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "employment": {
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "startDate": "2020-09-02T00:00:00",
- "engagementType": "FixedTerm",
- "fixedTermEndDate": "2026-01-01T00:00:00"
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-24T20:53:58.8624623
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ employment:
+ payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ startDate: 2020-09-02T00:00:00
+ engagementType: FixedTerm
+ fixedTermEndDate: 2026-01-01T00:00:00
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -603,69 +586,69 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Employment'
- example: {
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "startDate": "2020-09-02",
- "engagementType": "FixedTerm",
- "fixedTermEndDate": "2026-01-01"
- }
+ example:
+ payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ startDate: "2020-09-02"
+ engagementType: FixedTerm
+ fixedTermEndDate: "2026-01-01"
/Employees/{EmployeeID}/Tax:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollNz
operationId: getEmployeeTax
x-hasPayrollUkProblem: true
- summary: Retrieves tax records for a specific employee
+ summary: Retrieves tax records for a specific employee
parameters:
- name: EmployeeID
x-snake: employee_id
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeTaxObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-24T20:57:27.5434491",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "employeeTax": {
- "irdNumber": "111111111",
- "taxCode": "M",
- "esctRatePercentage": 17.5,
- "isEligibleForKiwiSaver": true,
- "hasSpecialStudentLoanRate": false,
- "specialStudentLoanRatePercentage": null,
- "specialTaxRatePercentage": null,
- "kiwiSaverContributions": "MakeContributions",
- "kiwiSaverOptOutDate": null,
- "kiwiSaverContributionHolidayEndDate": null,
- "kiwiSaverEmployeeContributionRatePercentage": 3,
- "kiwiSaverEmployerContributionRatePercentage": 3,
- "kiwiSaverEmployerSalarySacrificeContributionRatePercentage": 0,
- "hasStudentLoanBalance": false,
- "studentLoanBalance": null,
- "studentLoanAsAt": null
- }
- }
- post:
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-24T20:57:27.5434491
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ employeeTax:
+ irdNumber: "111111111"
+ taxCode: M
+ esctRatePercentage: 17.5
+ isEligibleForKiwiSaver: true
+ hasSpecialStudentLoanRate: false
+ specialStudentLoanRatePercentage: null
+ specialTaxRatePercentage: null
+ kiwiSaverContributions: MakeContributions
+ kiwiSaverOptOutDate: null
+ kiwiSaverContributionHolidayEndDate: null
+ kiwiSaverEmployeeContributionRatePercentage: 3
+ kiwiSaverEmployerContributionRatePercentage: 3
+ kiwiSaverEmployerSalarySacrificeContributionRatePercentage: 0
+ hasStudentLoanBalance: false
+ studentLoanBalance: null
+ studentLoanAsAt: null
+ post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: updateEmployeeTax
@@ -678,13 +661,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- employeeTax:
key: employeeTax
keyPascal: EmployeeTax
@@ -700,37 +683,37 @@ paths:
key: hasSpecialStudentLoanRate
keyPascal: HasSpecialStudentLoanRate
keySnake: has_special_student_loan_rate
- nonString: true
- default: true
+ nonString: true
+ default: true
object: employeeTax
- specialStudentLoanRatePercentage:
key: specialStudentLoanRatePercentage
keyPascal: SpecialStudentLoanRatePercentage
keySnake: special_student_loan_rate_percentage
- nonString: true
+ nonString: true
default: 2
object: employeeTax
- isEligibleForKiwiSaver:
key: isEligibleForKiwiSaver
keyPascal: IsEligibleForKiwiSaver
keySnake: is_eligible_for_kiwi_saver
- nonString: true
- default: true
+ nonString: true
+ default: true
object: employeeTax
- esctRatePercentage:
key: esctRatePercentage
keyPascal: EsctRatePercentage
keySnake: esct_rate_percentage
default: 17.5
- nonString: true
+ nonString: true
is_money: true
object: employeeTax
- kiwiSaverContributions:
key: kiwiSaverContributions
keyPascal: KiwiSaverContributions
keySnake: kiwi_saver_contributions
- nonString: true
- default: "DeductionCategory.NzOther"
+ nonString: true
+ default: DeductionCategory.NzOther
php: XeroAPI\XeroPHP\Models\PayrollNz\EmployeeTax\KiwiSaverContributionsEnum.MakeContributions
node: EmployeeTax.KiwiSaverContributionsEnum.MakeContributions
ruby: XeroRuby::PayrollNz::EmployeeTax::kiwi_saver_contributions_enum::MAKECONTRIBUTIONS
@@ -744,20 +727,20 @@ paths:
keySnake: kiwi_saver_employee_contribution_rate_percentage
default: 4
is_money: true
- nonString: true
+ nonString: true
object: employeeTax
- kiwiSaverEmployerSalarySacrificeContributionRatePercentage:
key: kiwiSaverEmployerSalarySacrificeContributionRatePercentage
keyPascal: KiwiSaverEmployerSalarySacrificeContributionRatePercentage
keySnake: kiwi_saver_employer_salary_sacrifice_contribution_rate_percentage
default: 2
- nonString: true
+ nonString: true
object: employeeTax
- taxCode:
key: taxCode
keyPascal: TaxCode
keySnake: tax_code
- nonString: true
+ nonString: true
default: TaxCode.MSL
php: XeroAPI\XeroPHP\Models\PayrollNz\TaxCode\MSL
node: TaxCode.MSL
@@ -770,15 +753,15 @@ paths:
key: hasStudentLoanBalance
keyPascal: HasStudentLoanBalance
keySnake: has_student_loan_balance
- nonString: true
- default: true
+ nonString: true
+ default: true
object: employeeTax
- studentLoanBalance:
key: studentLoanBalance
keyPascal: StudentLoanBalance
keySnake: student_loan_balance
default: 30.0000
- nonString: true
+ nonString: true
is_money: true
object: employeeTax
- studentLoanAsAt:
@@ -792,7 +775,7 @@ paths:
ruby: student_loan_as_at
object: employeeTax
is_last: true
- summary: Updates the tax records for a specific employee
+ summary: Updates the tax records for a specific employee
parameters:
- $ref: '#/components/parameters/idempotencyKey'
- name: EmployeeID
@@ -800,73 +783,72 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeTaxObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-24T20:57:27.5434491",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "employeeTax": {
- "irdNumber": "111111111",
- "taxCode": "M",
- "esctRatePercentage": 17.5,
- "isEligibleForKiwiSaver": true,
- "hasSpecialStudentLoanRate": false,
- "specialStudentLoanRatePercentage": null,
- "specialTaxRatePercentage": null,
- "kiwiSaverContributions": "MakeContributions",
- "kiwiSaverOptOutDate": null,
- "kiwiSaverContributionHolidayEndDate": null,
- "kiwiSaverEmployeeContributionRatePercentage": 3,
- "kiwiSaverEmployerContributionRatePercentage": 3,
- "kiwiSaverEmployerSalarySacrificeContributionRatePercentage": 0,
- "hasStudentLoanBalance": false,
- "studentLoanBalance": null,
- "studentLoanAsAt": null
- }
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-24T20:57:27.5434491
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ employeeTax:
+ irdNumber: "111111111"
+ taxCode: M
+ esctRatePercentage: 17.5
+ isEligibleForKiwiSaver: true
+ hasSpecialStudentLoanRate: false
+ specialStudentLoanRatePercentage: null
+ specialTaxRatePercentage: null
+ kiwiSaverContributions: MakeContributions
+ kiwiSaverOptOutDate: null
+ kiwiSaverContributionHolidayEndDate: null
+ kiwiSaverEmployeeContributionRatePercentage: 3
+ kiwiSaverEmployerContributionRatePercentage: 3
+ kiwiSaverEmployerSalarySacrificeContributionRatePercentage: 0
+ hasStudentLoanBalance: false
+ studentLoanBalance: null
+ studentLoanAsAt: null
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeTax'
- example: {
- "irdNumber": "111111111",
- "taxCode": "M",
- "esctRatePercentage": 17.5,
- "isEligibleForKiwiSaver": true,
- "hasSpecialStudentLoanRate": false,
- "specialStudentLoanRatePercentage": null,
- "specialTaxRatePercentage": null,
- "kiwiSaverContributions": "MakeContributions",
- "kiwiSaverOptOutDate": null,
- "kiwiSaverContributionHolidayEndDate": null,
- "kiwiSaverEmployeeContributionRatePercentage": 3,
- "kiwiSaverEmployerContributionRatePercentage": 3,
- "kiwiSaverEmployerSalarySacrificeContributionRatePercentage": 0,
- "hasStudentLoanBalance": false,
- "studentLoanBalance": null,
- "studentLoanAsAt": null
- }
+ example:
+ irdNumber: "111111111"
+ taxCode: M
+ esctRatePercentage: 17.5
+ isEligibleForKiwiSaver: true
+ hasSpecialStudentLoanRate: false
+ specialStudentLoanRatePercentage: null
+ specialTaxRatePercentage: null
+ kiwiSaverContributions: MakeContributions
+ kiwiSaverOptOutDate: null
+ kiwiSaverContributionHolidayEndDate: null
+ kiwiSaverEmployeeContributionRatePercentage: 3
+ kiwiSaverEmployerContributionRatePercentage: 3
+ kiwiSaverEmployerSalarySacrificeContributionRatePercentage: 0
+ hasStudentLoanBalance: false
+ studentLoanBalance: null
+ studentLoanAsAt: null
/Employees/{EmployeeID}/OpeningBalances:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollNz
operationId: getEmployeeOpeningBalances
@@ -878,41 +860,37 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeOpeningBalancesObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T20:00:07.7343966",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 8
- },
- "problem": null,
- "openingBalances": [
- {
- "periodEndDate": "2020-10-01T00:00:00",
- "daysPaid": 3,
- "unpaidWeeks": 2,
- "grossEarnings": 40
- }
- ]
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T20:00:07.7343966
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 8
+ problem: null
+ openingBalances:
+ - periodEndDate: 2020-10-01T00:00:00
+ daysPaid: 3
+ unpaidWeeks: 2
+ grossEarnings: 40
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: createEmployeeOpeningBalances
@@ -926,13 +904,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- employeeOpeningBalance:
key: employeeOpeningBalance
keyPascal: EmployeeOpeningBalance
@@ -953,14 +931,14 @@ paths:
keyPascal: DaysPaid
keySnake: days_paid
default: 5
- nonString: true
+ nonString: true
object: employeeOpeningBalance
- unpaidWeeks:
key: unpaidWeeks
keyPascal: UnpaidWeeks
keySnake: unpaid_weeks
default: 0
- nonString: true
+ nonString: true
object: employeeOpeningBalance
- grossEarnings:
key: grossEarnings
@@ -968,7 +946,7 @@ paths:
keySnake: gross_earnings
default: 1730.77
is_money: true
- nonString: true
+ nonString: true
object: employeeOpeningBalance
is_last: true
- employeeOpeningBalances:
@@ -996,34 +974,30 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeOpeningBalancesObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T19:55:36.539949",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "openingBalances": [
- {
- "periodEndDate": "2020-10-01T00:00:00",
- "daysPaid": 3,
- "unpaidWeeks": 2,
- "grossEarnings": 40
- }
- ]
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T19:55:36.539949
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ openingBalances:
+ - periodEndDate: 2020-10-01T00:00:00
+ daysPaid: 3
+ unpaidWeeks: 2
+ grossEarnings: 40
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -1039,9 +1013,11 @@ paths:
/Employees/{EmployeeID}/Leave:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollNz
operationId: getEmployeeLeaves
@@ -1053,49 +1029,43 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaves'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-26T16:57:18.4657329",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leave": [
- {
- "leaveID": "e311d45f-122e-4fbf-b068-4e3f92dd2729",
- "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6",
- "description": "Holiday Pay Payout",
- "startDate": "2019-07-01T00:00:00",
- "endDate": "2019-07-07T00:00:00",
- "periods": [
- {
- "periodStartDate": "2019-07-01T00:00:00",
- "periodEndDate": "2019-07-07T00:00:00",
- "numberOfUnits": 36,
- "periodStatus": "Completed",
- "typeOfUnits": "Hours",
- "numberOfUnitsTaken": 1,
- "typeOfUnitsTaken": "Weeks"
- }
- ],
- "updatedDateUTC": "2019-09-24T05:08:44"
- }
- ]
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-26T16:57:18.4657329
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leave:
+ - leaveID: e311d45f-122e-4fbf-b068-4e3f92dd2729
+ leaveTypeID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6
+ description: Holiday Pay Payout
+ startDate: 2019-07-01T00:00:00
+ endDate: 2019-07-07T00:00:00
+ periods:
+ - periodStartDate: 2019-07-01T00:00:00
+ periodEndDate: 2019-07-07T00:00:00
+ numberOfUnits: 36
+ periodStatus: Completed
+ typeOfUnits: Hours
+ numberOfUnitsTaken: 1
+ typeOfUnitsTaken: Weeks
+ updatedDateUTC: 2019-09-24T05:08:44
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: createEmployeeLeave
@@ -1108,13 +1078,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- endDateValue:
key: endDate
keyPascal: EndDate
@@ -1122,13 +1092,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- employeeLeave:
key: employeeLeave
keyPascal: EmployeeLeave
@@ -1139,7 +1109,7 @@ paths:
keyPascal: LeaveTypeID
keySnake: leave_type_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: employeeLeave
- startDate:
is_variable: true
@@ -1172,7 +1142,7 @@ paths:
ruby: number_of_units
object: employeeLeave
- numberOfUnitsTaken:
- is_last: true
+ is_last: true
is_variable: true
nonString: true
key: numberOfUnitsTaken
@@ -1190,45 +1160,40 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-26T20:29:55.4086404",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leave": {
- "leaveID": "82a04ba6-a5cc-4e7d-86d4-b9f381a494e8",
- "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4",
- "description": "Creating a Description",
- "startDate": "2020-04-24T00:00:00",
- "endDate": "2020-04-26T00:00:00",
- "periods": [
- {
- "periodStartDate": "2020-04-20T00:00:00",
- "periodEndDate": "2020-04-26T00:00:00",
- "numberOfUnits": 0,
- "periodStatus": "Approved",
- "typeOfUnits": "Hours",
- "numberOfUnitsTaken": 0.2,
- "typeOfUnitsTaken": "Weeks"
- }
- ],
- "updatedDateUTC": "2020-08-26T20:29:55.2151561"
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-26T20:29:55.4086404
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leave:
+ leaveID: 82a04ba6-a5cc-4e7d-86d4-b9f381a494e8
+ leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4
+ description: Creating a Description
+ startDate: 2020-04-24T00:00:00
+ endDate: 2020-04-26T00:00:00
+ periods:
+ - periodStartDate: 2020-04-20T00:00:00
+ periodEndDate: 2020-04-26T00:00:00
+ numberOfUnits: 0
+ periodStatus: Approved
+ typeOfUnits: Hours
+ numberOfUnitsTaken: 0.2
+ typeOfUnitsTaken: Weeks
+ updatedDateUTC: 2020-08-26T20:29:55.2151561
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -1240,18 +1205,18 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeave'
- example: {
- "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4",
- "description": "Creating a Description",
- "startDate": "2020-04-24",
- "endDate": "2020-04-26"
- }
+ example:
+ leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4
+ description: Creating a Description
+ startDate: "2020-04-24"
+ endDate: "2020-04-26"
/Employees/{EmployeeID}/Leave/{LeaveID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
put:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: updateEmployeeLeave
@@ -1264,13 +1229,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- endDateValue:
key: endDate
keyPascal: EndDate
@@ -1278,13 +1243,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- employeeLeave:
key: employeeLeave
keyPascal: EmployeeLeave
@@ -1295,7 +1260,7 @@ paths:
keyPascal: LeaveTypeID
keySnake: leave_type_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: employeeLeave
- startDate:
is_variable: true
@@ -1308,7 +1273,7 @@ paths:
ruby: start_date
object: employeeLeave
- endDate:
- is_last: true
+ is_last: true
is_variable: true
nonString: true
key: endDate
@@ -1326,7 +1291,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -1335,42 +1300,37 @@ paths:
in: path
required: true
description: Leave id for single object
- schema:
+ schema:
type: string
format: uuid
- example: c4be24e5-e840-4c92-9eaa-2d86cd596314
+ example: c4be24e5-e840-4c92-9eaa-2d86cd596314
responses:
- '200':
+ "200":
description: successful response
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-26T20:29:55.8432792",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leave": {
- "leaveID": "82a04ba6-a5cc-4e7d-86d4-b9f381a494e8",
- "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4",
- "description": "Creating a Description",
- "startDate": "2020-04-24T00:00:00",
- "endDate": "2020-04-26T00:00:00",
- "periods": [
- {
- "periodStartDate": "2020-04-20T00:00:00",
- "periodEndDate": "2020-04-26T00:00:00",
- "numberOfUnits": 1,
- "periodStatus": "Approved"
- }
- ],
- "updatedDateUTC": "2020-08-26T20:29:55.8854536"
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-26T20:29:55.8432792
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leave:
+ leaveID: 82a04ba6-a5cc-4e7d-86d4-b9f381a494e8
+ leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4
+ description: Creating a Description
+ startDate: 2020-04-24T00:00:00
+ endDate: 2020-04-26T00:00:00
+ periods:
+ - periodStartDate: 2020-04-20T00:00:00
+ periodEndDate: 2020-04-26T00:00:00
+ numberOfUnits: 1
+ periodStatus: Approved
+ updatedDateUTC: 2020-08-26T20:29:55.8854536
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -1382,23 +1342,20 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeave'
- example: {
- "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4",
- "description": "Creating a Description",
- "startDate": "2020-04-24",
- "endDate": "2020-04-26",
- "periods": [
- {
- "periodStartDate": "2020-04-20",
- "periodEndDate": "2020-04-26",
- "numberOfUnits": 1,
- "periodStatus": "Approved"
- }
- ]
- }
+ example:
+ leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4
+ description: Creating a Description
+ startDate: "2020-04-24"
+ endDate: "2020-04-26"
+ periods:
+ - periodStartDate: "2020-04-20"
+ periodEndDate: "2020-04-26"
+ numberOfUnits: 1
+ periodStatus: Approved
delete:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: deleteEmployeeLeave
@@ -1410,7 +1367,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -1419,31 +1376,32 @@ paths:
in: path
required: true
description: Leave id for single object
- schema:
+ schema:
type: string
format: uuid
- example: c4be24e5-e840-4c92-9eaa-2d86cd596314
+ example: c4be24e5-e840-4c92-9eaa-2d86cd596314
responses:
- '200':
+ "200":
description: successful response
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-26T22:11:10.809249",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-26T22:11:10.809249
+ httpStatusCode: OK
+ pagination: null
+ problem: null
/Employees/{EmployeeID}/LeaveBalances:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollNz
operationId: getEmployeeLeaveBalances
@@ -1455,62 +1413,53 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveBalances'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-26T22:26:48.0448356",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 4
- },
- "problem": null,
- "leaveBalances": [
- {
- "name": "Holiday Pay",
- "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6",
- "balance": 0,
- "typeOfUnits": "Dollars"
- },
- {
- "name": "Annual Leave",
- "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4",
- "balance": 0,
- "typeOfUnits": "Hours"
- },
- {
- "name": "Sick Leave",
- "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719",
- "balance": 0,
- "typeOfUnits": "Hours"
- },
- {
- "name": "Alternative Holidays",
- "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3",
- "balance": 0,
- "typeOfUnits": "Hours"
- }
- ]
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-26T22:26:48.0448356
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 4
+ problem: null
+ leaveBalances:
+ - name: Holiday Pay
+ leaveTypeID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6
+ balance: 0
+ typeOfUnits: Dollars
+ - name: Annual Leave
+ leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4
+ balance: 0
+ typeOfUnits: Hours
+ - name: Sick Leave
+ leaveTypeID: f2f994cf-1899-46f3-ad4f-5d92d78c3719
+ balance: 0
+ typeOfUnits: Hours
+ - name: Alternative Holidays
+ leaveTypeID: 34129765-11cb-4d8c-b568-84a2219beda3
+ balance: 0
+ typeOfUnits: Hours
/Employees/{EmployeeID}/LeavePeriods:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollNz
operationId: getEmployeeLeavePeriods
@@ -1522,7 +1471,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -1542,41 +1491,35 @@ paths:
format: date
example: Johnson
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/LeavePeriods'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T13:35:49.4407417",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "periods": [
- {
- "periodStartDate": "2020-02-24T00:00:00",
- "periodEndDate": "2020-03-01T00:00:00",
- "numberOfUnits": 24,
- "periodStatus": "Estimated",
- "typeOfUnits": "Hours",
- "numberOfUnitsTaken": 0.6,
- "typeOfUnitsTaken": "Weeks"
- },
- {
- "periodStartDate": "2020-03-02T00:00:00",
- "periodEndDate": "2020-03-08T00:00:00",
- "numberOfUnits": 40,
- "periodStatus": "Estimated",
- "typeOfUnits": "Hours",
- "numberOfUnitsTaken": 1,
- "typeOfUnitsTaken": "Weeks"
- }
- ]
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T13:35:49.4407417
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ periods:
+ - periodStartDate: 2020-02-24T00:00:00
+ periodEndDate: 2020-03-01T00:00:00
+ numberOfUnits: 24
+ periodStatus: Estimated
+ typeOfUnits: Hours
+ numberOfUnitsTaken: 0.6
+ typeOfUnitsTaken: Weeks
+ - periodStartDate: 2020-03-02T00:00:00
+ periodEndDate: 2020-03-08T00:00:00
+ numberOfUnits: 40
+ periodStatus: Estimated
+ typeOfUnits: Hours
+ numberOfUnitsTaken: 1
+ typeOfUnitsTaken: Weeks
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -1587,7 +1530,8 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: createEmployeeLeaveSetup
@@ -1602,32 +1546,32 @@ paths:
key: includeHolidayPay
keyPascal: IncludeHolidayPay
keySnake: include_holiday_pay
- nonString: true
- default: false
+ nonString: true
+ default: false
object: employeeLeaveSetup
- holidayPayOpeningBalance:
key: holidayPayOpeningBalance
keyPascal: HolidayPayOpeningBalance
keySnake: holiday_pay_opening_balance
- nonString: true
+ nonString: true
default: 10.50
- is_money: true
+ is_money: true
object: employeeLeaveSetup
- annualLeaveOpeningBalance:
key: annualLeaveOpeningBalance
keyPascal: AnnualLeaveOpeningBalance
keySnake: annual_leave_opening_balance
- nonString: true
+ nonString: true
default: 25.89
- is_money: true
+ is_money: true
object: employeeLeaveSetup
- sickLeaveHoursToAccrueAnnually:
key: sickLeaveHoursToAccrueAnnually
keyPascal: SickLeaveHoursToAccrueAnnually
keySnake: sick_leave_hours_to_accrue_annually
- nonString: true
+ nonString: true
default: 100.0
- is_money: true
+ is_money: true
object: employeeLeaveSetup
- sickLeaveMaximumHoursToAccrue:
key: sickLeaveMaximumHoursToAccrue
@@ -1683,7 +1627,7 @@ paths:
keyPascal: AnnualLeaveAnniversaryDate
keySnake: annual_leave_anniversary_date
object: employeeLeaveSetup
- is_last: true
+ is_last: true
summary: Creates a leave set-up for a specific employee. This is required before viewing, configuring and requesting leave for an employee
parameters:
- $ref: '#/components/parameters/idempotencyKey'
@@ -1692,40 +1636,38 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveSetupObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-26T16:50:48.7245664",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leaveSetup": {
- "includeHolidayPay": null,
- "holidayPayOpeningBalance": 10,
- "annualLeaveOpeningBalance": 100,
- "negativeAnnualLeaveBalancePaidAmount": null,
- "sickLeaveHoursToAccrueAnnually": 20,
- "sickLeaveToAccrueAnnually": 20,
- "sickLeaveMaximumHoursToAccrue": null,
- "sickLeaveMaximumToAccrue": null,
- "sickLeaveOpeningBalance": 10,
- "sickLeaveScheduleOfAccrual": "OnAnniversaryDate",
- "sickLeaveAnniversaryDate": "2023-12-31",
- "annualLeaveAnniversaryDate": "2023-12-31"
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-26T16:50:48.7245664
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leaveSetup:
+ includeHolidayPay: null
+ holidayPayOpeningBalance: 10
+ annualLeaveOpeningBalance: 100
+ negativeAnnualLeaveBalancePaidAmount: null
+ sickLeaveHoursToAccrueAnnually: 20
+ sickLeaveToAccrueAnnually: 20
+ sickLeaveMaximumHoursToAccrue: null
+ sickLeaveMaximumToAccrue: null
+ sickLeaveOpeningBalance: 10
+ sickLeaveScheduleOfAccrual: OnAnniversaryDate
+ sickLeaveAnniversaryDate: "2023-12-31"
+ annualLeaveAnniversaryDate: "2023-12-31"
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -1737,22 +1679,23 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveSetup'
- example: {
- "holidayPayOpeningBalance": 10,
- "annualLeaveOpeningBalance": 100,
- "sickLeaveHoursToAccrueAnnually": 20,
- "sickLeaveToAccrueAnnually": 20,
- "sickLeaveOpeningBalance": 10,
- "sickLeaveScheduleOfAccrual": "OnAnniversaryDate",
- "sickLeaveAnniversaryDate": "2023-12-31",
- "annualLeaveAnniversaryDate": "2023-12-31"
- }
+ example:
+ holidayPayOpeningBalance: 10
+ annualLeaveOpeningBalance: 100
+ sickLeaveHoursToAccrueAnnually: 20
+ sickLeaveToAccrueAnnually: 20
+ sickLeaveOpeningBalance: 10
+ sickLeaveScheduleOfAccrual: OnAnniversaryDate
+ sickLeaveAnniversaryDate: "2023-12-31"
+ annualLeaveAnniversaryDate: "2023-12-31"
/Employees/{EmployeeID}/LeaveTypes:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollNz
operationId: getEmployeeLeaveTypes
@@ -1764,44 +1707,40 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveTypes'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T14:25:16.004485",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leaveTypes": [
- {
- "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6",
- "scheduleOfAccrual": "PercentageOfGrossEarnings",
- "hoursAccruedAnnually": 0,
- "maximumToAccrue": 0,
- "openingBalance": 0,
- "rateAccruedHourly": null,
- "percentageOfGrossEarnings": 8,
- "includeHolidayPayEveryPay": true,
- "showAnnualLeaveInAdvance": null,
- "annualLeaveTotalAmountPaid": null,
- "scheduleOfAccrualDate": null,
- "unitsAccruedAnnually": 0,
- "typeOfUnitsToAccrue": "Weeks",
- "openingBalanceTypeOfUnits": "Weeks"
- }
- ]
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T14:25:16.004485
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leaveTypes:
+ - leaveTypeID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6
+ scheduleOfAccrual: PercentageOfGrossEarnings
+ hoursAccruedAnnually: 0
+ maximumToAccrue: 0
+ openingBalance: 0
+ rateAccruedHourly: null
+ percentageOfGrossEarnings: 8
+ includeHolidayPayEveryPay: true
+ showAnnualLeaveInAdvance: null
+ annualLeaveTotalAmountPaid: null
+ scheduleOfAccrualDate: null
+ unitsAccruedAnnually: 0
+ typeOfUnitsToAccrue: Weeks
+ openingBalanceTypeOfUnits: Weeks
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -1809,7 +1748,8 @@ paths:
$ref: '#/components/schemas/Problem'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: createEmployeeLeaveType
@@ -1826,14 +1766,14 @@ paths:
keyPascal: LeaveTypeID
keySnake: leave_type_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: employeeLeaveType
- scheduleOfAccrual:
key: scheduleOfAccrual
keyPascal: ScheduleOfAccrual
keySnake: schedule_of_accrual
- nonString: true
- default: "DeductionCategory.NzOther"
+ nonString: true
+ default: DeductionCategory.NzOther
php: XeroAPI\XeroPHP\Models\PayrollNz\EmployeeLeaveType\ScheduleOfAccrualEnum.PercentageOfGrossEarnings
node: EmployeeLeaveType.ScheduleOfAccrualEnum.PercentageOfGrossEarnings
ruby: XeroRuby::PayrollNz::EmployeeLeaveType::schedule_of_accrual::PERCENTAGEOFGROSSEARNINGS
@@ -1846,7 +1786,7 @@ paths:
keyPascal: OpeningBalance
keySnake: opening_balance
is_money: true
- nonString: true
+ nonString: true
default: 5.25
object: employeeLeaveType
- scheduleOfAccrualDate:
@@ -1856,7 +1796,7 @@ paths:
keyPascal: ScheduleOfAccrualDate
keySnake: schedule_of_accrual_date
object: employeeLeaveType
- is_last: true
+ is_last: true
parameters:
- $ref: '#/components/parameters/idempotencyKey'
- name: EmployeeID
@@ -1864,42 +1804,40 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveTypeObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T14:31:54.3370081",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leaveType": {
- "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec",
- "scheduleOfAccrual": "AnnuallyAfter6Months",
- "hoursAccruedAnnually": 10,
- "maximumToAccrue": 80,
- "openingBalance": 100,
- "rateAccruedHourly": null,
- "percentageOfGrossEarnings": 0,
- "includeHolidayPayEveryPay": null,
- "showAnnualLeaveInAdvance": null,
- "annualLeaveTotalAmountPaid": null,
- "scheduleOfAccrualDate": null,
- "unitsAccruedAnnually": 0,
- "typeOfUnitsToAccrue": "Hours",
- "openingBalanceTypeOfUnits": "Hours"
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T14:31:54.3370081
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leaveType:
+ leaveTypeID: 35da97ae-05b9-427f-9a98-69157ba42cec
+ scheduleOfAccrual: AnnuallyAfter6Months
+ hoursAccruedAnnually: 10
+ maximumToAccrue: 80
+ openingBalance: 100
+ rateAccruedHourly: null
+ percentageOfGrossEarnings: 0
+ includeHolidayPayEveryPay: null
+ showAnnualLeaveInAdvance: null
+ annualLeaveTotalAmountPaid: null
+ scheduleOfAccrualDate: null
+ unitsAccruedAnnually: 0
+ typeOfUnitsToAccrue: Hours
+ openingBalanceTypeOfUnits: Hours
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -1911,23 +1849,24 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveType'
- example: {
- "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec",
- "scheduleOfAccrual": "AnnuallyAfter6Months",
- "hoursAccruedAnnually": 10,
- "unitsAccruedAnnually": 10,
- "typeOfUnitsToAccrue": "Hours",
- "openingBalanceTypeOfUnits": "Hours",
- "maximumToAccrue": 80,
- "openingBalance": 100,
- "rateAccruedHourly": 3.5
- }
+ example:
+ leaveTypeID: 35da97ae-05b9-427f-9a98-69157ba42cec
+ scheduleOfAccrual: AnnuallyAfter6Months
+ hoursAccruedAnnually: 10
+ unitsAccruedAnnually: 10
+ typeOfUnitsToAccrue: Hours
+ openingBalanceTypeOfUnits: Hours
+ maximumToAccrue: 80
+ openingBalance: 100
+ rateAccruedHourly: 3.5
/Employees/{EmployeeID}/PaymentMethods:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollNz
operationId: getEmployeePaymentMethod
@@ -1939,40 +1878,35 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentMethodObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-26T23:34:53.6856317",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "paymentMethod": {
- "bankAccounts": [
- {
- "accountName": "Casual Worker",
- "accountNumber": "0607050201419000",
- "sortCode": null,
- "particulars": null,
- "code": null,
- "dollarAmount": null,
- "reference": "",
- "calculationType": "Balance"
- }
- ]
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-26T23:34:53.6856317
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ paymentMethod:
+ bankAccounts:
+ - accountName: Casual Worker
+ accountNumber: "0607050201419000"
+ sortCode: null
+ particulars: null
+ code: null
+ dollarAmount: null
+ reference: ""
+ calculationType: Balance
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -1980,7 +1914,8 @@ paths:
$ref: '#/components/schemas/Problem'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: createEmployeePaymentMethod
@@ -2001,7 +1936,7 @@ paths:
key: accountNumber
keyPascal: AccountNumber
keySnake: account_number
- nonString: true
+ nonString: true
default: 123456
object: bankAccount
- sortCode:
@@ -2009,7 +1944,7 @@ paths:
keyPascal: SortCode
keySnake: sort_code
default: 123411
- is_last: true
+ is_last: true
object: bankAccount
- bankAccounts:
is_list: true
@@ -2051,40 +1986,35 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentMethodObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-26T23:34:53.6856317",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "paymentMethod": {
- "bankAccounts": [
- {
- "accountName": "Casual Worker",
- "accountNumber": "0607050201419000",
- "sortCode": null,
- "particulars": null,
- "code": null,
- "dollarAmount": null,
- "reference": "",
- "calculationType": "Balance"
- }
- ]
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-26T23:34:53.6856317
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ paymentMethod:
+ bankAccounts:
+ - accountName: Casual Worker
+ accountNumber: "0607050201419000"
+ sortCode: null
+ particulars: null
+ code: null
+ dollarAmount: null
+ reference: ""
+ calculationType: Balance
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -2096,26 +2026,24 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/PaymentMethod'
- example: {
- "bankAccounts": [
- {
- "accountName": "Casual Worker",
- "accountNumber": "0607050201419000",
- "sortCode": null,
- "particulars": null,
- "code": null,
- "dollarAmount": null,
- "reference": "",
- "calculationType": "Balance"
- }
- ]
- }
+ example:
+ bankAccounts:
+ - accountName: Casual Worker
+ accountNumber: "0607050201419000"
+ sortCode: null
+ particulars: null
+ code: null
+ dollarAmount: null
+ reference: ""
+ calculationType: Balance
/Employees/{EmployeeID}/PayTemplates:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollNz
operationId: getEmployeePayTemplates
@@ -2127,44 +2055,38 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeePayTemplates'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T15:09:19.0627389",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 0,
- "itemCount": 0
- },
- "problem": null,
- "payTemplate": {
- "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995",
- "earningTemplates": [
- {
- "payTemplateEarningID": "1527cf6c-93db-41bf-aba2-9d6af1d3c499",
- "ratePerUnit": 20,
- "numberOfUnits": 8,
- "fixedAmount": null,
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "name": "Ordinary Time"
- }
- ]
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T15:09:19.0627389
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 0
+ itemCount: 0
+ problem: null
+ payTemplate:
+ employeeID: 68342973-c405-4b86-b5d3-d7b877c27995
+ earningTemplates:
+ - payTemplateEarningID: 1527cf6c-93db-41bf-aba2-9d6af1d3c499
+ ratePerUnit: 20
+ numberOfUnits: 8
+ fixedAmount: null
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ name: Ordinary Time
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -2175,7 +2097,8 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: createEmployeeEarningsTemplate
@@ -2191,37 +2114,37 @@ paths:
keyPascal: PayTemplateEarningID
keySnake: pay_template_earning_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsTemplate
- ratePerUnit:
key: ratePerUnit
keyPascal: RatePerUnit
keySnake: rate_per_unit
- nonString: true
+ nonString: true
default: 14.25
object: earningsTemplate
- is_money: true
+ is_money: true
- numberOfUnits:
key: numberOfUnits
keyPascal: NumberOfUnits
keySnake: number_of_units
default: 35.50
- nonString: true
- is_money: true
+ nonString: true
+ is_money: true
object: earningsTemplate
- fixedAmount:
key: fixedAmount
keyPascal: FixedAmount
keySnake: fixed_amount
default: 50
- nonString: true
+ nonString: true
object: earningsTemplate
- earningsRateId:
key: earningsRateID
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsTemplate
- name:
key: name
@@ -2256,34 +2179,32 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EarningsTemplateObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T14:48:24.6032145",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "earningTemplate": {
- "payTemplateEarningID": "11b4e492-5d56-4eac-a9ce-687d7b9a4a84",
- "ratePerUnit": 20,
- "numberOfUnits": 8,
- "fixedAmount": null,
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "name": "Ordinary Time"
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T14:48:24.6032145
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ earningTemplate:
+ payTemplateEarningID: 11b4e492-5d56-4eac-a9ce-687d7b9a4a84
+ ratePerUnit: 20
+ numberOfUnits: 8
+ fixedAmount: null
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ name: Ordinary Time
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -2295,18 +2216,18 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EarningsTemplate'
- example: {
- "ratePerUnit": 20,
- "numberOfUnits": 8,
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "name": "My New One"
- }
+ example:
+ ratePerUnit: 20
+ numberOfUnits: 8
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ name: My New One
/Employees/{EmployeeID}/PayTemplates/Earnings/{PayTemplateEarningID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
put:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: updateEmployeeEarningsTemplate
@@ -2322,37 +2243,37 @@ paths:
keyPascal: PayTemplateEarningID
keySnake: pay_template_earning_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsTemplate
- ratePerUnit:
key: ratePerUnit
keyPascal: RatePerUnit
keySnake: rate_per_unit
- nonString: true
+ nonString: true
default: 14.25
object: earningsTemplate
- is_money: true
+ is_money: true
- numberOfUnits:
key: numberOfUnits
keyPascal: NumberOfUnits
keySnake: number_of_units
default: 35.50
- nonString: true
- is_money: true
+ nonString: true
+ is_money: true
object: earningsTemplate
- fixedAmount:
key: fixedAmount
keyPascal: FixedAmount
keySnake: fixed_amount
default: 50
- nonString: true
+ nonString: true
object: earningsTemplate
- earningsRateId:
key: earningsRateID
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsTemplate
- name:
key: name
@@ -2387,7 +2308,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -2395,35 +2316,33 @@ paths:
x-snake: pay_template_earning_id
in: path
required: true
- description: Id for single pay template earnings object
- schema:
+ description: Id for single pay template earnings object
+ schema:
type: string
format: uuid
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EarningsTemplateObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T18:54:08.6524341",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "earningTemplate": {
- "payTemplateEarningID": "1527cf6c-93db-41bf-aba2-9d6af1d3c499",
- "ratePerUnit": 25,
- "numberOfUnits": 4,
- "fixedAmount": null,
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "name": "Ordinary Time"
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T18:54:08.6524341
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ earningTemplate:
+ payTemplateEarningID: 1527cf6c-93db-41bf-aba2-9d6af1d3c499
+ ratePerUnit: 25
+ numberOfUnits: 4
+ fixedAmount: null
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ name: Ordinary Time
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -2435,14 +2354,14 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EarningsTemplate'
- example: {
- "ratePerUnit": 25,
- "numberOfUnits": 4,
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5"
- }
+ example:
+ ratePerUnit: 25
+ numberOfUnits: 4
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
delete:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: deleteEmployeeEarningsTemplate
@@ -2453,7 +2372,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -2461,32 +2380,32 @@ paths:
x-snake: pay_template_earning_id
in: path
required: true
- description: Id for single pay template earnings object
- schema:
+ description: Id for single pay template earnings object
+ schema:
type: string
format: uuid
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
- '200':
+ "200":
description: deletion successful
content:
application/json:
schema:
$ref: '#/components/schemas/EarningsTemplateObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T18:54:09.1368544",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T18:54:09.1368544
+ httpStatusCode: OK
+ pagination: null
+ problem: null
/Employees/{EmployeeID}/PayTemplateEarnings:
parameters:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: createMultipleEmployeeEarningsTemplate
@@ -2502,37 +2421,37 @@ paths:
keyPascal: PayTemplateEarningID
keySnake: pay_template_earning_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsTemplate
- ratePerUnit:
key: ratePerUnit
keyPascal: RatePerUnit
keySnake: rate_per_unit
- nonString: true
+ nonString: true
default: 14.25
object: earningsTemplate
- is_money: true
+ is_money: true
- numberOfUnits:
key: numberOfUnits
keyPascal: NumberOfUnits
keySnake: number_of_units
default: 35.50
- nonString: true
- is_money: true
+ nonString: true
+ is_money: true
object: earningsTemplate
- fixedAmount:
key: fixedAmount
keyPascal: FixedAmount
keySnake: fixed_amount
default: 50
- nonString: true
+ nonString: true
object: earningsTemplate
- earningsRateId:
key: earningsRateID
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsTemplate
- name:
key: name
@@ -2567,44 +2486,38 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeEarningsTemplates'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T15:01:52.9369043",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "earningTemplates": [
- {
- "payTemplateEarningID": "1527cf6c-93db-41bf-aba2-9d6af1d3c499",
- "ratePerUnit": 20,
- "numberOfUnits": 8,
- "fixedAmount": null,
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "name": "Ordinary Time"
- },
- {
- "payTemplateEarningID": "92e757cc-b026-404d-804e-9dc2047a03e6",
- "ratePerUnit": 0,
- "numberOfUnits": 8,
- "fixedAmount": null,
- "earningsRateID": "65b83d94-f20f-45e1-85ae-387fcf460c26",
- "name": "Salary"
- }
- ]
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T15:01:52.9369043
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ earningTemplates:
+ - payTemplateEarningID: 1527cf6c-93db-41bf-aba2-9d6af1d3c499
+ ratePerUnit: 20
+ numberOfUnits: 8
+ fixedAmount: null
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ name: Ordinary Time
+ - payTemplateEarningID: 92e757cc-b026-404d-804e-9dc2047a03e6
+ ratePerUnit: 0
+ numberOfUnits: 8
+ fixedAmount: null
+ earningsRateID: 65b83d94-f20f-45e1-85ae-387fcf460c26
+ name: Salary
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -2622,7 +2535,9 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getDeductions
@@ -2635,46 +2550,40 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Deductions'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T20:43:53.931198",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 4
- },
- "problem": null,
- "deductions": [
- {
- "deductionId": "a3760fe4-68a4-4e38-8326-fe616af7dc74",
- "deductionName": "KiwiSaver Voluntary Contributions",
- "deductionCategory": "KiwiSaverVoluntaryContributions",
- "liabilityAccountId": "26c57f04-0436-40cc-9cd9-1a21185d88bb",
- "currentRecord": true,
- "standardAmount": null
- },
- {
- "deductionId": "a131596e-2f83-4f6c-9573-99c4cbfcefd1",
- "deductionName": "Rent",
- "deductionCategory": "NzOther",
- "liabilityAccountId": "26c57f04-0436-40cc-9cd9-1a21185d88bb",
- "currentRecord": true,
- "standardAmount": 200
- }
- ]
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T20:43:53.931198
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 4
+ problem: null
+ deductions:
+ - deductionId: a3760fe4-68a4-4e38-8326-fe616af7dc74
+ deductionName: KiwiSaver Voluntary Contributions
+ deductionCategory: KiwiSaverVoluntaryContributions
+ liabilityAccountId: 26c57f04-0436-40cc-9cd9-1a21185d88bb
+ currentRecord: true
+ standardAmount: null
+ - deductionId: a131596e-2f83-4f6c-9573-99c4cbfcefd1
+ deductionName: Rent
+ deductionCategory: NzOther
+ liabilityAccountId: 26c57f04-0436-40cc-9cd9-1a21185d88bb
+ currentRecord: true
+ standardAmount: 200
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollNz
operationId: createDeduction
@@ -2684,7 +2593,7 @@ paths:
key: deduction
keyPascal: Deduction
keySnake: deduction
- is_object: true
+ is_object: true
- deductionName:
key: deductionName
keyPascal: DeductionName
@@ -2695,8 +2604,8 @@ paths:
key: deductionCategory
keyPascal: DeductionCategory
keySnake: deduction_category
- nonString: true
- default: "DeductionCategory.NzOther"
+ nonString: true
+ default: DeductionCategory.NzOther
php: XeroAPI\XeroPHP\Models\PayrollNz\Deduction\DEDUCTION_CATEGORY_NZ_OTHER
node: Deduction.DeductionCategoryEnum.NzOther
ruby: XeroRuby::PayrollNz::Deduction::deduction_category::NZ_OTHER
@@ -2705,40 +2614,38 @@ paths:
csharp: Deduction.DeductionCategoryEnum.NzOther
object: deduction
- liabilityAccountId:
- is_uuid: true
+ is_uuid: true
key: liabilityAccountId
keyPascal: LiabilityAccountId
keySnake: liability_account_id
default: 00000000-0000-0000-0000-000000000000
object: deduction
- is_last: true
+ is_last: true
summary: Creates a new deduction for a specific employee
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/DeductionObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T20:43:54.9563295",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "deduction": {
- "deductionId": "0ee805eb-f5b0-4061-9b35-d9ea550da04e",
- "deductionName": "My new deduction",
- "deductionCategory": "NzOther",
- "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3",
- "currentRecord": true,
- "standardAmount": null
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T20:43:54.9563295
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ deduction:
+ deductionId: 0ee805eb-f5b0-4061-9b35-d9ea550da04e
+ deductionName: My new deduction
+ deductionCategory: NzOther
+ liabilityAccountId: 568f2e9a-0870-46cc-8678-f83f132ed4e3
+ currentRecord: true
+ standardAmount: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -2750,17 +2657,18 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Deduction'
- example: {
- "deductionName": "My new deduction",
- "deductionCategory": "NzOther",
- "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3"
- }
+ example:
+ deductionName: My new deduction
+ deductionCategory: NzOther
+ liabilityAccountId: 568f2e9a-0870-46cc-8678-f83f132ed4e3
/Deductions/{deductionId}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getDeduction
@@ -2776,34 +2684,34 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/DeductionObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T20:43:54.846821",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "deduction": {
- "deductionId": "a3760fe4-68a4-4e38-8326-fe616af7dc74",
- "deductionName": "KiwiSaver Voluntary Contributions",
- "deductionCategory": "KiwiSaverVoluntaryContributions",
- "liabilityAccountId": "26c57f04-0436-40cc-9cd9-1a21185d88bb",
- "currentRecord": true,
- "standardAmount": null
- }
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T20:43:54.846821
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ deduction:
+ deductionId: a3760fe4-68a4-4e38-8326-fe616af7dc74
+ deductionName: KiwiSaver Voluntary Contributions
+ deductionCategory: KiwiSaverVoluntaryContributions
+ liabilityAccountId: 26c57f04-0436-40cc-9cd9-1a21185d88bb
+ currentRecord: true
+ standardAmount: null
/StatutoryDeductions:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getStatutoryDeductions
@@ -2815,47 +2723,42 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/StatutoryDeductions'
- example: {
- "id": "e3731829-9801-4809-a1a1-bbe40cd18b7e",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T23:46:21.0212854",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 8
- },
- "problem": null,
- "statutoryDeductions": [
- {
- "id": "e3731829-9801-4809-a1a1-bbe40cd18b7e",
- "name": "Child Support",
- "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488",
- "statutoryDeductionCategory": "ChildSupport",
- "currentRecord": true
- },
- {
- "id": "00000000-0000-0000-0000-000000000000",
- "name": "Student Loan",
- "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488",
- "statutoryDeductionCategory": "StudentLoan",
- "currentRecord": true
- }
- ]
- }
+ example:
+ id: e3731829-9801-4809-a1a1-bbe40cd18b7e
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T23:46:21.0212854
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 8
+ problem: null
+ statutoryDeductions:
+ - id: e3731829-9801-4809-a1a1-bbe40cd18b7e
+ name: Child Support
+ liabilityAccountId: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488
+ statutoryDeductionCategory: ChildSupport
+ currentRecord: true
+ - id: 00000000-0000-0000-0000-000000000000
+ name: Student Loan
+ liabilityAccountId: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488
+ statutoryDeductionCategory: StudentLoan
+ currentRecord: true
/StatutoryDeductions/{id}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getStatutoryDeduction
@@ -2869,33 +2772,33 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/StatutoryDeductionObject'
- example: {
- "id": "e3731829-9801-4809-a1a1-bbe40cd18b7e",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T00:01:57.6562992",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "statutoryDeduction": {
- "id": "e3731829-9801-4809-a1a1-bbe40cd18b7e",
- "name": "Child Support",
- "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488",
- "statutoryDeductionCategory": "ChildSupport",
- "currentRecord": true
- }
- }
+ example:
+ id: e3731829-9801-4809-a1a1-bbe40cd18b7e
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T00:01:57.6562992
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ statutoryDeduction:
+ id: e3731829-9801-4809-a1a1-bbe40cd18b7e
+ name: Child Support
+ liabilityAccountId: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488
+ statutoryDeductionCategory: ChildSupport
+ currentRecord: true
/Superannuations:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getSuperannuations
@@ -2907,54 +2810,48 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Superannuations'
- example: {
- "id": "563273ea-0dae-4f82-86a4-e0db77c008ea",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-09-14T22:35:14.6806088",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 2
- },
- "problem": null,
- "benefits": [
- {
- "id": "563273ea-0dae-4f82-86a4-e0db77c008ea",
- "name": "KiwiSaver",
- "category": "KiwiSaver",
- "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488",
- "expenseAccountId": "b343c3b0-5941-4166-82b4-dd926622e0e2",
- "standardAmount": 5,
- "percentage": 3,
- "calculationTypeNZ": "PercentageOfTaxableEarnings",
- "currentRecord": true,
- "companyMax": 2
- },
- {
- "id": "00000000-0000-0000-0000-000000000000",
- "name": "SidSaver",
- "category": "Other",
- "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3",
- "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e",
- "standardAmount": 10,
- "percentage": 4,
- "calculationTypeNZ": "FixedAmount",
- "currentRecord": true,
- "companyMax": 4
- }
- ]
- }
+ example:
+ id: 563273ea-0dae-4f82-86a4-e0db77c008ea
+ providerName: provider-name
+ dateTimeUTC: 2020-09-14T22:35:14.6806088
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 2
+ problem: null
+ benefits:
+ - id: 563273ea-0dae-4f82-86a4-e0db77c008ea
+ name: KiwiSaver
+ category: KiwiSaver
+ liabilityAccountId: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488
+ expenseAccountId: b343c3b0-5941-4166-82b4-dd926622e0e2
+ standardAmount: 5
+ percentage: 3
+ calculationTypeNZ: PercentageOfTaxableEarnings
+ currentRecord: true
+ companyMax: 2
+ - id: 00000000-0000-0000-0000-000000000000
+ name: SidSaver
+ category: Other
+ liabilityAccountId: 568f2e9a-0870-46cc-8678-f83f132ed4e3
+ expenseAccountId: e4eb36f6-97e3-4427-a394-dd4e1b355c2e
+ standardAmount: 10
+ percentage: 4
+ calculationTypeNZ: FixedAmount
+ currentRecord: true
+ companyMax: 4
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollNz
operationId: createSuperannuation
@@ -2976,7 +2873,7 @@ paths:
java: com.xero.models.payrollnz.Benefit.CategoryEnum.ComplyingFund
csharp: Benefit.CategoryEnum.ComplyingFund
default: ComplyingFund
- nonString: true
+ nonString: true
object: benefit
- caluclationTypeNZ:
key: calculationTypeNZ
@@ -2989,21 +2886,21 @@ paths:
java: com.xero.models.payrollnz.Benefit.CalculationTypeNZ.PercentageOfTaxableEarnings
csharp: Benefit.CalculationTypeNZ.PercentageOfTaxableEarnings
default: PercentageOfTaxableEarnings
- nonString: true
+ nonString: true
object: benefit
- liabilityAccountId:
key: liabilityAccountId
keyPascal: LiabilityAccountId
keySnake: liability_account_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: benefit
- expenseAccountId:
key: expenseAccountId
keyPascal: ExpenseAccountId
keySnake: expense_account_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: benefit
- percentage:
key: percentage
@@ -3011,46 +2908,44 @@ paths:
keySnake: percentage
default: 3
object: benefit
- nonString: true
+ nonString: true
- standardAmount:
key: standardAmount
keyPascal: StandardAmount
keySnake: standard_amount
default: 100
- nonString: true
+ nonString: true
object: benefit
is_last: true
summary: Creates a new superannuation
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/SuperannuationObject'
- example: {
- "id": "8905a754-7ce8-40e2-9fa5-f819deb7adce",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-09-11T00:36:31.7680431",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "benefit": {
- "id": "8905a754-7ce8-40e2-9fa5-f819deb7adce",
- "name": "SidSaver",
- "category": "Other",
- "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3",
- "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e",
- "standardAmount": 10,
- "percentage": null,
- "calculationTypeNZ": "FixedAmount",
- "currentRecord": true,
- "companyMax": null
- }
- }
- '400':
+ example:
+ id: 8905a754-7ce8-40e2-9fa5-f819deb7adce
+ providerName: provider-name
+ dateTimeUTC: 2020-09-11T00:36:31.7680431
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ benefit:
+ id: 8905a754-7ce8-40e2-9fa5-f819deb7adce
+ name: SidSaver
+ category: Other
+ liabilityAccountId: 568f2e9a-0870-46cc-8678-f83f132ed4e3
+ expenseAccountId: e4eb36f6-97e3-4427-a394-dd4e1b355c2e
+ standardAmount: 10
+ percentage: null
+ calculationTypeNZ: FixedAmount
+ currentRecord: true
+ companyMax: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -3062,20 +2957,21 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Benefit'
- example: {
- "name": "SidSaver",
- "category": "Other",
- "liabilityAccountId": "568f2e9a-0870-46cc-8678-f83f132ed4e3",
- "expenseAccountId": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e",
- "CalculationTypeNZ": "FixedAmount",
- "standardAmount": 10
- }
+ example:
+ name: SidSaver
+ category: Other
+ liabilityAccountId: 568f2e9a-0870-46cc-8678-f83f132ed4e3
+ expenseAccountId: e4eb36f6-97e3-4427-a394-dd4e1b355c2e
+ CalculationTypeNZ: FixedAmount
+ standardAmount: 10
/Superannuations/{SuperannuationID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getSuperannuation
@@ -3090,38 +2986,38 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/SuperannuationObject'
- example: {
- "id": "563273ea-0dae-4f82-86a4-e0db77c008ea",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-09-11T00:36:29.5745157",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "benefit": {
- "id": "563273ea-0dae-4f82-86a4-e0db77c008ea",
- "name": "KiwiSaver",
- "category": "KiwiSaver",
- "liabilityAccountId": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488",
- "expenseAccountId": "b343c3b0-5941-4166-82b4-dd926622e0e2",
- "standardAmount": null,
- "percentage": 3,
- "calculationTypeNZ": "PercentageOfTaxableEarnings",
- "currentRecord": true,
- "companyMax": null
- }
- }
+ example:
+ id: 563273ea-0dae-4f82-86a4-e0db77c008ea
+ providerName: provider-name
+ dateTimeUTC: 2020-09-11T00:36:29.5745157
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ benefit:
+ id: 563273ea-0dae-4f82-86a4-e0db77c008ea
+ name: KiwiSaver
+ category: KiwiSaver
+ liabilityAccountId: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488
+ expenseAccountId: b343c3b0-5941-4166-82b4-dd926622e0e2
+ standardAmount: null
+ percentage: 3
+ calculationTypeNZ: PercentageOfTaxableEarnings
+ currentRecord: true
+ companyMax: null
/EarningsRates:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getEarningsRates
@@ -3134,141 +3030,131 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EarningsRates'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T18:25:57.0647738",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 15
- },
- "problem": null,
- "earningsRates": [
- {
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "name": "Ordinary Time",
- "earningsType": "RegularEarnings",
- "rateType": "RatePerUnit",
- "typeOfUnits": "hours",
- "currentRecord": true,
- "expenseAccountID": "1c91e520-a12b-45cc-8194-99950858e5bf",
- "fixedAmount": null,
- "ratePerUnit": null,
- "multipleOfOrdinaryEarningsRate": null
- },
- {
- "earningsRateID": "31407b3e-0967-4ae0-a7f1-3df4e6481a2e",
- "name": "ACC (First Week)",
- "earningsType": "OtherGrossEarnings",
- "rateType": "MultipleOfOrdinaryEarningsRate",
- "typeOfUnits": "hours",
- "currentRecord": true,
- "expenseAccountID": "1c91e520-a12b-45cc-8194-99950858e5bf",
- "fixedAmount": null,
- "ratePerUnit": null,
- "multipleOfOrdinaryEarningsRate": 0.8
- },
- {
- "earningsRateID": "6e5a4cf2-aa38-4558-a46e-f6998dad239b",
- "name": "Directors Fees",
- "earningsType": "WithholdingIncome",
- "rateType": "FixedAmount",
- "typeOfUnits": null,
- "currentRecord": true,
- "expenseAccountID": "1c91e520-a12b-45cc-8194-99950858e5bf",
- "fixedAmount": 1000,
- "ratePerUnit": null,
- "multipleOfOrdinaryEarningsRate": null
- }
- ]
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T18:25:57.0647738
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 15
+ problem: null
+ earningsRates:
+ - earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ name: Ordinary Time
+ earningsType: RegularEarnings
+ rateType: RatePerUnit
+ typeOfUnits: hours
+ currentRecord: true
+ expenseAccountID: 1c91e520-a12b-45cc-8194-99950858e5bf
+ fixedAmount: null
+ ratePerUnit: null
+ multipleOfOrdinaryEarningsRate: null
+ - earningsRateID: 31407b3e-0967-4ae0-a7f1-3df4e6481a2e
+ name: ACC (First Week)
+ earningsType: OtherGrossEarnings
+ rateType: MultipleOfOrdinaryEarningsRate
+ typeOfUnits: hours
+ currentRecord: true
+ expenseAccountID: 1c91e520-a12b-45cc-8194-99950858e5bf
+ fixedAmount: null
+ ratePerUnit: null
+ multipleOfOrdinaryEarningsRate: 0.8
+ - earningsRateID: 6e5a4cf2-aa38-4558-a46e-f6998dad239b
+ name: Directors Fees
+ earningsType: WithholdingIncome
+ rateType: FixedAmount
+ typeOfUnits: null
+ currentRecord: true
+ expenseAccountID: 1c91e520-a12b-45cc-8194-99950858e5bf
+ fixedAmount: 1000
+ ratePerUnit: null
+ multipleOfOrdinaryEarningsRate: null
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollNz
operationId: createEarningsRate
- x-hasPayrollUkProblem: true
+ x-hasPayrollUkProblem: true
x-example:
- - earningsRate:
- key: earningsRate
- keyPascal: EarningsRate
- keySnake: earnings_rate
- is_object: true
- - earningsType:
- key: earningsType
- keyPascal: EarningsType
- keySnake: earnings_type
- php: XeroAPI\XeroPHP\Models\PayrollNz\EarningsRate\EarningsTypeEnum.RegularEarnings
- node: EarningsRate.EarningsTypeEnum.REGULAREARNINGS
- ruby: XeroRuby::PayrollNz::EarningsRate::EarningsTypeEnum::REGULAREARNINGS
- python_string: REGULAREARNINGS
- java: com.xero.models.payrollnz.EarningsRate.EarningsTypeEnum.RegularEarnings
- csharp: EarningsRate.EarningsTypeEnum.RegularEarnings
- default: RegularEarnings
- nonString: true
- object: earningsRate
- - rateType:
- key: rateType
- keyPascal: RateType
- keySnake: rate_type
- php: XeroAPI\XeroPHP\Models\PayrollNz\EarningsRate\RateTypeEnum.RatePerUnit
- node: EarningsRate.RateTypeEnum.RatePerUnit
- ruby: XeroRuby::PayrollNz::EarningsRate::RateTypeEnum::ACCPAYCREDIT
- python_string: RATEPERUNIT
- java: com.xero.models.payrollnz.EarningsRate.RateTypeEnum.RATEPERUNIT
- csharp: EarningsRate.RateTypeEnum.RatePerUnit
- default: RatePerUnit
- object: earningsRate
- nonString: true
- - expenseAccountId:
- key: expenseAccountID
- keyPascal: ExpenseAccountID
- keySnake: expense_account_ID
- is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
- object: earningsRate
- is_last: true
+ - earningsRate:
+ key: earningsRate
+ keyPascal: EarningsRate
+ keySnake: earnings_rate
+ is_object: true
+ - earningsType:
+ key: earningsType
+ keyPascal: EarningsType
+ keySnake: earnings_type
+ php: XeroAPI\XeroPHP\Models\PayrollNz\EarningsRate\EarningsTypeEnum.RegularEarnings
+ node: EarningsRate.EarningsTypeEnum.REGULAREARNINGS
+ ruby: XeroRuby::PayrollNz::EarningsRate::EarningsTypeEnum::REGULAREARNINGS
+ python_string: REGULAREARNINGS
+ java: com.xero.models.payrollnz.EarningsRate.EarningsTypeEnum.RegularEarnings
+ csharp: EarningsRate.EarningsTypeEnum.RegularEarnings
+ default: RegularEarnings
+ nonString: true
+ object: earningsRate
+ - rateType:
+ key: rateType
+ keyPascal: RateType
+ keySnake: rate_type
+ php: XeroAPI\XeroPHP\Models\PayrollNz\EarningsRate\RateTypeEnum.RatePerUnit
+ node: EarningsRate.RateTypeEnum.RatePerUnit
+ ruby: XeroRuby::PayrollNz::EarningsRate::RateTypeEnum::ACCPAYCREDIT
+ python_string: RATEPERUNIT
+ java: com.xero.models.payrollnz.EarningsRate.RateTypeEnum.RATEPERUNIT
+ csharp: EarningsRate.RateTypeEnum.RatePerUnit
+ default: RatePerUnit
+ object: earningsRate
+ nonString: true
+ - expenseAccountId:
+ key: expenseAccountID
+ keyPascal: ExpenseAccountID
+ keySnake: expense_account_ID
+ is_uuid: true
+ default: 00000000-0000-0000-0000-000000000000
+ object: earningsRate
+ is_last: true
summary: Creates a new earnings rate
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EarningsRateObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T18:25:57.8141393",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "earningsRate": {
- "earningsRateID": "4369b0ef-a64d-42e1-bb6d-f2fc984de133",
- "name": "My Earnings Rate",
- "earningsType": "RegularEarnings",
- "rateType": "RatePerUnit",
- "typeOfUnits": "hours",
- "currentRecord": true,
- "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e",
- "fixedAmount": null,
- "ratePerUnit": null,
- "multipleOfOrdinaryEarningsRate": null
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T18:25:57.8141393
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ earningsRate:
+ earningsRateID: 4369b0ef-a64d-42e1-bb6d-f2fc984de133
+ name: My Earnings Rate
+ earningsType: RegularEarnings
+ rateType: RatePerUnit
+ typeOfUnits: hours
+ currentRecord: true
+ expenseAccountID: e4eb36f6-97e3-4427-a394-dd4e1b355c2e
+ fixedAmount: null
+ ratePerUnit: null
+ multipleOfOrdinaryEarningsRate: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -3280,19 +3166,20 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EarningsRate'
- example: {
- "name": "My Earnings Rate",
- "earningsType": "RegularEarnings",
- "rateType": "RatePerUnit",
- "typeOfUnits": "hours",
- "expenseAccountID": "e4eb36f6-97e3-4427-a394-dd4e1b355c2e"
- }
+ example:
+ name: My Earnings Rate
+ earningsType: RegularEarnings
+ rateType: RatePerUnit
+ typeOfUnits: hours
+ expenseAccountID: e4eb36f6-97e3-4427-a394-dd4e1b355c2e
/EarningsRates/{EarningsRateID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getEarningsRate
@@ -3308,38 +3195,38 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EarningsRateObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T18:25:57.8191994",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "earningsRate": {
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "name": "Ordinary Time",
- "earningsType": "RegularEarnings",
- "rateType": "RatePerUnit",
- "typeOfUnits": "hours",
- "currentRecord": true,
- "expenseAccountID": "1c91e520-a12b-45cc-8194-99950858e5bf",
- "fixedAmount": null,
- "ratePerUnit": null,
- "multipleOfOrdinaryEarningsRate": null
- }
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T18:25:57.8191994
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ earningsRate:
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ name: Ordinary Time
+ earningsType: RegularEarnings
+ rateType: RatePerUnit
+ typeOfUnits: hours
+ currentRecord: true
+ expenseAccountID: 1c91e520-a12b-45cc-8194-99950858e5bf
+ fixedAmount: null
+ ratePerUnit: null
+ multipleOfOrdinaryEarningsRate: null
/LeaveTypes:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getLeaveTypes
@@ -3360,50 +3247,44 @@ paths:
schema:
type: boolean
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/LeaveTypes'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T20:49:58.4095603",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 15
- },
- "problem": null,
- "leaveTypes": [
- {
- "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4",
- "name": "Annual Leave",
- "isPaidLeave": true,
- "showOnPayslip": true,
- "updatedDateUTC": "2019-09-22T23:09:32Z",
- "isActive": true,
- "typeOfUnits": "Hours",
- "typeOfUnitsToAccrue": "Days"
- },
- {
- "leaveTypeID": "71b548db-6e40-4b64-be8b-f6a71455d8ab",
- "name": "Annual Leave - Cash Up",
- "isPaidLeave": true,
- "showOnPayslip": true,
- "updatedDateUTC": "2019-09-22T23:09:32Z",
- "isActive": true,
- "typeOfUnits": "Hours",
- "typeOfUnitsToAccrue": "Days"
- }
- ]
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T20:49:58.4095603
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 15
+ problem: null
+ leaveTypes:
+ - leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4
+ name: Annual Leave
+ isPaidLeave: true
+ showOnPayslip: true
+ updatedDateUTC: "2019-09-22T23:09:32Z"
+ isActive: true
+ typeOfUnits: Hours
+ typeOfUnitsToAccrue: Days
+ - leaveTypeID: 71b548db-6e40-4b64-be8b-f6a71455d8ab
+ name: Annual Leave - Cash Up
+ isPaidLeave: true
+ showOnPayslip: true
+ updatedDateUTC: "2019-09-22T23:09:32Z"
+ isActive: true
+ typeOfUnits: Hours
+ typeOfUnitsToAccrue: Days
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollNz
operationId: createLeaveType
@@ -3424,46 +3305,44 @@ paths:
key: isPaidLeave
keyPascal: IsPaidLeave
keySnake: is_paid_leave
- nonString: true
+ nonString: true
object: leaveType
- default: true
+ default: true
- showOnPayslip:
key: showOnPayslip
keyPascal: ShowOnPayslip
keySnake: show_on_payslip
- nonString: true
+ nonString: true
object: leaveType
- default: true
+ default: true
is_last: true
summary: Creates a new leave type
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/LeaveTypeObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T20:49:59.9135451",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leaveType": {
- "leaveTypeID": "80464f55-b5c9-4d05-84c7-219d98baa3e2",
- "name": "My wqwhhiktun Leave",
- "isPaidLeave": false,
- "showOnPayslip": true,
- "updatedDateUTC": "2020-08-27T20:49:59.8315619",
- "isActive": true,
- "typeOfUnits": "Hours",
- "typeOfUnitsToAccrue": "Hours"
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T20:49:59.9135451
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leaveType:
+ leaveTypeID: 80464f55-b5c9-4d05-84c7-219d98baa3e2
+ name: My wqwhhiktun Leave
+ isPaidLeave: false
+ showOnPayslip: true
+ updatedDateUTC: 2020-08-27T20:49:59.8315619
+ isActive: true
+ typeOfUnits: Hours
+ typeOfUnitsToAccrue: Hours
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -3475,17 +3354,18 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/LeaveType'
- example: {
- "name": "My wqwhhiktun Leave",
- "isPaidLeave": false,
- "showOnPayslip": true
- }
+ example:
+ name: My wqwhhiktun Leave
+ isPaidLeave: false
+ showOnPayslip: true
/LeaveTypes/{LeaveTypeID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getLeaveType
@@ -3501,36 +3381,36 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/LeaveTypeObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T20:49:58.7293665",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leaveType": {
- "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4",
- "name": "Annual Leave",
- "isPaidLeave": true,
- "showOnPayslip": true,
- "updatedDateUTC": "2019-09-22T23:09:32",
- "isActive": true,
- "typeOfUnits": "Hours",
- "typeOfUnitsToAccrue": "Days"
- }
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T20:49:58.7293665
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leaveType:
+ leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4
+ name: Annual Leave
+ isPaidLeave: true
+ showOnPayslip: true
+ updatedDateUTC: 2019-09-22T23:09:32
+ isActive: true
+ typeOfUnits: Hours
+ typeOfUnitsToAccrue: Days
/Reimbursements:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getReimbursements
@@ -3543,41 +3423,37 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Reimbursements'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T21:59:44.5592312",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 3
- },
- "problem": null,
- "reimbursements": [
- {
- "reimbursementID": "ddf9b572-5861-4f97-a109-9d612df52242",
- "name": "Mileage",
- "accountID": "36d33c5d-7dea-4911-9ed0-7fccc16f2b5f",
- "currentRecord": true,
- "standardAmount": null,
- "standardTypeOfUnits": "km",
- "standardRatePerUnit": 0.79,
- "reimbursementCategory": "NoGST",
- "calculationType": "RatePerUnit"
- }
- ]
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T21:59:44.5592312
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 3
+ problem: null
+ reimbursements:
+ - reimbursementID: ddf9b572-5861-4f97-a109-9d612df52242
+ name: Mileage
+ accountID: 36d33c5d-7dea-4911-9ed0-7fccc16f2b5f
+ currentRecord: true
+ standardAmount: null
+ standardTypeOfUnits: km
+ standardRatePerUnit: 0.79
+ reimbursementCategory: NoGST
+ calculationType: RatePerUnit
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollNz
operationId: createReimbursement
@@ -3599,14 +3475,14 @@ paths:
keyPascal: AccountID
keySnake: account_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: reimbursement
is_last: true
- calculationType:
key: calculationType
keyPascal: CalculationType
keySnake: calculation_type
- nonString: true
+ nonString: true
default: Reimbursement.CalculationTypeEnum.FixedAmount
php: XeroAPI\XeroPHP\Models\PayrollNz\Reimbursement\CalculationTypeEnum.FIXEDAMOUNT
node: Reimbursement.CalculationTypeEnum.FixedAmount
@@ -3619,7 +3495,7 @@ paths:
key: reimbursementCategory
keyPascal: ReimbursementCategory
keySnake: reimbursement_category
- nonString: true
+ nonString: true
default: Reimbursement.ReimbursementCategoryEnum.GST
php: XeroAPI\XeroPHP\Models\PayrollNz\Reimbursement\ReimbursementCategoryEnum.GST
node: Reimbursement.ReimbursementCategoryEnum.GST
@@ -3633,32 +3509,30 @@ paths:
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/ReimbursementObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T23:25:30.5238274",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "reimbursement": {
- "reimbursementID": "c7a8e7fd-b4f1-4f7b-9256-1b3edaa72de7",
- "name": "My new Reimburse",
- "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488",
- "currentRecord": true,
- "standardAmount": null,
- "standardTypeOfUnits": null,
- "standardRatePerUnit": null,
- "reimbursementCategory": "GSTInclusive",
- "calculationType": "FixedAmount"
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T23:25:30.5238274
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ reimbursement:
+ reimbursementID: c7a8e7fd-b4f1-4f7b-9256-1b3edaa72de7
+ name: My new Reimburse
+ accountID: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488
+ currentRecord: true
+ standardAmount: null
+ standardTypeOfUnits: null
+ standardRatePerUnit: null
+ reimbursementCategory: GSTInclusive
+ calculationType: FixedAmount
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -3670,18 +3544,19 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Reimbursement'
- example: {
- "name": "My new Reimburse",
- "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488",
- "reimbursementCategory": "GSTInclusive",
- "calculationType": "FixedAmount"
- }
+ example:
+ name: My new Reimburse
+ accountID: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488
+ reimbursementCategory: GSTInclusive
+ calculationType: FixedAmount
/Reimbursements/{ReimbursementID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getReimbursement
@@ -3697,37 +3572,37 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/ReimbursementObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T21:59:46.5643076",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "reimbursement": {
- "reimbursementID": "0d4e5476-1147-4a2c-9db4-ab6a15f81f1d",
- "name": "GST",
- "accountID": null,
- "currentRecord": true,
- "standardAmount": null,
- "standardTypeOfUnits": null,
- "standardRatePerUnit": null,
- "reimbursementCategory": "GST",
- "calculationType": null
- }
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T21:59:46.5643076
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ reimbursement:
+ reimbursementID: 0d4e5476-1147-4a2c-9db4-ab6a15f81f1d
+ name: GST
+ accountID: null
+ currentRecord: true
+ standardAmount: null
+ standardTypeOfUnits: null
+ standardRatePerUnit: null
+ reimbursementCategory: GST
+ calculationType: null
/Timesheets:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.timesheets, payroll.timesheets.read]
+ - OAuth2:
+ - payroll.timesheets
+ - payroll.timesheets.read
tags:
- PayrollNz
operationId: getTimesheets
@@ -3773,40 +3648,36 @@ paths:
type: string
example: startDate
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Timesheets'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T21:07:39.0921081",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 1
- },
- "problem": null,
- "timesheets": [
- {
- "timesheetID": "f2a2aff0-9944-411e-bc58-44f22304188d",
- "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197",
- "employeeID": "272a7559-1b8f-4d3a-977b-d05578cb9546",
- "startDate": "2020-08-01T00:00:00",
- "endDate": "2020-08-31T00:00:00",
- "status": "Draft",
- "totalHours": 17,
- "updatedDateUTC": "2020-08-28T20:50:40"
- }
- ]
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T21:07:39.0921081
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 1
+ problem: null
+ timesheets:
+ - timesheetID: f2a2aff0-9944-411e-bc58-44f22304188d
+ payrollCalendarID: f6931b89-d9c8-4f25-b4fa-268b5fd24197
+ employeeID: 272a7559-1b8f-4d3a-977b-d05578cb9546
+ startDate: 2020-08-01T00:00:00
+ endDate: 2020-08-31T00:00:00
+ status: Draft
+ totalHours: 17
+ updatedDateUTC: 2020-08-28T20:50:40
post:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollNz
operationId: createTimesheet
@@ -3819,13 +3690,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- endDateValue:
key: endDate
keyPascal: EndDate
@@ -3833,13 +3704,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- timesheet:
key: timesheet
keyPascal: Timesheet
@@ -3850,13 +3721,13 @@ paths:
keyPascal: PayrollCalendarID
keySnake: payroll_calendar_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
- employeeID:
key: employeeID
keyPascal: EmployeeID
keySnake: employee_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
- startDate:
is_variable: true
nonString: true
@@ -3868,7 +3739,7 @@ paths:
ruby: start_date
object: timesheet
- endDate:
- is_last: true
+ is_last: true
is_variable: true
nonString: true
key: endDate
@@ -3882,47 +3753,40 @@ paths:
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T21:07:41.7980254",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "timesheet": {
- "timesheetID": "d227445a-4188-453a-a196-48163a38188c",
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995",
- "startDate": "2020-04-13T00:00:00",
- "endDate": "2020-04-19T00:00:00",
- "status": "Draft",
- "totalHours": 14,
- "updatedDateUTC": "2020-08-28T21:07:41.9676218",
- "timesheetLines": [
- {
- "timesheetLineID": "ebeda184-6f42-4c44-a19c-3c0308578153",
- "date": "2020-04-15T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 6
- },
- {
- "timesheetLineID": "e8e9d84f-d01d-4ab9-9584-3996c898b89c",
- "date": "2020-04-13T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 8
- }
- ]
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T21:07:41.7980254
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ timesheet:
+ timesheetID: d227445a-4188-453a-a196-48163a38188c
+ payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ employeeID: 68342973-c405-4b86-b5d3-d7b877c27995
+ startDate: 2020-04-13T00:00:00
+ endDate: 2020-04-19T00:00:00
+ status: Draft
+ totalHours: 14
+ updatedDateUTC: 2020-08-28T21:07:41.9676218
+ timesheetLines:
+ - timesheetLineID: ebeda184-6f42-4c44-a19c-3c0308578153
+ date: 2020-04-15T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 6
+ - timesheetLineID: e8e9d84f-d01d-4ab9-9584-3996c898b89c
+ date: 2020-04-13T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 8
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -3934,30 +3798,26 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Timesheet'
- example: {
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995",
- "startDate": "2020-04-13",
- "endDate": "2020-04-19",
- "timesheetLines": [
- {
- "date": "2020-04-13",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "numberOfUnits": 8
- },
- {
- "date": "2020-04-15",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "numberOfUnits": 6
- }
- ]
- }
+ example:
+ payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ employeeID: 68342973-c405-4b86-b5d3-d7b877c27995
+ startDate: "2020-04-13"
+ endDate: "2020-04-19"
+ timesheetLines:
+ - date: "2020-04-13"
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ numberOfUnits: 8
+ - date: "2020-04-15"
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ numberOfUnits: 6
/Timesheets/{TimesheetID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.timesheets, payroll.timesheets.read]
+ - OAuth2:
+ - payroll.timesheets
+ - payroll.timesheets.read
tags:
- PayrollNz
operationId: getTimesheet
@@ -3973,56 +3833,48 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T21:07:39.0637818",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "timesheet": {
- "timesheetID": "f2a2aff0-9944-411e-bc58-44f22304188d",
- "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197",
- "employeeID": "272a7559-1b8f-4d3a-977b-d05578cb9546",
- "startDate": "2020-08-01T00:00:00",
- "endDate": "2020-08-31T00:00:00",
- "status": "Draft",
- "totalHours": 17,
- "updatedDateUTC": "2020-08-28T20:50:40",
- "timesheetLines": [
- {
- "timesheetLineID": "3397aab1-6cac-4804-a72b-00f396b04a08",
- "date": "2020-08-01T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 7
- },
- {
- "timesheetLineID": "11f3608f-c53a-474d-ba17-053849de318b",
- "date": "2020-08-02T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 5
- },
- {
- "timesheetLineID": "f5b416b7-d431-4d54-baff-9cd6de620c70",
- "date": "2020-08-03T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 5
- }
- ]
- }
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T21:07:39.0637818
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ timesheet:
+ timesheetID: f2a2aff0-9944-411e-bc58-44f22304188d
+ payrollCalendarID: f6931b89-d9c8-4f25-b4fa-268b5fd24197
+ employeeID: 272a7559-1b8f-4d3a-977b-d05578cb9546
+ startDate: 2020-08-01T00:00:00
+ endDate: 2020-08-31T00:00:00
+ status: Draft
+ totalHours: 17
+ updatedDateUTC: 2020-08-28T20:50:40
+ timesheetLines:
+ - timesheetLineID: 3397aab1-6cac-4804-a72b-00f396b04a08
+ date: 2020-08-01T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 7
+ - timesheetLineID: 11f3608f-c53a-474d-ba17-053849de318b
+ date: 2020-08-02T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 5
+ - timesheetLineID: f5b416b7-d431-4d54-baff-9cd6de620c70
+ date: 2020-08-03T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 5
delete:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollNz
operationId: deleteTimesheet
@@ -4037,21 +3889,20 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetLine'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T21:07:41.4217222",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T21:07:41.4217222
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4062,7 +3913,8 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollNz
operationId: createTimesheetLine
@@ -4075,13 +3927,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- timesheetLine:
key: timesheetLine
keyPascal: TimesheetLine
@@ -4092,7 +3944,7 @@ paths:
keyPascal: TimesheetLineID
keySnake: timesheet_line_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- date:
key: date
@@ -4109,14 +3961,14 @@ paths:
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- trackingItemID:
key: trackingItemID
keyPascal: TrackingItemID
keySnake: tracking_item_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- numberOfUnits:
key: numberOfUnits
@@ -4124,7 +3976,7 @@ paths:
keySnake: number_of_units
default: 6
object: timesheetLine
- nonString: true
+ nonString: true
is_last: true
summary: Create a new timesheet line for a specific time sheet
parameters:
@@ -4138,28 +3990,26 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetLineObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T21:07:39.5955147",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "timesheetLine": {
- "timesheetLineID": "10c3c63e-6cd0-4630-861f-08a2baa657fa",
- "date": "2020-08-03T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 1
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T21:07:39.5955147
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ timesheetLine:
+ timesheetLineID: 10c3c63e-6cd0-4630-861f-08a2baa657fa
+ date: 2020-08-03T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 1
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4171,17 +4021,17 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TimesheetLine'
- example: {
- "date": "2020-08-03",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "numberOfUnits": 1
- }
+ example:
+ date: "2020-08-03"
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ numberOfUnits: 1
/Timesheets/{TimesheetID}/Approve:
parameters:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollNz
operationId: approveTimesheet
@@ -4198,61 +4048,50 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T21:07:40.3918669",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "timesheet": {
- "timesheetID": "f2a2aff0-9944-411e-bc58-44f22304188d",
- "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197",
- "employeeID": "272a7559-1b8f-4d3a-977b-d05578cb9546",
- "startDate": "2020-08-01T00:00:00",
- "endDate": "2020-08-31T00:00:00",
- "status": "Approved",
- "totalHours": 13,
- "updatedDateUTC": "2020-08-28T21:07:40.5613405",
- "timesheetLines": [
- {
- "timesheetLineID": "10c3c63e-6cd0-4630-861f-08a2baa657fa",
- "date": "2020-08-03T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 1
- },
- {
- "timesheetLineID": "3397aab1-6cac-4804-a72b-00f396b04a08",
- "date": "2020-08-04T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 2
- },
- {
- "timesheetLineID": "11f3608f-c53a-474d-ba17-053849de318b",
- "date": "2020-08-02T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 5
- },
- {
- "timesheetLineID": "f5b416b7-d431-4d54-baff-9cd6de620c70",
- "date": "2020-08-03T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 5
- }
- ]
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T21:07:40.3918669
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ timesheet:
+ timesheetID: f2a2aff0-9944-411e-bc58-44f22304188d
+ payrollCalendarID: f6931b89-d9c8-4f25-b4fa-268b5fd24197
+ employeeID: 272a7559-1b8f-4d3a-977b-d05578cb9546
+ startDate: 2020-08-01T00:00:00
+ endDate: 2020-08-31T00:00:00
+ status: Approved
+ totalHours: 13
+ updatedDateUTC: 2020-08-28T21:07:40.5613405
+ timesheetLines:
+ - timesheetLineID: 10c3c63e-6cd0-4630-861f-08a2baa657fa
+ date: 2020-08-03T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 1
+ - timesheetLineID: 3397aab1-6cac-4804-a72b-00f396b04a08
+ date: 2020-08-04T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 2
+ - timesheetLineID: 11f3608f-c53a-474d-ba17-053849de318b
+ date: 2020-08-02T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 5
+ - timesheetLineID: f5b416b7-d431-4d54-baff-9cd6de620c70
+ date: 2020-08-03T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 5
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4263,7 +4102,8 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollNz
operationId: revertTimesheet
@@ -4280,61 +4120,50 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T21:07:41.3053619",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "timesheet": {
- "timesheetID": "f2a2aff0-9944-411e-bc58-44f22304188d",
- "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197",
- "employeeID": "272a7559-1b8f-4d3a-977b-d05578cb9546",
- "startDate": "2020-08-01T00:00:00",
- "endDate": "2020-08-31T00:00:00",
- "status": "Draft",
- "totalHours": 13,
- "updatedDateUTC": "2020-08-28T21:07:41.2608622",
- "timesheetLines": [
- {
- "timesheetLineID": "10c3c63e-6cd0-4630-861f-08a2baa657fa",
- "date": "2020-08-03T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 1
- },
- {
- "timesheetLineID": "3397aab1-6cac-4804-a72b-00f396b04a08",
- "date": "2020-08-04T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 2
- },
- {
- "timesheetLineID": "11f3608f-c53a-474d-ba17-053849de318b",
- "date": "2020-08-02T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 5
- },
- {
- "timesheetLineID": "f5b416b7-d431-4d54-baff-9cd6de620c70",
- "date": "2020-08-03T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 5
- }
- ]
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T21:07:41.3053619
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ timesheet:
+ timesheetID: f2a2aff0-9944-411e-bc58-44f22304188d
+ payrollCalendarID: f6931b89-d9c8-4f25-b4fa-268b5fd24197
+ employeeID: 272a7559-1b8f-4d3a-977b-d05578cb9546
+ startDate: 2020-08-01T00:00:00
+ endDate: 2020-08-31T00:00:00
+ status: Draft
+ totalHours: 13
+ updatedDateUTC: 2020-08-28T21:07:41.2608622
+ timesheetLines:
+ - timesheetLineID: 10c3c63e-6cd0-4630-861f-08a2baa657fa
+ date: 2020-08-03T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 1
+ - timesheetLineID: 3397aab1-6cac-4804-a72b-00f396b04a08
+ date: 2020-08-04T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 2
+ - timesheetLineID: 11f3608f-c53a-474d-ba17-053849de318b
+ date: 2020-08-02T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 5
+ - timesheetLineID: f5b416b7-d431-4d54-baff-9cd6de620c70
+ date: 2020-08-03T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 5
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4345,7 +4174,8 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
put:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollNz
operationId: updateTimesheetLine
@@ -4359,13 +4189,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- timesheetLine:
key: timesheetLine
keyPascal: TimesheetLine
@@ -4376,7 +4206,7 @@ paths:
keyPascal: TimesheetLineID
keySnake: timesheet_line_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- date:
key: date
@@ -4393,14 +4223,14 @@ paths:
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- trackingItemID:
key: trackingItemID
keyPascal: TrackingItemID
keySnake: tracking_item_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- numberOfUnits:
key: numberOfUnits
@@ -4408,7 +4238,7 @@ paths:
keySnake: number_of_units
default: 6
object: timesheetLine
- nonString: true
+ nonString: true
is_last: true
parameters:
- $ref: '#/components/parameters/idempotencyKey'
@@ -4429,28 +4259,26 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetLineObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T21:07:39.9074596",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "timesheetLine": {
- "timesheetLineID": "3397aab1-6cac-4804-a72b-00f396b04a08",
- "date": "2020-08-04T00:00:00",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "trackingItemID": null,
- "numberOfUnits": 2
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T21:07:39.9074596
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ timesheetLine:
+ timesheetLineID: 3397aab1-6cac-4804-a72b-00f396b04a08
+ date: 2020-08-04T00:00:00
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ trackingItemID: null
+ numberOfUnits: 2
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4462,14 +4290,14 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TimesheetLine'
- example: {
- "date": "2020-08-04",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "numberOfUnits": 2
- }
+ example:
+ date: "2020-08-04"
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ numberOfUnits: 2
delete:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollNz
operationId: deleteTimesheetLine
@@ -4492,21 +4320,20 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetLine'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T22:01:51.861069",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T22:01:51.861069
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4517,7 +4344,9 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getPayRunCalendars
@@ -4530,48 +4359,42 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayRunCalendars'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-26T23:54:48.3357097",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 2
- },
- "problem": null,
- "payRunCalendars": [
- {
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "name": "Weekly",
- "calendarType": "Weekly",
- "periodStartDate": "2019-07-08T00:00:00",
- "periodEndDate": "2019-07-14T00:00:00",
- "paymentDate": "2019-07-16T00:00:00",
- "updatedDateUTC": "2019-09-24T05:08:45"
- },
- {
- "payrollCalendarID": "f6931b89-d9c8-4f25-b4fa-268b5fd24197",
- "name": "Monthly",
- "calendarType": "Monthly",
- "periodStartDate": "2019-08-01T00:00:00",
- "periodEndDate": "2019-08-31T00:00:00",
- "paymentDate": "2019-08-23T00:00:00",
- "updatedDateUTC": "2019-09-24T03:11:16"
- }
- ]
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-26T23:54:48.3357097
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 2
+ problem: null
+ payRunCalendars:
+ - payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ name: Weekly
+ calendarType: Weekly
+ periodStartDate: 2019-07-08T00:00:00
+ periodEndDate: 2019-07-14T00:00:00
+ paymentDate: 2019-07-16T00:00:00
+ updatedDateUTC: 2019-09-24T05:08:45
+ - payrollCalendarID: f6931b89-d9c8-4f25-b4fa-268b5fd24197
+ name: Monthly
+ calendarType: Monthly
+ periodStartDate: 2019-08-01T00:00:00
+ periodEndDate: 2019-08-31T00:00:00
+ paymentDate: 2019-08-23T00:00:00
+ updatedDateUTC: 2019-09-24T03:11:16
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollNz
operationId: createPayRunCalendar
@@ -4584,13 +4407,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- paymentDateValue:
key: paymentDate
keyPascal: PaymentDate
@@ -4598,13 +4421,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- payRunCalendar:
key: payRunCalendar
keyPascal: PayRunCalendar
@@ -4614,7 +4437,7 @@ paths:
key: calendarType
keyPascal: CalendarType
keySnake: calendar_type
- nonString: true
+ nonString: true
default: CalendarType.Weekly
php: XeroAPI\XeroPHP\Models\PayrollNz\CalendarType.WEEKLY
node: CalendarType.Weekly
@@ -4637,7 +4460,7 @@ paths:
key: paymentDate
keyPascal: PaymentDate
keySnake: payment_date
- is_last: true
+ is_last: true
is_variable: true
nonString: true
default: paymentDate
@@ -4648,30 +4471,28 @@ paths:
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayRunCalendarObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-26T23:54:49.3159839",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "payRunCalendar": {
- "payrollCalendarID": "54e9706a-c4e8-45ff-9c63-6fcac7ee7cde",
- "name": "My Weekly Cal",
- "calendarType": "Weekly",
- "periodStartDate": "2020-05-01T00:00:00",
- "periodEndDate": "2020-05-07T00:00:00",
- "paymentDate": "2020-05-15T00:00:00",
- "updatedDateUTC": "2020-08-26T23:54:49.4863322"
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-26T23:54:49.3159839
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ payRunCalendar:
+ payrollCalendarID: 54e9706a-c4e8-45ff-9c63-6fcac7ee7cde
+ name: My Weekly Cal
+ calendarType: Weekly
+ periodStartDate: 2020-05-01T00:00:00
+ periodEndDate: 2020-05-07T00:00:00
+ paymentDate: 2020-05-15T00:00:00
+ updatedDateUTC: 2020-08-26T23:54:49.4863322
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4683,18 +4504,19 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/PayRunCalendar'
- example: {
- "name": "My Weekly Cal",
- "calendarType": "Weekly",
- "periodStartDate": "2020-05-01",
- "paymentDate": "2020-05-15"
- }
+ example:
+ name: My Weekly Cal
+ calendarType: Weekly
+ periodStartDate: "2020-05-01"
+ paymentDate: "2020-05-15"
/PayRunCalendars/{PayrollCalendarID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getPayRunCalendar
@@ -4710,35 +4532,35 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayRunCalendarObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-26T23:54:48.4398063",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "payRunCalendar": {
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "name": "Weekly",
- "calendarType": "Weekly",
- "periodStartDate": "2019-07-08T00:00:00",
- "periodEndDate": "2019-07-14T00:00:00",
- "paymentDate": "2019-07-16T00:00:00",
- "updatedDateUTC": "2019-09-24T05:08:45"
- }
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-26T23:54:48.4398063
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ payRunCalendar:
+ payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ name: Weekly
+ calendarType: Weekly
+ periodStartDate: 2019-07-08T00:00:00
+ periodEndDate: 2019-07-14T00:00:00
+ paymentDate: 2019-07-16T00:00:00
+ updatedDateUTC: 2019-09-24T05:08:45
/Employees/{EmployeeID}/SalaryAndWages:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollNz
operationId: getEmployeeSalaryAndWages
@@ -4750,7 +4572,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -4760,54 +4582,47 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/SalaryAndWages'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T00:25:03.6697493",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 2
- },
- "problem": null,
- "salaryAndWages": [
- {
- "salaryAndWagesID": "b0026f5a-fa8e-43aa-95e4-cec3c0972e39",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "numberOfUnitsPerWeek": 0,
- "ratePerUnit": 25,
- "numberOfUnitsPerDay": 0,
- "daysPerWeek": 0,
- "effectiveFrom": "2019-02-07T00:00:00",
- "annualSalary": 25,
- "status": "Active",
- "paymentType": "Hourly",
- "workPatternType": "DaysAndHours"
- },
- {
- "salaryAndWagesID": "0211c70c-93d5-4da1-a570-b66d8df2ca15",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "numberOfUnitsPerWeek": 2,
- "ratePerUnit": null,
- "numberOfUnitsPerDay": 2,
- "daysPerWeek": 1,
- "effectiveFrom": "2020-05-01T00:00:00",
- "annualSalary": 100,
- "status": "Active",
- "paymentType": "Salary",
- "workPatternType": "DaysAndHours"
- }
- ]
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T00:25:03.6697493
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 2
+ problem: null
+ salaryAndWages:
+ - salaryAndWagesID: b0026f5a-fa8e-43aa-95e4-cec3c0972e39
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ numberOfUnitsPerWeek: 0
+ ratePerUnit: 25
+ numberOfUnitsPerDay: 0
+ daysPerWeek: 0
+ effectiveFrom: 2019-02-07T00:00:00
+ annualSalary: 25
+ status: Active
+ paymentType: Hourly
+ workPatternType: DaysAndHours
+ - salaryAndWagesID: 0211c70c-93d5-4da1-a570-b66d8df2ca15
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ numberOfUnitsPerWeek: 2
+ ratePerUnit: null
+ numberOfUnitsPerDay: 2
+ daysPerWeek: 1
+ effectiveFrom: 2020-05-01T00:00:00
+ annualSalary: 100
+ status: Active
+ paymentType: Salary
+ workPatternType: DaysAndHours
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4815,7 +4630,8 @@ paths:
$ref: '#/components/schemas/Problem'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: createEmployeeSalaryAndWage
@@ -4831,27 +4647,27 @@ paths:
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: salaryAndWage
- numberOfUnitsPerDay:
key: numberOfUnitsPerDay
keyPascal: NumberOfUnitsPerDay
keySnake: number_of_units_per_day
- default: 0
- nonString: true
+ default: 0
+ nonString: true
object: salaryAndWage
- daysPerWeek:
key: daysPerWeek
keyPascal: DaysPerWeek
keySnake: days_per_week
- default: 0
- nonString: true
+ default: 0
+ nonString: true
object: salaryAndWage
- paymentType:
key: paymentType
keyPascal: PaymentType
keySnake: payment_type
- nonString: true
+ nonString: true
default: SalaryAndWage.PaymentTypeEnum.Hourly
php: XeroAPI\XeroPHP\Models\PayrollNz\SalaryAndWage\PaymentTypeEnum.HOURLY
node: SalaryAndWage.PaymentTypeEnum.Hourly
@@ -4869,39 +4685,37 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/SalaryAndWageObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T00:22:47.464262",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "salaryAndWages": {
- "salaryAndWagesID": "0211c70c-93d5-4da1-a570-b66d8df2ca15",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "numberOfUnitsPerWeek": 2,
- "ratePerUnit": null,
- "numberOfUnitsPerDay": 2,
- "daysPerWeek": 1,
- "effectiveFrom": "2020-05-01T00:00:00",
- "annualSalary": 100,
- "status": "Active",
- "paymentType": "Salary",
- "workPatternType": "DaysAndHours"
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T00:22:47.464262
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ salaryAndWages:
+ salaryAndWagesID: 0211c70c-93d5-4da1-a570-b66d8df2ca15
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ numberOfUnitsPerWeek: 2
+ ratePerUnit: null
+ numberOfUnitsPerDay: 2
+ daysPerWeek: 1
+ effectiveFrom: 2020-05-01T00:00:00
+ annualSalary: 100
+ status: Active
+ paymentType: Salary
+ workPatternType: DaysAndHours
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4913,23 +4727,24 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/SalaryAndWage'
- example: {
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "numberOfUnitsPerWeek": 2,
- "ratePerUnit": 10,
- "numberOfUnitsPerDay": 2,
- "daysPerWeek": 1,
- "effectiveFrom": "2020-05-01",
- "annualSalary": 100,
- "status": "Active",
- "paymentType": "Salary"
- }
+ example:
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ numberOfUnitsPerWeek: 2
+ ratePerUnit: 10
+ numberOfUnitsPerDay: 2
+ daysPerWeek: 1
+ effectiveFrom: "2020-05-01"
+ annualSalary: 100
+ status: Active
+ paymentType: Salary
/Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollNz
operationId: getEmployeeSalaryAndWage
@@ -4941,7 +4756,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -4949,44 +4764,41 @@ paths:
x-snake: salary_and_wages_id
in: path
required: true
- description: Id for single pay template earnings object
- schema:
+ description: Id for single pay template earnings object
+ schema:
type: string
format: uuid
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/SalaryAndWages'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T00:25:03.8641784",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "salaryAndWages": [
- {
- "salaryAndWagesID": "b0026f5a-fa8e-43aa-95e4-cec3c0972e39",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "numberOfUnitsPerWeek": 0,
- "ratePerUnit": 25,
- "numberOfUnitsPerDay": 0,
- "daysPerWeek": 0,
- "effectiveFrom": "2019-02-07T00:00:00",
- "annualSalary": 25,
- "status": "Active",
- "paymentType": "Hourly",
- "workPatternType": "DaysAndHours"
- }
- ]
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T00:25:03.8641784
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ salaryAndWages:
+ - salaryAndWagesID: b0026f5a-fa8e-43aa-95e4-cec3c0972e39
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ numberOfUnitsPerWeek: 0
+ ratePerUnit: 25
+ numberOfUnitsPerDay: 0
+ daysPerWeek: 0
+ effectiveFrom: 2019-02-07T00:00:00
+ annualSalary: 25
+ status: Active
+ paymentType: Hourly
+ workPatternType: DaysAndHours
put:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: updateEmployeeSalaryAndWage
@@ -5002,27 +4814,27 @@ paths:
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: salaryAndWage
- numberOfUnitsPerDay:
key: numberOfUnitsPerDay
keyPascal: NumberOfUnitsPerDay
keySnake: number_of_units_per_day
- default: 0
- nonString: true
+ default: 0
+ nonString: true
object: salaryAndWage
- daysPerWeek:
key: daysPerWeek
keyPascal: DaysPerWeek
keySnake: days_per_week
- default: 0
- nonString: true
+ default: 0
+ nonString: true
object: salaryAndWage
- paymentType:
key: paymentType
keyPascal: PaymentType
keySnake: payment_type
- nonString: true
+ nonString: true
default: SalaryAndWage.PaymentTypeEnum.Hourly
php: XeroAPI\XeroPHP\Models\PayrollNz\SalaryAndWage\PaymentTypeEnum.HOURLY
node: SalaryAndWage.PaymentTypeEnum.Hourly
@@ -5040,7 +4852,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -5048,40 +4860,38 @@ paths:
x-snake: salary_and_wages_id
in: path
required: true
- description: Id for single pay template earnings object
- schema:
+ description: Id for single pay template earnings object
+ schema:
type: string
format: uuid
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/SalaryAndWageObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T00:25:11.4976642",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "salaryAndWages": {
- "salaryAndWagesID": "1912d614-99d0-43e6-8d63-5b539dcfe358",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "numberOfUnitsPerWeek": 3,
- "ratePerUnit": null,
- "numberOfUnitsPerDay": 3,
- "daysPerWeek": 1,
- "effectiveFrom": "2020-05-15T00:00:00",
- "annualSalary": 101,
- "status": "Active",
- "paymentType": "Salary",
- "workPatternType": "RegularWeek"
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T00:25:11.4976642
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ salaryAndWages:
+ salaryAndWagesID: 1912d614-99d0-43e6-8d63-5b539dcfe358
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ numberOfUnitsPerWeek: 3
+ ratePerUnit: null
+ numberOfUnitsPerDay: 3
+ daysPerWeek: 1
+ effectiveFrom: 2020-05-15T00:00:00
+ annualSalary: 101
+ status: Active
+ paymentType: Salary
+ workPatternType: RegularWeek
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -5093,20 +4903,20 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/SalaryAndWage'
- example: {
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "numberOfUnitsPerWeek": 3,
- "ratePerUnit": 11,
- "numberOfUnitsPerDay": 3,
- "daysPerWeek": 1,
- "effectiveFrom": "2020-05-15",
- "annualSalary": 101,
- "status": "Active",
- "paymentType": "Salary"
- }
+ example:
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ numberOfUnitsPerWeek: 3
+ ratePerUnit: 11
+ numberOfUnitsPerDay: 3
+ daysPerWeek: 1
+ effectiveFrom: "2020-05-15"
+ annualSalary: 101
+ status: Active
+ paymentType: Salary
delete:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: deleteEmployeeSalaryAndWage
@@ -5117,7 +4927,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -5125,32 +4935,33 @@ paths:
x-snake: salary_and_wages_id
in: path
required: true
- description: Id for single salary and wages object
- schema:
+ description: Id for single salary and wages object
+ schema:
type: string
format: uuid
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
- '200':
+ "200":
description: deletion successful
content:
application/json:
schema:
$ref: '#/components/schemas/SalaryAndWageObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-27T00:25:11.5391097",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-27T00:25:11.5391097
+ httpStatusCode: OK
+ pagination: null
+ problem: null
/PayRuns:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.payruns, payroll.payruns.read]
+ - OAuth2:
+ - payroll.payruns
+ - payroll.payruns.read
tags:
- PayrollNz
operationId: getPayRuns
@@ -5171,44 +4982,40 @@ paths:
- Draft
- Posted
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayRuns'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T23:01:56.762619",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 1
- },
- "problem": null,
- "payRuns": [
- {
- "payRunID": "8ba9831d-38e4-43d4-808e-472a5d195bce",
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "periodStartDate": "2019-06-10T00:00:00",
- "periodEndDate": "2019-06-16T00:00:00",
- "paymentDate": "2019-06-18T00:00:00",
- "totalCost": 6735.81,
- "totalPay": 4524.81,
- "payRunStatus": "Draft",
- "payRunType": "Scheduled",
- "calendarType": "Weekly",
- "postedDateTime": null,
- "payslipMessage": null
- }
- ]
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T23:01:56.762619
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 1
+ problem: null
+ payRuns:
+ - payRunID: 8ba9831d-38e4-43d4-808e-472a5d195bce
+ payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ periodStartDate: 2019-06-10T00:00:00
+ periodEndDate: 2019-06-16T00:00:00
+ paymentDate: 2019-06-18T00:00:00
+ totalCost: 6735.81
+ totalPay: 4524.81
+ payRunStatus: Draft
+ payRunType: Scheduled
+ calendarType: Weekly
+ postedDateTime: null
+ payslipMessage: null
post:
security:
- - OAuth2: [payroll.payruns]
+ - OAuth2:
+ - payroll.payruns
tags:
- PayrollNz
operationId: createPayRun
@@ -5223,7 +5030,7 @@ paths:
key: payRunType
keyPascal: PayRunType
keySnake: pay_run_type
- nonString: true
+ nonString: true
default: PayRun.PayRunTypeEnum.Scheduled
php: XeroAPI\XeroPHP\Models\PayrollNz\PayRun\PayRunTypeEnum.SCHEDULED
node: PayRun.PayRunTypeEnum.Scheduled
@@ -5238,80 +5045,73 @@ paths:
keySnake: payroll_calendar_id
is_uuid: true
object: payRun
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
is_last: true
summary: Creates a pay run
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: created payrun results
content:
application/json:
schema:
$ref: '#/components/schemas/PayRunObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-09-10T23:56:16.2964746",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "payRun": {
- "payRunID": "591dbf2f-786b-4814-8c61-93bebaee47f9",
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "periodStartDate": "2019-06-17T00:00:00",
- "periodEndDate": "2019-06-23T00:00:00",
- "paymentDate": "2019-06-25T00:00:00",
- "totalCost": 9416.7,
- "totalPay": 6137.2,
- "payRunStatus": "Draft",
- "payRunType": "Scheduled",
- "calendarType": "Weekly",
- "postedDateTime": null,
- "paySlips": [
- {
- "paySlipID": "8b3a099c-2309-480a-a6ee-1dc4f4b2668b",
- "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995",
- "lastEdited": null,
- "firstName": "Tony",
- "lastName": "Starkwpjgdjxdvwson",
- "totalEarnings": 3628.8,
- "grossEarnings": 3628.8,
- "totalPay": 2462.72,
- "totalEmployerTaxes": 18.9,
- "totalEmployeeTaxes": 1057.22,
- "totalDeductions": 0,
- "totalReimbursements": 0,
- "totalStatutoryDeductions": 108.86,
- "totalSuperannuation": 108.86,
- "bacsHash": null,
- "paymentMethod": "Electronically"
- },
- {
- "paySlipID": "87ab8047-7066-4609-906a-5b6ee1dc1886",
- "employeeID": "1c4f0c92-03ad-43f2-a690-ee51397ece6a",
- "lastEdited": null,
- "firstName": "GST",
- "lastName": "Contractor",
- "totalEarnings": 480,
- "grossEarnings": 480,
- "totalPay": 456,
- "totalEmployerTaxes": 0,
- "totalEmployeeTaxes": 96,
- "totalDeductions": 0,
- "totalReimbursements": 72,
- "totalStatutoryDeductions": 0,
- "totalSuperannuation": 0,
- "bacsHash": null,
- "paymentMethod": "Electronically"
- }
- ],
- "payslipMessage": null,
- "invalidPayeeIDs": null
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-09-10T23:56:16.2964746
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ payRun:
+ payRunID: 591dbf2f-786b-4814-8c61-93bebaee47f9
+ payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ periodStartDate: 2019-06-17T00:00:00
+ periodEndDate: 2019-06-23T00:00:00
+ paymentDate: 2019-06-25T00:00:00
+ totalCost: 9416.7
+ totalPay: 6137.2
+ payRunStatus: Draft
+ payRunType: Scheduled
+ calendarType: Weekly
+ postedDateTime: null
+ paySlips:
+ - paySlipID: 8b3a099c-2309-480a-a6ee-1dc4f4b2668b
+ employeeID: 68342973-c405-4b86-b5d3-d7b877c27995
+ lastEdited: null
+ firstName: Tony
+ lastName: Starkwpjgdjxdvwson
+ totalEarnings: 3628.8
+ grossEarnings: 3628.8
+ totalPay: 2462.72
+ totalEmployerTaxes: 18.9
+ totalEmployeeTaxes: 1057.22
+ totalDeductions: 0
+ totalReimbursements: 0
+ totalStatutoryDeductions: 108.86
+ totalSuperannuation: 108.86
+ bacsHash: null
+ paymentMethod: Electronically
+ - paySlipID: 87ab8047-7066-4609-906a-5b6ee1dc1886
+ employeeID: 1c4f0c92-03ad-43f2-a690-ee51397ece6a
+ lastEdited: null
+ firstName: GST
+ lastName: Contractor
+ totalEarnings: 480
+ grossEarnings: 480
+ totalPay: 456
+ totalEmployerTaxes: 0
+ totalEmployeeTaxes: 96
+ totalDeductions: 0
+ totalReimbursements: 72
+ totalStatutoryDeductions: 0
+ totalSuperannuation: 0
+ bacsHash: null
+ paymentMethod: Electronically
+ payslipMessage: null
+ invalidPayeeIDs: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -5323,21 +5123,22 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/PayRun'
- example: {
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "periodStartDate": "2020-09-08",
- "periodEndDate": "2020-09-15",
- "paymentDate": "2020-09-20",
- "payRunStatus": "Draft",
- "payRunType": "Scheduled",
- "calendarType": "Weekly"
- }
+ example:
+ payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ periodStartDate: "2020-09-08"
+ periodEndDate: "2020-09-15"
+ paymentDate: "2020-09-20"
+ payRunStatus: Draft
+ payRunType: Scheduled
+ calendarType: Weekly
/PayRuns/{PayRunID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.payruns, payroll.payruns.read]
+ - OAuth2:
+ - payroll.payruns
+ - payroll.payruns.read
tags:
- PayrollNz
operationId: getPayRun
@@ -5353,58 +5154,54 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayRunObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T23:01:57.3773969",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "payRun": {
- "payRunID": "8ba9831d-38e4-43d4-808e-472a5d195bce",
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "periodStartDate": "2019-06-10T00:00:00",
- "periodEndDate": "2019-06-16T00:00:00",
- "paymentDate": "2019-06-18T00:00:00",
- "totalCost": 6735.81,
- "totalPay": 4524.81,
- "payRunStatus": "Draft",
- "payRunType": "Scheduled",
- "calendarType": "Weekly",
- "postedDateTime": null,
- "paySlips": [
- {
- "paySlipID": "51a01760-cf9d-4ba1-bf3a-2065d4f8e073",
- "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995",
- "lastEdited": "2020-08-28T21:58:08",
- "firstName": "Tony",
- "lastName": "Starkmzamlagmdison",
- "totalEarnings": 648,
- "grossEarnings": 648,
- "totalPay": 525,
- "totalEmployerTaxes": 3.32,
- "totalEmployeeTaxes": 103.56,
- "totalDeductions": 0,
- "totalReimbursements": 0,
- "totalStatutoryDeductions": 19.44,
- "totalSuperannuation": 19.44,
- "bacsHash": null,
- "paymentMethod": "Electronically"
- }
- ],
- "payslipMessage": null,
- "invalidPayeeIDs": null
- }
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T23:01:57.3773969
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ payRun:
+ payRunID: 8ba9831d-38e4-43d4-808e-472a5d195bce
+ payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ periodStartDate: 2019-06-10T00:00:00
+ periodEndDate: 2019-06-16T00:00:00
+ paymentDate: 2019-06-18T00:00:00
+ totalCost: 6735.81
+ totalPay: 4524.81
+ payRunStatus: Draft
+ payRunType: Scheduled
+ calendarType: Weekly
+ postedDateTime: null
+ paySlips:
+ - paySlipID: 51a01760-cf9d-4ba1-bf3a-2065d4f8e073
+ employeeID: 68342973-c405-4b86-b5d3-d7b877c27995
+ lastEdited: 2020-08-28T21:58:08
+ firstName: Tony
+ lastName: Starkmzamlagmdison
+ totalEarnings: 648
+ grossEarnings: 648
+ totalPay: 525
+ totalEmployerTaxes: 3.32
+ totalEmployeeTaxes: 103.56
+ totalDeductions: 0
+ totalReimbursements: 0
+ totalStatutoryDeductions: 19.44
+ totalSuperannuation: 19.44
+ bacsHash: null
+ paymentMethod: Electronically
+ payslipMessage: null
+ invalidPayeeIDs: null
put:
security:
- - OAuth2: [payroll.payruns]
+ - OAuth2:
+ - payroll.payruns
tags:
- PayrollNz
operationId: updatePayRun
@@ -5417,13 +5214,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- paymentDateValue:
key: paymentDate
keyPascal: PaymentDate
@@ -5431,13 +5228,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- payRunCalendar:
key: payRunCalendar
keyPascal: PayRunCalendar
@@ -5447,7 +5244,7 @@ paths:
key: calendarType
keyPascal: CalendarType
keySnake: calendar_type
- nonString: true
+ nonString: true
default: CalendarType.Weekly
php: XeroAPI\XeroPHP\Models\PayrollNz\CalendarType.WEEKLY
node: CalendarType.Weekly
@@ -5470,7 +5267,7 @@ paths:
key: paymentDate
keyPascal: PaymentDate
keySnake: payment_date
- is_last: true
+ is_last: true
is_variable: true
nonString: true
default: paymentDate
@@ -5489,146 +5286,131 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayRunObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-09-10T17:38:14.8294283",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "payRun": {
- "payRunID": "8ba9831d-38e4-43d4-808e-472a5d195bce",
- "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030",
- "periodStartDate": "2019-06-10T00:00:00",
- "periodEndDate": "2019-06-16T00:00:00",
- "paymentDate": "2019-07-01T00:00:00",
- "totalCost": 9806.03,
- "totalPay": 6362.53,
- "payRunStatus": "Draft",
- "payRunType": "Scheduled",
- "calendarType": "Weekly",
- "postedDateTime": null,
- "paySlips": [
- {
- "paySlipID": "51a01760-cf9d-4ba1-bf3a-2065d4f8e073",
- "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995",
- "lastEdited": "2020-09-10T17:20:23",
- "firstName": "Tony",
- "lastName": "Starkwpjgdjxdvwson",
- "totalEarnings": 3628.8,
- "grossEarnings": 3628.8,
- "totalPay": 2362.72,
- "totalEmployerTaxes": 18.9,
- "totalEmployeeTaxes": 1057.22,
- "totalDeductions": 100,
- "totalReimbursements": 0,
- "totalStatutoryDeductions": 108.86,
- "totalSuperannuation": 108.86,
- "bacsHash": null,
- "paymentMethod": "Electronically"
- },
- {
- "paySlipID": "499bb866-40fd-44ea-a2d9-91e79e5ac08e",
- "employeeID": "1c4f0c92-03ad-43f2-a690-ee51397ece6a",
- "lastEdited": "2019-09-24T03:14:29",
- "firstName": "GST",
- "lastName": "Contractor",
- "totalEarnings": 800,
- "grossEarnings": 800,
- "totalPay": 760,
- "totalEmployerTaxes": 0,
- "totalEmployeeTaxes": 160,
- "totalDeductions": 0,
- "totalReimbursements": 120,
- "totalStatutoryDeductions": 0,
- "totalSuperannuation": 0,
- "bacsHash": null,
- "paymentMethod": "Electronically"
- },
- {
- "paySlipID": "f98b6411-7755-41f7-8d89-a3475eadf866",
- "employeeID": "2e63a4ff-e911-44fc-8290-a65ec7299b30",
- "lastEdited": "2019-09-24T03:14:06",
- "firstName": "Dairy",
- "lastName": "Milker",
- "totalEarnings": 1353.85,
- "grossEarnings": 1353.85,
- "totalPay": 726.83,
- "totalEmployerTaxes": 22.11,
- "totalEmployeeTaxes": 290.97,
- "totalDeductions": 200,
- "totalReimbursements": 21.33,
- "totalStatutoryDeductions": 157.38,
- "totalSuperannuation": 67.69,
- "bacsHash": null,
- "paymentMethod": "Electronically"
- },
- {
- "paySlipID": "0923bc21-900e-4660-b37c-127c59bd4b12",
- "employeeID": "9126967a-99a1-4b46-a0f3-43e28737756e",
- "lastEdited": "2019-09-24T03:14:15",
- "firstName": "General",
- "lastName": "Manager",
- "totalEarnings": 1730.77,
- "grossEarnings": 1730.77,
- "totalPay": 1151.71,
- "totalEmployerTaxes": 22.77,
- "totalEmployeeTaxes": 410.6,
- "totalDeductions": 30,
- "totalReimbursements": 0,
- "totalStatutoryDeductions": 138.46,
- "totalSuperannuation": 69.23,
- "bacsHash": null,
- "paymentMethod": "Electronically"
- },
- {
- "paySlipID": "df88d132-3cd6-43f3-8c4a-28ca53406138",
- "employeeID": "ae679eeb-8708-4e3b-afe9-2de117a7f68f",
- "lastEdited": "2019-09-24T03:18:06",
- "firstName": "Part-time",
- "lastName": "Worker",
- "totalEarnings": 450,
- "grossEarnings": 450,
- "totalPay": 339.45,
- "totalEmployerTaxes": 2.27,
- "totalEmployeeTaxes": 66.15,
- "totalDeductions": 0,
- "totalReimbursements": 0,
- "totalStatutoryDeductions": 44.4,
- "totalSuperannuation": 13.5,
- "bacsHash": null,
- "paymentMethod": "Electronically"
- },
- {
- "paySlipID": "ae8d94e8-c30f-4b19-88df-a68c1bda2b90",
- "employeeID": "45e50e4b-7979-4d3b-b943-8c4f0cb9df3d",
- "lastEdited": "2019-09-24T03:18:25",
- "firstName": "Permanent",
- "lastName": "Worker",
- "totalEarnings": 1400,
- "grossEarnings": 1400,
- "totalPay": 1021.82,
- "totalEmployerTaxes": 13.86,
- "totalEmployeeTaxes": 300.18,
- "totalDeductions": 22,
- "totalReimbursements": 0,
- "totalStatutoryDeductions": 56,
- "totalSuperannuation": 42,
- "bacsHash": null,
- "paymentMethod": "Electronically"
- }
- ],
- "payslipMessage": null,
- "invalidPayeeIDs": null
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-09-10T17:38:14.8294283
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ payRun:
+ payRunID: 8ba9831d-38e4-43d4-808e-472a5d195bce
+ payrollCalendarID: 9aa56064-990f-4ad3-a189-d966d8f6a030
+ periodStartDate: 2019-06-10T00:00:00
+ periodEndDate: 2019-06-16T00:00:00
+ paymentDate: 2019-07-01T00:00:00
+ totalCost: 9806.03
+ totalPay: 6362.53
+ payRunStatus: Draft
+ payRunType: Scheduled
+ calendarType: Weekly
+ postedDateTime: null
+ paySlips:
+ - paySlipID: 51a01760-cf9d-4ba1-bf3a-2065d4f8e073
+ employeeID: 68342973-c405-4b86-b5d3-d7b877c27995
+ lastEdited: 2020-09-10T17:20:23
+ firstName: Tony
+ lastName: Starkwpjgdjxdvwson
+ totalEarnings: 3628.8
+ grossEarnings: 3628.8
+ totalPay: 2362.72
+ totalEmployerTaxes: 18.9
+ totalEmployeeTaxes: 1057.22
+ totalDeductions: 100
+ totalReimbursements: 0
+ totalStatutoryDeductions: 108.86
+ totalSuperannuation: 108.86
+ bacsHash: null
+ paymentMethod: Electronically
+ - paySlipID: 499bb866-40fd-44ea-a2d9-91e79e5ac08e
+ employeeID: 1c4f0c92-03ad-43f2-a690-ee51397ece6a
+ lastEdited: 2019-09-24T03:14:29
+ firstName: GST
+ lastName: Contractor
+ totalEarnings: 800
+ grossEarnings: 800
+ totalPay: 760
+ totalEmployerTaxes: 0
+ totalEmployeeTaxes: 160
+ totalDeductions: 0
+ totalReimbursements: 120
+ totalStatutoryDeductions: 0
+ totalSuperannuation: 0
+ bacsHash: null
+ paymentMethod: Electronically
+ - paySlipID: f98b6411-7755-41f7-8d89-a3475eadf866
+ employeeID: 2e63a4ff-e911-44fc-8290-a65ec7299b30
+ lastEdited: 2019-09-24T03:14:06
+ firstName: Dairy
+ lastName: Milker
+ totalEarnings: 1353.85
+ grossEarnings: 1353.85
+ totalPay: 726.83
+ totalEmployerTaxes: 22.11
+ totalEmployeeTaxes: 290.97
+ totalDeductions: 200
+ totalReimbursements: 21.33
+ totalStatutoryDeductions: 157.38
+ totalSuperannuation: 67.69
+ bacsHash: null
+ paymentMethod: Electronically
+ - paySlipID: 0923bc21-900e-4660-b37c-127c59bd4b12
+ employeeID: 9126967a-99a1-4b46-a0f3-43e28737756e
+ lastEdited: 2019-09-24T03:14:15
+ firstName: General
+ lastName: Manager
+ totalEarnings: 1730.77
+ grossEarnings: 1730.77
+ totalPay: 1151.71
+ totalEmployerTaxes: 22.77
+ totalEmployeeTaxes: 410.6
+ totalDeductions: 30
+ totalReimbursements: 0
+ totalStatutoryDeductions: 138.46
+ totalSuperannuation: 69.23
+ bacsHash: null
+ paymentMethod: Electronically
+ - paySlipID: df88d132-3cd6-43f3-8c4a-28ca53406138
+ employeeID: ae679eeb-8708-4e3b-afe9-2de117a7f68f
+ lastEdited: 2019-09-24T03:18:06
+ firstName: Part-time
+ lastName: Worker
+ totalEarnings: 450
+ grossEarnings: 450
+ totalPay: 339.45
+ totalEmployerTaxes: 2.27
+ totalEmployeeTaxes: 66.15
+ totalDeductions: 0
+ totalReimbursements: 0
+ totalStatutoryDeductions: 44.4
+ totalSuperannuation: 13.5
+ bacsHash: null
+ paymentMethod: Electronically
+ - paySlipID: ae8d94e8-c30f-4b19-88df-a68c1bda2b90
+ employeeID: 45e50e4b-7979-4d3b-b943-8c4f0cb9df3d
+ lastEdited: 2019-09-24T03:18:25
+ firstName: Permanent
+ lastName: Worker
+ totalEarnings: 1400
+ grossEarnings: 1400
+ totalPay: 1021.82
+ totalEmployerTaxes: 13.86
+ totalEmployeeTaxes: 300.18
+ totalDeductions: 22
+ totalReimbursements: 0
+ totalStatutoryDeductions: 56
+ totalSuperannuation: 42
+ bacsHash: null
+ paymentMethod: Electronically
+ payslipMessage: null
+ invalidPayeeIDs: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -5640,15 +5422,16 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/PayRun'
- example: {
- "paymentDate": "2019-07-01"
- }
+ example:
+ paymentDate: "2019-07-01"
/PaySlips:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.payslip, payroll.payslip.read]
+ - OAuth2:
+ - payroll.payslip
+ - payroll.payslip.read
tags:
- PayrollNz
operationId: getPaySlips
@@ -5669,158 +5452,123 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PaySlips'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T22:55:58.6809685",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 6
- },
- "problem": null,
- "paySlips": [
- {
- "paySlipID": "17d88883-686a-400f-9551-34fa366effc4",
- "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995",
- "payRunID": "be103bd8-321b-419f-8177-48280560771a",
- "lastEdited": "2019-09-23T02:13:29",
- "firstName": "Tony",
- "lastName": "Starkmzamlagmdison",
- "totalEarnings": 162,
- "grossEarnings": 162,
- "totalPay": 137.88,
- "totalEmployerTaxes": 0.7,
- "totalEmployeeTaxes": 19.26,
- "totalDeductions": 0,
- "totalReimbursements": 0,
- "totalStatutoryDeductions": 4.86,
- "totalSuperannuation": 4.86,
- "bacsHash": null,
- "paymentMethod": "Electronically",
- "earningsLines": [
- {
- "earningsLineID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "displayName": "Ordinary Time",
- "ratePerUnit": 25,
- "numberOfUnits": 6,
- "fixedAmount": null,
- "amount": 150,
- "isLinkedToTimesheet": false,
- "isAverageDailyPayRate": null,
- "isSystemGenerated": true
- }
- ],
- "leaveEarningsLines": [
- {
- "earningsLineID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6",
- "earningsRateID": "39b3560a-5d2f-4538-924a-4349dc86396e",
- "displayName": "Holiday Pay",
- "ratePerUnit": null,
- "numberOfUnits": null,
- "fixedAmount": 12,
- "amount": 12,
- "isLinkedToTimesheet": false,
- "isAverageDailyPayRate": null,
- "isSystemGenerated": true
- }
- ],
- "timesheetEarningsLines": [],
- "deductionLines": [],
- "reimbursementLines": [],
- "leaveAccrualLines": [
- {
- "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6",
- "numberOfUnits": 12
- },
- {
- "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4",
- "numberOfUnits": 0
- },
- {
- "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719",
- "numberOfUnits": 0
- },
- {
- "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3",
- "numberOfUnits": 0
- }
- ],
- "superannuationLines": [
- {
- "superannuationTypeID": "563273ea-0dae-4f82-86a4-e0db77c008ea",
- "displayName": "KiwiSaver",
- "amount": 4.86,
- "fixedAmount": null,
- "percentage": 3,
- "manualAdjustment": false
- }
- ],
- "paymentLines": [
- {
- "paymentLineID": "a300f7c3-e934-4e67-84c5-d8687cf4a2b4",
- "amount": 137.88,
- "accountNumber": "0607050201419000",
- "sortCode": null,
- "accountName": "Casual Worker"
- }
- ],
- "employeeTaxLines": [
- {
- "taxLineID": "1d7c6670-c227-4de9-a7fc-fbf7ec16a804",
- "description": null,
- "amount": 19.26,
- "globalTaxTypeID": 11,
- "manualAdjustment": false
- }
- ],
- "employerTaxLines": [
- {
- "taxLineID": "b790f489-9bbf-4979-a987-53dddf8b648f",
- "description": null,
- "amount": 0.7,
- "globalTaxTypeID": 10,
- "manualAdjustment": false
- }
- ],
- "statutoryDeductionLines": [
- {
- "statutoryDeductionTypeID": "b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3",
- "amount": 4.86,
- "fixedAmount": null,
- "manualAdjustment": null
- }
- ],
- "taxSettings": {
- "periodUnits": 1.0,
- "periodType": "weeks",
- "taxCode": "M",
- "specialTaxRate": null,
- "lumpSumTaxCode": "SB",
- "lumpSumAmount": null
- },
- "grossEarningsHistory": {
- "daysPaid": 1,
- "unpaidWeeks": 0
- }
- }
- ]
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T22:55:58.6809685
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 6
+ problem: null
+ paySlips:
+ - paySlipID: 17d88883-686a-400f-9551-34fa366effc4
+ employeeID: 68342973-c405-4b86-b5d3-d7b877c27995
+ payRunID: be103bd8-321b-419f-8177-48280560771a
+ lastEdited: 2019-09-23T02:13:29
+ firstName: Tony
+ lastName: Starkmzamlagmdison
+ totalEarnings: 162
+ grossEarnings: 162
+ totalPay: 137.88
+ totalEmployerTaxes: 0.7
+ totalEmployeeTaxes: 19.26
+ totalDeductions: 0
+ totalReimbursements: 0
+ totalStatutoryDeductions: 4.86
+ totalSuperannuation: 4.86
+ bacsHash: null
+ paymentMethod: Electronically
+ earningsLines:
+ - earningsLineID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ displayName: Ordinary Time
+ ratePerUnit: 25
+ numberOfUnits: 6
+ fixedAmount: null
+ amount: 150
+ isLinkedToTimesheet: false
+ isAverageDailyPayRate: null
+ isSystemGenerated: true
+ leaveEarningsLines:
+ - earningsLineID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6
+ earningsRateID: 39b3560a-5d2f-4538-924a-4349dc86396e
+ displayName: Holiday Pay
+ ratePerUnit: null
+ numberOfUnits: null
+ fixedAmount: 12
+ amount: 12
+ isLinkedToTimesheet: false
+ isAverageDailyPayRate: null
+ isSystemGenerated: true
+ timesheetEarningsLines: []
+ deductionLines: []
+ reimbursementLines: []
+ leaveAccrualLines:
+ - leaveTypeID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6
+ numberOfUnits: 12
+ - leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4
+ numberOfUnits: 0
+ - leaveTypeID: f2f994cf-1899-46f3-ad4f-5d92d78c3719
+ numberOfUnits: 0
+ - leaveTypeID: 34129765-11cb-4d8c-b568-84a2219beda3
+ numberOfUnits: 0
+ superannuationLines:
+ - superannuationTypeID: 563273ea-0dae-4f82-86a4-e0db77c008ea
+ displayName: KiwiSaver
+ amount: 4.86
+ fixedAmount: null
+ percentage: 3
+ manualAdjustment: false
+ paymentLines:
+ - paymentLineID: a300f7c3-e934-4e67-84c5-d8687cf4a2b4
+ amount: 137.88
+ accountNumber: "0607050201419000"
+ sortCode: null
+ accountName: Casual Worker
+ employeeTaxLines:
+ - taxLineID: 1d7c6670-c227-4de9-a7fc-fbf7ec16a804
+ description: null
+ amount: 19.26
+ globalTaxTypeID: 11
+ manualAdjustment: false
+ employerTaxLines:
+ - taxLineID: b790f489-9bbf-4979-a987-53dddf8b648f
+ description: null
+ amount: 0.7
+ globalTaxTypeID: 10
+ manualAdjustment: false
+ statutoryDeductionLines:
+ - statutoryDeductionTypeID: b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3
+ amount: 4.86
+ fixedAmount: null
+ manualAdjustment: null
+ taxSettings:
+ periodUnits: 1.0
+ periodType: weeks
+ taxCode: M
+ specialTaxRate: null
+ lumpSumTaxCode: SB
+ lumpSumAmount: null
+ grossEarningsHistory:
+ daysPaid: 1
+ unpaidWeeks: 0
/PaySlips/{PaySlipID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.payslip, payroll.payslip.read]
+ - OAuth2:
+ - payroll.payslip
+ - payroll.payslip.read
tags:
- PayrollNz
operationId: getPaySlip
@@ -5836,148 +5584,115 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PaySlipObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T22:55:59.3854985",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "paySlip": {
- "paySlipID": "17d88883-686a-400f-9551-34fa366effc4",
- "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995",
- "payRunID": "be103bd8-321b-419f-8177-48280560771a",
- "lastEdited": "2019-09-23T02:13:29",
- "firstName": "Tony",
- "lastName": "Starkmzamlagmdison",
- "totalEarnings": 162,
- "grossEarnings": 162,
- "totalPay": 137.88,
- "totalEmployerTaxes": 0.7,
- "totalEmployeeTaxes": 19.26,
- "totalDeductions": 0,
- "totalReimbursements": 0,
- "totalStatutoryDeductions": 4.86,
- "totalSuperannuation": 4.86,
- "bacsHash": null,
- "paymentMethod": "Electronically",
- "earningsLines": [
- {
- "earningsLineID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "displayName": "Ordinary Time",
- "ratePerUnit": 25,
- "numberOfUnits": 6,
- "fixedAmount": null,
- "amount": 150,
- "isLinkedToTimesheet": false,
- "isAverageDailyPayRate": null,
- "isSystemGenerated": true
- }
- ],
- "leaveEarningsLines": [
- {
- "earningsLineID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6",
- "earningsRateID": "39b3560a-5d2f-4538-924a-4349dc86396e",
- "displayName": "Holiday Pay",
- "ratePerUnit": null,
- "numberOfUnits": null,
- "fixedAmount": 12,
- "amount": 12,
- "isLinkedToTimesheet": false,
- "isAverageDailyPayRate": null,
- "isSystemGenerated": true
- }
- ],
- "timesheetEarningsLines": [],
- "deductionLines": [],
- "reimbursementLines": [],
- "leaveAccrualLines": [
- {
- "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6",
- "numberOfUnits": 12
- },
- {
- "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4",
- "numberOfUnits": 0
- },
- {
- "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719",
- "numberOfUnits": 0
- },
- {
- "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3",
- "numberOfUnits": 0
- }
- ],
- "superannuationLines": [
- {
- "superannuationTypeID": "563273ea-0dae-4f82-86a4-e0db77c008ea",
- "displayName": "KiwiSaver",
- "amount": 4.86,
- "fixedAmount": null,
- "percentage": 3,
- "manualAdjustment": false
- }
- ],
- "paymentLines": [
- {
- "paymentLineID": "a300f7c3-e934-4e67-84c5-d8687cf4a2b4",
- "amount": 137.88,
- "accountNumber": "0607050201419000",
- "sortCode": null,
- "accountName": "Casual Worker"
- }
- ],
- "employeeTaxLines": [
- {
- "taxLineID": "1d7c6670-c227-4de9-a7fc-fbf7ec16a804",
- "description": null,
- "amount": 19.26,
- "globalTaxTypeID": 11,
- "manualAdjustment": false
- }
- ],
- "employerTaxLines": [
- {
- "taxLineID": "b790f489-9bbf-4979-a987-53dddf8b648f",
- "description": null,
- "amount": 0.7,
- "globalTaxTypeID": 10,
- "manualAdjustment": false
- }
- ],
- "statutoryDeductionLines": [
- {
- "statutoryDeductionTypeID": "b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3",
- "amount": 4.86,
- "fixedAmount": null,
- "manualAdjustment": null
- }
- ],
- "taxSettings": {
- "periodUnits": 1.0,
- "periodType": "weeks",
- "taxCode": "M",
- "specialTaxRate": null,
- "lumpSumTaxCode": "SB",
- "lumpSumAmount": null
- },
- "grossEarningsHistory": {
- "daysPaid": 1,
- "unpaidWeeks": 0
- }
- }
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T22:55:59.3854985
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ paySlip:
+ paySlipID: 17d88883-686a-400f-9551-34fa366effc4
+ employeeID: 68342973-c405-4b86-b5d3-d7b877c27995
+ payRunID: be103bd8-321b-419f-8177-48280560771a
+ lastEdited: 2019-09-23T02:13:29
+ firstName: Tony
+ lastName: Starkmzamlagmdison
+ totalEarnings: 162
+ grossEarnings: 162
+ totalPay: 137.88
+ totalEmployerTaxes: 0.7
+ totalEmployeeTaxes: 19.26
+ totalDeductions: 0
+ totalReimbursements: 0
+ totalStatutoryDeductions: 4.86
+ totalSuperannuation: 4.86
+ bacsHash: null
+ paymentMethod: Electronically
+ earningsLines:
+ - earningsLineID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ displayName: Ordinary Time
+ ratePerUnit: 25
+ numberOfUnits: 6
+ fixedAmount: null
+ amount: 150
+ isLinkedToTimesheet: false
+ isAverageDailyPayRate: null
+ isSystemGenerated: true
+ leaveEarningsLines:
+ - earningsLineID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6
+ earningsRateID: 39b3560a-5d2f-4538-924a-4349dc86396e
+ displayName: Holiday Pay
+ ratePerUnit: null
+ numberOfUnits: null
+ fixedAmount: 12
+ amount: 12
+ isLinkedToTimesheet: false
+ isAverageDailyPayRate: null
+ isSystemGenerated: true
+ timesheetEarningsLines: []
+ deductionLines: []
+ reimbursementLines: []
+ leaveAccrualLines:
+ - leaveTypeID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6
+ numberOfUnits: 12
+ - leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4
+ numberOfUnits: 0
+ - leaveTypeID: f2f994cf-1899-46f3-ad4f-5d92d78c3719
+ numberOfUnits: 0
+ - leaveTypeID: 34129765-11cb-4d8c-b568-84a2219beda3
+ numberOfUnits: 0
+ superannuationLines:
+ - superannuationTypeID: 563273ea-0dae-4f82-86a4-e0db77c008ea
+ displayName: KiwiSaver
+ amount: 4.86
+ fixedAmount: null
+ percentage: 3
+ manualAdjustment: false
+ paymentLines:
+ - paymentLineID: a300f7c3-e934-4e67-84c5-d8687cf4a2b4
+ amount: 137.88
+ accountNumber: "0607050201419000"
+ sortCode: null
+ accountName: Casual Worker
+ employeeTaxLines:
+ - taxLineID: 1d7c6670-c227-4de9-a7fc-fbf7ec16a804
+ description: null
+ amount: 19.26
+ globalTaxTypeID: 11
+ manualAdjustment: false
+ employerTaxLines:
+ - taxLineID: b790f489-9bbf-4979-a987-53dddf8b648f
+ description: null
+ amount: 0.7
+ globalTaxTypeID: 10
+ manualAdjustment: false
+ statutoryDeductionLines:
+ - statutoryDeductionTypeID: b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3
+ amount: 4.86
+ fixedAmount: null
+ manualAdjustment: null
+ taxSettings:
+ periodUnits: 1.0
+ periodType: weeks
+ taxCode: M
+ specialTaxRate: null
+ lumpSumTaxCode: SB
+ lumpSumAmount: null
+ grossEarningsHistory:
+ daysPaid: 1
+ unpaidWeeks: 0
put:
security:
- - OAuth2: [payroll.payslip]
+ - OAuth2:
+ - payroll.payslip
tags:
- PayrollNz
operationId: updatePaySlipLineItems
@@ -5993,44 +5708,44 @@ paths:
keyPascal: EarningsLineID
keySnake: earnings_line_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsLine
- earningsRateID:
key: earningsRateID
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsLine
- ratePerUnit:
key: ratePerUnit
keyPascal: RatePerUnit
keySnake: rate_per_unit
- nonString: true
+ nonString: true
default: 14.25
- is_money: true
+ is_money: true
object: earningsLine
- numberOfUnits:
key: numberOfUnits
keyPascal: NumberOfUnits
keySnake: number_of_units
default: 35.50
- nonString: true
- is_money: true
+ nonString: true
+ is_money: true
object: earningsLine
- isAverageDailyPayRate:
key: isAverageDailyPayRate
keyPascal: IsAverageDailyPayRate
keySnake: is_average_daily_pay_rate
- nonString: true
- default: true
+ nonString: true
+ default: true
object: earningsLine
- isSystemGenerated:
key: isSystemGenerated
keyPascal: IsSystemGenerated
keySnake: is_system_generated
- default: true
- nonString: true
+ default: true
+ nonString: true
is_last: true
object: earningsLine
- earningsLines:
@@ -6065,7 +5780,7 @@ paths:
default: earningsLines
python: earnings_lines
ruby: earnings_lines
- object: paySlip
+ object: paySlip
summary: Creates an employee pay slip
parameters:
- $ref: '#/components/parameters/idempotencyKey'
@@ -6078,173 +5793,132 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PaySlipObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-09-10T17:20:24.2970169",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "paySlip": {
- "paySlipID": "51a01760-cf9d-4ba1-bf3a-2065d4f8e073",
- "employeeID": "68342973-c405-4b86-b5d3-d7b877c27995",
- "payRunID": "8ba9831d-38e4-43d4-808e-472a5d195bce",
- "lastEdited": "2020-09-10T17:20:23.7335017",
- "firstName": "Tony",
- "lastName": "Starkwpjgdjxdvwson",
- "totalEarnings": 3628.8,
- "grossEarnings": 3628.8,
- "totalPay": 2362.72,
- "totalEmployerTaxes": 18.9,
- "totalEmployeeTaxes": 1057.22,
- "totalDeductions": 100,
- "totalReimbursements": 0,
- "totalStatutoryDeductions": 108.86,
- "totalSuperannuation": 108.86,
- "bacsHash": null,
- "paymentMethod": "Electronically",
- "earningsLines": [
- {
- "earningsLineID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "displayName": "Ordinary Time",
- "ratePerUnit": 25,
- "numberOfUnits": 0,
- "fixedAmount": null,
- "amount": 0,
- "isLinkedToTimesheet": false,
- "isAverageDailyPayRate": null,
- "isSystemGenerated": true
- },
- {
- "earningsLineID": "65b83d94-f20f-45e1-85ae-387fcf460c26",
- "earningsRateID": "65b83d94-f20f-45e1-85ae-387fcf460c26",
- "displayName": "Salary",
- "ratePerUnit": 0,
- "numberOfUnits": 8,
- "fixedAmount": null,
- "amount": 0,
- "isLinkedToTimesheet": false,
- "isAverageDailyPayRate": null,
- "isSystemGenerated": false
- }
- ],
- "leaveEarningsLines": [
- {
- "earningsLineID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6",
- "earningsRateID": "39b3560a-5d2f-4538-924a-4349dc86396e",
- "displayName": "Holiday Pay",
- "ratePerUnit": null,
- "numberOfUnits": null,
- "fixedAmount": 268.8,
- "amount": 268.8,
- "isLinkedToTimesheet": false,
- "isAverageDailyPayRate": null,
- "isSystemGenerated": true
- }
- ],
- "timesheetEarningsLines": [],
- "deductionLines": [
- {
- "deductionTypeID": "a3760fe4-68a4-4e38-8326-fe616af7dc74",
- "displayName": "KiwiSaver Voluntary Contributions",
- "amount": 100,
- "subjectToTax": null,
- "percentage": null
- }
- ],
- "reimbursementLines": [],
- "leaveAccrualLines": [
- {
- "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6",
- "numberOfUnits": 268.8
- },
- {
- "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4",
- "numberOfUnits": 0
- },
- {
- "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719",
- "numberOfUnits": 0
- },
- {
- "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3",
- "numberOfUnits": 0
- }
- ],
- "superannuationLines": [
- {
- "superannuationTypeID": "563273ea-0dae-4f82-86a4-e0db77c008ea",
- "displayName": "KiwiSaver",
- "amount": 108.86,
- "fixedAmount": 3,
- "percentage": 3,
- "manualAdjustment": false
- }
- ],
- "paymentLines": [
- {
- "paymentLineID": "6dc42925-2a11-4041-ac9a-4098e77791d5",
- "amount": 2262.72,
- "accountNumber": "0607050201419000",
- "sortCode": null,
- "accountName": "Casual Worker"
- },
- {
- "paymentLineID": "30d6d414-426b-417d-8d0d-d05ca0e5bc88",
- "amount": 100,
- "accountNumber": "1234448494848373",
- "sortCode": null,
- "accountName": "test"
- }
- ],
- "employeeTaxLines": [
- {
- "taxLineID": "2faf8f5d-6446-4bea-a2cd-d5cd7e8b9384",
- "description": null,
- "amount": 1057.22,
- "globalTaxTypeID": 11,
- "manualAdjustment": false
- }
- ],
- "employerTaxLines": [
- {
- "taxLineID": "caa8d4fa-0949-460d-90f5-f43ec9f3db12",
- "description": null,
- "amount": 18.9,
- "globalTaxTypeID": 10,
- "manualAdjustment": false
- }
- ],
- "statutoryDeductionLines": [
- {
- "statutoryDeductionTypeID": "b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3",
- "amount": 108.86,
- "fixedAmount": null,
- "manualAdjustment": null
- }
- ],
- "taxSettings": {
- "periodUnits": 1.0,
- "periodType": "weeks",
- "taxCode": "M",
- "specialTaxRate": null,
- "lumpSumTaxCode": "SB",
- "lumpSumAmount": null
- },
- "grossEarningsHistory": {
- "daysPaid": 3,
- "unpaidWeeks": 0
- }
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-09-10T17:20:24.2970169
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ paySlip:
+ paySlipID: 51a01760-cf9d-4ba1-bf3a-2065d4f8e073
+ employeeID: 68342973-c405-4b86-b5d3-d7b877c27995
+ payRunID: 8ba9831d-38e4-43d4-808e-472a5d195bce
+ lastEdited: 2020-09-10T17:20:23.7335017
+ firstName: Tony
+ lastName: Starkwpjgdjxdvwson
+ totalEarnings: 3628.8
+ grossEarnings: 3628.8
+ totalPay: 2362.72
+ totalEmployerTaxes: 18.9
+ totalEmployeeTaxes: 1057.22
+ totalDeductions: 100
+ totalReimbursements: 0
+ totalStatutoryDeductions: 108.86
+ totalSuperannuation: 108.86
+ bacsHash: null
+ paymentMethod: Electronically
+ earningsLines:
+ - earningsLineID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ displayName: Ordinary Time
+ ratePerUnit: 25
+ numberOfUnits: 0
+ fixedAmount: null
+ amount: 0
+ isLinkedToTimesheet: false
+ isAverageDailyPayRate: null
+ isSystemGenerated: true
+ - earningsLineID: 65b83d94-f20f-45e1-85ae-387fcf460c26
+ earningsRateID: 65b83d94-f20f-45e1-85ae-387fcf460c26
+ displayName: Salary
+ ratePerUnit: 0
+ numberOfUnits: 8
+ fixedAmount: null
+ amount: 0
+ isLinkedToTimesheet: false
+ isAverageDailyPayRate: null
+ isSystemGenerated: false
+ leaveEarningsLines:
+ - earningsLineID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6
+ earningsRateID: 39b3560a-5d2f-4538-924a-4349dc86396e
+ displayName: Holiday Pay
+ ratePerUnit: null
+ numberOfUnits: null
+ fixedAmount: 268.8
+ amount: 268.8
+ isLinkedToTimesheet: false
+ isAverageDailyPayRate: null
+ isSystemGenerated: true
+ timesheetEarningsLines: []
+ deductionLines:
+ - deductionTypeID: a3760fe4-68a4-4e38-8326-fe616af7dc74
+ displayName: KiwiSaver Voluntary Contributions
+ amount: 100
+ subjectToTax: null
+ percentage: null
+ reimbursementLines: []
+ leaveAccrualLines:
+ - leaveTypeID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6
+ numberOfUnits: 268.8
+ - leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4
+ numberOfUnits: 0
+ - leaveTypeID: f2f994cf-1899-46f3-ad4f-5d92d78c3719
+ numberOfUnits: 0
+ - leaveTypeID: 34129765-11cb-4d8c-b568-84a2219beda3
+ numberOfUnits: 0
+ superannuationLines:
+ - superannuationTypeID: 563273ea-0dae-4f82-86a4-e0db77c008ea
+ displayName: KiwiSaver
+ amount: 108.86
+ fixedAmount: 3
+ percentage: 3
+ manualAdjustment: false
+ paymentLines:
+ - paymentLineID: 6dc42925-2a11-4041-ac9a-4098e77791d5
+ amount: 2262.72
+ accountNumber: "0607050201419000"
+ sortCode: null
+ accountName: Casual Worker
+ - paymentLineID: 30d6d414-426b-417d-8d0d-d05ca0e5bc88
+ amount: 100
+ accountNumber: "1234448494848373"
+ sortCode: null
+ accountName: test
+ employeeTaxLines:
+ - taxLineID: 2faf8f5d-6446-4bea-a2cd-d5cd7e8b9384
+ description: null
+ amount: 1057.22
+ globalTaxTypeID: 11
+ manualAdjustment: false
+ employerTaxLines:
+ - taxLineID: caa8d4fa-0949-460d-90f5-f43ec9f3db12
+ description: null
+ amount: 18.9
+ globalTaxTypeID: 10
+ manualAdjustment: false
+ statutoryDeductionLines:
+ - statutoryDeductionTypeID: b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3
+ amount: 108.86
+ fixedAmount: null
+ manualAdjustment: null
+ taxSettings:
+ periodUnits: 1.0
+ periodType: weeks
+ taxCode: M
+ specialTaxRate: null
+ lumpSumTaxCode: SB
+ lumpSumAmount: null
+ grossEarningsHistory:
+ daysPaid: 3
+ unpaidWeeks: 0
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -6256,191 +5930,150 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/PaySlip'
- example: {
- "earningsLines": [
- {
- "earningsLineID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "earningsRateID": "f9d8f5b5-9049-47f4-8541-35e200f750a5",
- "displayName": "Ordinary Time",
- "ratePerUnit": 25,
- "numberOfUnits": 0,
- "amount": 0,
- "isLinkedToTimesheet": false,
- "isSystemGenerated": true
- },
- {
- "earningsLineID": "65b83d94-f20f-45e1-85ae-387fcf460c26",
- "earningsRateID": "65b83d94-f20f-45e1-85ae-387fcf460c26",
- "displayName": "Salary",
- "ratePerUnit": 0,
- "numberOfUnits": 8,
- "amount": 0,
- "isLinkedToTimesheet": false,
- "isSystemGenerated": false
- }
- ],
- "leaveEarningsLines": [
- {
- "earningsLineID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6",
- "earningsRateID": "39b3560a-5d2f-4538-924a-4349dc86396e",
- "displayName": "Holiday Pay",
- "fixedAmount": 268.8,
- "amount": 268.8,
- "isLinkedToTimesheet": false,
- "isSystemGenerated": true
- }
- ],
- "deductionLines": [
- {
- "deductionTypeID": "a3760fe4-68a4-4e38-8326-fe616af7dc74",
- "amount": 100
- }
- ],
- "leaveAccrualLines": [
- {
- "leaveTypeID": "0441497f-5dc7-4cd3-a90d-f2e07e21b2a6",
- "numberOfUnits": 268.8
- },
- {
- "leaveTypeID": "b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4",
- "numberOfUnits": 0
- },
- {
- "leaveTypeID": "f2f994cf-1899-46f3-ad4f-5d92d78c3719",
- "numberOfUnits": 0
- },
- {
- "leaveTypeID": "34129765-11cb-4d8c-b568-84a2219beda3",
- "numberOfUnits": 0
- }
- ],
- "superannuationLines": [
- {
- "superannuationTypeID": "563273ea-0dae-4f82-86a4-e0db77c008ea",
- "displayName": "KiwiSaver",
- "amount": 108.86,
- "fixedAmount": 3,
- "percentage": 3,
- "manualAdjustment": false
- }
- ],
- "employeeTaxLines": [
- {
- "taxLineID": "1084146b-e890-489c-aed3-06de80f63d84",
- "amount": 1057.22,
- "globalTaxTypeID": "11",
- "manualAdjustment": false
- }
- ],
- "employerTaxLines": [
- {
- "taxLineID": "6f9eb8cd-0f4a-440b-939c-bdb0f6ad694c",
- "amount": 18.9,
- "globalTaxTypeID": "10",
- "manualAdjustment": false
- }
- ],
- "statutoryDeductionLines": [
- {
- "statutoryDeductionTypeID": "b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3",
- "amount": 108.86
- }
- ],
- "grossEarningsHistory": {
- "daysPaid": 3,
- "unpaidWeeks": 0
- }
- }
+ example:
+ earningsLines:
+ - earningsLineID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ earningsRateID: f9d8f5b5-9049-47f4-8541-35e200f750a5
+ displayName: Ordinary Time
+ ratePerUnit: 25
+ numberOfUnits: 0
+ amount: 0
+ isLinkedToTimesheet: false
+ isSystemGenerated: true
+ - earningsLineID: 65b83d94-f20f-45e1-85ae-387fcf460c26
+ earningsRateID: 65b83d94-f20f-45e1-85ae-387fcf460c26
+ displayName: Salary
+ ratePerUnit: 0
+ numberOfUnits: 8
+ amount: 0
+ isLinkedToTimesheet: false
+ isSystemGenerated: false
+ leaveEarningsLines:
+ - earningsLineID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6
+ earningsRateID: 39b3560a-5d2f-4538-924a-4349dc86396e
+ displayName: Holiday Pay
+ fixedAmount: 268.8
+ amount: 268.8
+ isLinkedToTimesheet: false
+ isSystemGenerated: true
+ deductionLines:
+ - deductionTypeID: a3760fe4-68a4-4e38-8326-fe616af7dc74
+ amount: 100
+ leaveAccrualLines:
+ - leaveTypeID: 0441497f-5dc7-4cd3-a90d-f2e07e21b2a6
+ numberOfUnits: 268.8
+ - leaveTypeID: b0b1b79e-2a25-46c2-ad08-ca25ef48d7e4
+ numberOfUnits: 0
+ - leaveTypeID: f2f994cf-1899-46f3-ad4f-5d92d78c3719
+ numberOfUnits: 0
+ - leaveTypeID: 34129765-11cb-4d8c-b568-84a2219beda3
+ numberOfUnits: 0
+ superannuationLines:
+ - superannuationTypeID: 563273ea-0dae-4f82-86a4-e0db77c008ea
+ displayName: KiwiSaver
+ amount: 108.86
+ fixedAmount: 3
+ percentage: 3
+ manualAdjustment: false
+ employeeTaxLines:
+ - taxLineID: 1084146b-e890-489c-aed3-06de80f63d84
+ amount: 1057.22
+ globalTaxTypeID: "11"
+ manualAdjustment: false
+ employerTaxLines:
+ - taxLineID: 6f9eb8cd-0f4a-440b-939c-bdb0f6ad694c
+ amount: 18.9
+ globalTaxTypeID: "10"
+ manualAdjustment: false
+ statutoryDeductionLines:
+ - statutoryDeductionTypeID: b5efd8d1-0c93-4a14-a314-b5cba4a4e6b3
+ amount: 108.86
+ grossEarningsHistory:
+ daysPaid: 3
+ unpaidWeeks: 0
/Settings:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getSettings
x-hasPayrollUkProblem: true
summary: Retrieves settings
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Settings'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T22:18:40.4518638",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "settings": {
- "accounts": [
- {
- "accountID": "fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488",
- "type": "PAYELIABILITY",
- "code": "825",
- "name": "PAYE Payable"
- },
- {
- "accountID": "e529775e-ea49-4a19-86f0-8d3e1ecda2cd",
- "type": "WAGESPAYABLE",
- "code": "814",
- "name": "Wages Payable - Payroll"
- },
- {
- "accountID": "1c91e520-a12b-45cc-8194-99950858e5bf",
- "type": "WAGESEXPENSE",
- "code": "477",
- "name": "Salaries"
- },
- {
- "accountID": "ac993f75-035b-433c-82e0-7b7a2d40802c",
- "type": "BANK",
- "code": "090",
- "name": "Business Bank Account"
- }
- ]
- }
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T22:18:40.4518638
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ settings:
+ accounts:
+ - accountID: fa5cdc43-643b-4ad8-b4ac-3ffe0d0f4488
+ type: PAYELIABILITY
+ code: "825"
+ name: PAYE Payable
+ - accountID: e529775e-ea49-4a19-86f0-8d3e1ecda2cd
+ type: WAGESPAYABLE
+ code: "814"
+ name: Wages Payable - Payroll
+ - accountID: 1c91e520-a12b-45cc-8194-99950858e5bf
+ type: WAGESEXPENSE
+ code: "477"
+ name: Salaries
+ - accountID: ac993f75-035b-433c-82e0-7b7a2d40802c
+ type: BANK
+ code: "090"
+ name: Business Bank Account
/Settings/TrackingCategories:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollNz
operationId: getTrackingCategories
x-hasPayrollUkProblem: true
summary: Retrieves tracking categories
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TrackingCategories'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-28T22:18:50.0075482",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "trackingCategories": {
- "employeeGroupsTrackingCategoryID": "351953c4-8127-4009-88c3-f9cd8c9cbe9f",
- "timesheetTrackingCategoryID": "f8c0b291-be04-497a-a083-dd9cd19658b5"
- }
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-28T22:18:50.0075482
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ trackingCategories:
+ employeeGroupsTrackingCategoryID: 351953c4-8127-4009-88c3-f9cd8c9cbe9f
+ timesheetTrackingCategoryID: f8c0b291-be04-497a-a083-dd9cd19658b5
/Employees/{EmployeeID}/Working-Patterns:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollNz
operationId: getEmployeeWorkingPatterns
@@ -6452,43 +6085,37 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeWorkingPatternsObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-24T20:16:15.3542191",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 2
- },
- "problem": null,
- "payeeWorkingPatterns": [
- {
- "payeeWorkingPatternID": "d0a325df-c9d5-4246-9e95-5172328a729b",
- "effectiveFrom": "2020-01-01T00:00:00"
- },
- {
- "payeeWorkingPatternID": "af50c5d4-a0f5-4306-ad61-8505b8ec6286",
- "effectiveFrom": "2024-07-09T00:00:00"
- }
- ]
- }
- post:
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-24T20:16:15.3542191
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 2
+ problem: null
+ payeeWorkingPatterns:
+ - payeeWorkingPatternID: d0a325df-c9d5-4246-9e95-5172328a729b
+ effectiveFrom: 2020-01-01T00:00:00
+ - payeeWorkingPatternID: af50c5d4-a0f5-4306-ad61-8505b8ec6286
+ effectiveFrom: 2024-07-09T00:00:00
+ post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: createEmployeeWorkingPattern
@@ -6501,13 +6128,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- workingWeek:
key: workingWeek
keyPascal: WorkingWeek
@@ -6518,51 +6145,51 @@ paths:
keyPascal: monday
keySnake: monday
default: 8
- nonString: true
+ nonString: true
object: workingWeek
- tuesday:
key: tuesday
keyPascal: tuesday
keySnake: tuesday
default: 8
- nonString: true
+ nonString: true
object: workingWeek
- wednesday:
key: wednesday
keyPascal: wednesday
keySnake: wednesday
default: 8
- nonString: true
+ nonString: true
object: workingWeek
- thursday:
key: thursday
keyPascal: thursday
keySnake: thursday
default: 8
- nonString: true
+ nonString: true
object: workingWeek
- friday:
key: friday
keyPascal: friday
keySnake: friday
default: 8
- nonString: true
+ nonString: true
object: workingWeek
- saturday:
key: saturday
keyPascal: saturday
keySnake: saturday
default: 0
- nonString: true
+ nonString: true
object: workingWeek
- sunday:
key: sunday
keyPascal: sunday
keySnake: sunday
default: 0
- nonString: true
+ nonString: true
object: workingWeek
- is_last: true
+ is_last: true
summary: Creates an employee working pattern
parameters:
- $ref: '#/components/parameters/idempotencyKey'
@@ -6571,41 +6198,36 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: employee working pattern correctly added
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeWorkingPatternWithWorkingWeeksObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-24T20:53:58.8624623",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "payeeWorkingPattern": {
- "payeeWorkingPatternID": "d0a325df-c9d5-4246-9e95-5172328a729b",
- "effectiveFrom": "2020-01-01T00:00:00",
- "workingWeeks": [
- {
- "monday": 0.0,
- "tuesday": 3.0000,
- "wednesday": 0.0,
- "thursday": 0.0,
- "friday": 0.0,
- "saturday": 0.0,
- "sunday": 0.0
- }
- ]
- }
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-24T20:53:58.8624623
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ payeeWorkingPattern:
+ payeeWorkingPatternID: d0a325df-c9d5-4246-9e95-5172328a729b
+ effectiveFrom: 2020-01-01T00:00:00
+ workingWeeks:
+ - monday: 0.0
+ tuesday: 3.0000
+ wednesday: 0.0
+ thursday: 0.0
+ friday: 0.0
+ saturday: 0.0
+ sunday: 0.0
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -6617,26 +6239,24 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EmployeeWorkingPatternWithWorkingWeeksRequest'
- example: {
- "effectiveFrom": "2020-01-01T00:00:00",
- "workingWeeks": [
- {
- "monday": 0.0,
- "tuesday": 3.0000,
- "wednesday": 0.0,
- "thursday": 0.0,
- "friday": 0.0,
- "saturday": 0.0,
- "sunday": 0.0
- }
- ]
- }
+ example:
+ effectiveFrom: 2020-01-01T00:00:00
+ workingWeeks:
+ - monday: 0.0
+ tuesday: 3.0000
+ wednesday: 0.0
+ thursday: 0.0
+ friday: 0.0
+ saturday: 0.0
+ sunday: 0.0
/Employees/{EmployeeID}/Working-Patterns/{EmployeeWorkingPatternID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollNz
operationId: getEmployeeWorkingPattern
@@ -6648,7 +6268,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -6657,43 +6277,39 @@ paths:
in: path
required: true
description: Employee working pattern id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09f3b118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeWorkingPatternWithWorkingWeeksObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-24T20:16:15.3542191",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "payeeWorkingPattern": {
- "payeeWorkingPatternID": "d0a325df-c9d5-4246-9e95-5172328a729b",
- "effectiveFrom": "2020-01-01T00:00:00",
- "workingWeeks": [
- {
- "monday": 0.0,
- "tuesday": 3.0000,
- "wednesday": 0.0,
- "thursday": 0.0,
- "friday": 0.0,
- "saturday": 0.0,
- "sunday": 0.0
- }
- ]
- }
- }
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-24T20:16:15.3542191
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ payeeWorkingPattern:
+ payeeWorkingPatternID: d0a325df-c9d5-4246-9e95-5172328a729b
+ effectiveFrom: 2020-01-01T00:00:00
+ workingWeeks:
+ - monday: 0.0
+ tuesday: 3.0000
+ wednesday: 0.0
+ thursday: 0.0
+ friday: 0.0
+ saturday: 0.0
+ sunday: 0.0
delete:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollNz
operationId: deleteEmployeeWorkingPattern
@@ -6705,7 +6321,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -6714,26 +6330,25 @@ paths:
in: path
required: true
description: Employee working pattern id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09f3b118db9c
responses:
- '200':
+ "200":
description: successful response
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveObject'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-08-26T22:11:10.809249",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-08-26T22:11:10.809249
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -6744,10 +6359,10 @@ components:
OAuth2:
type: oauth2
description: For more information visit https://developer.xero.com/documentation/oauth2/overview
- flows:
+ flows:
authorizationCode:
- authorizationUrl: 'https://login.xero.com/identity/connect/authorize'
- tokenUrl: 'https://identity.xero.com/connect/token'
+ authorizationUrl: https://login.xero.com/identity/connect/authorize
+ tokenUrl: https://identity.xero.com/connect/token
scopes:
payroll.employees: Grant read-write access to payroll employees
payroll.employees.read: Grant read-only access to payroll employees
@@ -6760,20 +6375,20 @@ components:
payroll.timesheets: Grant read-write access to payroll timesheets
payroll.timesheets.read: Grant read-only access to payroll timesheets
parameters:
- requiredHeader:
+ requiredHeader:
in: header
name: Xero-Tenant-Id
x-snake: xero_tenant_id
description: Xero identifier for Tenant
schema:
type: string
- required: true
+ required: true
idempotencyKey:
in: header
name: Idempotency-Key
x-snake: idempotency_key
description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
- example: "KEY_VALUE"
+ example: KEY_VALUE
schema:
type: string
schemas:
@@ -6795,8 +6410,8 @@ components:
description: The object returned for a bad request
type: object
properties:
- type:
- description: The type of error format
+ type:
+ description: The type of error format
type: string
example: application/problem+json
title:
@@ -6804,14 +6419,14 @@ components:
type: string
example: BadRequest
status:
- description: The error status code
+ description: The error status code
type: string
example: 400
detail:
description: A description of the error
type: string
example: Validation error occurred.
- instance:
+ instance:
type: string
invalidFields:
type: array
@@ -6827,7 +6442,7 @@ components:
reason:
description: The reason the error occurred
type: string
- example: The Date of Birth is required.
+ example: The Date of Birth is required.
Employees:
type: object
properties:
@@ -6857,7 +6472,7 @@ components:
- address
properties:
employeeID:
- description: Xero unique identifier for the employee
+ description: Xero unique identifier for the employee
type: string
format: uuid
example: d90457c4-f1be-4f2e-b4e3-f766390a7e30
@@ -6877,8 +6492,8 @@ components:
description: Date of birth of the employee (YYYY-MM-DD)
type: string
format: date
- example: 2019-01-02
- x-is-date: true
+ example: 2019-01-02
+ x-is-date: true
address:
$ref: '#/components/schemas/Address'
email:
@@ -6889,8 +6504,8 @@ components:
description: The employee’s gender
type: string
enum:
- - M
- - F
+ - M
+ - F
example: F
phoneNumber:
description: Employee phone number
@@ -6964,7 +6579,7 @@ components:
description: Start date of the employment (YYYY-MM-DD)
type: string
format: date
- x-is-date: true
+ x-is-date: true
engagementType:
description: Engagement type of the employee
type: string
@@ -7002,7 +6617,7 @@ components:
hasSpecialStudentLoanRate:
description: Does the employee has a special student loan rate?
type: boolean
- example: true
+ example: true
specialStudentLoanRatePercentage:
description: The employee student loan rate percentage.
type: number
@@ -7012,7 +6627,7 @@ components:
isEligibleForKiwiSaver:
description: The employee eligibility for KiwiSaver.
type: boolean
- example: true
+ example: true
esctRatePercentage:
description: Employer superannuation contribution tax rate.
type: number
@@ -7024,11 +6639,11 @@ components:
type: string
example: MakeContributions
enum:
- - MakeContributions
- - OptOut
- - OnAContributionsHoliday
- - OnASavingsSuspension
- - NotCurrentlyAKiwiSaverMember
+ - MakeContributions
+ - OptOut
+ - OnAContributionsHoliday
+ - OnASavingsSuspension
+ - NotCurrentlyAKiwiSaverMember
kiwiSaverEmployeeContributionRatePercentage:
description: Employee Contribution percentage.
type: number
@@ -7040,7 +6655,7 @@ components:
type: number
format: double
x-is-money: true
- example: 10.0
+ example: 10.0
kiwiSaverEmployerSalarySacrificeContributionRatePercentage:
description: Employer Contribution through Salary Sacrifice percentage.
type: number
@@ -7051,14 +6666,14 @@ components:
description: Opt Out Date.
type: string
format: date
- x-is-date: true
- example: "2020-06-01T00:00:00"
+ x-is-date: true
+ example: 2020-06-01T00:00:00
kiwiSaverContributionHolidayEndDate:
description: Contribution holiday expiry date or end date.
type: string
format: date
- x-is-date: true
- example: "2019-06-01T00:00:00"
+ x-is-date: true
+ example: 2019-06-01T00:00:00
hasStudentLoanBalance:
description: Does the employee have a remaining student loan balance? Set a remaining balance if you have received a letter from IR.
type: boolean
@@ -7073,31 +6688,31 @@ components:
description: The date of the letter from IR.
type: string
format: date
- x-is-date: true
- example: "2020-07-01T00:00:00"
+ x-is-date: true
+ example: 2020-07-01T00:00:00
TaxCode:
description: Tax codes used for employee tax
type: string
enum:
- - ND
- - M
- - ME
- - MSL
- - MESL
- - SB
- - S
- - SH
- - ST
- - SBSL
- - SSL
- - SHSL
- - STSL
- - WT
- - CAE
- - EDW
- - NSW
- - STC
- - STCSL
+ - ND
+ - M
+ - ME
+ - MSL
+ - MESL
+ - SB
+ - S
+ - SH
+ - ST
+ - SBSL
+ - SSL
+ - SHSL
+ - STSL
+ - WT
+ - CAE
+ - EDW
+ - NSW
+ - STC
+ - STCSL
EmployeeOpeningBalancesObject:
type: object
properties:
@@ -7120,8 +6735,8 @@ components:
description: The opening balance period end date.
type: string
format: date
- x-is-date: true
- example: "2020-07-01T00:00:00"
+ x-is-date: true
+ example: 2020-07-01T00:00:00
daysPaid:
description: The paid number of days.
type: integer
@@ -7175,15 +6790,15 @@ components:
description: The description of the leave (max length = 50)
type: string
startDate:
- description: Start date of the leave (YYYY-MM-DD)
+ description: Start date of the leave (YYYY-MM-DD)
type: string
format: date
- x-is-date: true
+ x-is-date: true
endDate:
- description: End date of the leave (YYYY-MM-DD)
+ description: End date of the leave (YYYY-MM-DD)
type: string
format: date
- x-is-date: true
+ x-is-date: true
periods:
description: The leave period information. The StartDate, EndDate and NumberOfUnits needs to be specified when you do not want to calculate NumberOfUnits automatically. Using incorrect period StartDate and EndDate will result in automatic computation of the NumberOfUnits.
type: array
@@ -7212,12 +6827,12 @@ components:
description: The Pay Period Start Date (YYYY-MM-DD)
type: string
format: date
- x-is-date: true
+ x-is-date: true
periodEndDate:
- description: The Pay Period End Date (YYYY-MM-DD)
+ description: The Pay Period End Date (YYYY-MM-DD)
type: string
format: date
- x-is-date: true
+ x-is-date: true
numberOfUnits:
description: The Number of Units for the leave
type: number
@@ -7227,8 +6842,8 @@ components:
description: Period Status
type: string
enum:
- - Approved
- - Completed
+ - Approved
+ - Completed
EmployeeLeaveBalances:
type: object
properties:
@@ -7244,7 +6859,7 @@ components:
type: object
properties:
name:
- description: Name of the leave type.
+ description: Name of the leave type.
type: string
example: Holiday
leaveTypeID:
@@ -7272,15 +6887,15 @@ components:
EmployeeStatutoryLeaveBalance:
type: object
properties:
- leaveType:
+ leaveType:
description: The type of statutory leave
type: string
enum:
- - Sick
- - Adoption
- - Maternity
- - Paternity
- - Sharedparental
+ - Sick
+ - Adoption
+ - Maternity
+ - Paternity
+ - Sharedparental
balanceRemaining:
description: The balance remaining for the corresponding leave type as of specified date.
type: number
@@ -7290,7 +6905,7 @@ components:
description: The units will be "Hours"
type: string
enum:
- - Hours
+ - Hours
EmployeeStatutoryLeavesSummaries:
type: object
properties:
@@ -7306,11 +6921,11 @@ components:
type: object
properties:
statutoryLeaveID:
- description: The unique identifier (guid) of a statutory leave.
+ description: The unique identifier (guid) of a statutory leave.
type: string
format: uuid
employeeID:
- description: The unique identifier (guid) of the employee
+ description: The unique identifier (guid) of the employee
type: string
format: uuid
type:
@@ -7323,17 +6938,17 @@ components:
- Paternity
- Sharedparental
startDate:
- description: The date when the leave starts
+ description: The date when the leave starts
type: string
format: date
- x-is-date: true
- endDate:
- description: The date when the leave ends
+ x-is-date: true
+ endDate:
+ description: The date when the leave ends
type: string
format: date
- x-is-date: true
+ x-is-date: true
isEntitled:
- description: Whether the leave was entitled to receive payment
+ description: Whether the leave was entitled to receive payment
type: boolean
status:
description: The status of the leave
@@ -7374,61 +6989,61 @@ components:
- sufficientNotice
properties:
statutoryLeaveID:
- description: The unique identifier (guid) of a statutory leave
+ description: The unique identifier (guid) of a statutory leave
type: string
format: uuid
employeeID:
- description: The unique identifier (guid) of the employee
+ description: The unique identifier (guid) of the employee
type: string
format: uuid
leaveTypeID:
- description: The unique identifier (guid) of the "Statutory Sick Leave (non-pensionable)" pay item
+ description: The unique identifier (guid) of the "Statutory Sick Leave (non-pensionable)" pay item
type: string
format: uuid
startDate:
- description: The date when the leave starts
+ description: The date when the leave starts
type: string
format: date
- x-is-date: true
+ x-is-date: true
endDate:
- description: The date when the leave ends
+ description: The date when the leave ends
type: string
format: date
- x-is-date: true
+ x-is-date: true
type:
description: the type of statutory leave
type: string
- example: "Sick"
+ example: Sick
status:
description: the type of statutory leave
type: string
- example: "Pending"
+ example: Pending
workPattern:
- description: The days of the work week the employee is scheduled to work at the time the leave is taken
+ description: The days of the work week the employee is scheduled to work at the time the leave is taken
type: array
items:
type: string
isPregnancyRelated:
- description: Whether the sick leave was pregnancy related
+ description: Whether the sick leave was pregnancy related
type: boolean
sufficientNotice:
- description: Whether the employee provided sufficient notice and documentation as required by the employer supporting the sick leave request
+ description: Whether the employee provided sufficient notice and documentation as required by the employer supporting the sick leave request
type: boolean
isEntitled:
- description: Whether the leave was entitled to receive payment
+ description: Whether the leave was entitled to receive payment
type: boolean
entitlementWeeksRequested:
- description: The amount of requested time (in weeks)
+ description: The amount of requested time (in weeks)
type: number
format: double
x-is-money: true
entitlementWeeksQualified:
- description: The amount of statutory sick leave time off (in weeks) that is available to take at the time the leave was requested
+ description: The amount of statutory sick leave time off (in weeks) that is available to take at the time the leave was requested
type: number
format: double
x-is-money: true
entitlementWeeksRemaining:
- description: A calculated amount of time (in weeks) that remains for the statutory sick leave period
+ description: A calculated amount of time (in weeks) that remains for the statutory sick leave period
type: number
format: double
x-is-money: true
@@ -7436,17 +7051,17 @@ components:
description: Whether another leave (Paternity, Shared Parental specifically) occurs during the requested leave's period. While this is allowed it could affect payment amounts
type: boolean
entitlementFailureReasons:
- description: If the leave requested was considered "not entitled", the reasons why are listed here.
+ description: If the leave requested was considered "not entitled", the reasons why are listed here.
type: array
items:
type: string
enum:
- - UnableToCalculateAwe
- - AweLowerThanLel
- - NotQualifiedInPreviousPiw
- - ExceededMaximumEntitlementWeeksOfSsp
- - ExceededMaximumDurationOfPiw
- - SufficientNoticeNotGiven
+ - UnableToCalculateAwe
+ - AweLowerThanLel
+ - NotQualifiedInPreviousPiw
+ - ExceededMaximumEntitlementWeeksOfSsp
+ - ExceededMaximumDurationOfPiw
+ - SufficientNoticeNotGiven
EmployeeLeaveTypes:
type: object
properties:
@@ -7542,7 +7157,7 @@ components:
enum:
- AnnuallyAfter6Months
- OnAnniversaryDate
- - PercentageOfGrossEarnings
+ - PercentageOfGrossEarnings
- NoAccruals
hoursAccruedAnnually:
description: The number of hours accrued for the leave annually. This is 0 when the scheduleOfAccrual chosen is "OnHourWorked"
@@ -7550,12 +7165,12 @@ components:
format: double
x-is-money: true
maximumToAccrue:
- description: The maximum number of hours that can be accrued for the leave
+ description: The maximum number of hours that can be accrued for the leave
type: number
format: double
x-is-money: true
openingBalance:
- description: The initial number of hours assigned when the leave was added to the employee
+ description: The initial number of hours assigned when the leave was added to the employee
type: number
format: double
x-is-money: true
@@ -7647,22 +7262,22 @@ components:
type: string
format: uuid
ratePerUnit:
- description: The rate per unit
+ description: The rate per unit
type: number
format: double
x-is-money: true
numberOfUnits:
- description: The rate per unit
+ description: The rate per unit
type: number
format: double
x-is-money: true
fixedAmount:
- description: The fixed amount per period
+ description: The fixed amount per period
type: number
format: double
x-is-money: true
earningsRateID:
- description: The corresponding earnings rate identifier
+ description: The corresponding earnings rate identifier
type: string
format: uuid
name:
@@ -7707,9 +7322,9 @@ components:
description: Superannuations Category type
type: string
enum:
- - KiwiSaver
- - ComplyingFund
- - Other
+ - KiwiSaver
+ - ComplyingFund
+ - Other
liabilityAccountId:
description: Xero identifier for Liability Account
type: string
@@ -7839,17 +7454,17 @@ components:
description: Statutory Deduction Category
type: string
enum:
- - PriorityOrder
- - NonPriorityOrder
- - TableBased
- - ChildSupport
- - CourtFines
- - InlandRevenueArrears
- - MsdRepayments
- - StudentLoan
- - AdditionalStudentLoan
- - VoluntaryStudentLoan
- - KiwiSaver
+ - PriorityOrder
+ - NonPriorityOrder
+ - TableBased
+ - ChildSupport
+ - CourtFines
+ - InlandRevenueArrears
+ - MsdRepayments
+ - StudentLoan
+ - AdditionalStudentLoan
+ - VoluntaryStudentLoan
+ - KiwiSaver
EarningsOrders:
type: object
properties:
@@ -8023,7 +7638,7 @@ components:
description: UTC timestamp of last update to the leave type note
type: string
format: date-time
- x-is-datetime: true
+ x-is-datetime: true
isActive:
description: Shows whether the leave type is active or not
type: boolean
@@ -8087,7 +7702,7 @@ components:
standardTypeOfUnits:
description: Optional Type Of Units. Applicable when calculation type is Rate Per Unit
type: string
- enum:
+ enum:
- Hours
- km
standardRatePerUnit:
@@ -8126,25 +7741,25 @@ components:
timesheetID:
description: The Xero identifier for a Timesheet
type: string
- format: uuid
+ format: uuid
payrollCalendarID:
description: The Xero identifier for the Payroll Calendar that the Timesheet applies to
type: string
- format: uuid
+ format: uuid
employeeID:
description: The Xero identifier for the Employee that the Timesheet is for
type: string
- format: uuid
+ format: uuid
startDate:
description: The Start Date of the Timesheet period (YYYY-MM-DD)
type: string
- format: date
- x-is-date: true
+ format: date
+ x-is-date: true
endDate:
description: The End Date of the Timesheet period (YYYY-MM-DD)
type: string
- format: date
- x-is-date: true
+ format: date
+ x-is-date: true
status:
description: Status of the timesheet
type: string
@@ -8188,20 +7803,20 @@ components:
timesheetLineID:
description: The Xero identifier for a Timesheet Line
type: string
- format: uuid
+ format: uuid
date:
description: The Date that this Timesheet Line is for (YYYY-MM-DD)
type: string
- format: date
- x-is-date: true
+ format: date
+ x-is-date: true
earningsRateID:
description: The Xero identifier for the Earnings Rate that the Timesheet is for
type: string
- format: uuid
+ format: uuid
trackingItemID:
description: The Xero identifier for the Tracking Item that the Timesheet is for
type: string
- format: uuid
+ format: uuid
numberOfUnits:
description: The Number of Units of the Timesheet Line
type: number
@@ -8238,7 +7853,7 @@ components:
payrollCalendarID:
description: Xero unique identifier for the payroll calendar
type: string
- format: uuid
+ format: uuid
name:
description: Name of the calendar
type: string
@@ -8248,22 +7863,22 @@ components:
description: Period start date of the calendar
type: string
format: date
- x-is-date: true
+ x-is-date: true
periodEndDate:
description: Period end date of the calendar
type: string
format: date
- x-is-date: true
+ x-is-date: true
paymentDate:
description: Payment date of the calendar
type: string
format: date
- x-is-date: true
+ x-is-date: true
updatedDateUTC:
description: UTC timestamp of the last update to the pay run calendar
type: string
format: date-time
- x-is-datetime: true
+ x-is-datetime: true
PaymentMethodObject:
type: object
properties:
@@ -8321,11 +7936,11 @@ components:
salaryAndWagesID:
description: Xero unique identifier for a salary and wages record
type: string
- format: uuid
+ format: uuid
earningsRateID:
description: Xero unique identifier for an earnings rate
type: string
- format: uuid
+ format: uuid
numberOfUnitsPerWeek:
description: The Number of Units per week for the corresponding salary and wages
type: number
@@ -8340,7 +7955,7 @@ components:
description: The Number of Units per day for the corresponding salary and wages
type: number
format: double
- x-is-money: true
+ x-is-money: true
daysPerWeek:
description: The days per week for the salary.
type: number
@@ -8349,8 +7964,8 @@ components:
effectiveFrom:
description: The effective date of the corresponding salary and wages
type: string
- format: date
- x-is-date: true
+ format: date
+ x-is-date: true
annualSalary:
description: The annual salary
type: number
@@ -8401,26 +8016,26 @@ components:
payRunID:
description: Xero unique identifier for the pay run
type: string
- format: uuid
+ format: uuid
payrollCalendarID:
description: Xero unique identifier for the payroll calendar
type: string
- format: uuid
+ format: uuid
periodStartDate:
description: Period start date of the payroll calendar
type: string
- format: date
+ format: date
x-is-date: true
periodEndDate:
description: Period end date of the payroll calendar
type: string
- format: date
- x-is-date: true
+ format: date
+ x-is-date: true
paymentDate:
description: Payment date of the pay run
type: string
- format: date
- x-is-date: true
+ format: date
+ x-is-date: true
totalCost:
description: Total cost of the pay run
type: number
@@ -8435,22 +8050,22 @@ components:
description: Pay run status
type: string
enum:
- - Draft
- - Posted
+ - Draft
+ - Posted
payRunType:
description: Pay run type
type: string
enum:
- - Scheduled
- - Unscheduled
- - EarlierYearUpdate
+ - Scheduled
+ - Unscheduled
+ - EarlierYearUpdate
calendarType:
$ref: '#/components/schemas/CalendarType'
postedDateTime:
description: Posted date time of the pay run
type: string
- format: date
- x-is-date: true
+ format: date
+ x-is-date: true
paySlips:
type: array
items:
@@ -8459,13 +8074,13 @@ components:
description: Calendar type of the pay run
type: string
enum:
- - Weekly
- - Fortnightly
- - FourWeekly
- - Monthly
- - Annual
- - Quarterly
- - TwiceMonthly
+ - Weekly
+ - Fortnightly
+ - FourWeekly
+ - Monthly
+ - Annual
+ - Quarterly
+ - TwiceMonthly
PaySlipObject:
type: object
properties:
@@ -8492,20 +8107,20 @@ components:
paySlipID:
description: The Xero identifier for a PaySlip
type: string
- format: uuid
+ format: uuid
employeeID:
description: The Xero identifier for payroll employee
type: string
- format: uuid
+ format: uuid
payRunID:
description: The Xero identifier for the associated payrun
type: string
- format: uuid
+ format: uuid
lastEdited:
description: The date payslip was last updated
type: string
- format: date
- x-is-datetime: true
+ format: date
+ x-is-datetime: true
firstName:
description: Employee first name
type: string
@@ -8559,7 +8174,7 @@ components:
x-is-money: true
bacsHash:
description: BACS Service User Number
- type: string
+ type: string
paymentMethod:
description: The payment method code
type: string
@@ -8607,7 +8222,7 @@ components:
earningsRateID:
description: Xero identifier for payroll earnings rate
type: string
- format: uuid
+ format: uuid
displayName:
description: name of earnings rate for display in UI
type: string
@@ -8657,7 +8272,7 @@ components:
format: uuid
displayName:
description: name of earnings rate for display in UI
- type: string
+ type: string
ratePerUnit:
description: Rate per unit for leave earnings line
type: number
@@ -8704,7 +8319,7 @@ components:
format: uuid
displayName:
description: name of earnings rate for display in UI
- type: string
+ type: string
ratePerUnit:
description: Rate per unit for leave earnings line
type: number
@@ -8747,7 +8362,7 @@ components:
format: uuid
displayName:
description: name of earnings rate for display in UI
- type: string
+ type: string
amount:
description: The amount of the deduction line
type: number
@@ -8800,7 +8415,7 @@ components:
leaveTypeID:
description: Xero identifier for the Leave type
type: string
- format: uuid
+ format: uuid
numberOfUnits:
description: Leave accrual number of units
type: number
@@ -8816,10 +8431,10 @@ components:
superannuationTypeID:
description: Xero identifier for payroll superannuation type
type: string
- format: uuid
+ format: uuid
displayName:
description: Benefit display name
- type: string
+ type: string
amount:
description: The amount of the superannuation line
type: number
@@ -8837,7 +8452,7 @@ components:
x-is-money: true
manualAdjustment:
description: manual adjustment made
- type: boolean
+ type: boolean
PaymentLines:
type: array
items:
@@ -8848,7 +8463,7 @@ components:
paymentLineID:
description: Xero identifier for payroll payment line
type: string
- format: uuid
+ format: uuid
amount:
description: The amount of the payment line
type: number
@@ -8859,7 +8474,7 @@ components:
type: string
sortCode:
description: The account sort code
- type: string
+ type: string
accountName:
description: The account name
type: string
@@ -8882,10 +8497,10 @@ components:
type: number
format: double
x-is-money: true
- globalTaxTypeID:
+ globalTaxTypeID:
description: Tax type ID
type: string
- manualAdjustment:
+ manualAdjustment:
description: Identifies if the tax line is a manual adjustment
type: boolean
StatutoryDeductionLines:
@@ -8898,7 +8513,7 @@ components:
statutoryDeductionTypeID:
description: Xero identifier for payroll statutory deduction type
type: string
- format: uuid
+ format: uuid
amount:
description: The amount of the statutory deduction line
type: number
@@ -8909,7 +8524,7 @@ components:
type: number
format: double
x-is-money: true
- manualAdjustment:
+ manualAdjustment:
description: Identifies if the tax line is a manual adjustment
type: boolean
TaxSettings:
@@ -8926,7 +8541,7 @@ components:
enum:
- weeks
- months
- example: "weeks"
+ example: weeks
taxCode:
$ref: '#/components/schemas/TaxCode'
specialTaxRate:
@@ -8945,7 +8560,7 @@ components:
description: Number of days the employee worked in the pay period (0 - 365)
type: integer
format: int32
- unpaidWeeks:
+ unpaidWeeks:
description: Number of full weeks the employee didn't work in the pay period (0 - 52)
type: integer
format: int32
@@ -8971,15 +8586,15 @@ components:
accountID:
description: The Xero identifier for Settings.
type: string
- format: uuid
+ format: uuid
type:
description: The assigned AccountType
type: string
enum:
- - PAYELIABILITY
- - WAGESPAYABLE
- - WAGESEXPENSE
- - BANK
+ - PAYELIABILITY
+ - WAGESPAYABLE
+ - WAGESEXPENSE
+ - BANK
code:
description: A unique 3 digit number for each Account
type: string
@@ -9136,11 +8751,11 @@ components:
payeeWorkingPatternID:
description: The Xero identifier for for Employee working pattern
type: string
- format: uuid
+ format: uuid
effectiveFrom:
description: The effective date of the corresponding salary and wages
type: string
- format: date
+ format: date
x-is-date: true
EmployeeWorkingPatterns:
type: array
@@ -9168,7 +8783,7 @@ components:
effectiveFrom:
description: The effective date of the corresponding salary and wages
type: string
- format: date
+ format: date
x-is-date: true
workingWeeks:
$ref: '#/components/schemas/WorkingWeeks'
@@ -9181,7 +8796,7 @@ components:
effectiveFrom:
description: The effective date of the corresponding salary and wages
type: string
- format: date
+ format: date
x-is-date: true
workingWeeks:
$ref: '#/components/schemas/WorkingWeeks'
@@ -9193,4 +8808,4 @@ components:
problem:
$ref: '#/components/schemas/Problem'
payeeWorkingPattern:
- $ref: '#/components/schemas/EmployeeWorkingPatternWithWorkingWeeks'
\ No newline at end of file
+ $ref: '#/components/schemas/EmployeeWorkingPatternWithWorkingWeeks'
diff --git a/xero-payroll-uk.yaml b/xero-payroll-uk.yaml
index 10d321bc..320e1e93 100644
--- a/xero-payroll-uk.yaml
+++ b/xero-payroll-uk.yaml
@@ -1,13 +1,13 @@
openapi: 3.0.0
info:
- version: "6.3.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/"
+ version: 6.3.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/
contact:
- name: "Xero Platform Team"
- email: "api@xero.com"
- url: "https://developer.xero.com"
+ name: Xero Platform Team
+ email: api@xero.com
+ url: https://developer.xero.com
tags:
- name: PayrollUk
servers:
@@ -17,9 +17,11 @@ paths:
/Employees:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollUk
operationId: getEmployees
@@ -39,105 +41,94 @@ paths:
type: integer
example: 5
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Employees'
- example: {
- "id":"1a14e877-773d-4cd3-b253-f559a4b4be65",
- "providerName":"provider-name",
- "dateTimeUTC":"2020-03-24T18:43:43.860852",
- "httpStatusCode":"OK",
- "pagination":{
- "page":1,
- "pageSize":100,
- "pageCount":1,
- "itemCount":3
- },
- "problem":null,
- "employees":[
- {
- "employeeID":"aad6b292-7b94-408b-93f6-e489867e3fb0",
- "firstName":"Jack",
- "lastName":"Allan",
- "dateOfBirth":"1987-12-23T00:00:00",
- "gender":"M",
- "email":null,
- "phoneNumber":null,
- "startDate":"2020-02-03T00:00:00",
- "address":{
- "addressLine1":"171 Midsummer Boulevard",
- "addressLine2":null,
- "city":"Milton Keynes",
- "county":null,
- "countryName":"UNITED KINGDOM",
- "postCode":"MK9 1EB"
- },
- "payrollCalendarID":"216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "updatedDateUTC":"2020-02-13T16:23:31",
- "createdDateUTC":"2020-02-10T10:00:24",
- "endDate":null,
- "isOffPayrollWorker":false
- },
- {
- "employeeID":"67e545d4-e8a6-4f98-9f63-85c2383dfe12",
- "firstName":"Charlotte",
- "lastName":"Danes",
- "dateOfBirth":"1993-10-24T00:00:00",
- "gender":"F",
- "email":null,
- "phoneNumber":null,
- "startDate":"2020-02-03T00:00:00",
- "address":{
- "addressLine1":"171 Midsummer Blvd",
- "addressLine2":null,
- "city":"Milton Keynes",
- "county":null,
- "countryName":"UNITED KINGDOM",
- "postCode":"MK9 1EB"
- },
- "payrollCalendarID":"5e813d9e-949c-461f-8a89-e9ee8955a254",
- "updatedDateUTC":"2020-02-13T16:48:51",
- "createdDateUTC":"2020-02-13T16:32:12",
- "endDate":null,
- "isOffPayrollWorker":false
- },
- {
- "employeeID":"eb4a0c3b-b0d6-440d-bccc-348b7dc92321",
- "firstName":"Chelsea",
- "lastName":"Serati",
- "dateOfBirth":"1976-02-16T00:00:00",
- "gender":"F",
- "email":null,
- "phoneNumber":null,
- "startDate":"2019-07-02T00:00:00",
- "address":{
- "addressLine1":"171 Midsummer Boulevard",
- "addressLine2":null,
- "city":"Milton Keynes",
- "county":null,
- "countryName":"UNITED KINGDOM",
- "postCode":"MK9 1EB"
- },
- "payrollCalendarID":"d45bc68f-59d6-4000-929d-1058dcfa79e1",
- "updatedDateUTC":"2020-02-13T16:53:12",
- "createdDateUTC":"2020-02-13T16:46:41",
- "endDate":null,
- "isOffPayrollWorker":false
- }
- ]
- }
- '400':
+ example:
+ id: 1a14e877-773d-4cd3-b253-f559a4b4be65
+ providerName: provider-name
+ dateTimeUTC: 2020-03-24T18:43:43.860852
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 3
+ problem: null
+ employees:
+ - employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ firstName: Jack
+ lastName: Allan
+ dateOfBirth: 1987-12-23T00:00:00
+ gender: M
+ email: null
+ phoneNumber: null
+ startDate: 2020-02-03T00:00:00
+ address:
+ addressLine1: 171 Midsummer Boulevard
+ addressLine2: null
+ city: Milton Keynes
+ county: null
+ countryName: UNITED KINGDOM
+ postCode: MK9 1EB
+ payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ updatedDateUTC: 2020-02-13T16:23:31
+ createdDateUTC: 2020-02-10T10:00:24
+ endDate: null
+ isOffPayrollWorker: false
+ - employeeID: 67e545d4-e8a6-4f98-9f63-85c2383dfe12
+ firstName: Charlotte
+ lastName: Danes
+ dateOfBirth: 1993-10-24T00:00:00
+ gender: F
+ email: null
+ phoneNumber: null
+ startDate: 2020-02-03T00:00:00
+ address:
+ addressLine1: 171 Midsummer Blvd
+ addressLine2: null
+ city: Milton Keynes
+ county: null
+ countryName: UNITED KINGDOM
+ postCode: MK9 1EB
+ payrollCalendarID: 5e813d9e-949c-461f-8a89-e9ee8955a254
+ updatedDateUTC: 2020-02-13T16:48:51
+ createdDateUTC: 2020-02-13T16:32:12
+ endDate: null
+ isOffPayrollWorker: false
+ - employeeID: eb4a0c3b-b0d6-440d-bccc-348b7dc92321
+ firstName: Chelsea
+ lastName: Serati
+ dateOfBirth: 1976-02-16T00:00:00
+ gender: F
+ email: null
+ phoneNumber: null
+ startDate: 2019-07-02T00:00:00
+ address:
+ addressLine1: 171 Midsummer Boulevard
+ addressLine2: null
+ city: Milton Keynes
+ county: null
+ countryName: UNITED KINGDOM
+ postCode: MK9 1EB
+ payrollCalendarID: d45bc68f-59d6-4000-929d-1058dcfa79e1
+ updatedDateUTC: 2020-02-13T16:53:12
+ createdDateUTC: 2020-02-13T16:46:41
+ endDate: null
+ isOffPayrollWorker: false
+ "400":
description: validation error for a bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Problem'
- post:
+ post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: createEmployee
@@ -151,18 +142,18 @@ paths:
object: employee
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2000, Month.OCTOBER, 28)"
- java: "LocalDate.of(2000, Month.OCTOBER, 28)"
- csharp: "new DateTime(2000, 10, 10)"
- php: "new DateTime('2000-10-28')"
- node: "'2000-10-28'"
- python: "dateutil.parser.parse('2000-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2000, Month.OCTOBER, 28)
+ java: LocalDate.of(2000, Month.OCTOBER, 28)
+ csharp: new DateTime(2000, 10, 10)
+ php: new DateTime('2000-10-28')
+ node: '''2000-10-28'''
+ python: dateutil.parser.parse('2000-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- Address:
key: address
keyPascal: Address
keySnake: address
- is_object: true
+ is_object: true
- addressLine1:
key: addressLine1
keyPascal: AddressLine1
@@ -191,18 +182,18 @@ paths:
- employee:
key: employee
keyPascal: Employee
- is_object: true
+ is_object: true
- firstName:
key: firstName
keyPascal: FirstName
- keySnake: first_name
- default: "Adam"
+ keySnake: first_name
+ default: Adam
object: employee
- lastName:
key: lastName
keyPascal: LastName
keySnake: last_name
- default: "Adamson"
+ default: Adamson
object: employee
- dateOfBirth:
is_variable: true
@@ -223,53 +214,50 @@ paths:
default: address
python: address
ruby: address
- object: employee
+ object: employee
summary: Creates employees
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeObject'
- example: {
- "id":"660ff206-fc4a-42f5-8f7d-de886bc2a3d3",
- "providerName":"provider-name",
- "dateTimeUTC":"2020-03-25T03:12:10.406476",
- "httpStatusCode":"OK",
- "pagination":null,
- "problem":null,
- "employee":{
- "employeeID":"316146c7-26a4-4065-b9bd-346d0557ea96",
- "title":"Mr",
- "firstName":"Mike",
- "lastName":"Fancy",
- "dateOfBirth":"1999-01-01T00:00:00",
- "gender":"M",
- "email":"mike@starkindustries.com",
- "phoneNumber":null,
- "startDate":null,
- "nationalInsuranceNumber":null,
- "isOffPayrollWorker": false,
- "address": {
- "addressLine1": "171 Midsummer",
- "addressLine2":null,
- "city": "Milton Keyness",
- "county":null,
- "countryName":null,
- "postCode": "MK9 1EB"
- },
- "payrollCalendarID":null,
- "updatedDateUTC":"2020-03-25T03:12:10",
- "createdDateUTC":"2020-03-25T03:12:10",
- "niCategory":null,
- "employeeNumber":null,
- "endDate":null
- }
- }
- '400':
+ example:
+ id: 660ff206-fc4a-42f5-8f7d-de886bc2a3d3
+ providerName: provider-name
+ dateTimeUTC: 2020-03-25T03:12:10.406476
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ employee:
+ employeeID: 316146c7-26a4-4065-b9bd-346d0557ea96
+ title: Mr
+ firstName: Mike
+ lastName: Fancy
+ dateOfBirth: 1999-01-01T00:00:00
+ gender: M
+ email: mike@starkindustries.com
+ phoneNumber: null
+ startDate: null
+ nationalInsuranceNumber: null
+ isOffPayrollWorker: false
+ address:
+ addressLine1: 171 Midsummer
+ addressLine2: null
+ city: Milton Keyness
+ county: null
+ countryName: null
+ postCode: MK9 1EB
+ payrollCalendarID: null
+ updatedDateUTC: 2020-03-25T03:12:10
+ createdDateUTC: 2020-03-25T03:12:10
+ niCategory: null
+ employeeNumber: null
+ endDate: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -281,26 +269,26 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Employee'
- example: {
- "title":"Mr",
- "firstName":"Mike",
- "lastName":"Fancy",
- "dateOfBirth":"1999-01-01T00:00:00",
- "gender":"M",
- "email":"mike@starkindustries.com",
- "isOffPayrollWorker": false,
- "address": {
- "addressLine1": "171 Midsummer",
- "city": "Milton Keyness",
- "postCode": "MK9 1EB"
- }
- }
+ example:
+ title: Mr
+ firstName: Mike
+ lastName: Fancy
+ dateOfBirth: 1999-01-01T00:00:00
+ gender: M
+ email: mike@starkindustries.com
+ isOffPayrollWorker: false
+ address:
+ addressLine1: 171 Midsummer
+ city: Milton Keyness
+ postCode: MK9 1EB
/Employees/{EmployeeID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollUk
operationId: getEmployee
@@ -312,52 +300,50 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeObject'
- example: {
- "id": "9414291b-a8c6-08fa-b165-9b30b1e6aab5",
- "providerName": "!YLT5Y",
- "dateTimeUTC": "2018-04-09T05:15:18.1011141",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "employee": {
- "employeeID": "d17e008e-3381-45c0-b50c-2fab7757e503",
- "title": "Mr.",
- "firstName": "Edgar",
- "lastName": "Allan Po",
- "dateOfBirth": "1985-03-24T00:00:00",
- "gender": "M",
- "email": "tester1@gmail.com",
- "phoneNumber": "0400123456",
- "nationalInsuranceNumber": "AB123456C",
- "isOffPayrollWorker": false,
- "address": {
- "addressLine1": "171 Midsummer",
- "addressLine2": null,
- "city": "Milton Keyness",
- "county": null,
- "countryName": "UNITED KINGDOM",
- "postCode": "MK9 1EB"
- },
- "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "updatedDateUTC": "2017-05-12T10:00:24",
- "createdDateUTC": "2017-05-12T10:00:24",
- "endDate": null
- }
- }
+ example:
+ id: 9414291b-a8c6-08fa-b165-9b30b1e6aab5
+ providerName: '!YLT5Y'
+ dateTimeUTC: 2018-04-09T05:15:18.1011141
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ employee:
+ employeeID: d17e008e-3381-45c0-b50c-2fab7757e503
+ title: Mr.
+ firstName: Edgar
+ lastName: Allan Po
+ dateOfBirth: 1985-03-24T00:00:00
+ gender: M
+ email: tester1@gmail.com
+ phoneNumber: "0400123456"
+ nationalInsuranceNumber: AB123456C
+ isOffPayrollWorker: false
+ address:
+ addressLine1: 171 Midsummer
+ addressLine2: null
+ city: Milton Keyness
+ county: null
+ countryName: UNITED KINGDOM
+ postCode: MK9 1EB
+ payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ updatedDateUTC: 2017-05-12T10:00:24
+ createdDateUTC: 2017-05-12T10:00:24
+ endDate: null
put:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: updateEmployee
@@ -372,18 +358,18 @@ paths:
object: employee
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2000, Month.OCTOBER, 28)"
- java: "LocalDate.of(2000, Month.OCTOBER, 28)"
- csharp: "new DateTime(2000, 10, 10)"
- php: "new DateTime('2000-10-28')"
- node: "'2000-10-28'"
- python: "dateutil.parser.parse('2000-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2000, Month.OCTOBER, 28)
+ java: LocalDate.of(2000, Month.OCTOBER, 28)
+ csharp: new DateTime(2000, 10, 10)
+ php: new DateTime('2000-10-28')
+ node: '''2000-10-28'''
+ python: dateutil.parser.parse('2000-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- Address:
key: address
keyPascal: Address
keySnake: address
- is_object: true
+ is_object: true
- addressLine1:
key: addressLine1
keyPascal: AddressLine1
@@ -412,18 +398,18 @@ paths:
- employee:
key: employee
keyPascal: Employee
- is_object: true
+ is_object: true
- firstName:
key: firstName
keyPascal: FirstName
- keySnake: first_name
- default: "Adam"
+ keySnake: first_name
+ default: Adam
object: employee
- lastName:
key: lastName
keyPascal: LastName
keySnake: last_name
- default: "Adamson"
+ default: Adamson
object: employee
- dateOfBirth:
is_variable: true
@@ -444,7 +430,7 @@ paths:
default: address
python: address
ruby: address
- object: employee
+ object: employee
parameters:
- $ref: '#/components/parameters/idempotencyKey'
- name: EmployeeID
@@ -452,51 +438,48 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: successful response
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeObject'
- example: {
- "id": "9414291b-a8c6-08fa-b165-9b30b1e6aab5",
- "providerName": "!YLT5Y",
- "dateTimeUTC": "2018-04-09T05:10:51.3504472",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "employee": {
- "employeeID": "07f0f9fc-cc95-46ac-9a8a-aa03779f2bde",
- "title": "Mr",
- "firstName": "Mike",
- "lastName": "Johnllsbkrhwopson",
- "dateOfBirth": "1999-01-01T00:00:00",
- "gender": "M",
- "email": "84044@starkindustries.com",
- "phoneNumber": "0400123456",
- "startDate": "2020-02-03",
- "nationalInsuranceNumber": null,
- "isOffPayrollWorker": false,
- "address": {
- "addressLine1": "101 Green St",
- "addressLine2":null,
- "city": "San Francisco",
- "county":null,
- "countryName":null,
- "postCode": "6TGR4F"
- },
- "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "updatedDateUTC": "2020-03-25T17:03:50Z",
- "createdDateUTC": "2020-02-10T10:00:24Z",
- "endDate": null
- }
- }
- '400':
+ example:
+ id: 9414291b-a8c6-08fa-b165-9b30b1e6aab5
+ providerName: '!YLT5Y'
+ dateTimeUTC: 2018-04-09T05:10:51.3504472
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ employee:
+ employeeID: 07f0f9fc-cc95-46ac-9a8a-aa03779f2bde
+ title: Mr
+ firstName: Mike
+ lastName: Johnllsbkrhwopson
+ dateOfBirth: 1999-01-01T00:00:00
+ gender: M
+ email: 84044@starkindustries.com
+ phoneNumber: "0400123456"
+ startDate: "2020-02-03"
+ nationalInsuranceNumber: null
+ isOffPayrollWorker: false
+ address:
+ addressLine1: 101 Green St
+ addressLine2: null
+ city: San Francisco
+ county: null
+ countryName: null
+ postCode: 6TGR4F
+ payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ updatedDateUTC: "2020-03-25T17:03:50Z"
+ createdDateUTC: "2020-02-10T10:00:24Z"
+ endDate: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -508,27 +491,26 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Employee'
- example: {
- "title": "Mr.",
- "firstName": "TestDataUK",
- "lastName": "Tester",
- "dateOfBirth": "1992-11-22T00:00:00",
- "gender": "M",
- "email": "tester@gmail.com",
- "phoneNumber": "0400123456",
- "isOffPayrollWorker": false,
- "address": {
- "addressLine1": "171 Midsummer",
- "city": "Milton Keyness",
- "postCode": "MK9 1EB"
- }
- }
+ example:
+ title: Mr.
+ firstName: TestDataUK
+ lastName: Tester
+ dateOfBirth: 1992-11-22T00:00:00
+ gender: M
+ email: tester@gmail.com
+ phoneNumber: "0400123456"
+ isOffPayrollWorker: false
+ address:
+ addressLine1: 171 Midsummer
+ city: Milton Keyness
+ postCode: MK9 1EB
/Employees/{EmployeeID}/Employment:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- post:
+ post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: createEmployment
@@ -541,13 +523,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- employment:
key: employment
keyPascal: Employment
@@ -558,7 +540,7 @@ paths:
keyPascal: PayrollCalendarID
keySnake: payroll_calendar_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: employment
- startDate:
is_variable: true
@@ -570,7 +552,7 @@ paths:
python: start_date
ruby: start_date
object: employment
- is_last: true
+ is_last: true
summary: Creates employment detail for a specific employee using a unique employee ID
parameters:
- $ref: '#/components/parameters/idempotencyKey'
@@ -579,32 +561,30 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmploymentObject'
- example: {
- "id": "0160a355-1e6d-4fdc-9532-c0857feaa515",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-03-26T18:09:11.6235442",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "employment": {
- "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "startDate": "2020-04-01T00:00:00",
- "niCategory": "A",
- "employeeNumber": "123ABC"
- }
- }
- '400':
+ example:
+ id: 0160a355-1e6d-4fdc-9532-c0857feaa515
+ providerName: provider-name
+ dateTimeUTC: 2020-03-26T18:09:11.6235442
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ employment:
+ payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ startDate: 2020-04-01T00:00:00
+ niCategory: A
+ employeeNumber: 123ABC
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -616,67 +596,68 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Employment'
- example: {
- "PayrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "StartDate": "2020-04-01",
- "EmployeeNumber": "123ABC",
- "NICategory": "A"
- }
+ example:
+ PayrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ StartDate: "2020-04-01"
+ EmployeeNumber: 123ABC
+ NICategory: A
/Employees/{EmployeeID}/Tax:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollUk
operationId: getEmployeeTax
x-hasPayrollUkProblem: true
- summary: Retrieves tax records for a specific employee using a unique employee ID
+ summary: Retrieves tax records for a specific employee using a unique employee ID
parameters:
- name: EmployeeID
x-snake: employee_id
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeTaxObject'
- example: {
- "id": "a8577248-393a-4e7a-8a03-b43b90800b69",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-03-27T00:14:41.2462046",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "employeeTax": {
- "starterType": "New Employee with P45",
- "starterDeclaration": "B.) This is currently their only job",
- "taxCode": "1185L",
- "w1M1": false,
- "previousTaxablePay": 2000,
- "previousTaxPaid": 200,
- "studentLoanDeduction": null,
- "hasPostGraduateLoans": false,
- "isDirector": false,
- "directorshipStartDate": null,
- "nicCalculationMethod": null
- }
- }
+ example:
+ id: a8577248-393a-4e7a-8a03-b43b90800b69
+ providerName: provider-name
+ dateTimeUTC: 2020-03-27T00:14:41.2462046
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ employeeTax:
+ starterType: New Employee with P45
+ starterDeclaration: B.) This is currently their only job
+ taxCode: 1185L
+ w1M1: false
+ previousTaxablePay: 2000
+ previousTaxPaid: 200
+ studentLoanDeduction: null
+ hasPostGraduateLoans: false
+ isDirector: false
+ directorshipStartDate: null
+ nicCalculationMethod: null
/Employees/{EmployeeID}/ukopeningbalances:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollUk
operationId: getEmployeeOpeningBalances
@@ -688,36 +669,35 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeOpeningBalancesObject'
- example: {
- "id": "ab1c33de-1927-4210-bf4f-2a55965cb4a9",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-03-27T01:13:00.6591505",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "openingBalances": {
- "statutoryAdoptionPay": 10,
- "statutoryMaternityPay": 10,
- "statutoryPaternityPay": 10,
- "statutorySharedParentalPay": 10,
- "statutorySickPay": 10,
- "priorEmployeeNumber": "10.0"
- }
- }
+ example:
+ id: ab1c33de-1927-4210-bf4f-2a55965cb4a9
+ providerName: provider-name
+ dateTimeUTC: 2020-03-27T01:13:00.6591505
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ openingBalances:
+ statutoryAdoptionPay: 10
+ statutoryMaternityPay: 10
+ statutoryPaternityPay: 10
+ statutorySharedParentalPay: 10
+ statutorySickPay: 10
+ priorEmployeeNumber: "10.0"
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: createEmployeeOpeningBalances
@@ -733,7 +713,7 @@ paths:
keyPascal: StatutoryMaternityPay
keySnake: statutory_maternity_pay
is_money: true
- nonString: true
+ nonString: true
default: 0.0
object: employeeOpeningBalances
- statutoryAdoptionPay:
@@ -741,7 +721,7 @@ paths:
keyPascal: StatutoryAdoptionPay
keySnake: statutory_adoption_pay
is_money: true
- nonString: true
+ nonString: true
default: 100.0
object: employeeOpeningBalances
- statutoryPaternityPay:
@@ -749,7 +729,7 @@ paths:
keyPascal: StatutoryPaternityPay
keySnake: statutory_paternity_pay
is_money: true
- nonString: true
+ nonString: true
default: 0.0
object: employeeOpeningBalances
- statutorySharedParentalPay:
@@ -757,7 +737,7 @@ paths:
keyPascal: StatutorySharedParentalPay
keySnake: statutory_shared_parental_pay
is_money: true
- nonString: true
+ nonString: true
default: 0.0
object: employeeOpeningBalances
- statutorySickPay:
@@ -765,7 +745,7 @@ paths:
keyPascal: StatutorySickPay
keySnake: statutory_sick_pay
is_money: true
- nonString: true
+ nonString: true
default: 0.0
object: employeeOpeningBalances
is_last: true
@@ -777,27 +757,26 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeOpeningBalancesObject'
- example: {
- "id": "0d30ef37-2fb4-4925-b563-faaee361c9cd",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-03-27T01:06:14.47566",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "openingBalances": null
- }
- '400':
+ example:
+ id: 0d30ef37-2fb4-4925-b563-faaee361c9cd
+ providerName: provider-name
+ dateTimeUTC: 2020-03-27T01:06:14.47566
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ openingBalances: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -809,17 +788,17 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EmployeeOpeningBalances'
- example: {
- "statutoryAdoptionPay": 10,
- "statutoryMaternityPay": 10,
- "statutoryPaternityPay": 10,
- "statutorySharedParentalPay": 10,
- "statutorySickPay": 10,
- "priorEmployeeNumber": 10
- }
+ example:
+ statutoryAdoptionPay: 10
+ statutoryMaternityPay: 10
+ statutoryPaternityPay: 10
+ statutorySharedParentalPay: 10
+ statutorySickPay: 10
+ priorEmployeeNumber: 10
put:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: updateEmployeeOpeningBalances
@@ -835,7 +814,7 @@ paths:
keyPascal: StatutoryMaternityPay
keySnake: statutory_maternity_pay
is_money: true
- nonString: true
+ nonString: true
default: 0.0
object: employeeOpeningBalances
- statutoryAdoptionPay:
@@ -843,7 +822,7 @@ paths:
keyPascal: StatutoryAdoptionPay
keySnake: statutory_adoption_pay
is_money: true
- nonString: true
+ nonString: true
default: 100.0
object: employeeOpeningBalances
- statutoryPaternityPay:
@@ -851,7 +830,7 @@ paths:
keyPascal: StatutoryPaternityPay
keySnake: statutory_paternity_pay
is_money: true
- nonString: true
+ nonString: true
default: 0.0
object: employeeOpeningBalances
- statutorySharedParentalPay:
@@ -859,7 +838,7 @@ paths:
keyPascal: StatutorySharedParentalPay
keySnake: statutory_shared_parental_pay
is_money: true
- nonString: true
+ nonString: true
default: 0.0
object: employeeOpeningBalances
- statutorySickPay:
@@ -867,7 +846,7 @@ paths:
keyPascal: StatutorySickPay
keySnake: statutory_sick_pay
is_money: true
- nonString: true
+ nonString: true
default: 0.0
object: employeeOpeningBalances
is_last: true
@@ -879,27 +858,26 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: successful response
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeOpeningBalancesObject'
- example: {
- "id": "21953776-783c-426c-bf15-cbde997839c4",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-03-27T15:45:09.7078637",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "openingBalances": null
- }
- '400':
+ example:
+ id: 21953776-783c-426c-bf15-cbde997839c4
+ providerName: provider-name
+ dateTimeUTC: 2020-03-27T15:45:09.7078637
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ openingBalances: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -911,20 +889,21 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EmployeeOpeningBalances'
- example: {
- "statutoryAdoptionPay": 20,
- "statutoryMaternityPay": 20,
- "statutoryPaternityPay": 20,
- "statutorySharedParentalPay": 20,
- "statutorySickPay": 20,
- "priorEmployeeNumber": 20
- }
+ example:
+ statutoryAdoptionPay: 20
+ statutoryMaternityPay: 20
+ statutoryPaternityPay: 20
+ statutorySharedParentalPay: 20
+ statutorySickPay: 20
+ priorEmployeeNumber: 20
/Employees/{EmployeeID}/Leave:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollUk
operationId: getEmployeeLeaves
@@ -936,46 +915,40 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaves'
- example: {
- "id": "e4d42712-4876-4b32-987d-1f62538089de",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-03-27T15:58:16.0929399",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leave": [
- {
- "leaveID": "384bf62a-5884-484d-b675-a3ad9c662f8e",
- "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c",
- "description": "Vacation to Majorca",
- "startDate": "2020-02-17T00:00:00",
- "endDate": "2020-02-21T00:00:00",
- "periods": [
- {
- "periodStartDate": "2020-02-17T00:00:00",
- "periodEndDate": "2020-02-23T00:00:00",
- "numberOfUnits": 40,
- "periodStatus": "Approved"
- }
- ],
- "updatedDateUTC": "2020-02-10T10:15:53"
- }
- ]
- }
+ example:
+ id: e4d42712-4876-4b32-987d-1f62538089de
+ providerName: provider-name
+ dateTimeUTC: 2020-03-27T15:58:16.0929399
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leave:
+ - leaveID: 384bf62a-5884-484d-b675-a3ad9c662f8e
+ leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c
+ description: Vacation to Majorca
+ startDate: 2020-02-17T00:00:00
+ endDate: 2020-02-21T00:00:00
+ periods:
+ - periodStartDate: 2020-02-17T00:00:00
+ periodEndDate: 2020-02-23T00:00:00
+ numberOfUnits: 40
+ periodStatus: Approved
+ updatedDateUTC: 2020-02-10T10:15:53
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: createEmployeeLeave
@@ -988,13 +961,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- endDateValue:
key: endDate
keyPascal: EndDate
@@ -1002,13 +975,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- employeeLeave:
key: employeeLeave
keyPascal: EmployeeLeave
@@ -1019,7 +992,7 @@ paths:
keyPascal: LeaveTypeID
keySnake: leave_type_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: employeeLeave
- startDate:
is_variable: true
@@ -1032,7 +1005,7 @@ paths:
ruby: start_date
object: employeeLeave
- endDate:
- is_last: true
+ is_last: true
is_variable: true
nonString: true
key: endDate
@@ -1050,42 +1023,37 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveObject'
- example: {
- "id": "ef91410a-2be1-42cc-86db-e625344a82e9",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-03-31T04:32:57.0247198",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leave": {
- "leaveID": "bdfedc6b-363b-4801-8ba6-9a074d400b31",
- "leaveTypeID": "1d2778ee-86ea-45c0-bbf8-1045485f6b3f",
- "description": "Creating a Description",
- "startDate": "2020-03-24T00:00:00",
- "endDate": "2020-03-26T00:00:00",
- "periods": [
- {
- "periodStartDate": "2020-03-23T00:00:00",
- "periodEndDate": "2020-03-29T00:00:00",
- "numberOfUnits": 24,
- "periodStatus": "Approved"
- }
- ],
- "updatedDateUTC": "2020-03-31T04:32:56.9537857"
- }
- }
- '400':
+ example:
+ id: ef91410a-2be1-42cc-86db-e625344a82e9
+ providerName: provider-name
+ dateTimeUTC: 2020-03-31T04:32:57.0247198
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leave:
+ leaveID: bdfedc6b-363b-4801-8ba6-9a074d400b31
+ leaveTypeID: 1d2778ee-86ea-45c0-bbf8-1045485f6b3f
+ description: Creating a Description
+ startDate: 2020-03-24T00:00:00
+ endDate: 2020-03-26T00:00:00
+ periods:
+ - periodStartDate: 2020-03-23T00:00:00
+ periodEndDate: 2020-03-29T00:00:00
+ numberOfUnits: 24
+ periodStatus: Approved
+ updatedDateUTC: 2020-03-31T04:32:56.9537857
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -1097,18 +1065,19 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeave'
- example: {
- "leaveTypeID": "1d2778ee-86ea-45c0-bbf8-1045485f6b3f",
- "description": "Creating a Description",
- "startDate": "2020-03-24",
- "endDate": "2020-03-26"
- }
+ example:
+ leaveTypeID: 1d2778ee-86ea-45c0-bbf8-1045485f6b3f
+ description: Creating a Description
+ startDate: "2020-03-24"
+ endDate: "2020-03-26"
/Employees/{EmployeeID}/Leave/{LeaveID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollUk
operationId: getEmployeeLeave
@@ -1120,7 +1089,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -1129,44 +1098,40 @@ paths:
in: path
required: true
description: Leave id for single object
- schema:
+ schema:
type: string
format: uuid
example: c4be24e5-e840-4c92-9eaa-2d86cd596314
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveObject'
- example: {
- "id": "6ae25805-fef3-4c9b-9e69-9ccc71a6a8da",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-03-27T19:58:03.8455417",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leave": {
- "leaveID": "384bf62a-5884-484d-b675-a3ad9c662f8e",
- "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c",
- "description": "Vacation to Majorca",
- "startDate": "2020-02-17T00:00:00",
- "endDate": "2020-02-21T00:00:00",
- "periods": [
- {
- "periodStartDate": "2020-02-17T00:00:00",
- "periodEndDate": "2020-02-23T00:00:00",
- "numberOfUnits": 40,
- "periodStatus": "Approved"
- }
- ],
- "updatedDateUTC": "2020-02-10T10:15:53"
- }
- }
+ example:
+ id: 6ae25805-fef3-4c9b-9e69-9ccc71a6a8da
+ providerName: provider-name
+ dateTimeUTC: 2020-03-27T19:58:03.8455417
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leave:
+ leaveID: 384bf62a-5884-484d-b675-a3ad9c662f8e
+ leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c
+ description: Vacation to Majorca
+ startDate: 2020-02-17T00:00:00
+ endDate: 2020-02-21T00:00:00
+ periods:
+ - periodStartDate: 2020-02-17T00:00:00
+ periodEndDate: 2020-02-23T00:00:00
+ numberOfUnits: 40
+ periodStatus: Approved
+ updatedDateUTC: 2020-02-10T10:15:53
put:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: updateEmployeeLeave
@@ -1179,13 +1144,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- endDateValue:
key: endDate
keyPascal: EndDate
@@ -1193,13 +1158,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- employeeLeave:
key: employeeLeave
keyPascal: EmployeeLeave
@@ -1210,7 +1175,7 @@ paths:
keyPascal: LeaveTypeID
keySnake: leave_type_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: employeeLeave
- startDate:
is_variable: true
@@ -1223,7 +1188,7 @@ paths:
ruby: start_date
object: employeeLeave
- endDate:
- is_last: true
+ is_last: true
is_variable: true
nonString: true
key: endDate
@@ -1241,7 +1206,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -1250,42 +1215,37 @@ paths:
in: path
required: true
description: Leave id for single object
- schema:
+ schema:
type: string
format: uuid
- example: c4be24e5-e840-4c92-9eaa-2d86cd596314
+ example: c4be24e5-e840-4c92-9eaa-2d86cd596314
responses:
- '200':
+ "200":
description: successful response
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveObject'
- example: {
- "id": "ea115d89-61a0-4a2d-ad77-e3c63a2b401f",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-17T18:18:30.5118218",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leave": {
- "leaveID": "8340b795-50c1-428e-9fda-90badf081ab4",
- "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c",
- "description": "Creating a Description",
- "startDate": "2020-04-24T00:00:00",
- "endDate": "2020-04-26T00:00:00",
- "periods": [
- {
- "periodStartDate": "2020-04-20T00:00:00",
- "periodEndDate": "2020-04-26T00:00:00",
- "numberOfUnits": 1,
- "periodStatus": "Approved"
- }
- ],
- "updatedDateUTC": "2020-04-17T18:18:30.614537"
- }
- }
- '400':
+ example:
+ id: ea115d89-61a0-4a2d-ad77-e3c63a2b401f
+ providerName: provider-name
+ dateTimeUTC: 2020-04-17T18:18:30.5118218
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leave:
+ leaveID: 8340b795-50c1-428e-9fda-90badf081ab4
+ leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c
+ description: Creating a Description
+ startDate: 2020-04-24T00:00:00
+ endDate: 2020-04-26T00:00:00
+ periods:
+ - periodStartDate: 2020-04-20T00:00:00
+ periodEndDate: 2020-04-26T00:00:00
+ numberOfUnits: 1
+ periodStatus: Approved
+ updatedDateUTC: 2020-04-17T18:18:30.614537
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -1297,23 +1257,20 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeave'
- example: {
- "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c",
- "description": "Creating a Description",
- "startDate": "2020-04-24",
- "endDate": "2020-04-26",
- "periods": [
- {
- "periodStartDate": "2020-04-20",
- "periodEndDate": "2020-04-26",
- "numberOfUnits": 1,
- "periodStatus": "Approved"
- }
- ]
- }
+ example:
+ leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c
+ description: Creating a Description
+ startDate: "2020-04-24"
+ endDate: "2020-04-26"
+ periods:
+ - periodStartDate: "2020-04-20"
+ periodEndDate: "2020-04-26"
+ numberOfUnits: 1
+ periodStatus: Approved
delete:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: deleteEmployeeLeave
@@ -1325,7 +1282,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -1334,31 +1291,32 @@ paths:
in: path
required: true
description: Leave id for single object
- schema:
+ schema:
type: string
format: uuid
- example: c4be24e5-e840-4c92-9eaa-2d86cd596314
+ example: c4be24e5-e840-4c92-9eaa-2d86cd596314
responses:
- '200':
+ "200":
description: successful response
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveObject'
- example: {
- "id": "b0ab87f6-bbca-4c81-b616-c545592f6988",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-03-31T04:11:42.422139",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null
- }
+ example:
+ id: b0ab87f6-bbca-4c81-b616-c545592f6988
+ providerName: provider-name
+ dateTimeUTC: 2020-03-31T04:11:42.422139
+ httpStatusCode: OK
+ pagination: null
+ problem: null
/Employees/{EmployeeID}/LeaveBalances:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollUk
operationId: getEmployeeLeaveBalances
@@ -1370,50 +1328,45 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveBalances'
- example: {
- "id": "a9b96d49-fc15-4e25-8b62-818462ea6dbd",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-03-31T04:45:06.125346",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 2
- },
- "problem": null,
- "leaveBalances": [
- {
- "name": "Holiday",
- "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c",
- "balance": 32,
- "typeOfUnits": "Hours"
- },
- {
- "name": "Parental Leave",
- "leaveTypeID": "1d2778ee-86ea-45c0-bbf8-1045485f6b3f",
- "balance": -80,
- "typeOfUnits": "Hours"
- }
- ]
- }
+ example:
+ id: a9b96d49-fc15-4e25-8b62-818462ea6dbd
+ providerName: provider-name
+ dateTimeUTC: 2020-03-31T04:45:06.125346
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 2
+ problem: null
+ leaveBalances:
+ - name: Holiday
+ leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c
+ balance: 32
+ typeOfUnits: Hours
+ - name: Parental Leave
+ leaveTypeID: 1d2778ee-86ea-45c0-bbf8-1045485f6b3f
+ balance: -80
+ typeOfUnits: Hours
/Employees/{EmployeeID}/StatutoryLeaveBalance:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollUk
operationId: getEmployeeStatutoryLeaveBalances
@@ -1425,7 +1378,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -1444,31 +1397,31 @@ paths:
type: string
format: date
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeStatutoryLeaveBalanceObject'
- example: {
- "id": "ee863df3-c394-4102-bb91-2b14de404c1c",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-03-31T05:03:47.418497",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leaveBalance": {
- "leaveType": "Sick",
- "balanceRemaining": 1120,
- "units": "Hours"
- }
- }
+ example:
+ id: ee863df3-c394-4102-bb91-2b14de404c1c
+ providerName: provider-name
+ dateTimeUTC: 2020-03-31T05:03:47.418497
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leaveBalance:
+ leaveType: Sick
+ balanceRemaining: 1120
+ units: Hours
/StatutoryLeaves/Summary/{EmployeeID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getStatutoryLeaveSummary
@@ -1480,7 +1433,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -1491,37 +1444,34 @@ paths:
schema:
type: boolean
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeStatutoryLeavesSummaries'
- example: {
- "id": "1908f4d1-b85d-4d6d-a885-6b6e2922ad03",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-02T19:47:06.0791382",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "statutoryLeaves": [
- {
- "statutoryLeaveID": "17f4c3c7-d65c-4572-9118-03798f26f813",
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "type": "Sick",
- "endDate": "2020-04-01",
- "startDate": "2020-03-28",
- "isEntitled": false,
- "status": "Pending"
- }
- ]
- }
+ example:
+ id: 1908f4d1-b85d-4d6d-a885-6b6e2922ad03
+ providerName: provider-name
+ dateTimeUTC: 2020-04-02T19:47:06.0791382
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ statutoryLeaves:
+ - statutoryLeaveID: 17f4c3c7-d65c-4572-9118-03798f26f813
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ type: Sick
+ endDate: "2020-04-01"
+ startDate: "2020-03-28"
+ isEntitled: false
+ status: Pending
/StatutoryLeaves/Sick:
parameters:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollUk
operationId: createEmployeeStatutorySickLeave
@@ -1534,13 +1484,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- endDateValue:
key: endDate
keyPascal: EndDate
@@ -1548,13 +1498,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- employeeStatutorySickLeave:
key: employeeStatutorySickLeave
keyPascal: EmployeeStatutorySickLeave
@@ -1564,15 +1514,15 @@ paths:
key: isPregnancyRelated
keyPascal: IsPregnancyRelated
keySnake: is_pregnancy_related
- nonString: true
- default: true
+ nonString: true
+ default: true
object: employeeStatutorySickLeave
- leaveTypeID:
key: leaveTypeID
keyPascal: LeaveTypeID
keySnake: leave_type_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: employeeStatutorySickLeave
- startDate:
is_variable: true
@@ -1585,7 +1535,7 @@ paths:
ruby: start_date
object: employeeStatutorySickLeave
- endDate:
- is_last: true
+ is_last: true
is_variable: true
nonString: true
key: endDate
@@ -1599,45 +1549,41 @@ paths:
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeStatutorySickLeaveObject'
- example: {
- "id": "35c840a3-04aa-43f1-9171-f7eaf4fd4454",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-20T18:59:28.3440854",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "statutorySickLeave": {
- "statutoryLeaveID": "a2b5a1fb-ae21-47b4-876d-0b61fa6b37ab",
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "leaveTypeID": "aab78802-e9d3-4bbd-bc87-df858054988f",
- "startDate": "2020-04-21",
- "endDate": "2020-04-24",
- "workPattern": [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday"
- ],
- "isPregnancyRelated": false,
- "sufficientNotice": true,
- "isEntitled": false,
- "entitlementWeeksRequested": 0.8,
- "entitlementWeeksQualified": 27.2,
- "entitlementWeeksRemaining": 26.4,
- "overlapsWithOtherLeave": false,
- "entitlementFailureReasons": [
- "NotQualifiedInPreviousPiw"
- ]
- }
- }
- '400':
+ example:
+ id: 35c840a3-04aa-43f1-9171-f7eaf4fd4454
+ providerName: provider-name
+ dateTimeUTC: 2020-04-20T18:59:28.3440854
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ statutorySickLeave:
+ statutoryLeaveID: a2b5a1fb-ae21-47b4-876d-0b61fa6b37ab
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ leaveTypeID: aab78802-e9d3-4bbd-bc87-df858054988f
+ startDate: "2020-04-21"
+ endDate: "2020-04-24"
+ workPattern:
+ - Monday
+ - Tuesday
+ - Wednesday
+ - Thursday
+ - Friday
+ isPregnancyRelated: false
+ sufficientNotice: true
+ isEntitled: false
+ entitlementWeeksRequested: 0.8
+ entitlementWeeksQualified: 27.2
+ entitlementWeeksRemaining: 26.4
+ overlapsWithOtherLeave: false
+ entitlementFailureReasons:
+ - NotQualifiedInPreviousPiw
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -1649,27 +1595,27 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EmployeeStatutorySickLeave'
- example: {
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "leaveTypeID": "aab78802-e9d3-4bbd-bc87-df858054988f",
- "startDate": "2020-04-21",
- "endDate": "2020-04-24",
- "workPattern": [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday"
- ],
- "isPregnancyRelated": false,
- "sufficientNotice": true
- }
+ example:
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ leaveTypeID: aab78802-e9d3-4bbd-bc87-df858054988f
+ startDate: "2020-04-21"
+ endDate: "2020-04-24"
+ workPattern:
+ - Monday
+ - Tuesday
+ - Wednesday
+ - Thursday
+ - Friday
+ isPregnancyRelated: false
+ sufficientNotice: true
/StatutoryLeaves/Sick/{StatutorySickLeaveID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getEmployeeStatutorySickLeave
@@ -1681,55 +1627,53 @@ paths:
in: path
required: true
description: Statutory sick leave id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeStatutorySickLeaveObject'
- example: {
- "id": "c484213d-6225-4ede-bc5e-e81ef350af41",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-17T18:31:49.3895522",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "statutorySickLeave": {
- "statutoryLeaveID": "17f4c3c7-d65c-4572-9118-03798f26f813",
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "leaveTypeID": "054a2b5e-fe51-4494-9486-3e3130323c69",
- "startDate": "2020-03-28",
- "endDate": "2020-04-01",
- "workPattern": [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday"
- ],
- "isPregnancyRelated": false,
- "sufficientNotice": true,
- "isEntitled": false,
- "entitlementWeeksRequested": 0.6,
- "entitlementWeeksQualified": 28,
- "entitlementWeeksRemaining": 0,
- "overlapsWithOtherLeave": false,
- "entitlementFailureReasons": [
- "AweLowerThanLel"
- ]
- }
- }
+ example:
+ id: c484213d-6225-4ede-bc5e-e81ef350af41
+ providerName: provider-name
+ dateTimeUTC: 2020-04-17T18:31:49.3895522
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ statutorySickLeave:
+ statutoryLeaveID: 17f4c3c7-d65c-4572-9118-03798f26f813
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ leaveTypeID: 054a2b5e-fe51-4494-9486-3e3130323c69
+ startDate: "2020-03-28"
+ endDate: "2020-04-01"
+ workPattern:
+ - Monday
+ - Tuesday
+ - Wednesday
+ - Thursday
+ - Friday
+ isPregnancyRelated: false
+ sufficientNotice: true
+ isEntitled: false
+ entitlementWeeksRequested: 0.6
+ entitlementWeeksQualified: 28
+ entitlementWeeksRemaining: 0
+ overlapsWithOtherLeave: false
+ entitlementFailureReasons:
+ - AweLowerThanLel
/Employees/{EmployeeID}/LeavePeriods:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollUk
operationId: getEmployeeLeavePeriods
@@ -1741,7 +1685,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 00000000-0000-0000-0000-000000000000
@@ -1760,35 +1704,29 @@ paths:
type: string
format: date
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/LeavePeriods'
- example: {
- "id": "00000000-0000-0000-0000-000000000000",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-07T20:33:42.1904008",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "periods": [
- {
- "periodStartDate": "2020-02-24T00:00:00",
- "periodEndDate": "2020-03-01T00:00:00",
- "numberOfUnits": 40,
- "periodStatus": null
- },
- {
- "periodStartDate": "2020-03-02T00:00:00",
- "periodEndDate": "2020-03-08T00:00:00",
- "numberOfUnits": 32,
- "periodStatus": null
- }
- ]
- }
- '400':
+ example:
+ id: 00000000-0000-0000-0000-000000000000
+ providerName: provider-name
+ dateTimeUTC: 2020-04-07T20:33:42.1904008
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ periods:
+ - periodStartDate: 2020-02-24T00:00:00
+ periodEndDate: 2020-03-01T00:00:00
+ numberOfUnits: 40
+ periodStatus: null
+ - periodStartDate: 2020-03-02T00:00:00
+ periodEndDate: 2020-03-08T00:00:00
+ numberOfUnits: 32
+ periodStatus: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -1797,9 +1735,11 @@ paths:
/Employees/{EmployeeID}/LeaveTypes:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollUk
operationId: getEmployeeLeaveTypes
@@ -1811,37 +1751,33 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveTypes'
- example: {
- "id": "d86959c6-94f5-437a-9367-581cb145fc4f",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-03-27T16:25:56.2931034",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leaveTypes": [
- {
- "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c",
- "scheduleOfAccrual": "OnAnniversaryDate",
- "hoursAccruedAnnually": 200,
- "maximumToAccrue": 0,
- "openingBalance": 72,
- "rateAccruedHourly": 0,
- "scheduleOfAccrualDate": null
- }
- ]
- }
- '400':
+ example:
+ id: d86959c6-94f5-437a-9367-581cb145fc4f
+ providerName: provider-name
+ dateTimeUTC: 2020-03-27T16:25:56.2931034
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leaveTypes:
+ - leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c
+ scheduleOfAccrual: OnAnniversaryDate
+ hoursAccruedAnnually: 200
+ maximumToAccrue: 0
+ openingBalance: 72
+ rateAccruedHourly: 0
+ scheduleOfAccrualDate: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -1849,7 +1785,8 @@ paths:
$ref: '#/components/schemas/Problem'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: createEmployeeLeaveType
@@ -1865,13 +1802,13 @@ paths:
keyPascal: LeaveTypeID
keySnake: leave_type_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: employeeLeaveType
- scheduleOfAccrual:
key: scheduleOfAccrual
keyPascal: ScheduleOfAccrual
keySnake: schedule_of_accrual
- nonString: true
+ nonString: true
default: ScheduleOfAccrualEnum.BeginningOfCalendarYear
php: XeroAPI\XeroPHP\Models\PayrollUk\EmployeeLeaveType\ScheduleOfAccrualEnum.BeginningOfCalendarYear
node: EmployeeLeaveType.ScheduleOfAccrualEnum.BeginningOfCalendarYear
@@ -1884,7 +1821,7 @@ paths:
key: openingBalance
keyPascal: OpeningBalance
keySnake: opening_balance
- nonString: true
+ nonString: true
default: 5.25
object: employeeLeaveType
- scheduleOfAccrualDate:
@@ -1895,7 +1832,7 @@ paths:
keySnake: schedule_of_accrual_date
object: employeeLeaveType
default: 2024-05-01
- is_last: true
+ is_last: true
summary: Creates employee leave type records
parameters:
- $ref: '#/components/parameters/idempotencyKey'
@@ -1904,34 +1841,32 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveTypeObject'
- example: {
- "id": "3245e4c9-1ec5-4f3e-b659-fdb722733060",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-20T20:24:25.8151387",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leaveType": {
- "leaveTypeID": "4918f233-bd31-43f9-9633-bcc6de1178f2",
- "scheduleOfAccrual": "BeginningOfCalendarYear",
- "hoursAccruedAnnually": 10,
- "maximumToAccrue": 0,
- "openingBalance": 0,
- "rateAccruedHourly": 0
- }
- }
- '400':
+ example:
+ id: 3245e4c9-1ec5-4f3e-b659-fdb722733060
+ providerName: provider-name
+ dateTimeUTC: 2020-04-20T20:24:25.8151387
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leaveType:
+ leaveTypeID: 4918f233-bd31-43f9-9633-bcc6de1178f2
+ scheduleOfAccrual: BeginningOfCalendarYear
+ hoursAccruedAnnually: 10
+ maximumToAccrue: 0
+ openingBalance: 0
+ rateAccruedHourly: 0
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -1943,17 +1878,18 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EmployeeLeaveType'
- example: {
- "leaveTypeID": "4918f233-bd31-43f9-9633-bcc6de1178f2",
- "scheduleOfAccrual": "BeginningOfCalendarYear",
- "hoursAccruedAnnually": 10
- }
+ example:
+ leaveTypeID: 4918f233-bd31-43f9-9633-bcc6de1178f2
+ scheduleOfAccrual: BeginningOfCalendarYear
+ hoursAccruedAnnually: 10
/Employees/{EmployeeID}/PaymentMethods:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollUk
operationId: getEmployeePaymentMethod
@@ -1965,36 +1901,31 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentMethodObject'
- example: {
- "id": "33c27fe9-de53-4114-8455-a6392add88b8",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-13T18:22:18.9003328",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "paymentMethod": {
- "paymentMethod": "Electronically",
- "bankAccounts": [
- {
- "accountName": "Oliver Furniss - Santander",
- "accountNumber": "12345678",
- "sortCode": "111111"
- }
- ]
- }
- }
- '400':
+ example:
+ id: 33c27fe9-de53-4114-8455-a6392add88b8
+ providerName: provider-name
+ dateTimeUTC: 2020-04-13T18:22:18.9003328
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ paymentMethod:
+ paymentMethod: Electronically
+ bankAccounts:
+ - accountName: Oliver Furniss - Santander
+ accountNumber: "12345678"
+ sortCode: "111111"
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -2002,7 +1933,8 @@ paths:
$ref: '#/components/schemas/Problem'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: createEmployeePaymentMethod
@@ -2030,7 +1962,7 @@ paths:
keyPascal: SortCode
keySnake: sort_code
default: 123411
- is_last: true
+ is_last: true
object: bankAccount
- bankAccounts:
is_list: true
@@ -2072,36 +2004,31 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentMethodObject'
- example: {
- "id": "6c5eab91-8f3c-4569-a5ce-ab4eec112d35",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-13T18:48:16.6038123",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "paymentMethod": {
- "paymentMethod": "Electronically",
- "bankAccounts": [
- {
- "accountName": "Sid BofA",
- "accountNumber": "24987654",
- "sortCode": "287654"
- }
- ]
- }
- }
- '400':
+ example:
+ id: 6c5eab91-8f3c-4569-a5ce-ab4eec112d35
+ providerName: provider-name
+ dateTimeUTC: 2020-04-13T18:48:16.6038123
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ paymentMethod:
+ paymentMethod: Electronically
+ bankAccounts:
+ - accountName: Sid BofA
+ accountNumber: "24987654"
+ sortCode: "287654"
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -2113,22 +2040,20 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/PaymentMethod'
- example: {
- "paymentMethod": "Electronically",
- "bankAccounts": [
- {
- "accountName": "Sid BofA",
- "accountNumber": "24987654",
- "sortCode": "287654"
- }
- ]
- }
+ example:
+ paymentMethod: Electronically
+ bankAccounts:
+ - accountName: Sid BofA
+ accountNumber: "24987654"
+ sortCode: "287654"
/Employees/{EmployeeID}/PayTemplates:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollUk
operationId: getEmployeePayTemplate
@@ -2140,44 +2065,38 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeePayTemplateObject'
- example: {
- "id": "3138be2b-96d9-44d0-a01e-80fd527555c8",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-17T15:10:54.4464048",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 0,
- "itemCount": 0
- },
- "problem": null,
- "payTemplate": {
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "earningTemplates": [
- {
- "payTemplateEarningID": "4e2a0753-56b9-423d-8068-624473bd1c00",
- "ratePerUnit": 25,
- "numberOfUnits": 10,
- "fixedAmount": null,
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "name": "Regular Hours"
- }
- ]
- }
- }
- '400':
+ example:
+ id: 3138be2b-96d9-44d0-a01e-80fd527555c8
+ providerName: provider-name
+ dateTimeUTC: 2020-04-17T15:10:54.4464048
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 0
+ itemCount: 0
+ problem: null
+ payTemplate:
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ earningTemplates:
+ - payTemplateEarningID: 4e2a0753-56b9-423d-8068-624473bd1c00
+ ratePerUnit: 25
+ numberOfUnits: 10
+ fixedAmount: null
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ name: Regular Hours
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -2189,7 +2108,8 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: createEmployeeEarningsTemplate
@@ -2205,37 +2125,37 @@ paths:
keyPascal: PayTemplateEarningID
keySnake: pay_template_earning_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsTemplate
- ratePerUnit:
key: ratePerUnit
keyPascal: RatePerUnit
keySnake: rate_per_unit
- nonString: true
+ nonString: true
default: 14.25
object: earningsTemplate
- is_money: true
+ is_money: true
- numberOfUnits:
key: numberOfUnits
keyPascal: NumberOfUnits
keySnake: number_of_units
default: 35.50
- nonString: true
- is_money: true
+ nonString: true
+ is_money: true
object: earningsTemplate
- fixedAmount:
key: fixedAmount
keyPascal: FixedAmount
keySnake: fixed_amount
default: 50
- nonString: true
+ nonString: true
object: earningsTemplate
- earningsRateId:
key: earningsRateID
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsTemplate
- name:
key: name
@@ -2270,18 +2190,18 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EarningsTemplateObject'
- '400':
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -2298,7 +2218,8 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
put:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: updateEmployeeEarningsTemplate
@@ -2314,37 +2235,37 @@ paths:
keyPascal: PayTemplateEarningID
keySnake: pay_template_earning_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsTemplate
- ratePerUnit:
key: ratePerUnit
keyPascal: RatePerUnit
keySnake: rate_per_unit
- nonString: true
+ nonString: true
default: 14.25
object: earningsTemplate
- is_money: true
+ is_money: true
- numberOfUnits:
key: numberOfUnits
keyPascal: NumberOfUnits
keySnake: number_of_units
default: 35.50
- nonString: true
- is_money: true
+ nonString: true
+ is_money: true
object: earningsTemplate
- fixedAmount:
key: fixedAmount
keyPascal: FixedAmount
keySnake: fixed_amount
default: 50
- nonString: true
+ nonString: true
object: earningsTemplate
- earningsRateId:
key: earningsRateID
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsTemplate
- name:
key: name
@@ -2379,7 +2300,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -2387,35 +2308,33 @@ paths:
x-snake: pay_template_earning_id
in: path
required: true
- description: Id for single pay template earnings object
- schema:
+ description: Id for single pay template earnings object
+ schema:
type: string
format: uuid
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EarningsTemplateObject'
- example: {
- "id": "39603f09-e06f-4cd4-8291-e3ad1df8b35b",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-17T15:52:35.0247503",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "earningTemplate": {
- "payTemplateEarningID": "4e2a0753-56b9-423d-8068-624473bd1c00",
- "ratePerUnit": 30,
- "numberOfUnits": 4,
- "fixedAmount": null,
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "name": "Regular Hours"
- }
- }
- '400':
+ example:
+ id: 39603f09-e06f-4cd4-8291-e3ad1df8b35b
+ providerName: provider-name
+ dateTimeUTC: 2020-04-17T15:52:35.0247503
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ earningTemplate:
+ payTemplateEarningID: 4e2a0753-56b9-423d-8068-624473bd1c00
+ ratePerUnit: 30
+ numberOfUnits: 4
+ fixedAmount: null
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ name: Regular Hours
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -2427,14 +2346,14 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EarningsTemplate'
- example: {
- "ratePerUnit": 30,
- "numberOfUnits": 4,
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27"
- }
+ example:
+ ratePerUnit: 30
+ numberOfUnits: 4
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
delete:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: deleteEmployeeEarningsTemplate
@@ -2445,7 +2364,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -2453,20 +2372,21 @@ paths:
x-snake: pay_template_earning_id
in: path
required: true
- description: Id for single pay template earnings object
- schema:
+ description: Id for single pay template earnings object
+ schema:
type: string
format: uuid
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
- '200':
+ "200":
description: deletion successful
/Employees/{EmployeeID}/paytemplateearnings:
parameters:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: createMultipleEmployeeEarningsTemplate
@@ -2482,37 +2402,37 @@ paths:
keyPascal: PayTemplateEarningID
keySnake: pay_template_earning_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsTemplate
- ratePerUnit:
key: ratePerUnit
keyPascal: RatePerUnit
keySnake: rate_per_unit
- nonString: true
+ nonString: true
default: 14.25
object: earningsTemplate
- is_money: true
+ is_money: true
- numberOfUnits:
key: numberOfUnits
keyPascal: NumberOfUnits
keySnake: number_of_units
default: 35.50
- nonString: true
- is_money: true
+ nonString: true
+ is_money: true
object: earningsTemplate
- fixedAmount:
key: fixedAmount
keyPascal: FixedAmount
keySnake: fixed_amount
default: 50
- nonString: true
+ nonString: true
object: earningsTemplate
- earningsRateId:
key: earningsRateID
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsTemplate
- name:
key: name
@@ -2547,44 +2467,38 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeePayTemplates'
- example: {
- "id": "1c08b529-0827-4e91-a6a1-c479765aa65f",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-17T16:56:35.6264368",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "earningTemplates": [
- {
- "payTemplateEarningID": "6b32533d-1111-4a92-ac52-7641315a1719",
- "ratePerUnit": 20,
- "numberOfUnits": 8,
- "fixedAmount": null,
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "name": "Regular Hours"
- },
- {
- "payTemplateEarningID": "b8b16366-6a60-4b72-97c1-57af555da375",
- "ratePerUnit": 20,
- "numberOfUnits": 8,
- "fixedAmount": null,
- "earningsRateID": "973365f3-66b2-4c33-8ae6-14b75f78f68b",
- "name": "Overtime Hours"
- }
- ]
- }
- '400':
+ example:
+ id: 1c08b529-0827-4e91-a6a1-c479765aa65f
+ providerName: provider-name
+ dateTimeUTC: 2020-04-17T16:56:35.6264368
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ earningTemplates:
+ - payTemplateEarningID: 6b32533d-1111-4a92-ac52-7641315a1719
+ ratePerUnit: 20
+ numberOfUnits: 8
+ fixedAmount: null
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ name: Regular Hours
+ - payTemplateEarningID: b8b16366-6a60-4b72-97c1-57af555da375
+ ratePerUnit: 20
+ numberOfUnits: 8
+ fixedAmount: null
+ earningsRateID: 973365f3-66b2-4c33-8ae6-14b75f78f68b
+ name: Overtime Hours
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -2596,24 +2510,15 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EarningsTemplates'
- example: '[
- {
- "ratePerUnit":20.0,
- "numberOfUnits":8.0,
- "earningsRateID":"87f5b43a-cf51-4b74-92de-94c819e82d27"
- },
- {
- "ratePerUnit":20.0,
- "numberOfUnits":8.0,
- "earningsRateID":"973365f3-66b2-4c33-8ae6-14b75f78f68b"
- }
- ]'
+ example: '[ { "ratePerUnit":20.0, "numberOfUnits":8.0, "earningsRateID":"87f5b43a-cf51-4b74-92de-94c819e82d27" }, { "ratePerUnit":20.0, "numberOfUnits":8.0, "earningsRateID":"973365f3-66b2-4c33-8ae6-14b75f78f68b" } ]'
/Benefits:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getBenefits
@@ -2626,46 +2531,42 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Benefits'
- example: {
- "id": "079865dc-f3df-4783-98a9-67db747ab82c",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-15T18:45:03.617089",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 1
- },
- "problem": null,
- "benefits": [
- {
- "id": "17ee7e28-9f4c-4675-9590-cc0547c9f7ac",
- "name": "Mind The Gap Pensions",
- "category": "StakeholderPension",
- "liabilityAccountId": "d659ebbf-0760-4e07-a1fb-8de6b9ecdff9",
- "expenseAccountId": "edda7154-dfc8-4486-a82b-e5e955408eaa",
- "standardAmount": null,
- "percentage": 3,
- "calculationType": "PercentageOfGross",
- "currentRecord": true,
- "showBalanceToEmployee": false,
- "subjectToNIC": null,
- "subjectToPension": null,
- "subjectToTax": null,
- "isCalculatingOnQualifyingEarnings": null
- }
- ]
- }
+ example:
+ id: 079865dc-f3df-4783-98a9-67db747ab82c
+ providerName: provider-name
+ dateTimeUTC: 2020-04-15T18:45:03.617089
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 1
+ problem: null
+ benefits:
+ - id: 17ee7e28-9f4c-4675-9590-cc0547c9f7ac
+ name: Mind The Gap Pensions
+ category: StakeholderPension
+ liabilityAccountId: d659ebbf-0760-4e07-a1fb-8de6b9ecdff9
+ expenseAccountId: edda7154-dfc8-4486-a82b-e5e955408eaa
+ standardAmount: null
+ percentage: 3
+ calculationType: PercentageOfGross
+ currentRecord: true
+ showBalanceToEmployee: false
+ subjectToNIC: null
+ subjectToPension: null
+ subjectToTax: null
+ isCalculatingOnQualifyingEarnings: null
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollUk
operationId: createBenefit
@@ -2690,55 +2591,53 @@ paths:
keyPascal: ExpenseAccountID
keySnake: expense_account_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: benefit
- liabilityAccountID:
key: liabilityAccountID
keyPascal: LiabilityAccountID
keySnake: liability_account_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: benefit
- isCalculatingOnQualifyingEarnings:
key: isCalculatingOnQualifyingEarnings
keyPascal: IsCalculatingOnQualifyingEarnings
keySnake: is_calculating_on_qualifying_earnings
- nonString: true
- default: true
+ nonString: true
+ default: true
object: benefit
is_last: true
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/BenefitObject'
- example: {
- "id": "95352407-6477-42f1-bd9c-bab28af8b0d9",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-15T18:59:01.5812362",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "benefit": {
- "id": "d295bf25-fb61-4f91-9b62-a9ae87633746",
- "name": "My Big Bennie",
- "category": "StakeholderPension",
- "liabilityAccountId": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a",
- "expenseAccountId": "4b03500d-32fd-4616-8d70-e1e56e0519c6",
- "standardAmount": null,
- "percentage": 25,
- "calculationType": "PercentageOfGross",
- "currentRecord": true,
- "showBalanceToEmployee": true,
- "subjectToNIC": null,
- "subjectToPension": null,
- "subjectToTax": null,
- "isCalculatingOnQualifyingEarnings": null
- }
- }
- '400':
+ example:
+ id: 95352407-6477-42f1-bd9c-bab28af8b0d9
+ providerName: provider-name
+ dateTimeUTC: 2020-04-15T18:59:01.5812362
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ benefit:
+ id: d295bf25-fb61-4f91-9b62-a9ae87633746
+ name: My Big Bennie
+ category: StakeholderPension
+ liabilityAccountId: e0faa299-ca0d-4b0a-9e32-0dfabdf9179a
+ expenseAccountId: 4b03500d-32fd-4616-8d70-e1e56e0519c6
+ standardAmount: null
+ percentage: 25
+ calculationType: PercentageOfGross
+ currentRecord: true
+ showBalanceToEmployee: true
+ subjectToNIC: null
+ subjectToPension: null
+ subjectToTax: null
+ isCalculatingOnQualifyingEarnings: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -2750,21 +2649,22 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Benefit'
- example: {
- "name": "My Big Bennie",
- "category": "StakeholderPension",
- "liabilityAccountId": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a",
- "expenseAccountId": "4b03500d-32fd-4616-8d70-e1e56e0519c6",
- "standardAmount": 50,
- "percentage": 25,
- "calculationType": "PercentageOfGross"
- }
+ example:
+ name: My Big Bennie
+ category: StakeholderPension
+ liabilityAccountId: e0faa299-ca0d-4b0a-9e32-0dfabdf9179a
+ expenseAccountId: 4b03500d-32fd-4616-8d70-e1e56e0519c6
+ standardAmount: 50
+ percentage: 25
+ calculationType: PercentageOfGross
/Benefits/{id}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getBenefit
@@ -2779,42 +2679,42 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/BenefitObject'
- example: {
- "id": "e7959d7b-370d-47e5-bb15-4b68f136ddae",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-15T18:45:04.5134277",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "benefit": {
- "id": "17ee7e28-9f4c-4675-9590-cc0547c9f7ac",
- "name": "Mind The Gap Pensions",
- "category": "StakeholderPension",
- "liabilityAccountId": "d659ebbf-0760-4e07-a1fb-8de6b9ecdff9",
- "expenseAccountId": "edda7154-dfc8-4486-a82b-e5e955408eaa",
- "standardAmount": null,
- "percentage": 3,
- "calculationType": "PercentageOfGross",
- "currentRecord": true,
- "showBalanceToEmployee": false,
- "subjectToNIC": null,
- "subjectToPension": null,
- "subjectToTax": null,
- "isCalculatingOnQualifyingEarnings": null
- }
- }
+ example:
+ id: e7959d7b-370d-47e5-bb15-4b68f136ddae
+ providerName: provider-name
+ dateTimeUTC: 2020-04-15T18:45:04.5134277
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ benefit:
+ id: 17ee7e28-9f4c-4675-9590-cc0547c9f7ac
+ name: Mind The Gap Pensions
+ category: StakeholderPension
+ liabilityAccountId: d659ebbf-0760-4e07-a1fb-8de6b9ecdff9
+ expenseAccountId: edda7154-dfc8-4486-a82b-e5e955408eaa
+ standardAmount: null
+ percentage: 3
+ calculationType: PercentageOfGross
+ currentRecord: true
+ showBalanceToEmployee: false
+ subjectToNIC: null
+ subjectToPension: null
+ subjectToTax: null
+ isCalculatingOnQualifyingEarnings: null
/Deductions:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getDeductions
@@ -2827,66 +2727,60 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Deductions'
- example: {
- "id": "846b81f3-7192-4a78-a05c-ae5d2c402546",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-20T20:57:39.6123797",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 2
- },
- "problem": null,
- "deductions": [
- {
- "deductionId": "7c736d59-a624-4584-920b-e9910d2887a0",
- "deductionName": "Mind The Gap Pensions (NPA)",
- "deductionCategory": "StakeholderPension",
- "liabilityAccountId": "d659ebbf-0760-4e07-a1fb-8de6b9ecdff9",
- "currentRecord": true,
- "standardAmount": null,
- "reducesSuperLiability": null,
- "reducesTaxLiability": null,
- "calculationType": "PercentageOfGross",
- "percentage": 5,
- "subjectToNIC": null,
- "subjectToTax": null,
- "isReducedByBasicRate": null,
- "applyToPensionCalculations": null,
- "isCalculatingOnQualifyingEarnings": null,
- "isPension": null
- },
- {
- "deductionId": "49f301d4-2746-43a6-ba4a-e7001b5b83fc",
- "deductionName": "Post-Tax Pension",
- "deductionCategory": "StakeholderPensionPostTax",
- "liabilityAccountId": "d659ebbf-0760-4e07-a1fb-8de6b9ecdff9",
- "currentRecord": true,
- "standardAmount": null,
- "reducesSuperLiability": null,
- "reducesTaxLiability": null,
- "calculationType": "PercentageOfGross",
- "percentage": 0,
- "subjectToNIC": null,
- "subjectToTax": null,
- "isReducedByBasicRate": null,
- "applyToPensionCalculations": false,
- "isCalculatingOnQualifyingEarnings": null,
- "isPension": true
- }
- ]
- }
+ example:
+ id: 846b81f3-7192-4a78-a05c-ae5d2c402546
+ providerName: provider-name
+ dateTimeUTC: 2020-04-20T20:57:39.6123797
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 2
+ problem: null
+ deductions:
+ - deductionId: 7c736d59-a624-4584-920b-e9910d2887a0
+ deductionName: Mind The Gap Pensions (NPA)
+ deductionCategory: StakeholderPension
+ liabilityAccountId: d659ebbf-0760-4e07-a1fb-8de6b9ecdff9
+ currentRecord: true
+ standardAmount: null
+ reducesSuperLiability: null
+ reducesTaxLiability: null
+ calculationType: PercentageOfGross
+ percentage: 5
+ subjectToNIC: null
+ subjectToTax: null
+ isReducedByBasicRate: null
+ applyToPensionCalculations: null
+ isCalculatingOnQualifyingEarnings: null
+ isPension: null
+ - deductionId: 49f301d4-2746-43a6-ba4a-e7001b5b83fc
+ deductionName: Post-Tax Pension
+ deductionCategory: StakeholderPensionPostTax
+ liabilityAccountId: d659ebbf-0760-4e07-a1fb-8de6b9ecdff9
+ currentRecord: true
+ standardAmount: null
+ reducesSuperLiability: null
+ reducesTaxLiability: null
+ calculationType: PercentageOfGross
+ percentage: 0
+ subjectToNIC: null
+ subjectToTax: null
+ isReducedByBasicRate: null
+ applyToPensionCalculations: false
+ isCalculatingOnQualifyingEarnings: null
+ isPension: true
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollUk
operationId: createDeduction
@@ -2907,7 +2801,7 @@ paths:
key: deductionCategory
keyPascal: DeductionCategory
keySnake: deduction_category
- nonString: true
+ nonString: true
default: DeductionCategoryEnum.StakeholderPension
php: XeroAPI\XeroPHP\Models\PayrollUk\Deduction\DeductionCategoryEnum.StakeholderPension
node: Deduction.DeductionCategoryEnum.StakeholderPension
@@ -2921,13 +2815,13 @@ paths:
keyPascal: LiabilityAccountId
keySnake: liability_account_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: deduction
- calculationType:
key: calculationType
keyPascal: CalculationType
keySnake: calculation_type
- nonString: true
+ nonString: true
default: CalculationTypeEnum.PercentageOfGross
php: XeroAPI\XeroPHP\Models\PayrolUk\Deduction\CalculationTypeEnum.PercentageOfGross
node: Deduction.CalculationTypeEnum.PercentageOfGross
@@ -2941,39 +2835,37 @@ paths:
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/DeductionObject'
- example: {
- "id": "26cf94f5-6b62-4f76-8e89-44e4d0062566",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-20T23:03:00.7012103",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "deduction": {
- "deductionId": "b3695b29-750f-4957-98b4-678e4a529043",
- "deductionName": "My new deduction",
- "deductionCategory": "SalarySacrifice",
- "liabilityAccountId": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a",
- "currentRecord": true,
- "standardAmount": null,
- "reducesSuperLiability": null,
- "reducesTaxLiability": null,
- "calculationType": "FixedAmount",
- "percentage": null,
- "subjectToNIC": null,
- "subjectToTax": null,
- "isReducedByBasicRate": null,
- "applyToPensionCalculations": null,
- "isCalculatingOnQualifyingEarnings": null,
- "isPension": null
- }
- }
- '400':
+ example:
+ id: 26cf94f5-6b62-4f76-8e89-44e4d0062566
+ providerName: provider-name
+ dateTimeUTC: 2020-04-20T23:03:00.7012103
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ deduction:
+ deductionId: b3695b29-750f-4957-98b4-678e4a529043
+ deductionName: My new deduction
+ deductionCategory: SalarySacrifice
+ liabilityAccountId: e0faa299-ca0d-4b0a-9e32-0dfabdf9179a
+ currentRecord: true
+ standardAmount: null
+ reducesSuperLiability: null
+ reducesTaxLiability: null
+ calculationType: FixedAmount
+ percentage: null
+ subjectToNIC: null
+ subjectToTax: null
+ isReducedByBasicRate: null
+ applyToPensionCalculations: null
+ isCalculatingOnQualifyingEarnings: null
+ isPension: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -2985,18 +2877,19 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Deduction'
- example: {
- "deductionName": "My new deduction",
- "deductionCategory": "SalarySacrifice",
- "liabilityAccountId": "e0faa299-ca0d-4b0a-9e32-0dfabdf9179a",
- "calculationType": "FixedAmount"
- }
+ example:
+ deductionName: My new deduction
+ deductionCategory: SalarySacrifice
+ liabilityAccountId: e0faa299-ca0d-4b0a-9e32-0dfabdf9179a
+ calculationType: FixedAmount
/Deductions/{deductionId}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getDeduction
@@ -3012,38 +2905,36 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/DeductionObject'
- example: {
- "id": "addf44c5-5a3b-4d25-a61c-4e9e85cb27b3",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-20T22:42:54.5394384",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "deduction": {
- "deductionId": "7c736d59-a624-4584-920b-e9910d2887a0",
- "deductionName": "Mind The Gap Pensions (NPA)",
- "deductionCategory": "StakeholderPension",
- "liabilityAccountId": "d659ebbf-0760-4e07-a1fb-8de6b9ecdff9",
- "currentRecord": true,
- "standardAmount": null,
- "reducesSuperLiability": null,
- "reducesTaxLiability": null,
- "calculationType": "PercentageOfGross",
- "percentage": 5,
- "subjectToNIC": null,
- "subjectToTax": null,
- "isReducedByBasicRate": null,
- "applyToPensionCalculations": null,
- "isCalculatingOnQualifyingEarnings": null,
- "isPension": null
- }
- }
+ example:
+ id: addf44c5-5a3b-4d25-a61c-4e9e85cb27b3
+ providerName: provider-name
+ dateTimeUTC: 2020-04-20T22:42:54.5394384
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ deduction:
+ deductionId: 7c736d59-a624-4584-920b-e9910d2887a0
+ deductionName: Mind The Gap Pensions (NPA)
+ deductionCategory: StakeholderPension
+ liabilityAccountId: d659ebbf-0760-4e07-a1fb-8de6b9ecdff9
+ currentRecord: true
+ standardAmount: null
+ reducesSuperLiability: null
+ reducesTaxLiability: null
+ calculationType: PercentageOfGross
+ percentage: 5
+ subjectToNIC: null
+ subjectToTax: null
+ isReducedByBasicRate: null
+ applyToPensionCalculations: null
+ isCalculatingOnQualifyingEarnings: null
+ isPension: null
# NZ PAYROLL
# /StatutoryDeductions:
# parameters:
@@ -3098,7 +2989,9 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getEarningsOrders
@@ -3111,89 +3004,72 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EarningsOrders'
- example: {
- "id": "5bf85b65-c2de-4632-8e5e-cc0ab3d18ff0",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-20T23:21:36.0480051",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 8
- },
- "problem": null,
- "statutoryDeductions": [
- {
- "id": "d00d0128-500b-4685-8332-8fc8743a395c",
- "name": "AEO (maintenance)",
- "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d",
- "statutoryDeductionCategory": "PriorityOrder",
- "currentRecord": true
- },
- {
- "id": "f7a63612-a68d-431e-96d4-3fd0708e46b5",
- "name": "AEO (fines)",
- "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d",
- "statutoryDeductionCategory": "PriorityOrder",
- "currentRecord": true
- },
- {
- "id": "dabd9a53-25ac-4349-9fb3-8005ea781574",
- "name": "AEO (civil debts)",
- "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d",
- "statutoryDeductionCategory": "NonPriorityOrder",
- "currentRecord": true
- },
- {
- "id": "73ae94bb-182c-4242-8d67-1a281597ca9c",
- "name": "CTAEO",
- "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d",
- "statutoryDeductionCategory": "PriorityOrder",
- "currentRecord": true
- },
- {
- "id": "649a3c59-3937-43d2-b0e4-5e8942f17ffa",
- "name": "Child Support DEO",
- "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d",
- "statutoryDeductionCategory": "PriorityOrder",
- "currentRecord": true
- },
- {
- "id": "d4a4441f-452a-4067-97ac-ded4d157c319",
- "name": "Earnings Arrestment (Scotland)",
- "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d",
- "statutoryDeductionCategory": "TableBased",
- "currentRecord": true
- },
- {
- "id": "deec134a-2378-439c-89db-a71fa57fb28a",
- "name": "Conjoined Arrestment Order (Scotland)",
- "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d",
- "statutoryDeductionCategory": "TableBased",
- "currentRecord": true
- },
- {
- "id": "750c7c89-0579-45b4-becc-221a52119bd4",
- "name": "Current Maintenance Arrest (Scotland)",
- "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d",
- "statutoryDeductionCategory": "NonPriorityOrder",
- "currentRecord": true
- }
- ]
- }
+ example:
+ id: 5bf85b65-c2de-4632-8e5e-cc0ab3d18ff0
+ providerName: provider-name
+ dateTimeUTC: 2020-04-20T23:21:36.0480051
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 8
+ problem: null
+ statutoryDeductions:
+ - id: d00d0128-500b-4685-8332-8fc8743a395c
+ name: AEO (maintenance)
+ liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d
+ statutoryDeductionCategory: PriorityOrder
+ currentRecord: true
+ - id: f7a63612-a68d-431e-96d4-3fd0708e46b5
+ name: AEO (fines)
+ liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d
+ statutoryDeductionCategory: PriorityOrder
+ currentRecord: true
+ - id: dabd9a53-25ac-4349-9fb3-8005ea781574
+ name: AEO (civil debts)
+ liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d
+ statutoryDeductionCategory: NonPriorityOrder
+ currentRecord: true
+ - id: 73ae94bb-182c-4242-8d67-1a281597ca9c
+ name: CTAEO
+ liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d
+ statutoryDeductionCategory: PriorityOrder
+ currentRecord: true
+ - id: 649a3c59-3937-43d2-b0e4-5e8942f17ffa
+ name: Child Support DEO
+ liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d
+ statutoryDeductionCategory: PriorityOrder
+ currentRecord: true
+ - id: d4a4441f-452a-4067-97ac-ded4d157c319
+ name: Earnings Arrestment (Scotland)
+ liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d
+ statutoryDeductionCategory: TableBased
+ currentRecord: true
+ - id: deec134a-2378-439c-89db-a71fa57fb28a
+ name: Conjoined Arrestment Order (Scotland)
+ liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d
+ statutoryDeductionCategory: TableBased
+ currentRecord: true
+ - id: 750c7c89-0579-45b4-becc-221a52119bd4
+ name: Current Maintenance Arrest (Scotland)
+ liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d
+ statutoryDeductionCategory: NonPriorityOrder
+ currentRecord: true
/EarningsOrders/{id}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getEarningsOrder
@@ -3208,33 +3084,33 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EarningsOrderObject'
- example: {
- "id": "e0fd1c57-e9d0-4c3f-9a1a-0355ddf7c060",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-20T23:37:30.3398526",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "statutoryDeduction": {
- "id": "d00d0128-500b-4685-8332-8fc8743a395c",
- "name": "AEO (maintenance)",
- "liabilityAccountId": "921237ae-76ff-4f4c-bf70-5c3c177b149d",
- "statutoryDeductionCategory": "PriorityOrder",
- "currentRecord": true
- }
- }
+ example:
+ id: e0fd1c57-e9d0-4c3f-9a1a-0355ddf7c060
+ providerName: provider-name
+ dateTimeUTC: 2020-04-20T23:37:30.3398526
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ statutoryDeduction:
+ id: d00d0128-500b-4685-8332-8fc8743a395c
+ name: AEO (maintenance)
+ liabilityAccountId: 921237ae-76ff-4f4c-bf70-5c3c177b149d
+ statutoryDeductionCategory: PriorityOrder
+ currentRecord: true
/EarningsRates:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getEarningsRates
@@ -3247,54 +3123,48 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EarningsRates'
- example: {
- "id": "fbe7a960-fad3-4293-8de9-0fabfbea615f",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-15T15:00:05.2418623",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 13
- },
- "problem": null,
- "earningsRates": [
- {
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "name": "Regular Hours",
- "earningsType": "RegularEarnings",
- "rateType": "RatePerUnit",
- "typeOfUnits": "hours",
- "currentRecord": true,
- "expenseAccountID": "81da553d-c6c6-411e-95df-cc4ac8f7e1c2",
- "fixedAmount": null,
- "ratePerUnit": null,
- "multipleOfOrdinaryEarningsRate": null
- },
- {
- "earningsRateID": "973365f3-66b2-4c33-8ae6-14b75f78f68b",
- "name": "Overtime Hours",
- "earningsType": "OvertimeEarnings",
- "rateType": "MultipleOfOrdinaryEarningsRate",
- "typeOfUnits": null,
- "currentRecord": true,
- "expenseAccountID": "81da553d-c6c6-411e-95df-cc4ac8f7e1c2",
- "fixedAmount": null,
- "ratePerUnit": null,
- "multipleOfOrdinaryEarningsRate": 1.5
- }
- ]
- }
+ example:
+ id: fbe7a960-fad3-4293-8de9-0fabfbea615f
+ providerName: provider-name
+ dateTimeUTC: 2020-04-15T15:00:05.2418623
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 13
+ problem: null
+ earningsRates:
+ - earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ name: Regular Hours
+ earningsType: RegularEarnings
+ rateType: RatePerUnit
+ typeOfUnits: hours
+ currentRecord: true
+ expenseAccountID: 81da553d-c6c6-411e-95df-cc4ac8f7e1c2
+ fixedAmount: null
+ ratePerUnit: null
+ multipleOfOrdinaryEarningsRate: null
+ - earningsRateID: 973365f3-66b2-4c33-8ae6-14b75f78f68b
+ name: Overtime Hours
+ earningsType: OvertimeEarnings
+ rateType: MultipleOfOrdinaryEarningsRate
+ typeOfUnits: null
+ currentRecord: true
+ expenseAccountID: 81da553d-c6c6-411e-95df-cc4ac8f7e1c2
+ fixedAmount: null
+ ratePerUnit: null
+ multipleOfOrdinaryEarningsRate: 1.5
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollUk
operationId: createEarningsRate
@@ -3312,7 +3182,7 @@ paths:
key: earningsType
keyPascal: EarningsType
keySnake: earnings_type
- nonString: true
+ nonString: true
default: EarningsTypeEnum.RegularEarnings
php: XeroAPI\XeroPHP\Models\PayrollUk\EarningsRate\EarningsTypeEnum.RegularEarnings
node: EarningsRate.EarningsTypeEnum.RegularEarnings
@@ -3333,49 +3203,47 @@ paths:
csharp: EarningsRate.RateTypeEnum.RatePerUnit
default: RatePerUnit
object: earningsRate
- nonString: true
+ nonString: true
- expenseAccountID:
key: expenseAccountID
keyPascal: ExpenseAccountID
keySnake: expense_account_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: earningsRate
- typeOfUnits:
key: typeOfUnits
keyPascal: TypeOfUnits
keySnake: type_of_units
default: Type
- object: earningsRate
+ object: earningsRate
is_last: true
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EarningsRateObject'
- example: {
- "id": "cc5341dd-c652-47f0-b8a3-67a22617ca7b",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-15T18:12:04.6341065",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "earningsRate": {
- "earningsRateID": "fcf811a8-3843-4e87-8431-c62e83158aef",
- "name": "My Earnings Rate",
- "earningsType": "RegularEarnings",
- "rateType": "RatePerUnit",
- "typeOfUnits": "hours",
- "currentRecord": true,
- "expenseAccountID": "4b03500d-32fd-4616-8d70-e1e56e0519c6",
- "fixedAmount": null,
- "ratePerUnit": null,
- "multipleOfOrdinaryEarningsRate": null
- }
- }
- '400':
+ example:
+ id: cc5341dd-c652-47f0-b8a3-67a22617ca7b
+ providerName: provider-name
+ dateTimeUTC: 2020-04-15T18:12:04.6341065
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ earningsRate:
+ earningsRateID: fcf811a8-3843-4e87-8431-c62e83158aef
+ name: My Earnings Rate
+ earningsType: RegularEarnings
+ rateType: RatePerUnit
+ typeOfUnits: hours
+ currentRecord: true
+ expenseAccountID: 4b03500d-32fd-4616-8d70-e1e56e0519c6
+ fixedAmount: null
+ ratePerUnit: null
+ multipleOfOrdinaryEarningsRate: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -3387,19 +3255,20 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EarningsRate'
- example: {
- "name": "My Earnings Rate",
- "earningsType": "RegularEarnings",
- "rateType": "RatePerUnit",
- "typeOfUnits": "hours",
- "expenseAccountID": "4b03500d-32fd-4616-8d70-e1e56e0519c6"
- }
+ example:
+ name: My Earnings Rate
+ earningsType: RegularEarnings
+ rateType: RatePerUnit
+ typeOfUnits: hours
+ expenseAccountID: 4b03500d-32fd-4616-8d70-e1e56e0519c6
/EarningsRates/{EarningsRateID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getEarningsRate
@@ -3415,38 +3284,38 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/EarningsRateObject'
- example: {
- "id": "85375ff5-6ccf-4d8c-a976-0531c94597de",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-15T16:54:51.8240698",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "earningsRate": {
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "name": "Regular Hours",
- "earningsType": "RegularEarnings",
- "rateType": "RatePerUnit",
- "typeOfUnits": "hours",
- "currentRecord": true,
- "expenseAccountID": "81da553d-c6c6-411e-95df-cc4ac8f7e1c2",
- "fixedAmount": null,
- "ratePerUnit": null,
- "multipleOfOrdinaryEarningsRate": null
- }
- }
+ example:
+ id: 85375ff5-6ccf-4d8c-a976-0531c94597de
+ providerName: provider-name
+ dateTimeUTC: 2020-04-15T16:54:51.8240698
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ earningsRate:
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ name: Regular Hours
+ earningsType: RegularEarnings
+ rateType: RatePerUnit
+ typeOfUnits: hours
+ currentRecord: true
+ expenseAccountID: 81da553d-c6c6-411e-95df-cc4ac8f7e1c2
+ fixedAmount: null
+ ratePerUnit: null
+ multipleOfOrdinaryEarningsRate: null
/LeaveTypes:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getLeaveTypes
@@ -3465,48 +3334,42 @@ paths:
schema:
type: boolean
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/LeaveTypes'
- example: {
- "id": "cb429b37-78d3-4b15-9788-83cbd1fd3f72",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-03-27T18:32:57.9928041",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 12
- },
- "problem": null,
- "leaveTypes": [
- {
- "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c",
- "name": "Holiday",
- "isPaidLeave": true,
- "showOnPayslip": true,
- "updatedDateUTC": "2020-02-13T15:56:11Z",
- "isStatutoryLeave": false,
- "isActive": true
- },
- {
- "leaveTypeID": "1d2778ee-86ea-45c0-bbf8-1045485f6b3f",
- "name": "Parental Leave",
- "isPaidLeave": true,
- "showOnPayslip": true,
- "updatedDateUTC": "2020-03-27T18:19:53Z",
- "isStatutoryLeave": false,
- "isActive": true
- }
- ]
- }
+ example:
+ id: cb429b37-78d3-4b15-9788-83cbd1fd3f72
+ providerName: provider-name
+ dateTimeUTC: 2020-03-27T18:32:57.9928041
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 12
+ problem: null
+ leaveTypes:
+ - leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c
+ name: Holiday
+ isPaidLeave: true
+ showOnPayslip: true
+ updatedDateUTC: "2020-02-13T15:56:11Z"
+ isStatutoryLeave: false
+ isActive: true
+ - leaveTypeID: 1d2778ee-86ea-45c0-bbf8-1045485f6b3f
+ name: Parental Leave
+ isPaidLeave: true
+ showOnPayslip: true
+ updatedDateUTC: "2020-03-27T18:19:53Z"
+ isStatutoryLeave: false
+ isActive: true
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollUk
operationId: createLeaveType
@@ -3527,45 +3390,43 @@ paths:
key: isPaidLeave
keyPascal: IsPaidLeave
keySnake: is_paid_leave
- nonString: true
+ nonString: true
object: leaveType
- default: true
+ default: true
- showOnPayslip:
key: showOnPayslip
keyPascal: ShowOnPayslip
keySnake: show_on_payslip
- nonString: true
+ nonString: true
object: leaveType
- default: true
+ default: true
is_last: true
summary: Creates a new leave type
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/LeaveTypeObject'
- example: {
- "id": "89aeb982-d6e8-45dd-a853-fcaee4fc99cc",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-21T02:59:35.5461123",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leaveType": {
- "leaveTypeID": "4c027a23-6e7b-4547-808b-c34b2b140fef",
- "name": "My opebvwbfxf Leave",
- "isPaidLeave": false,
- "showOnPayslip": true,
- "updatedDateUTC": "2020-04-21T02:59:35.3831249Z",
- "isStatutoryLeave": null,
- "isActive": true
- }
- }
- '400':
+ example:
+ id: 89aeb982-d6e8-45dd-a853-fcaee4fc99cc
+ providerName: provider-name
+ dateTimeUTC: 2020-04-21T02:59:35.5461123
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leaveType:
+ leaveTypeID: 4c027a23-6e7b-4547-808b-c34b2b140fef
+ name: My opebvwbfxf Leave
+ isPaidLeave: false
+ showOnPayslip: true
+ updatedDateUTC: "2020-04-21T02:59:35.3831249Z"
+ isStatutoryLeave: null
+ isActive: true
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -3577,17 +3438,18 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/LeaveType'
- example: {
- "name": "My opebvwbfxf Leave",
- "isPaidLeave": false,
- "showOnPayslip": true
- }
+ example:
+ name: My opebvwbfxf Leave
+ isPaidLeave: false
+ showOnPayslip: true
/LeaveTypes/{LeaveTypeID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getLeaveType
@@ -3603,35 +3465,35 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/LeaveTypeObject'
- example: {
- "id": "684454f6-d808-46e0-b83d-5593a560b9d0",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-21T02:59:34.9401664",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "leaveType": {
- "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c",
- "name": "Holiday",
- "isPaidLeave": true,
- "showOnPayslip": true,
- "updatedDateUTC": "2020-04-20T20:14:31",
- "isStatutoryLeave": false,
- "isActive": true
- }
- }
+ example:
+ id: 684454f6-d808-46e0-b83d-5593a560b9d0
+ providerName: provider-name
+ dateTimeUTC: 2020-04-21T02:59:34.9401664
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ leaveType:
+ leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c
+ name: Holiday
+ isPaidLeave: true
+ showOnPayslip: true
+ updatedDateUTC: 2020-04-20T20:14:31
+ isStatutoryLeave: false
+ isActive: true
/Reimbursements:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getReimbursements
@@ -3644,42 +3506,36 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Reimbursements'
- example: {
- "id": "eea19a1d-a714-41c0-8730-94b6d4fbac84",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-15T00:17:27.1947108",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 5
- },
- "problem": null,
- "reimbursements": [
- {
- "reimbursementID": "fef6115f-1606-4a74-be54-312d46b0eb0e",
- "name": "Travel Allowance",
- "accountID": "c7b73345-7f25-428a-bb97-7b20a1470a53",
- "currentRecord": true
- },
- {
- "reimbursementID": "8e8d7849-26e1-41d1-a41f-7e1d0bfa147b",
- "name": "Mileage",
- "accountID": "0be1631e-cc7e-4c27-951f-308c3307c0fe",
- "currentRecord": true
- }
- ]
- }
+ example:
+ id: eea19a1d-a714-41c0-8730-94b6d4fbac84
+ providerName: provider-name
+ dateTimeUTC: 2020-04-15T00:17:27.1947108
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 5
+ problem: null
+ reimbursements:
+ - reimbursementID: fef6115f-1606-4a74-be54-312d46b0eb0e
+ name: Travel Allowance
+ accountID: c7b73345-7f25-428a-bb97-7b20a1470a53
+ currentRecord: true
+ - reimbursementID: 8e8d7849-26e1-41d1-a41f-7e1d0bfa147b
+ name: Mileage
+ accountID: 0be1631e-cc7e-4c27-951f-308c3307c0fe
+ currentRecord: true
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollUk
operationId: createReimbursement
@@ -3701,34 +3557,32 @@ paths:
keyPascal: AccountID
keySnake: account_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: reimbursement
is_last: true
summary: Creates a new reimbursement
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/ReimbursementObject'
- example: {
- "id": "310ecff7-8577-4e05-98a3-3ce7ecb2868a",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-15T00:43:39.0988382",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "reimbursement": {
- "reimbursementID": "2b1b587a-39f6-43f8-9dd9-a858314333c8",
- "name": "My new Reimburse",
- "accountID": "9ee28149-32a9-4661-8eab-a28738696983",
- "currentRecord": true
- }
- }
- '400':
+ example:
+ id: 310ecff7-8577-4e05-98a3-3ce7ecb2868a
+ providerName: provider-name
+ dateTimeUTC: 2020-04-15T00:43:39.0988382
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ reimbursement:
+ reimbursementID: 2b1b587a-39f6-43f8-9dd9-a858314333c8
+ name: My new Reimburse
+ accountID: 9ee28149-32a9-4661-8eab-a28738696983
+ currentRecord: true
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -3740,16 +3594,17 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Reimbursement'
- example: {
- "name": "My new Reimburse",
- "accountID": "9ee28149-32a9-4661-8eab-a28738696983"
- }
+ example:
+ name: My new Reimburse
+ accountID: 9ee28149-32a9-4661-8eab-a28738696983
/Reimbursements/{ReimbursementID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getReimbursement
@@ -3765,32 +3620,32 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/ReimbursementObject'
- example: {
- "id": "9c727a87-a96b-4998-b7e7-6b79347915cc",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-21T03:05:16.5248369",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "reimbursement": {
- "reimbursementID": "fef6115f-1606-4a74-be54-312d46b0eb0e",
- "name": "Travel Allowance",
- "accountID": "c7b73345-7f25-428a-bb97-7b20a1470a53",
- "currentRecord": true
- }
- }
+ example:
+ id: 9c727a87-a96b-4998-b7e7-6b79347915cc
+ providerName: provider-name
+ dateTimeUTC: 2020-04-21T03:05:16.5248369
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ reimbursement:
+ reimbursementID: fef6115f-1606-4a74-be54-312d46b0eb0e
+ name: Travel Allowance
+ accountID: c7b73345-7f25-428a-bb97-7b20a1470a53
+ currentRecord: true
/Timesheets:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.timesheets, payroll.timesheets.read]
+ - OAuth2:
+ - payroll.timesheets
+ - payroll.timesheets.read
tags:
- PayrollUk
operationId: getTimesheets
@@ -3836,40 +3691,36 @@ paths:
type: string
example: startDate
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Timesheets'
- example: {
- "id": "d81c2087-3ecb-4d91-b775-73d85f593370",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-13T21:54:01.8865016",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 1
- },
- "problem": null,
- "timesheets": [
- {
- "timesheetID": "0c94d453-3d8c-4167-8c25-b4025121d18b",
- "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "startDate": "2020-04-13T00:00:00",
- "endDate": "2020-04-19T00:00:00",
- "status": "Approved",
- "totalHours": 16,
- "updatedDateUTC": "2020-04-13T21:53:39"
- }
- ]
- }
+ example:
+ id: d81c2087-3ecb-4d91-b775-73d85f593370
+ providerName: provider-name
+ dateTimeUTC: 2020-04-13T21:54:01.8865016
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 1
+ problem: null
+ timesheets:
+ - timesheetID: 0c94d453-3d8c-4167-8c25-b4025121d18b
+ payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ startDate: 2020-04-13T00:00:00
+ endDate: 2020-04-19T00:00:00
+ status: Approved
+ totalHours: 16
+ updatedDateUTC: 2020-04-13T21:53:39
post:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollUk
operationId: createTimesheet
@@ -3882,13 +3733,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- endDateValue:
key: endDate
keyPascal: EndDate
@@ -3896,13 +3747,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- timesheet:
key: timesheet
keyPascal: Timesheet
@@ -3913,14 +3764,14 @@ paths:
keyPascal: PayrollCalendarID
keySnake: payroll_calendar_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: timesheet
- employeeID:
key: employeeID
keyPascal: EmployeeID
keySnake: employee_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: timesheet
- startDate:
is_variable: true
@@ -3933,7 +3784,7 @@ paths:
ruby: start_date
object: timesheet
- endDate:
- is_last: true
+ is_last: true
is_variable: true
nonString: true
key: endDate
@@ -3947,47 +3798,40 @@ paths:
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetObject'
- example: {
- "id": "ef0aa7e2-6f7f-43f6-9186-af670dce7c69",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-21T03:07:37.0148822",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "timesheet": {
- "timesheetID": "88d2038a-06f7-4b8a-bdab-809804c0aa1d",
- "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "startDate": "2020-04-13T00:00:00",
- "endDate": "2020-04-19T00:00:00",
- "status": "Draft",
- "totalHours": 14,
- "updatedDateUTC": "2020-04-21T03:07:36.8132834",
- "timesheetLines": [
- {
- "timesheetLineID": "03060d0c-b14a-4339-aced-51cb2e5313b7",
- "date": "2020-04-15T00:00:00",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "trackingItemID": null,
- "numberOfUnits": 6
- },
- {
- "timesheetLineID": "53ebdb54-b604-4d15-8c42-5162a7fe88e6",
- "date": "2020-04-13T00:00:00",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "trackingItemID": null,
- "numberOfUnits": 8
- }
- ]
- }
- }
- '400':
+ example:
+ id: ef0aa7e2-6f7f-43f6-9186-af670dce7c69
+ providerName: provider-name
+ dateTimeUTC: 2020-04-21T03:07:37.0148822
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ timesheet:
+ timesheetID: 88d2038a-06f7-4b8a-bdab-809804c0aa1d
+ payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ startDate: 2020-04-13T00:00:00
+ endDate: 2020-04-19T00:00:00
+ status: Draft
+ totalHours: 14
+ updatedDateUTC: 2020-04-21T03:07:36.8132834
+ timesheetLines:
+ - timesheetLineID: 03060d0c-b14a-4339-aced-51cb2e5313b7
+ date: 2020-04-15T00:00:00
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ trackingItemID: null
+ numberOfUnits: 6
+ - timesheetLineID: 53ebdb54-b604-4d15-8c42-5162a7fe88e6
+ date: 2020-04-13T00:00:00
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ trackingItemID: null
+ numberOfUnits: 8
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -3999,30 +3843,26 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Timesheet'
- example: {
- "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "startDate": "2020-04-13",
- "endDate": "2020-04-19",
- "timesheetLines": [
- {
- "date": "2020-04-13",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "numberOfUnits": 8
- },
- {
- "date": "2020-04-15",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "numberOfUnits": 6
- }
- ]
- }
+ example:
+ payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ startDate: "2020-04-13"
+ endDate: "2020-04-19"
+ timesheetLines:
+ - date: "2020-04-13"
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ numberOfUnits: 8
+ - date: "2020-04-15"
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ numberOfUnits: 6
/Timesheets/{TimesheetID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.timesheets, payroll.timesheets.read]
+ - OAuth2:
+ - payroll.timesheets
+ - payroll.timesheets.read
tags:
- PayrollUk
operationId: getTimesheet
@@ -4038,49 +3878,43 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetObject'
- example: {
- "id": "504259ac-df26-482e-bd0a-d792d96453bb",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-14T16:41:00.5013526",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "timesheet": {
- "timesheetID": "25c59963-5df2-43c3-88f6-25a3caa63084",
- "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "startDate": "2020-04-13T00:00:00",
- "endDate": "2020-04-19T00:00:00",
- "status": "Draft",
- "totalHours": 14,
- "updatedDateUTC": "2020-04-14T16:31:35",
- "timesheetLines": [
- {
- "timesheetLineID": "6cc1e5c3-f080-4dbc-a82b-bea256ef939f",
- "date": "2020-04-13T00:00:00",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "trackingItemID": null,
- "numberOfUnits": 8
- },
- {
- "timesheetLineID": "3d900df1-9859-492b-9b00-155860158c0d",
- "date": "2020-04-15T00:00:00",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "trackingItemID": null,
- "numberOfUnits": 6
- }
- ]
- }
- }
+ example:
+ id: 504259ac-df26-482e-bd0a-d792d96453bb
+ providerName: provider-name
+ dateTimeUTC: 2020-04-14T16:41:00.5013526
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ timesheet:
+ timesheetID: 25c59963-5df2-43c3-88f6-25a3caa63084
+ payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ startDate: 2020-04-13T00:00:00
+ endDate: 2020-04-19T00:00:00
+ status: Draft
+ totalHours: 14
+ updatedDateUTC: 2020-04-14T16:31:35
+ timesheetLines:
+ - timesheetLineID: 6cc1e5c3-f080-4dbc-a82b-bea256ef939f
+ date: 2020-04-13T00:00:00
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ trackingItemID: null
+ numberOfUnits: 8
+ - timesheetLineID: 3d900df1-9859-492b-9b00-155860158c0d
+ date: 2020-04-15T00:00:00
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ trackingItemID: null
+ numberOfUnits: 6
delete:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollUk
operationId: deleteTimesheet
@@ -4095,13 +3929,13 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetLine'
- '400':
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4112,7 +3946,8 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollUk
operationId: createTimesheetLine
@@ -4125,13 +3960,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- timesheetLine:
key: timesheetLine
keyPascal: TimesheetLine
@@ -4142,7 +3977,7 @@ paths:
keyPascal: TimesheetLineID
keySnake: timesheet_line_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- date:
key: date
@@ -4159,14 +3994,14 @@ paths:
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- trackingItemID:
key: trackingItemID
keyPascal: TrackingItemID
keySnake: tracking_item_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- numberOfUnits:
key: numberOfUnits
@@ -4174,7 +4009,7 @@ paths:
keySnake: number_of_units
default: 6
object: timesheetLine
- nonString: true
+ nonString: true
is_last: true
summary: Creates a new timesheet line for a specific timesheet using a unique timesheet ID
parameters:
@@ -4188,28 +4023,26 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetLineObject'
- example: {
- "id": "cf701261-529e-47cd-8156-5ec9ab3394ff",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-14T17:19:22.8599292",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "timesheetLine": {
- "timesheetLineID": "56fce87e-7f0d-4c19-8f74-7f5656651c81",
- "date": "2020-04-14T00:00:00",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "trackingItemID": null,
- "numberOfUnits": 1
- }
- }
- '400':
+ example:
+ id: cf701261-529e-47cd-8156-5ec9ab3394ff
+ providerName: provider-name
+ dateTimeUTC: 2020-04-14T17:19:22.8599292
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ timesheetLine:
+ timesheetLineID: 56fce87e-7f0d-4c19-8f74-7f5656651c81
+ date: 2020-04-14T00:00:00
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ trackingItemID: null
+ numberOfUnits: 1
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4221,17 +4054,17 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TimesheetLine'
- example: {
- "date": "2020-04-14",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "numberOfUnits": 1
- }
+ example:
+ date: "2020-04-14"
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ numberOfUnits: 1
/Timesheets/{TimesheetID}/Approve:
parameters:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollUk
operationId: approveTimesheet
@@ -4248,54 +4081,45 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetObject'
- example: {
- "id": "94c27148-2749-4d85-bc1a-986e6de230ae",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-06-01T20:32:19.7577043",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "timesheet": {
- "timesheetID": "62bd8b5f-8e90-4868-a0e6-62f994f7d659",
- "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "startDate": "2020-04-13T00:00:00",
- "endDate": "2020-04-19T00:00:00",
- "status": "Approved",
- "totalHours": 9,
- "updatedDateUTC": "2020-06-01T20:32:19.9534744",
- "timesheetLines": [
- {
- "timesheetLineID": "ce6db38f-efe9-49dc-ae42-7e6bad3cb167",
- "date": "2020-04-14T00:00:00",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "trackingItemID": null,
- "numberOfUnits": 2
- },
- {
- "timesheetLineID": "bc8004d2-5965-4f4e-8e46-0519040b4a05",
- "date": "2020-04-15T00:00:00",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "trackingItemID": null,
- "numberOfUnits": 6
- },
- {
- "timesheetLineID": "fd00cd5a-7d0c-4cb7-85ff-66bd3ed2439a",
- "date": "2020-04-14T00:00:00",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "trackingItemID": null,
- "numberOfUnits": 1
- }
- ]
- }
- }
- '400':
+ example:
+ id: 94c27148-2749-4d85-bc1a-986e6de230ae
+ providerName: provider-name
+ dateTimeUTC: 2020-06-01T20:32:19.7577043
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ timesheet:
+ timesheetID: 62bd8b5f-8e90-4868-a0e6-62f994f7d659
+ payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ startDate: 2020-04-13T00:00:00
+ endDate: 2020-04-19T00:00:00
+ status: Approved
+ totalHours: 9
+ updatedDateUTC: 2020-06-01T20:32:19.9534744
+ timesheetLines:
+ - timesheetLineID: ce6db38f-efe9-49dc-ae42-7e6bad3cb167
+ date: 2020-04-14T00:00:00
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ trackingItemID: null
+ numberOfUnits: 2
+ - timesheetLineID: bc8004d2-5965-4f4e-8e46-0519040b4a05
+ date: 2020-04-15T00:00:00
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ trackingItemID: null
+ numberOfUnits: 6
+ - timesheetLineID: fd00cd5a-7d0c-4cb7-85ff-66bd3ed2439a
+ date: 2020-04-14T00:00:00
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ trackingItemID: null
+ numberOfUnits: 1
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4306,7 +4130,8 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollUk
operationId: revertTimesheet
@@ -4323,54 +4148,45 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetObject'
- example: {
- "id": "a774530a-a50c-4480-a094-358cf80a7d98",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-14T17:49:23.1119111",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "timesheet": {
- "timesheetID": "0fd483c0-3302-48c6-bbd5-7247c9a02460",
- "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "startDate": "2020-04-13T00:00:00",
- "endDate": "2020-04-19T00:00:00",
- "status": "Draft",
- "totalHours": 15,
- "updatedDateUTC": "2020-04-14T17:49:23.2188538",
- "timesheetLines": [
- {
- "timesheetLineID": "17a08549-1ed1-416b-83e2-c65040119a02",
- "date": "2020-04-13T00:00:00",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "trackingItemID": null,
- "numberOfUnits": 8
- },
- {
- "timesheetLineID": "0e912b7d-dc3f-4b95-a466-3f0f5c8581cb",
- "date": "2020-04-15T00:00:00",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "trackingItemID": null,
- "numberOfUnits": 6
- },
- {
- "timesheetLineID": "d0faac99-f2d4-42b9-ab00-9c2bc6e8fe3a",
- "date": "2020-04-14T00:00:00",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "trackingItemID": null,
- "numberOfUnits": 1
- }
- ]
- }
- }
- '400':
+ example:
+ id: a774530a-a50c-4480-a094-358cf80a7d98
+ providerName: provider-name
+ dateTimeUTC: 2020-04-14T17:49:23.1119111
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ timesheet:
+ timesheetID: 0fd483c0-3302-48c6-bbd5-7247c9a02460
+ payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ startDate: 2020-04-13T00:00:00
+ endDate: 2020-04-19T00:00:00
+ status: Draft
+ totalHours: 15
+ updatedDateUTC: 2020-04-14T17:49:23.2188538
+ timesheetLines:
+ - timesheetLineID: 17a08549-1ed1-416b-83e2-c65040119a02
+ date: 2020-04-13T00:00:00
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ trackingItemID: null
+ numberOfUnits: 8
+ - timesheetLineID: 0e912b7d-dc3f-4b95-a466-3f0f5c8581cb
+ date: 2020-04-15T00:00:00
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ trackingItemID: null
+ numberOfUnits: 6
+ - timesheetLineID: d0faac99-f2d4-42b9-ab00-9c2bc6e8fe3a
+ date: 2020-04-14T00:00:00
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ trackingItemID: null
+ numberOfUnits: 1
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4381,7 +4197,8 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
put:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollUk
operationId: updateTimesheetLine
@@ -4394,13 +4211,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- timesheetLine:
key: timesheetLine
keyPascal: TimesheetLine
@@ -4411,7 +4228,7 @@ paths:
keyPascal: TimesheetLineID
keySnake: timesheet_line_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- date:
key: date
@@ -4428,14 +4245,14 @@ paths:
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- trackingItemID:
key: trackingItemID
keyPascal: TrackingItemID
keySnake: tracking_item_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: timesheetLine
- numberOfUnits:
key: numberOfUnits
@@ -4443,7 +4260,7 @@ paths:
keySnake: number_of_units
default: 6
object: timesheetLine
- nonString: true
+ nonString: true
is_last: true
summary: Updates a specific timesheet line for a specific timesheet
parameters:
@@ -4465,28 +4282,26 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetLineObject'
- example: {
- "id": "582b87a6-14f3-409b-be89-f9b9c49db983",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-14T18:07:30.718153",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "timesheetLine": {
- "timesheetLineID": "c88edcad-af32-4536-a682-9a4772c21c8d",
- "date": "2020-04-14T00:00:00",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "trackingItemID": null,
- "numberOfUnits": 2
- }
- }
- '400':
+ example:
+ id: 582b87a6-14f3-409b-be89-f9b9c49db983
+ providerName: provider-name
+ dateTimeUTC: 2020-04-14T18:07:30.718153
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ timesheetLine:
+ timesheetLineID: c88edcad-af32-4536-a682-9a4772c21c8d
+ date: 2020-04-14T00:00:00
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ trackingItemID: null
+ numberOfUnits: 2
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4498,14 +4313,14 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TimesheetLine'
- example: {
- "date": "2020-04-14",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "numberOfUnits": 2
- }
+ example:
+ date: "2020-04-14"
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ numberOfUnits: 2
delete:
security:
- - OAuth2: [payroll.timesheets]
+ - OAuth2:
+ - payroll.timesheets
tags:
- PayrollUk
operationId: deleteTimesheetLine
@@ -4528,13 +4343,13 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TimesheetLine'
- '400':
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4545,7 +4360,9 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getPayRunCalendars
@@ -4558,57 +4375,49 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayRunCalendars'
- example: {
- "id": "f66c8da6-06c1-47c7-a415-366cb3991858",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-03-25T18:39:43.9215965",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 3
- },
- "problem": null,
- "payRunCalendars": [
- {
- "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "name": "Weekly ",
- "calendarType": "Weekly",
- "periodStartDate": "2020-02-10T00:00:00",
- "periodEndDate": "2020-02-16T00:00:00",
- "paymentDate": "2020-02-17T00:00:00",
- "updatedDateUTC": "2020-02-13T16:53:54"
- },
- {
- "payrollCalendarID": "d45bc68f-59d6-4000-929d-1058dcfa79e1",
- "name": "Fortnightly ",
- "calendarType": "Fortnightly",
- "periodStartDate": "2020-02-03T00:00:00",
- "periodEndDate": "2020-02-16T00:00:00",
- "paymentDate": "2020-02-10T00:00:00",
- "updatedDateUTC": "2020-02-10T10:02:09"
- },
- {
- "payrollCalendarID": "5e813d9e-949c-461f-8a89-e9ee8955a254",
- "name": "Monthly ",
- "calendarType": "Monthly",
- "periodStartDate": "2020-03-03T00:00:00",
- "periodEndDate": "2020-04-02T00:00:00",
- "paymentDate": "2020-03-31T00:00:00",
- "updatedDateUTC": "2020-02-13T16:54:07"
- }
- ]
- }
+ example:
+ id: f66c8da6-06c1-47c7-a415-366cb3991858
+ providerName: provider-name
+ dateTimeUTC: 2020-03-25T18:39:43.9215965
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 3
+ problem: null
+ payRunCalendars:
+ - payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ name: 'Weekly '
+ calendarType: Weekly
+ periodStartDate: 2020-02-10T00:00:00
+ periodEndDate: 2020-02-16T00:00:00
+ paymentDate: 2020-02-17T00:00:00
+ updatedDateUTC: 2020-02-13T16:53:54
+ - payrollCalendarID: d45bc68f-59d6-4000-929d-1058dcfa79e1
+ name: 'Fortnightly '
+ calendarType: Fortnightly
+ periodStartDate: 2020-02-03T00:00:00
+ periodEndDate: 2020-02-16T00:00:00
+ paymentDate: 2020-02-10T00:00:00
+ updatedDateUTC: 2020-02-10T10:02:09
+ - payrollCalendarID: 5e813d9e-949c-461f-8a89-e9ee8955a254
+ name: 'Monthly '
+ calendarType: Monthly
+ periodStartDate: 2020-03-03T00:00:00
+ periodEndDate: 2020-04-02T00:00:00
+ paymentDate: 2020-03-31T00:00:00
+ updatedDateUTC: 2020-02-13T16:54:07
post:
security:
- - OAuth2: [payroll.settings]
+ - OAuth2:
+ - payroll.settings
tags:
- PayrollUk
operationId: createPayRunCalendar
@@ -4621,13 +4430,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- paymentDateValue:
key: paymentDate
keyPascal: PaymentDate
@@ -4635,13 +4444,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- payRunCalendar:
key: payRunCalendar
keyPascal: PayRunCalendar
@@ -4651,7 +4460,7 @@ paths:
key: calendarType
keyPascal: CalendarType
keySnake: calendar_type
- nonString: true
+ nonString: true
default: PayRunCalendar.CalendarTypeEnum.Weekly
php: XeroAPI\XeroPHP\Models\PayrollUk\PayRunCalendar\CalendarTypeEnum.WEEKLY
node: PayRunCalendar.CalendarTypeEnum.Weekly
@@ -4674,7 +4483,7 @@ paths:
key: paymentDate
keyPascal: PaymentDate
keySnake: payment_date
- is_last: true
+ is_last: true
is_variable: true
nonString: true
default: paymentDate
@@ -4685,30 +4494,28 @@ paths:
parameters:
- $ref: '#/components/parameters/idempotencyKey'
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayRunCalendarObject'
- example: {
- "id": "ef25e7f2-b5d6-454c-8147-396c373565dd",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-13T17:01:06.2708245",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "payRunCalendar": {
- "payrollCalendarID": "5f29322d-9123-49be-bef0-9b14c35653d1",
- "name": "My Weekly Cal",
- "calendarType": "Weekly",
- "periodStartDate": "2020-05-01T00:00:00",
- "periodEndDate": "2020-05-07T00:00:00",
- "paymentDate": "2020-05-15T00:00:00",
- "updatedDateUTC": "2020-04-13T17:01:06.4944331"
- }
- }
- '400':
+ example:
+ id: ef25e7f2-b5d6-454c-8147-396c373565dd
+ providerName: provider-name
+ dateTimeUTC: 2020-04-13T17:01:06.2708245
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ payRunCalendar:
+ payrollCalendarID: 5f29322d-9123-49be-bef0-9b14c35653d1
+ name: My Weekly Cal
+ calendarType: Weekly
+ periodStartDate: 2020-05-01T00:00:00
+ periodEndDate: 2020-05-07T00:00:00
+ paymentDate: 2020-05-15T00:00:00
+ updatedDateUTC: 2020-04-13T17:01:06.4944331
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4720,18 +4527,19 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/PayRunCalendar'
- example: {
- "name": "My Weekly Cal",
- "calendarType": "Weekly",
- "periodStartDate": "2020-05-01",
- "paymentDate": "2020-05-15"
- }
+ example:
+ name: My Weekly Cal
+ calendarType: Weekly
+ periodStartDate: "2020-05-01"
+ paymentDate: "2020-05-15"
/PayRunCalendars/{PayRunCalendarID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getPayRunCalendar
@@ -4747,35 +4555,35 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayRunCalendarObject'
- example: {
- "id": "dae942a3-b4fb-4b24-839b-14e1073f8cca",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-13T16:48:49.6902155",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "payRunCalendar": {
- "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "name": "Weekly ",
- "calendarType": "Weekly",
- "periodStartDate": "2020-02-10T00:00:00",
- "periodEndDate": "2020-02-16T00:00:00",
- "paymentDate": "2020-02-17T00:00:00",
- "updatedDateUTC": "2020-02-13T16:53:54"
- }
- }
+ example:
+ id: dae942a3-b4fb-4b24-839b-14e1073f8cca
+ providerName: provider-name
+ dateTimeUTC: 2020-04-13T16:48:49.6902155
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ payRunCalendar:
+ payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ name: 'Weekly '
+ calendarType: Weekly
+ periodStartDate: 2020-02-10T00:00:00
+ periodEndDate: 2020-02-16T00:00:00
+ paymentDate: 2020-02-17T00:00:00
+ updatedDateUTC: 2020-02-13T16:53:54
/Employees/{EmployeeID}/SalaryAndWages:
parameters:
- $ref: '#/components/parameters/requiredHeader'
- get:
+ get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollUk
operationId: getEmployeeSalaryAndWages
@@ -4787,7 +4595,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -4797,40 +4605,35 @@ paths:
schema:
type: integer
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/SalaryAndWages'
- example: {
- "id": "56273e64-dff0-4542-96f3-54ad3ac27431",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-10T22:47:38.8995493",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 1
- },
- "problem": null,
- "salaryAndWages": [
- {
- "salaryAndWagesID": "49c33012-c1ac-456c-91fd-cb7e6db6f5fe",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "numberOfUnitsPerWeek": 40,
- "ratePerUnit": null,
- "numberOfUnitsPerDay": null,
- "daysPerWeek": null,
- "effectiveFrom": "2020-04-01T00:00:00",
- "annualSalary": 25000,
- "status": "Active",
- "paymentType": "Salary"
- }
- ]
- }
- '400':
+ example:
+ id: 56273e64-dff0-4542-96f3-54ad3ac27431
+ providerName: provider-name
+ dateTimeUTC: 2020-04-10T22:47:38.8995493
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 1
+ problem: null
+ salaryAndWages:
+ - salaryAndWagesID: 49c33012-c1ac-456c-91fd-cb7e6db6f5fe
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ numberOfUnitsPerWeek: 40
+ ratePerUnit: null
+ numberOfUnitsPerDay: null
+ daysPerWeek: null
+ effectiveFrom: 2020-04-01T00:00:00
+ annualSalary: 25000
+ status: Active
+ paymentType: Salary
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4838,7 +4641,8 @@ paths:
$ref: '#/components/schemas/Problem'
post:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: createEmployeeSalaryAndWage
@@ -4854,27 +4658,27 @@ paths:
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: salaryAndWage
- numberOfUnitsPerDay:
key: numberOfUnitsPerDay
keyPascal: NumberOfUnitsPerDay
keySnake: number_of_units_per_day
- default: 0
- nonString: true
+ default: 0
+ nonString: true
object: salaryAndWage
- numberOfUnitsPerWeek:
key: numberOfUnitsPerWeek
keyPascal: NumberOfUnitsPerWeek
keySnake: number_of_units_per_week
- default: 0
- nonString: true
+ default: 0
+ nonString: true
object: salaryAndWage
- paymentType:
key: paymentType
keyPascal: PaymentType
keySnake: payment_type
- nonString: true
+ nonString: true
default: SalaryAndWage.PaymentTypeEnum.Salary
php: XeroAPI\XeroPHP\Models\PayrollUk\SalaryAndWage\PaymentTypeEnum.SALARY
node: SalaryAndWage.PaymentTypeEnum.Salary
@@ -4887,7 +4691,7 @@ paths:
key: status
keyPascal: Status
keySnake: status
- nonString: true
+ nonString: true
default: SalaryAndWage.StatusEnum.Active
php: XeroAPI\XeroPHP\Models\PayrollUk\SalaryAndWage\StatusEnum.ACTIVE
node: SalaryAndWage.StatusEnum.Active
@@ -4905,38 +4709,36 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/SalaryAndWageObject'
- example: {
- "id": "a15f15ec-a8ed-420b-82f6-1546a9bf6d57",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-10T23:46:35.2234544",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "salaryAndWages": {
- "salaryAndWagesID": "1477fc72-b38d-4c0e-a46e-8657f0f32340",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "numberOfUnitsPerWeek": 2,
- "ratePerUnit": null,
- "numberOfUnitsPerDay": 2,
- "daysPerWeek": null,
- "effectiveFrom": "2020-05-01T00:00:00",
- "annualSalary": 100,
- "status": "Pending",
- "paymentType": "Salary"
- }
- }
- '400':
+ example:
+ id: a15f15ec-a8ed-420b-82f6-1546a9bf6d57
+ providerName: provider-name
+ dateTimeUTC: 2020-04-10T23:46:35.2234544
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ salaryAndWages:
+ salaryAndWagesID: 1477fc72-b38d-4c0e-a46e-8657f0f32340
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ numberOfUnitsPerWeek: 2
+ ratePerUnit: null
+ numberOfUnitsPerDay: 2
+ daysPerWeek: null
+ effectiveFrom: 2020-05-01T00:00:00
+ annualSalary: 100
+ status: Pending
+ paymentType: Salary
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -4948,22 +4750,23 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/SalaryAndWage'
- example: {
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "numberOfUnitsPerWeek": 2,
- "ratePerUnit": 10,
- "numberOfUnitsPerDay": 2,
- "effectiveFrom": "2020-05-01",
- "annualSalary": 100,
- "status": "ACTIVE",
- "paymentType": "Salary"
- }
+ example:
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ numberOfUnitsPerWeek: 2
+ ratePerUnit: 10
+ numberOfUnitsPerDay: 2
+ effectiveFrom: "2020-05-01"
+ annualSalary: 100
+ status: ACTIVE
+ paymentType: Salary
/Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.employees, payroll.employees.read]
+ - OAuth2:
+ - payroll.employees
+ - payroll.employees.read
tags:
- PayrollUk
operationId: getEmployeeSalaryAndWage
@@ -4975,7 +4778,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -4983,43 +4786,40 @@ paths:
x-snake: salary_and_wages_id
in: path
required: true
- description: Id for single pay template earnings object
- schema:
+ description: Id for single pay template earnings object
+ schema:
type: string
format: uuid
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/SalaryAndWages'
- example: {
- "id": "cd4f35e7-5062-494a-96c4-f81e9083b0b9",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-10T23:21:48.6291438",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "salaryAndWages": [
- {
- "salaryAndWagesID": "49c33012-c1ac-456c-91fd-cb7e6db6f5fe",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "numberOfUnitsPerWeek": 40,
- "ratePerUnit": null,
- "numberOfUnitsPerDay": null,
- "daysPerWeek": null,
- "effectiveFrom": "2020-04-01T00:00:00",
- "annualSalary": 25000,
- "status": "Active",
- "paymentType": "Salary"
- }
- ]
- }
+ example:
+ id: cd4f35e7-5062-494a-96c4-f81e9083b0b9
+ providerName: provider-name
+ dateTimeUTC: 2020-04-10T23:21:48.6291438
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ salaryAndWages:
+ - salaryAndWagesID: 49c33012-c1ac-456c-91fd-cb7e6db6f5fe
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ numberOfUnitsPerWeek: 40
+ ratePerUnit: null
+ numberOfUnitsPerDay: null
+ daysPerWeek: null
+ effectiveFrom: 2020-04-01T00:00:00
+ annualSalary: 25000
+ status: Active
+ paymentType: Salary
put:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: updateEmployeeSalaryAndWage
@@ -5035,27 +4835,27 @@ paths:
keyPascal: EarningsRateID
keySnake: earnings_rate_id
is_uuid: true
- default: "00000000-0000-0000-0000-000000000000"
+ default: 00000000-0000-0000-0000-000000000000
object: salaryAndWage
- numberOfUnitsPerDay:
key: numberOfUnitsPerDay
keyPascal: NumberOfUnitsPerDay
keySnake: number_of_units_per_day
- default: 0
- nonString: true
+ default: 0
+ nonString: true
object: salaryAndWage
- numberOfUnitsPerWeek:
key: numberOfUnitsPerWeek
keyPascal: NumberOfUnitsPerWeek
keySnake: number_of_units_per_week
- default: 0
- nonString: true
+ default: 0
+ nonString: true
object: salaryAndWage
- paymentType:
key: paymentType
keyPascal: PaymentType
keySnake: payment_type
- nonString: true
+ nonString: true
default: SalaryAndWage.PaymentTypeEnum.Salary
php: XeroAPI\XeroPHP\Models\PayrollUk\SalaryAndWage\PaymentTypeEnum.SALARY
node: SalaryAndWage.PaymentTypeEnum.Salary
@@ -5068,7 +4868,7 @@ paths:
key: status
keyPascal: Status
keySnake: status
- nonString: true
+ nonString: true
default: SalaryAndWage.StatusEnum.Active
php: XeroAPI\XeroPHP\Models\PayrollUk\SalaryAndWage\StatusEnum.ACTIVE
node: SalaryAndWage.StatusEnum.Active
@@ -5086,7 +4886,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -5094,39 +4894,37 @@ paths:
x-snake: salary_and_wages_id
in: path
required: true
- description: Id for single pay template earnings object
- schema:
+ description: Id for single pay template earnings object
+ schema:
type: string
format: uuid
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/SalaryAndWageObject'
- example: {
- "id": "d12a31ee-e094-4e67-9092-0d5e1d7569a6",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-13T16:39:11.7310047",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "salaryAndWages": {
- "salaryAndWagesID": "e9c7f567-b0a0-483c-b45f-d072e399352b",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "numberOfUnitsPerWeek": 3,
- "ratePerUnit": null,
- "numberOfUnitsPerDay": null,
- "daysPerWeek": null,
- "effectiveFrom": "2020-05-15T00:00:00",
- "annualSalary": 101,
- "status": "Pending",
- "paymentType": "Salary"
- }
- }
- '400':
+ example:
+ id: d12a31ee-e094-4e67-9092-0d5e1d7569a6
+ providerName: provider-name
+ dateTimeUTC: 2020-04-13T16:39:11.7310047
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ salaryAndWages:
+ salaryAndWagesID: e9c7f567-b0a0-483c-b45f-d072e399352b
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ numberOfUnitsPerWeek: 3
+ ratePerUnit: null
+ numberOfUnitsPerDay: null
+ daysPerWeek: null
+ effectiveFrom: 2020-05-15T00:00:00
+ annualSalary: 101
+ status: Pending
+ paymentType: Salary
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -5138,18 +4936,18 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/SalaryAndWage'
- example: {
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "numberOfUnitsPerWeek": 3,
- "ratePerUnit": 11,
- "effectiveFrom": "2020-05-15",
- "annualSalary": 101,
- "status": "ACTIVE",
- "paymentType": "Salary"
- }
+ example:
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ numberOfUnitsPerWeek: 3
+ ratePerUnit: 11
+ effectiveFrom: "2020-05-15"
+ annualSalary: 101
+ status: ACTIVE
+ paymentType: Salary
delete:
security:
- - OAuth2: [payroll.employees]
+ - OAuth2:
+ - payroll.employees
tags:
- PayrollUk
operationId: deleteEmployeeSalaryAndWage
@@ -5160,7 +4958,7 @@ paths:
in: path
required: true
description: Employee id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -5168,20 +4966,22 @@ paths:
x-snake: salary_and_wages_id
in: path
required: true
- description: Id for single salary and wages object
- schema:
+ description: Id for single salary and wages object
+ schema:
type: string
format: uuid
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
responses:
- '200':
+ "200":
description: deletion successful
/PayRuns:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.payruns, payroll.payruns.read]
+ - OAuth2:
+ - payroll.payruns
+ - payroll.payruns.read
tags:
- PayrollUk
operationId: getPayRuns
@@ -5202,61 +5002,56 @@ paths:
- Draft
- Posted
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayRuns'
- example: {
- "id": "d748445b-fd11-4832-a85a-905fbfcf3d7c",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-10T21:55:55.0725037",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 2
- },
- "problem": null,
- "payRuns": [
- {
- "payRunID": "e0a59d82-6229-4be4-9d66-49891b4d933e",
- "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "periodStartDate": "2020-02-03T00:00:00",
- "periodEndDate": "2020-02-09T00:00:00",
- "paymentDate": "2020-02-10T00:00:00",
- "totalCost": 490.39,
- "totalPay": 376.92,
- "payRunStatus": "Draft",
- "payRunType": "Scheduled",
- "calendarType": "Weekly",
- "postedDateTime": null,
- "payslipMessage": null
- },
- {
- "payRunID": "ea4f0a14-2c41-4583-9845-9e455972b326",
- "payrollCalendarID": "5e813d9e-949c-461f-8a89-e9ee8955a254",
- "periodStartDate": "2020-02-03T00:00:00",
- "periodEndDate": "2020-03-02T00:00:00",
- "paymentDate": "2020-02-28T00:00:00",
- "totalCost": 1502.08,
- "totalPay": 1294.65,
- "payRunStatus": "Posted",
- "payRunType": "Scheduled",
- "calendarType": "Monthly",
- "postedDateTime": "2020-02-13T16:54:11",
- "payslipMessage": null
- }
- ]
- }
+ example:
+ id: d748445b-fd11-4832-a85a-905fbfcf3d7c
+ providerName: provider-name
+ dateTimeUTC: 2020-04-10T21:55:55.0725037
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 2
+ problem: null
+ payRuns:
+ - payRunID: e0a59d82-6229-4be4-9d66-49891b4d933e
+ payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ periodStartDate: 2020-02-03T00:00:00
+ periodEndDate: 2020-02-09T00:00:00
+ paymentDate: 2020-02-10T00:00:00
+ totalCost: 490.39
+ totalPay: 376.92
+ payRunStatus: Draft
+ payRunType: Scheduled
+ calendarType: Weekly
+ postedDateTime: null
+ payslipMessage: null
+ - payRunID: ea4f0a14-2c41-4583-9845-9e455972b326
+ payrollCalendarID: 5e813d9e-949c-461f-8a89-e9ee8955a254
+ periodStartDate: 2020-02-03T00:00:00
+ periodEndDate: 2020-03-02T00:00:00
+ paymentDate: 2020-02-28T00:00:00
+ totalCost: 1502.08
+ totalPay: 1294.65
+ payRunStatus: Posted
+ payRunType: Scheduled
+ calendarType: Monthly
+ postedDateTime: 2020-02-13T16:54:11
+ payslipMessage: null
/PayRuns/{PayRunID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.payruns, payroll.payruns.read]
+ - OAuth2:
+ - payroll.payruns
+ - payroll.payruns.read
tags:
- PayrollUk
operationId: getPayRun
@@ -5272,58 +5067,54 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayRunObject'
- example: {
- "id": "84471d62-74b6-4b21-845c-6d1e6f031172",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-10T21:55:55.745211",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "payRun": {
- "payRunID": "e0a59d82-6229-4be4-9d66-49891b4d933e",
- "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "periodStartDate": "2020-02-03T00:00:00",
- "periodEndDate": "2020-02-09T00:00:00",
- "paymentDate": "2020-02-10T00:00:00",
- "totalCost": 490.39,
- "totalPay": 376.92,
- "payRunStatus": "Draft",
- "payRunType": "Scheduled",
- "calendarType": "Weekly",
- "postedDateTime": null,
- "paySlips": [
- {
- "paySlipID": "ed3fb9b3-e9a1-44fa-a224-8be49facbbe8",
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "lastEdited": null,
- "firstName": "Mike",
- "lastName": "Johnpitragibigson",
- "totalEarnings": 480.77,
- "grossEarnings": 480.77,
- "totalPay": 386.54,
- "totalEmployerTaxes": 0,
- "totalEmployeeTaxes": 94.23,
- "totalDeductions": 9.62,
- "totalReimbursements": 0,
- "totalCourtOrders": 0,
- "totalBenefits": 9.62,
- "bacsHash": null,
- "paymentMethod": null
- }
- ],
- "payslipMessage": null,
- "invalidPayeeIDs": null
- }
- }
+ example:
+ id: 84471d62-74b6-4b21-845c-6d1e6f031172
+ providerName: provider-name
+ dateTimeUTC: 2020-04-10T21:55:55.745211
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ payRun:
+ payRunID: e0a59d82-6229-4be4-9d66-49891b4d933e
+ payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ periodStartDate: 2020-02-03T00:00:00
+ periodEndDate: 2020-02-09T00:00:00
+ paymentDate: 2020-02-10T00:00:00
+ totalCost: 490.39
+ totalPay: 376.92
+ payRunStatus: Draft
+ payRunType: Scheduled
+ calendarType: Weekly
+ postedDateTime: null
+ paySlips:
+ - paySlipID: ed3fb9b3-e9a1-44fa-a224-8be49facbbe8
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ lastEdited: null
+ firstName: Mike
+ lastName: Johnpitragibigson
+ totalEarnings: 480.77
+ grossEarnings: 480.77
+ totalPay: 386.54
+ totalEmployerTaxes: 0
+ totalEmployeeTaxes: 94.23
+ totalDeductions: 9.62
+ totalReimbursements: 0
+ totalCourtOrders: 0
+ totalBenefits: 9.62
+ bacsHash: null
+ paymentMethod: null
+ payslipMessage: null
+ invalidPayeeIDs: null
put:
security:
- - OAuth2: [payroll.payruns]
+ - OAuth2:
+ - payroll.payruns
tags:
- PayrollUk
operationId: updatePayRun
@@ -5336,13 +5127,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- paymentDateValue:
key: paymentDate
keyPascal: PaymentDate
@@ -5350,13 +5141,13 @@ paths:
is_date: true
java_datatype: LocalDate
csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 30)"
- java: "LocalDate.of(2020, Month.OCTOBER, 30)"
- csharp: "new DateTime(2020, 10, 12)"
- php: "new DateTime('2020-10-30')"
- node: "'2020-10-30'"
- python: "dateutil.parser.parse('2020-10-30T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
+ default: LocalDate.of(2020, Month.OCTOBER, 30)
+ java: LocalDate.of(2020, Month.OCTOBER, 30)
+ csharp: new DateTime(2020, 10, 12)
+ php: new DateTime('2020-10-30')
+ node: '''2020-10-30'''
+ python: dateutil.parser.parse('2020-10-30T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
- payRunCalendar:
key: payRunCalendar
keyPascal: PayRunCalendar
@@ -5366,7 +5157,7 @@ paths:
key: calendarType
keyPascal: CalendarType
keySnake: calendar_type
- nonString: true
+ nonString: true
default: CalendarType.Weekly
php: XeroAPI\XeroPHP\Models\PayrollUk\CalendarType.WEEKLY
node: CalendarType.Weekly
@@ -5389,7 +5180,7 @@ paths:
key: paymentDate
keyPascal: PaymentDate
keySnake: payment_date
- is_last: true
+ is_last: true
is_variable: true
nonString: true
default: paymentDate
@@ -5408,56 +5199,51 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayRunObject'
- example: {
- "id": "f567524d-34d6-412b-97e3-f97152c1bbc2",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-06-03T18:33:25.3607921",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "payRun": {
- "payRunID": "e0a59d82-6229-4be4-9d66-49891b4d933e",
- "payrollCalendarID": "216d80e6-af55-47b1-b718-9457c3f5d2fe",
- "periodStartDate": "2020-02-03T00:00:00",
- "periodEndDate": "2020-02-09T00:00:00",
- "paymentDate": "2020-05-01T00:00:00",
- "totalCost": 523.79,
- "totalPay": 445.04,
- "payRunStatus": "Draft",
- "payRunType": "Scheduled",
- "calendarType": "Weekly",
- "postedDateTime": null,
- "paySlips": [
- {
- "paySlipID": "ed3fb9b3-e9a1-44fa-a224-8be49facbbe8",
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "lastEdited": null,
- "firstName": "Mike",
- "lastName": "Johncfvhitgezvson",
- "totalEarnings": 480.77,
- "grossEarnings": 480.77,
- "totalPay": 445.04,
- "totalEmployerTaxes": 43.02,
- "totalEmployeeTaxes": 35.73,
- "totalDeductions": 0,
- "totalReimbursements": 0,
- "totalCourtOrders": 0,
- "totalBenefits": 0,
- "bacsHash": null,
- "paymentMethod": "Electronically"
- }
- ],
- "payslipMessage": null,
- "invalidPayeeIDs": null
- }
- }
- '400':
+ example:
+ id: f567524d-34d6-412b-97e3-f97152c1bbc2
+ providerName: provider-name
+ dateTimeUTC: 2020-06-03T18:33:25.3607921
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ payRun:
+ payRunID: e0a59d82-6229-4be4-9d66-49891b4d933e
+ payrollCalendarID: 216d80e6-af55-47b1-b718-9457c3f5d2fe
+ periodStartDate: 2020-02-03T00:00:00
+ periodEndDate: 2020-02-09T00:00:00
+ paymentDate: 2020-05-01T00:00:00
+ totalCost: 523.79
+ totalPay: 445.04
+ payRunStatus: Draft
+ payRunType: Scheduled
+ calendarType: Weekly
+ postedDateTime: null
+ paySlips:
+ - paySlipID: ed3fb9b3-e9a1-44fa-a224-8be49facbbe8
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ lastEdited: null
+ firstName: Mike
+ lastName: Johncfvhitgezvson
+ totalEarnings: 480.77
+ grossEarnings: 480.77
+ totalPay: 445.04
+ totalEmployerTaxes: 43.02
+ totalEmployeeTaxes: 35.73
+ totalDeductions: 0
+ totalReimbursements: 0
+ totalCourtOrders: 0
+ totalBenefits: 0
+ bacsHash: null
+ paymentMethod: Electronically
+ payslipMessage: null
+ invalidPayeeIDs: null
+ "400":
description: validation error for a bad request
content:
application/json:
@@ -5469,15 +5255,16 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/PayRun'
- example: {
- "paymentDate": "2020-05-01"
- }
+ example:
+ paymentDate: "2020-05-01"
/Payslips:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.payslip, payroll.payslip.read]
+ - OAuth2:
+ - payroll.payslip
+ - payroll.payslip.read
tags:
- PayrollUk
operationId: getPaySlips
@@ -5498,111 +5285,91 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Payslips'
- example: {
- "id": "c07aa280-478b-48b5-a778-499cf95c9781",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-10T21:50:46.3775117",
- "httpStatusCode": "OK",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 1
- },
- "problem": null,
- "paySlips": [
- {
- "paySlipID": "ed3fb9b3-e9a1-44fa-a224-8be49facbbe8",
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "payRunID": "e0a59d82-6229-4be4-9d66-49891b4d933e",
- "lastEdited": null,
- "firstName": "Mike",
- "lastName": "Johnpitragibigson",
- "totalEarnings": 480.77,
- "grossEarnings": 480.77,
- "totalPay": 386.54,
- "totalEmployerTaxes": 0,
- "totalEmployeeTaxes": 94.23,
- "totalDeductions": 9.62,
- "totalReimbursements": 0,
- "totalCourtOrders": 0,
- "totalBenefits": 9.62,
- "bacsHash": null,
- "paymentMethod": null,
- "earningsLines": [
- {
- "earningsLineID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "displayName": "Regular Hours",
- "ratePerUnit": 12.019231,
- "numberOfUnits": 40,
- "fixedAmount": null,
- "amount": 480.77,
- "isLinkedToTimesheet": false,
- "isAverageDailyPayRate": null
- }
- ],
- "leaveEarningsLines": [],
- "timesheetEarningsLines": [],
- "deductionLines": [],
- "reimbursementLines": [],
- "leaveAccrualLines": [
- {
- "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c",
- "numberOfUnits": 0
- }
- ],
- "benefitLines": [],
- "paymentLines": [
- {
- "paymentLineID": "08ceb312-07af-4ce0-ae9a-176532f07009",
- "amount": 384.3,
- "accountNumber": null,
- "sortCode": null,
- "accountName": null
- }
- ],
- "employeeTaxLines": [
- {
- "taxLineID": "e7dc717a-4399-4702-9e15-adb87e568dc9",
- "description": "PAYE",
- "amount": 48.6,
- "globalTaxTypeID": 1,
- "manualAdjustment": false
- },
- {
- "taxLineID": "c774af0b-4776-4c81-9c96-ad18e4b35f40",
- "description": "Employee National Insurance Contribution",
- "amount": 38.25,
- "globalTaxTypeID": 2,
- "manualAdjustment": false
- }
- ],
- "employerTaxLines": [
- {
- "taxLineID": "8de7a488-57ed-4d58-b76a-d9f9460ebded",
- "description": "Employer National Insurance Contribution",
- "amount": 43.99,
- "globalTaxTypeID": 3,
- "manualAdjustment": false
- }
- ],
- "courtOrderLines": []
- }
- ]
- }
+ example:
+ id: c07aa280-478b-48b5-a778-499cf95c9781
+ providerName: provider-name
+ dateTimeUTC: 2020-04-10T21:50:46.3775117
+ httpStatusCode: OK
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 1
+ problem: null
+ paySlips:
+ - paySlipID: ed3fb9b3-e9a1-44fa-a224-8be49facbbe8
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ payRunID: e0a59d82-6229-4be4-9d66-49891b4d933e
+ lastEdited: null
+ firstName: Mike
+ lastName: Johnpitragibigson
+ totalEarnings: 480.77
+ grossEarnings: 480.77
+ totalPay: 386.54
+ totalEmployerTaxes: 0
+ totalEmployeeTaxes: 94.23
+ totalDeductions: 9.62
+ totalReimbursements: 0
+ totalCourtOrders: 0
+ totalBenefits: 9.62
+ bacsHash: null
+ paymentMethod: null
+ earningsLines:
+ - earningsLineID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ displayName: Regular Hours
+ ratePerUnit: 12.019231
+ numberOfUnits: 40
+ fixedAmount: null
+ amount: 480.77
+ isLinkedToTimesheet: false
+ isAverageDailyPayRate: null
+ leaveEarningsLines: []
+ timesheetEarningsLines: []
+ deductionLines: []
+ reimbursementLines: []
+ leaveAccrualLines:
+ - leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c
+ numberOfUnits: 0
+ benefitLines: []
+ paymentLines:
+ - paymentLineID: 08ceb312-07af-4ce0-ae9a-176532f07009
+ amount: 384.3
+ accountNumber: null
+ sortCode: null
+ accountName: null
+ employeeTaxLines:
+ - taxLineID: e7dc717a-4399-4702-9e15-adb87e568dc9
+ description: PAYE
+ amount: 48.6
+ globalTaxTypeID: 1
+ manualAdjustment: false
+ - taxLineID: c774af0b-4776-4c81-9c96-ad18e4b35f40
+ description: Employee National Insurance Contribution
+ amount: 38.25
+ globalTaxTypeID: 2
+ manualAdjustment: false
+ employerTaxLines:
+ - taxLineID: 8de7a488-57ed-4d58-b76a-d9f9460ebded
+ description: Employer National Insurance Contribution
+ amount: 43.99
+ globalTaxTypeID: 3
+ manualAdjustment: false
+ courtOrderLines: []
/Payslips/{PayslipID}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.payslip, payroll.payslip.read]
+ - OAuth2:
+ - payroll.payslip
+ - payroll.payslip.read
tags:
- PayrollUk
operationId: getPaySlip
@@ -5618,209 +5385,175 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/PayslipObject'
- example: {
- "id": "80c558c3-bc7a-48d0-91b2-20b8ec784f0d",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-10T22:04:35.1798025",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "paySlip": {
- "paySlipID": "ed3fb9b3-e9a1-44fa-a224-8be49facbbe8",
- "employeeID": "aad6b292-7b94-408b-93f6-e489867e3fb0",
- "payRunID": "e0a59d82-6229-4be4-9d66-49891b4d933e",
- "lastEdited": null,
- "firstName": "Mike",
- "lastName": "Johnpitragibigson",
- "totalEarnings": 480.77,
- "grossEarnings": 480.77,
- "totalPay": 386.54,
- "totalEmployerTaxes": 0,
- "totalEmployeeTaxes": 94.23,
- "totalDeductions": 9.62,
- "totalReimbursements": 0,
- "totalCourtOrders": 0,
- "totalBenefits": 9.62,
- "bacsHash": null,
- "paymentMethod": null,
- "earningsLines": [
- {
- "earningsLineID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "earningsRateID": "87f5b43a-cf51-4b74-92de-94c819e82d27",
- "displayName": "Regular Hours",
- "ratePerUnit": 12.019231,
- "numberOfUnits": 40,
- "fixedAmount": null,
- "amount": 480.77,
- "isLinkedToTimesheet": false,
- "isAverageDailyPayRate": null
- }
- ],
- "leaveEarningsLines": [],
- "timesheetEarningsLines": [],
- "deductionLines": [],
- "reimbursementLines": [],
- "leaveAccrualLines": [
- {
- "leaveTypeID": "ed08dffe-788e-4b24-9630-f0fa2f4d164c",
- "numberOfUnits": 0
- }
- ],
- "benefitLines": [],
- "paymentLines": [
- {
- "paymentLineID": "08ceb312-07af-4ce0-ae9a-176532f07009",
- "amount": 384.3,
- "accountNumber": null,
- "sortCode": null,
- "accountName": null
- }
- ],
- "employeeTaxLines": [
- {
- "taxLineID": "e7dc717a-4399-4702-9e15-adb87e568dc9",
- "description": "PAYE",
- "amount": 48.6,
- "globalTaxTypeID": 1,
- "manualAdjustment": false
- },
- {
- "taxLineID": "c774af0b-4776-4c81-9c96-ad18e4b35f40",
- "description": "Employee National Insurance Contribution",
- "amount": 38.25,
- "globalTaxTypeID": 2,
- "manualAdjustment": false
- }
- ],
- "employerTaxLines": [
- {
- "taxLineID": "8de7a488-57ed-4d58-b76a-d9f9460ebded",
- "description": "Employer National Insurance Contribution",
- "amount": 43.99,
- "globalTaxTypeID": 3,
- "manualAdjustment": false
- }
- ],
- "courtOrderLines": []
- }
- }
+ example:
+ id: 80c558c3-bc7a-48d0-91b2-20b8ec784f0d
+ providerName: provider-name
+ dateTimeUTC: 2020-04-10T22:04:35.1798025
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ paySlip:
+ paySlipID: ed3fb9b3-e9a1-44fa-a224-8be49facbbe8
+ employeeID: aad6b292-7b94-408b-93f6-e489867e3fb0
+ payRunID: e0a59d82-6229-4be4-9d66-49891b4d933e
+ lastEdited: null
+ firstName: Mike
+ lastName: Johnpitragibigson
+ totalEarnings: 480.77
+ grossEarnings: 480.77
+ totalPay: 386.54
+ totalEmployerTaxes: 0
+ totalEmployeeTaxes: 94.23
+ totalDeductions: 9.62
+ totalReimbursements: 0
+ totalCourtOrders: 0
+ totalBenefits: 9.62
+ bacsHash: null
+ paymentMethod: null
+ earningsLines:
+ - earningsLineID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ earningsRateID: 87f5b43a-cf51-4b74-92de-94c819e82d27
+ displayName: Regular Hours
+ ratePerUnit: 12.019231
+ numberOfUnits: 40
+ fixedAmount: null
+ amount: 480.77
+ isLinkedToTimesheet: false
+ isAverageDailyPayRate: null
+ leaveEarningsLines: []
+ timesheetEarningsLines: []
+ deductionLines: []
+ reimbursementLines: []
+ leaveAccrualLines:
+ - leaveTypeID: ed08dffe-788e-4b24-9630-f0fa2f4d164c
+ numberOfUnits: 0
+ benefitLines: []
+ paymentLines:
+ - paymentLineID: 08ceb312-07af-4ce0-ae9a-176532f07009
+ amount: 384.3
+ accountNumber: null
+ sortCode: null
+ accountName: null
+ employeeTaxLines:
+ - taxLineID: e7dc717a-4399-4702-9e15-adb87e568dc9
+ description: PAYE
+ amount: 48.6
+ globalTaxTypeID: 1
+ manualAdjustment: false
+ - taxLineID: c774af0b-4776-4c81-9c96-ad18e4b35f40
+ description: Employee National Insurance Contribution
+ amount: 38.25
+ globalTaxTypeID: 2
+ manualAdjustment: false
+ employerTaxLines:
+ - taxLineID: 8de7a488-57ed-4d58-b76a-d9f9460ebded
+ description: Employer National Insurance Contribution
+ amount: 43.99
+ globalTaxTypeID: 3
+ manualAdjustment: false
+ courtOrderLines: []
/Settings:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getSettings
x-hasPayrollUkProblem: true
summary: Retrieves payroll settings
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Settings'
- example: {
- "id": "3cb41871-980a-47e4-878f-7c576b0d3677",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-10T21:27:04.8905569",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "settings": {
- "accounts": [
- {
- "accountID": "9ee28149-32a9-4661-8eab-a28738696983",
- "type": "WAGESPAYABLE",
- "code": "814",
- "name": "Wages Payable - Payroll"
- },
- {
- "accountID": "81da553d-c6c6-411e-95df-cc4ac8f7e1c2",
- "type": "WAGESEXPENSE",
- "code": "477",
- "name": "Salaries"
- },
- {
- "accountID": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4",
- "type": "BANK",
- "code": "090",
- "name": "Business Bank Account"
- },
- {
- "accountID": "43072840-e67b-45df-8b90-f52ebedb2779",
- "type": "PAYELIABILITY",
- "code": "825",
- "name": "PAYE Payable"
- },
- {
- "accountID": "a2377a9f-f5bd-4327-8f85-e3461b591912",
- "type": "NICLIABILITY",
- "code": "826",
- "name": "NIC Payable"
- },
- {
- "accountID": "4e24254c-2770-433d-9845-8925ded5e14a",
- "type": "EMPLOYERSNIC",
- "code": "479",
- "name": "Employers National Insurance"
- },
- {
- "accountID": "9ee28149-32a9-4661-8eab-a28738696983",
- "type": "PAYEECONTRIBUTION",
- "code": "814",
- "name": "Wages Payable - Payroll"
- }
- ]
- }
- }
+ example:
+ id: 3cb41871-980a-47e4-878f-7c576b0d3677
+ providerName: provider-name
+ dateTimeUTC: 2020-04-10T21:27:04.8905569
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ settings:
+ accounts:
+ - accountID: 9ee28149-32a9-4661-8eab-a28738696983
+ type: WAGESPAYABLE
+ code: "814"
+ name: Wages Payable - Payroll
+ - accountID: 81da553d-c6c6-411e-95df-cc4ac8f7e1c2
+ type: WAGESEXPENSE
+ code: "477"
+ name: Salaries
+ - accountID: bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4
+ type: BANK
+ code: "090"
+ name: Business Bank Account
+ - accountID: 43072840-e67b-45df-8b90-f52ebedb2779
+ type: PAYELIABILITY
+ code: "825"
+ name: PAYE Payable
+ - accountID: a2377a9f-f5bd-4327-8f85-e3461b591912
+ type: NICLIABILITY
+ code: "826"
+ name: NIC Payable
+ - accountID: 4e24254c-2770-433d-9845-8925ded5e14a
+ type: EMPLOYERSNIC
+ code: "479"
+ name: Employers National Insurance
+ - accountID: 9ee28149-32a9-4661-8eab-a28738696983
+ type: PAYEECONTRIBUTION
+ code: "814"
+ name: Wages Payable - Payroll
/Settings/trackingCategories:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [payroll.settings, payroll.settings.read]
+ - OAuth2:
+ - payroll.settings
+ - payroll.settings.read
tags:
- PayrollUk
operationId: getTrackingCategories
x-hasPayrollUkProblem: true
summary: Retrieves tracking categories
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/TrackingCategories'
- example: {
- "id": "e56628f7-a25e-4d23-88c5-56e2895e2143",
- "providerName": "provider-name",
- "dateTimeUTC": "2020-04-10T21:13:21.498344",
- "httpStatusCode": "OK",
- "pagination": null,
- "problem": null,
- "trackingCategories": {
- "employeeGroupsTrackingCategoryID": "9d8ad8f6-0d0f-41e0-8851-ef47e8b54ae6",
- "timesheetTrackingCategoryID": "1d7d2015-10e7-4ecb-8b44-f331c8b63e2d"
- }
- }
+ example:
+ id: e56628f7-a25e-4d23-88c5-56e2895e2143
+ providerName: provider-name
+ dateTimeUTC: 2020-04-10T21:13:21.498344
+ httpStatusCode: OK
+ pagination: null
+ problem: null
+ trackingCategories:
+ employeeGroupsTrackingCategoryID: 9d8ad8f6-0d0f-41e0-8851-ef47e8b54ae6
+ timesheetTrackingCategoryID: 1d7d2015-10e7-4ecb-8b44-f331c8b63e2d
components:
securitySchemes:
OAuth2:
type: oauth2
description: For more information visit https://developer.xero.com/documentation/oauth2/overview
- flows:
+ flows:
authorizationCode:
- authorizationUrl: 'https://login.xero.com/identity/connect/authorize'
- tokenUrl: 'https://identity.xero.com/connect/token'
+ authorizationUrl: https://login.xero.com/identity/connect/authorize
+ tokenUrl: https://identity.xero.com/connect/token
scopes:
payroll.employees: Grant read-write access to payroll employees
payroll.employees.read: Grant read-only access to payroll employees
@@ -5833,20 +5566,20 @@ components:
payroll.timesheets: Grant read-write access to payroll timesheets
payroll.timesheets.read: Grant read-only access to payroll timesheets
parameters:
- requiredHeader:
+ requiredHeader:
in: header
name: Xero-Tenant-Id
x-snake: xero_tenant_id
description: Xero identifier for Tenant
schema:
type: string
- required: true
+ required: true
idempotencyKey:
in: header
name: Idempotency-Key
x-snake: idempotency_key
description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
- example: "KEY_VALUE"
+ example: KEY_VALUE
schema:
type: string
schemas:
@@ -5868,8 +5601,8 @@ components:
description: The object returned for a bad request
type: object
properties:
- type:
- description: The type of error format
+ type:
+ description: The type of error format
type: string
example: application/problem+json
title:
@@ -5877,14 +5610,14 @@ components:
type: string
example: BadRequest
status:
- description: The error status code
+ description: The error status code
type: string
example: 400
detail:
description: A description of the error
type: string
example: Validation error occurred.
- instance:
+ instance:
type: string
invalidFields:
type: array
@@ -5900,7 +5633,7 @@ components:
reason:
description: The reason the error occurred
type: string
- example: The Date of Birth is required.
+ example: The Date of Birth is required.
Employees:
type: object
properties:
@@ -5932,7 +5665,7 @@ components:
- address
properties:
employeeID:
- description: Xero unique identifier for the employee
+ description: Xero unique identifier for the employee
type: string
format: uuid
example: d90457c4-f1be-4f2e-b4e3-f766390a7e30
@@ -5952,8 +5685,8 @@ components:
description: Date of birth of the employee (YYYY-MM-DD)
type: string
format: date
- example: 2019-01-02
- x-is-date: true
+ example: 2019-01-02
+ x-is-date: true
address:
$ref: '#/components/schemas/Address'
email:
@@ -5964,8 +5697,8 @@ components:
description: The employee’s gender
type: string
enum:
- - M
- - F
+ - M
+ - F
example: F
phoneNumber:
description: Employee phone number
@@ -6029,7 +5762,7 @@ components:
description: Start date of the employment (YYYY-MM-DD)
type: string
format: date
- x-is-date: true
+ x-is-date: true
employeeNumber:
description: The employment number of the employee
type: string
@@ -6038,19 +5771,19 @@ components:
description: The NI Category of the employee
type: string
enum:
- - A
- - B
- - C
- - F
- - H
- - I
- - J
- - L
- - M
- - S
- - V
- - X
- - Z
+ - A
+ - B
+ - C
+ - F
+ - H
+ - I
+ - J
+ - L
+ - M
+ - S
+ - V
+ - X
+ - Z
example: A
EmployeeTaxObject:
type: object
@@ -6077,7 +5810,7 @@ components:
type: string
example: 1185L
w1M1:
- description: Describes whether the tax settings is W1M1
+ description: Describes whether the tax settings is W1M1
type: boolean
previousTaxablePay:
description: The previous taxable pay
@@ -6085,12 +5818,12 @@ components:
format: double
x-is-money: true
previousTaxPaid:
- description: The tax amount previously paid
+ description: The tax amount previously paid
type: number
format: double
x-is-money: true
studentLoanDeduction:
- description: The employee's student loan deduction type
+ description: The employee's student loan deduction type
type: string
example: Plan Type 2
hasPostGraduateLoans:
@@ -6103,7 +5836,7 @@ components:
description: The directorship start date
type: string
format: date
- x-is-date: true
+ x-is-date: true
nicCalculationMethod:
description: NICs calculation method
type: string
@@ -6141,7 +5874,7 @@ components:
format: double
x-is-money: true
statutorySickPay:
- description: The total accumulated statutory sick pay amount received by the employee for current fiscal year to date
+ description: The total accumulated statutory sick pay amount received by the employee for current fiscal year to date
type: number
format: double
x-is-money: true
@@ -6189,15 +5922,15 @@ components:
description: The description of the leave (max length = 50)
type: string
startDate:
- description: Start date of the leave (YYYY-MM-DD)
+ description: Start date of the leave (YYYY-MM-DD)
type: string
format: date
- x-is-date: true
+ x-is-date: true
endDate:
- description: End date of the leave (YYYY-MM-DD)
+ description: End date of the leave (YYYY-MM-DD)
type: string
format: date
- x-is-date: true
+ x-is-date: true
periods:
description: The leave period information. The StartDate, EndDate and NumberOfUnits needs to be specified when you do not want to calculate NumberOfUnits automatically. Using incorrect period StartDate and EndDate will result in automatic computation of the NumberOfUnits.
type: array
@@ -6226,12 +5959,12 @@ components:
description: The Pay Period Start Date (YYYY-MM-DD)
type: string
format: date
- x-is-date: true
+ x-is-date: true
periodEndDate:
- description: The Pay Period End Date (YYYY-MM-DD)
+ description: The Pay Period End Date (YYYY-MM-DD)
type: string
format: date
- x-is-date: true
+ x-is-date: true
numberOfUnits:
description: The Number of Units for the leave
type: number
@@ -6240,8 +5973,8 @@ components:
description: Period Status
type: string
enum:
- - Approved
- - Completed
+ - Approved
+ - Completed
EmployeeLeaveBalances:
type: object
properties:
@@ -6257,7 +5990,7 @@ components:
type: object
properties:
name:
- description: Name of the leave type.
+ description: Name of the leave type.
type: string
example: Holiday
leaveTypeID:
@@ -6284,15 +6017,15 @@ components:
EmployeeStatutoryLeaveBalance:
type: object
properties:
- leaveType:
+ leaveType:
description: The type of statutory leave
type: string
enum:
- - Sick
- - Adoption
- - Maternity
- - Paternity
- - Sharedparental
+ - Sick
+ - Adoption
+ - Maternity
+ - Paternity
+ - Sharedparental
balanceRemaining:
description: The balance remaining for the corresponding leave type as of specified date.
type: number
@@ -6301,7 +6034,7 @@ components:
description: The units will be "Hours"
type: string
enum:
- - Hours
+ - Hours
EmployeeStatutoryLeavesSummaries:
type: object
properties:
@@ -6317,11 +6050,11 @@ components:
type: object
properties:
statutoryLeaveID:
- description: The unique identifier (guid) of a statutory leave.
+ description: The unique identifier (guid) of a statutory leave.
type: string
format: uuid
employeeID:
- description: The unique identifier (guid) of the employee
+ description: The unique identifier (guid) of the employee
type: string
format: uuid
type:
@@ -6334,17 +6067,17 @@ components:
- Paternity
- Sharedparental
startDate:
- description: The date when the leave starts
+ description: The date when the leave starts
type: string
format: date
- x-is-date: true
- endDate:
- description: The date when the leave ends
+ x-is-date: true
+ endDate:
+ description: The date when the leave ends
type: string
format: date
- x-is-date: true
+ x-is-date: true
isEntitled:
- description: Whether the leave was entitled to receive payment
+ description: Whether the leave was entitled to receive payment
type: boolean
status:
description: The status of the leave
@@ -6385,76 +6118,76 @@ components:
- sufficientNotice
properties:
statutoryLeaveID:
- description: The unique identifier (guid) of a statutory leave
+ description: The unique identifier (guid) of a statutory leave
type: string
format: uuid
employeeID:
- description: The unique identifier (guid) of the employee
+ description: The unique identifier (guid) of the employee
type: string
format: uuid
leaveTypeID:
- description: The unique identifier (guid) of the "Statutory Sick Leave (non-pensionable)" pay item
+ description: The unique identifier (guid) of the "Statutory Sick Leave (non-pensionable)" pay item
type: string
format: uuid
startDate:
- description: The date when the leave starts
+ description: The date when the leave starts
type: string
format: date
- x-is-date: true
+ x-is-date: true
endDate:
- description: The date when the leave ends
+ description: The date when the leave ends
type: string
format: date
- x-is-date: true
+ x-is-date: true
type:
description: the type of statutory leave
type: string
- example: "Sick"
+ example: Sick
status:
description: the type of statutory leave
type: string
- example: "Pending"
+ example: Pending
workPattern:
- description: The days of the work week the employee is scheduled to work at the time the leave is taken
+ description: The days of the work week the employee is scheduled to work at the time the leave is taken
type: array
items:
type: string
isPregnancyRelated:
- description: Whether the sick leave was pregnancy related
+ description: Whether the sick leave was pregnancy related
type: boolean
sufficientNotice:
- description: Whether the employee provided sufficient notice and documentation as required by the employer supporting the sick leave request
+ description: Whether the employee provided sufficient notice and documentation as required by the employer supporting the sick leave request
type: boolean
isEntitled:
- description: Whether the leave was entitled to receive payment
+ description: Whether the leave was entitled to receive payment
type: boolean
entitlementWeeksRequested:
- description: The amount of requested time (in weeks)
+ description: The amount of requested time (in weeks)
type: number
format: double
entitlementWeeksQualified:
- description: The amount of statutory sick leave time off (in weeks) that is available to take at the time the leave was requested
+ description: The amount of statutory sick leave time off (in weeks) that is available to take at the time the leave was requested
type: number
format: double
entitlementWeeksRemaining:
- description: A calculated amount of time (in weeks) that remains for the statutory sick leave period
+ description: A calculated amount of time (in weeks) that remains for the statutory sick leave period
type: number
format: double
overlapsWithOtherLeave:
description: Whether another leave (Paternity, Shared Parental specifically) occurs during the requested leave's period. While this is allowed it could affect payment amounts
type: boolean
entitlementFailureReasons:
- description: If the leave requested was considered "not entitled", the reasons why are listed here.
+ description: If the leave requested was considered "not entitled", the reasons why are listed here.
type: array
items:
type: string
enum:
- - UnableToCalculateAwe
- - AweLowerThanLel
- - NotQualifiedInPreviousPiw
- - ExceededMaximumEntitlementWeeksOfSsp
- - ExceededMaximumDurationOfPiw
- - SufficientNoticeNotGiven
+ - UnableToCalculateAwe
+ - AweLowerThanLel
+ - NotQualifiedInPreviousPiw
+ - ExceededMaximumEntitlementWeeksOfSsp
+ - ExceededMaximumDurationOfPiw
+ - SufficientNoticeNotGiven
EmployeeLeaveTypes:
type: object
properties:
@@ -6491,18 +6224,18 @@ components:
enum:
- BeginningOfCalendarYear
- OnAnniversaryDate
- - EachPayPeriod
+ - EachPayPeriod
- OnHourWorked
hoursAccruedAnnually:
description: The number of hours accrued for the leave annually. This is 0 when the scheduleOfAccrual chosen is "OnHourWorked"
type: number
format: double
maximumToAccrue:
- description: The maximum number of hours that can be accrued for the leave
+ description: The maximum number of hours that can be accrued for the leave
type: number
format: double
openingBalance:
- description: The initial number of hours assigned when the leave was added to the employee
+ description: The initial number of hours assigned when the leave was added to the employee
type: number
format: double
rateAccruedHourly:
@@ -6565,22 +6298,22 @@ components:
type: string
format: uuid
ratePerUnit:
- description: The rate per unit
+ description: The rate per unit
type: number
format: double
x-is-money: true
numberOfUnits:
- description: The rate per unit
+ description: The rate per unit
type: number
format: double
x-is-money: true
fixedAmount:
- description: The fixed amount per period
+ description: The fixed amount per period
type: number
format: double
x-is-money: true
earningsRateID:
- description: The corresponding earnings rate identifier
+ description: The corresponding earnings rate identifier
type: string
format: uuid
name:
@@ -6627,8 +6360,8 @@ components:
description: Category type of the employer pension
type: string
enum:
- - StakeholderPension
- - Other
+ - StakeholderPension
+ - Other
liabilityAccountId:
description: Xero identifier for Liability Account
type: string
@@ -6792,20 +6525,20 @@ components:
description: Statutory Deduction Category
type: string
enum:
- - AdditionalStudentLoan
- - ChildSupport
- - CourtFines
- - Creditor
- - FederalLevy
- - InlandRevenueArrears
- - KiwiSaver
- - MsdRepayments
- - NonPriorityOrder
- - PriorityOrder
- - TableBased
- - StudentLoan
- - VoluntaryStudentLoan
- - USChildSupport
+ - AdditionalStudentLoan
+ - ChildSupport
+ - CourtFines
+ - Creditor
+ - FederalLevy
+ - InlandRevenueArrears
+ - KiwiSaver
+ - MsdRepayments
+ - NonPriorityOrder
+ - PriorityOrder
+ - TableBased
+ - StudentLoan
+ - VoluntaryStudentLoan
+ - USChildSupport
EarningsOrders:
type: object
properties:
@@ -6991,7 +6724,7 @@ components:
description: UTC timestamp of last update to the leave type note
type: string
format: date-time
- x-is-datetime: true
+ x-is-datetime: true
isActive:
description: Shows whether the leave type is active or not
type: boolean
@@ -7069,25 +6802,25 @@ components:
timesheetID:
description: The Xero identifier for a Timesheet
type: string
- format: uuid
+ format: uuid
payrollCalendarID:
description: The Xero identifier for the Payroll Calendar that the Timesheet applies to
type: string
- format: uuid
+ format: uuid
employeeID:
description: The Xero identifier for the Employee that the Timesheet is for
type: string
- format: uuid
+ format: uuid
startDate:
description: The Start Date of the Timesheet period (YYYY-MM-DD)
type: string
- format: date
- x-is-date: true
+ format: date
+ x-is-date: true
endDate:
description: The End Date of the Timesheet period (YYYY-MM-DD)
type: string
- format: date
- x-is-date: true
+ format: date
+ x-is-date: true
status:
description: Status of the timesheet
type: string
@@ -7098,7 +6831,7 @@ components:
totalHours:
description: The Total Hours of the Timesheet
type: number
- format: double
+ format: double
updatedDateUTC:
description: The UTC date time that the Timesheet was last updated
type: string
@@ -7129,24 +6862,24 @@ components:
timesheetLineID:
description: The Xero identifier for a Timesheet Line
type: string
- format: uuid
+ format: uuid
date:
description: The Date that this Timesheet Line is for (YYYY-MM-DD)
type: string
- format: date
- x-is-date: true
+ format: date
+ x-is-date: true
earningsRateID:
description: The Xero identifier for the Earnings Rate that the Timesheet is for
type: string
- format: uuid
+ format: uuid
trackingItemID:
description: The Xero identifier for the Tracking Item that the Timesheet is for
type: string
- format: uuid
+ format: uuid
numberOfUnits:
description: The Number of Units of the Timesheet Line
type: number
- format: double
+ format: double
PayRunCalendars:
type: object
properties:
@@ -7178,7 +6911,7 @@ components:
payrollCalendarID:
description: Xero unique identifier for the payroll calendar
type: string
- format: uuid
+ format: uuid
name:
description: Name of the calendar
type: string
@@ -7196,22 +6929,22 @@ components:
description: Period start date of the calendar
type: string
format: date
- x-is-date: true
+ x-is-date: true
periodEndDate:
description: Period end date of the calendar
type: string
format: date
- x-is-date: true
+ x-is-date: true
paymentDate:
description: Payment date of the calendar
type: string
format: date
- x-is-date: true
+ x-is-date: true
updatedDateUTC:
description: UTC timestamp of the last update to the pay run calendar
type: string
format: date-time
- x-is-datetime: true
+ x-is-datetime: true
PaymentMethodObject:
type: object
properties:
@@ -7270,32 +7003,32 @@ components:
salaryAndWagesID:
description: Xero unique identifier for a salary and wages record
type: string
- format: uuid
+ format: uuid
earningsRateID:
description: Xero unique identifier for an earnings rate
type: string
- format: uuid
+ format: uuid
numberOfUnitsPerWeek:
description: The Number of Units per week for the corresponding salary and wages
type: number
- format: double
+ format: double
ratePerUnit:
description: The rate of each unit for the corresponding salary and wages
type: number
- format: double
+ format: double
numberOfUnitsPerDay:
description: The Number of Units per day for the corresponding salary and wages
type: number
- format: double
+ format: double
effectiveFrom:
description: The effective date of the corresponding salary and wages
type: string
- format: date
- x-is-date: true
+ format: date
+ x-is-date: true
annualSalary:
description: The annual salary
type: number
- format: double
+ format: double
status:
description: The current status of the corresponding salary and wages
type: string
@@ -7335,62 +7068,62 @@ components:
payRunID:
description: Xero unique identifier for the pay run
type: string
- format: uuid
+ format: uuid
payrollCalendarID:
description: Xero unique identifier for the payroll calendar
type: string
- format: uuid
+ format: uuid
periodStartDate:
description: Period start date of the payroll calendar
type: string
- format: date
+ format: date
x-is-date: true
periodEndDate:
description: Period end date of the payroll calendar
type: string
- format: date
- x-is-date: true
+ format: date
+ x-is-date: true
paymentDate:
description: Payment date of the pay run
type: string
- format: date
- x-is-date: true
+ format: date
+ x-is-date: true
totalCost:
description: Total cost of the pay run
type: number
- format: double
+ format: double
totalPay:
description: Total pay of the pay run
type: number
- format: double
+ format: double
payRunStatus:
description: Pay run status
type: string
enum:
- - Draft
- - Posted
+ - Draft
+ - Posted
payRunType:
description: Pay run type
type: string
enum:
- - Scheduled
- - Unscheduled
- - EarlierYearUpdate
+ - Scheduled
+ - Unscheduled
+ - EarlierYearUpdate
calendarType:
description: Calendar type of the pay run
type: string
enum:
- - Weekly
- - Fortnightly
- - FourWeekly
- - Monthly
- - Annual
- - Quarterly
+ - Weekly
+ - Fortnightly
+ - FourWeekly
+ - Monthly
+ - Annual
+ - Quarterly
postedDateTime:
description: Posted date time of the pay run
type: string
- format: date
- x-is-date: true
+ format: date
+ x-is-date: true
paySlips:
type: array
items:
@@ -7421,20 +7154,20 @@ components:
paySlipID:
description: The Xero identifier for a Payslip
type: string
- format: uuid
+ format: uuid
employeeID:
description: The Xero identifier for payroll employee
type: string
- format: uuid
+ format: uuid
payRunID:
description: The Xero identifier for the associated payrun
type: string
- format: uuid
+ format: uuid
lastEdited:
description: The date payslip was last updated
type: string
- format: date
- x-is-datetime: true
+ format: date
+ x-is-datetime: true
firstName:
description: Employee first name
type: string
@@ -7444,42 +7177,42 @@ components:
totalEarnings:
description: Total earnings before any deductions. Same as gross earnings for UK.
type: number
- format: double
+ format: double
grossEarnings:
description: Total earnings before any deductions. Same as total earnings for UK.
type: number
- format: double
+ format: double
totalPay:
description: The employee net pay
type: number
- format: double
+ format: double
totalEmployerTaxes:
description: The employer's tax obligation
type: number
- format: double
+ format: double
totalEmployeeTaxes:
description: The part of an employee's earnings that is deducted for tax purposes
type: number
- format: double
+ format: double
totalDeductions:
description: Total amount subtracted from an employee's earnings to reach total pay
type: number
- format: double
+ format: double
totalReimbursements:
description: Total reimbursements are nontaxable payments to an employee used to repay out-of-pocket expenses when the person incurs those expenses through employment
type: number
- format: double
+ format: double
totalCourtOrders:
description: Total amounts required by law to subtract from the employee's earnings
type: number
- format: double
+ format: double
totalBenefits:
description: Benefits (also called fringe benefits, perquisites or perks) are various non-earnings compensations provided to employees in addition to their normal earnings or salaries
type: number
- format: double
+ format: double
bacsHash:
description: BACS Service User Number
- type: string
+ type: string
paymentMethod:
description: The payment method code
type: string
@@ -7523,26 +7256,26 @@ components:
earningsRateID:
description: Xero identifier for payroll earnings rate
type: string
- format: uuid
+ format: uuid
displayName:
description: name of earnings rate for display in UI
type: string
ratePerUnit:
description: Rate per unit for earnings line
type: number
- format: double
+ format: double
numberOfUnits:
description: Earnings number of units
type: number
- format: double
+ format: double
fixedAmount:
description: Earnings fixed amount. Only applicable if the EarningsRate RateType is Fixed
type: number
- format: double
+ format: double
amount:
description: The amount of the earnings line.
type: number
- format: double
+ format: double
isLinkedToTimesheet:
description: Identifies if the earnings is taken from the timesheet. False for earnings line
type: boolean
@@ -7559,23 +7292,23 @@ components:
earningsRateID:
description: Xero identifier for payroll leave earnings rate
type: string
- format: uuid
+ format: uuid
ratePerUnit:
description: Rate per unit for leave earnings line
type: number
- format: double
+ format: double
numberOfUnits:
description: Leave earnings number of units
type: number
- format: double
+ format: double
fixedAmount:
description: Leave earnings fixed amount. Only applicable if the EarningsRate RateType is Fixed
type: number
- format: double
+ format: double
amount:
description: The amount of the earnings line.
type: number
- format: double
+ format: double
isLinkedToTimesheet:
description: Identifies if the leave earnings is taken from the timesheet. False for leave earnings line
type: boolean
@@ -7589,23 +7322,23 @@ components:
earningsRateID:
description: Xero identifier for payroll timesheet earnings rate
type: string
- format: uuid
+ format: uuid
ratePerUnit:
description: Rate per unit for timesheet earnings line
type: number
- format: double
+ format: double
numberOfUnits:
description: Timesheet earnings number of units
type: number
- format: double
+ format: double
fixedAmount:
description: Timesheet earnings fixed amount. Only applicable if the EarningsRate RateType is Fixed
type: number
- format: double
+ format: double
amount:
description: The amount of the timesheet earnings line.
type: number
- format: double
+ format: double
isLinkedToTimesheet:
description: Identifies if the timesheet earnings is taken from the timesheet. False for leave earnings line
type: boolean
@@ -7619,18 +7352,18 @@ components:
deductionTypeID:
description: Xero identifier for payroll deduction
type: string
- format: uuid
+ format: uuid
amount:
description: The amount of the deduction line
type: number
- format: double
+ format: double
subjectToTax:
description: Identifies if the deduction is subject to tax
type: boolean
percentage:
description: Deduction rate percentage
type: number
- format: double
+ format: double
ReimbursementLines:
type: array
items:
@@ -7660,11 +7393,11 @@ components:
leaveTypeID:
description: Xero identifier for the Leave type
type: string
- format: uuid
+ format: uuid
numberOfUnits:
description: Leave accrual number of units
type: number
- format: double
+ format: double
BenefitLines:
type: array
items:
@@ -7675,22 +7408,22 @@ components:
benefitTypeID:
description: Xero identifier for payroll benefit type
type: string
- format: uuid
+ format: uuid
displayName:
description: Benefit display name
- type: string
+ type: string
amount:
description: The amount of the benefit line.
type: number
- format: double
+ format: double
fixedAmount:
description: Benefit fixed amount
type: number
- format: double
+ format: double
percentage:
description: Benefit rate percentage
type: number
- format: double
+ format: double
PaymentLines:
type: array
items:
@@ -7701,17 +7434,17 @@ components:
paymentLineID:
description: Xero identifier for payroll payment line
type: string
- format: uuid
+ format: uuid
amount:
description: The amount of the payment line
type: number
- format: double
+ format: double
accountNumber:
description: The account number
type: string
sortCode:
description: The account sort code
- type: string
+ type: string
accountName:
description: The account name
type: string
@@ -7735,11 +7468,11 @@ components:
amount:
description: The amount of the tax line
type: number
- format: double
- globalTaxTypeID:
+ format: double
+ globalTaxTypeID:
description: Tax type ID
type: string
- manualAdjustment:
+ manualAdjustment:
description: Identifies if the tax line is a manual adjustment
type: boolean
CourtOrderLines:
@@ -7752,11 +7485,11 @@ components:
courtOrderTypeID:
description: Xero identifier for payroll court order type
type: string
- format: uuid
+ format: uuid
amount:
description: Amount
type: number
- format: double
+ format: double
Settings:
type: object
properties:
@@ -7779,18 +7512,18 @@ components:
accountID:
description: The Xero identifier for Settings.
type: string
- format: uuid
+ format: uuid
type:
description: The assigned AccountType
type: string
enum:
- - BANK
- - EMPLOYERSNIC
- - NICLIABILITY
- - PAYEECONTRIBUTION
- - PAYELIABILITY
- - WAGESPAYABLE
- - WAGESEXPENSE
+ - BANK
+ - EMPLOYERSNIC
+ - NICLIABILITY
+ - PAYEECONTRIBUTION
+ - PAYELIABILITY
+ - WAGESPAYABLE
+ - WAGESEXPENSE
code:
description: A unique 3 digit number for each Account
type: string
@@ -7863,4 +7596,4 @@ components:
timesheetTrackingCategoryID:
description: The Xero identifier for Timesheet tracking category.
type: string
- format: uuid
\ No newline at end of file
+ format: uuid
diff --git a/xero-projects.yaml b/xero-projects.yaml
index 068bd60d..13475a29 100644
--- a/xero-projects.yaml
+++ b/xero-projects.yaml
@@ -1,26 +1,28 @@
openapi: 3.0.0
info:
- version: "6.3.0"
+ version: 6.3.0
title: Xero Projects API
- description: This is the Xero Projects API
- termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
+ description: This is the Xero Projects API
+ termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/
contact:
- name: "Xero Platform Team"
- email: "api@xero.com"
- url: "https://developer.xero.com"
+ name: Xero Platform Team
+ email: api@xero.com
+ url: https://developer.xero.com
license:
- name: MIT
- url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE'
+ name: MIT
+ url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE
servers:
- description: Xero API server for projects
- url: 'https://api.xero.com/projects.xro/2.0'
+ url: https://api.xero.com/projects.xro/2.0
paths:
/Projects:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [projects, projects.read]
+ - OAuth2:
+ - projects
+ - projects.read
tags:
- Project
summary: Retrieves all projects
@@ -32,7 +34,7 @@ paths:
in: query
required: false
description: Search for all projects that match a comma separated list of projectIds
- schema:
+ schema:
type: array
items:
type: string
@@ -42,20 +44,20 @@ paths:
in: query
required: false
description: Filter for projects for a specific contact
- schema:
+ schema:
type: string
format: uuid
- name: states
in: query
required: false
description: Filter for projects in a particular state (INPROGRESS or CLOSED)
- schema:
+ schema:
type: string
- name: page
in: query
required: false
description: set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
- schema:
+ schema:
type: integer
example: 1
default: 1
@@ -64,96 +66,79 @@ paths:
in: query
required: false
description: Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
- schema:
+ schema:
type: integer
minimum: 1
maximum: 500
default: 50
example: 100
responses:
- '200':
+ "200":
description: OK/success, returns a list of project objects
content:
application/json:
schema:
$ref: '#/components/schemas/Projects'
- example: {
- "pagination": {
- "page": 1,
- "pageSize": 50,
- "pageCount": 1,
- "itemCount": 9
- },
- "items": [
- {
- "projectId": "b021e7cb-1903-4292-b48b-5b27b4271e3e",
- "contactId": "216830cb-9a68-487e-928b-c1a7ccc4fc81",
- "name": "FooProject28916",
- "currencyCode": "AUD",
- "minutesLogged": 180,
- "totalTaskAmount": {
- "currency": "AUD",
- "value": 60.0
- },
- "totalExpenseAmount": {
- "currency": "AUD",
- "value": 499.0
- },
- "minutesToBeInvoiced": 180,
- "taskAmountToBeInvoiced": {
- "currency": "AUD",
- "value": 60.0
- },
- "taskAmountInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "expenseAmountToBeInvoiced": {
- "currency": "AUD",
- "value": 499.0
- },
- "expenseAmountInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "projectAmountInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "deposit": {
- "currency": "AUD",
- "value": 0.0
- },
- "depositApplied": {
- "currency": "AUD",
- "value": 0.0
- },
- "creditNoteAmount": {
- "currency": "AUD",
- "value": 0.0
- },
- "totalInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "totalToBeInvoiced": {
- "currency": "AUD",
- "value": 559.0
- },
- "deadlineUtc": "2020-03-03T15:00:00Z",
- "estimate": {
- "currency": "AUD",
- "value": 99.99
- },
- "status": "INPROGRESS"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
+ example:
+ pagination:
+ page: 1
+ pageSize: 50
+ pageCount: 1
+ itemCount: 9
+ items:
+ - projectId: b021e7cb-1903-4292-b48b-5b27b4271e3e
+ contactId: 216830cb-9a68-487e-928b-c1a7ccc4fc81
+ name: FooProject28916
+ currencyCode: AUD
+ minutesLogged: 180
+ totalTaskAmount:
+ currency: AUD
+ value: 60.0
+ totalExpenseAmount:
+ currency: AUD
+ value: 499.0
+ minutesToBeInvoiced: 180
+ taskAmountToBeInvoiced:
+ currency: AUD
+ value: 60.0
+ taskAmountInvoiced:
+ currency: AUD
+ value: 0.0
+ expenseAmountToBeInvoiced:
+ currency: AUD
+ value: 499.0
+ expenseAmountInvoiced:
+ currency: AUD
+ value: 0.0
+ projectAmountInvoiced:
+ currency: AUD
+ value: 0.0
+ deposit:
+ currency: AUD
+ value: 0.0
+ depositApplied:
+ currency: AUD
+ value: 0.0
+ creditNoteAmount:
+ currency: AUD
+ value: 0.0
+ totalInvoiced:
+ currency: AUD
+ value: 0.0
+ totalToBeInvoiced:
+ currency: AUD
+ value: 559.0
+ deadlineUtc: "2020-03-03T15:00:00Z"
+ estimate:
+ currency: AUD
+ value: 99.99
+ status: INPROGRESS
+ "400":
+ $ref: '#/components/responses/400Error'
post:
- security:
- - OAuth2: [projects]
+ security:
+ - OAuth2:
+ - projects
tags:
- Project
summary: Create one or more new projects
@@ -167,90 +152,72 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ProjectCreateOrUpdate'
- example:
- '{
- "contactId": "00000000-0000-0000-000-000000000000",
- "name": "New Kitchen",
- "deadlineUtc": "2019-12-10T12:59:59Z",
- "estimateAmount": "99.99"
- }'
+ example: '{ "contactId": "00000000-0000-0000-000-000000000000", "name": "New Kitchen", "deadlineUtc": "2019-12-10T12:59:59Z", "estimateAmount": "99.99" }'
responses:
- '201':
+ "201":
description: OK/success, returns the new project object
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
- example: {
- "projectId": "ed957eee-bc6f-4f52-a663-aa42e6af9620",
- "contactId": "216830cb-9a68-487e-928b-c1a7ccc4fc81",
- "name": "New Kitchen",
- "currencyCode": "AUD",
- "minutesLogged": 0,
- "totalTaskAmount": {
- "currency": "AUD",
- "value": 0.0
- },
- "totalExpenseAmount": {
- "currency": "AUD",
- "value": 0.0
- },
- "minutesToBeInvoiced": 0,
- "taskAmountToBeInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "taskAmountInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "expenseAmountToBeInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "expenseAmountInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "projectAmountInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "deposit": {
- "currency": "AUD",
- "value": 0.0
- },
- "depositApplied": {
- "currency": "AUD",
- "value": 0.0
- },
- "creditNoteAmount": {
- "currency": "AUD",
- "value": 0.0
- },
- "totalInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "totalToBeInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "deadlineUtc": "2020-03-03T15:00:00Z",
- "estimate": {
- "currency": "AUD",
- "value": 99.99
- },
- "status": "INPROGRESS"
- }
- '400':
+ example:
+ projectId: ed957eee-bc6f-4f52-a663-aa42e6af9620
+ contactId: 216830cb-9a68-487e-928b-c1a7ccc4fc81
+ name: New Kitchen
+ currencyCode: AUD
+ minutesLogged: 0
+ totalTaskAmount:
+ currency: AUD
+ value: 0.0
+ totalExpenseAmount:
+ currency: AUD
+ value: 0.0
+ minutesToBeInvoiced: 0
+ taskAmountToBeInvoiced:
+ currency: AUD
+ value: 0.0
+ taskAmountInvoiced:
+ currency: AUD
+ value: 0.0
+ expenseAmountToBeInvoiced:
+ currency: AUD
+ value: 0.0
+ expenseAmountInvoiced:
+ currency: AUD
+ value: 0.0
+ projectAmountInvoiced:
+ currency: AUD
+ value: 0.0
+ deposit:
+ currency: AUD
+ value: 0.0
+ depositApplied:
+ currency: AUD
+ value: 0.0
+ creditNoteAmount:
+ currency: AUD
+ value: 0.0
+ totalInvoiced:
+ currency: AUD
+ value: 0.0
+ totalToBeInvoiced:
+ currency: AUD
+ value: 0.0
+ deadlineUtc: "2020-03-03T15:00:00Z"
+ estimate:
+ currency: AUD
+ value: 99.99
+ status: INPROGRESS
+ "400":
$ref: '#/components/responses/400Error'
- '/Projects/{projectId}':
+ /Projects/{projectId}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [projects, projects.read]
+ - OAuth2:
+ - projects
+ - projects.read
tags:
- Project
summary: Retrieves a single project
@@ -266,79 +233,66 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: OK/success, returns the specified project object
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
- example: {
- "projectId": "b021e7cb-1903-4292-b48b-5b27b4271e3e",
- "contactId": "216830cb-9a68-487e-928b-c1a7ccc4fc81",
- "name": "Remodeling 2012",
- "currencyCode": "AUD",
- "minutesLogged": 180,
- "totalTaskAmount": {
- "currency": "AUD",
- "value": 60.0
- },
- "totalExpenseAmount": {
- "currency": "AUD",
- "value": 499.0
- },
- "minutesToBeInvoiced": 180,
- "taskAmountToBeInvoiced": {
- "currency": "AUD",
- "value": 60.0
- },
- "taskAmountInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "expenseAmountToBeInvoiced": {
- "currency": "AUD",
- "value": 499.0
- },
- "expenseAmountInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "projectAmountInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "deposit": {
- "currency": "AUD",
- "value": 0.0
- },
- "depositApplied": {
- "currency": "AUD",
- "value": 0.0
- },
- "creditNoteAmount": {
- "currency": "AUD",
- "value": 0.0
- },
- "totalInvoiced": {
- "currency": "AUD",
- "value": 0.0
- },
- "totalToBeInvoiced": {
- "currency": "AUD",
- "value": 559.0
- },
- "deadlineUtc": "2020-03-03T15:00:00Z",
- "estimate": {
- "currency": "AUD",
- "value": 99.99
- },
- "status": "INPROGRESS"
- }
- '400':
- $ref: '#/components/responses/400Error'
+ example:
+ projectId: b021e7cb-1903-4292-b48b-5b27b4271e3e
+ contactId: 216830cb-9a68-487e-928b-c1a7ccc4fc81
+ name: Remodeling 2012
+ currencyCode: AUD
+ minutesLogged: 180
+ totalTaskAmount:
+ currency: AUD
+ value: 60.0
+ totalExpenseAmount:
+ currency: AUD
+ value: 499.0
+ minutesToBeInvoiced: 180
+ taskAmountToBeInvoiced:
+ currency: AUD
+ value: 60.0
+ taskAmountInvoiced:
+ currency: AUD
+ value: 0.0
+ expenseAmountToBeInvoiced:
+ currency: AUD
+ value: 499.0
+ expenseAmountInvoiced:
+ currency: AUD
+ value: 0.0
+ projectAmountInvoiced:
+ currency: AUD
+ value: 0.0
+ deposit:
+ currency: AUD
+ value: 0.0
+ depositApplied:
+ currency: AUD
+ value: 0.0
+ creditNoteAmount:
+ currency: AUD
+ value: 0.0
+ totalInvoiced:
+ currency: AUD
+ value: 0.0
+ totalToBeInvoiced:
+ currency: AUD
+ value: 559.0
+ deadlineUtc: "2020-03-03T15:00:00Z"
+ estimate:
+ currency: AUD
+ value: 99.99
+ status: INPROGRESS
+ "400":
+ $ref: '#/components/responses/400Error'
put:
- security:
- - OAuth2: [projects]
+ security:
+ - OAuth2:
+ - projects
tags:
- Project
summary: Updates a specific project
@@ -361,21 +315,17 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ProjectCreateOrUpdate'
- example:
- '{
- "name": "New Kitchen",
- "deadlineUtc": "2017-04-23T18:25:43.511Z",
- "estimateAmount": 99.99
- }'
+ example: '{ "name": "New Kitchen", "deadlineUtc": "2017-04-23T18:25:43.511Z", "estimateAmount": 99.99 }'
responses:
- '204':
+ "204":
description: Success - return response 204 no content
x-isEmpty: true
- '400':
+ "400":
$ref: '#/components/responses/400Error'
patch:
- security:
- - OAuth2: [projects]
+ security:
+ - OAuth2:
+ - projects
tags:
- Project
summary: creates a project for the specified contact
@@ -398,22 +348,21 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ProjectPatch'
- example:
- '{
- "status": "INPROGRESS"
- }'
+ example: '{ "status": "INPROGRESS" }'
responses:
- '204':
+ "204":
description: Success - return response 204 no content
x-isEmpty: true
- '400':
+ "400":
$ref: '#/components/responses/400Error'
/ProjectsUsers:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [projects, projects.read]
+ - OAuth2:
+ - projects
+ - projects.read
tags:
- Project
summary: Retrieves a list of all project users
@@ -424,7 +373,7 @@ paths:
in: query
required: false
description: set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
- schema:
+ schema:
type: integer
example: 1
default: 1
@@ -433,47 +382,42 @@ paths:
in: query
required: false
description: Optional, it is set to 50 by default. The number of items to return per page in a paged response - Must be a number between 1 and 500.
- schema:
+ schema:
type: integer
minimum: 1
maximum: 500
default: 50
example: 100
responses:
- '200':
+ "200":
description: OK/success, returns a list of project users
content:
application/json:
schema:
$ref: '#/components/schemas/ProjectUsers'
- example: {
- "pagination": {
- "page": 1,
- "pageSize": 50,
- "pageCount": 1,
- "itemCount": 2
- },
- "items":[
- {
- "userId": "740add2a-a703-4b8a-a670-1093919c2040",
- "name": "Test User",
- "email": "test@xero.com"
- },
- {
- "userId": "00000000-0000-0000-0000-000000000000",
- "name": "API Team",
- "email": "api@xero.com"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
+ example:
+ pagination:
+ page: 1
+ pageSize: 50
+ pageCount: 1
+ itemCount: 2
+ items:
+ - userId: 740add2a-a703-4b8a-a670-1093919c2040
+ name: Test User
+ email: test@xero.com
+ - userId: 00000000-0000-0000-0000-000000000000
+ name: API Team
+ email: api@xero.com
+ "400":
+ $ref: '#/components/responses/400Error'
/Projects/{projectId}/Tasks:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [projects, projects.read]
+ - OAuth2:
+ - projects
+ - projects.read
tags:
- Project
summary: Retrieves all project tasks
@@ -490,7 +434,7 @@ paths:
format: uuid
- name: page
in: query
- description: Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
+ description: Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
schema:
type: integer
example: 1
@@ -504,62 +448,54 @@ paths:
- name: taskIds
x-snake: task_ids
in: query
- description: "Search for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskID},{taskID}"
+ description: Search for all tasks that match a comma separated list of taskIds, i.e. GET https://.../tasks?taskIds={taskID},{taskID}
schema:
type: string
- name: chargeType
- $ref: '#/components/parameters/chargeType'
+ $ref: '#/components/parameters/chargeType'
responses:
- '200':
+ "200":
description: OK/success, returns a list of task objects
content:
application/json:
schema:
$ref: '#/components/schemas/Tasks'
- example: {
- "pagination": {
- "page": 1,
- "pageSize": 50,
- "pageCount": 1,
- "itemCount": 1
- },
- "items": [
- {
- "name": "Demolition",
- "rate": {
- "currency": "AUD",
- "value": 20.0
- },
- "chargeType": "TIME",
- "status": "ACTIVE",
- "estimateMinutes": 12000,
- "taskId": "7be77337-feec-4458-bb1b-dbaa5a4aafce",
- "projectId": "b021e7cb-1903-4292-b48b-5b27b4271e3e",
- "totalMinutes": 180,
- "totalAmount": {
- "currency": "AUD",
- "value": 60.0
- },
- "minutesToBeInvoiced": 180,
- "minutesInvoiced": 0,
- "nonChargeableMinutes": 0,
- "fixedMinutes": 0,
- "amountToBeInvoiced": {
- "currency": "AUD",
- "value": 60.0
- },
- "amountInvoiced": {
- "currency": "AUD",
- "value": 0.0
- }
- }
- ]
- }
- '400':
+ example:
+ pagination:
+ page: 1
+ pageSize: 50
+ pageCount: 1
+ itemCount: 1
+ items:
+ - name: Demolition
+ rate:
+ currency: AUD
+ value: 20.0
+ chargeType: TIME
+ status: ACTIVE
+ estimateMinutes: 12000
+ taskId: 7be77337-feec-4458-bb1b-dbaa5a4aafce
+ projectId: b021e7cb-1903-4292-b48b-5b27b4271e3e
+ totalMinutes: 180
+ totalAmount:
+ currency: AUD
+ value: 60.0
+ minutesToBeInvoiced: 180
+ minutesInvoiced: 0
+ nonChargeableMinutes: 0
+ fixedMinutes: 0
+ amountToBeInvoiced:
+ currency: AUD
+ value: 60.0
+ amountInvoiced:
+ currency: AUD
+ value: 0.0
+ "400":
$ref: '#/components/responses/400Error'
post:
security:
- - OAuth2: [projects]
+ - OAuth2:
+ - projects
tags:
- Project
summary: Allows you to create a task
@@ -582,54 +518,48 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TaskCreateOrUpdate'
- example:
- '{
- "status": "INPROGRESS"
- }'
+ example: '{ "status": "INPROGRESS" }'
responses:
- '201':
+ "201":
description: OK/success, returns the new task object
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
- example: {
- "name": "Demolition",
- "rate": {
- "currency": "AUD",
- "value": 20
- },
- "chargeType": "TIME",
- "status": "ACTIVE",
- "estimateMinutes": 12000,
- "taskId": "00000000-0000-0000-0000-000000000000",
- "projectId": "00000000-0000-0000-0000-000000000000",
- "totalMinutes": 300,
- "totalAmount": {
- "currency": "AUD",
- "value": 100
- },
- "minutesToBeInvoiced": 300,
- "minutesInvoiced": 0,
- "nonChargeableMinutes": 0,
- "fixedMinutes": 0,
- "amountToBeInvoiced": {
- "currency": "AUD",
- "value": 100
- },
- "amountInvoiced": {
- "currency": "AUD",
- "value": 0
- }
- }
- '400':
+ example:
+ name: Demolition
+ rate:
+ currency: AUD
+ value: 20
+ chargeType: TIME
+ status: ACTIVE
+ estimateMinutes: 12000
+ taskId: 00000000-0000-0000-0000-000000000000
+ projectId: 00000000-0000-0000-0000-000000000000
+ totalMinutes: 300
+ totalAmount:
+ currency: AUD
+ value: 100
+ minutesToBeInvoiced: 300
+ minutesInvoiced: 0
+ nonChargeableMinutes: 0
+ fixedMinutes: 0
+ amountToBeInvoiced:
+ currency: AUD
+ value: 100
+ amountInvoiced:
+ currency: AUD
+ value: 0
+ "400":
$ref: '#/components/responses/400Error'
/Projects/{projectId}/Tasks/{taskId}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [projects, projects.read]
+ - OAuth2:
+ - projects
+ - projects.read
tags:
- Project
summary: Retrieves a single project task
@@ -648,51 +578,47 @@ paths:
x-snake: task_id
in: path
required: true
- description: "You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskID}"
+ description: You can specify an individual task by appending the taskId to the endpoint, i.e. GET https://.../tasks/{taskID}
schema:
type: string
format: uuid
responses:
- '200':
+ "200":
description: OK/success, returns the specified task object
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
- example: {
- "name": "Demolition",
- "rate": {
- "currency": "AUD",
- "value": 20
- },
- "chargeType": "TIME",
- "status": "ACTIVE",
- "estimateMinutes": 12000,
- "taskId": "7be77337-feec-4458-bb1b-dbaa5a4aafce",
- "projectId": "b021e7cb-1903-4292-b48b-5b27b4271e3e",
- "totalMinutes": 300,
- "totalAmount": {
- "currency": "AUD",
- "value": 100
- },
- "minutesToBeInvoiced": 300,
- "minutesInvoiced": 0,
- "nonChargeableMinutes": 0,
- "fixedMinutes": 0,
- "amountToBeInvoiced": {
- "currency": "AUD",
- "value": 100
- },
- "amountInvoiced": {
- "currency": "AUD",
- "value": 0
- }
- }
- '400':
+ example:
+ name: Demolition
+ rate:
+ currency: AUD
+ value: 20
+ chargeType: TIME
+ status: ACTIVE
+ estimateMinutes: 12000
+ taskId: 7be77337-feec-4458-bb1b-dbaa5a4aafce
+ projectId: b021e7cb-1903-4292-b48b-5b27b4271e3e
+ totalMinutes: 300
+ totalAmount:
+ currency: AUD
+ value: 100
+ minutesToBeInvoiced: 300
+ minutesInvoiced: 0
+ nonChargeableMinutes: 0
+ fixedMinutes: 0
+ amountToBeInvoiced:
+ currency: AUD
+ value: 100
+ amountInvoiced:
+ currency: AUD
+ value: 0
+ "400":
$ref: '#/components/responses/400Error'
put:
security:
- - OAuth2: [projects]
+ - OAuth2:
+ - projects
tags:
- Project
summary: Allows you to update a task
@@ -723,16 +649,17 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TaskCreateOrUpdate'
- example: ''
+ example: ""
responses:
- '204':
+ "204":
description: OK/Success - return response 204 no content
x-isEmpty: true
- '400':
+ "400":
$ref: '#/components/responses/400Error'
delete:
security:
- - OAuth2: [projects]
+ - OAuth2:
+ - projects
tags:
- Project
summary: Allows you to delete a task
@@ -756,17 +683,19 @@ paths:
type: string
format: uuid
responses:
- '204':
+ "204":
description: Success - return response 204 no content
x-isEmpty: true
- '400':
+ "400":
$ref: '#/components/responses/400Error'
/Projects/{projectId}/Time:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [projects, projects.read]
+ - OAuth2:
+ - projects
+ - projects.read
tags:
- Project
summary: Retrieves all time entries associated with a specific project
@@ -811,7 +740,7 @@ paths:
format: uuid
- name: page
in: query
- description: Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
+ description: Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
schema:
type: integer
example: 1
@@ -824,75 +753,69 @@ paths:
example: 10
- name: states
in: query
- description: "Comma-separated list of states to find. Will find all time entries that are in the status of whatever is specified. "
- schema:
+ description: "Comma-separated list of states to find. Will find all time entries that are in the status of whatever is specified."
+ schema:
type: array
items:
type: string
- name: isChargeable
x-snake: is_chargeable
in: query
- description: "Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`."
+ description: Finds all time entries which relate to tasks with the charge type `TIME` or `FIXED`.
schema:
type: boolean
- name: dateAfterUtc
x-snake: date_after_utc
in: query
- description: "ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field."
+ description: ISO 8601 UTC date. Finds all time entries on or after this date filtered on the `dateUtc` field.
schema:
type: string
format: date-time
- name: dateBeforeUtc
x-snake: date_before_utc
in: query
- description: "ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field."
+ description: ISO 8601 UTC date. Finds all time entries on or before this date filtered on the `dateUtc` field.
schema:
type: string
format: date-time
responses:
- '200':
+ "200":
description: OK/success, returns a list of time entry objects
content:
application/json:
schema:
$ref: '#/components/schemas/TimeEntries'
- example: {
- "pagination": {
- "page": 1,
- "pageSize": 50,
- "pageCount": 1,
- "itemCount": 9
- },
- "items":[
- {
- "timeEntryId": "3cd35eca-704f-4bca-b258-236028ae8ed1",
- "userId": "740add2a-a703-4b8a-a670-1093919c2040",
- "projectId": "b021e7cb-1903-4292-b48b-5b27b4271e3e",
- "taskId": "7be77337-feec-4458-bb1b-dbaa5a4aafce",
- "dateUtc": "2020-02-27T15:00:00Z",
- "dateEnteredUtc": "2020-02-28T03:24:29.2215641Z",
- "duration":45,
- "description": "My description",
- "status": "ACTIVE"
- },
- {
- "timeEntryId": "00000000-0000-0000-0000-000000000000",
- "userId": "00000000-0000-0000-0000-000000000000",
- "projectId": "00000000-0000-0000-0000-000000000000",
- "taskId": "00000000-0000-0000-0000-000000000000",
- "dateUtc": "2020-02-26T15:00:00Z",
- "dateEnteredUtc": "2020-02-28T03:24:29.2215641Z",
- "duration":30,
- "description": "My description",
- "status": "ACTIVE"
- }
- ]
- }
- '400':
+ example:
+ pagination:
+ page: 1
+ pageSize: 50
+ pageCount: 1
+ itemCount: 9
+ items:
+ - timeEntryId: 3cd35eca-704f-4bca-b258-236028ae8ed1
+ userId: 740add2a-a703-4b8a-a670-1093919c2040
+ projectId: b021e7cb-1903-4292-b48b-5b27b4271e3e
+ taskId: 7be77337-feec-4458-bb1b-dbaa5a4aafce
+ dateUtc: "2020-02-27T15:00:00Z"
+ dateEnteredUtc: "2020-02-28T03:24:29.2215641Z"
+ duration: 45
+ description: My description
+ status: ACTIVE
+ - timeEntryId: 00000000-0000-0000-0000-000000000000
+ userId: 00000000-0000-0000-0000-000000000000
+ projectId: 00000000-0000-0000-0000-000000000000
+ taskId: 00000000-0000-0000-0000-000000000000
+ dateUtc: "2020-02-26T15:00:00Z"
+ dateEnteredUtc: "2020-02-28T03:24:29.2215641Z"
+ duration: 30
+ description: My description
+ status: ACTIVE
+ "400":
$ref: '#/components/responses/400Error'
post:
security:
- - OAuth2: [projects]
+ - OAuth2:
+ - projects
tags:
- Project
summary: Creates a time entry for a specific project
@@ -915,39 +838,39 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TimeEntryCreateOrUpdate'
- example: {
- "userId": "00000000-0000-0000-0000-000000000000",
- "taskId": "00000000-0000-0000-0000-000000000000",
- "dateUtc": "2020-02-26T15:00:00Z",
- "duration":30,
- "description": "My description"
- }
+ example:
+ userId: 00000000-0000-0000-0000-000000000000
+ taskId: 00000000-0000-0000-0000-000000000000
+ dateUtc: "2020-02-26T15:00:00Z"
+ duration: 30
+ description: My description
responses:
- '200':
+ "200":
description: OK/success, returns the newly created time entry
content:
application/json:
schema:
$ref: '#/components/schemas/TimeEntry'
- example: {
- "timeEntryId": "c6539534-f1d2-43a6-80df-3bd1f8aca24d",
- "userId": "c6539534-f1d2-43a6-80df-3bd1f8aca24d",
- "projectId": "b021e7cb-1903-4292-b48b-5b27b4271e3e",
- "taskId": "7be77337-feec-4458-bb1b-dbaa5a4aafce",
- "dateUtc": "2020-02-26T15:00:00Z",
- "dateEnteredUtc": "2020-02-28T20:37:42.8652832Z",
- "duration":30,
- "description": "My description",
- "status": "ACTIVE"
- }
- '400':
+ example:
+ timeEntryId: c6539534-f1d2-43a6-80df-3bd1f8aca24d
+ userId: c6539534-f1d2-43a6-80df-3bd1f8aca24d
+ projectId: b021e7cb-1903-4292-b48b-5b27b4271e3e
+ taskId: 7be77337-feec-4458-bb1b-dbaa5a4aafce
+ dateUtc: "2020-02-26T15:00:00Z"
+ dateEnteredUtc: "2020-02-28T20:37:42.8652832Z"
+ duration: 30
+ description: My description
+ status: ACTIVE
+ "400":
$ref: '#/components/responses/400Error'
/Projects/{projectId}/Time/{timeEntryId}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [projects, projects.read]
+ - OAuth2:
+ - projects
+ - projects.read
tags:
- Project
summary: Retrieves a single time entry for a specific project
@@ -971,28 +894,28 @@ paths:
type: string
format: uuid
responses:
- '200':
- description: OK/success, returns the specified time entry
+ "200":
+ description: OK/success, returns the specified time entry
content:
application/json:
schema:
$ref: '#/components/schemas/TimeEntry'
- example: {
- "timeEntryId": "3cd35eca-704f-4bca-b258-236028ae8ed1",
- "userId": "740add2a-a703-4b8a-a670-1093919c2040",
- "projectId": "b021e7cb-1903-4292-b48b-5b27b4271e3e",
- "taskId": "7be77337-feec-4458-bb1b-dbaa5a4aafce",
- "dateUtc": "2020-02-27T15:00:00Z",
- "dateEnteredUtc": "2020-02-21T21:41:22.2642727Z",
- "duration":45,
- "description": "My description",
- "status": "ACTIVE"
- }
- '400':
+ example:
+ timeEntryId: 3cd35eca-704f-4bca-b258-236028ae8ed1
+ userId: 740add2a-a703-4b8a-a670-1093919c2040
+ projectId: b021e7cb-1903-4292-b48b-5b27b4271e3e
+ taskId: 7be77337-feec-4458-bb1b-dbaa5a4aafce
+ dateUtc: "2020-02-27T15:00:00Z"
+ dateEnteredUtc: "2020-02-21T21:41:22.2642727Z"
+ duration: 45
+ description: My description
+ status: ACTIVE
+ "400":
$ref: '#/components/responses/400Error'
put:
security:
- - OAuth2: [projects]
+ - OAuth2:
+ - projects
tags:
- Project
summary: Updates a time entry for a specific project
@@ -1023,22 +946,22 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/TimeEntryCreateOrUpdate'
- example: {
- "userId": "00000000-0000-0000-0000-000000000000",
- "taskId": "00000000-0000-0000-0000-000000000000",
- "dateUtc": "2020-02-27T15:00:00Z",
- "duration":45,
- "description": "My UPDATED description"
- }
+ example:
+ userId: 00000000-0000-0000-0000-000000000000
+ taskId: 00000000-0000-0000-0000-000000000000
+ dateUtc: "2020-02-27T15:00:00Z"
+ duration: 45
+ description: My UPDATED description
responses:
- '204':
+ "204":
description: Success - return response 204 no content
x-isEmpty: true
- '400':
+ "400":
$ref: '#/components/responses/400Error'
delete:
security:
- - OAuth2: [projects]
+ - OAuth2:
+ - projects
tags:
- Project
summary: Deletes a time entry for a specific project
@@ -1062,20 +985,20 @@ paths:
type: string
format: uuid
responses:
- '204':
+ "204":
description: Success - return response 204 no content
x-isEmpty: true
- '400':
+ "400":
$ref: '#/components/responses/400Error'
components:
securitySchemes:
OAuth2:
type: oauth2
description: For more information
- flows:
+ flows:
authorizationCode:
- authorizationUrl: 'https://login.xero.com/identity/connect/authorize'
- tokenUrl: 'https://identity.xero.com/connect/token'
+ authorizationUrl: https://login.xero.com/identity/connect/authorize
+ tokenUrl: https://identity.xero.com/connect/token
scopes:
email: Grant read-only access to your email
openid: Grant read-only access to your open id
@@ -1083,32 +1006,32 @@ components:
projects: Grant read-write access to projects
projects.read: Grant read-only access to projects
parameters:
- requiredHeader:
+ requiredHeader:
in: header
name: Xero-Tenant-Id
x-snake: xero_tenant_id
description: Xero identifier for Tenant
schema:
type: string
- required: true
+ required: true
chargeType:
in: query
name: chargeType
x-snake: charge_type
- schema:
+ schema:
$ref: '#/components/schemas/ChargeType'
idempotencyKey:
in: header
name: Idempotency-Key
x-snake: idempotency_key
description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
- example: "KEY_VALUE"
+ example: KEY_VALUE
schema:
type: string
schemas:
- Projects:
+ Projects:
externalDocs:
- url: 'https://developer.xero.com/documentation/projects/projects'
+ url: https://developer.xero.com/documentation/projects/projects
type: object
properties:
pagination:
@@ -1119,19 +1042,19 @@ components:
$ref: '#/components/schemas/Project'
ProjectCreateOrUpdate:
externalDocs:
- url: 'https://developer.xero.com/documentation/projects/projects'
+ url: https://developer.xero.com/documentation/projects/projects
type: object
properties:
contactId:
externalDocs:
- url: 'https://developer.xero.com/documentation/api/contacts'
+ url: https://developer.xero.com/documentation/api/contacts
type: string
format: uuid
- example: '01234567-89ab-cdef-0123-456789abcdef'
+ example: 01234567-89ab-cdef-0123-456789abcdef
description: Identifier of the contact this project was created for.
- name:
+ name:
type: string
- example: 'New Kitchen'
+ example: New Kitchen
description: Name of the project.
estimateAmount:
type: number
@@ -1141,15 +1064,15 @@ components:
deadlineUtc:
type: string
format: date-time
- example: '2019-12-10T12:59:59Z'
+ example: "2019-12-10T12:59:59Z"
description: Deadline for the project. UTC Date Time in ISO-8601 format.
required:
- name
ProjectPatch:
externalDocs:
- url: 'https://developer.xero.com/documentation/projects/projects'
+ url: https://developer.xero.com/documentation/projects/projects
type: object
- properties:
+ properties:
status:
$ref: '#/components/schemas/ProjectStatus'
type: string
@@ -1157,24 +1080,24 @@ components:
- status
Project:
externalDocs:
- url: 'https://developer.xero.com/documentation/projects/projects'
+ url: https://developer.xero.com/documentation/projects/projects
type: object
properties:
projectId:
type: string
format: uuid
- example: '254553fa-2be8-4991-bd5e-70a97ea12ef8'
+ example: 254553fa-2be8-4991-bd5e-70a97ea12ef8
description: Identifier of the project.
contactId:
externalDocs:
- url: 'https://developer.xero.com/documentation/api/contacts'
+ url: https://developer.xero.com/documentation/api/contacts
type: string
format: uuid
- example: '01234567-89ab-cdef-0123-456789abcdef'
+ example: 01234567-89ab-cdef-0123-456789abcdef
description: Identifier of the contact this project was created for.
- name:
+ name:
type: string
- example: 'New Kitchen'
+ example: New Kitchen
description: Name of the project.
currencyCode:
$ref: '#/components/schemas/CurrencyCode'
@@ -1212,7 +1135,7 @@ components:
deadlineUtc:
type: string
format: date-time
- example: '2019-12-10T12:59:59Z'
+ example: "2019-12-10T12:59:59Z"
description: Deadline for the project. UTC Date Time in ISO-8601 format.
totalInvoiced:
$ref: '#/components/schemas/Amount'
@@ -1224,13 +1147,13 @@ components:
type: string
$ref: '#/components/schemas/ProjectStatus'
required:
- - name
+ - name
Pagination:
properties:
page:
type: integer
example: 1
- description: Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
+ description: Set to 1 by default. The requested number of the page in paged response - Must be a number greater than 0.
pageSize:
type: integer
example: 10
@@ -1243,9 +1166,9 @@ components:
type: integer
example: 2
description: Number of items returned
- ProjectUsers:
+ ProjectUsers:
externalDocs:
- url: 'https://developer.xero.com/documentation/projects/users'
+ url: https://developer.xero.com/documentation/projects/users
type: object
properties:
pagination:
@@ -1256,211 +1179,211 @@ components:
$ref: '#/components/schemas/ProjectUser'
ProjectUser:
externalDocs:
- url: 'https://developer.xero.com/documentation/projects/users'
+ url: https://developer.xero.com/documentation/projects/users
type: object
properties:
userId:
type: string
format: uuid
- example: '254553fa-2be8-4991-bd5e-70a97ea12ef8'
+ example: 254553fa-2be8-4991-bd5e-70a97ea12ef8
description: Identifier of the user of the project.
- name:
+ name:
type: string
- example: 'Sidney Allen'
+ example: Sidney Allen
description: Full name of the user.
- email:
+ email:
type: string
- example: 'sidneyallen@xero.com'
+ example: sidneyallen@xero.com
description: Email address of the user.
Amount:
type: object
properties:
- currency:
- $ref: '#/components/schemas/CurrencyCode'
- type: string
- value:
- type: number
- format: double
- x-is-money: true
- example: 1.00
+ currency:
+ $ref: '#/components/schemas/CurrencyCode'
+ type: string
+ value:
+ type: number
+ format: double
+ x-is-money: true
+ example: 1.00
ProjectStatus:
description: Status for project
- example: "INPROGRESS"
+ example: INPROGRESS
type: string
- enum:
- - INPROGRESS
- - CLOSED
+ enum:
+ - INPROGRESS
+ - CLOSED
CurrencyCode:
description: 3 letter alpha code for the ISO-4217 currency code, e.g. USD, AUD.
- example: "AUD"
+ example: AUD
type: string
enum:
- - AED
- - AFN
- - ALL
- - AMD
- - ANG
- - AOA
- - ARS
- - AUD
- - AWG
- - AZN
- - BAM
- - BBD
- - BDT
- - BGN
- - BHD
- - BIF
- - BMD
- - BND
- - BOB
- - BRL
- - BSD
- - BTN
- - BWP
- - BYN
- - BZD
- - CAD
- - CDF
- - CHF
- - CLP
- - CNY
- - COP
- - CRC
- - CUC
- - CUP
- - CVE
- - CZK
- - DJF
- - DKK
- - DOP
- - DZD
- - EGP
- - ERN
- - ETB
- - EUR
- - FJD
- - FKP
- - GBP
- - GEL
- - GGP
- - GHS
- - GIP
- - GMD
- - GNF
- - GTQ
- - GYD
- - HKD
- - HNL
- - HRK
- - HTG
- - HUF
- - IDR
- - ILS
- - IMP
- - INR
- - IQD
- - IRR
- - ISK
- - JEP
- - JMD
- - JOD
- - JPY
- - KES
- - KGS
- - KHR
- - KMF
- - KPW
- - KRW
- - KWD
- - KYD
- - KZT
- - LAK
- - LBP
- - LKR
- - LRD
- - LSL
- - LYD
- - MAD
- - MDL
- - MGA
- - MKD
- - MMK
- - MNT
- - MOP
- - MRU
- - MUR
- - MVR
- - MWK
- - MXN
- - MYR
- - MZN
- - NAD
- - NGN
- - NIO
- - NOK
- - NPR
- - NZD
- - OMR
- - PAB
- - PEN
- - PGK
- - PHP
- - PKR
- - PLN
- - PYG
- - QAR
- - RON
- - RSD
- - RUB
- - RWF
- - SAR
- - SBD
- - SCR
- - SDG
- - SEK
- - SGD
- - SHP
- - SLL
- - SOS
- - SPL
- - SRD
- - STN
- - SVC
- - SYP
- - SZL
- - THB
- - TJS
- - TMT
- - TND
- - TOP
- - TRY
- - TTD
- - TVD
- - TWD
- - TZS
- - UAH
- - UGX
- - USD
- - UYU
- - UZS
- - VEF
- - VND
- - VUV
- - WST
- - XAF
- - XCD
- - XDR
- - XOF
- - XPF
- - YER
- - ZAR
- - ZMW
- - ZMK
- - ZWD
+ - AED
+ - AFN
+ - ALL
+ - AMD
+ - ANG
+ - AOA
+ - ARS
+ - AUD
+ - AWG
+ - AZN
+ - BAM
+ - BBD
+ - BDT
+ - BGN
+ - BHD
+ - BIF
+ - BMD
+ - BND
+ - BOB
+ - BRL
+ - BSD
+ - BTN
+ - BWP
+ - BYN
+ - BZD
+ - CAD
+ - CDF
+ - CHF
+ - CLP
+ - CNY
+ - COP
+ - CRC
+ - CUC
+ - CUP
+ - CVE
+ - CZK
+ - DJF
+ - DKK
+ - DOP
+ - DZD
+ - EGP
+ - ERN
+ - ETB
+ - EUR
+ - FJD
+ - FKP
+ - GBP
+ - GEL
+ - GGP
+ - GHS
+ - GIP
+ - GMD
+ - GNF
+ - GTQ
+ - GYD
+ - HKD
+ - HNL
+ - HRK
+ - HTG
+ - HUF
+ - IDR
+ - ILS
+ - IMP
+ - INR
+ - IQD
+ - IRR
+ - ISK
+ - JEP
+ - JMD
+ - JOD
+ - JPY
+ - KES
+ - KGS
+ - KHR
+ - KMF
+ - KPW
+ - KRW
+ - KWD
+ - KYD
+ - KZT
+ - LAK
+ - LBP
+ - LKR
+ - LRD
+ - LSL
+ - LYD
+ - MAD
+ - MDL
+ - MGA
+ - MKD
+ - MMK
+ - MNT
+ - MOP
+ - MRU
+ - MUR
+ - MVR
+ - MWK
+ - MXN
+ - MYR
+ - MZN
+ - NAD
+ - NGN
+ - NIO
+ - NOK
+ - NPR
+ - NZD
+ - OMR
+ - PAB
+ - PEN
+ - PGK
+ - PHP
+ - PKR
+ - PLN
+ - PYG
+ - QAR
+ - RON
+ - RSD
+ - RUB
+ - RWF
+ - SAR
+ - SBD
+ - SCR
+ - SDG
+ - SEK
+ - SGD
+ - SHP
+ - SLL
+ - SOS
+ - SPL
+ - SRD
+ - STN
+ - SVC
+ - SYP
+ - SZL
+ - THB
+ - TJS
+ - TMT
+ - TND
+ - TOP
+ - TRY
+ - TTD
+ - TVD
+ - TWD
+ - TZS
+ - UAH
+ - UGX
+ - USD
+ - UYU
+ - UZS
+ - VEF
+ - VND
+ - VUV
+ - WST
+ - XAF
+ - XCD
+ - XDR
+ - XOF
+ - XPF
+ - YER
+ - ZAR
+ - ZMW
+ - ZMK
+ - ZWD
Error:
externalDocs:
- url: 'https://developer.xero.com/documentation/projects/projects-response-codes'
+ url: https://developer.xero.com/documentation/projects/projects-response-codes
type: object
properties:
message:
@@ -1469,9 +1392,9 @@ components:
modelState:
type: object
description: Array of Elements of validation Errors
- Tasks:
+ Tasks:
externalDocs:
- url: 'https://developer.xero.com/documentation/projects/projects'
+ url: https://developer.xero.com/documentation/projects/projects
type: object
properties:
pagination:
@@ -1482,13 +1405,13 @@ components:
$ref: '#/components/schemas/Task'
Task:
externalDocs:
- url: 'https://developer.xero.com/documentation/projects/projects'
+ url: https://developer.xero.com/documentation/projects/projects
type: object
properties:
taskId:
type: string
format: uuid
- example: '00000000-0000-0000-000-000000000000'
+ example: 00000000-0000-0000-000-000000000000
description: Identifier of the task.
name:
type: string
@@ -1505,7 +1428,7 @@ components:
projectId:
type: string
format: uuid
- example: '00000000-0000-0000-000-000000000000'
+ example: 00000000-0000-0000-000-000000000000
description: Identifier of the project task belongs to.
totalMinutes:
type: integer
@@ -1539,7 +1462,7 @@ components:
- LOCKED
description: Status of the task. When a task of ChargeType is `FIXED` and the rate amount is invoiced the status will be set to `INVOICED` and can't be modified. A task with ChargeType of `TIME` or `NON_CHARGEABLE` cannot have a status of `INVOICED`. A `LOCKED` state indicates that the task is currently changing state (for example being invoiced) and can't be modified.
ChargeType:
- description: "Can be `TIME`, `FIXED` or `NON_CHARGEABLE`, defines how the task will be charged. Use `TIME` when you want to charge per hour and `FIXED` to charge as a fixed amount. If the task will not be charged use `NON_CHARGEABLE`."
+ description: Can be `TIME`, `FIXED` or `NON_CHARGEABLE`, defines how the task will be charged. Use `TIME` when you want to charge per hour and `FIXED` to charge as a fixed amount. If the task will not be charged use `NON_CHARGEABLE`.
type: string
enum:
- TIME
@@ -1547,14 +1470,14 @@ components:
- NON_CHARGEABLE
TaskCreateOrUpdate:
externalDocs:
- url: 'https://developer.xero.com/documentation/projects/projects'
+ url: https://developer.xero.com/documentation/projects/projects
type: object
properties:
name:
type: string
- description: "Name of the task. Max length 100 characters."
+ description: Name of the task. Max length 100 characters.
maximum: 100
- rate:
+ rate:
$ref: '#/components/schemas/Amount'
type: number
chargeType:
@@ -1569,7 +1492,7 @@ components:
- chargeType
TimeEntries:
externalDocs:
- url: 'https://developer.xero.com/documentation/projects/time'
+ url: https://developer.xero.com/documentation/projects/time
type: object
properties:
pagination:
@@ -1580,28 +1503,28 @@ components:
$ref: '#/components/schemas/TimeEntry'
TimeEntry:
externalDocs:
- url: 'https://developer.xero.com/documentation/projects/time'
+ url: https://developer.xero.com/documentation/projects/time
type: object
properties:
timeEntryId:
type: string
format: uuid
- example: '00000000-0000-0000-000-000000000000'
+ example: 00000000-0000-0000-000-000000000000
description: Identifier of the time entry.
userId:
type: string
format: uuid
- example: '00000000-0000-0000-000-000000000000'
+ example: 00000000-0000-0000-000-000000000000
description: The xero user identifier of the person who logged time.
projectId:
type: string
format: uuid
- example: '00000000-0000-0000-000-000000000000'
+ example: 00000000-0000-0000-000-000000000000
description: Identifier of the project, that the task (which the time entry is logged against) belongs to.
taskId:
type: string
format: uuid
- example: '00000000-0000-0000-000-000000000000'
+ example: 00000000-0000-0000-000-000000000000
description: Identifier of the task that time entry is logged against.
dateUtc:
type: string
@@ -1623,32 +1546,32 @@ components:
- ACTIVE
- LOCKED
- INVOICED
- description: "Status of the time entry. By default a time entry is created with status of `ACTIVE`. A `LOCKED` state indicates that the time entry is currently changing state (for example being invoiced). Updates are not allowed when in this state. It will have a status of INVOICED once it is invoiced."
+ description: Status of the time entry. By default a time entry is created with status of `ACTIVE`. A `LOCKED` state indicates that the time entry is currently changing state (for example being invoiced). Updates are not allowed when in this state. It will have a status of INVOICED once it is invoiced.
TimeEntryCreateOrUpdate:
externalDocs:
- url: 'https://developer.xero.com/documentation/projects/time'
+ url: https://developer.xero.com/documentation/projects/time
type: object
properties:
userId:
type: string
format: uuid
- example: '00000000-0000-0000-000-000000000000'
- description: "The xero user identifier of the person logging the time."
+ example: 00000000-0000-0000-000-000000000000
+ description: The xero user identifier of the person logging the time.
taskId:
type: string
format: uuid
- example: '00000000-0000-0000-000-000000000000'
- description: "Identifier of the task that time entry is logged against."
+ example: 00000000-0000-0000-000-000000000000
+ description: Identifier of the task that time entry is logged against.
dateUtc:
type: string
format: date-time
- description: "Date time entry is logged on. UTC Date Time in ISO-8601 format."
+ description: Date time entry is logged on. UTC Date Time in ISO-8601 format.
duration:
type: integer
- description: "Number of minutes to be logged. Duration is between 1 and 59940 inclusively."
+ description: Number of minutes to be logged. Duration is between 1 and 59940 inclusively.
description:
type: string
- description: "An optional description of the time entry, will be set to null if not provided during update."
+ description: An optional description of the time entry, will be set to null if not provided during update.
required:
- userId
- taskId
@@ -1660,4 +1583,4 @@ components:
content:
application/json:
schema:
- $ref: '#/components/schemas/Error'
\ No newline at end of file
+ $ref: '#/components/schemas/Error'
diff --git a/xero_accounting.yaml b/xero_accounting.yaml
index 44942ebc..e4bf0f7d 100644
--- a/xero_accounting.yaml
+++ b/xero_accounting.yaml
@@ -1,29163 +1,25375 @@
-openapi: 3.0.0
-info:
- title: Xero Accounting API
- version: "6.3.0"
- termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
- contact:
- name: "Xero Platform Team"
- email: "api@xero.com"
- url: "https://developer.xero.com"
-servers:
- - description: The Xero Accounting API exposes accounting and related functions of the main Xero application and can be used for a variety of purposes such as creating transactions like invoices and credit notes, right through to extracting accounting data via our reports endpoint.
- url: https://api.xero.com/api.xro/2.0
-paths:
- /Accounts:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- type: string
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getAccounts
- summary: Retrieves the full chart of accounts
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="ACTIVE" AND Type=="BANK"
- x-example-csharp: Status==\"ACTIVE\"
- x-example-java: Status=="' + Account.StatusEnum.ACTIVE+ '"
- x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Account::STATUS_ACTIVE . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::Account::ACTIVE}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Name ASC"
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of type Accounts array with 0 to n Account
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Accounts'
- example: {
- "Accounts": [{
- "AccountID": "ebd06280-af70-4bed-97c6-7451a454ad85",
- "Code": "091",
- "Name": "Business Savings Account",
- "Type": "BANK",
- "TaxType": "NONE",
- "EnablePaymentsToAccount": false,
- "BankAccountNumber": "0209087654321050",
- "BankAccountType": "BANK",
- "CurrencyCode": "NZD"
- },{
- "AccountID": "7d05a53d-613d-4eb2-a2fc-dcb6adb80b80",
- "Code": "200",
- "Name": "Sales",
- "Type": "REVENUE",
- "TaxType": "OUTPUT2",
- "Description": "Income from any normal business activity",
- "EnablePaymentsToAccount": false
- }]
- }
- put:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: createAccount
- summary: Creates a new chart of accounts
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- x-hasAccountingValidationError: true
- x-example:
- - object:
- is_object: true
- key: account
- keyPascal: Account
- - code:
- key: code
- keyPascal: Code
- default: 123456
- object: account
- - name:
- key: name
- keyPascal: Name
- default: FooBar
- object: account
- - type:
- key: type
- keyPascal: Type
- default: EXPENSE
- nonString: true
- php: XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE
- node: AccountType.EXPENSE
- ruby: XeroRuby::Accounting::AccountType::EXPENSE
- python: AccountType.EXPENSE
- java: com.xero.models.accounting.AccountType.EXPENSE
- csharp: AccountType.EXPENSE
- object: account
- - description:
- is_last: true
- key: description
- keyPascal: Description
- default: "Hello World"
- object: account
- responses:
- '200':
- description: Success - created new Account and return response of type Accounts array with new Account
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Accounts'
- example: {
- "Id": "11814c9d-3b5e-492e-93b0-fad16bf3244f",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550793549392)/",
- "Accounts": [
- {
- "AccountID": "66b262e2-561e-423e-8937-47d558f13442",
- "Code": "123456",
- "Name": "Foobar",
- "Status": "ACTIVE",
- "Type": "EXPENSE",
- "TaxType": "INPUT",
- "Description": "Hello World",
- "Class": "EXPENSE",
- "EnablePaymentsToAccount": false,
- "ShowInExpenseClaims": false,
- "ReportingCode": "EXP",
- "ReportingCodeName": "Expense",
- "UpdatedDateUTC": "/Date(1550793549320+0000)/"
- }
- ]
- }
- '400':
- description: Validation Error - some data was incorrect returns response of type Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- example: {
- "ErrorNumber": 10,
- "Type": "ValidationException",
- "Message": "A validation exception occurred",
- "Elements": [
- {
- "AccountID": "00000000-0000-0000-0000-000000000000",
- "Code": "123456",
- "Name": "Foobar",
- "Type": "EXPENSE",
- "Description": "Hello World",
- "ValidationErrors": [
- {
- "Message": "Please enter a unique Name."
- }
- ]
- }
- ]
- }
- requestBody:
- required: true
- description: Account object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Account'
- example: {
- "Code":"123456",
- "Name":"Foobar",
- "Type":"EXPENSE",
- "Description":"Hello World"
- }
- '/Accounts/{AccountID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getAccount
- summary: Retrieves a single chart of accounts by using a unique account Id
- parameters:
- - $ref: '#/components/parameters/AccountID'
- responses:
- '200':
- description: Success - return response of type Accounts array with one Account
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Accounts'
- example: {
- "Id": "323455cc-9511-4451-a873-248d2983f38e",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550797359081)/",
- "Accounts": [
- {
- "AccountID": "99ce6032-0678-4aa0-8148-240c75fee33a",
- "Code": "123456",
- "Name": "FooBar",
- "Status": "ACTIVE",
- "Type": "EXPENSE",
- "TaxType": "INPUT",
- "Description": "Hello World",
- "Class": "EXPENSE",
- "EnablePaymentsToAccount": false,
- "ShowInExpenseClaims": false,
- "ReportingCode": "EXP",
- "ReportingCodeName": "Expense",
- "UpdatedDateUTC": "/Date(1550797359120+0000)/"
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: updateAccount
- summary: Updates a chart of accounts
- x-hasAccountingValidationError: true
- x-example:
- - account:
- is_object: true
- key: account
- keyPascal: Account
- - code:
- key: code
- keyPascal: Code
- default: 123456
- object: account
- - name:
- key: name
- keyPascal: Name
- default: BarFoo
- object: account
- - type:
- key: type
- keyPascal: Type
- default: EXPENSE
- nonString: true
- php: XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE
- node: AccountType.EXPENSE
- ruby: XeroRuby::Accounting::AccountType::EXPENSE
- python: AccountType.EXPENSE
- java: com.xero.models.accounting.AccountType.EXPENSE
- csharp: AccountType.EXPENSE
- object: account
- - description:
- key: description
- keyPascal: Description
- default: "Hello World"
- object: account
- - taxType:
- is_last: true
- key: taxType
- keyPascal: TaxType
- keySnake: tax_type
- default: NONE
- object: account
- - accounts:
- is_object: true
- key: accounts
- keyPascal: Accounts
- - accounts:
- is_last: true
- is_array_add: true
- key: accounts
- keyPascal: Accounts
- java: Accounts
- csharp: Account
- object: account
- parameters:
- - $ref: '#/components/parameters/AccountID'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - update existing Account and return response of type Accounts array with updated Account
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Accounts'
- example: {
- "Id": "9012e75c-ec08-40a9-ae15-153fc1f35c4d",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550795389340)/",
- "Accounts": [
- {
- "AccountID": "99ce6032-0678-4aa0-8148-240c75fee33a",
- "Code": "654321",
- "Name": "BarFoo",
- "Status": "ACTIVE",
- "Type": "EXPENSE",
- "TaxType": "INPUT",
- "Description": "Good Bye World",
- "Class": "EXPENSE",
- "EnablePaymentsToAccount": false,
- "ShowInExpenseClaims": false,
- "ReportingCode": "EXP",
- "ReportingCodeName": "Expense",
- "UpdatedDateUTC": "/Date(1550795389333+0000)/"
- }
- ]
- }
- '400':
- description: Validation Error - some data was incorrect returns response of type Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- example: {
- "ErrorNumber": 10,
- "Type": "ValidationException",
- "Message": "A validation exception occurred",
- "Elements": [
- {
- "AccountID": "00000000-0000-0000-0000-000000000000",
- "Code": "123456",
- "Name": "Foobar",
- "Type": "EXPENSE",
- "Description": "Hello World",
- "ValidationErrors": [
- {
- "Message": "Please enter a unique Name."
- }
- ]
- }
- ]
- }
- requestBody:
- required: true
- description: Request of type Accounts array with one Account
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Accounts'
- example: {
- "Accounts":[
- {
- "Code":"123456",
- "Name":"BarFoo",
- "AccountID":"99ce6032-0678-4aa0-8148-240c75fee33a",
- "Type":"EXPENSE",
- "Description":"GoodBye World",
- "TaxType":"INPUT",
- "EnablePaymentsToAccount":false,
- "ShowInExpenseClaims":false,
- "Class":"EXPENSE",
- "ReportingCode":"EXP",
- "ReportingCodeName":"Expense",
- "UpdatedDateUTC":"2019-02-21T16:29:47.96-08:00"
- }
- ]
- }
- delete:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: deleteAccount
- x-hasAccountingValidationError: true
- summary: Deletes a chart of accounts
- parameters:
- - $ref: '#/components/parameters/AccountID'
- responses:
- '200':
- description: Success - delete existing Account and return response of type Accounts array with deleted Account
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Accounts'
- example: {
- "Id": "76bb0543-8efe-4acc-b7f6-67dfcdec37b4",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550798217216)/",
- "Accounts": [
- {
- "AccountID": "7f3c0bec-f3e7-4073-b4d6-cc56dd027ef1",
- "Code": "123456",
- "Name": "FooBar",
- "Status": "DELETED",
- "Type": "EXPENSE",
- "TaxType": "INPUT",
- "Description": "Hello World",
- "Class": "EXPENSE",
- "EnablePaymentsToAccount": false,
- "ShowInExpenseClaims": false,
- "ReportingCode": "EXP",
- "ReportingCodeName": "Expense",
- "UpdatedDateUTC": "/Date(1550798217210+0000)/"
- }
- ]
- }
- '400':
- description: Validation Error - some data was incorrect returns response of type Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- example: {
- "ErrorNumber": 10,
- "Type": "ValidationException",
- "Message": "A validation exception occurred",
- "Elements": [
- {
- "AccountID": "00000000-0000-0000-0000-000000000000",
- "Code": "123456",
- "Name": "Foobar",
- "Type": "EXPENSE",
- "Description": "Hello World",
- "ValidationErrors": [
- {
- "Message": "Please enter a unique Name."
- }
- ]
- }
- ]
- }
- '/Accounts/{AccountID}/Attachments':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getAccountAttachments
- summary: Retrieves attachments for a specific accounts by using a unique account Id
- parameters:
- - $ref: '#/components/parameters/AccountID'
- responses:
- '200':
- description: Success - return response of type Attachments array of Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "439c1573-3cd8-4697-a9f6-81fa651ee8f3",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550852630329)/",
- "Attachments": [
- {
- "AttachmentID": "52a643be-cd5c-489f-9778-53a9fd337756",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '/Accounts/{AccountID}/Attachments/{AttachmentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getAccountAttachmentById
- summary: Retrieves a specific attachment from a specific account using a unique attachment Id
- parameters:
- - $ref: '#/components/parameters/AccountID'
- - $ref: '#/components/parameters/AttachmentID'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Account as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/Accounts/{AccountID}/Attachments/{FileName}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getAccountAttachmentByFileName
- summary: Retrieves an attachment for a specific account by filename
- parameters:
- - $ref: '#/components/parameters/AccountID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Account as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- post:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: updateAccountAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Updates attachment on a specific account by filename
- parameters:
- - $ref: '#/components/parameters/AccountID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Attachments array of Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "c8d6413a-1da2-4faa-9848-21f60443e906",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550859714477)/",
- "Attachments": [
- {
- "AttachmentID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- description: Validation Error - some data was incorrect returns response of type Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- put:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: createAccountAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Creates an attachment on a specific account
- parameters:
- - $ref: '#/components/parameters/AccountID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Attachments array of Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "724cdff5-bcd1-4c5c-977e-e864c24258e0",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550856817769)/",
- "Attachments": [
- {
- "AttachmentID": "ab95b276-9dce-4925-9077-439818ba270f",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- /BatchPayments:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- description: Batch payments allow you to bundle multiple bills or invoices into one payment transaction. This means a single payment in Xero can be reconciled with a single transaction on the bank statement making for a much simpler bank reconciliation experience.
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getBatchPayments
- summary: Retrieves either one or many batch payments for invoices
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="AUTHORISED"
- x-example-csharp: Status==\"AUTHORISED\"
- x-example-java: Status=="' + BatchPayment.StatusEnum.AUTHORISED + '"
- x-example-php: Status=="' . XeroAPI\XeroPHP\Models\Accounting\BatchPayment::STATUS_AUTHORISED . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::BatchPayment::AUTHORISED}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Date ASC"
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of type BatchPayments array of BatchPayment objects
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BatchPayments'
- example: {
- "Id": "6ab84949-4fe5-4788-a135-4d8f690d24d7",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550866184006)/",
- "BatchPayments": [
- {
- "Account": {
- "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9"
- },
- "Reference": "Hello World",
- "BatchPaymentID": "d0e9bbbf-5b8a-48b6-906a-035591fcb061",
- "DateString": "2017-11-28T00:00:00",
- "Date": "/Date(1511827200000+0000)/",
- "Payments": [
- {
- "Invoice": {
- "InvoiceID": "0975dec2-0cf6-498d-9c9f-c6775b45c61d",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": []
- },
- "PaymentID": "97ec2ef8-f4d6-4de5-9f2a-385d41cdc2fc",
- "Amount": 200.00
- },
- {
- "Invoice": {
- "InvoiceID": "600982d9-6605-4e11-afa1-d8dec2be7b52",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": []
- },
- "PaymentID": "e232795f-b919-4865-a754-12f6ae8402c0",
- "Amount": 200.00
- },
- {
- "Invoice": {
- "InvoiceID": "99a2bd54-4ab1-413c-90bb-57f6464fe5d6",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": []
- },
- "PaymentID": "c2d571a5-38ff-4d37-9d43-dfadb4ad53ff",
- "Amount": 200.00
- },
- {
- "Invoice": {
- "InvoiceID": "c81942c8-bfc5-4c88-a21a-b892a4a8c1c5",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": []
- },
- "PaymentID": "0f3c18dc-49bd-47a4-a875-03c84a29978f",
- "Amount": 200.00
- },
- {
- "Invoice": {
- "InvoiceID": "6c9a1d89-8319-42f6-87d6-7690e748af85",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": []
- },
- "PaymentID": "43541eed-f3ac-44ac-88cb-9fe1cb7ed8b8",
- "Amount": 200.00
- }
- ],
- "Type": "RECBATCH",
- "Status": "AUTHORISED",
- "TotalAmount": 1000.00,
- "UpdatedDateUTC": "/Date(1511893792820+0000)/",
- "IsReconciled": false
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createBatchPayment
- summary: Creates one or many batch payments for invoices
- x-hasAccountingValidationError: true
- x-example:
- - currDate:
- is_date: true
- key: currDate
- keyPascal: CurrDate
- keySnake: curr_date
- java_datatype: LocalDate
- default: "LocalDate.now()"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- node: "'2020-12-10'"
- php: "new DateTime('2020-12-10')"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - paymentAccount:
- is_object: true
- key: paymentAccount
- keyPascal: Account
- keySnake: payment_account
- - accountID:
- is_last: true
- is_uuid: true
- key: accountID
- keyPascal: AccountID
- keySnake: account_id
- default: 00000000-0000-0000-0000-000000000000
- object: paymentAccount
- - bankAccount:
- is_object: true
- key: bankAccount
- keyPascal: Account
- keySnake: bank_account
- - accountID:
- is_last: true
- is_uuid: true
- key: accountID
- keyPascal: AccountID
- keySnake: account_id
- default: 00000000-0000-0000-0000-000000000000
- object: bankAccount
- - invoice:
- is_object: true
- key: invoice
- keyPascal: Invoice
- - invoiceID:
- is_last: true
- is_uuid: true
- key: invoiceID
- keyPascal: InvoiceID
- keySnake: invoice_id
- default: "00000000-0000-0000-0000-000000000000"
- object: invoice
- - payment:
- is_object: true
- key: payment
- keyPascal: Payment
- - set_bankaccount:
- is_variable: true
- nonString: true
- key: account
- keyPascal: Account
- default: bankAccount
- python: bank_account
- ruby: bank_account
- object: payment
- - date:
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: currDate
- python: curr_date
- ruby: curr_date
- object: payment
- - amount:
- nonString: true
- key: amount
- keyPascal: Amount
- default: 1.00
- is_money: true
- object: payment
- - set_invoice:
- is_last: true
- is_variable: true
- nonString: true
- key: invoice
- keyPascal: Invoice
- default: invoice
- object: payment
- - payments:
- is_list: true
- key: payments
- keyPascal: Payment
- - add_payments:
- is_last: true
- is_list_add: true
- key: payments
- keyPascal: Payments
- object: payment
- - batchPayment:
- is_object: true
- key: batchPayment
- keyPascal: BatchPayment
- keySnake: batch_payment
- - set_paymentaccount:
- is_variable: true
- nonString: true
- key: account
- keyPascal: Account
- default: paymentAccount
- python: payment_account
- ruby: payment_account
- object: batchPayment
- - reference:
- key: reference
- keyPascal: Reference
- default: "hello foobar"
- object: batchPayment
- - date:
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: currDate
- python: curr_date
- ruby: curr_date
- object: batchPayment
- - set_payments:
- is_last: true
- is_variable: true
- nonString: true
- key: payments
- keyPascal: Payments
- default: payments
- object: batchPayment
- - batchPayments:
- is_object: true
- key: batchPayments
- keyPascal: BatchPayments
- - add_batchPayments:
- is_last: true
- is_array_add: true
- key: batchPayments
- keyPascal: BatchPayments
- keySnake: batch_payments
- java: BatchPayments
- python: batch_payment
- ruby: batch_payment
- csharp: BatchPayment
- object: batchPayment
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type BatchPayments array of BatchPayment objects
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BatchPayments'
- example: {
- "Id": "424745ed-6356-46ad-87d4-3585f9062fb4",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550865988111)/",
- "BatchPayments": [
- {
- "Account": {
- "AccountID": "5ec2f302-cd60-4f8b-a915-9229dd45e6fa"
- },
- "Reference": "Foobar123",
- "BatchPaymentID": "d318c343-208e-49fe-b04a-45642349bcf1",
- "DateString": "2019-02-22T00:00:00",
- "Date": "/Date(1550793600000+0000)/",
- "Payments": [
- {
- "Invoice": {
- "InvoiceID": "3323652c-155e-433b-8a73-4dde7cfbf410",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": []
- },
- "PaymentID": "c05098fa-ae3c-4f00-80ec-0a9df07dedff",
- "Amount": 1.00
- },
- {
- "Invoice": {
- "InvoiceID": "e4abafb4-1f5b-4d9f-80b3-9a7b815bc302",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": []
- },
- "PaymentID": "96409489-2f7d-4804-9a6d-6b939b0e038a",
- "Amount": 1.00
- },
- {
- "Invoice": {
- "InvoiceID": "e6039672-b161-40cd-b07b-a0178e7186ad",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": []
- },
- "PaymentID": "d2796067-bf71-4f06-b386-81f1454fa866",
- "Amount": 1.00
- }
- ],
- "Type": "RECBATCH",
- "Status": "AUTHORISED",
- "TotalAmount": 3.00,
- "UpdatedDateUTC": "/Date(1550865987783+0000)/",
- "IsReconciled": false
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: BatchPayments with an array of Payments in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BatchPayments'
- example: {
- "BatchPayments": [
- {
- "Account": {
- "AccountID": "00000000-0000-0000-0000-000000000000"
- },
- "Reference": "ref",
- "Date": "2018-08-01",
- "Payments": [
- {
- "Account": {
- "Code": "001"
- },
- "Date": "2019-12-31",
- "Amount": 500,
- "Invoice": {
- "InvoiceID": "00000000-0000-0000-0000-000000000000",
- "LineItems": [],
- "Contact": {},
- "Type": "ACCPAY"
- }
- }
- ]
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: deleteBatchPayment
- summary: Updates a specific batch payment for invoices and credit notes
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- x-hasAccountingValidationError: true
- x-example:
- - batchPaymentDelete:
- is_object: true
- key: batchPaymentDelete
- keyPascal: BatchPaymentDelete
- - status:
- is_last: true
- key: status
- keyPascal: Status
- default: DELETED
- object: batchPaymentDelete
- - batchPaymentID:
- is_last: true
- is_uuid: true
- key: batchPaymentID
- keyPascal: BatchPaymentID
- keySnake: batch_payment_id
- default: 00000000-0000-0000-0000-000000000000
- object: batchPaymentDelete
- responses:
- '200':
- description: Success - return response of type BatchPayments array for updated BatchPayment
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BatchPayments'
- example: {
- "Id": "ee23328c-4a8b-4ee7-8fb6-9796ffab9cb0",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1583945852489)/",
- "BatchPayments": [
- {
- "Account": {
- "AccountID": "efb6e3a4-3156-4cee-bfe1-a282a3cc1d8f"
- },
- "BatchPaymentID": "b649632e-2782-4c74-95a5-d994d7140ed9",
- "DateString": "2022-08-01T00:00:00",
- "Date": "/Date(1659312000000+0000)/",
- "Payments": [],
- "Type": "PAYBATCH",
- "Status": "DELETED",
- "TotalAmount": 18.00,
- "UpdatedDateUTC": "/Date(1659377631813+0000)/",
- "IsReconciled": false
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BatchPaymentDelete'
- example: {
- "BatchPaymentID": "9bf296e9-0748-4d29-a3dc-24dde1098030",
- "Status":"DELETED"
- }
- '/BatchPayments/{BatchPaymentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getBatchPayment
- summary: Retrieves a specific batch payment using a unique batch payment Id
- parameters:
- - $ref: '#/components/parameters/BatchPaymentID'
- responses:
- '200':
- description: Success - return response of type BatchPayments array with matching batch payment Id
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BatchPayments'
- example: {
- "Id": "6ab84949-4fe5-4788-a135-4d8f690d24d7",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550866184006)/",
- "BatchPayments": [
- {
- "Account": {
- "AccountID": "13918178-849a-4823-9a31-57b7eac713d7"
- },
- "Reference": "ref",
- "BatchPaymentID": "44a1013e-4946-4a73-b207-dfe5424a5ea5",
- "DateString": "2018-10-03T00:00:00",
- "Date": "/Date(1538524800000+0000)/",
- "Payments": [
- {
- "Invoice": {
- "InvoiceID": "5aa9451d-95d1-4f95-a966-bbab2573f71c",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": []
- },
- "PaymentID": "a22a64cb-364e-43fa-9a1f-bb2cd1f4adde",
- "Reference": "ref/cheque",
- "Amount": 913.55
- },
- {
- "Invoice": {
- "InvoiceID": "30a87092-31b5-4a2c-831e-327486533dd2",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": []
- },
- "PaymentID": "6e20be79-32d8-4ae1-978e-f76d9b245c02",
- "Amount": 495
- },
- {
- "Invoice": {
- "InvoiceID": "86d6e00f-ef56-49f7-9a54-796ccd5ca057",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": []
- },
- "PaymentID": "4ba761b8-5940-4a3f-bcdf-7775adb00332",
- "Amount": 3080
- }
- ],
- "Type": "RECBATCH",
- "Status": "AUTHORISED",
- "TotalAmount": 4488.55,
- "UpdatedDateUTC": "/Date(1538525239370+0000)/",
- "IsReconciled": false
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: deleteBatchPaymentByUrlParam
- summary: Updates a specific batch payment for invoices and credit notes
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/BatchPaymentID'
- responses:
- '200':
- description: Success - return response of type BatchPayments array for updated BatchPayment
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BatchPayments'
- example: {
- "Id": "ee23328c-4a8b-4ee7-8fb6-9796ffab9cb0",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1583945852489)/",
- "BatchPayments": [
- {
- "Account": {
- "AccountID": "efb6e3a4-3156-4cee-bfe1-a282a3cc1d8f"
- },
- "BatchPaymentID": "b649632e-2782-4c74-95a5-d994d7140ed9",
- "DateString": "2022-08-01T00:00:00",
- "Date": "/Date(1659312000000+0000)/",
- "Payments": [],
- "Type": "PAYBATCH",
- "Status": "DELETED",
- "TotalAmount": 18.00,
- "UpdatedDateUTC": "/Date(1659377631813+0000)/",
- "IsReconciled": false
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BatchPaymentDeleteByUrlParam'
- example: {
- "Status":"DELETED"
- }
- '/BatchPayments/{BatchPaymentID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getBatchPaymentHistory
- summary: Retrieves history from a specific batch payment
- parameters:
- - $ref: '#/components/parameters/BatchPaymentID'
- responses:
- '200':
- description: Success - return response of HistoryRecords array of 0 to N HistoryRecord
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HistoryRecords'
- example: {
- "Id": "c58e2f9c-baad-42a4-8bb7-f32b6f88fa04",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550898452503)/",
- "HistoryRecords": [
- {
- "Changes": "Approved",
- "DateUTCString": "2017-11-28T18:29:52",
- "DateUTC": "/Date(1511893792813+0000)/",
- "User": "Buzz Lightyear",
- "Details": ""
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createBatchPaymentHistoryRecord
- summary: Creates a history record for a specific batch payment
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/BatchPaymentID'
- responses:
- '200':
- description: Success - return response of type HistoryRecords array of HistoryRecord objects
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HistoryRecords'
- example: {
- "Id": "d7525479-3392-44c0-bb37-ff4a0b5df5bd",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550899400362)/",
- "HistoryRecords": [
- {
- "DateUTCString": "2019-02-23T05:23:20",
- "DateUTC": "/Date(1550899400362)/",
- "Details": "Hello World",
- "ValidationErrors": []
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- /BankTransactions:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getBankTransactions
- summary: Retrieves any spent or received money transactions
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="AUTHORISED"
- x-example-java: Status=="' + BankTransaction.StatusEnum.AUTHORISED + '"
- x-example-csharp: Status==\"AUTHORISED\"
- x-example-php: Status=="' . XeroAPI\XeroPHP\Models\Accounting\BankTransaction::STATUS_AUTHORISED . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::BankTransaction::AUTHORISED}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Type ASC"
- schema:
- type: string
- - in: query
- name: page
- description: Up to 100 bank transactions will be returned in a single API call with line items details
- example: 1
- schema:
- type: integer
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/pageSize'
- responses:
- '200':
- description: Success - return response of type BankTransactions array with 0 to n BankTransaction
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BankTransactions'
- example: {
- "Id": "18e7e80c-5dca-4a57-974e-8b572cc5efe8",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551212901659)/",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 3
- },
- "BankTransactions": [
- {
- "BankTransactionID": "db54aab0-ad40-4ced-bcff-0940ba20db2c",
- "BankAccount": {
- "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Code": "088",
- "Name": "Business Wells Fargo"
- },
- "BatchPayment": {
- "Account": {
- "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9"
- },
- "BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0",
- "Date": "/Date(1476316800000+0000)/",
- "Type": "RECBATCH",
- "Status": "AUTHORISED",
- "TotalAmount": "12.00",
- "UpdatedDateUTC": "/Date(1476392487037+0000)/",
- "IsReconciled": "false"
- },
- "Type": "RECEIVE",
- "IsReconciled": false,
- "PrepaymentID": "cb62750f-b49c-464b-a45b-e2e2c514c8a9",
- "HasAttachments": true,
- "Contact": {
- "ContactID": "9c2c64de-12c9-4167-b503-e2c0e1aa1f49",
- "Name": "sam",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2016-10-13T00:00:00",
- "Date": "/Date(1476316800000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [],
- "SubTotal": 10,
- "TotalTax": 0,
- "Total": 10,
- "UpdatedDateUTC": "/Date(1476389616437+0000)/",
- "CurrencyCode": "USD"
- },
- {
- "BankTransactionID": "29a69c45-64ca-4805-a1cc-34990de837b3",
- "BankAccount": {
- "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Code": "088",
- "Name": "Business Wells Fargo"
- },
- "Type": "SPEND-OVERPAYMENT",
- "IsReconciled": false,
- "OverpaymentID": "7d457db3-3b0a-47e9-8b79-81252a7bcdcb",
- "HasAttachments": false,
- "Contact": {
- "ContactID": "9c2c64de-12c9-4167-b503-e2c0e1aa1f49",
- "Name": "sam",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2016-10-13T00:00:00",
- "Date": "/Date(1476316800000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "NoTax",
- "LineItems": [],
- "SubTotal": 9,
- "TotalTax": 0,
- "Total": 9,
- "UpdatedDateUTC": "/Date(1476389930500+0000)/",
- "CurrencyCode": "USD"
- },
- {
- "BankTransactionID": "0b89bf5c-d40b-4514-96be-36a739fb0188",
- "BankAccount": {
- "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Code": "088",
- "Name": "Business Wells Fargo"
- },
- "Type": "SPEND-OVERPAYMENT",
- "IsReconciled": false,
- "OverpaymentID": "bf9b5f33-c0d6-4182-84a2-40848023e5a1",
- "HasAttachments": false,
- "Contact": {
- "ContactID": "9c2c64de-12c9-4167-b503-e2c0e1aa1f49",
- "Name": "sam",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2016-10-13T00:00:00",
- "Date": "/Date(1476316800000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "NoTax",
- "LineItems": [],
- "SubTotal": 8,
- "TotalTax": 0,
- "Total": 8,
- "UpdatedDateUTC": "/Date(1476392487037+0000)/",
- "CurrencyCode": "USD"
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createBankTransactions
- summary: Creates one or more spent or received money transaction
- x-hasAccountingValidationError: true
- x-example:
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_uuid: true
- is_last: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - lineItem:
- is_object: true
- key: lineItem
- keyPascal: LineItem
- keySnake: line_item
- - description:
- key: description
- keyPascal: Description
- default: Foobar
- object: lineItem
- - quantity:
- nonString: true
- key: quantity
- keyPascal: Quantity
- default: 1.0
- is_money: true
- object: lineItem
- - unitAmount:
- nonString: true
- key: unitAmount
- keyPascal: UnitAmount
- keySnake: unit_amount
- default: 20.0
- is_money: true
- object: lineItem
- - accountCode:
- is_last: true
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: "000"
- object: lineItem
- - line_items:
- is_list: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- csharp: LineItem
- java: LineItem
- - add_lineitems:
- is_last: true
- is_list_add: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- java: LineItems
- python: line_item
- ruby: line_item
- csharp: LineItem
- object: lineItem
- - bankAccount:
- is_object: true
- key: bankAccount
- keyPascal: Account
- keySnake: bank_account
- - accountID:
- is_last: true
- is_uuid: true
- key: accountID
- keyPascal: AccountID
- keySnake: account_id
- default: 00000000-0000-0000-0000-000000000000
- object: bankAccount
- - bankTransaction:
- is_object: true
- key: bankTransaction
- keyPascal: BankTransaction
- keySnake: bank_transaction
- - type:
- nonString: true
- key: type
- keyPascal: Type
- default: RECEIVE
- php: XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE
- node: BankTransaction.TypeEnum.RECEIVE
- ruby: XeroRuby::Accounting::BankTransaction::RECEIVE
- python_string: RECEIVE
- java: com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE
- csharp: BankTransaction.TypeEnum.RECEIVE
- object: bankTransaction
- - set_contact:
- is_variable: true
- nonString: true
- key: contact
- keyPascal: Contact
- default: contact
- object: bankTransaction
- - set_lineitems:
- is_variable: true
- nonString: true
- key: lineItems
- keyPascal: LineItems
- object: bankTransaction
- default: lineItems
- - set_bankaccount:
- is_last: true
- is_variable: true
- nonString: true
- key: bankAccount
- keyPascal: BankAccount
- keySnake: bank_account
- python: bank_account
- ruby: bank_account
- default: bankAccount
- object: bankTransaction
- - bankTransactions:
- is_object: true
- key: bankTransactions
- keyPascal: BankTransactions
- - add_bankTransaction:
- is_last: true
- is_array_add: true
- key: bankTransactions
- keyPascal: BankTransactions
- keySnake: bank_transactions
- java: BankTransactions
- python: bank_transaction
- ruby: bank_transaction
- csharp: BankTransaction
- object: bankTransaction
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type BankTransactions array with new BankTransaction
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BankTransactions'
- example: {
- "Id": "5bc1d776-3c7f-4fe8-9b2d-09e747077a88",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551213568047)/",
- "BankTransactions": [
- {
- "BankTransactionID": "1289c190-e46d-434b-9628-463ffdb52f00",
- "BankAccount": {
- "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Code": "088",
- "Name": "Business Wells Fargo"
- },
- "Type": "SPEND",
- "Reference": "",
- "IsReconciled": false,
- "CurrencyRate": 1.000000,
- "Contact": {
- "ContactID": "5cc8cf28-567e-4d43-b287-687cfcaec47c",
- "ContactStatus": "ACTIVE",
- "Name": "Katherine Warren",
- "FirstName": "Katherine",
- "LastName": "Warren",
- "EmailAddress": "kat.warren@clampett.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- },
- {
- "AddressType": "POBOX",
- "AddressLine1": "",
- "AddressLine2": "",
- "AddressLine3": "",
- "AddressLine4": "",
- "City": "Palo Alto",
- "Region": "CA",
- "PostalCode": "94020",
- "Country": "United States"
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "847-1294",
- "PhoneAreaCode": "(626)",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1503348544227+0000)/",
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-02-26T00:00:00",
- "Date": "/Date(1551139200000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Inclusive",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.00,
- "TaxType": "TAX001",
- "TaxAmount": 1.74,
- "LineAmount": 20.00,
- "AccountCode": "400",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "d2a06879-da49-4d6c-83b5-72a93a523ec6",
- "AccountID": "ebd06280-af70-4bed-97c6-7451a454ad85",
- "ValidationErrors": []
- }
- ],
- "SubTotal": 18.26,
- "TotalTax": 1.74,
- "Total": 20.00,
- "UpdatedDateUTC": "/Date(1551213567813+0000)/",
- "CurrencyCode": "USD",
- "StatusAttributeString": "ERROR",
- "ValidationErrors": [
- {
- "Message": "The Contact must contain at least 1 of the following elements to identify the contact: Name, ContactID, ContactNumber"
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: BankTransactions with an array of BankTransaction objects in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BankTransactions'
- example: { bankTransactions: [{ type: BankTransaction.TypeEnum.SPEND, contact: { contactID: "00000000-0000-0000-0000-000000000000" }, lineItems: [{ description: "Foobar", quantity: 1.0, unitAmount: 20.0, accountCode: "000" } ], bankAccount: { code: "000" }}]}
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateOrCreateBankTransactions
- summary: Updates or creates one or more spent or received money transaction
- x-hasAccountingValidationError: true
- x-example:
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_uuid: true
- is_last: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - lineItem:
- is_object: true
- key: lineItem
- keyPascal: LineItem
- keySnake: line_item
- - description:
- key: description
- keyPascal: Description
- default: Foobar
- object: lineItem
- - quantity:
- nonString: true
- key: quantity
- keyPascal: Quantity
- default: 1.0
- is_money: true
- object: lineItem
- - unitAmount:
- nonString: true
- key: unitAmount
- keyPascal: UnitAmount
- keySnake: unit_amount
- default: 20.0
- is_money: true
- object: lineItem
- - accountCode:
- is_last: true
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: "000"
- object: lineItem
- - line_items:
- is_list: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- csharp: LineItem
- java: LineItem
- - add_lineitems:
- is_last: true
- is_list_add: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- java: LineItems
- python: line_item
- ruby: line_item
- csharp: LineItem
- object: lineItem
- - bankAccount:
- is_object: true
- key: bankAccount
- keyPascal: Account
- keySnake: bank_account
- - accountID:
- is_last: true
- is_uuid: true
- key: accountID
- keyPascal: AccountID
- keySnake: account_id
- default: 00000000-0000-0000-0000-000000000000
- object: bankAccount
- - bankTransaction:
- is_object: true
- key: bankTransaction
- keyPascal: BankTransaction
- keySnake: bank_transaction
- - type:
- nonString: true
- key: type
- keyPascal: Type
- default: RECEIVE
- php: XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE
- node: BankTransaction.TypeEnum.RECEIVE
- ruby: XeroRuby::Accounting::BankTransaction::RECEIVE
- python_string: RECEIVE
- java: com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE
- csharp: BankTransaction.TypeEnum.RECEIVE
- object: bankTransaction
- - set_contact:
- is_variable: true
- nonString: true
- key: contact
- keyPascal: Contact
- default: contact
- object: bankTransaction
- - set_lineitems:
- is_variable: true
- nonString: true
- key: lineItems
- keyPascal: LineItems
- object: bankTransaction
- default: lineItems
- - set_bankaccount:
- is_last: true
- is_variable: true
- nonString: true
- key: bankAccount
- keyPascal: BankAccount
- keySnake: bank_account
- python: bank_account
- ruby: bank_account
- default: bankAccount
- object: bankTransaction
- - bankTransactions:
- is_object: true
- key: bankTransactions
- keyPascal: BankTransactions
- - add_bankTransaction:
- is_last: true
- is_array_add: true
- key: bankTransactions
- keyPascal: BankTransactions
- keySnake: bank_transactions
- java: BankTransactions
- python: bank_transaction
- ruby: bank_transaction
- csharp: BankTransaction
- object: bankTransaction
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type BankTransactions array with new BankTransaction
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BankTransactions'
- example: {
- "Id": "5bc1d776-3c7f-4fe8-9b2d-09e747077a88",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551213568047)/",
- "BankTransactions": [
- {
- "BankTransactionID": "1289c190-e46d-434b-9628-463ffdb52f00",
- "BankAccount": {
- "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Code": "088",
- "Name": "Business Wells Fargo"
- },
- "Type": "SPEND",
- "Reference": "",
- "IsReconciled": false,
- "CurrencyRate": 1.000000,
- "Contact": {
- "ContactID": "5cc8cf28-567e-4d43-b287-687cfcaec47c",
- "ContactStatus": "ACTIVE",
- "Name": "Katherine Warren",
- "FirstName": "Katherine",
- "LastName": "Warren",
- "EmailAddress": "kat.warren@clampett.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- },
- {
- "AddressType": "POBOX",
- "AddressLine1": "",
- "AddressLine2": "",
- "AddressLine3": "",
- "AddressLine4": "",
- "City": "Palo Alto",
- "Region": "CA",
- "PostalCode": "94020",
- "Country": "United States"
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "847-1294",
- "PhoneAreaCode": "(626)",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1503348544227+0000)/",
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-02-26T00:00:00",
- "Date": "/Date(1551139200000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Inclusive",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.00,
- "TaxType": "TAX001",
- "TaxAmount": 1.74,
- "LineAmount": 20.00,
- "AccountCode": "400",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "d2a06879-da49-4d6c-83b5-72a93a523ec6",
- "AccountID": "ebd06280-af70-4bed-97c6-7451a454ad85",
- "ValidationErrors": []
- }
- ],
- "SubTotal": 18.26,
- "TotalTax": 1.74,
- "Total": 20.00,
- "UpdatedDateUTC": "/Date(1551213567813+0000)/",
- "CurrencyCode": "USD",
- "StatusAttributeString": "ERROR",
- "ValidationErrors": [
- {
- "Message": "The Contact must contain at least 1 of the following elements to identify the contact: Name, ContactID, ContactNumber"
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BankTransactions'
- example: {
- "BankTransactions": [
- {
- "Type": "SPEND",
- "Contact": {
- "ContactID": "00000000-0000-0000-0000-000000000000"
- },
- "Lineitems": [
- {
- "Description": "Foobar",
- "Quantity": 1,
- "UnitAmount": 20,
- "AccountCode": "400"
- }
- ],
- "BankAccount": {
- "Code": "088"
- }
- }
- ]
- }
- '/BankTransactions/{BankTransactionID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getBankTransaction
- summary: Retrieves a single spent or received money transaction by using a unique bank transaction Id
- parameters:
- - $ref: '#/components/parameters/BankTransactionID'
- - $ref: '#/components/parameters/unitdp'
- responses:
- '200':
- description: Success - return response of type BankTransactions array with a specific BankTransaction
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BankTransactions'
- example: {
- "Id": "612e204d-21ab-469b-ac84-afe0697b4461",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551212902962)/",
- "BankTransactions": [
- {
- "BankTransactionID": "db54aab0-ad40-4ced-bcff-0940ba20db2c",
- "BankAccount": {
- "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Code": "088",
- "Name": "Business Wells Fargo"
- },
- "BatchPayment": {
- "Account": {
- "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9"
- },
- "BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0",
- "Date": "/Date(1476316800000+0000)/",
- "Type": "RECBATCH",
- "Status": "AUTHORISED",
- "TotalAmount": "12.00",
- "UpdatedDateUTC": "/Date(1476392487037+0000)/",
- "IsReconciled": "false"
- },
- "Type": "RECEIVE",
- "IsReconciled": false,
- "CurrencyRate": 1.000000,
- "PrepaymentID": "cb62750f-b49c-464b-a45b-e2e2c514c8a9",
- "HasAttachments": true,
- "Attachments": [
- {
- "AttachmentID": "45dd3143-9856-42d2-9a6c-53814f67a33e",
- "FileName": "sample2.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/banktransaction/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample2.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ],
- "Contact": {
- "ContactID": "9c2c64de-12c9-4167-b503-e2c0e1aa1f49",
- "ContactStatus": "ACTIVE",
- "Name": "sam",
- "EmailAddress": "",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- },
- {
- "AddressType": "POBOX",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1518821703467+0000)/",
- "ContactGroups": [],
- "DefaultCurrency": "USD",
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2016-10-13T00:00:00",
- "Date": "/Date(1476316800000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "hello",
- "UnitAmount": 10.00,
- "TaxType": "OUTPUT",
- "TaxAmount": 0.00,
- "LineAmount": 10.00,
- "AccountCode": "400",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "40bec527-a744-4149-96c5-0ab643b51158",
- "AccountID": "ebd06280-af70-4bed-97c6-7451a454ad85",
- "ValidationErrors": []
- }
- ],
- "SubTotal": 10.00,
- "TotalTax": 0.00,
- "Total": 10.00,
- "UpdatedDateUTC": "/Date(1476389616437+0000)/",
- "CurrencyCode": "USD"
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateBankTransaction
- summary: Updates a single spent or received money transaction
- x-hasAccountingValidationError: true
- x-example:
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_uuid: true
- is_last: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - lineItem:
- is_object: true
- key: lineItem
- keyPascal: LineItem
- keySnake: line_item
- - description:
- key: description
- keyPascal: Description
- default: Foobar
- object: lineItem
- - quantity:
- nonString: true
- key: quantity
- keyPascal: Quantity
- default: 1.0
- is_money: true
- object: lineItem
- - unitAmount:
- nonString: true
- key: unitAmount
- keyPascal: UnitAmount
- keySnake: unit_amount
- default: 20.0
- is_money: true
- object: lineItem
- - accountCode:
- is_last: true
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: "000"
- object: lineItem
- - line_items:
- is_list: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- csharp: LineItem
- java: LineItem
- - add_lineitems:
- is_last: true
- is_list_add: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- java: LineItems
- python: line_item
- ruby: line_item
- csharp: LineItem
- object: lineItem
- - bankAccount:
- is_object: true
- key: bankAccount
- keyPascal: Account
- keySnake: bank_account
- - accountID:
- is_last: true
- is_uuid: true
- key: accountID
- keyPascal: AccountID
- keySnake: account_id
- default: 00000000-0000-0000-0000-000000000000
- object: bankAccount
- - bankTransaction:
- is_object: true
- key: bankTransaction
- keyPascal: BankTransaction
- keySnake: bank_transaction
- - reference:
- key: reference
- keyPascal: Reference
- default: You just updated
- object: bankTransaction
- - type:
- nonString: true
- key: type
- keyPascal: Type
- default: RECEIVE
- php: XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE
- node: BankTransaction.TypeEnum.RECEIVE
- ruby: XeroRuby::Accounting::BankTransaction::RECEIVE
- python_string: RECEIVE
- java: com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE
- csharp: BankTransaction.TypeEnum.RECEIVE
- object: bankTransaction
- - set_contact:
- is_variable: true
- nonString: true
- key: contact
- keyPascal: Contact
- default: contact
- object: bankTransaction
- - set_lineitems:
- is_variable: true
- nonString: true
- key: lineItems
- keyPascal: LineItems
- object: bankTransaction
- default: lineItems
- - set_bankaccount:
- is_last: true
- is_variable: true
- nonString: true
- key: bankAccount
- keyPascal: BankAccount
- keySnake: bank_account
- python: bank_account
- ruby: bank_account
- default: bankAccount
- object: bankTransaction
- - bankTransactions:
- is_object: true
- key: bankTransactions
- keyPascal: BankTransactions
- - add_bankTransaction:
- is_last: true
- is_array_add: true
- key: bankTransactions
- keyPascal: BankTransactions
- keySnake: bank_transactions
- java: BankTransactions
- python: bank_transaction
- ruby: bank_transaction
- csharp: BankTransaction
- object: bankTransaction
- parameters:
- - $ref: '#/components/parameters/BankTransactionID'
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type BankTransactions array with updated BankTransaction
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BankTransactions'
- example: {
- "Id": "f2c7f037-96fc-49bd-8f59-d3c7bfdd4746",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551213568875)/",
- "BankTransactions": [
- {
- "BankTransactionID": "1289c190-e46d-434b-9628-463ffdb52f00",
- "BankAccount": {
- "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Code": "088",
- "Name": "Business Wells Fargo"
- },
- "Type": "SPEND",
- "Reference": "You just updated",
- "IsReconciled": false,
- "CurrencyRate": 1.000000,
- "HasAttachments": false,
- "Attachments": [],
- "Contact": {
- "ContactID": "5cc8cf28-567e-4d43-b287-687cfcaec47c",
- "ContactStatus": "ACTIVE",
- "Name": "Katherine Warren",
- "FirstName": "Katherine",
- "LastName": "Warren",
- "EmailAddress": "kat.warren@clampett.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- },
- {
- "AddressType": "POBOX",
- "AddressLine1": "",
- "AddressLine2": "",
- "AddressLine3": "",
- "AddressLine4": "",
- "City": "Palo Alto",
- "Region": "CA",
- "PostalCode": "94020",
- "Country": "United States"
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "847-1294",
- "PhoneAreaCode": "(626)",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1503348544227+0000)/",
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-02-25T00:00:00",
- "Date": "/Date(1551052800000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Inclusive",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.00,
- "TaxType": "TAX001",
- "TaxAmount": 1.74,
- "LineAmount": 20.00,
- "AccountCode": "400",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "d2a06879-da49-4d6c-83b5-72a93a523ec6",
- "AccountID": "ebd06280-af70-4bed-97c6-7451a454ad85",
- "ValidationErrors": []
- }
- ],
- "SubTotal": 18.26,
- "TotalTax": 1.74,
- "Total": 20.00,
- "UpdatedDateUTC": "/Date(1551213568733+0000)/",
- "CurrencyCode": "USD"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BankTransactions'
- example: {
- "BankTransactions": [
- {
- "Type": "SPEND",
- "Contact": {
- "ContactID": "00000000-0000-0000-0000-000000000000",
- "ContactStatus": "ACTIVE",
- "Name": "Buzz Lightyear",
- "FirstName": "Buzz",
- "LastName": "Lightyear",
- "EmailAddress": "buzz.Lightyear@email.com",
- "ContactPersons": [],
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- },
- {
- "AddressType": "POBOX",
- "AddressLine1": "",
- "AddressLine2": "",
- "AddressLine3": "",
- "AddressLine4": "",
- "City": "Palo Alto",
- "Region": "CA",
- "PostalCode": "94020",
- "Country": "United States"
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "847-1294",
- "PhoneAreaCode": "(626)",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "2017-08-21T13:49:04.227-07:00",
- "ContactGroups": []
- },
- "Lineitems": [],
- "BankAccount": {
- "Code": "088",
- "Name": "Business Wells Fargo",
- "AccountID": "00000000-0000-0000-0000-000000000000"
- },
- "IsReconciled": false,
- "Date": "2019-02-25",
- "Reference": "You just updated",
- "CurrencyCode": "USD",
- "CurrencyRate": 1,
- "Status": "AUTHORISED",
- "LineAmountTypes": "Inclusive",
- "TotalTax": 1.74,
- "BankTransactionID": "00000000-0000-0000-0000-000000000000",
- "UpdatedDateUTC": "2019-02-26T12:39:27.813-08:00"
- }
- ]
- }
- '/BankTransactions/{BankTransactionID}/Attachments':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getBankTransactionAttachments
- summary: Retrieves any attachments from a specific bank transactions
- parameters:
- - $ref: '#/components/parameters/BankTransactionID'
- responses:
- '200':
- description: Success - return response of type Attachments array with 0 to n Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "c50798e1-29e9-4a30-a452-bb6e42e400c8",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551303999577)/",
- "Attachments": [
- {
- "AttachmentID": "4508a692-e52c-4ad8-a138-2f13e22bf57b",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- },
- {
- "AttachmentID": "45dd3143-9856-42d2-9a6c-53814f67a33e",
- "FileName": "sample2.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample2.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '/BankTransactions/{BankTransactionID}/Attachments/{AttachmentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getBankTransactionAttachmentById
- summary: Retrieves specific attachments from a specific BankTransaction using a unique attachment Id
- parameters:
- - $ref: '#/components/parameters/BankTransactionID'
- - $ref: '#/components/parameters/AttachmentID'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for BankTransaction as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/BankTransactions/{BankTransactionID}/Attachments/{FileName}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getBankTransactionAttachmentByFileName
- summary: Retrieves a specific attachment from a specific bank transaction by filename
- parameters:
- - $ref: '#/components/parameters/BankTransactionID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for BankTransaction as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- post:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: updateBankTransactionAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Updates a specific attachment from a specific bank transaction by filename
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/BankTransactionID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of Attachments array of Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "572ad2fe-8c23-45aa-82f9-864485327685",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551286166630)/",
- "Attachments": [
- {
- "AttachmentID": "4508a692-e52c-4ad8-a138-2f13e22bf57b",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- put:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: createBankTransactionAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Creates an attachment for a specific bank transaction by filename
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/BankTransactionID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of Attachments array of Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "572ad2fe-8c23-45aa-82f9-864485327685",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551286166630)/",
- "Attachments": [
- {
- "AttachmentID": "4508a692-e52c-4ad8-a138-2f13e22bf57b",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/BankTransactions/{BankTransactionID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getBankTransactionsHistory
- summary: Retrieves history from a specific bank transaction using a unique bank transaction Id
- parameters:
- - $ref: '#/components/parameters/BankTransactionID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createBankTransactionHistoryRecord
- summary: Creates a history record for a specific bank transactions
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/BankTransactionID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- /BankTransfers:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getBankTransfers
- summary: Retrieves all bank transfers
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: HasAttachments==true
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Amount ASC"
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of BankTransfers array of 0 to N BankTransfer
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BankTransfers'
- example: {
- "Id": "dfc0d130-9007-4a98-a5ef-6f01700f18e2",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551311318988)/",
- "BankTransfers": [
- {
- "BankTransferID": "6221458a-ef7a-4d5f-9b1c-1b96ce03833c",
- "CreatedDateUTCString": "2016-10-17T20:46:01",
- "CreatedDateUTC": "/Date(1476737161140+0000)/",
- "DateString": "2016-11-12T21:10:00",
- "Date": "/Date(1478985000000+0000)/",
- "FromBankAccount": {
- "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Name": "Business Wells Fargo"
- },
- "ToBankAccount": {
- "AccountID": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa",
- "Name": "My Savings"
- },
- "Amount": 20.00,
- "FromBankTransactionID": "a3eca480-bc04-4292-9bbd-5c57b8ba12b4",
- "ToBankTransactionID": "4ca13f40-f3a0-4530-a442-a600f5696118",
- "FromIsReconciled": true,
- "ToIsReconciled": true,
- "Reference": "Sub 098801",
- "HasAttachments": true
- },
- {
- "BankTransferID": "9f0153d5-617c-4903-887b-3875807aa27a",
- "CreatedDateUTCString": "2016-10-21T23:28:42",
- "CreatedDateUTC": "/Date(1477092522333+0000)/",
- "DateString": "2016-10-19T20:10:00",
- "Date": "/Date(1476907800000+0000)/",
- "FromBankAccount": {
- "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Name": "Business Wells Fargo"
- },
- "ToBankAccount": {
- "AccountID": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa",
- "Name": "My Savings"
- },
- "Amount": 20.00,
- "FromBankTransactionID": "cb74287e-5682-4973-b354-93e2c7a836d3",
- "ToBankTransactionID": "4c48ba6c-f318-4405-aee6-b5efa2c70f55",
- "FromIsReconciled": false,
- "ToIsReconciled": false,
- "Reference": "Sub 098801",
- "HasAttachments": false
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createBankTransfer
- summary: Creates a bank transfer
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- x-hasAccountingValidationError: true
- x-example:
- - fromBankAccount:
- is_object: true
- key: fromBankAccount
- keyPascal: Account
- - accountID:
- is_last: true
- is_uuid: true
- key: accountID
- keyPascal: AccountID
- keySnake: account_id
- default: 00000000-0000-0000-0000-000000000000
- object: fromBankAccount
- - toBankAccount:
- is_object: true
- key: toBankAccount
- keyPascal: Account
- - accountID:
- is_last: true
- is_uuid: true
- key: accountID
- keyPascal: AccountID
- keySnake: account_id
- default: 00000000-0000-0000-0000-000000000000
- object: toBankAccount
- - bankTransfer:
- is_object: true
- key: bankTransfer
- keyPascal: BankTransfer
- keySnake: bank_transfer
- - set_fromBankAccount:
- is_variable: true
- nonString: true
- key: fromBankAccount
- keyPascal: FromBankAccount
- keySnake: from_bank_account
- default: fromBankAccount
- object: bankTransfer
- - set_toBankAccount:
- is_variable: true
- nonString: true
- key: toBankAccount
- keyPascal: ToBankAccount
- keySnake: to_bank_account
- default: toBankAccount
- object: bankTransfer
- - amount:
- is_last: true
- nonString: true
- key: amount
- keyPascal: Amount
- default: 1.0
- is_money: true
- object: bankTransfer
- - bankTransfers:
- is_object: true
- key: bankTransfers
- keyPascal: BankTransfers
- - add_bankTransfer:
- is_last: true
- is_array_add: true
- key: bankTransfers
- keyPascal: BankTransfers
- keySnake: bank_transfers
- java: BankTransfers
- python: bank_transfer
- ruby: bank_transfer
- csharp: BankTransfer
- object: bankTransfer
- responses:
- '200':
- description: Success - return response of BankTransfers array of one BankTransfer
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BankTransfers'
- example: {
- "Id": "ae767b68-affd-4e17-bac0-83eaf1854dcd",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551311317475)/",
- "BankTransfers": [
- {
- "BankTransferID": "76eea4b6-f026-464c-b6f3-5fb39a196145",
- "DateString": "2019-02-27T00:00:00",
- "Date": "/Date(1551225600000+0000)/",
- "FromBankAccount": {
- "AccountID": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa",
- "Code": "090",
- "Name": "My Savings"
- },
- "ToBankAccount": {
- "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Code": "088",
- "Name": "Business Wells Fargo"
- },
- "Amount": 50.00,
- "FromBankTransactionID": "e4059952-5acb-4a56-b076-53fad85f2930",
- "ToBankTransactionID": "88e4ac17-293b-4e5a-8d8b-3ce3a0b1ee17",
- "FromIsReconciled": true,
- "ToIsReconciled": true,
- "Reference": "Sub 098801",
- "CurrencyRate": 1.000000,
- "ValidationErrors": []
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: BankTransfers with array of BankTransfer objects in request body
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BankTransfers'
- example: {
- "BankTransfers": [
- {
- "FromBankAccount": {
- "Code": "090",
- "Name": "My Savings",
- "AccountID": "00000000-0000-0000-0000-000000000000",
- "Type": "BANK",
- "BankAccountNumber": "123455",
- "Status": "ACTIVE",
- "BankAccountType": "BANK",
- "CurrencyCode": "USD",
- "TaxType": "NONE",
- "EnablePaymentsToAccount": false,
- "ShowInExpenseClaims": false,
- "Class": "ASSET",
- "ReportingCode": "ASS",
- "ReportingCodeName": "Assets",
- "HasAttachments": false,
- "UpdatedDateUTC": "2016-10-17T13:45:33.993-07:00"
- },
- "ToBankAccount": {
- "Code": "088",
- "Name": "Business Wells Fargo",
- "AccountID": "00000000-0000-0000-0000-000000000000",
- "Type": "BANK",
- "BankAccountNumber": "123455",
- "Status": "ACTIVE",
- "BankAccountType": "BANK",
- "CurrencyCode": "USD",
- "TaxType": "NONE",
- "EnablePaymentsToAccount": false,
- "ShowInExpenseClaims": false,
- "Class": "ASSET",
- "ReportingCode": "ASS",
- "ReportingCodeName": "Assets",
- "HasAttachments": false,
- "UpdatedDateUTC": "2016-06-03T08:31:14.517-07:00"
- },
- "Amount": "50.00",
- "FromIsReconciled": true,
- "ToIsReconciled": true,
- "Reference": "Sub 098801"
- }
- ]
- }
- '/BankTransfers/{BankTransferID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getBankTransfer
- summary: Retrieves specific bank transfers by using a unique bank transfer Id
- parameters:
- - $ref: '#/components/parameters/BankTransferID'
- responses:
- '200':
- description: Success - return response of BankTransfers array with one BankTransfer
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BankTransfers'
- example: {
- "Id": "1a5fa46d-5ece-4ef2-89b1-77c293b5d833",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551311320368)/",
- "BankTransfers": [
- {
- "BankTransferID": "6221458a-ef7a-4d5f-9b1c-1b96ce03833c",
- "CreatedDateUTCString": "2016-10-17T20:46:01",
- "CreatedDateUTC": "/Date(1476737161140+0000)/",
- "DateString": "2016-11-12T21:10:00",
- "Date": "/Date(1478985000000+0000)/",
- "FromBankAccount": {
- "AccountID": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Code": "088",
- "Name": "Business Wells Fargo"
- },
- "ToBankAccount": {
- "AccountID": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa",
- "Code": "090",
- "Name": "My Savings"
- },
- "Amount": 20.00,
- "FromBankTransactionID": "a3eca480-bc04-4292-9bbd-5c57b8ba12b4",
- "ToBankTransactionID": "4ca13f40-f3a0-4530-a442-a600f5696118",
- "FromIsReconciled": false,
- "ToIsReconciled": false,
- "Reference": "Sub 098801",
- "CurrencyRate": 1.000000,
- "HasAttachments": true,
- "Attachments": [
- {
- "AttachmentID": "e05a6fd8-0e47-47a9-9799-b809c8267260",
- "FileName": "HelloWorld.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/banktransfer/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/HelloWorld.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- ]
- }
- '/BankTransfers/{BankTransferID}/Attachments':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getBankTransferAttachments
- summary: Retrieves attachments from a specific bank transfer
- parameters:
- - $ref: '#/components/parameters/BankTransferID'
- responses:
- '200':
- description: Success - return response of Attachments array of 0 to N Attachment for a Bank Transfer
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "5cb6b587-7b02-46b6-97fe-d8ad8f20321b",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551397557272)/",
- "Attachments": [
- {
- "AttachmentID": "e05a6fd8-0e47-47a9-9799-b809c8267260",
- "FileName": "HelloWorld.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/BankTransfers/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/HelloWorld.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '/BankTransfers/{BankTransferID}/Attachments/{AttachmentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getBankTransferAttachmentById
- summary: Retrieves a specific attachment from a specific bank transfer using a unique attachment ID
- parameters:
- - $ref: '#/components/parameters/BankTransferID'
- - $ref: '#/components/parameters/AttachmentID'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of binary data from the Attachment to a Bank Transfer
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/BankTransfers/{BankTransferID}/Attachments/{FileName}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getBankTransferAttachmentByFileName
- summary: Retrieves a specific attachment on a specific bank transfer by file name
- parameters:
- - $ref: '#/components/parameters/BankTransferID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of binary data from the Attachment to a Bank Transfer
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- post:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: updateBankTransferAttachmentByFileName
- x-hasAccountingValidationError: true
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/BankTransferID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of Attachments array of 0 to N Attachment for a Bank Transfer
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "c7810140-19c2-4ff7-b3ec-b7e95ce7becf",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551398138226)/",
- "Attachments": [
- {
- "AttachmentID": "0851935c-c4c5-4de8-9247-ce22efde6f82",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/BankTransfers/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- put:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: createBankTransferAttachmentByFileName
- x-hasAccountingValidationError: true
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/BankTransferID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of Attachments array of 0 to N Attachment for a Bank Transfer
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "b73ba149-76a9-4e7c-a5c6-b9230022f416",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551397998372)/",
- "Attachments": [
- {
- "AttachmentID": "9478be4c-c707-48c1-b4a7-83d8eaf442b5",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/BankTransfers/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/BankTransfers/{BankTransferID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getBankTransferHistory
- summary: Retrieves history from a specific bank transfer using a unique bank transfer Id
- parameters:
- - $ref: '#/components/parameters/BankTransferID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createBankTransferHistoryRecord
- summary: Creates a history record for a specific bank transfer
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/BankTransferID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- /BrandingThemes:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getBrandingThemes
- summary: Retrieves all the branding themes
- responses:
- '200':
- description: Success - return response of type BrandingThemes
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BrandingThemes'
- example: {
- "Id": "d1a1beea-bdfe-4ee4-9dbc-27226a26cd68",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550881711906)/",
- "BrandingThemes": [
- {
- "BrandingThemeID": "dabc7637-62c1-4941-8a6e-ee44fa5090e7",
- "Name": "Standard",
- "SortOrder": 0,
- "CreatedDateUTC": "/Date(1464967643813+0000)/"
- }
- ]
- }
- '/BrandingThemes/{BrandingThemeID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getBrandingTheme
- summary: Retrieves a specific branding theme using a unique branding theme Id
- parameters:
- - $ref: '#/components/parameters/BrandingThemeID'
- responses:
- '200':
- description: Success - return response of type BrandingThemes with one BrandingTheme
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/BrandingThemes'
- example: {
- "Id": "df671650-cf14-4a7f-b609-4166933719bc",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550881713071)/",
- "BrandingThemes": [
- {
- "BrandingThemeID": "dabc7637-62c1-4941-8a6e-ee44fa5090e7",
- "Name": "Standard",
- "SortOrder": 0,
- "CreatedDateUTC": "/Date(1464967643813+0000)/"
- }
- ]
- }
- '/BrandingThemes/{BrandingThemeID}/PaymentServices':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [paymentservices]
- tags:
- - Accounting
- operationId: getBrandingThemePaymentServices
- summary: Retrieves the payment services for a specific branding theme
- x-excludeFromPreview: true
- parameters:
- - $ref: '#/components/parameters/BrandingThemeID'
- responses:
- '200':
- description: Success - return response of type PaymentServices array with 0 to N PaymentService
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PaymentServices'
- example: {
- "Id": "bfd5adbe-0e92-48f0-8c5a-39072f6c4ed3",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551139339419)/",
- "PaymentServices": [
- {
- "PaymentServiceID": "8cc53aa4-ae01-45b9-b06c-69c42eeae61f",
- "PaymentServiceName": "Buzz Lightyear",
- "PaymentServiceType": "PayPal"
- },
- {
- "PaymentServiceID": "dede7858-14e3-4a46-bf95-4d4cc491e645",
- "PaymentServiceName": "ACME Payment",
- "PaymentServiceUrl": "https://www.payupnow.com/",
- "PaymentServiceType": "Custom",
- "PayNowText": "Pay Now"
- }
- ]
- }
- post:
- security:
- - OAuth2: [paymentservices]
- tags:
- - Accounting
- operationId: createBrandingThemePaymentServices
- summary: Creates a new custom payment service for a specific branding theme
- x-excludeFromPreview: true
- x-hasAccountingValidationError: true
- x-example:
- - object:
- is_object: true
- key: paymentService
- keyPascal: PaymentService
- keySnake: payment_service
- - paymentServiceID:
- is_uuid: true
- key: paymentServiceID
- keyPascal: PaymentServiceID
- keySnake: payment_service_id
- default: 00000000-0000-0000-0000-000000000000
- object: paymentService
- - paymentServiceName:
- key: paymentServiceName
- keyPascal: PaymentServiceName
- keySnake: payment_service_name
- default: ACME Payments
- object: paymentService
- - paymentServiceUrl:
- key: paymentServiceUrl
- keyPascal: PaymentServiceUrl
- keySnake: payment_service_url
- default: "https://www.payupnow.com/"
- object: paymentService
- - payNowText:
- is_last: true
- key: payNowText
- keyPascal: PayNowText
- keySnake: pay_now_text
- default: Pay Now
- object: paymentService
- - paymentServices:
- is_object: true
- key: paymentServices
- keyPascal: PaymentServices
- - add_paymentService:
- is_last: true
- is_array_add: true
- key: paymentServices
- keyPascal: PaymentServices
- java: PaymentServices
- csharp: PaymentService
- object: paymentService
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/BrandingThemeID'
- responses:
- '200':
- description: Success - return response of type PaymentServices array with newly created PaymentService
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PaymentServices'
- example: {
- "Id": "918feecb-067a-4ed9-841b-571c04eaada3",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551139338915)/",
- "PaymentServices": [
- {
- "PaymentServiceID": "00000000-0000-0000-0000-000000000000",
- "PaymentServiceName": "ACME Payments",
- "PaymentServiceUrl": "https://www.payupnow.com/",
- "PaymentServiceType": "Custom",
- "PayNowText": "Pay Now"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: PaymentServices array with PaymentService object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PaymentServices'
- example: {
- "PaymentServices": [
- {
- "PaymentServiceID": "54b3b4f6-0443-4fba-bcd1-61ec0c35ca55",
- "PaymentServiceName": "PayUpNow",
- "PaymentServiceUrl": "https://www.payupnow.com/",
- "PaymentServiceType": "Custom",
- "PayNowText": "Time To Pay"
- }
- ]
- }
- '/Budgets':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.budgets.read]
- tags:
- - Accounting
- operationId: getBudgets
- summary: 'Retrieve a list of budgets'
- parameters:
- - in: query
- name: IDs
- x-snake: ids
- description: Filter by BudgetID. Allows you to retrieve a specific individual budget.
- style: form
- explode: false
- example: '"00000000-0000-0000-0000-000000000000"'
- x-example-java: UUID.fromString("00000000-0000-0000-0000-000000000000")
- x-example-php: '"00000000-0000-0000-0000-000000000000"'
- x-example-csharp: Guid.Parse("00000000-0000-0000-0000-000000000000");
- schema:
- type: string
- items:
- type: string
- format: uuid
- - in: query
- name: DateTo
- x-snake: date_to
- description: Filter by start date
- example: "2019-10-31"
- schema:
- type: string
- format: date
- - in: query
- name: DateFrom
- x-snake: date_from
- description: Filter by end date
- example: "2019-10-31"
- schema:
- type: string
- format: date
- responses:
- '200':
- description: Success - return response of type Budgets array with 0 to N Budgets
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Budgets'
- example: {
- "Id": "04e93d48-e72f-4775-b7dd-15a041fab972",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551399323399)/",
- "Budgets": [
- {
- "BudgetID": "847da917-9565-466c-a9cd-3ecf7eb9d094",
- "Status": "APPROVED",
- "Description": "FY2021 budget",
- "Type": "TRACKING",
- "UpdatedDateUTC": "/Date(1622138002077+0000)/",
- "BudgetLines": [],
- "Tracking": []
- },
- {
- "BudgetID": "93a4bab1-0021-4320-a2ec-c250528b4bc5",
- "Status": "APPROVED",
- "Description": "Overall Budget",
- "Type": "OVERALL",
- "UpdatedDateUTC": "/Date(1622137786913+0000)/",
- "BudgetLines": [],
- "Tracking": []
- }
- ]
- }
- '/Budgets/{BudgetID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.budgets.read]
- tags:
- - Accounting
- operationId: getBudget
- summary: Retrieves a specific budget, which includes budget lines
- parameters:
- - $ref: '#/components/parameters/BudgetID'
- - in: query
- name: DateTo
- x-snake: date_to
- description: Filter by start date
- example: "2019-10-31"
- schema:
- type: string
- format: date
- - in: query
- name: DateFrom
- x-snake: date_from
- description: Filter by end date
- example: "2019-10-31"
- schema:
- type: string
- format: date
- responses:
- '200':
- description: Success - return response of type Invoices array with specified Invoices
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Budgets'
- example: {
- "Id": "04e93d48-e72f-4775-b7dd-15a041fab972",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551399323399)/",
- "Budgets": {
- "BudgetID": "c1d195d4-92aa-4abd-867a-7ac2f9d60500",
- "Type": "TRACKING",
- "Description": "Daniels Northern Budget",
- "UpdatedDateUTC": "2017-08-14T01:18:26.74",
- "Tracking": [
- {
- "TrackingCategoryID": "e94ba240-3edf-4ef3-8317-10147b968f94",
- "Name": "Region",
- "TrackingOptionID": "e94ba240-3edf-4ef3-8317-10147b968f94",
- "Option": "North"
- },
- {
- "TrackingCategoryID": "d8580491-4167-4a81-9624-ad3bdd8e46ce",
- "Name": "Salesperson",
- "TrackingOptionID": "9c24de87-a2b7-439d-a216-35d1af7bdec3",
- "Option": "Daniel"
- }
- ],
- "BudgetLines": [
- {
- "AccountID": "9c24de87-a2b7-439d-a216-35d1af7bdec3",
- "AccountCode": "200",
- "BudgetBalances": [
- {
- "Period": "2019-08",
- "Amount": "1000",
- "Notes": "Sample note"
- },
- {
- "Period": "2019-09",
- "Amount": "1050",
- "Notes": ""
- },
- {
- "Period": "2019-10",
- "Amount": "1102",
- "Notes": ""
- }
- ]
- },
- {
- "AccountID": "385f90ae-e798-4990-9b1c-db8eb8b735c2",
- "AccountCode": "420",
- "BudgetBalances": [
- {
- "Period": "2019-08",
- "Amount": "500",
- "Notes": ""
- },
- {
- "Period": "2019-09",
- "Amount": "505",
- "Notes": "Special Month"
- },
- {
- "Period": "2019-10",
- "Amount": "510",
- "Notes": ""
- }
- ]
- }
- ]
- }
- }
-
- '/Contacts':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.contacts, accounting.contacts.read]
- tags:
- - Accounting
- operationId: getContacts
- summary: 'Retrieves all contacts in a Xero organisation'
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: ContactStatus=="ACTIVE"
- x-example-csharp: ContactStatus==\"ACTIVE\"
- x-example-java: ContactStatus=="' + Contact.ContactStatusEnum.ACTIVE + '"
- x-example-php: ContactStatus=="' . \XeroAPI\XeroPHP\Models\Accounting\Contact::CONTACT_STATUS_ACTIVE . '"
- x-example-ruby: ContactStatus==#{XeroRuby::Accounting::Contact::ACTIVE}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Name ASC"
- schema:
- type: string
- - in: query
- name: IDs
- x-snake: ids
- description: Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call.
- style: form
- explode: false
- example: '"00000000-0000-0000-0000-000000000000"'
- x-example-java: Arrays.asList(UUID.fromString("00000000-0000-0000-0000-000000000000"))
- x-example-php: '"00000000-0000-0000-0000-000000000000"'
- x-example-csharp: new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")};
- schema:
- type: array
- items:
- type: string
- format: uuid
- - in: query
- name: page
- description: e.g. page=1 - Up to 100 contacts will be returned in a single API call.
- example: 1
- schema:
- type: integer
- - in: query
- name: includeArchived
- x-snake: include_archived
- description: e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response
- example: true
- x-example-python: "True"
- schema:
- type: boolean
- - $ref: '#/components/parameters/summaryOnly'
- - in: query
- name: searchTerm
- x-snake: search_term
- description: Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields.
- example: "Joe Bloggs"
- schema:
- type: string
- - $ref: '#/components/parameters/pageSize'
- responses:
- '200':
- description: Success - return response of type Contacts array with 0 to N Contact
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Contacts'
- example: {
- "Id": "04e93d48-e72f-4775-b7dd-15a041fab972",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551399323399)/",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 2
- },
- "Contacts": [
- {
- "ContactID": "5cc8cf28-567e-4d43-b287-687cfcaec47c",
- "ContactStatus": "ACTIVE",
- "Name": "Katherine Warren",
- "FirstName": "Katherine",
- "LastName": "Warren",
- "CompanyNumber": "NumberBusiness1234",
- "EmailAddress": "kat.warren@clampett.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- },
- {
- "AddressType": "POBOX",
- "AddressLine1": "",
- "AddressLine2": "",
- "AddressLine3": "",
- "AddressLine4": "",
- "City": "Palo Alto",
- "Region": "CA",
- "PostalCode": "94020",
- "Country": "United States"
- }
- ],
- "Phones": [
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "847-1294",
- "PhoneAreaCode": "(626)",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1503348544227+0000)/",
- "ContactGroups": [],
- "IsSupplier": true,
- "IsCustomer": true,
- "SalesDefaultLineAmountType": "INCLUSIVE",
- "PurchasesDefaultLineAmountType": "INCLUSIVE",
- "Balances": {
- "AccountsReceivable": {
- "Outstanding": 760.00,
- "Overdue": 920.00
- },
- "AccountsPayable": {
- "Outstanding": 231.60,
- "Overdue": 360.00
- }
- },
- "ContactPersons": [],
- "HasAttachments": false,
- "HasValidationErrors": false
- },
- {
- "ContactID": "3ec601ad-eddc-4ccb-a8ac-736e88293b1b",
- "ContactStatus": "ACTIVE",
- "Name": "Lisa Parker",
- "FirstName": "Lisa",
- "LastName": "Parker",
- "EmailAddress": "lparker@parkerandco.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- },
- {
- "AddressType": "POBOX",
- "AddressLine1": "",
- "AddressLine2": "",
- "AddressLine3": "",
- "AddressLine4": "",
- "City": "Anchorage",
- "Region": "AK",
- "PostalCode": "99501",
- "Country": "United States"
- }
- ],
- "Phones": [
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "266-3583",
- "PhoneAreaCode": "(510)",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1503348546760+0000)/",
- "ContactGroups": [],
- "IsSupplier": false,
- "IsCustomer": false,
- "ContactPersons": [],
- "HasAttachments": false,
- "HasValidationErrors": false
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.contacts]
- tags:
- - Accounting
- operationId: createContacts
- summary: 'Creates multiple contacts (bulk) in a Xero organisation'
- x-hasAccountingValidationError: true
- x-example:
- - phone:
- is_object: true
- key: phone
- keyPascal: Phone
- - phoneNumber:
- key: phoneNumber
- keyPascal: PhoneNumber
- keySnake: phone_number
- default: 555-1212
- object: phone
- - phoneType:
- is_last: true
- nonString: true
- key: phoneType
- keyPascal: PhoneType
- keySnake: phone_type
- default: MOBILE
- php: XeroAPI\XeroPHP\Models\Accounting\Phone::PHONE_TYPE_MOBILE
- node: Phone.PhoneTypeEnum.MOBILE
- ruby: XeroRuby::Accounting::PhoneType::MOBILE
- python_string: MOBILE
- java: com.xero.models.accounting.Phone.PhoneTypeEnum.MOBILE
- csharp: Phone.PhoneTypeEnum.MOBILE
- object: phone
- - phones:
- is_list: true
- key: phones
- keyPascal: Phone
- - add_phone:
- is_last: true
- is_list_add: true
- key: phones
- keyPascal: Phones
- object: phone
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - name:
- key: name
- keyPascal: Name
- default: Bruce Banner
- object: contact
- - emailAddress:
- key: emailAddress
- keyPascal: EmailAddress
- keySnake: email_address
- default: hulk@avengers.com
- object: contact
- - set_phones:
- is_last: true
- is_variable: true
- nonString: true
- key: phones
- keyPascal: Phones
- default: phones
- object: contact
- - contacts:
- is_object: true
- key: contacts
- keyPascal: Contacts
- - add_contact:
- is_last: true
- is_array_add: true
- key: contacts
- keyPascal: Contacts
- java: Contacts
- csharp: Contact
- object: contact
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Contacts array with newly created Contact
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Contacts'
- example: {
- "Id": "e997d6d7-6dad-4458-beb8-d9c1bf7f2edf",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551399321121)/",
- "Contacts": [
- {
- "ContactID": "3ff6d40c-af9a-40a3-89ce-3c1556a25591",
- "ContactStatus": "ACTIVE",
- "CompanyNumber": "NumberBusiness1234",
- "Name": "Foo9987",
- "EmailAddress": "sid32476@blah.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- },
- {
- "AddressType": "POBOX",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "555-1212",
- "PhoneAreaCode": "415",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551399321043+0000)/",
- "ContactGroups": [],
- "IsSupplier": false,
- "IsCustomer": false,
- "SalesDefaultLineAmountType": "INCLUSIVE",
- "PurchasesDefaultLineAmountType": "INCLUSIVE",
- "SalesTrackingCategories": [],
- "PurchasesTrackingCategories": [],
- "PaymentTerms": {
- "Bills": {
- "Day": 15,
- "Type": "OFCURRENTMONTH"
- },
- "Sales": {
- "Day": 10,
- "Type": "DAYSAFTERBILLMONTH"
- }
- },
- "ContactPersons": [],
- "HasValidationErrors": false
- }
- ]
- }
- '400':
- description: Validation Error - some data was incorrect returns response of type Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- example: {
- "ErrorNumber": 10,
- "Type": "ValidationException",
- "Message": "A validation exception occurred",
- "Elements": [
- {
- "ContactID": "00000000-0000-0000-0000-000000000000",
- "AccountNumber": "12345-ABCD",
- "Name": "Buzz Lightyear",
- "EmailAddress": "buzzlightyear@email.com",
- "AccountsReceivableTaxType": "NONE",
- "AccountsPayableTaxType": "INPUT",
- "Addresses": [
- {
- "AddressType": "STREET",
- "AddressLine1": "101 Green St",
- "AddressLine2": "5th floor",
- "City": "San Francisco",
- "Region": "CA",
- "PostalCode": "94041",
- "Country": "US",
- "AttentionTo": "Rod Drury",
- "ValidationErrors": []
- }
- ],
- "Phones": [
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "555-1212",
- "PhoneAreaCode": "415",
- "ValidationErrors": []
- }
- ],
- "ContactGroups": [],
- "PaymentTerms": {
- "Bills": {
- "Day": 15,
- "Type": "OFCURRENTMONTH",
- "ValidationErrors": []
- },
- "Sales": {
- "Day": 10,
- "Type": "DAYSAFTERBILLMONTH",
- "ValidationErrors": []
- }
- },
- "ContactPersons": [],
- "HasValidationErrors": true,
- "ValidationErrors": [
- {
- "Message": "The contact name Buzz Lightyear is already assigned to another contact. The contact name must be unique across all active contacts."
- }
- ]
- }
- ]
- }
- requestBody:
- required: true
- description: Contacts with an array of Contact objects to create in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Contacts'
- example: {
- "Contacts": [
- {
- "ContactID": "3ff6d40c-af9a-40a3-89ce-3c1556a25591",
- "ContactStatus": "ACTIVE",
- "Name": "Foo9987",
- "EmailAddress": "sid32476@blah.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- },
- {
- "AddressType": "POBOX",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "555-1212",
- "PhoneAreaCode": "415",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551399321043+0000)/",
- "ContactGroups": [],
- "IsSupplier": false,
- "IsCustomer": false,
- "SalesTrackingCategories": [],
- "PurchasesTrackingCategories": [],
- "PaymentTerms": {
- "Bills": {
- "Day": 15,
- "Type": "OFCURRENTMONTH"
- },
- "Sales": {
- "Day": 10,
- "Type": "DAYSAFTERBILLMONTH"
- }
- },
- "ContactPersons": []
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.contacts]
- tags:
- - Accounting
- operationId: updateOrCreateContacts
- summary: 'Updates or creates one or more contacts in a Xero organisation'
- x-hasAccountingValidationError: true
- x-example:
- - phone:
- is_object: true
- key: phone
- keyPascal: Phone
- - phoneNumber:
- key: phoneNumber
- keyPascal: PhoneNumber
- keySnake: phone_number
- default: 555-1212
- object: phone
- - phoneType:
- is_last: true
- nonString: true
- key: phoneType
- keyPascal: PhoneType
- keySnake: phone_type
- default: MOBILE
- php: XeroAPI\XeroPHP\Models\Accounting\Phone::PHONE_TYPE_MOBILE
- node: Phone.PhoneTypeEnum.MOBILE
- ruby: XeroRuby::Accounting::PhoneType::MOBILE
- python_string: MOBILE
- java: com.xero.models.accounting.Phone.PhoneTypeEnum.MOBILE
- csharp: Phone.PhoneTypeEnum.MOBILE
- object: phone
- - phones:
- is_list: true
- key: phones
- keyPascal: Phone
- - add_phone:
- is_last: true
- is_list_add: true
- key: phones
- keyPascal: Phones
- object: phone
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - name:
- key: name
- keyPascal: Name
- default: Bruce Banner
- object: contact
- - emailAddress:
- key: emailAddress
- keyPascal: EmailAddress
- keySnake: email_address
- default: hulk@avengers.com
- object: contact
- - set_phones:
- is_last: true
- is_variable: true
- nonString: true
- key: phones
- keyPascal: Phones
- default: phones
- object: contact
- - contacts:
- is_object: true
- key: contacts
- keyPascal: Contacts
- - add_contact:
- is_last: true
- is_array_add: true
- key: contacts
- keyPascal: Contacts
- java: Contacts
- csharp: Contact
- object: contact
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Contacts array with newly created Contact
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Contacts'
- example: {
- "Id": "e997d6d7-6dad-4458-beb8-d9c1bf7f2edf",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551399321121)/",
- "Contacts": [
- {
- "ContactID": "00000000-0000-0000-0000-000000000000",
- "ContactStatus": "ACTIVE",
- "Name": "Bruce Banner",
- "CompanyNumber": "NumberBusiness1234",
- "EmailAddress": "bruce@banner.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- },
- {
- "AddressType": "POBOX",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "555-1212",
- "PhoneAreaCode": "415",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551399321043+0000)/",
- "ContactGroups": [],
- "IsSupplier": false,
- "IsCustomer": false,
- "SalesDefaultLineAmountType": "INCLUSIVE",
- "PurchasesDefaultLineAmountType": "INCLUSIVE",
- "SalesTrackingCategories": [],
- "PurchasesTrackingCategories": [],
- "PaymentTerms": {
- "Bills": {
- "Day": 15,
- "Type": "OFCURRENTMONTH"
- },
- "Sales": {
- "Day": 10,
- "Type": "DAYSAFTERBILLMONTH"
- }
- },
- "ContactPersons": [],
- "HasValidationErrors": false
- }
- ]
- }
- '400':
- description: Validation Error - some data was incorrect returns response of type Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- example: {
- "ErrorNumber": 10,
- "Type": "ValidationException",
- "Message": "A validation exception occurred",
- "Elements": [
- {
- "ContactID": "00000000-0000-0000-0000-000000000000",
- "AccountNumber": "12345-ABCD",
- "Name": "Buzz Lightyear",
- "EmailAddress": "buzzlightyear@email.com",
- "AccountsReceivableTaxType": "NONE",
- "AccountsPayableTaxType": "INPUT",
- "Addresses": [
- {
- "AddressType": "STREET",
- "AddressLine1": "101 Green St",
- "AddressLine2": "5th floor",
- "City": "San Francisco",
- "Region": "CA",
- "PostalCode": "94041",
- "Country": "US",
- "AttentionTo": "Rod Drury",
- "ValidationErrors": []
- }
- ],
- "Phones": [
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "555-1212",
- "PhoneAreaCode": "415",
- "ValidationErrors": []
- }
- ],
- "ContactGroups": [],
- "PaymentTerms": {
- "Bills": {
- "Day": 15,
- "Type": "OFCURRENTMONTH",
- "ValidationErrors": []
- },
- "Sales": {
- "Day": 10,
- "Type": "DAYSAFTERBILLMONTH",
- "ValidationErrors": []
- }
- },
- "ContactPersons": [],
- "HasValidationErrors": true,
- "ValidationErrors": [
- {
- "Message": "The contact name Buzz Lightyear is already assigned to another contact. The contact name must be unique across all active contacts."
- }
- ]
- }
- ]
- }
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Contacts'
- example: {
- "Contacts": [
- {
- "Name": "Bruce Banner",
- "EmailAddress": "hulk@avengers.com",
- "Phones": [
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "555-1212",
- "PhoneAreaCode": "415"
- }
- ],
- "PaymentTerms": {
- "Bills": {
- "Day": 15,
- "Type": "OFCURRENTMONTH"
- },
- "Sales": {
- "Day": 10,
- "Type": "DAYSAFTERBILLMONTH"
- }
- }
- }
- ]
- }
- '/Contacts/{ContactNumber}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.contacts, accounting.contacts.read]
- tags:
- - Accounting
- operationId: getContactByContactNumber
- summary: 'Retrieves a specific contact by contact number in a Xero organisation'
- parameters:
- - required: true
- in: path
- name: ContactNumber
- x-snake: contact_number
- description: This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50).
- example: "SB2"
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of type Contacts array with a unique Contact
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Contacts'
- example: {
- "Id": "5c83b115-a6e8-4f2a-877f-ba63d009235b",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551462703288)/",
- "Contacts": [
- {
- "ContactID": "8138a266-fb42-49b2-a104-014b7045753d",
- "ContactNumber": "SB2",
- "AccountNumber": "1234567",
- "ContactStatus": "ACTIVE",
- "Name": "Acme Parts Co.",
- "FirstName": "Blake",
- "LastName": "Kohler",
- "CompanyNumber": "NumberBusiness1234",
- "EmailAddress": "bk@krave.co",
- "BankAccountDetails": "12334567",
- "TaxNumber": "123-22-3456",
- "AccountsReceivableTaxType": "TAX003",
- "AccountsPayableTaxType": "TAX022",
- "Addresses": [
- {
- "AddressType": "STREET",
- "AddressLine1": "123 Fake Street",
- "City": "Vancouver",
- "Region": "British Columbia",
- "PostalCode": "V6B 2T4",
- "Country": "",
- "AttentionTo": ""
- },
- {
- "AddressType": "POBOX",
- "AddressLine1": "1234 Fake Street",
- "City": "Vancouver",
- "Region": "British Columbia",
- "PostalCode": "V6B 2T4",
- "Country": "",
- "AttentionTo": "Blake"
- }
- ],
- "Phones": [
- {
- "PhoneType": "DDI",
- "PhoneNumber": "489-44493",
- "PhoneAreaCode": "345",
- "PhoneCountryCode": "4"
- },
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "408-0914",
- "PhoneAreaCode": "604",
- "PhoneCountryCode": "1"
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "123-9933",
- "PhoneAreaCode": "123",
- "PhoneCountryCode": "2"
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "999-44",
- "PhoneAreaCode": "234",
- "PhoneCountryCode": "3"
- }
- ],
- "UpdatedDateUTC": "/Date(1551459777193+0000)/",
- "ContactGroups": [],
- "IsSupplier": true,
- "IsCustomer": true,
- "SalesDefaultLineAmountType": "INCLUSIVE",
- "PurchasesDefaultLineAmountType": "INCLUSIVE",
- "DefaultCurrency": "USD",
- "Discount": 13.00,
- "Website": "http://www.google.com",
- "BrandingTheme": {
- "BrandingThemeID": "dabc7637-62c1-4941-8a6e-ee44fa5090e7",
- "Name": "Standard"
- },
- "PurchasesDefaultAccountCode": "660",
- "SalesDefaultAccountCode": "002",
- "BatchPayments": {
- "BankAccountNumber": "12334567",
- "BankAccountName": "Citi Bank",
- "Details": "biz checking",
- "Code": "",
- "Reference": ""
- },
- "Balances": {
- "AccountsReceivable": {
- "Outstanding": 118.90,
- "Overdue": 136.90
- },
- "AccountsPayable": {
- "Outstanding": -43.60,
- "Overdue": 40.00
- }
- },
- "PaymentTerms": {
- "Bills": {
- "Day": 12,
- "Type": "OFFOLLOWINGMONTH"
- },
- "Sales": {
- "Day": 14,
- "Type": "OFCURRENTMONTH"
- }
- },
- "ContactPersons": [
- {
- "FirstName": "Sue",
- "LastName": "Johnson",
- "EmailAddress": "sue.johnson@krave.com",
- "IncludeInEmails": true
- }
- ],
- "HasAttachments": true,
- "Attachments": [
- {
- "AttachmentID": "04e0a3e3-b116-456a-9f32-9706f0d33afa",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/contact/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ],
- "HasValidationErrors": false
- }
- ]
- }
- '/Contacts/{ContactID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.contacts, accounting.contacts.read]
- tags:
- - Accounting
- operationId: getContact
- summary: 'Retrieves a specific contacts in a Xero organisation using a unique contact Id'
- parameters:
- - $ref: '#/components/parameters/ContactID'
- responses:
- '200':
- description: Success - return response of type Contacts array with a unique Contact
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Contacts'
- example: {
- "Id": "5c83b115-a6e8-4f2a-877f-ba63d009235b",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551462703288)/",
- "Contacts": [
- {
- "ContactID": "8138a266-fb42-49b2-a104-014b7045753d",
- "ContactNumber": "SB2",
- "AccountNumber": "1234567",
- "ContactStatus": "ACTIVE",
- "Name": "Acme Parts Co.",
- "FirstName": "Blake",
- "LastName": "Kohler",
- "CompanyNumber": "NumberBusiness1234",
- "EmailAddress": "bk@krave.co",
- "BankAccountDetails": "12334567",
- "TaxNumber": "123-22-3456",
- "AccountsReceivableTaxType": "TAX003",
- "AccountsPayableTaxType": "TAX022",
- "Addresses": [
- {
- "AddressType": "STREET",
- "AddressLine1": "123 Fake Street",
- "City": "Vancouver",
- "Region": "British Columbia",
- "PostalCode": "V6B 2T4",
- "Country": "",
- "AttentionTo": ""
- },
- {
- "AddressType": "POBOX",
- "AddressLine1": "1234 Fake Street",
- "City": "Vancouver",
- "Region": "British Columbia",
- "PostalCode": "V6B 2T4",
- "Country": "",
- "AttentionTo": "Blake"
- }
- ],
- "Phones": [
- {
- "PhoneType": "DDI",
- "PhoneNumber": "489-44493",
- "PhoneAreaCode": "345",
- "PhoneCountryCode": "4"
- },
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "408-0914",
- "PhoneAreaCode": "604",
- "PhoneCountryCode": "1"
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "123-9933",
- "PhoneAreaCode": "123",
- "PhoneCountryCode": "2"
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "999-44",
- "PhoneAreaCode": "234",
- "PhoneCountryCode": "3"
- }
- ],
- "UpdatedDateUTC": "/Date(1551459777193+0000)/",
- "ContactGroups": [],
- "IsSupplier": true,
- "IsCustomer": true,
- "SalesDefaultLineAmountType": "INCLUSIVE",
- "PurchasesDefaultLineAmountType": "INCLUSIVE",
- "DefaultCurrency": "USD",
- "Discount": 13.00,
- "Website": "http://www.google.com",
- "BrandingTheme": {
- "BrandingThemeID": "dabc7637-62c1-4941-8a6e-ee44fa5090e7",
- "Name": "Standard"
- },
- "PurchasesDefaultAccountCode": "660",
- "SalesDefaultAccountCode": "002",
- "BatchPayments": {
- "BankAccountNumber": "12334567",
- "BankAccountName": "Citi Bank",
- "Details": "biz checking",
- "Code": "",
- "Reference": ""
- },
- "Balances": {
- "AccountsReceivable": {
- "Outstanding": 118.90,
- "Overdue": 136.90
- },
- "AccountsPayable": {
- "Outstanding": -43.60,
- "Overdue": 40.00
- }
- },
- "PaymentTerms": {
- "Bills": {
- "Day": 12,
- "Type": "OFFOLLOWINGMONTH"
- },
- "Sales": {
- "Day": 14,
- "Type": "OFCURRENTMONTH"
- }
- },
- "ContactPersons": [
- {
- "FirstName": "Sue",
- "LastName": "Johnson",
- "EmailAddress": "sue.johnson@krave.com",
- "IncludeInEmails": true
- }
- ],
- "HasAttachments": true,
- "Attachments": [
- {
- "AttachmentID": "04e0a3e3-b116-456a-9f32-9706f0d33afa",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/contact/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ],
- "HasValidationErrors": false
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.contacts]
- tags:
- - Accounting
- operationId: updateContact
- summary: 'Updates a specific contact in a Xero organisation'
- x-hasAccountingValidationError: true
- x-example:
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - name:
- key: name
- keyPascal: Name
- default: Thanos
- object: contact
- - contactID:
- is_last: true
- is_uuid: true
- key: contactID
- keyPascal: ContactID
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - contacts:
- is_object: true
- key: contacts
- keyPascal: Contacts
- - add_contact:
- is_last: true
- is_array_add: true
- key: contacts
- keyPascal: Contacts
- java: Contacts
- csharp: Contact
- object: contact
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ContactID'
- responses:
- '200':
- description: Success - return response of type Contacts array with an updated Contact
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Contacts'
- example: {
- "Id": "4166b727-c3f0-4881-acd0-d4f7c0e8fcda",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551400031795)/",
- "Contacts": [
- {
- "ContactID": "d5be01fb-b09f-4c3a-9c67-e10c2a03412c",
- "ContactStatus": "ACTIVE",
- "Name": "FooBar",
- "EmailAddress": "sid30680@blah.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- },
- {
- "AddressType": "POBOX",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "555-1212",
- "PhoneAreaCode": "415",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551400031763+0000)/",
- "ContactGroups": [],
- "IsSupplier": false,
- "IsCustomer": false,
- "SalesDefaultLineAmountType": "INCLUSIVE",
- "PurchasesDefaultLineAmountType": "INCLUSIVE",
- "SalesTrackingCategories": [],
- "PurchasesTrackingCategories": [],
- "PaymentTerms": {
- "Bills": {
- "Day": 15,
- "Type": "OFCURRENTMONTH"
- },
- "Sales": {
- "Day": 10,
- "Type": "DAYSAFTERBILLMONTH"
- }
- },
- "ContactPersons": [],
- "HasValidationErrors": false
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- description: an array of Contacts containing single Contact object with properties to update
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Contacts'
- example: { "Contacts": [{ "ContactID": "00000000-0000-0000-0000-000000000000", "Name": "Thanos" }]}
- '/Contacts/{ContactID}/Attachments':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getContactAttachments
- x-hasAccountingValidationError: true
- summary: 'Retrieves attachments for a specific contact in a Xero organisation'
- responses:
- '200':
- description: Success - return response of type Attachments array with 0 to N Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "0f63b631-a205-496d-b1d2-e6b13a9b497b",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551483890413)/",
- "Attachments": [
- {
- "AttachmentID": "04e0a3e3-b116-456a-9f32-9706f0d33afa",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Contacts/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- parameters:
- - $ref: '#/components/parameters/ContactID'
- '/Contacts/{ContactID}/Attachments/{AttachmentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getContactAttachmentById
- summary: Retrieves a specific attachment from a specific contact using a unique attachment Id
- parameters:
- - $ref: '#/components/parameters/ContactID'
- - $ref: '#/components/parameters/AttachmentID'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Contact as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/Contacts/{ContactID}/Attachments/{FileName}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getContactAttachmentByFileName
- summary: Retrieves a specific attachment from a specific contact by file name
- parameters:
- - $ref: '#/components/parameters/ContactID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Contact as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- post:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: updateContactAttachmentByFileName
- x-hasAccountingValidationError: true
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ContactID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of type Attachments array with an updated Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "8543ae1a-297c-49b8-bf91-47decac452d5",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551485146555)/",
- "Attachments": [
- {
- "AttachmentID": "8b537c1b-bbb5-47fd-857e-370c369dda7c",
- "FileName": "HelloWorld.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Contacts/8138a266-fb42-49b2-a104-014b7045753d/Attachments/HelloWorld.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- put:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: createContactAttachmentByFileName
- x-hasAccountingValidationError: true
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ContactID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of type Attachments array with an newly created Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "a5eddf71-86aa-42f5-99e2-0aaf9caf96b6",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551484292734)/",
- "Attachments": [
- {
- "AttachmentID": "27e37b01-6996-4ebe-836c-95fd472ad674",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Contacts/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/Contacts/{ContactID}/CISSettings':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getContactCISSettings
- summary: 'Retrieves CIS settings for a specific contact in a Xero organisation'
- parameters:
- - $ref: '#/components/parameters/ContactID'
- responses:
- '200':
- description: Success - return response of type CISSettings for a specific Contact
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CISSettings'
- example: {
- "CISSetting": [
- {
- "CISContractorEnabled": true,
- "CISSubContractorEnabled": true,
- "Rate": 100,
- }
- ]
- }
- '/Contacts/{ContactID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.contacts, accounting.contacts.read]
- tags:
- - Accounting
- operationId: getContactHistory
- summary: Retrieves history records for a specific contact
- parameters:
- - $ref: '#/components/parameters/ContactID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.contacts]
- tags:
- - Accounting
- operationId: createContactHistory
- summary: Creates a new history record for a specific contact
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ContactID'
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- '400':
- $ref: '#/components/responses/400Error'
- /ContactGroups:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.contacts, accounting.contacts.read]
- tags:
- - Accounting
- operationId: getContactGroups
- summary: Retrieves the contact Id and name of each contact group
- parameters:
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="ACTIVE"
- x-example-csharp: Status==\"ACTIVE\"
- x-example-java: Status=="' + ContactGroup.StatusEnum.ACTIVE + '"
- x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ContactGroup::STATUS_ACTIVE . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::ContactGroup::ACTIVE}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Name ASC"
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of type Contact Groups array of Contact Group
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ContactGroups'
- example: {
- "Id": "b825df86-1a72-49c9-97dd-36afc7d04bd5",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551746015603)/",
- "ContactGroups": [
- {
- "ContactGroupID": "d7a86b80-8dac-4d89-a334-9dcf5753676c",
- "Name": "Suppliers",
- "Status": "ACTIVE",
- "Contacts": [],
- "HasValidationErrors": false
- },
- {
- "ContactGroupID": "ab089fd4-012f-4043-a6e4-e7be01e87e50",
- "Name": "Old Group84262",
- "Status": "ACTIVE",
- "Contacts": [],
- "HasValidationErrors": false
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.contacts]
- tags:
- - Accounting
- operationId: createContactGroup
- summary: Creates a contact group
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- x-hasAccountingValidationError: true
- x-example:
- - contact:
- is_object: true
- key: contactGroup
- keyPascal: ContactGroup
- keySnake: contact_group
- - name:
- is_last: true
- key: name
- keyPascal: Name
- default: VIPs
- object: contactGroup
- - contactGroups:
- is_object: true
- key: contactGroups
- keyPascal: ContactGroups
- - add_ContactGroup:
- is_last: true
- is_array_add: true
- key: contactGroups
- keyPascal: ContactGroups
- keySnake: contact_groups
- java: ContactGroups
- python: contact_group
- ruby: contact_group
- csharp: ContactGroup
- object: contactGroup
- responses:
- '200':
- description: Success - return response of type Contact Groups array of newly created Contact Group
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ContactGroups'
- example: {
- "Id": "5afe53f9-2271-45b8-9767-88d023b71d34",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551745740920)/",
- "ContactGroups": [
- {
- "ContactGroupID": "d7a86b80-8dac-4d89-a334-9dcf5753676c",
- "Name": "Suppliers",
- "Status": "ACTIVE",
- "Contacts": [],
- "HasValidationErrors": false
- }
- ]
- }
- '400':
- description: Validation Error - some data was incorrect returns response of type Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- example: {
- "ErrorNumber": 10,
- "Type": "ValidationException",
- "Message": "A validation exception occurred",
- "Elements": [
- {
- "ContactGroupID": "00000000-0000-0000-0000-000000000000",
- "Name": "Suppliers",
- "Contacts": [],
- "HasValidationErrors": true,
- "ValidationErrors": [
- {
- "Message": "You’ve reached the limit of 100 contact groups."
- }
- ]
- }
- ]
- }
- requestBody:
- description: ContactGroups with an array of names in request body
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ContactGroups'
- example: { "ContactGroups": [{ "Name": "VIPs" }]}
- '/ContactGroups/{ContactGroupID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.contacts, accounting.contacts.read]
- tags:
- - Accounting
- operationId: getContactGroup
- summary: Retrieves a specific contact group by using a unique contact group Id
- parameters:
- - $ref: '#/components/parameters/ContactGroupID'
- responses:
- '200':
- description: Success - return response of type Contact Groups array with a specific Contact Group
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ContactGroups'
- example: {
- "Id": "079c14f6-2c2d-464e-a2c7-0edf7e465723",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551746772976)/",
- "ContactGroups": [
- {
- "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22",
- "Name": "Oasis",
- "Status": "ACTIVE",
- "Contacts": [
- {
- "ContactID": "4e1753b9-018a-4775-b6aa-1bc7871cfee3",
- "Name": "Noel Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- }
- ],
- "HasValidationErrors": false
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.contacts]
- tags:
- - Accounting
- operationId: updateContactGroup
- summary: Updates a specific contact group
- x-hasAccountingValidationError: true
- x-example:
- - contact:
- is_object: true
- key: contactGroup
- keyPascal: ContactGroup
- keySnake: contact_group
- - name:
- is_last: true
- key: name
- keyPascal: Name
- default: Vendor
- object: contactGroup
- - contactGroups:
- is_object: true
- key: contactGroups
- keyPascal: ContactGroups
- - add_ContactGroup:
- is_last: true
- is_array_add: true
- key: contactGroups
- keyPascal: ContactGroups
- keySnake: contact_groups
- java: ContactGroups
- python: contact_group
- ruby: contact_group
- csharp: ContactGroup
- object: contactGroup
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ContactGroupID'
- responses:
- '200':
- description: Success - return response of type Contact Groups array of updated Contact Group
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ContactGroups'
- example: {
- "Id": "b1ba6cdb-1637-4209-bb92-bd0c593f3243",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551746288544)/",
- "ContactGroups": [
- {
- "ContactGroupID": "13f47537-7c1d-4e62-966e-617d76558fc5",
- "Name": "Supplier Vendor",
- "Status": "ACTIVE",
- "Contacts": [],
- "HasValidationErrors": false
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- description: an array of Contact groups with Name of specific group to update
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ContactGroups'
- example: {
- "ContactGroups":[
- {
- "Name":"Suppliers"
- }
- ]
- }
- '/ContactGroups/{ContactGroupID}/Contacts':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- put:
- security:
- - OAuth2: [accounting.contacts]
- tags:
- - Accounting
- operationId: createContactGroupContacts
- summary: Creates contacts to a specific contact group
- x-hasAccountingValidationError: true
- x-example:
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_last: true
- is_uuid: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - contacts:
- is_object: true
- key: contacts
- keyPascal: Contacts
- - add_contact:
- is_last: true
- is_array_add: true
- key: contacts
- keyPascal: Contacts
- java: Contacts
- csharp: Contact
- object: contact
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ContactGroupID'
- responses:
- '200':
- description: Success - return response of type Contacts array of added Contacts
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Contacts'
- example: {
- "Id": "99db8024-6895-45c8-a1b5-54805aa8689c",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551747495785)/",
- "Contacts": [
- {
- "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false,
- "ValidationErrors": []
- },
- {
- "ContactID": "4e1753b9-018a-4775-b6aa-1bc7871cfee3",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false,
- "ValidationErrors": []
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- description: Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Contacts'
- example: {
- "Contacts": [
- {
- "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7"
- },
- {
- "ContactID": "4e1753b9-018a-4775-b6aa-1bc7871cfee3"
- }
- ]
- }
- delete:
- security:
- - OAuth2: [accounting.contacts]
- tags:
- - Accounting
- operationId: deleteContactGroupContacts
- summary: Deletes all contacts from a specific contact group
- parameters:
- - $ref: '#/components/parameters/ContactGroupID'
- responses:
- '204':
- description: Success - return response 204 no content
- x-isEmpty: true
- '/ContactGroups/{ContactGroupID}/Contacts/{ContactID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- delete:
- security:
- - OAuth2: [accounting.contacts]
- tags:
- - Accounting
- operationId: deleteContactGroupContact
- summary: Deletes a specific contact from a contact group using a unique contact Id
- parameters:
- - $ref: '#/components/parameters/ContactGroupID'
- - $ref: '#/components/parameters/ContactID'
- responses:
- '204':
- description: Success - return response 204 no content
- x-isEmpty: true
- '400':
- $ref: '#/components/responses/400Error'
- /CreditNotes:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getCreditNotes
- summary: Retrieves any credit notes
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="DRAFT"
- x-example-csharp: Status==\"DRAFT\"
- x-example-java: Status=="' + CreditNote.StatusEnum.DRAFT + '"
- x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\CreditNote::STATUS_DRAFT . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::CreditNote::DRAFT}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "CreditNoteNumber ASC"
- schema:
- type: string
- - in: query
- 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
- example: 1
- schema:
- type: integer
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/pageSize'
- responses:
- '200':
- description: Success - return response of type Credit Notes array of CreditNote
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreditNotes'
- example: {
- "Id": "306379b0-3d75-4c77-953a-be08fa0efae8",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551812506620)/",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 2
- },
- "CreditNotes": [
- {
- "CreditNoteID": "249f15fa-f2a7-4acc-8769-0984103f2225",
- "CreditNoteNumber": "CN-0005",
- "Payments": [
- {
- "PaymentID": "6b037c9b-2e5d-4905-84d3-eabfb3438242",
- "Date": "/Date(1552521600000+0000)/",
- "Amount": 2.00,
- "Reference": "Too much",
- "CurrencyRate": 1.000000,
- "HasAccount": false,
- "HasValidationErrors": false
- }
- ],
- "ID": "249f15fa-f2a7-4acc-8769-0984103f2225",
- "CurrencyRate": 1.000000,
- "Type": "ACCRECCREDIT",
- "Reference": "US Tour",
- "RemainingCredit": 32.50,
- "Allocations": [],
- "HasAttachments": true,
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-03-05T00:00:00",
- "Date": "/Date(1551744000000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [],
- "SubTotal": 30.00,
- "TotalTax": 4.50,
- "Total": 34.50,
- "UpdatedDateUTC": "/Date(1551812346157+0000)/",
- "CurrencyCode": "NZD"
- },
- {
- "CreditNoteID": "f8021bd2-9a6a-4c19-8477-163da0b9290f",
- "CreditNoteNumber": "",
- "Payments": [],
- "ID": "f8021bd2-9a6a-4c19-8477-163da0b9290f",
- "CurrencyRate": 1.000000,
- "Type": "ACCPAYCREDIT",
- "Reference": "",
- "RemainingCredit": 46.00,
- "Allocations": [],
- "HasAttachments": false,
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-01-05T00:00:00",
- "Date": "/Date(1546646400000+0000)/",
- "Status": "DRAFT",
- "LineAmountTypes": "Exclusive",
- "LineItems": [],
- "SubTotal": 40.00,
- "TotalTax": 6.00,
- "Total": 46.00,
- "UpdatedDateUTC": "/Date(1551812506153+0000)/",
- "CurrencyCode": "NZD"
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createCreditNotes
- summary: Creates a new credit note
- x-hasAccountingValidationError: true
- x-example:
- - currDate:
- is_date: true
- key: currDate
- keyPascal: CurrDate
- keySnake: curr_date
- java_datatype: LocalDate
- default: "LocalDate.now()"
- java: "LocalDate.now()"
- node: "'2020-12-10'"
- csharp: "DateTime.Now"
- php: "new DateTime('2020-12-10')"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_last: true
- is_uuid: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - lineItem:
- is_object: true
- key: lineItem
- keyPascal: LineItem
- keySnake: line_item
- - description:
- key: description
- keyPascal: Description
- default: Foobar
- object: lineItem
- - quantity:
- nonString: true
- key: quantity
- keyPascal: Quantity
- default: 1.0
- is_money: true
- object: lineItem
- - unitAmount:
- nonString: true
- key: unitAmount
- keyPascal: UnitAmount
- keySnake: unit_amount
- default: 20.0
- is_money: true
- object: lineItem
- - accountCode:
- is_last: true
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: "000"
- object: lineItem
- - line_items:
- is_list: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- csharp: LineItem
- java: LineItem
- - add_lineitems:
- is_last: true
- is_list_add: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- java: LineItems
- python: line_item
- ruby: line_item
- csharp: LineItem
- object: lineItem
- - creditNote:
- is_object: true
- key: creditNote
- keyPascal: CreditNote
- keySnake: credit_note
- - type:
- nonString: true
- key: type
- keyPascal: Type
- default: ACCPAYCREDIT
- php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT
- node: CreditNote.TypeEnum.ACCPAYCREDIT
- ruby: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT
- python_string: ACCPAYCREDIT
- java: com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT
- csharp: CreditNote.TypeEnum.ACCPAYCREDIT
- object: creditNote
- - set_contact:
- is_variable: true
- nonString: true
- key: contact
- keyPascal: Contact
- default: contact
- object: creditNote
- - date:
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: currDate
- python: curr_date
- ruby: curr_date
- object: creditNote
- - set_lineitem:
- is_last: true
- is_variable: true
- nonString: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- default: lineItems
- python: line_items
- ruby: line_items
- object: creditNote
- - creditNotes:
- is_object: true
- key: creditNotes
- keyPascal: CreditNotes
- - add_creditNote:
- is_last: true
- is_array_add: true
- key: creditNotes
- keyPascal: CreditNotes
- keySnake: credit_notes
- java: CreditNotes
- python: credit_note
- ruby: credit_note
- csharp: CreditNote
- object: creditNote
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Credit Notes array of newly created CreditNote
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreditNotes'
- example: {
- "Id": "5e57a661-42da-4a19-96a0-00405a0e946d",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551812702713)/",
- "CreditNotes": [
- {
- "CreditNoteID": "f9256f04-5a99-4680-acb9-6b4639cc439a",
- "CreditNoteNumber": "",
- "Payments": [],
- "ID": "f9256f04-5a99-4680-acb9-6b4639cc439a",
- "CurrencyRate": 1.000000,
- "Type": "ACCPAYCREDIT",
- "Reference": "",
- "RemainingCredit": 46.00,
- "Allocations": [],
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": "",
- "AttentionTo": ""
- },
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-01-05T00:00:00",
- "Date": "/Date(1546646400000+0000)/",
- "Status": "DRAFT",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.00,
- "TaxType": "INPUT2",
- "TaxAmount": 6.00,
- "LineAmount": 40.00,
- "AccountCode": "400",
- "Tracking": [],
- "Quantity": 2.0000,
- "ValidationErrors": []
- }
- ],
- "SubTotal": 40.00,
- "TotalTax": 6.00,
- "Total": 46.00,
- "UpdatedDateUTC": "/Date(1551812702650+0000)/",
- "CurrencyCode": "NZD",
- "StatusAttributeString": "OK",
- "ValidationErrors": [
- {
- "Message": "An existing Credit Note with the specified CreditNoteID could not be found"
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- description: Credit Notes with array of CreditNote object in body of request
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreditNotes'
- example: {
- "CreditNotes":[
- {
- "Type":"ACCPAYCREDIT",
- "Contact":{
- "ContactID":"430fa14a-f945-44d3-9f97-5df5e28441b8"
- },
- "Date":"2019-01-05",
- "LineItems":[
- {
- "Description":"Foobar",
- "Quantity":2.0,
- "UnitAmount":20.0,
- "AccountCode":"400"
- }
- ]
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateOrCreateCreditNotes
- summary: Updates or creates one or more credit notes
- x-hasAccountingValidationError: true
- x-example:
- - currDate:
- is_date: true
- key: currDate
- keyPascal: CurrDate
- keySnake: curr_date
- java_datatype: LocalDate
- default: "LocalDate.now()"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- node: "'2020-12-10'"
- php: "new DateTime('2020-12-10')"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_last: true
- is_uuid: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - lineItem:
- is_object: true
- key: lineItem
- keyPascal: LineItem
- keySnake: line_item
- - description:
- key: description
- keyPascal: Description
- default: Foobar
- object: lineItem
- - quantity:
- nonString: true
- key: quantity
- keyPascal: Quantity
- default: 1.0
- is_money: true
- object: lineItem
- - unitAmount:
- nonString: true
- key: unitAmount
- keyPascal: UnitAmount
- keySnake: unit_amount
- default: 20.0
- is_money: true
- object: lineItem
- - accountCode:
- is_last: true
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: "000"
- object: lineItem
- - line_items:
- is_list: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- csharp: LineItem
- java: LineItem
- - add_lineitems:
- is_last: true
- is_list_add: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- java: LineItems
- python: line_item
- ruby: line_item
- csharp: LineItem
- object: lineItem
- - creditNote:
- is_object: true
- key: creditNote
- keyPascal: CreditNote
- keySnake: credit_note
- - type:
- nonString: true
- key: type
- keyPascal: Type
- default: ACCPAYCREDIT
- php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT
- node: CreditNote.TypeEnum.ACCPAYCREDIT
- ruby: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT
- python_string: ACCPAYCREDIT
- java: com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT
- csharp: CreditNote.TypeEnum.ACCPAYCREDIT
- object: creditNote
- - set_contact:
- is_variable: true
- nonString: true
- key: contact
- keyPascal: Contact
- default: contact
- object: creditNote
- - date:
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: currDate
- python: curr_date
- ruby: curr_date
- object: creditNote
- - set_lineitem:
- is_last: true
- is_variable: true
- nonString: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- default: lineItems
- python: line_items
- ruby: line_items
- object: creditNote
- - creditNotes:
- is_object: true
- key: creditNotes
- keyPascal: CreditNotes
- - add_creditNote:
- is_last: true
- is_array_add: true
- key: creditNotes
- keyPascal: CreditNotes
- keySnake: credit_notes
- java: CreditNotes
- python: credit_note
- ruby: credit_note
- csharp: CreditNote
- object: creditNote
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Credit Notes array of newly created CreditNote
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreditNotes'
- example: {
- "Id": "5e57a661-42da-4a19-96a0-00405a0e946d",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551812702713)/",
- "CreditNotes": [
- {
- "CreditNoteID": "f9256f04-5a99-4680-acb9-6b4639cc439a",
- "CreditNoteNumber": "",
- "Payments": [],
- "ID": "f9256f04-5a99-4680-acb9-6b4639cc439a",
- "CurrencyRate": 1.000000,
- "Type": "ACCPAYCREDIT",
- "Reference": "",
- "SentToContact": true,
- "RemainingCredit": 46.00,
- "Allocations": [],
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": "",
- "AttentionTo": ""
- },
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-01-05T00:00:00",
- "Date": "/Date(1546646400000+0000)/",
- "Status": "DRAFT",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.00,
- "TaxType": "INPUT2",
- "TaxAmount": 6.00,
- "LineAmount": 40.00,
- "AccountCode": "400",
- "Tracking": [],
- "Quantity": 2.0000,
- "ValidationErrors": []
- }
- ],
- "SubTotal": 40.00,
- "TotalTax": 6.00,
- "Total": 46.00,
- "UpdatedDateUTC": "/Date(1551812702650+0000)/",
- "CurrencyCode": "NZD",
- "StatusAttributeString": "OK",
- "ValidationErrors": [
- {
- "Message": "An existing Credit Note with the specified CreditNoteID could not be found"
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- description: an array of Credit Notes with a single CreditNote object.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreditNotes'
- example: {
- "CreditNotes":[
- {
- "Type":"ACCPAYCREDIT",
- "Contact":{
- "ContactID":"430fa14a-f945-44d3-9f97-5df5e28441b8"
- },
- "Date":"2019-01-05",
- "Status":"AUTHORISED",
- "Reference": "HelloWorld",
- "LineItems":[
- {
- "Description":"Foobar",
- "Quantity":2.0,
- "UnitAmount":20.0,
- "AccountCode":"400"
- }
- ]
- }
- ]
- }
- '/CreditNotes/{CreditNoteID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getCreditNote
- summary: Retrieves a specific credit note using a unique credit note Id
- parameters:
- - $ref: '#/components/parameters/CreditNoteID'
- - $ref: '#/components/parameters/unitdp'
- responses:
- '200':
- description: Success - return response of type Credit Notes array with a unique CreditNote
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreditNotes'
- example: {
- "Id": "dd5c5da7-08ab-486a-ac34-aea295f1614b",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551812703811)/",
- "CreditNotes": [
- {
- "CreditNoteID": "249f15fa-f2a7-4acc-8769-0984103f2225",
- "CreditNoteNumber": "CN-0005",
- "Payments": [
- {
- "PaymentID": "6b037c9b-2e5d-4905-84d3-eabfb3438242",
- "Date": "/Date(1552521600000+0000)/",
- "Amount": 2.00,
- "Reference": "Too much",
- "CurrencyRate": 1.000000,
- "HasAccount": false,
- "HasValidationErrors": false
- }
- ],
- "ID": "249f15fa-f2a7-4acc-8769-0984103f2225",
- "CurrencyRate": 1.000000,
- "Type": "ACCRECCREDIT",
- "Reference": "US Tour",
- "RemainingCredit": 32.50,
- "Allocations": [],
- "HasAttachments": true,
- "Attachments": [
- {
- "AttachmentID": "9b9c9b62-069e-4f5a-a172-183195f084bb",
- "FileName": "Screen Shot 2019-03-04 at 9.00.06 AM.png",
- "Url": "https://api.xero.com/api.xro/2.0/creditnotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/Screen%20Shot%202019-03-04%20at%209.00.06%20AM.png",
- "MimeType": "image/png",
- "ContentLength": 82334
- }
- ],
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": "",
- "AttentionTo": ""
- },
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-03-05T00:00:00",
- "Date": "/Date(1551744000000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Mic Stand",
- "UnitAmount": 30.00,
- "TaxType": "OUTPUT2",
- "TaxAmount": 4.50,
- "LineAmount": 30.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 1.0000,
- "ValidationErrors": []
- }
- ],
- "SubTotal": 30.00,
- "TotalTax": 4.50,
- "Total": 34.50,
- "UpdatedDateUTC": "/Date(1551812346157+0000)/",
- "CurrencyCode": "NZD"
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateCreditNote
- summary: Updates a specific credit note
- x-hasAccountingValidationError: true
- x-example:
- - currDate:
- is_date: true
- key: currDate
- keyPascal: CurrDate
- keySnake: curr_date
- java_datatype: LocalDate
- default: "LocalDate.now()"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- node: "'2020-12-10'"
- php: "new DateTime('2020-12-10')"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_last: true
- is_uuid: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - lineItem:
- is_object: true
- key: lineItem
- keyPascal: LineItem
- keySnake: line_item
- - description:
- key: description
- keyPascal: Description
- default: Foobar
- object: lineItem
- - quantity:
- nonString: true
- key: quantity
- keyPascal: Quantity
- default: 1.0
- is_money: true
- object: lineItem
- - unitAmount:
- nonString: true
- key: unitAmount
- keyPascal: UnitAmount
- keySnake: unit_amount
- default: 20.0
- is_money: true
- object: lineItem
- - accountCode:
- is_last: true
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: "000"
- object: lineItem
- - line_items:
- is_list: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- csharp: LineItem
- java: LineItem
- - add_lineitems:
- is_last: true
- is_list_add: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- java: LineItems
- python: line_item
- ruby: line_item
- csharp: LineItem
- object: lineItem
- - creditNote:
- is_object: true
- key: creditNote
- keyPascal: CreditNote
- keySnake: credit_note
- - type:
- nonString: true
- key: type
- keyPascal: Type
- default: ACCPAYCREDIT
- php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT
- node: CreditNote.TypeEnum.ACCPAYCREDIT
- ruby: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT
- python_string: ACCPAYCREDIT
- java: com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT
- csharp: CreditNote.TypeEnum.ACCPAYCREDIT
- object: creditNote
- - status:
- nonString: true
- key: status
- keyPascal: Status
- default: AUTHORISED
- php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::STATUS_AUTHORISED
- node: CreditNote.StatusEnum.AUTHORISED
- ruby: XeroRuby::Accounting::CreditNote::AUTHORISED
- python_string: AUTHORISED
- java: com.xero.models.accounting.CreditNote.StatusEnum.AUTHORISED
- csharp: CreditNote.StatusEnum.AUTHORISED
- object: creditNote
- - reference:
- key: reference
- keyPascal: Reference
- default: My ref.
- object: creditNote
- - set_contact:
- is_variable: true
- nonString: true
- key: contact
- keyPascal: Contact
- default: contact
- object: creditNote
- - date:
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: currDate
- python: curr_date
- ruby: curr_date
- object: creditNote
- - set_lineitem:
- is_last: true
- is_variable: true
- nonString: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- default: lineItems
- python: line_items
- ruby: line_items
- object: creditNote
- - creditNotes:
- is_object: true
- key: creditNotes
- keyPascal: CreditNotes
- - add_creditNote:
- is_last: true
- is_array_add: true
- key: creditNotes
- keyPascal: CreditNotes
- keySnake: credit_notes
- java: CreditNotes
- python: credit_note
- ruby: credit_note
- csharp: CreditNote
- object: creditNote
- parameters:
- - $ref: '#/components/parameters/CreditNoteID'
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Credit Notes array with updated CreditNote
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreditNotes'
- example: {
- "Id": "db2f7659-6044-418d-a4c6-d4b93eba4e1e",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551812704253)/",
- "CreditNotes": [
- {
- "CreditNoteID": "f9256f04-5a99-4680-acb9-6b4639cc439a",
- "CreditNoteNumber": "",
- "Payments": [],
- "ID": "f9256f04-5a99-4680-acb9-6b4639cc439a",
- "CurrencyRate": 1.000000,
- "Type": "ACCPAYCREDIT",
- "Reference": "HelloWorld",
- "RemainingCredit": 46.00,
- "Allocations": [],
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": "",
- "AttentionTo": ""
- },
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-01-05T00:00:00",
- "Date": "/Date(1546646400000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.00,
- "TaxType": "INPUT2",
- "TaxAmount": 6.00,
- "LineAmount": 40.00,
- "AccountCode": "400",
- "Tracking": [],
- "Quantity": 2.0000,
- "ValidationErrors": []
- }
- ],
- "SubTotal": 40.00,
- "TotalTax": 6.00,
- "Total": 46.00,
- "UpdatedDateUTC": "/Date(1551812704223+0000)/",
- "CurrencyCode": "NZD"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- description: an array of Credit Notes containing credit note details to update
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreditNotes'
- example: {
- "CreditNotes": [
- {
- "Type": "ACCPAYCREDIT",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8"
- },
- "Date": "2019-01-05",
- "Status": "AUTHORISED",
- "Reference": "HelloWorld",
- "SentToContact": true,
- "LineItems": [
- {
- "Description": "Foobar",
- "Quantity": 2,
- "UnitAmount": 20,
- "AccountCode": "400"
- }
- ]
- }
- ]
- }
- '/CreditNotes/{CreditNoteID}/Attachments':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getCreditNoteAttachments
- summary: Retrieves attachments for a specific credit notes
- parameters:
- - $ref: '#/components/parameters/CreditNoteID'
- responses:
- '200':
- description: Success - return response of type Attachments array with all Attachment for specific Credit Note
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "2bb15054-3868-4f85-a9c6-0402ec8c1201",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551822670731)/",
- "Attachments": [
- {
- "AttachmentID": "b7eb1fc9-a0f9-4e8e-9373-6689f5350832",
- "FileName": "HelloWorld.png",
- "Url": "https://api.xero.com/api.xro/2.0/CreditNotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/HelloWorld.png",
- "MimeType": "image/png",
- "ContentLength": 76091
- }
- ]
- }
- '/CreditNotes/{CreditNoteID}/Attachments/{AttachmentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getCreditNoteAttachmentById
- summary: Retrieves a specific attachment from a specific credit note using a unique attachment Id
- parameters:
- - $ref: '#/components/parameters/CreditNoteID'
- - $ref: '#/components/parameters/AttachmentID'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Credit Note as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/CreditNotes/{CreditNoteID}/Attachments/{FileName}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getCreditNoteAttachmentByFileName
- summary: Retrieves a specific attachment on a specific credit note by file name
- parameters:
- - $ref: '#/components/parameters/CreditNoteID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Credit Note as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- post:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: updateCreditNoteAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Updates attachments on a specific credit note by file name
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/CreditNoteID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of type Attachments array with updated Attachment for specific Credit Note
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "27253066-8c4d-4e34-a251-7a749b72de40",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551828247939)/",
- "Attachments": [
- {
- "AttachmentID": "103e49f1-e47c-4b4d-b5e8-77d9d00fa70a",
- "FileName": "HelloWorld.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/CreditNotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/HelloWorld.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- put:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: createCreditNoteAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Creates an attachment for a specific credit note
- parameters:
- - $ref: '#/components/parameters/CreditNoteID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/includeOnline'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Attachments array with newly created Attachment for specific Credit Note
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "22a8d402-5dea-40ed-9d01-26896429f649",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551822953320)/",
- "Attachments": [
- {
- "AttachmentID": "91bbae3f-5de5-4e3d-875f-8662f25897bd",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/CreditNotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/CreditNotes/{CreditNoteID}/pdf':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getCreditNoteAsPdf
- x-path: '/CreditNotes/{CreditNoteID}'
- summary: Retrieves credit notes as PDF files
- parameters:
- - $ref: '#/components/parameters/CreditNoteID'
- responses:
- '200':
- description: Success - return response of binary data from the Attachment to a Credit Note
- content:
- application/pdf:
- schema:
- type: string
- format: binary
- '/CreditNotes/{CreditNoteID}/Allocations':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createCreditNoteAllocation
- summary: Creates allocation for a specific credit note
- x-hasAccountingValidationError: true
- x-example:
- - currDate:
- is_date: true
- key: currDate
- keyPascal: CurrDate
- keySnake: curr_date
- java_datatype: LocalDate
- default: "LocalDate.now()"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- node: "'2020-12-10'"
- php: "new DateTime('2020-12-10')"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - invoice:
- is_object: true
- key: invoice
- keyPascal: Invoice
- - invoiceID:
- is_last: true
- is_uuid: true
- key: invoiceID
- keyPascal: InvoiceID
- default: 00000000-0000-0000-0000-000000000000
- object: invoice
- - allocation:
- is_object: true
- key: allocation
- keyPascal: Allocation
- - amount:
- nonString: true
- key: amount
- keyPascal: Amount
- default: 1.0
- is_money: true
- csharp: new decimal(1.0)
- object: allocation
- - date:
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: currDate
- python: curr_date
- ruby: curr_date
- object: allocation
- - set_invoice:
- is_last: true
- is_variable: true
- nonString: true
- key: invoice
- keyPascal: Invoice
- default: invoice
- object: allocation
- - allocations:
- is_object: true
- key: allocations
- keyPascal: Allocations
- - add_allocation:
- is_last: true
- is_array_add: true
- key: allocations
- keyPascal: Allocations
- java: Allocations
- csharp: Allocation
- object: allocation
- parameters:
- - $ref: '#/components/parameters/CreditNoteID'
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Allocations array with newly created Allocation for specific Credit Note
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Allocations'
- example: {
- "Id": "73452751-6eaa-4bcb-86f5-4c013316f4cf",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551828543255)/",
- "Allocations": [
- {
- "Amount": 1.00,
- "Date": "/Date(1551744000000+0000)/",
- "Invoice": {
- "InvoiceID": "c45720a1-ade3-4a38-a064-d15489be6841",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": [],
- "ValidationErrors": []
- },
- "CreditNote": {
- "CreditNoteID": "7be578f5-63af-45c8-9b00-dcc4732baf0b",
- "ID": "7be578f5-63af-45c8-9b00-dcc4732baf0b",
- "LineItems": []
- },
- "ValidationErrors": []
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- description: Allocations with array of Allocation object in body of request.
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Allocations'
- example: {
- "Allocations": [
- {
- "Invoice": {
- "LineItems": [],
- "InvoiceID": "c45720a1-ade3-4a38-a064-d15489be6841"
- },
- "Amount": 1,
- "Date": "2019-03-05"
- }
- ]
- }
- '/CreditNotes/{CreditNoteID}/Allocations/{AllocationID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- delete:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: deleteCreditNoteAllocations
- summary: Deletes an Allocation from a Credit Note
- parameters:
- - $ref: '#/components/parameters/CreditNoteID'
- - $ref: '#/components/parameters/AllocationID'
- responses:
- '200':
- description: Success - return response of type Allocation with the isDeleted flag as true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Allocation'
- example: {
- "AllocationId": "2bb15054-3868-4f85-a9c6-0402ec8c1201",
- "Date": "/Date(1551822670731)/",
- "Invoice": [
- {
- "InvoiceID": "b7eb1fc9-a0f9-4e8e-9373-6689f5350832",
- }
- ],
- "IsDeleted": true,
- }
- '/CreditNotes/{CreditNoteID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getCreditNoteHistory
- summary: Retrieves history records of a specific credit note
- parameters:
- - $ref: '#/components/parameters/CreditNoteID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createCreditNoteHistory
- summary: Retrieves history records of a specific credit note
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/CreditNoteID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- /Currencies:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getCurrencies
- summary: Retrieves currencies for your Xero organisation
- parameters:
- - in: query
- name: where
- description: Filter by an any element
- example: Code=="USD"
- x-example-csharp: Code==\"USD\"
- x-example-php: Code=="' . \XeroAPI\XeroPHP\Models\Accounting\CurrencyCode::USD . '"
- x-example-ruby: Code==#{XeroRuby::Accounting::CurrencyCode::USD}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Code ASC"
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of type Currencies array with all Currencies
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Currencies'
- example: {
- "Id": "e6803fc8-8035-4251-b3e4-39d6b2de0f4a",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552322853043)/",
- "Currencies": [
- {
- "Code": "NZD",
- "Description": "New Zealand Dollar"
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: createCurrency
- summary: Create a new currency for a Xero organisation
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- x-hasAccountingValidationError: true
- x-example:
- - currency:
- is_object: true
- key: currency
- keyPascal: Currency
- - code:
- nonString: true
- key: code
- keyPascal: Code
- default: USD
- php: XeroAPI\XeroPHP\Models\Accounting\CurrencyCode::USD
- node: CurrencyCode.USD
- ruby: XeroRuby::Accounting::CurrencyCode::USD
- python: CurrencyCode.USD
- java: com.xero.models.accounting.CurrencyCode.USD
- csharp: CurrencyCode.USD
- object: currency
- - description:
- is_last: true
- key: description
- keyPascal: Description
- default: United States Dollar
- object: currency
- responses:
- '200':
- description: Unsupported - return response incorrect exception, API is not able to create new Currency
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Currencies'
- example: {
- "Currencies": [
- {
- "Code": "USD",
- "Description": "United States Dollar"
- }
- ]
- }
- requestBody:
- required: true
- description: Currency object in the body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Currency'
- example: {
- "Code": "USD",
- "Description": "United States Dollar"
- }
- /Employees:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getEmployees
- summary: Retrieves employees used in Xero payrun
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="ACTIVE"
- x-example-csharp: Status==\"ACTIVE\"
- x-example-java: Status=="' + Employee.StatusEnum.ACTIVE + '"
- x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Employee::STATUS_ACTIVE . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::Employee::ACTIVE}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: LastName ASC
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of type Employees array with all Employee
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Employees'
- example: {
- "Id": "593cbccc-5cd2-4cd2-be5e-150f0843709e",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552325082775)/",
- "Employees": [
- {
- "EmployeeID": "972615c5-ad3d-47a0-b579-20370d374578",
- "Status": "ACTIVE",
- "FirstName": "Tony",
- "LastName": "Stark",
- "ExternalLink": {
- "Url": "http://twitter.com/#!/search/Stark+Industries",
- "Description": "Go to external link"
- },
- "UpdatedDateUTC": "/Date(1552324681593+0000)/"
- },
- {
- "EmployeeID": "ad3db144-6362-459c-8c36-5d31d196e629",
- "Status": "ACTIVE",
- "FirstName": "Bruce",
- "LastName": "Banner",
- "ExternalLink": {
- "Url": "http://twitter.com/#!/search/Nick+Fury",
- "Description": "Go to external link"
- },
- "UpdatedDateUTC": "/Date(1552325081303+0000)/"
- },
- {
- "EmployeeID": "e1ada26b-a10e-4065-a941-af34b53740e3",
- "Status": "ACTIVE",
- "FirstName": "Nick",
- "LastName": "Fury",
- "ExternalLink": {
- "Url": "http://twitter.com/#!/search/Nick+Fury",
- "Description": "Go to external link"
- },
- "UpdatedDateUTC": "/Date(1552324737990+0000)/"
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: createEmployees
- summary: Creates new employees used in Xero payrun
- x-hasAccountingValidationError: true
- x-example:
- - employee:
- is_object: true
- key: employee
- keyPascal: Employee
- - firstName:
- key: firstName
- keyPascal: FirstName
- keySnake: first_name
- default: Nick
- object: employee
- - lastName:
- is_last: true
- key: lastName
- keyPascal: LastName
- keySnake: last_name
- default: Fury
- object: employee
- - employees:
- is_object: true
- key: employees
- keyPascal: Employees
- - add_employee:
- is_last: true
- is_array_add: true
- key: employees
- keyPascal: Employees
- java: Employees
- csharp: Employee
- object: employee
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Employees array with new Employee
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Employees'
- example: {
- "Id": "0d6a08e7-6936-4828-a1bc-e4595e0ef778",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552324736508)/",
- "Employees": [
- {
- "EmployeeID": "e1ada26b-a10e-4065-a941-af34b53740e3",
- "Status": "ACTIVE",
- "FirstName": "Nick",
- "LastName": "Fury",
- "ExternalLink": {
- "Url": "http://twitter.com/#!/search/Nick+Fury",
- "Description": "Go to external link"
- },
- "UpdatedDateUTC": "/Date(1552324736463+0000)/"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Employees with array of Employee object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Employees'
- example: {
- "Employees": [
- {
- "FirstName": "Nick",
- "LastName": "Fury",
- "ExternalLink": {
- "Url": "http://twitter.com/#!/search/Nick+Fury"
- }
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: updateOrCreateEmployees
- summary: Creates a single new employees used in Xero payrun
- x-hasAccountingValidationError: true
- x-example:
- - employee:
- is_object: true
- key: employee
- keyPascal: Employee
- - firstName:
- key: firstName
- keyPascal: FirstName
- keySnake: first_name
- default: Nick
- object: employee
- - lastName:
- is_last: true
- key: lastName
- keyPascal: LastName
- keySnake: last_name
- default: Fury
- object: employee
- - employees:
- is_object: true
- key: employees
- keyPascal: Employees
- - add_employee:
- is_last: true
- is_array_add: true
- key: employees
- keyPascal: Employees
- java: Employees
- csharp: Employee
- object: employee
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Employees array with new Employee
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Employees'
- example: {
- "Id": "0d6a08e7-6936-4828-a1bc-e4595e0ef778",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552324736508)/",
- "Employees": [
- {
- "EmployeeID": "e1ada26b-a10e-4065-a941-af34b53740e3",
- "Status": "ACTIVE",
- "FirstName": "Nick",
- "LastName": "Fury",
- "ExternalLink": {
- "Url": "http://twitter.com/#!/search/Nick+Fury",
- "Description": "Go to external link"
- },
- "UpdatedDateUTC": "/Date(1552324736463+0000)/"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Employees with array of Employee object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Employees'
- example: {
- "Employees": [
- {
- "FirstName": "Nick",
- "LastName": "Fury",
- "ExternalLink": {
- "Url": "http://twitter.com/#!/search/Nick+Fury"
- }
- }
- ]
- }
- '/Employees/{EmployeeID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getEmployee
- summary: Retrieves a specific employee used in Xero payrun using a unique employee Id
- parameters:
- - $ref: '#/components/parameters/EmployeeID'
- responses:
- '200':
- description: Success - return response of type Employees array with specified Employee
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Employees'
- example: {
- "Id": "417a529e-4f8d-4b1a-8816-7100245cf8b2",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552325084085)/",
- "Employees": [
- {
- "EmployeeID": "972615c5-ad3d-47a0-b579-20370d374578",
- "Status": "ACTIVE",
- "FirstName": "Tony",
- "LastName": "Stark",
- "ExternalLink": {
- "Url": "http://twitter.com/#!/search/Stark+Industries",
- "Description": "Go to external link"
- },
- "UpdatedDateUTC": "/Date(1552324681593+0000)/"
- }
- ]
- }
- /ExpenseClaims:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getExpenseClaims
- summary: Retrieves expense claims
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="SUBMITTED"
- x-example-csharp: Status==\"SUBMITTED\"
- x-example-java: Status=="' + ExpenseClaim.StatusEnum.SUBMITTED + '"
- x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim::STATUS_SUBMITTED . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::ExpenseClaim::SUBMITTED}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Status ASC"
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of type ExpenseClaims array with all ExpenseClaims
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ExpenseClaims'
- example: {
- "Id": "f6a8867e-af29-41ee-8f77-855f5ff214fe",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552325853538)/",
- "ExpenseClaims": [
- {
- "ExpenseClaimID": "646b15ab-b874-4e13-82ae-f4385b2ac4b6",
- "Status": "AUTHORISED",
- "UpdatedDateUTC": "/Date(1552325851767+0000)/",
- "User": {
- "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273",
- "EmailAddress": "api@xero.com",
- "FirstName": "API ",
- "LastName": "Team",
- "UpdatedDateUTC": "/Date(1511957179217+0000)/",
- "IsSubscriber": true,
- "OrganisationRole": "FINANCIALADVISER"
- },
- "Receipts": [],
- "Payments": [],
- "Total": 40.00,
- "AmountDue": 40.00,
- "AmountPaid": 0.00,
- "ReportingDate": "/Date(1552262400000+0000)/"
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createExpenseClaims
- summary: Creates expense claims
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- x-hasAccountingValidationError: true
- x-example:
- - currDate:
- is_date: true
- key: currDate
- keyPascal: CurrDate
- keySnake: curr_date
- java_datatype: LocalDate
- default: "LocalDate.now()"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- node: "'2020-12-10'"
- php: "new DateTime('2020-12-10')"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - user:
- is_object: true
- key: user
- keyPascal: User
- - userID:
- is_last: true
- is_uuid: true
- key: userID
- keyPascal: UserID
- keySnake: user_id
- default: 00000000-0000-0000-0000-000000000000
- object: user
- - receipt:
- is_object: true
- key: receipt
- keyPascal: Receipt
- - receiptID:
- is_uuid: true
- key: receiptID
- keyPascal: ReceiptID
- keySnake: receipt_id
- default: 00000000-0000-0000-0000-000000000000
- object: receipt
- - date:
- is_last: true
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: currDate
- python: curr_date
- ruby: curr_date
- object: receipt
- - receipts:
- is_list: true
- key: receipts
- keyPascal: Receipt
- - add_receipts:
- is_last: true
- is_list_add: true
- key: receipts
- keyPascal: Receipts
- object: receipt
- - expenseClaim:
- is_object: true
- key: expenseClaim
- keyPascal: ExpenseClaim
- keySnake: expense_claim
- - status:
- nonString: true
- key: status
- keyPascal: Status
- default: SUBMITTED
- php: XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim::STATUS_SUBMITTED
- node: ExpenseClaim.StatusEnum.SUBMITTED
- ruby: XeroRuby::Accounting::ExpenseClaim::SUBMITTED
- python_string: SUBMITTED
- java: com.xero.models.accounting.ExpenseClaim.StatusEnum.SUBMITTED
- csharp: ExpenseClaim.StatusEnum.SUBMITTED
- object: expenseClaim
- - set_user:
- is_variable: true
- nonString: true
- key: user
- keyPascal: User
- default: user
- object: expenseClaim
- - set_receipt:
- is_last: true
- is_variable: true
- nonString: true
- key: receipts
- keyPascal: Receipts
- default: receipts
- object: expenseClaim
- - expenseClaims:
- is_object: true
- key: expenseClaims
- keyPascal: ExpenseClaims
- - add_expenseClaim:
- is_array_add: true
- is_last: true
- key: expenseClaims
- keyPascal: ExpenseClaims
- keySnake: expense_claims
- java: ExpenseClaims
- python: expense_claim
- ruby: expense_claim
- csharp: ExpenseClaim
- object: expenseClaim
- requestBody:
- required: true
- description: ExpenseClaims with array of ExpenseClaim object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ExpenseClaims'
- example: {
- "ExpenseClaims": [
- {
- "Status": "SUBMITTED",
- "User": {
- "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273"
- },
- "Receipts": [
- {
- "Lineitems": [],
- "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816"
- }
- ]
- }
- ]
- }
- responses:
- '200':
- description: Success - return response of type ExpenseClaims array with newly created ExpenseClaim
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ExpenseClaims'
- example: {
- "Id": "4a0879a6-3860-4b73-adc6-f6a0e0f68fc8",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552325850201)/",
- "ExpenseClaims": [
- {
- "ExpenseClaimID": "646b15ab-b874-4e13-82ae-f4385b2ac4b6",
- "Status": "SUBMITTED",
- "UpdatedDateUTC": "/Date(1552325850107+0000)/",
- "User": {
- "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273",
- "EmailAddress": "api@xero.com",
- "FirstName": "API ",
- "LastName": "Team",
- "UpdatedDateUTC": "/Date(1511957179217+0000)/",
- "IsSubscriber": true,
- "OrganisationRole": "FINANCIALADVISER"
- },
- "Receipts": [
- {
- "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816",
- "ReceiptNumber": 1,
- "Status": "SUBMITTED",
- "User": {
- "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273",
- "EmailAddress": "api@xero.com",
- "FirstName": "API ",
- "LastName": "Team",
- "UpdatedDateUTC": "/Date(1511957179217+0000)/",
- "IsSubscriber": true,
- "OrganisationRole": "FINANCIALADVISER"
- },
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Date": "/Date(1552348800000+0000)/",
- "UpdatedDateUTC": "/Date(1552325848457+0000)/",
- "Reference": "",
- "LineAmountTypes": "NoTax",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.00,
- "TaxType": "NONE",
- "TaxAmount": 0.00,
- "LineAmount": 40.00,
- "Tracking": [],
- "Quantity": 2.0000
- }
- ],
- "SubTotal": 40.00,
- "TotalTax": 0.00,
- "Total": 40.00,
- "ID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816",
- "HasAttachments": false
- }
- ],
- "Payments": [],
- "Total": 40.00,
- "AmountDue": 40.00,
- "AmountPaid": 0.00,
- "StatusAttributeString": "OK"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- '/ExpenseClaims/{ExpenseClaimID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getExpenseClaim
- summary: Retrieves a specific expense claim using a unique expense claim Id
- parameters:
- - $ref: '#/components/parameters/ExpenseClaimID'
- responses:
- '200':
- description: Success - return response of type ExpenseClaims array with specified ExpenseClaim
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ExpenseClaims'
- example: {
- "Id": "b54bb45d-37da-4f53-9f1d-536302d6bad7",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552325854864)/",
- "ExpenseClaims": [
- {
- "ExpenseClaimID": "646b15ab-b874-4e13-82ae-f4385b2ac4b6",
- "Status": "AUTHORISED",
- "UpdatedDateUTC": "/Date(1552325851767+0000)/",
- "User": {
- "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273",
- "EmailAddress": "api@xero.com",
- "FirstName": "API ",
- "LastName": "Team",
- "UpdatedDateUTC": "/Date(1511957179217+0000)/",
- "IsSubscriber": true,
- "OrganisationRole": "FINANCIALADVISER"
- },
- "Receipts": [
- {
- "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816",
- "ReceiptNumber": 1,
- "Status": "AUTHORISED",
- "User": {
- "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273",
- "EmailAddress": "api@xero.com",
- "FirstName": "API ",
- "LastName": "Team",
- "UpdatedDateUTC": "/Date(1511957179217+0000)/",
- "IsSubscriber": true,
- "OrganisationRole": "FINANCIALADVISER"
- },
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Date": "/Date(1552348800000+0000)/",
- "UpdatedDateUTC": "/Date(1552325848457+0000)/",
- "Reference": "",
- "LineAmountTypes": "NoTax",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.00,
- "TaxType": "NONE",
- "TaxAmount": 0.00,
- "LineAmount": 40.00,
- "AccountCode": "400",
- "Tracking": [],
- "Quantity": 2.0000
- }
- ],
- "SubTotal": 40.00,
- "TotalTax": 0.00,
- "Total": 40.00,
- "ID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816",
- "HasAttachments": false
- }
- ],
- "Payments": [],
- "Total": 40.00,
- "AmountDue": 40.00,
- "AmountPaid": 0.00,
- "ReportingDate": "/Date(1552262400000+0000)/"
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateExpenseClaim
- summary: Updates a specific expense claims
- x-hasAccountingValidationError: true
- x-example:
- - currDate:
- is_date: true
- key: currDate
- keyPascal: CurrDate
- keySnake: curr_date
- java_datatype: LocalDate
- default: "LocalDate.now()"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- node: "'2020-12-10'"
- php: "new DateTime('2020-12-10')"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - user:
- is_object: true
- key: user
- keyPascal: User
- - userID:
- is_last: true
- is_uuid: true
- key: userID
- keyPascal: UserID
- keySnake: user_id
- default: 00000000-0000-0000-0000-000000000000
- object: user
- - receipt:
- is_object: true
- key: receipt
- keyPascal: Receipt
- - receiptID:
- is_uuid: true
- key: receiptID
- keyPascal: ReceiptID
- keySnake: receipt_id
- default: 00000000-0000-0000-0000-000000000000
- object: receipt
- - date:
- is_last: true
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: currDate
- python: curr_date
- ruby: curr_date
- object: receipt
- - receipts:
- is_list: true
- key: receipts
- keyPascal: Receipt
- - add_receipts:
- is_last: true
- is_list_add: true
- key: receipts
- keyPascal: Receipts
- object: receipt
- - expenseClaim:
- is_object: true
- key: expenseClaim
- keyPascal: ExpenseClaim
- keySnake: expense_claim
- - status:
- nonString: true
- key: status
- keyPascal: Status
- default: SUBMITTED
- php: XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim::STATUS_SUBMITTED
- node: ExpenseClaim.StatusEnum.SUBMITTED
- ruby: XeroRuby::Accounting::ExpenseClaim::SUBMITTED
- python_string: SUBMITTED
- java: com.xero.models.accounting.ExpenseClaim.StatusEnum.SUBMITTED
- csharp: ExpenseClaim.StatusEnum.SUBMITTED
- object: expenseClaim
- - set_user:
- is_variable: true
- nonString: true
- key: user
- keyPascal: User
- default: user
- object: expenseClaim
- - set_receipt:
- is_last: true
- is_variable: true
- nonString: true
- key: receipts
- keyPascal: Receipts
- default: receipts
- object: expenseClaim
- - expenseClaims:
- is_object: true
- key: expenseClaims
- keyPascal: ExpenseClaims
- - add_expenseClaim:
- is_array_add: true
- is_last: true
- key: expenseClaims
- keyPascal: ExpenseClaims
- keySnake: expense_claims
- java: ExpenseClaims
- python: expense_claim
- ruby: expense_claim
- csharp: ExpenseClaim
- object: expenseClaim
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ExpenseClaimID'
- responses:
- '200':
- description: Success - return response of type ExpenseClaims array with updated ExpenseClaim
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ExpenseClaims'
- example: {
- "Id": "8ee87f9c-058b-4f1b-b5b2-29569bf055d7",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552325851907)/",
- "ExpenseClaims": [
- {
- "ExpenseClaimID": "646b15ab-b874-4e13-82ae-f4385b2ac4b6",
- "Status": "AUTHORISED",
- "UpdatedDateUTC": "/Date(1552325851767+0000)/",
- "User": {
- "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273",
- "EmailAddress": "api@xero.com",
- "FirstName": "API ",
- "LastName": "Team",
- "UpdatedDateUTC": "/Date(1511957179217+0000)/",
- "IsSubscriber": true,
- "OrganisationRole": "FINANCIALADVISER"
- },
- "Receipts": [
- {
- "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816",
- "ReceiptNumber": 1,
- "Status": "AUTHORISED",
- "User": {
- "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273",
- "EmailAddress": "api@xero.com",
- "FirstName": "API ",
- "LastName": "Team",
- "UpdatedDateUTC": "/Date(1511957179217+0000)/",
- "IsSubscriber": true,
- "OrganisationRole": "FINANCIALADVISER"
- },
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Date": "/Date(1552348800000+0000)/",
- "UpdatedDateUTC": "/Date(1552325848457+0000)/",
- "Reference": "",
- "LineAmountTypes": "NoTax",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.00,
- "TaxType": "NONE",
- "TaxAmount": 0.00,
- "LineAmount": 40.00,
- "AccountCode": "400",
- "Tracking": [],
- "Quantity": 2.0000
- }
- ],
- "SubTotal": 40.00,
- "TotalTax": 0.00,
- "Total": 40.00,
- "ID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816",
- "HasAttachments": false
- }
- ],
- "Payments": [],
- "Total": 40.00,
- "AmountDue": 40.00,
- "AmountPaid": 0.00,
- "ReportingDate": "/Date(1552262400000+0000)/"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ExpenseClaims'
- example: {
- "ExpenseClaims": [
- {
- "Status": "SUBMITTED",
- "User": {
- "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273"
- },
- "Receipts": [
- {
- "Lineitems": [],
- "ReceiptID": "dc1c7f6d-0a4c-402f-acac-551d62ce5816"
- }
- ]
- }
- ]
- }
- '/ExpenseClaims/{ExpenseClaimID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getExpenseClaimHistory
- summary: Retrieves history records of a specific expense claim
- parameters:
- - $ref: '#/components/parameters/ExpenseClaimID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createExpenseClaimHistory
- summary: Creates a history record for a specific expense claim
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ExpenseClaimID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- /Invoices:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getInvoices
- summary: Retrieves sales invoices or purchase bills
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="DRAFT"
- x-example-java: Status=="' + Invoice.StatusEnum.DRAFT + '"
- x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::Invoice::DRAFT}
- x-example-csharp: Status==\"DRAFT\"
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "InvoiceNumber ASC"
- schema:
- type: string
- - in: query
- name: IDs
- x-snake: ids
- description: Filter by a comma-separated list of InvoicesIDs.
- style: form
- explode: false
- example: '"00000000-0000-0000-0000-000000000000"'
- x-example-java: Arrays.asList(UUID.fromString("00000000-0000-0000-0000-000000000000"))
- x-example-php: '"00000000-0000-0000-0000-000000000000"'
- x-example-csharp: new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")};
- schema:
- type: array
- items:
- type: string
- format: uuid
- - in: query
- name: InvoiceNumbers
- x-snake: invoice_numbers
- description: Filter by a comma-separated list of InvoiceNumbers.
- style: form
- explode: false
- example: '"INV-001", "INV-002"'
- x-example-java: Arrays.asList("INV-001","INV-002")
- x-example-php: '"INV-001", "INV-002"'
- x-example-csharp: new List<string>{"INV-001","INV-002"};
- schema:
- type: array
- items:
- type: string
- - in: query
- name: ContactIDs
- x-snake: contact_ids
- description: Filter by a comma-separated list of ContactIDs.
- style: form
- explode: false
- example: '"00000000-0000-0000-0000-000000000000"'
- x-example-java: Arrays.asList(UUID.fromString("00000000-0000-0000-0000-000000000000"))
- x-example-php: '"00000000-0000-0000-0000-000000000000"'
- x-example-csharp: new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")};
- schema:
- type: array
- items:
- type: string
- format: uuid
- - in: query
- name: Statuses
- x-snake: statuses
- description: Filter by a comma-separated list Statuses. For faster response times we recommend using these explicit parameters instead of passing OR conditions into the Where filter.
- explode: false
- example: '"DRAFT", "SUBMITTED"'
- x-example-java: Arrays.asList("DRAFT","SUBMITTED")
- x-example-php: '"DRAFT", "SUBMITTED"'
- x-example-csharp: new List<string>{"DRAFT","SUBMITTED"};
- schema:
- type: array
- items:
- type: string
- - in: query
- 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
- example: 1
- schema:
- type: integer
- - in: query
- name: includeArchived
- x-snake: include_archived
- description: e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response
- example: true
- x-example-python: "True"
- schema:
- type: boolean
- - in: query
- name: createdByMyApp
- x-snake: created_by_my_app
- description: When set to true you'll only retrieve Invoices created by your app
- example: false
- x-example-python: "False"
- schema:
- type: boolean
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/summaryOnly'
- - $ref: '#/components/parameters/pageSize'
- - $ref: '#/components/parameters/searchTerm'
- responses:
- '200':
- description: Success - return response of type Invoices array with all Invoices
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Invoices'
- example: {
- "Id": "900c500b-e83c-4ce2-902a-b8ba04751748",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552326816230)/",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 3
- },
- "Invoices": [
- {
- "Type": "ACCREC",
- "InvoiceID": "d4956132-ed94-4dd7-9eaa-aa22dfdf06f2",
- "InvoiceNumber": "INV-0001",
- "Reference": "Red Fish, Blue Fish",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "AmountDue": 0.00,
- "AmountPaid": 0.00,
- "AmountCredited": 0.00,
- "SentToContact": true,
- "CurrencyRate": 1.000000,
- "HasErrors": false,
- "IsDiscounted": false,
- "HasAttachments": false,
- "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0",
- "Contact": {
- "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7",
- "Name": "Barney Rubble-83203",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2018-10-20T00:00:00",
- "Date": "/Date(1539993600000+0000)/",
- "DueDateString": "2018-12-30T00:00:00",
- "DueDate": "/Date(1546128000000+0000)/",
- "Status": "VOIDED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [],
- "SubTotal": 40.00,
- "TotalTax": 0.00,
- "Total": 40.00,
- "UpdatedDateUTC": "/Date(1541176290160+0000)/",
- "CurrencyCode": "NZD"
- },
- {
- "Type": "ACCREC",
- "InvoiceID": "046d8a6d-1ae1-4b4d-9340-5601bdf41b87",
- "InvoiceNumber": "INV-0002",
- "Reference": "Red Fish, Blue Fish",
- "Payments": [
- {
- "PaymentID": "99ea7f6b-c513-4066-bc27-b7c65dcd76c2",
- "Date": "/Date(1543449600000+0000)/",
- "Amount": 46.00,
- "CurrencyRate": 1.000000,
- "HasAccount": false,
- "HasValidationErrors": false
- }
- ],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "AmountDue": 0.00,
- "AmountPaid": 46.00,
- "AmountCredited": 0.00,
- "SentToContact": true,
- "CurrencyRate": 1.000000,
- "HasErrors": false,
- "IsDiscounted": false,
- "HasAttachments": false,
- "Contact": {
- "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7",
- "Name": "Barney Rubble-83203",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2018-10-20T00:00:00",
- "Date": "/Date(1539993600000+0000)/",
- "DueDateString": "2018-12-30T00:00:00",
- "DueDate": "/Date(1546128000000+0000)/",
- "Status": "PAID",
- "LineAmountTypes": "Exclusive",
- "LineItems": [],
- "SubTotal": 40.00,
- "TotalTax": 6.00,
- "Total": 46.00,
- "UpdatedDateUTC": "/Date(1541176592690+0000)/",
- "CurrencyCode": "NZD",
- "FullyPaidOnDate": "/Date(1543449600000+0000)/"
- },
- {
- "Type": "ACCREC",
- "InvoiceID": "7ef31b20-de17-4312-8382-412f869b1510",
- "InvoiceNumber": "INV-0003",
- "Reference": "",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "AmountDue": 115.00,
- "AmountPaid": 0.00,
- "AmountCredited": 0.00,
- "CurrencyRate": 1.000000,
- "HasErrors": false,
- "IsDiscounted": false,
- "HasAttachments": false,
- "Contact": {
- "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7",
- "Name": "Barney Rubble-83203",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2018-11-02T00:00:00",
- "Date": "/Date(1541116800000+0000)/",
- "DueDateString": "2018-11-07T00:00:00",
- "DueDate": "/Date(1541548800000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [],
- "SubTotal": 100.00,
- "TotalTax": 15.00,
- "Total": 115.00,
- "UpdatedDateUTC": "/Date(1541176648927+0000)/",
- "CurrencyCode": "NZD"
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createInvoices
- summary: Creates one or more sales invoices or purchase bills
- x-hasAccountingValidationError: true
- x-example:
- - dateValue:
- is_date: true
- key: dateValue
- keyPascal: Date
- keySnake: date_value
- java_datatype: LocalDate
- default: "LocalDate.of(2020, Month.OCTOBER, 10)"
- java: "LocalDate.of(2020, Month.OCTOBER, 10)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-10')"
- node: "'2020-10-10'"
- python: "dateutil.parser.parse('2020-10-10T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - dueDateValue:
- is_date: true
- key: dueDateValue
- keyPascal: Date
- keySnake: due_date_value
- java_datatype: LocalDate
- csharp_datatype: DateTime
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_last: true
- is_uuid: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - lineItemTracking:
- is_object: true
- key: lineItemTracking
- keyPascal: LineItemTracking
- keySnake: line_item_tracking
- - trackingCategoryId:
- is_uuid: true
- key: trackingCategoryID
- keyPascal: TrackingCategoryID
- keySnake: tracking_category_id
- default: 00000000-0000-0000-0000-000000000000
- object: lineItemTracking
- - trackingOptionID:
- is_last: true
- is_uuid: true
- key: trackingOptionID
- keyPascal: TrackingOptionID
- keySnake: tracking_option_id
- default: 00000000-0000-0000-0000-000000000000
- object: lineItemTracking
- - lineItemTrackings:
- is_list: true
- key: lineItemTrackings
- keyPascal: LineItemTracking
- keySnake: line_item_trackings
- - add_lineitemtrackings:
- is_last: true
- is_list_add: true
- key: lineItemTrackings
- keyPascal: LineItemTrackings
- keySnake: line_item_trackings
- python: line_item_tracking
- ruby: line_item_tracking
- object: lineItemTracking
- - lineItem:
- is_object: true
- key: lineItem
- keyPascal: LineItem
- keySnake: line_item
- - description:
- key: description
- keyPascal: Description
- default: Foobar
- object: lineItem
- - quantity:
- nonString: true
- key: quantity
- keyPascal: Quantity
- default: 1.0
- is_money: true
- object: lineItem
- - unitAmount:
- nonString: true
- key: unitAmount
- keyPascal: UnitAmount
- keySnake: unit_amount
- default: 20.0
- is_money: true
- object: lineItem
- - accountCode:
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: "000"
- object: lineItem
- - tracking:
- is_last: true
- nonString: true
- key: tracking
- keyPascal: Tracking
- default: lineItemTrackings
- object: lineItem
- - line_items:
- is_list: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- csharp: LineItem
- java: LineItem
- - add_lineitems:
- is_last: true
- is_list_add: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- java: LineItems
- python: line_item
- ruby: line_item
- csharp: LineItem
- object: lineItem
- - invoice:
- is_object: true
- key: invoice
- keyPascal: Invoice
- - type:
- nonString: true
- key: type
- keyPascal: Type
- default: ACCREC
- php: XeroAPI\XeroPHP\Models\Accounting\Invoice::TYPE_ACCREC
- node: Invoice.TypeEnum.ACCREC
- ruby: XeroRuby::Accounting::Invoice::ACCREC
- python_string: ACCREC
- java: com.xero.models.accounting.Invoice.TypeEnum.ACCREC
- csharp: Invoice.TypeEnum.ACCREC
- object: invoice
- - set_contact:
- is_variable: true
- nonString: true
- key: contact
- keyPascal: Contact
- default: contact
- object: invoice
- - date:
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: dateValue
- python: date_value
- ruby: date_value
- object: invoice
- - dueDate:
- is_variable: true
- nonString: true
- key: dueDate
- keyPascal: DueDate
- keySnake: due_date
- default: dueDateValue
- python: due_date_value
- ruby: due_date_value
- object: invoice
- - set_lineitem:
- is_variable: true
- nonString: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- default: lineItems
- python: line_items
- ruby: line_items
- object: invoice
- - reference:
- key: reference
- keyPascal: Reference
- default: Website Design
- object: invoice
- - status:
- is_last: true
- nonString: true
- key: status
- keyPascal: Status
- default: DRAFT
- php: XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT
- node: Invoice.StatusEnum.DRAFT
- ruby: XeroRuby::Accounting::Invoice::DRAFT
- python_string: DRAFT
- java: com.xero.models.accounting.Invoice.StatusEnum.DRAFT
- csharp: Invoice.StatusEnum.DRAFT
- object: invoice
- - invoices:
- is_object: true
- key: invoices
- keyPascal: Invoices
- - add_invoice:
- is_last: true
- is_array_add: true
- key: invoices
- keyPascal: Invoices
- java: Invoices
- csharp: Invoice
- object: invoice
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Invoices array with newly created Invoice
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Invoices'
- example: {
- "Id": "ccece84a-075c-4fcd-9073-149d4f7a91cf",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552327126164)/",
- "Invoices": [
- {
- "Type": "ACCREC",
- "InvoiceID": "ed255415-e141-4150-aab7-89c3bbbb851c",
- "InvoiceNumber": "INV-0007",
- "Reference": "Website Design",
- "Prepayments": [],
- "Overpayments": [],
- "AmountDue": 40.00,
- "AmountPaid": 0.00,
- "SentToContact": false,
- "CurrencyRate": 1.000000,
- "HasErrors": false,
- "IsDiscounted": false,
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": "",
- "AttentionTo": ""
- },
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [
- {
- "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22",
- "Name": "Oasis",
- "Status": "ACTIVE",
- "Contacts": [],
- "HasValidationErrors": false
- }
- ],
- "IsSupplier": true,
- "IsCustomer": true,
- "SalesTrackingCategories": [],
- "PurchasesTrackingCategories": [],
- "ContactPersons": [
- {
- "FirstName": "Debbie",
- "LastName": "Gwyther",
- "EmailAddress": "debbie@rockstar.com",
- "IncludeInEmails": false
- }
- ],
- "HasValidationErrors": false
- },
- "DateString": "2019-03-11T00:00:00",
- "Date": "/Date(1552262400000+0000)/",
- "DueDateString": "2018-12-10T00:00:00",
- "DueDate": "/Date(1544400000000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Acme Tires",
- "UnitAmount": 20.00,
- "TaxType": "NONE",
- "TaxAmount": 0.00,
- "LineAmount": 40.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 2.0000,
- "LineItemID": "5f7a612b-fdcc-4d33-90fa-a9f6bc6db32f",
- "ValidationErrors": []
- }
- ],
- "SubTotal": 40.00,
- "TotalTax": 0.00,
- "Total": 40.00,
- "UpdatedDateUTC": "/Date(1552327126117+0000)/",
- "CurrencyCode": "NZD",
- "StatusAttributeString": "OK"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Invoices with an array of invoice objects in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Invoices'
- example: {
- "Invoices": [
- {
- "Type": "ACCREC",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8"
- },
- "LineItems": [
- {
- "Description": "Acme Tires",
- "Quantity": 2,
- "UnitAmount": 20,
- "AccountCode": "200",
- "TaxType": "NONE",
- "LineAmount": 40
- }
- ],
- "Date": "2019-03-11",
- "DueDate": "2018-12-10",
- "Reference": "Website Design",
- "Status": "AUTHORISED"
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateOrCreateInvoices
- summary: Updates or creates one or more sales invoices or purchase bills
- x-hasAccountingValidationError: true
- x-example:
- - dateValue:
- is_date: true
- key: dateValue
- keyPascal: Date
- keySnake: date_value
- java_datatype: LocalDate
- default: "LocalDate.of(2020, Month.OCTOBER, 10)"
- java: "LocalDate.of(2020, Month.OCTOBER, 10)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-10')"
- node: "'2020-10-10'"
- python: "dateutil.parser.parse('2020-10-10T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - dueDateValue:
- is_date: true
- key: dueDateValue
- keyPascal: Date
- keySnake: due_date_value
- java_datatype: LocalDate
- default: "LocalDate.of(2020, Month.OCTOBER, 28)"
- java: "LocalDate.of(2020, Month.OCTOBER, 28)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-28')"
- node: "'2020-10-28'"
- python: "dateutil.parser.parse('2020-10-28T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_last: true
- is_uuid: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - lineItem:
- is_object: true
- key: lineItem
- keyPascal: LineItem
- keySnake: line_item
- - description:
- key: description
- keyPascal: Description
- default: Foobar
- object: lineItem
- - quantity:
- nonString: true
- key: quantity
- keyPascal: Quantity
- default: 1.0
- is_money: true
- object: lineItem
- - unitAmount:
- nonString: true
- key: unitAmount
- keyPascal: UnitAmount
- keySnake: unit_amount
- default: 20.0
- is_money: true
- object: lineItem
- - accountCode:
- is_last: true
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: "000"
- object: lineItem
- - line_items:
- is_list: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- csharp: LineItem
- java: LineItem
- - add_lineitems:
- is_last: true
- is_list_add: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- java: LineItems
- python: line_item
- ruby: line_item
- csharp: LineItem
- object: lineItem
- - invoice:
- is_object: true
- key: invoice
- keyPascal: Invoice
- - type:
- nonString: true
- key: type
- keyPascal: Type
- default: ACCREC
- php: XeroAPI\XeroPHP\Models\Accounting\Invoice::TYPE_ACCREC
- node: Invoice.TypeEnum.ACCREC
- ruby: XeroRuby::Accounting::Invoice::ACCREC
- python_string: ACCREC
- java: com.xero.models.accounting.Invoice.TypeEnum.ACCREC
- csharp: Invoice.TypeEnum.ACCREC
- object: invoice
- - set_contact:
- is_variable: true
- nonString: true
- key: contact
- keyPascal: Contact
- default: contact
- object: invoice
- - date:
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: dateValue
- python: date_value
- ruby: date_value
- object: invoice
- - dueDate:
- is_variable: true
- nonString: true
- key: dueDate
- keyPascal: Date
- keySnake: due_date
- default: dueDateValue
- python: due_date_value
- ruby: due_date_value
- object: invoice
- - set_lineitem:
- is_variable: true
- nonString: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- default: lineItems
- python: line_items
- ruby: line_items
- object: invoice
- - reference:
- key: reference
- keyPascal: Reference
- default: Website Design
- object: invoice
- - status:
- is_last: true
- nonString: true
- key: status
- keyPascal: Status
- default: DRAFT
- php: XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT
- node: Invoice.StatusEnum.DRAFT
- ruby: XeroRuby::Accounting::Invoice::DRAFT
- python_string: DRAFT
- java: com.xero.models.accounting.Invoice.StatusEnum.DRAFT
- csharp: Invoice.StatusEnum.DRAFT
- object: invoice
- - invoices:
- is_object: true
- key: invoices
- keyPascal: Invoices
- - add_invoice:
- is_last: true
- is_array_add: true
- key: invoices
- keyPascal: Invoices
- java: Invoices
- csharp: Invoice
- object: invoice
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Invoices array with newly created Invoice
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Invoices'
- example: {
- "Id": "ccece84a-075c-4fcd-9073-149d4f7a91cf",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552327126164)/",
- "Invoices": [
- {
- "Type": "ACCREC",
- "InvoiceID": "ed255415-e141-4150-aab7-89c3bbbb851c",
- "InvoiceNumber": "INV-0007",
- "Reference": "Website Design",
- "Prepayments": [],
- "Overpayments": [],
- "AmountDue": 40.00,
- "AmountPaid": 0.00,
- "SentToContact": false,
- "CurrencyRate": 1.000000,
- "HasErrors": false,
- "IsDiscounted": false,
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": "",
- "AttentionTo": ""
- },
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [
- {
- "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22",
- "Name": "Oasis",
- "Status": "ACTIVE",
- "Contacts": [],
- "HasValidationErrors": false
- }
- ],
- "IsSupplier": true,
- "IsCustomer": true,
- "SalesTrackingCategories": [],
- "PurchasesTrackingCategories": [],
- "ContactPersons": [
- {
- "FirstName": "Debbie",
- "LastName": "Gwyther",
- "EmailAddress": "debbie@rockstar.com",
- "IncludeInEmails": false
- }
- ],
- "HasValidationErrors": false
- },
- "DateString": "2019-03-11T00:00:00",
- "Date": "/Date(1552262400000+0000)/",
- "DueDateString": "2018-12-10T00:00:00",
- "DueDate": "/Date(1544400000000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Acme Tires",
- "UnitAmount": 20.00,
- "TaxType": "NONE",
- "TaxAmount": 0.00,
- "LineAmount": 40.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 2.0000,
- "LineItemID": "5f7a612b-fdcc-4d33-90fa-a9f6bc6db32f",
- "ValidationErrors": []
- }
- ],
- "SubTotal": 40.00,
- "TotalTax": 0.00,
- "Total": 40.00,
- "UpdatedDateUTC": "/Date(1552327126117+0000)/",
- "CurrencyCode": "NZD",
- "StatusAttributeString": "OK"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Invoices'
- example: {
- "Invoices": [
- {
- "Type": "ACCREC",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8"
- },
- "LineItems": [
- {
- "Description": "Acme Tires",
- "Quantity": 2,
- "UnitAmount": 20,
- "AccountCode": "200",
- "TaxType": "NONE",
- "LineAmount": 40
- }
- ],
- "Date": "2019-03-11",
- "DueDate": "2018-12-10",
- "Reference": "Website Design",
- "Status": "AUTHORISED"
- }
- ]
- }
- '/Invoices/{InvoiceID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getInvoice
- summary: Retrieves a specific sales invoice or purchase bill using a unique invoice Id
- parameters:
- - $ref: '#/components/parameters/InvoiceID'
- - $ref: '#/components/parameters/unitdp'
- responses:
- '200':
- description: Success - return response of type Invoices array with specified Invoices
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Invoices'
- example: {
- "Id": "516f400a-b764-4c88-831b-12d2b210fa24",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1551981658323)/",
- "Invoices": [
- {
- "Type": "ACCREC",
- "InvoiceID": "a03ffcd2-5d91-4c7e-b483-318584e9e439",
- "InvoiceNumber": "INV-0006",
- "Reference": "Tour",
- "Payments": [
- {
- "PaymentID": "38928000-e9a0-420c-8884-f624bab2a351",
- "Date": "/Date(1552953600000+0000)/",
- "Amount": 148062.76,
- "Reference": "Yahoo",
- "CurrencyRate": 1.000000,
- "HasAccount": false,
- "HasValidationErrors": false
- }
- ],
- "Prepayments": [],
- "Overpayments": [],
- "AmountDue": 0.00,
- "AmountPaid": 148062.76,
- "SentToContact": false,
- "CurrencyRate": 1.000000,
- "HasErrors": false,
- "IsDiscounted": false,
- "HasAttachments": true,
- "Attachments": [
- {
- "AttachmentID": "3a2fe7e0-fac7-4ea2-afb2-31cedaabd294",
- "FileName": "helo-heros.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Invoices/a03ffcd2-5d91-4c7e-b483-318584e9e439/Attachments/helo-heros.jpg",
- "MimeType": "image/jpeg",
- "ContentLength": 2878711
- }
- ],
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": "",
- "AttentionTo": ""
- },
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [
- {
- "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22",
- "Name": "Oasis",
- "Status": "ACTIVE",
- "Contacts": [],
- "HasValidationErrors": false
- }
- ],
- "IsSupplier": true,
- "IsCustomer": true,
- "SalesTrackingCategories": [],
- "PurchasesTrackingCategories": [],
- "ContactPersons": [
- {
- "FirstName": "Debbie",
- "LastName": "Gwyther",
- "EmailAddress": "debbie@rockstar.com",
- "IncludeInEmails": false
- }
- ],
- "HasValidationErrors": false
- },
- "DateString": "2019-03-07T00:00:00",
- "Date": "/Date(1551916800000+0000)/",
- "DueDateString": "2019-03-13T00:00:00",
- "DueDate": "/Date(1552435200000+0000)/",
- "Status": "PAID",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "ItemCode": "123",
- "Description": "Guitars Fender Strat",
- "UnitAmount": 148062.76,
- "TaxType": "NONE",
- "TaxAmount": 0.00,
- "LineAmount": 148062.76,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "b18f39d9-7739-4246-9288-72afe939d2d5",
- "ValidationErrors": []
- }
- ],
- "SubTotal": 148062.76,
- "TotalTax": 0.00,
- "Total": 148062.76,
- "UpdatedDateUTC": "/Date(1551981568133+0000)/",
- "CurrencyCode": "NZD",
- "FullyPaidOnDate": "/Date(1552953600000+0000)/",
- "StatusAttributeString": "ERROR",
- "ValidationErrors": [
- {
- "Message": "Invoice # must be unique."
- }
- ]
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateInvoice
- summary: Updates a specific sales invoices or purchase bills
- x-hasAccountingValidationError: true
- x-example:
- - invoice:
- is_object: true
- key: invoice
- keyPascal: Invoice
- - reference:
- is_last: true
- key: reference
- keyPascal: Reference
- default: I am Iron man
- object: invoice
- - invoices:
- is_object: true
- key: invoices
- keyPascal: Invoices
- - add_invoice:
- is_last: true
- is_array_add: true
- key: invoices
- keyPascal: Invoices
- java: Invoices
- csharp: Invoice
- object: invoice
- parameters:
- - $ref: '#/components/parameters/InvoiceID'
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Invoices array with updated Invoice
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Invoices'
- example: {
- "Id": "bd83b60e-9d16-4a3b-9f59-0a2d0ccd35f2",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552329729002)/",
- "Invoices": [
- {
- "Type": "ACCREC",
- "InvoiceID": "4074292c-09b3-456d-84e7-add864c6c39b",
- "InvoiceNumber": "INV-0008",
- "Reference": "My the Force be With You",
- "Prepayments": [],
- "Overpayments": [],
- "AmountDue": 575.00,
- "AmountPaid": 0.00,
- "SentToContact": false,
- "CurrencyRate": 1.000000,
- "HasErrors": false,
- "IsDiscounted": false,
- "Contact": {
- "ContactID": "be392c72-c121-4f83-9512-03ac71e54c20",
- "ContactStatus": "ACTIVE",
- "Name": "Luke Skywalker",
- "EmailAddress": "",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- },
- {
- "AddressType": "POBOX",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1552329691573+0000)/",
- "ContactGroups": [],
- "IsSupplier": false,
- "IsCustomer": true,
- "DefaultCurrency": "NZD",
- "SalesTrackingCategories": [],
- "PurchasesTrackingCategories": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-03-11T00:00:00",
- "Date": "/Date(1552262400000+0000)/",
- "DueDateString": "2019-03-12T00:00:00",
- "DueDate": "/Date(1552348800000+0000)/",
- "Status": "SUBMITTED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Light Saber",
- "UnitAmount": 500.00,
- "TaxType": "OUTPUT2",
- "TaxAmount": 75.00,
- "LineAmount": 500.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "6de1bf9f-de95-4c47-9287-37305db758c9",
- "ValidationErrors": []
- }
- ],
- "SubTotal": 500.00,
- "TotalTax": 75.00,
- "Total": 575.00,
- "UpdatedDateUTC": "/Date(1552329728987+0000)/",
- "CurrencyCode": "NZD"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Invoices'
- example: { "Invoices": [{ Reference: "May the force be with you", "InvoiceID": "00000000-0000-0000-0000-000000000000", "LineItems": [], "Contact": {}, "Type": "ACCPAY" }]}
- '/Invoices/{InvoiceID}/pdf':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getInvoiceAsPdf
- x-path: '/Invoices/{InvoiceID}'
- summary: Retrieves invoices or purchase bills as PDF files
- parameters:
- - $ref: '#/components/parameters/InvoiceID'
- responses:
- '200':
- description: Success - return response of byte array pdf version of specified Invoices
- content:
- application/pdf:
- schema:
- type: string
- format: binary
- '/Invoices/{InvoiceID}/Attachments':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getInvoiceAttachments
- summary: Retrieves attachments for a specific invoice or purchase bill
- parameters:
- - $ref: '#/components/parameters/InvoiceID'
- responses:
- '200':
- description: Success - return response of type Attachments array of Attachments for specified Invoices
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "7e357a45-69f5-4e8f-8d7b-15da8ef50aab",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552330258523)/",
- "Attachments": [
- {
- "AttachmentID": "9808ad7f-c8d4-41cf-995e-bc29cb76fd2c",
- "FileName": "foobar.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/foobar.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- },
- {
- "AttachmentID": "5a500c1a-5a02-48de-939e-1d234fd170d4",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '/Invoices/{InvoiceID}/Attachments/{AttachmentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getInvoiceAttachmentById
- summary: Retrieves a specific attachment from a specific invoices or purchase bills by using a unique attachment Id
- parameters:
- - $ref: '#/components/parameters/InvoiceID'
- - $ref: '#/components/parameters/AttachmentID'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Invoice as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/Invoices/{InvoiceID}/Attachments/{FileName}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getInvoiceAttachmentByFileName
- summary: Retrieves an attachment from a specific invoice or purchase bill by filename
- parameters:
- - $ref: '#/components/parameters/InvoiceID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Invoice as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- post:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: updateInvoiceAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Updates an attachment from a specific invoices or purchase bill by filename
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/InvoiceID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of type Attachments array with updated Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "acd7d618-5fef-4d45-849c-a339ea31a973",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552330524005)/",
- "Attachments": [
- {
- "AttachmentID": "08085449-fda3-45f4-a685-ff44c8a29ee3",
- "FileName": "HelloWorld.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/HelloWorld.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- put:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: createInvoiceAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Creates an attachment for a specific invoice or purchase bill by filename
- parameters:
- - $ref: '#/components/parameters/InvoiceID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/includeOnline'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Attachments array with newly created Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "971fbd18-c850-453a-825f-63f2fee096ee",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552330001318)/",
- "Attachments": [
- {
- "AttachmentID": "5a500c1a-5a02-48de-939e-1d234fd170d4",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/Invoices/{InvoiceID}/OnlineInvoice':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getOnlineInvoice
- summary: Retrieves a URL to an online invoice
- parameters:
- - $ref: '#/components/parameters/InvoiceID'
- responses:
- '200':
- description: Success - return response of type OnlineInvoice array with one OnlineInvoice
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/OnlineInvoices'
- example: {
- "Id": "d20705fb-fe1c-4366-835b-98de7474da3c",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552331100745)/",
- "OnlineInvoices": [
- {
- "OnlineInvoiceUrl": "https://in.xero.com/bCWCCfytGdTXoJam9HENWlQt07G6zcDaj4gQojHu"
- }
- ]
- }
- '/Invoices/{InvoiceID}/Email':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: emailInvoice
- summary: Sends a copy of a specific invoice to related contact via email
- x-hasAccountingValidationError: true
- x-example:
- - requestEmpty:
- is_last: true
- is_object: true
- key: requestEmpty
- keyPascal: RequestEmpty
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/InvoiceID'
- responses:
- '204':
- description: Success - return response 204 no content
- x-isEmpty: true
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RequestEmpty'
- example: {}
- '/Invoices/{InvoiceID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getInvoiceHistory
- summary: Retrieves history records for a specific invoice
- parameters:
- - $ref: '#/components/parameters/InvoiceID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createInvoiceHistory
- summary: Creates a history record for a specific invoice
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/InvoiceID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- '/InvoiceReminders/Settings':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getInvoiceReminders
- summary: Retrieves invoice reminder settings
- responses:
- '200':
- description: Success - return response of Invoice Reminders
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/InvoiceReminders'
- example: {
- "Id": "c7cd0953-c012-4be8-b618-63ce4c2c3494",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552331430618)/",
- "InvoiceReminders": [
- {
- "Enabled": false
- }
- ]
- }
- /Items:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getItems
- summary: Retrieves items
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: IsSold==true
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Code ASC"
- schema:
- type: string
- - $ref: '#/components/parameters/unitdp'
- responses:
- '200':
- description: Success - return response of type Items array with all Item
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Items'
- example: {
- "Id": "8487e8d7-5fb3-4f02-b949-dec8f1e38182",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552331874897)/",
- "Items": [
- {
- "ItemID": "c8c54d65-f3f2-452d-926e-bf450b12fb07",
- "Code": "123",
- "Description": "Guitars Fender Strat",
- "UpdatedDateUTC": "/Date(1551981476267+0000)/",
- "PurchaseDetails": {},
- "SalesDetails": {
- "UnitPrice": 5000.0000,
- "AccountCode": "200",
- "TaxType": "OUTPUT2"
- },
- "Name": "Guitars",
- "IsTrackedAsInventory": false,
- "IsSold": true,
- "IsPurchased": false
- },
- {
- "ItemID": "a4544d51-48f6-441f-a623-99ecbced6ab7",
- "Code": "abc65591",
- "Description": "Barfoo",
- "UpdatedDateUTC": "/Date(1552331873580+0000)/",
- "PurchaseDetails": {},
- "SalesDetails": {},
- "Name": "Hello11350",
- "IsTrackedAsInventory": false,
- "IsSold": true,
- "IsPurchased": true
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: createItems
- summary: Creates one or more items
- x-hasAccountingValidationError: true
- x-example:
- - purchaseDetails:
- is_object: true
- key: purchaseDetails
- keyPascal: Purchase
- keySnake: purchase_details
- - cOGSAccountCode:
- is_last: true
- key: cOGSAccountCode
- keyPascal: CoGSAccountCode
- keySnake: cogs_account_code
- keyCsharp: COGSAccountCode
- default: 500
- object: purchaseDetails
- - item:
- is_object: true
- key: item
- keyPascal: Item
- - code:
- key: code
- keyPascal: Code
- default: abcXYZ123
- object: item
- - name:
- key: name
- keyPascal: Name
- default: HelloWorld
- object: item
- - description:
- key: description
- keyPascal: Description
- default: Foobar
- object: item
- - inventoryAssetAccountCode:
- key: inventoryAssetAccountCode
- keyPascal: InventoryAssetAccountCode
- keySnake: inventory_asset_account_code
- default: 140
- object: item
- - set_purchaseDetails:
- is_last: true
- is_variable: true
- nonString: true
- key: purchaseDetails
- keyPascal: PurchaseDetails
- keySnake: purchase_details
- default: purchaseDetails
- python: purchase_details
- ruby: purchase_details
- object: item
- - items:
- is_object: true
- key: items
- keyPascal: Items
- - add_item:
- is_last: true
- is_array_add: true
- key: items
- keyPascal: Items
- java: Items
- csharp: Item
- object: item
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Items array with newly created Item
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Items'
- example: {
- "Id": "ae7ef7c8-9024-4d42-8d59-5f26ed3f508b",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552331871904)/",
- "Items": [
- {
- "ItemID": "a4544d51-48f6-441f-a623-99ecbced6ab7",
- "Code": "abc65591",
- "Description": "foobar",
- "UpdatedDateUTC": "/Date(1552331871707)/",
- "PurchaseDetails": {},
- "SalesDetails": {},
- "Name": "Hello11350",
- "IsTrackedAsInventory": false,
- "IsSold": true,
- "IsPurchased": true,
- "ValidationErrors": [
- {
- "Message": "Price List Item with Code ''abc'' already exists"
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Items with an array of Item objects in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Items'
- example: {
- "Items": [
- {
- "Code": "code123",
- "Name": "Item Name XYZ",
- "Description": "Foobar",
- "InventoryAssetAccountCode": "140",
- "PurchaseDetails": {
- "COGSAccountCode": "500"
- }
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: updateOrCreateItems
- summary: Updates or creates one or more items
- x-hasAccountingValidationError: true
- x-example:
- - item:
- is_object: true
- key: item
- keyPascal: Item
- - code:
- key: code
- keyPascal: Code
- default: abcXYZ123
- object: item
- - name:
- key: name
- keyPascal: Name
- default: HelloWorld
- object: item
- - description:
- is_last: true
- key: description
- keyPascal: Description
- default: Foobar
- object: item
- - items:
- is_object: true
- key: items
- keyPascal: Items
- - add_item:
- is_last: true
- is_array_add: true
- key: items
- keyPascal: Items
- java: Items
- csharp: Item
- object: item
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Items array with newly created Item
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Items'
- example: {
- "Id": "ae7ef7c8-9024-4d42-8d59-5f26ed3f508b",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552331871904)/",
- "Items": [
- {
- "ItemID": "a4544d51-48f6-441f-a623-99ecbced6ab7",
- "Code": "abc65591",
- "Description": "foobar",
- "UpdatedDateUTC": "/Date(1552331871707)/",
- "PurchaseDetails": {},
- "SalesDetails": {},
- "Name": "Hello11350",
- "IsTrackedAsInventory": false,
- "IsSold": true,
- "IsPurchased": true,
- "ValidationErrors": [
- {
- "Message": "Price List Item with Code ''abc'' already exists"
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Items'
- example: {
- "Items": [
- {
- "Code": "ItemCode123",
- "Name": "ItemName XYZ",
- "Description": "Item Description ABC"
- }
- ]
- }
- '/Items/{ItemID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getItem
- summary: Retrieves a specific item using a unique item Id
- parameters:
- - $ref: '#/components/parameters/ItemID'
- - $ref: '#/components/parameters/unitdp'
- responses:
- '200':
- description: Success - return response of type Items array with specified Item
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Items'
- example: {
- "Id": "0bbd8a92-9ba7-4711-8040-8d6a609ca7e8",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552333420160)/",
- "Items": [
- {
- "ItemID": "c8c54d65-f3f2-452d-926e-bf450b12fb07",
- "Code": "123",
- "Description": "Guitars Fender Strat",
- "PurchaseDescription": "Brand new Fender Strats",
- "UpdatedDateUTC": "/Date(1552333309387+0000)/",
- "PurchaseDetails": {
- "UnitPrice": 2500.0000,
- "COGSAccountCode": "310",
- "TaxType": "INPUT2"
- },
- "SalesDetails": {
- "UnitPrice": 5000.0000,
- "AccountCode": "200",
- "TaxType": "OUTPUT2"
- },
- "Name": "Guitars",
- "IsTrackedAsInventory": true,
- "InventoryAssetAccountCode": "630",
- "TotalCostPool": 25000.00,
- "QuantityOnHand": 10.0000,
- "IsSold": true,
- "IsPurchased": true,
- "ValidationErrors": []
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: updateItem
- summary: Updates a specific item
- x-hasAccountingValidationError: true
- x-example:
- - item:
- is_object: true
- key: item
- keyPascal: Item
- - code:
- key: code
- keyPascal: Code
- default: ItemCode123
- object: item
- - description:
- is_last: true
- key: description
- keyPascal: Description
- default: Goodbye
- object: item
- - items:
- is_object: true
- key: items
- keyPascal: Items
- - add_item:
- is_last: true
- is_array_add: true
- key: items
- keyPascal: Items
- java: Items
- csharp: Item
- object: item
- parameters:
- - $ref: '#/components/parameters/ItemID'
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Items array with updated Item
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Items'
- example: {
- "Id": "24feb629-6b14-499e-9aa1-fc2c596c0280",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552332558975)/",
- "Items": [
- {
- "ItemID": "a7e87086-e0ae-4df2-83d7-e26e9a6b7786",
- "Code": "abc38306",
- "Description": "Hello Xero",
- "UpdatedDateUTC": "/Date(1552332558924)/",
- "PurchaseDetails": {},
- "SalesDetails": {},
- "Name": "Hello8746",
- "IsTrackedAsInventory": false,
- "IsSold": true,
- "IsPurchased": true,
- "ValidationErrors": []
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Items'
- example: {
- "Items": [
- {
- "Code": "ItemCode123",
- "Description": "Description 123"
- }
- ]
- }
- delete:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: deleteItem
- summary: Deletes a specific item
- parameters:
- - $ref: '#/components/parameters/ItemID'
- responses:
- '204':
- description: Success - return response 204 no content
- x-isEmpty: true
- '400':
- $ref: '#/components/responses/400Error'
- '/Items/{ItemID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getItemHistory
- summary: Retrieves history for a specific item
- parameters:
- - $ref: '#/components/parameters/ItemID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: createItemHistory
- summary: Creates a history record for a specific item
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ItemID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- /Journals:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.journals.read]
- tags:
- - Accounting
- operationId: getJournals
- summary: Retrieves journals
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: offset
- description: Offset by a specified journal number. e.g. journals with a JournalNumber greater than the offset will be returned
- example: 10
- schema:
- type: integer
- - in: query
- name: paymentsOnly
- x-snake: payments_only
- description: Filter to retrieve journals on a cash basis. Journals are returned on an accrual basis by default.
- example: true
- x-example-python: "True"
- schema:
- type: boolean
- responses:
- '200':
- description: Success - return response of type Journals array with all Journals
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Journals'
- example: {
- "Id": "49a09a97-df50-4679-8043-02c86e0dcf5f",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552335214210)/",
- "Journals": [
- {
- "JournalID": "1b31feeb-aa23-404c-8c19-24c827c53661",
- "JournalDate": "/Date(1539993600000+0000)/",
- "JournalNumber": 1,
- "CreatedDateUTC": "/Date(1541176243467+0000)/",
- "Reference": "Red Fish, Blue Fish",
- "SourceID": "d4956132-ed94-4dd7-9eaa-aa22dfdf06f2",
- "SourceType": "ACCREC",
- "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,
- "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": []
- }
- ]
- },
- {
- "JournalID": "2be66e45-805b-46de-921d-c67e1d3dad2a",
- "JournalDate": "/Date(1539993600000+0000)/",
- "JournalNumber": 9,
- "CreatedDateUTC": "/Date(1541176504083+0000)/",
- "Reference": "Red Fish, Blue Fish",
- "SourceID": "046d8a6d-1ae1-4b4d-9340-5601bdf41b87",
- "SourceType": "ACCREC",
- "JournalLines": [
- {
- "JournalLineID": "ba8a5680-a753-4a35-b3dd-0bc72e5c26a1",
- "AccountID": "b94495d0-44ab-4199-a1d0-427a4877e100",
- "AccountCode": "610",
- "AccountType": "CURRENT",
- "AccountName": "Accounts Receivable",
- "Description": "",
- "NetAmount": 40.00,
- "GrossAmount": 40.00,
- "TaxAmount": 0.00,
- "TrackingCategories": []
- },
- {
- "JournalLineID": "09a0b9b9-0222-4e24-8c31-efef472e22f1",
- "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": []
- }
- ]
- },
- {
- "JournalID": "d0ed2957-ebba-4d3a-8367-ae9ccd574885",
- "JournalDate": "/Date(1543449600000+0000)/",
- "JournalNumber": 14,
- "CreatedDateUTC": "/Date(1541176592673+0000)/",
- "SourceID": "99ea7f6b-c513-4066-bc27-b7c65dcd76c2",
- "SourceType": "ACCRECPAYMENT",
- "JournalLines": [
- {
- "JournalLineID": "1bdae2b7-3035-40ec-b344-b12b1c23adc4",
- "AccountID": "b94495d0-44ab-4199-a1d0-427a4877e100",
- "AccountCode": "610",
- "AccountType": "CURRENT",
- "AccountName": "Accounts Receivable",
- "Description": "",
- "NetAmount": -46.00,
- "GrossAmount": -46.00,
- "TaxAmount": 0.00,
- "TrackingCategories": []
- },
- {
- "JournalLineID": "353be85e-ae79-4bb3-9483-5ea7682fc0a3",
- "AccountID": "5690f1e8-1d02-4893-90c2-ee1a69eff942",
- "AccountCode": "970",
- "AccountType": "EQUITY",
- "AccountName": "Owner A Funds Introduced",
- "Description": "",
- "NetAmount": 46.00,
- "GrossAmount": 46.00,
- "TaxAmount": 0.00,
- "TrackingCategories": []
- }
- ]
- },
- {
- "JournalID": "772e8133-7f12-4edc-ab98-aa6dceb16c9d",
- "JournalDate": "/Date(1552262400000+0000)/",
- "JournalNumber": 30,
- "CreatedDateUTC": "/Date(1552333389227+0000)/",
- "Reference": "",
- "SourceID": "5376633d-0456-43a3-8234-e457a3f50a12",
- "SourceType": "ACCPAY",
- "JournalLines": [
- {
- "JournalLineID": "33469836-642f-4973-a708-0e99339dff4a",
- "AccountID": "a2a4795b-a01f-40eb-afa6-a34b4514875d",
- "AccountCode": "800",
- "AccountType": "CURRLIAB",
- "AccountName": "Accounts Payable",
- "Description": "",
- "NetAmount": -28750.00,
- "GrossAmount": -28750.00,
- "TaxAmount": 0.00,
- "TrackingCategories": []
- },
- {
- "JournalLineID": "4f3b6462-5cf6-4b55-a2ae-de4039878215",
- "AccountID": "53a12a15-7e9b-4a31-85f4-a7cee6d04215",
- "AccountCode": "630",
- "AccountType": "CURRENT",
- "AccountName": "Inventory",
- "Description": "Brand new Fender Strats",
- "NetAmount": 25000.00,
- "GrossAmount": 28750.00,
- "TaxAmount": 3750.00,
- "TaxType": "INPUT2",
- "TaxName": "15% GST on Expenses",
- "TrackingCategories": []
- },
- {
- "JournalLineID": "534e822e-d441-48a7-8e57-5ad54729e83e",
- "AccountID": "17d9a4a0-3181-4803-a96b-f0dbe589091b",
- "AccountCode": "820",
- "AccountType": "CURRLIAB",
- "AccountName": "GST",
- "Description": "",
- "NetAmount": 3750.00,
- "GrossAmount": 3750.00,
- "TaxAmount": 0.00,
- "TrackingCategories": []
- }
- ]
- }
- ]
- }
- '/Journals/{JournalID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.journals.read]
- tags:
- - Accounting
- operationId: getJournal
- summary: Retrieves a specific journal using a unique journal Id.
- parameters:
- - $ref: '#/components/parameters/JournalID'
- 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": []
- }
- ]
- }
- ]
- }
- '/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'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getLinkedTransactions
- summary: Retrieves linked transactions (billable expenses)
- parameters:
- - in: query
- 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.
- example: 1
- schema:
- type: integer
- - in: query
- name: LinkedTransactionID
- x-snake: linked_transaction_id
- description: The Xero identifier for an Linked Transaction
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- - in: query
- name: SourceTransactionID
- x-snake: source_transaction_id
- description: Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- - in: query
- name: ContactID
- x-snake: contact_id
- description: Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer.
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- - in: query
- name: Status
- x-snake: status
- description: Filter by the combination of ContactID and Status. Get the linked transactions associated to a customer and with a status
- example: "APPROVED"
- schema:
- type: string
- - in: query
- name: TargetTransactionID
- x-snake: target_transaction_id
- description: Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- responses:
- '200':
- description: Success - return response of type LinkedTransactions array with all LinkedTransaction
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LinkedTransactions'
- example: {
- "Id": "516aabd0-e670-48d5-b0eb-10dce4494dd8",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552348338096)/",
- "LinkedTransactions": [
- {
- "LinkedTransactionID": "5cf7d9c0-b9a7-4433-a2dc-ae3c11bba39b",
- "SourceTransactionID": "aec416dd-38ea-40dc-9f0b-813c8c71f87f",
- "SourceLineItemID": "77e0b23b-5b79-4f4b-ae20-c9031d41442f",
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "TargetTransactionID": "83693fc1-5b05-4807-b190-109d4a85dd5f",
- "TargetLineItemID": "d5128ff1-0f39-4d2a-a6d5-46dfaf5f075c",
- "Status": "ONDRAFT",
- "Type": "BILLABLEEXPENSE",
- "UpdatedDateUTC": "/Date(1552347991000+0000)/",
- "SourceTransactionTypeCode": "ACCPAY"
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createLinkedTransaction
- summary: Creates linked transactions (billable expenses)
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- x-hasAccountingValidationError: true
- x-example:
- - linkedTransaction:
- is_object: true
- key: linkedTransaction
- keyPascal: LinkedTransaction
- keySnake: linked_transaction
- - sourceTransactionID:
- is_uuid: true
- key: sourceTransactionID
- keyPascal: SourceTransactionID
- keySnake: source_transaction_id
- default: 00000000-0000-0000-0000-000000000000
- object: linkedTransaction
- - sourceLineItemID:
- is_last: true
- is_uuid: true
- key: sourceLineItemID
- keyPascal: SourceLineItemID
- keySnake: source_line_item_id
- default: 00000000-0000-0000-0000-000000000000
- object: linkedTransaction
- responses:
- '200':
- description: Success - return response of type LinkedTransactions array with newly created LinkedTransaction
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LinkedTransactions'
- example: {
- "Id": "f32b30e5-32d1-42a8-bcc9-5b22828f725c",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552351054646)/",
- "LinkedTransactions": [
- {
- "LinkedTransactionID": "e9684b6c-4df9-45a0-917b-85cc29857008",
- "SourceTransactionID": "a848644a-f20f-4630-98c3-386bd7505631",
- "SourceLineItemID": "b0df260d-3cc8-4ced-9bd6-41924f624ed3",
- "Status": "DRAFT",
- "Type": "BILLABLEEXPENSE",
- "UpdatedDateUTC": "/Date(1552351055000+0000)/",
- "SourceTransactionTypeCode": "ACCPAY",
- "ValidationErrors": [
- {
- "Message": "The SourceLineItemID and SourceTransactionID do not match"
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: LinkedTransaction object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LinkedTransaction'
- example: {
- "LinkedTransactions": [
- {
- "SourceTransactionID": "a848644a-f20f-4630-98c3-386bd7505631",
- "SourceLineItemID": "b0df260d-3cc8-4ced-9bd6-41924f624ed3"
- }
- ]
- }
- '/LinkedTransactions/{LinkedTransactionID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getLinkedTransaction
- summary: Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id
- parameters:
- - $ref: '#/components/parameters/LinkedTransactionID'
- responses:
- '200':
- description: Success - return response of type LinkedTransactions array with a specified LinkedTransaction
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LinkedTransactions'
- example: {
- "Id": "171ca542-874d-44e2-8930-db9bccd7d88b",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552348339875)/",
- "LinkedTransactions": [
- {
- "LinkedTransactionID": "5cf7d9c0-b9a7-4433-a2dc-ae3c11bba39b",
- "SourceTransactionID": "aec416dd-38ea-40dc-9f0b-813c8c71f87f",
- "SourceLineItemID": "77e0b23b-5b79-4f4b-ae20-c9031d41442f",
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "TargetTransactionID": "83693fc1-5b05-4807-b190-109d4a85dd5f",
- "TargetLineItemID": "d5128ff1-0f39-4d2a-a6d5-46dfaf5f075c",
- "Status": "ONDRAFT",
- "Type": "BILLABLEEXPENSE",
- "UpdatedDateUTC": "/Date(1552347991000+0000)/",
- "SourceTransactionTypeCode": "ACCPAY"
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateLinkedTransaction
- summary: Updates a specific linked transactions (billable expenses)
- x-hasAccountingValidationError: true
- x-example:
- - linkedTransaction:
- is_object: true
- key: linkedTransaction
- keyPascal: LinkedTransaction
- keySnake: linked_transaction
- - sourceLineItemID:
- is_uuid: true
- key: sourceLineItemID
- keyPascal: SourceLineItemID
- keySnake: source_line_item_id
- default: 00000000-0000-0000-0000-000000000000
- object: linkedTransaction
- - contactID:
- is_last: true
- is_uuid: true
- key: contactID
- keyPascal: ContactID
- default: 00000000-0000-0000-0000-000000000000
- object: linkedTransaction
- - linkedTransactions:
- is_object: true
- key: linkedTransactions
- keyPascal: LinkedTransactions
- - add_linkedTransaction:
- is_last: true
- is_array_add: true
- key: linkedTransactions
- keyPascal: LinkedTransactions
- keySnake: linked_transactions
- java: LinkedTransactions
- python: linked_transaction
- ruby: linked_transaction
- csharp: LinkedTransaction
- object: linkedTransaction
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/LinkedTransactionID'
- responses:
- '200':
- description: Success - return response of type LinkedTransactions array with updated LinkedTransaction
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LinkedTransactions'
- example: {
- "Id": "bd364af7-08f0-432b-81db-c1e5ba05f3dd",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552351488159)/",
- "LinkedTransactions": [
- {
- "LinkedTransactionID": "e9684b6c-4df9-45a0-917b-85cc29857008",
- "SourceTransactionID": "a848644a-f20f-4630-98c3-386bd7505631",
- "SourceLineItemID": "b0df260d-3cc8-4ced-9bd6-41924f624ed3",
- "ContactID": "4e1753b9-018a-4775-b6aa-1bc7871cfee3",
- "Status": "DRAFT",
- "Type": "BILLABLEEXPENSE",
- "UpdatedDateUTC": "/Date(1552351055000+0000)/",
- "SourceTransactionTypeCode": "ACCPAY"
- }
- ]
- }
- '400':
- description: Success - return response of type LinkedTransactions array with updated LinkedTransaction
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- example: {
- "ErrorNumber": 10,
- "Type": "ValidationException",
- "Message": "A validation exception occurred",
- "Elements": [
- {
- "LinkedTransactionID": "5a68b5b4-8cf0-4af5-8c3c-513cc19e1c73",
- "SourceTransactionID": "aec416dd-38ea-40dc-9f0b-813c8c71f87f",
- "SourceLineItemID": "77e0b23b-5b79-4f4b-ae20-c9031d41442f",
- "ContactID": "4e1753b9-018a-4775-b6aa-1bc7871cfee3",
- "TargetTransactionID": "83693fc1-5b05-4807-b190-109d4a85dd5f",
- "TargetLineItemID": "d5128ff1-0f39-4d2a-a6d5-46dfaf5f075c",
- "Status": "ONDRAFT",
- "Type": "BILLABLEEXPENSE",
- "UpdatedDateUTC": "/Date(1552349706000+0000)/",
- "SourceTransactionTypeCode": "ACCPAY",
- "ValidationErrors": [
- {
- "Message": "The ContactID and the TargetTransaction ContactID do not match"
- }
- ]
- }
- ]
- }
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/LinkedTransactions'
- example: {
- "LinkedTransactions": [
- {
- "SourceTransactionID": "00000000-0000-0000-0000-000000000000",
- "SourceLineItemID": "00000000-0000-0000-0000-000000000000"
- }
- ]
- }
- delete:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: deleteLinkedTransaction
- summary: Deletes a specific linked transactions (billable expenses)
- parameters:
- - $ref: '#/components/parameters/LinkedTransactionID'
- responses:
- '204':
- description: Success - return response 204 no content
- x-isEmpty: true
- '400':
- $ref: '#/components/responses/400Error'
- /ManualJournals:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getManualJournals
- summary: Retrieves manual journals
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="DRAFT"
- x-example-csharp: Status==\"DRAFT\"
- x-example-java: Status=="' + ManualJournal.StatusEnum.DRAFT + '"
- x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ManualJournal::STATUS_DRAFT . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::ManualJournal::DRAFT}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Date ASC"
- schema:
- type: string
- - in: query
- 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
- example: 1
- schema:
- type: integer
- - $ref: '#/components/parameters/pageSize'
- responses:
- '200':
- description: Success - return response of type ManualJournals array with a all ManualJournals
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ManualJournals'
- example: {
- "Id": "8a508ec1-b578-48bf-97df-020c918fbf7d",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552357217359)/",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 3
- },
- "ManualJournals": [
- {
- "Date": "/Date(1553126400000+0000)/",
- "Status": "POSTED",
- "LineAmountTypes": "NoTax",
- "UpdatedDateUTC": "/Date(1552357188083+0000)/",
- "ManualJournalID": "0b159335-606b-485f-b51b-97b3b32bad32",
- "Narration": "Reversal: These aren''t the droids you are looking for",
- "JournalLines": [],
- "ShowOnCashBasisReports": true,
- "HasAttachments": false
- },
- {
- "Date": "/Date(1552348800000+0000)/",
- "Status": "POSTED",
- "LineAmountTypes": "NoTax",
- "UpdatedDateUTC": "/Date(1552357188147+0000)/",
- "ManualJournalID": "99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4",
- "Narration": "These aren''t the droids you are looking for",
- "JournalLines": [],
- "ShowOnCashBasisReports": true,
- "HasAttachments": true
- },
- {
- "Date": "/Date(1552262400000+0000)/",
- "Status": "DRAFT",
- "LineAmountTypes": "NoTax",
- "UpdatedDateUTC": "/Date(1552357216843+0000)/",
- "ManualJournalID": "ecb6b362-c78f-462a-a229-a66abf115e92",
- "Narration": "Foo bar",
- "JournalLines": [],
- "ShowOnCashBasisReports": true,
- "HasAttachments": false
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createManualJournals
- summary: Creates one or more manual journals
- x-hasAccountingValidationError: true
- x-example:
- - dateValue:
- is_date: true
- key: dateValue
- keyPascal: Date
- keySnake: date_value
- java_datatype: LocalDate
- default: "LocalDate.of(2020, Month.OCTOBER, 10)"
- java: "LocalDate.of(2020, Month.OCTOBER, 10)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2019-10-10')"
- node: "'2020-10-10'"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - manualJournalLines:
- is_list: true
- key: manualJournalLines
- keyPascal: ManualJournalLine
- keySnake: manual_journal_lines
- - credit:
- is_object: true
- key: credit
- keyPascal: ManualJournalLine
- - lineAmount:
- nonString: true
- key: lineAmount
- keyPascal: LineAmount
- keySnake: line_amount
- default: -100.0
- is_money: true
- object: credit
- - accountCode:
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: 400
- object: credit
- - description:
- is_last: true
- key: description
- keyPascal: Description
- default: "Hello there"
- object: credit
- - add_credit:
- is_last: true
- is_list_add: true
- key: manualJournalLines
- keyPascal: ManualJournalLine
- keySnake: manual_journal_lines
- object: credit
- - debit:
- is_object: true
- key: debit
- keyPascal: ManualJournalLine
- - lineAmount:
- nonString: true
- key: lineAmount
- keyPascal: LineAmount
- keySnake: line_amount
- default: 100.0
- is_money: true
- object: debit
- - accountCode:
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: 120
- object: debit
- - description:
- is_last: true
- key: description
- keyPascal: Description
- default: "Hello there"
- object: debit
- - add_debit:
- is_last: true
- is_list_add: true
- key: manualJournalLines
- keyPascal: ManualJournalLine
- keySnake: manual_journal_lines
- object: debit
- - manualJournal:
- is_object: true
- key: manualJournal
- keyPascal: ManualJournal
- keySnake: manual_journal
- - narration:
- key: narration
- keyPascal: Narration
- default: Foobar
- object: manualJournal
- - date:
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: dateValue
- python: date_value
- ruby: date_value
- object: manualJournal
- - set_manualJournalLines:
- is_last: true
- is_variable: true
- nonString: true
- key: journalLines
- keyPascal: JournalLines
- keySnake: journal_lines
- default: manualJournalLines
- python: manual_journal_lines
- ruby: manual_journal_lines
- object: manualJournal
- - manualJournals:
- is_object: true
- key: manualJournals
- keyPascal: ManualJournals
- - add_manualJournal:
- is_last: true
- is_array_add: true
- key: manualJournals
- keyPascal: ManualJournals
- keySnake: manual_journals
- java: ManualJournals
- php: manualJournals
- python: manual_journal
- ruby: manual_journal
- csharp: ManualJournal
- object: manualJournal
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type ManualJournals array with newly created ManualJournal
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ManualJournals'
- example: {
- "Id": "45dfa608-0fcb-4f30-a377-c82cd348569c",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552595972952)/",
- "ManualJournals": [
- {
- "Date": "/Date(1552521600000+0000)/",
- "Status": "DRAFT",
- "LineAmountTypes": "NoTax",
- "UpdatedDateUTC": "/Date(1552595972920+0000)/",
- "ManualJournalID": "d312dd5e-a53e-46d1-9d51-c569ef4570b7",
- "Narration": "Foo bar",
- "JournalLines": [
- {
- "Description": "Hello there",
- "TaxType": "NONE",
- "LineAmount": 100.00,
- "AccountCode": "400",
- "Tracking": [],
- "AccountID": "c4f29c22-28c2-4a13-9eab-ecbbd641ffdf",
- "IsBlank": false
- },
- {
- "Description": "Goodbye",
- "TaxType": "NONE",
- "LineAmount": -100.00,
- "AccountCode": "400",
- "Tracking": [
- {
- "Name": "Simpsons",
- "Option": "Bart",
- "TrackingCategoryID": "6a68adde-f210-4465-b0a9-0d8cc6f50762",
- "TrackingOptionID": "dc54c220-0140-495a-b925-3246adc0075f"
- }
- ],
- "AccountID": "c4f29c22-28c2-4a13-9eab-ecbbd641ffdf",
- "IsBlank": false
- }
- ],
- "ShowOnCashBasisReports": true,
- "Warnings": [
- {
- "Message": "Account code ''476'' has been removed as it does not match a recognised account."
- }
- ],
- "ValidationErrors": [
- {
- "Message": "The total debits (100.00) must equal total credits (-10.00)"
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: ManualJournals array with ManualJournal object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ManualJournals'
- example: {
- "ManualJournals": [
- {
- "Narration": "Journal Desc",
- "JournalLines": [
- {
- "LineAmount": 100,
- "AccountCode": "400",
- "Description": "Money Movement"
- },
- {
- "LineAmount": -100,
- "AccountCode": "400",
- "Description": "Prepayment of things",
- "Tracking": [
- {
- "Name": "North",
- "Option": "Region"
- }
- ]
- }
- ],
- "Date": "2019-03-14"
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateOrCreateManualJournals
- summary: Updates or creates a single manual journal
- x-hasAccountingValidationError: true
- x-example:
- - dateValue:
- is_date: true
- key: dateValue
- keyPascal: Date
- keySnake: date_value
- java_datatype: LocalDate
- default: "LocalDate.of(2020, Month.OCTOBER, 10)"
- java: "LocalDate.of(2020, Month.OCTOBER, 10)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-10')"
- node: "'2020-10-10'"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - manualJournalLines:
- is_list: true
- key: manualJournalLines
- keyPascal: ManualJournalLine
- keySnake: manual_journal_lines
- - credit:
- is_object: true
- key: credit
- keyPascal: ManualJournalLine
- - lineAmount:
- nonString: true
- key: lineAmount
- keyPascal: LineAmount
- keySnake: line_amount
- default: -100.0
- is_money: true
- object: credit
- - accountCode:
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: 400
- object: credit
- - description:
- is_last: true
- key: description
- keyPascal: Description
- default: "Hello there"
- object: credit
- - add_credit:
- is_last: true
- is_list_add: true
- key: manualJournalLines
- keyPascal: ManualJournalLine
- keySnake: manual_journal_lines
- object: credit
- - debit:
- is_object: true
- key: debit
- keyPascal: ManualJournalLine
- - lineAmount:
- nonString: true
- key: lineAmount
- keyPascal: LineAmount
- keySnake: line_amount
- default: 100.0
- is_money: true
- object: debit
- - accountCode:
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: 120
- object: debit
- - description:
- is_last: true
- key: description
- keyPascal: Description
- default: "Hello there"
- object: debit
- - add_debit:
- is_last: true
- is_list_add: true
- key: manualJournalLines
- keyPascal: ManualJournalLine
- keySnake: manual_journal_lines
- object: debit
- - manualJournal:
- is_object: true
- key: manualJournal
- keyPascal: ManualJournal
- keySnake: manual_journal
- - narration:
- key: narration
- keyPascal: Narration
- default: Foobar
- object: manualJournal
- - date:
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: dateValue
- python: date_value
- ruby: date_value
- object: manualJournal
- - set_manualJournalLines:
- is_last: true
- is_variable: true
- nonString: true
- key: manualJournalLines
- keyPascal: JournalLines
- keySnake: journal_lines
- default: manualJournalLines
- python: manual_journal_lines
- ruby: manual_journal_lines
- object: manualJournal
- - manualJournals:
- is_object: true
- key: manualJournals
- keyPascal: ManualJournals
- - add_manualJournal:
- is_last: true
- is_array_add: true
- key: manualJournals
- keyPascal: ManualJournals
- keySnake: manual_journals
- java: ManualJournals
- php: manualJournals
- python: manual_journal
- ruby: manual_journal
- csharp: ManualJournal
- object: manualJournal
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type ManualJournals array with newly created ManualJournal
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ManualJournals'
- example: {
- "Id": "45dfa608-0fcb-4f30-a377-c82cd348569c",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552595972952)/",
- "ManualJournals": [
- {
- "Date": "/Date(1552521600000+0000)/",
- "Status": "DRAFT",
- "LineAmountTypes": "NoTax",
- "UpdatedDateUTC": "/Date(1552595972920+0000)/",
- "ManualJournalID": "d312dd5e-a53e-46d1-9d51-c569ef4570b7",
- "Narration": "Foo bar",
- "JournalLines": [
- {
- "Description": "Hello there",
- "TaxType": "NONE",
- "LineAmount": 100.00,
- "AccountCode": "400",
- "Tracking": [],
- "AccountID": "c4f29c22-28c2-4a13-9eab-ecbbd641ffdf",
- "IsBlank": false
- },
- {
- "Description": "Goodbye",
- "TaxType": "NONE",
- "LineAmount": -100.00,
- "AccountCode": "400",
- "Tracking": [
- {
- "Name": "Simpsons",
- "Option": "Bart",
- "TrackingCategoryID": "6a68adde-f210-4465-b0a9-0d8cc6f50762",
- "TrackingOptionID": "dc54c220-0140-495a-b925-3246adc0075f"
- }
- ],
- "AccountID": "c4f29c22-28c2-4a13-9eab-ecbbd641ffdf",
- "IsBlank": false
- }
- ],
- "ShowOnCashBasisReports": true,
- "Warnings": [
- {
- "Message": "Account code ''476'' has been removed as it does not match a recognised account."
- }
- ],
- "ValidationErrors": [
- {
- "Message": "The total debits (100.00) must equal total credits (-10.00)"
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: ManualJournals array with ManualJournal object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ManualJournals'
- example: {
- "ManualJournals": [
- {
- "Narration": "Journal Desc",
- "JournalLines": [
- {
- "LineAmount": 100,
- "AccountCode": "400",
- "Description": "Money Movement"
- },
- {
- "LineAmount": -100,
- "AccountCode": "400",
- "Description": "Prepayment of things",
- "Tracking": [
- {
- "Name": "North",
- "Option": "Region"
- }
- ]
- }
- ],
- "Date": "2019-03-14"
- }
- ]
- }
- '/ManualJournals/{ManualJournalID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getManualJournal
- summary: Retrieves a specific manual journal
- parameters:
- - $ref: '#/components/parameters/ManualJournalID'
- responses:
- '200':
- description: Success - return response of type ManualJournals array with a specified ManualJournals
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ManualJournals'
- example: {
- "Id": "7321fc21-1a13-4f40-ae47-df59cff5676d",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552399859139)/",
- "ManualJournals": [
- {
- "Date": "/Date(1552348800000+0000)/",
- "Status": "POSTED",
- "LineAmountTypes": "NoTax",
- "UpdatedDateUTC": "/Date(1552357188147+0000)/",
- "ManualJournalID": "99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4",
- "Narration": "These aren''t the droids you are looking for",
- "JournalLines": [
- {
- "Description": "These aren''t the droids you are looking for",
- "TaxType": "NONE",
- "TaxAmount": 0.00,
- "LineAmount": 100.00,
- "AccountCode": "429",
- "Tracking": [],
- "AccountID": "160bad11-c1b7-4c7e-8903-dca925d78721",
- "IsBlank": false
- },
- {
- "Description": "Yes the are",
- "TaxType": "NONE",
- "TaxAmount": 0.00,
- "LineAmount": -100.00,
- "AccountCode": "200",
- "Tracking": [],
- "AccountID": "e0a5d892-9f9f-44f0-a153-5cb7db125170",
- "IsBlank": false
- }
- ],
- "ShowOnCashBasisReports": true,
- "HasAttachments": true,
- "Attachments": [
- {
- "AttachmentID": "166ca8f8-8bc6-4780-8466-a0e474d586ea",
- "FileName": "giphy.gif",
- "Url": "https://api.xero.com/api.xro/2.0/manualjournal/99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4/Attachments/giphy.gif",
- "MimeType": "image/gif",
- "ContentLength": 495727
- },
- {
- "AttachmentID": "5e5036f9-b1e0-4c5d-a93f-61900137e40b",
- "FileName": "ridehistory.pdf",
- "Url": "https://api.xero.com/api.xro/2.0/manualjournal/99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4/Attachments/ridehistory.pdf",
- "MimeType": "application/pdf",
- "ContentLength": 4423
- }
- ]
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateManualJournal
- summary: Updates a specific manual journal
- x-hasAccountingValidationError: true
- x-example:
- - dateValue:
- is_date: true
- key: dateValue
- keyPascal: Date
- keySnake: date_value
- java_datatype: LocalDate
- default: "LocalDate.of(2020, Month.OCTOBER, 10)"
- java: "LocalDate.of(2020, Month.OCTOBER, 10)"
- csharp: "new DateTime(2020, 10, 10)"
- php: "new DateTime('2020-10-10')"
- node: "'2020-10-10'"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - manualJournalLines:
- is_list: true
- key: manualJournalLines
- keyPascal: ManualJournalLine
- keySnake: manual_journal_lines
- - credit:
- is_object: true
- key: credit
- keyPascal: ManualJournalLine
- - lineAmount:
- nonString: true
- key: lineAmount
- keyPascal: LineAmount
- keySnake: line_amount
- default: -100.0
- is_money: true
- object: credit
- - accountCode:
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: 400
- object: credit
- - description:
- is_last: true
- key: description
- keyPascal: Description
- default: "Hello there"
- object: credit
- - add_credit:
- is_last: true
- is_list_add: true
- key: manualJournalLines
- keyPascal: ManualJournalLine
- keySnake: manual_journal_lines
- object: credit
- - debit:
- is_object: true
- key: debit
- keyPascal: ManualJournalLine
- - lineAmount:
- nonString: true
- key: lineAmount
- keyPascal: LineAmount
- keySnake: line_amount
- default: 100.0
- is_money: true
- object: debit
- - accountCode:
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: 120
- object: debit
- - description:
- is_last: true
- key: description
- keyPascal: Description
- default: "Hello there"
- object: debit
- - add_debit:
- is_last: true
- is_list_add: true
- key: manualJournalLines
- keyPascal: ManualJournalLine
- keySnake: manual_journal_lines
- object: debit
- - manualJournal:
- is_object: true
- key: manualJournal
- keyPascal: ManualJournal
- keySnake: manual_journal
- - narration:
- key: narration
- keyPascal: Narration
- default: Foobar
- object: manualJournal
- - date:
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: dateValue
- python: date_value
- ruby: date_value
- object: manualJournal
- - set_manualJournalLines:
- is_last: true
- is_variable: true
- nonString: true
- key: manualJournalLines
- keyPascal: JournalLines
- keySnake: journal_lines
- default: manualJournalLines
- python: manual_journal_lines
- ruby: manual_journal_lines
- object: manualJournal
- - manualJournals:
- is_object: true
- key: manualJournals
- keyPascal: ManualJournals
- - add_manualJournal:
- is_last: true
- is_array_add: true
- key: manualJournals
- keyPascal: ManualJournals
- keySnake: manual_journals
- java: ManualJournals
- php: manualJournals
- python: manual_journal
- ruby: manual_journal
- csharp: ManualJournal
- object: manualJournal
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ManualJournalID'
- responses:
- '200':
- description: Success - return response of type ManualJournals array with an updated ManualJournal
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ManualJournals'
- example: {
- "Id": "b694559c-686c-4047-b657-661ba6c0dd1f",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552357736850)/",
- "ManualJournals": [
- {
- "Date": "/Date(1552262400000+0000)/",
- "Status": "DRAFT",
- "LineAmountTypes": "NoTax",
- "UpdatedDateUTC": "/Date(1552357736820+0000)/",
- "ManualJournalID": "07eac261-78ef-47a0-a0eb-a57b74137877",
- "Narration": "Hello Xero",
- "JournalLines": [
- {
- "Description": "Hello there",
- "TaxType": "NONE",
- "TaxAmount": 0.00,
- "LineAmount": 100.00,
- "AccountCode": "400",
- "Tracking": [],
- "AccountID": "c4f29c22-28c2-4a13-9eab-ecbbd641ffdf",
- "IsBlank": false
- },
- {
- "Description": "Goodbye",
- "TaxType": "NONE",
- "TaxAmount": 0.00,
- "LineAmount": -100.00,
- "AccountCode": "400",
- "Tracking": [],
- "AccountID": "c4f29c22-28c2-4a13-9eab-ecbbd641ffdf",
- "IsBlank": false
- }
- ],
- "ShowOnCashBasisReports": true,
- "HasAttachments": false,
- "Attachments": []
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ManualJournals'
- example: {
- "ManualJournals": [
- {
- "Narration": "Hello Xero",
- "ManualJournalID": "00000000-0000-0000-0000-000000000000",
- "JournalLines": []
- }
- ]
- }
- '/ManualJournals/{ManualJournalID}/Attachments':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getManualJournalAttachments
- summary: Retrieves attachment for a specific manual journal
- parameters:
- - $ref: '#/components/parameters/ManualJournalID'
- responses:
- '200':
- description: Success - return response of type Attachments array with all Attachments for a ManualJournals
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "5fa4b3ef-7945-45a7-9bab-10e830673dfb",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552404121471)/",
- "Attachments": [
- {
- "AttachmentID": "16e86f32-3e25-4209-8662-c0dfd91b654c",
- "FileName": "HelloWorld.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/HelloWorld.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- },
- {
- "AttachmentID": "ff7c439e-a057-4807-ac2c-b558d7df7511",
- "FileName": "foobar.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/foobar.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '/ManualJournals/{ManualJournalID}/Attachments/{AttachmentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getManualJournalAttachmentById
- summary: Allows you to retrieve a specific attachment from a specific manual journal using a unique attachment Id
- parameters:
- - $ref: '#/components/parameters/ManualJournalID'
- - $ref: '#/components/parameters/AttachmentID'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Manual Journal as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/ManualJournals/{ManualJournalID}/Attachments/{FileName}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getManualJournalAttachmentByFileName
- summary: Retrieves a specific attachment from a specific manual journal by file name
- parameters:
- - $ref: '#/components/parameters/ManualJournalID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Manual Journal as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- post:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: updateManualJournalAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Updates a specific attachment from a specific manual journal by file name
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ManualJournalID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of type Attachments array with an update Attachment for a ManualJournals
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "e1cb9deb-a8f0-477f-b4d1-cf0c6c39e080",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552401039306)/",
- "Attachments": [
- {
- "AttachmentID": "16e86f32-3e25-4209-8662-c0dfd91b654c",
- "FileName": "HelloWorld.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/HelloWorld.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- put:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: createManualJournalAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Creates a specific attachment for a specific manual journal by file name
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ManualJournalID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of type Attachments array with a newly created Attachment for a ManualJournals
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "a864994c-e7d7-4dee-b5ca-0a729fde2f39",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552400898428)/",
- "Attachments": [
- {
- "AttachmentID": "47ac97ff-d4f9-48a0-8a8e-49fae29129e7",
- "FileName": "foobar.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/foobar.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/ManualJournals/{ManualJournalID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getManualJournalsHistory
- summary: Retrieves history for a specific manual journal
- parameters:
- - $ref: '#/components/parameters/ManualJournalID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createManualJournalHistoryRecord
- summary: Creates a history record for a specific manual journal
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ManualJournalID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- /Organisation:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getOrganisations
- summary: Retrieves Xero organisation details
- responses:
- '200':
- description: Success - return response of type Organisation array with all Organisation
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Organisations'
- example: {
- "Id": "27b7a645-a3ee-43c8-b2c6-a2fa7b84c8c5",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552404447003)/",
- "Organisations": [
- {
- "APIKey": "CTJ60UH519MXQIXEJSDPDALS3EOZ5Y",
- "Name": "Dev Evangelist - Sid Test 3 (NZ-2016-02)",
- "LegalName": "Dev Evangelist - Sid Test 3 (NZ-2016-02)",
- "PaysTax": true,
- "Version": "NZ",
- "OrganisationType": "COMPANY",
- "BaseCurrency": "NZD",
- "CountryCode": "NZ",
- "IsDemoCompany": false,
- "OrganisationStatus": "ACTIVE",
- "TaxNumber": "071-138-054",
- "FinancialYearEndDay": 31,
- "FinancialYearEndMonth": 3,
- "SalesTaxBasis": "PAYMENTS",
- "SalesTaxPeriod": "TWOMONTHS",
- "DefaultSalesTax": "Tax Exclusive",
- "DefaultPurchasesTax": "Tax Exclusive",
- "PeriodLockDate": "/Date(1546214400000+0000)/",
- "EndOfYearLockDate": "/Date(1546214400000+0000)/",
- "CreatedDateUTC": "/Date(1455827393000)/",
- "OrganisationEntityType": "COMPANY",
- "Timezone": "NEWZEALANDSTANDARDTIME",
- "ShortCode": "!mBdtL",
- "OrganisationID": "b2c885a9-4bb9-4a00-9b6e-6c2bf60b1a2b",
- "Edition": "BUSINESS",
- "Class": "PREMIUM",
- "Addresses": [],
- "Phones": [],
- "ExternalLinks": [],
- "PaymentTerms": {}
- }
- ]
- }
- '/Organisation/Actions':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getOrganisationActions
- summary: Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation.
- responses:
- '200':
- description: Success - return response of type Actions array with all key actions
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Actions'
- example: {
- "Id": "f02c0dd1-1917-4d57-9853-997f6bcaf2bc",
- "Status": "OK",
- "ProviderName": "Java OA2 dev 01",
- "DateTimeUTC": "/Date(1602883301013)/",
- "Actions": [
- {
- "Name": "CreateApprovedInvoice",
- "Status": "ALLOWED"
- },
- {
- "Name": "CreateDraftPurchaseOrder",
- "Status": "ALLOWED"
- },
- {
- "Name": "CreateApprovedBill",
- "Status": "ALLOWED"
- },
- {
- "Name": "AttachFilesIntoInvoice",
- "Status": "ALLOWED"
- },
- {
- "Name": "UseMulticurrency",
- "Status": "ALLOWED"
- },
- {
- "Name": "CreateDraftInvoice",
- "Status": "ALLOWED"
- },
- {
- "Name": "CreateRepeatingInvoice",
- "Status": "ALLOWED"
- },
- {
- "Name": "CreateRepeatingBill",
- "Status": "ALLOWED"
- },
- {
- "Name": "CreateSentQuote",
- "Status": "ALLOWED"
- },
- {
- "Name": "CreateInvoicePayment",
- "Status": "ALLOWED"
- },
- {
- "Name": "CreateApprovedPurchaseOrder",
- "Status": "ALLOWED"
- },
- {
- "Name": "CreateDraftQuote",
- "Status": "ALLOWED"
- },
- {
- "Name": "CreateDraftBill",
- "Status": "ALLOWED"
- }
- ]
- }
- '/Organisation/{OrganisationID}/CISSettings':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getOrganisationCISSettings
- summary: Retrieves the CIS settings for the Xero organistaion.
- parameters:
- - $ref: '#/components/parameters/OrganisationID'
- responses:
- '200':
- description: Success - return response of type Organisation array with specified Organisation
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CISOrgSettings'
- example: {
- "CISSettings": [
- {
- "CISEnambed": true,
- "Rate": 10
- }
- ]
- }
- /Overpayments:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getOverpayments
- summary: Retrieves overpayments
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="AUTHORISED"
- x-example-csharp: Status==\"AUTHORISED\"
- x-example-java: Status=="' + Overpayment.StatusEnum.AUTHORISED + '"
- x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Overpayment::STATUS_AUTHORISED . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::Overpayment::AUTHORISED}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Status ASC"
- schema:
- type: string
- - in: query
- 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
- example: 1
- schema:
- type: integer
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/pageSize'
- responses:
- '200':
- description: Success - return response of type Overpayments array with all Overpayments
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Overpayments'
- example: {
- "Id": "c0ce675e-e5bc-4b2a-a20e-76a9eaedf89d",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552428951416)/",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 5
- },
- "Overpayments": [
- {
- "OverpaymentID": "098b4dcb-5622-4699-87f8-9d40c4ccceb3",
- "ID": "098b4dcb-5622-4699-87f8-9d40c4ccceb3",
- "Type": "SPEND-OVERPAYMENT",
- "RemainingCredit": 500.00,
- "Allocations": [],
- "Payments": [],
- "HasAttachments": false,
- "Contact": {
- "ContactID": "af3ffcc1-c578-4658-82f3-5d8d458cc7af",
- "Name": "Daddy Warbucks",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-03-12T00:00:00",
- "Date": "/Date(1552348800000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "NoTax",
- "LineItems": [],
- "SubTotal": 500.00,
- "TotalTax": 0.00,
- "Total": 500.00,
- "UpdatedDateUTC": "/Date(1552428535123+0000)/",
- "CurrencyCode": "NZD"
- },
- {
- "OverpaymentID": "2a8bda49-8908-473b-8bcf-1f90990460eb",
- "ID": "2a8bda49-8908-473b-8bcf-1f90990460eb",
- "Type": "RECEIVE-OVERPAYMENT",
- "RemainingCredit": 20.00,
- "Allocations": [],
- "Payments": [],
- "HasAttachments": false,
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-03-13T00:00:00",
- "Date": "/Date(1552435200000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "NoTax",
- "LineItems": [],
- "SubTotal": 20.00,
- "TotalTax": 0.00,
- "Total": 20.00,
- "UpdatedDateUTC": "/Date(1552428568250+0000)/",
- "CurrencyCode": "NZD"
- },
- {
- "OverpaymentID": "ed7f6041-c915-4667-bd1d-54c48e92161e",
- "ID": "ed7f6041-c915-4667-bd1d-54c48e92161e",
- "Type": "SPEND-OVERPAYMENT",
- "RemainingCredit": 3000.00,
- "Allocations": [],
- "Payments": [],
- "HasAttachments": false,
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-03-12T00:00:00",
- "Date": "/Date(1552348800000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "NoTax",
- "LineItems": [],
- "SubTotal": 3000.00,
- "TotalTax": 0.00,
- "Total": 3000.00,
- "UpdatedDateUTC": "/Date(1552428781527+0000)/",
- "CurrencyCode": "NZD"
- },
- {
- "OverpaymentID": "0859adbc-ea00-40cd-a877-258cf8644975",
- "ID": "0859adbc-ea00-40cd-a877-258cf8644975",
- "Type": "RECEIVE-OVERPAYMENT",
- "RemainingCredit": 20.00,
- "Allocations": [],
- "Payments": [],
- "HasAttachments": false,
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-03-13T00:00:00",
- "Date": "/Date(1552435200000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "NoTax",
- "LineItems": [],
- "SubTotal": 20.00,
- "TotalTax": 0.00,
- "Total": 20.00,
- "UpdatedDateUTC": "/Date(1552428842190+0000)/",
- "CurrencyCode": "NZD"
- },
- {
- "OverpaymentID": "687b877f-634a-415d-92b2-74e62977de30",
- "ID": "687b877f-634a-415d-92b2-74e62977de30",
- "Type": "RECEIVE-OVERPAYMENT",
- "RemainingCredit": 20.00,
- "Allocations": [],
- "Payments": [],
- "HasAttachments": false,
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-03-13T00:00:00",
- "Date": "/Date(1552435200000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "NoTax",
- "LineItems": [],
- "SubTotal": 20.00,
- "TotalTax": 0.00,
- "Total": 20.00,
- "UpdatedDateUTC": "/Date(1552428950730+0000)/",
- "CurrencyCode": "NZD"
- }
- ]
- }
- '/Overpayments/{OverpaymentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getOverpayment
- summary: Retrieves a specific overpayment using a unique overpayment Id
- parameters:
- - $ref: '#/components/parameters/OverpaymentID'
- responses:
- '200':
- description: Success - return response of type Overpayments array with specified Overpayments
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Overpayments'
- example: {
- "Id": "46c9e8e2-9410-4e75-9297-f0ca8fa76c32",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553278835158)/",
- "Overpayments": [
- {
- "OverpaymentID": "ed7f6041-c915-4667-bd1d-54c48e92161e",
- "ID": "ed7f6041-c915-4667-bd1d-54c48e92161e",
- "CurrencyRate": 1.000000,
- "Type": "SPEND-OVERPAYMENT",
- "RemainingCredit": 2999.00,
- "Allocations": [
- {
- "Amount": 1.00,
- "Date": "/Date(1552348800000+0000)/",
- "Invoice": {
- "InvoiceID": "c45720a1-ade3-4a38-a064-d15489be6841",
- "InvoiceNumber": "",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": []
- }
- }
- ],
- "Payments": [],
- "HasAttachments": true,
- "Attachments": [
- {
- "AttachmentID": "247dd942-5245-47a7-adb1-4d9ea075b431",
- "FileName": "giphy.gif",
- "Url": "https://api.xero.com/api.xro/2.0/banktransaction/ed7f6041-c915-4667-bd1d-54c48e92161e/Attachments/giphy.gif",
- "MimeType": "image/gif",
- "ContentLength": 495727
- }
- ],
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": "",
- "AttentionTo": ""
- },
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-03-12T00:00:00",
- "Date": "/Date(1552348800000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "NoTax",
- "LineItems": [
- {
- "Description": "Broken TV deposit",
- "UnitAmount": 3000.00,
- "TaxType": "NONE",
- "TaxAmount": 0.00,
- "LineAmount": 3000.00,
- "AccountCode": "800",
- "Tracking": [],
- "Quantity": 1.0000,
- "DiscountEnteredAsPercent": true,
- "ValidationErrors": []
- }
- ],
- "SubTotal": 3000.00,
- "TotalTax": 0.00,
- "Total": 3000.00,
- "UpdatedDateUTC": "/Date(1552428952890+0000)/",
- "CurrencyCode": "NZD"
- }
- ]
- }
- '/Overpayments/{OverpaymentID}/Allocations':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createOverpaymentAllocations
- summary: Creates a single allocation for a specific overpayment
- x-hasAccountingValidationError: true
- x-example:
- - currDate:
- is_date: true
- key: currDate
- keyPascal: CurrDate
- keySnake: curr_date
- java_datatype: LocalDate
- default: "LocalDate.now()"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- node: "'2020-12-10'"
- php: "new DateTime('2020-12-10')"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - invoice:
- is_object: true
- key: invoice
- keyPascal: Invoice
- - invoiceID:
- is_last: true
- is_uuid: true
- key: invoiceID
- keyPascal: InvoiceID
- keySnake: invoice_id
- default: 00000000-0000-0000-0000-000000000000
- object: invoice
- - allocation:
- is_object: true
- key: allocation
- keyPascal: Allocation
- - amount:
- nonString: true
- key: amount
- keyPascal: Amount
- default: 1.0
- is_money: true
- object: allocation
- - date:
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: currDate
- python: curr_date
- ruby: curr_date
- object: allocation
- - set_invoice:
- is_last: true
- is_variable: true
- nonString: true
- key: invoice
- keyPascal: Invoice
- default: invoice
- object: allocation
- - allocations:
- is_object: true
- key: allocations
- keyPascal: Allocations
- - add_allocation:
- is_last: true
- is_array_add: true
- key: allocations
- keyPascal: Allocations
- java: Allocations
- csharp: Allocation
- object: allocation
- parameters:
- - $ref: '#/components/parameters/OverpaymentID'
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Allocations array with all Allocation for Overpayments
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Allocations'
- example: {
- "Id": "3b7f7be2-384a-4703-bcfb-c56e9116c914",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552428952968)/",
- "Allocations": [
- {
- "Amount": 1.00,
- "Date": "/Date(1552348800000+0000)/",
- "Invoice": {
- "InvoiceID": "c45720a1-ade3-4a38-a064-d15489be6841",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": [],
- "ValidationErrors": []
- },
- "Overpayment": {
- "OverpaymentID": "ed7f6041-c915-4667-bd1d-54c48e92161e",
- "ID": "ed7f6041-c915-4667-bd1d-54c48e92161e",
- "LineItems": []
- },
- "ValidationErrors": []
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Allocations array with Allocation object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Allocations'
- example: {
- "Allocations": [
- {
- "Invoice": {
- "InvoiceID": "00000000-0000-0000-0000-000000000000",
- "LineItems": [],
- "Contact": {},
- "Type": "ACCPAY"
- },
- "Amount": 10.00,
- "Date": "2019-03-12"
- }
- ]
- }
- '/Overpayments/{OverpaymentID}/Allocations/{AllocationID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- delete:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: deleteOverpaymentAllocations
- summary: Deletes an Allocation from an overpayment
- parameters:
- - $ref: '#/components/parameters/OverpaymentID'
- - $ref: '#/components/parameters/AllocationID'
- responses:
- '200':
- description: Success - return response of type Allocation with the isDeleted flag as true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Allocation'
- example: {
- "AllocationId": "2bb15054-3868-4f85-a9c6-0402ec8c1201",
- "Date": "/Date(1551822670731)/",
- "Invoice": [
- {
- "InvoiceID": "b7eb1fc9-a0f9-4e8e-9373-6689f5350832",
- }
- ],
- "IsDeleted": true,
- }
- '/Overpayments/{OverpaymentID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getOverpaymentHistory
- summary: Retrieves history records of a specific overpayment
- parameters:
- - $ref: '#/components/parameters/OverpaymentID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createOverpaymentHistory
- summary: Creates a history record for a specific overpayment
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/OverpaymentID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- '400':
- description: A failed request due to validation error - API is not able to create HistoryRecord for Overpayments
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- example: {
- "ErrorNumber": 10,
- "Type": "ValidationException",
- "Message": "A validation exception occurred",
- "Elements": [
- {
- "DateUTCString": "2019-03-12T22:30:13",
- "DateUTC": "/Date(1552429813667)/",
- "Details": "Hello World",
- "ValidationErrors": [
- {
- "Message": "The document with the supplied id was not found for this endpoint."
- }
- ]
- }
- ]
- }
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- /Payments:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getPayments
- summary: Retrieves payments for invoices and credit notes
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="AUTHORISED"
- x-example-csharp: Status==\"AUTHORISED\"
- x-example-java: Status=="' + Payment.StatusEnum.AUTHORISED + '"
- x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Payment::STATUS_AUTHORISED . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::Payment::AUTHORISED}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Amount ASC"
- schema:
- type: string
- - in: query
- name: page
- description: Up to 100 payments will be returned in a single API call
- example: 1
- schema:
- type: integer
- - $ref: '#/components/parameters/pageSize'
- responses:
- '200':
- description: Success - return response of type Payments array for all Payments
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Payments'
- example: {
- "Id": "9f310473-e1b5-4704-a25c-eec653deb596",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552431874205)/",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 2
- },
- "Payments": [
- {
- "PaymentID": "99ea7f6b-c513-4066-bc27-b7c65dcd76c2",
- "BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0",
- "BatchPayment": {
- "Account": {
- "AccountID": "5690f1e8-1d02-4893-90c2-ee1a69eff942"
- },
- "BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0",
- "Date": "/Date(1552521600000+0000)/",
- "Type": "RECBATCH",
- "Status": "AUTHORISED",
- "TotalAmount": "50.00",
- "UpdatedDateUTC": "/Date(1541176592690+0000)/",
- "IsReconciled": "false"
- },
- "Date": "/Date(1543449600000+0000)/",
- "BankAmount": 46.00,
- "Amount": 46.00,
- "Reference": "",
- "CurrencyRate": 1.000000,
- "PaymentType": "ACCRECPAYMENT",
- "Status": "AUTHORISED",
- "UpdatedDateUTC": "/Date(1541176592690+0000)/",
- "HasAccount": true,
- "IsReconciled": false,
- "Account": {
- "AccountID": "5690f1e8-1d02-4893-90c2-ee1a69eff942",
- "Code": "970"
- },
- "Invoice": {
- "Type": "ACCREC",
- "InvoiceID": "046d8a6d-1ae1-4b4d-9340-5601bdf41b87",
- "InvoiceNumber": "INV-0002",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "Contact": {
- "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7",
- "ContactNumber": "",
- "Name": "Barney Rubble-83203",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "LineItems": [],
- "CurrencyCode": "NZD"
- },
- "HasValidationErrors": false
- },
- {
- "PaymentID": "6b037c9b-2e5d-4905-84d3-eabfb3438242",
- "Date": "/Date(1552521600000+0000)/",
- "BankAmount": 2.00,
- "Amount": 2.00,
- "Reference": "Too much",
- "CurrencyRate": 1.000000,
- "PaymentType": "ARCREDITPAYMENT",
- "Status": "AUTHORISED",
- "UpdatedDateUTC": "/Date(1551812346173+0000)/",
- "HasAccount": true,
- "IsReconciled": false,
- "Account": {
- "AccountID": "136ebd08-60ea-4592-8982-be92c153b53a",
- "Code": "980"
- },
- "Invoice": {
- "Type": "ACCRECCREDIT",
- "InvoiceID": "249f15fa-f2a7-4acc-8769-0984103f2225",
- "InvoiceNumber": "CN-0005",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactNumber": "",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "LineItems": [],
- "CurrencyCode": "NZD"
- },
- "HasValidationErrors": false
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createPayments
- summary: Creates multiple payments for invoices or credit notes
- x-hasAccountingValidationError: true
- x-example:
- - dateValue:
- is_date: true
- key: dateValue
- keyPascal: Date
- keySnake: date_value
- java_datatype: LocalDate
- default: "LocalDate.of(2020, Month.OCTOBER, 10)"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- php: "new DateTime('2020-10-10')"
- node: "'2020-10-10'"
- python: "dateutil.parser.parse('2020-10-10T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - invoice:
- is_object: true
- key: invoice
- keyPascal: Invoice
- - invoiceID:
- is_last: true
- is_uuid: true
- key: invoiceID
- keyPascal: InvoiceID
- keySnake: invoice_id
- default: 00000000-0000-0000-0000-000000000000
- object: invoice
- - account:
- is_object: true
- key: account
- keyPascal: Account
- - accountID:
- is_last: true
- is_uuid: true
- key: accountID
- keyPascal: AccountID
- keySnake: account_id
- default: 00000000-0000-0000-0000-000000000000
- object: account
- - payment:
- is_object: true
- key: payment
- keyPascal: Payment
- - set_invoice:
- is_variable: true
- nonString: true
- key: invoice
- keyPascal: Invoice
- default: invoice
- object: payment
- - set_account:
- is_variable: true
- nonString: true
- key: account
- keyPascal: Account
- default: account
- object: payment
- - amount:
- nonString: true
- key: amount
- keyPascal: Amount
- default: 1.0
- is_money: true
- object: payment
- - date:
- is_last: true
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: dateValue
- python: date_value
- ruby: date_value
- object: payment
- - payments:
- is_object: true
- key: payments
- keyPascal: Payments
- - add_payment:
- is_last: true
- is_array_add: true
- key: payments
- keyPascal: Payments
- java: Payments
- csharp: Payment
- object: payment
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Payments array for newly created Payment
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Payments'
- example: {
- "Id": "83b5715a-6a77-4c16-b5b8-2da08b5fde44",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552432238716)/",
- "Payments": [
- {
- "PaymentID": "61ed71fc-01bf-4eb8-8419-8a18789ff45f",
- "Date": "/Date(1552348800000+0000)/",
- "BankAmount": 1.00,
- "Amount": 1.00,
- "CurrencyRate": 1.000000,
- "PaymentType": "ACCRECPAYMENT",
- "Status": "AUTHORISED",
- "UpdatedDateUTC": "/Date(1552432238623+0000)/",
- "HasAccount": true,
- "IsReconciled": false,
- "Account": {
- "AccountID": "5690f1e8-1d02-4893-90c2-ee1a69eff942",
- "Code": "970",
- "Name": "Owner A Funds Introduced"
- },
- "Invoice": {
- "Type": "ACCREC",
- "InvoiceID": "c7c37b83-ac95-45ea-88ba-8ad83a5f22fe",
- "InvoiceNumber": "INV-0004",
- "Reference": "",
- "Prepayments": [],
- "Overpayments": [],
- "AmountDue": 229.00,
- "AmountPaid": 1.00,
- "SentToContact": false,
- "CurrencyRate": 1.000000,
- "HasErrors": false,
- "IsDiscounted": false,
- "Contact": {
- "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7",
- "Name": "Barney Rubble-83203",
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2018-10-10T00:00:00",
- "Date": "/Date(1539129600000+0000)/",
- "DueDateString": "2018-10-18T00:00:00",
- "DueDate": "/Date(1539820800000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "boo",
- "UnitAmount": 200.00,
- "TaxType": "OUTPUT2",
- "TaxAmount": 30.00,
- "LineAmount": 200.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "173dfdb9-43b5-4bd2-ae25-9419e662a3a7",
- "ValidationErrors": []
- }
- ],
- "SubTotal": 200.00,
- "TotalTax": 30.00,
- "Total": 230.00,
- "UpdatedDateUTC": "/Date(1552432238623+0000)/",
- "CurrencyCode": "NZD"
- },
- "HasValidationErrors": true,
- "ValidationErrors": [
- {
- "Message": "Payment amount exceeds the amount outstanding on this document"
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Payments array with Payment object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Payments'
- example: {
- "Payments": [
- {
- "Invoice": {
- "LineItems": [],
- "InvoiceID": "00000000-0000-0000-0000-000000000000"
- },
- "Account": {
- "Code": "970"
- },
- "Date": "2019-03-12",
- "Amount": 1
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createPayment
- summary: Creates a single payment for invoice or credit notes
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- x-hasAccountingValidationError: true
- x-example:
- - dateValue:
- is_date: true
- key: dateValue
- keyPascal: Date
- keySnake: date_value
- java_datatype: LocalDate
- default: "LocalDate.of(2020, Month.OCTOBER, 10)"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- php: "new DateTime('2020-10-10')"
- node: "'2020-10-10'"
- python: "dateutil.parser.parse('2020-10-10T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - invoice:
- is_object: true
- key: invoice
- keyPascal: Invoice
- - invoiceID:
- is_last: true
- is_uuid: true
- key: invoiceID
- keyPascal: InvoiceID
- keySnake: invoice_id
- default: 00000000-0000-0000-0000-000000000000
- object: invoice
- - account:
- is_object: true
- key: account
- keyPascal: Account
- - accountID:
- is_last: true
- is_uuid: true
- key: accountID
- keyPascal: AccountID
- keySnake: account_id
- default: 00000000-0000-0000-0000-000000000000
- object: account
- - payment:
- is_object: true
- key: payment
- keyPascal: Payment
- - set_invoice:
- is_variable: true
- nonString: true
- key: invoice
- keyPascal: Invoice
- default: invoice
- object: payment
- - set_account:
- is_variable: true
- nonString: true
- key: account
- keyPascal: Account
- default: account
- object: payment
- - amount:
- nonString: true
- key: amount
- keyPascal: Amount
- default: 1.0
- is_money: true
- object: payment
- - date:
- is_last: true
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: dateValue
- python: date_value
- ruby: date_value
- object: payment
- - payments:
- is_object: true
- key: payments
- keyPascal: Payments
- - add_payment:
- is_last: true
- is_array_add: true
- key: payments
- keyPascal: Payments
- java: Payments
- csharp: Payment
- object: payment
- responses:
- '200':
- description: Success - return response of type Payments array for newly created Payment
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Payments'
- example: {
- "Id": "83b5715a-6a77-4c16-b5b8-2da08b5fde44",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552432238716)/",
- "Payments": [
- {
- "PaymentID": "61ed71fc-01bf-4eb8-8419-8a18789ff45f",
- "Date": "/Date(1552348800000+0000)/",
- "BankAmount": 1.00,
- "Amount": 1.00,
- "CurrencyRate": 1.000000,
- "PaymentType": "ACCRECPAYMENT",
- "Status": "AUTHORISED",
- "UpdatedDateUTC": "/Date(1552432238623+0000)/",
- "HasAccount": true,
- "IsReconciled": false,
- "Account": {
- "AccountID": "5690f1e8-1d02-4893-90c2-ee1a69eff942",
- "Code": "970",
- "Name": "Owner A Funds Introduced"
- },
- "Invoice": {
- "Type": "ACCREC",
- "InvoiceID": "c7c37b83-ac95-45ea-88ba-8ad83a5f22fe",
- "InvoiceNumber": "INV-0004",
- "Reference": "",
- "Prepayments": [],
- "Overpayments": [],
- "AmountDue": 229.00,
- "AmountPaid": 1.00,
- "SentToContact": false,
- "CurrencyRate": 1.000000,
- "HasErrors": false,
- "IsDiscounted": false,
- "Contact": {
- "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7",
- "Name": "Barney Rubble-83203",
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2018-10-10T00:00:00",
- "Date": "/Date(1539129600000+0000)/",
- "DueDateString": "2018-10-18T00:00:00",
- "DueDate": "/Date(1539820800000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "boo",
- "UnitAmount": 200.00,
- "TaxType": "OUTPUT2",
- "TaxAmount": 30.00,
- "LineAmount": 200.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "173dfdb9-43b5-4bd2-ae25-9419e662a3a7",
- "ValidationErrors": []
- }
- ],
- "SubTotal": 200.00,
- "TotalTax": 30.00,
- "Total": 230.00,
- "UpdatedDateUTC": "/Date(1552432238623+0000)/",
- "CurrencyCode": "NZD"
- },
- "HasValidationErrors": true,
- "ValidationErrors": [
- {
- "Message": "Payment amount exceeds the amount outstanding on this document"
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Request body with a single Payment object
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Payment'
- example: {
- "Payments": [
- {
- "Invoice": {
- "LineItems": [],
- "InvoiceID": "00000000-0000-0000-0000-000000000000"
- },
- "Account": {
- "Code": "970"
- },
- "Date": "2019-03-12",
- "Amount": 1
- }
- ]
- }
- '/Payments/{PaymentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getPayment
- summary: Retrieves a specific payment for invoices and credit notes using a unique payment Id
- parameters:
- - $ref: '#/components/parameters/PaymentID'
- responses:
- '200':
- description: Success - return response of type Payments array for specified Payment
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Payments'
- example: {
- "Id": "4876f9ee-3a17-47d8-8c1b-84377c8f2998",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552431874852)/",
- "Payments": [
- {
- "PaymentID": "99ea7f6b-c513-4066-bc27-b7c65dcd76c2",
- "BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0",
- "BatchPayment": {
- "Account": {
- "AccountID": "5690f1e8-1d02-4893-90c2-ee1a69eff942"
- },
- "BatchPaymentID": "b54aa50c-794c-461b-89d1-846e1b84d9c0",
- "Date": "/Date(1543449600000+0000)/",
- "Type": "RECBATCH",
- "Status": "AUTHORISED",
- "TotalAmount": "50.00",
- "UpdatedDateUTC": "/Date(1541176592690+0000)/",
- "IsReconciled": "false"
- },
- "Date": "/Date(1543449600000+0000)/",
- "BankAmount": 46.00,
- "Amount": 46.00,
- "CurrencyRate": 1.000000,
- "PaymentType": "ACCRECPAYMENT",
- "Status": "AUTHORISED",
- "UpdatedDateUTC": "/Date(1541176592690+0000)/",
- "HasAccount": true,
- "IsReconciled": false,
- "Account": {
- "AccountID": "5690f1e8-1d02-4893-90c2-ee1a69eff942",
- "Code": "970",
- "Name": "Owner A Funds Introduced"
- },
- "Invoice": {
- "Type": "ACCREC",
- "InvoiceID": "046d8a6d-1ae1-4b4d-9340-5601bdf41b87",
- "InvoiceNumber": "INV-0002",
- "Reference": "Red Fish, Blue Fish",
- "Payments": [
- {
- "PaymentID": "99ea7f6b-c513-4066-bc27-b7c65dcd76c2",
- "Date": "/Date(1543449600000+0000)/",
- "Amount": 46.00,
- "CurrencyRate": 1.000000,
- "HasAccount": false,
- "HasValidationErrors": false
- }
- ],
- "Prepayments": [],
- "Overpayments": [],
- "AmountDue": 0.00,
- "AmountPaid": 46.00,
- "SentToContact": true,
- "CurrencyRate": 1.000000,
- "HasErrors": false,
- "IsDiscounted": false,
- "Contact": {
- "ContactID": "a3675fc4-f8dd-4f03-ba5b-f1870566bcd7",
- "Name": "Barney Rubble-83203",
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2018-10-20T00:00:00",
- "Date": "/Date(1539993600000+0000)/",
- "DueDateString": "2018-12-30T00:00:00",
- "DueDate": "/Date(1546128000000+0000)/",
- "Status": "PAID",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Acme Tires",
- "UnitAmount": 20.00,
- "TaxType": "OUTPUT2",
- "TaxAmount": 6.00,
- "LineAmount": 40.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 2.0000,
- "LineItemID": "878d1688-a905-4866-ae91-5a772c2540c7",
- "ValidationErrors": []
- }
- ],
- "SubTotal": 40.00,
- "TotalTax": 6.00,
- "Total": 46.00,
- "UpdatedDateUTC": "/Date(1541176592690+0000)/",
- "CurrencyCode": "NZD",
- "FullyPaidOnDate": "/Date(1543449600000+0000)/"
- },
- "HasValidationErrors": false
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: deletePayment
- summary: Updates a specific payment for invoices and credit notes
- x-hasAccountingValidationError: true
- x-example:
- - paymentDelete:
- is_object: true
- key: paymentDelete
- keyPascal: PaymentDelete
- - status:
- is_last: true
- key: status
- keyPascal: Status
- default: DELETED
- object: paymentDelete
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/PaymentID'
- responses:
- '200':
- description: Success - return response of type Payments array for updated Payment
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Payments'
- example: {
- "Id": "ee23328c-4a8b-4ee7-8fb6-9796ffab9cb0",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1583945852489)/",
- "Payments": [
- {
- "PaymentID": "c94c996b-1ab3-4ff3-ad19-1cdc77f30817",
- "Date": "/Date(1567382400000+0000)/",
- "BankAmount": 2.00,
- "Amount": 2.00,
- "Reference": "foobar",
- "CurrencyRate": 1.000000,
- "PaymentType": "APCREDITPAYMENT",
- "Status": "DELETED",
- "UpdatedDateUTC": "/Date(1583945852373+0000)/",
- "HasAccount": true,
- "IsReconciled": false,
- "Account": {
- "AccountID": "57f261f0-e32d-4a7f-be82-22cd992c6367",
- "Code": "033",
- "Name": "Checking account"
- },
- "Invoice": {
- "Type": "ACCPAYCREDIT",
- "InvoiceID": "dba68ebc-c05a-4e2d-b97d-964349e5b8d6",
- "InvoiceNumber": "",
- "Reference": "",
- "Prepayments": [],
- "Overpayments": [],
- "AmountDue": 22.00,
- "AmountPaid": 0.00,
- "SentToContact": false,
- "CurrencyRate": 1.000000,
- "IsDiscounted": false,
- "HasErrors": false,
- "Contact": {
- "ContactID": "216830cb-9a68-487e-928b-c1a7ccc4fc81",
- "Name": "FooBar73005",
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2017-01-02T00:00:00",
- "Date": "/Date(1483315200000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Sample Item72716",
- "UnitAmount": 20.00,
- "TaxType": "INPUT",
- "TaxAmount": 2.00,
- "LineAmount": 20.00,
- "AccountCode": "400",
- "Tracking": [],
- "Quantity": 1.0000,
- "ValidationErrors": []
- }
- ],
- "SubTotal": 20.00,
- "TotalTax": 2.00,
- "Total": 22.00,
- "UpdatedDateUTC": "/Date(1583945852363+0000)/",
- "CurrencyCode": "AUD"
- },
- "HasValidationErrors": false
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PaymentDelete'
- example: {
- "Payments":[
- {
- "Status":"DELETED"
- }
- ]
- }
- '/Payments/{PaymentID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getPaymentHistory
- summary: Retrieves history records of a specific payment
- parameters:
- - $ref: '#/components/parameters/PaymentID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createPaymentHistory
- summary: Creates a history record for a specific payment
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/PaymentID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- '400':
- description: A failed request due to validation error - API is not able to create HistoryRecord for Payments
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- example: {
- "ErrorNumber": 10,
- "Type": "ValidationException",
- "Message": "A validation exception occurred",
- "Elements": [
- {
- "DateUTCString": "2019-03-12T22:30:13",
- "DateUTC": "/Date(1552429813667)/",
- "Details": "Hello World",
- "ValidationErrors": [
- {
- "Message": "The document with the supplied id was not found for this endpoint."
- }
- ]
- }
- ]
- }
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- /PaymentServices:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [paymentservices]
- tags:
- - Accounting
- operationId: getPaymentServices
- summary: Retrieves payment services
- x-excludeFromPreview: true
- responses:
- '200':
- description: Success - return response of type PaymentServices array for all PaymentService
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PaymentServices'
- example: {
- "Id": "ab82a7dd-5070-4e82-b841-0af52909fe04",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552488713171)/",
- "PaymentServices": [
- {
- "PaymentServiceID": "54b3b4f6-0443-4fba-bcd1-61ec0c35ca55",
- "PaymentServiceName": "PayUpNow",
- "PaymentServiceUrl": "https://www.payupnow.com/",
- "PaymentServiceType": "Custom",
- "PayNowText": "Time To Pay"
- }
- ]
- }
- put:
- security:
- - OAuth2: [paymentservices]
- tags:
- - Accounting
- operationId: createPaymentService
- summary: Creates a payment service
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- x-excludeFromPreview: true
- x-hasAccountingValidationError: true
- x-example:
- - object:
- is_object: true
- key: paymentService
- keyPascal: PaymentService
- keySnake: payment_service
- - paymentServiceName:
- key: paymentServiceName
- keyPascal: PaymentServiceName
- keySnake: payment_service_name
- default: ACME Payments
- object: paymentService
- - paymentServiceUrl:
- key: paymentServiceUrl
- keyPascal: PaymentServiceUrl
- keySnake: payment_service_url
- default: "https://www.payupnow.com/"
- object: paymentService
- - payNowText:
- is_last: true
- key: payNowText
- keyPascal: PayNowText
- keySnake: pay_now_text
- default: Pay Now
- object: paymentService
- - paymentServices:
- is_object: true
- key: paymentServices
- keyPascal: PaymentServices
- - add_paymentService:
- is_last: true
- is_array_add: true
- key: paymentServices
- keyPascal: PaymentServices
- java: PaymentServices
- csharp: PaymentService
- object: paymentService
- responses:
- '200':
- description: Success - return response of type PaymentServices array for newly created PaymentService
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PaymentServices'
- example: {
- "Id": "7ed8b3c0-2155-49ee-a583-f2dce6607dfb",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552488712813)/",
- "PaymentServices": [
- {
- "PaymentServiceID": "54b3b4f6-0443-4fba-bcd1-61ec0c35ca55",
- "PaymentServiceName": "PayUpNow",
- "PaymentServiceUrl": "https://www.payupnow.com/",
- "PaymentServiceType": "Custom",
- "PayNowText": "Time To Pay",
- "ValidationErrors": [
- {
- "Message": "Payment service could not be found"
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: PaymentServices array with PaymentService object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PaymentServices'
- example: {
- "PaymentServices": [
- {
- "PaymentServiceName": "PayUpNow",
- "PaymentServiceUrl": "https://www.payupnow.com/",
- "PayNowText": "Time To Pay"
- }
- ]
- }
- /Prepayments:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getPrepayments
- summary: Retrieves prepayments
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="AUTHORISED"
- x-example-csharp: Status==\"AUTHORISED\"
- x-example-java: Status=="' + Prepayment.StatusEnum.AUTHORISED + '"
- x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Prepayment::STATUS_AUTHORISED . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::Prepayment::AUTHORISED}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Reference ASC"
- schema:
- type: string
- - in: query
- 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
- example: 1
- schema:
- type: integer
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/pageSize'
- responses:
- '200':
- description: Success - return response of type Prepayments array for all Prepayment
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Prepayments'
- example: {
- "Id": "d7a9ca0c-6159-4c26-ad2e-715440c50b7d",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552489227595)/",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 1
- },
- "Prepayments": [
- {
- "PrepaymentID": "ce0cddef-cf5a-4e59-b638-f225679115a7",
- "ID": "ce0cddef-cf5a-4e59-b638-f225679115a7",
- "Type": "RECEIVE-PREPAYMENT",
- "Reference": "INV-0011",
- "RemainingCredit": 3450.00,
- "Allocations": [],
- "Payments": [],
- "HasAttachments": true,
- "Contact": {
- "ContactID": "be392c72-c121-4f83-9512-03ac71e54c20",
- "Name": "Luke Skywalker",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-03-13T00:00:00",
- "Date": "/Date(1552435200000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [],
- "SubTotal": 3000.00,
- "TotalTax": 450.00,
- "Total": 3450.00,
- "UpdatedDateUTC": "/Date(1552489187730+0000)/",
- "CurrencyCode": "NZD"
- }
- ]
- }
- '/Prepayments/{PrepaymentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getPrepayment
- summary: Allows you to retrieve a specified prepayments
- parameters:
- - $ref: '#/components/parameters/PrepaymentID'
- responses:
- '200':
- description: Success - return response of type Prepayments array for a specified Prepayment
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Prepayments'
- example: {
- "Id": "18e5f578-ef28-4096-a7aa-d06d65574b99",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553540376847)/",
- "Prepayments": [
- {
- "PrepaymentID": "ce0cddef-cf5a-4e59-b638-f225679115a7",
- "ID": "ce0cddef-cf5a-4e59-b638-f225679115a7",
- "CurrencyRate": 1.000000,
- "Type": "RECEIVE-PREPAYMENT",
- "Reference": "INV-0011",
- "RemainingCredit": 3449.00,
- "Allocations": [
- {
- "Amount": 1.00,
- "Date": "/Date(1552435200000+0000)/",
- "Invoice": {
- "InvoiceID": "c7c37b83-ac95-45ea-88ba-8ad83a5f22fe",
- "InvoiceNumber": "INV-0004",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": []
- }
- }
- ],
- "Payments": [],
- "HasAttachments": true,
- "Attachments": [
- {
- "AttachmentID": "2ca06aa0-3629-474a-9401-553d4b7fa9b0",
- "FileName": "giphy.gif",
- "Url": "https://api.xero.com/api.xro/2.0/banktransaction/ce0cddef-cf5a-4e59-b638-f225679115a7/Attachments/giphy.gif",
- "MimeType": "image/gif",
- "ContentLength": 495727
- }
- ],
- "Contact": {
- "ContactID": "be392c72-c121-4f83-9512-03ac71e54c20",
- "ContactStatus": "ACTIVE",
- "Name": "Luke Skywalker",
- "EmailAddress": "",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- },
- {
- "AddressType": "POBOX",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1552329691573+0000)/",
- "ContactGroups": [],
- "DefaultCurrency": "NZD",
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "DateString": "2019-03-13T00:00:00",
- "Date": "/Date(1552435200000+0000)/",
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Light Speeder",
- "UnitAmount": 3000.00,
- "TaxType": "OUTPUT2",
- "TaxAmount": 450.00,
- "LineAmount": 3000.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 1.0000,
- "DiscountEnteredAsPercent": true,
- "ValidationErrors": []
- }
- ],
- "SubTotal": 3000.00,
- "TotalTax": 450.00,
- "Total": 3450.00,
- "UpdatedDateUTC": "/Date(1552522424850+0000)/",
- "CurrencyCode": "NZD"
- }
- ]
- }
- '/Prepayments/{PrepaymentID}/Allocations':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createPrepaymentAllocations
- summary: Allows you to create an Allocation for prepayments
- x-hasAccountingValidationError: true
- x-example:
- - currDate:
- is_date: true
- key: currDate
- keyPascal: CurrDate
- keySnake: curr_date
- java_datatype: LocalDate
- default: "LocalDate.now()"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- node: "'2020-12-10'"
- php: "new DateTime('2020-12-10')"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - invoice:
- is_object: true
- key: invoice
- keyPascal: Invoice
- - invoiceID:
- is_last: true
- is_uuid: true
- key: invoiceID
- keyPascal: InvoiceID
- keySnake: invoice_id
- default: 00000000-0000-0000-0000-000000000000
- object: invoice
- - allocation:
- is_object: true
- key: allocation
- keyPascal: Allocation
- - set_invoice:
- is_variable: true
- nonString: true
- key: invoice
- keyPascal: Invoice
- default: invoice
- object: allocation
- - amount:
- nonString: true
- key: amount
- keyPascal: Amount
- default: 1.0
- is_money: true
- object: allocation
- - date:
- is_last: true
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: currDate
- python: curr_date
- ruby: curr_date
- object: allocation
- - allocations:
- is_object: true
- key: allocations
- keyPascal: Allocations
- - add_allocation:
- is_last: true
- is_array_add: true
- key: allocations
- keyPascal: Allocations
- java: Allocations
- csharp: Allocation
- object: allocation
- parameters:
- - $ref: '#/components/parameters/PrepaymentID'
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Allocations array of Allocation for all Prepayment
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Allocations'
- example: {
- "Id": "d4758808-d14d-45d5-851a-52787ae5739a",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552522424927)/",
- "Allocations": [
- {
- "Amount": 1.00,
- "Date": "/Date(1552435200000+0000)/",
- "Invoice": {
- "InvoiceID": "c7c37b83-ac95-45ea-88ba-8ad83a5f22fe",
- "Payments": [],
- "CreditNotes": [],
- "Prepayments": [],
- "Overpayments": [],
- "HasErrors": false,
- "IsDiscounted": false,
- "LineItems": [],
- "ValidationErrors": []
- },
- "Prepayment": {
- "PrepaymentID": "ce0cddef-cf5a-4e59-b638-f225679115a7",
- "ID": "ce0cddef-cf5a-4e59-b638-f225679115a7",
- "LineItems": []
- },
- "ValidationErrors": []
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Allocations with an array of Allocation object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Allocations'
- example: {
- "Allocations": [
- {
- "Invoice": {
- "LineItems": [],
- "InvoiceID": "00000000-0000-0000-0000-000000000000"
- },
- "Amount": 1,
- "Date": "2019-01-10"
- }
- ]
- }
- '/Prepayments/{PrepaymentID}/Allocations/{AllocationID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- delete:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: deletePrepaymentAllocations
- summary: Deletes an Allocation from a Prepayment
- parameters:
- - $ref: '#/components/parameters/PrepaymentID'
- - $ref: '#/components/parameters/AllocationID'
- responses:
- '200':
- description: Success - return response of type Allocation with the isDeleted flag as true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Allocation'
- example: {
- "AllocationId": "2bb15054-3868-4f85-a9c6-0402ec8c1201",
- "Date": "/Date(1551822670731)/",
- "Invoice": [
- {
- "InvoiceID": "b7eb1fc9-a0f9-4e8e-9373-6689f5350832",
- }
- ],
- "IsDeleted": true,
- }
- '/Prepayments/{PrepaymentID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getPrepaymentHistory
- summary: Retrieves history record for a specific prepayment
- parameters:
- - $ref: '#/components/parameters/PrepaymentID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createPrepaymentHistory
- summary: Creates a history record for a specific prepayment
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/PrepaymentID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- '400':
- description: Unsupported - return response incorrect exception, API is not able to create HistoryRecord for Expense Claims
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- example: ' {
- "ErrorNumber": 10,
- "Type": "ValidationException",
- "Message": "A validation exception occurred",
- "Elements": [
- {
- "DateUTCString": "2019-03-14T00:15:35",
- "DateUTC": "/Date(1552522535440)/",
- "Details": "Hello World",
- "ValidationErrors": [
- {
- "Message": "The document with the supplied id was not found for this endpoint."
- }
- ]
- }
- ]
- }'
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- /PurchaseOrders:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getPurchaseOrders
- summary: Retrieves purchase orders
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: Status
- x-snake: status
- description: Filter by purchase order status
- example: "SUBMITTED"
- schema:
- type: string
- enum:
- - DRAFT
- - SUBMITTED
- - AUTHORISED
- - BILLED
- - DELETED
- - in: query
- name: DateFrom
- x-snake: date_from
- description: Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31
- example: "2019-12-01"
- schema:
- type: string
- - in: query
- name: DateTo
- x-snake: date_to
- description: Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31
- example: "2019-12-31"
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "PurchaseOrderNumber ASC"
- schema:
- type: string
- - in: query
- 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.
- example: 1
- schema:
- type: integer
- - $ref: '#/components/parameters/pageSize'
- responses:
- '200':
- description: Success - return response of type PurchaseOrder array of all PurchaseOrder
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PurchaseOrders'
- example: {
- "Id": "66910bfc-15cc-4692-bd4c-cc8f671e653c",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552523977238)/",
- "pagination": {
- "page": 1,
- "pageSize": 100,
- "pageCount": 1,
- "itemCount": 2
- },
- "PurchaseOrders": [
- {
- "PurchaseOrderID": "f9627f0d-b715-4039-bb6a-96dc3eae5ec5",
- "PurchaseOrderNumber": "PO-0001",
- "DateString": "2019-03-12T00:00:00",
- "Date": "/Date(1552348800000+0000)/",
- "AttentionTo": "Jimmy",
- "HasErrors": false,
- "IsDiscounted": false,
- "Type": "PURCHASEORDER",
- "CurrencyRate": 1.000000,
- "CurrencyCode": "NZD",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "Addresses": [
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Status": "DELETED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.0000,
- "TaxAmount": 0.00,
- "LineAmount": 20.00,
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "0f7b54b8-bfa4-4c5d-9c22-73dbd5796e54"
- }
- ],
- "SubTotal": 20.00,
- "TotalTax": 0.00,
- "Total": 20.00,
- "UpdatedDateUTC": "/Date(1552522703443+0000)/",
- "HasAttachments": false
- },
- {
- "PurchaseOrderID": "6afa2e02-c514-4964-ab89-b5c0179b8c50",
- "PurchaseOrderNumber": "PO-0002",
- "DateString": "2019-03-12T00:00:00",
- "Date": "/Date(1552348800000+0000)/",
- "AttentionTo": "Jimmy",
- "HasErrors": false,
- "IsDiscounted": false,
- "Type": "PURCHASEORDER",
- "CurrencyRate": 1.000000,
- "CurrencyCode": "NZD",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "Addresses": [
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Status": "DELETED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.0000,
- "TaxAmount": 0.00,
- "LineAmount": 20.00,
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "3e4ec232-32b9-491b-84dd-48fb9aa8916f"
- }
- ],
- "SubTotal": 20.00,
- "TotalTax": 0.00,
- "Total": 20.00,
- "UpdatedDateUTC": "/Date(1552522834733+0000)/",
- "HasAttachments": false
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createPurchaseOrders
- summary: Creates one or more purchase orders
- x-hasAccountingValidationError: true
- x-example:
- - dateValue:
- is_date: true
- key: dateValue
- keyPascal: Date
- keySnake: date_value
- java_datatype: LocalDate
- default: "LocalDate.of(2020, Month.OCTOBER, 10)"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- php: "new DateTime('2020-12-10')"
- node: "'2020-10-10'"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_last: true
- is_uuid: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - lineItem:
- is_object: true
- key: lineItem
- keyPascal: LineItem
- keySnake: line_item
- - description:
- key: description
- keyPascal: Description
- default: Foobar
- object: lineItem
- - quantity:
- nonString: true
- key: quantity
- keyPascal: Quantity
- default: 1.0
- is_money: true
- object: lineItem
- - unitAmount:
- nonString: true
- key: unitAmount
- keyPascal: UnitAmount
- keySnake: unit_amount
- default: 20.0
- is_money: true
- object: lineItem
- - accountCode:
- is_last: true
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: "000"
- object: lineItem
- - line_items:
- is_list: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- csharp: LineItem
- java: LineItem
- - add_lineitems:
- is_last: true
- is_list_add: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- java: LineItems
- python: line_item
- ruby: line_item
- csharp: LineItem
- object: lineItem
- - purchaseOrder:
- is_object: true
- key: purchaseOrder
- keyPascal: PurchaseOrder
- keySnake: purchase_order
- - set_contact:
- is_variable: true
- nonString: true
- key: contact
- keyPascal: Contact
- default: contact
- object: purchaseOrder
- - set_lineitem:
- is_variable: true
- nonString: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- default: lineItems
- python: line_items
- ruby: line_items
- object: purchaseOrder
- - date:
- is_last: true
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: dateValue
- python: date_value
- ruby: date_value
- object: purchaseOrder
- - purchaseOrders:
- is_object: true
- key: purchaseOrders
- keyPascal: PurchaseOrders
- - add_purchaseOrder:
- is_last: true
- is_array_add: true
- key: purchaseOrders
- keyPascal: PurchaseOrders
- keySnake: purchase_orders
- java: PurchaseOrders
- python: purchase_order
- ruby: purchase_order
- csharp: PurchaseOrder
- object: purchaseOrder
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type PurchaseOrder array for specified PurchaseOrder
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PurchaseOrders'
- example: {
- "Id": "aa2f9d23-fd76-4bee-9600-30c0f0f34036",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552522946173)/",
- "PurchaseOrders": [
- {
- "PurchaseOrderID": "56204648-8fbe-46f8-b09c-2125f7939533",
- "PurchaseOrderNumber": "PO-0004",
- "DateString": "2019-03-13T00:00:00",
- "Date": "/Date(1552435200000+0000)/",
- "HasErrors": false,
- "IsDiscounted": false,
- "TotalDiscount": 0.00,
- "SentToContact": false,
- "Type": "PURCHASEORDER",
- "CurrencyRate": 1.000000,
- "CurrencyCode": "NZD",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- null,
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- null,
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [
- {
- "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22",
- "Name": "Oasis",
- "Status": "ACTIVE",
- "Contacts": [],
- "HasValidationErrors": false
- }
- ],
- "IsSupplier": true,
- "IsCustomer": true,
- "SalesTrackingCategories": [],
- "PurchasesTrackingCategories": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Status": "DRAFT",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.0000,
- "TaxType": "INPUT2",
- "TaxAmount": 3.00,
- "LineAmount": 20.00,
- "AccountCode": "710",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "792b7e40-b9f2-47f0-8624-b09f4b0166dd"
- }
- ],
- "SubTotal": 20.00,
- "TotalTax": 3.00,
- "Total": 23.00,
- "UpdatedDateUTC": "/Date(1552522946077+0000)/",
- "StatusAttributeString": "ERROR",
- "Warnings": [
- {
- "Message": "Only AUTHORISED and BILLED purchase orders may have SentToContact updated."
- }
- ],
- "ValidationErrors": [
- {
- "Message": "Order number must be unique"
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: PurchaseOrders with an array of PurchaseOrder object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PurchaseOrders'
- example: {
- "PurchaseOrders": [
- {
- "Contact": {
- "ContactID": "00000000-0000-0000-0000-000000000000"
- },
- "LineItems": [
- {
- "Description": "Foobar",
- "Quantity": 1,
- "UnitAmount": 20,
- "AccountCode": "710"
- }
- ],
- "Date": "2019-03-13"
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateOrCreatePurchaseOrders
- summary: Updates or creates one or more purchase orders
- x-hasAccountingValidationError: true
- x-example:
- - dateValue:
- is_date: true
- key: dateValue
- keyPascal: Date
- keySnake: date_value
- java_datatype: LocalDate
- default: "LocalDate.of(2020, Month.OCTOBER, 10)"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- php: "new DateTime('2020-12-10')"
- node: "'2020-10-10'"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_last: true
- is_uuid: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - lineItem:
- is_object: true
- key: lineItem
- keyPascal: LineItem
- keySnake: line_item
- - description:
- key: description
- keyPascal: Description
- default: Foobar
- object: lineItem
- - quantity:
- nonString: true
- key: quantity
- keyPascal: Quantity
- default: 1.0
- is_money: true
- object: lineItem
- - unitAmount:
- nonString: true
- key: unitAmount
- keyPascal: UnitAmount
- keySnake: unit_amount
- default: 20.0
- is_money: true
- object: lineItem
- - accountCode:
- is_last: true
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: "000"
- object: lineItem
- - line_items:
- is_list: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- csharp: LineItem
- java: LineItem
- - add_lineitems:
- is_last: true
- is_list_add: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- java: LineItems
- python: line_item
- ruby: line_item
- csharp: LineItem
- object: lineItem
- - purchaseOrder:
- is_object: true
- key: purchaseOrder
- keyPascal: PurchaseOrder
- keySnake: purchase_order
- - set_contact:
- is_variable: true
- nonString: true
- key: contact
- keyPascal: Contact
- default: contact
- object: purchaseOrder
- - set_lineitem:
- is_variable: true
- nonString: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- default: lineItems
- python: line_items
- ruby: line_items
- object: purchaseOrder
- - date:
- is_last: true
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: dateValue
- python: date_value
- ruby: date_value
- object: purchaseOrder
- - purchaseOrders:
- is_object: true
- key: purchaseOrders
- keyPascal: PurchaseOrders
- - add_purchaseOrder:
- is_last: true
- is_array_add: true
- key: purchaseOrders
- keyPascal: PurchaseOrders
- keySnake: purchase_orders
- java: PurchaseOrders
- python: purchase_order
- ruby: purchase_order
- csharp: PurchaseOrder
- object: purchaseOrder
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type PurchaseOrder array for specified PurchaseOrder
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PurchaseOrders'
- example: {
- "Id": "aa2f9d23-fd76-4bee-9600-30c0f0f34036",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552522946173)/",
- "PurchaseOrders": [
- {
- "PurchaseOrderID": "56204648-8fbe-46f8-b09c-2125f7939533",
- "PurchaseOrderNumber": "PO-0004",
- "DateString": "2019-03-13T00:00:00",
- "Date": "/Date(1552435200000+0000)/",
- "HasErrors": false,
- "IsDiscounted": false,
- "TotalDiscount": 0.00,
- "SentToContact": false,
- "Type": "PURCHASEORDER",
- "CurrencyRate": 1.000000,
- "CurrencyCode": "NZD",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- null,
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- null,
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [
- {
- "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22",
- "Name": "Oasis",
- "Status": "ACTIVE",
- "Contacts": [],
- "HasValidationErrors": false
- }
- ],
- "IsSupplier": true,
- "IsCustomer": true,
- "SalesTrackingCategories": [],
- "PurchasesTrackingCategories": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Status": "DRAFT",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.0000,
- "TaxType": "INPUT2",
- "TaxAmount": 3.00,
- "LineAmount": 20.00,
- "AccountCode": "710",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "792b7e40-b9f2-47f0-8624-b09f4b0166dd"
- }
- ],
- "SubTotal": 20.00,
- "TotalTax": 3.00,
- "Total": 23.00,
- "UpdatedDateUTC": "/Date(1552522946077+0000)/",
- "StatusAttributeString": "ERROR",
- "Warnings": [
- {
- "Message": "Only AUTHORISED and BILLED purchase orders may have SentToContact updated."
- }
- ],
- "ValidationErrors": [
- {
- "Message": "Order number must be unique"
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PurchaseOrders'
- example: {
- "PurchaseOrders": [
- {
- "Contact": {
- "ContactID": "00000000-0000-0000-0000-000000000000"
- },
- "LineItems": [
- {
- "Description": "Foobar",
- "Quantity": 1,
- "UnitAmount": 20,
- "AccountCode": "710"
- }
- ],
- "Date": "2019-03-13"
- }
- ]
- }
- '/PurchaseOrders/{PurchaseOrderID}/pdf':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getPurchaseOrderAsPdf
- x-path: '/PurchaseOrders/{PurchaseOrderID}'
- summary: Retrieves specific purchase order as PDF files using a unique purchase order Id
- parameters:
- - $ref: '#/components/parameters/PurchaseOrderID'
- responses:
- '200':
- description: Success - return response of byte array pdf version of specified Purchase Orders
- content:
- application/pdf:
- schema:
- type: string
- format: binary
- '/PurchaseOrders/{PurchaseOrderID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getPurchaseOrder
- summary: Retrieves a specific purchase order using a unique purchase order Id
- parameters:
- - $ref: '#/components/parameters/PurchaseOrderID'
- responses:
- '200':
- description: Success - return response of type PurchaseOrder array for specified PurchaseOrder
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PurchaseOrders'
- example: {
- "Id": "53a8c7a5-92e8-475b-a037-acf7c55c3afd",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553626110950)/",
- "PurchaseOrders": [
- {
- "PurchaseOrderID": "15369a9f-17b6-4235-83c4-0029256d1c37",
- "PurchaseOrderNumber": "PO-0006",
- "DateString": "2019-03-26T00:00:00",
- "Date": "/Date(1553558400000+0000)/",
- "DeliveryDateString": "2019-03-28T00:00:00",
- "DeliveryDate": "/Date(1553731200000+0000)/",
- "DeliveryAddress": "101 Grafton Road\nRoseneath\nWellington\n6011\nNew Zealand",
- "AttentionTo": "CEO",
- "Telephone": "64 123-2222",
- "DeliveryInstructions": "Drop off at front door",
- "HasErrors": false,
- "IsDiscounted": true,
- "TotalDiscount": 250.00,
- "SentToContact": false,
- "Reference": "foobar",
- "Type": "PURCHASEORDER",
- "CurrencyRate": 1.000000,
- "CurrencyCode": "NZD",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- null,
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- null,
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1553672800957+0000)/",
- "ContactGroups": [
- {
- "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22",
- "Name": "Oasis",
- "Status": "ACTIVE",
- "Contacts": [],
- "HasValidationErrors": false
- }
- ],
- "IsSupplier": true,
- "IsCustomer": true,
- "DefaultCurrency": "NZD",
- "SalesTrackingCategories": [],
- "PurchasesTrackingCategories": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "BrandingThemeID": "414d4a87-46d6-4cfc-ab42-4e29d22e5076",
- "Status": "DRAFT",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "ItemCode": "123",
- "Description": "Brand new Fender Strats",
- "UnitAmount": 2500.0000,
- "TaxType": "INPUT2",
- "TaxAmount": 337.50,
- "LineAmount": 2250.00,
- "AccountCode": "630",
- "Tracking": [
- {
- "Name": "Simpsons",
- "Option": "Homer",
- "TrackingCategoryID": "6a68adde-f210-4465-b0a9-0d8cc6f50762",
- "TrackingOptionID": "94faf12f-f65c-4331-8004-b0b7c5a2da23"
- }
- ],
- "Quantity": 1.0000,
- "DiscountRate": 10.00,
- "LineItemID": "8a9d3eca-e052-43bc-9b87-221d0648c045"
- }
- ],
- "SubTotal": 2250.00,
- "TotalTax": 337.50,
- "Total": 2587.50,
- "UpdatedDateUTC": "/Date(1553626029823+0000)/",
- "HasAttachments": true,
- "Attachments": [
- {
- "AttachmentID": "7d94ccdc-ef7b-4806-87ac-8442f25e593b",
- "FileName": "HelloWorld.png",
- "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/15369a9f-17b6-4235-83c4-0029256d1c37/Attachments/HelloWorld.png",
- "MimeType": "image/png",
- "ContentLength": 76091
- }
- ]
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updatePurchaseOrder
- summary: Updates a specific purchase order
- x-hasAccountingValidationError: true
- x-example:
- - purchaseOrder:
- is_object: true
- key: purchaseOrder
- keyPascal: PurchaseOrder
- keySnake: purchase_order
- - attentionTo:
- is_last: true
- key: attentionTo
- keyPascal: AttentionTo
- default: Peter Parker
- object: purchaseOrder
- - purchaseOrders:
- is_object: true
- key: purchaseOrders
- keyPascal: PurchaseOrders
- - add_purchaseOrder:
- is_last: true
- is_array_add: true
- key: purchaseOrders
- keyPascal: PurchaseOrders
- keySnake: purchase_orders
- java: PurchaseOrders
- python: purchase_order
- ruby: purchase_order
- csharp: PurchaseOrder
- object: purchaseOrder
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/PurchaseOrderID'
- responses:
- '200':
- description: Success - return response of type PurchaseOrder array for updated PurchaseOrder
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PurchaseOrders'
- example: {
- "Id": "0e9bb3f8-d68b-4bb2-a54d-7da240a4f51a",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552523976885)/",
- "PurchaseOrders": [
- {
- "PurchaseOrderID": "f9fc1120-c937-489e-84bc-e822190cfe9c",
- "PurchaseOrderNumber": "PO-0005",
- "DateString": "2019-03-13T00:00:00",
- "Date": "/Date(1552435200000+0000)/",
- "AttentionTo": "Jimmy",
- "HasErrors": false,
- "IsDiscounted": false,
- "TotalDiscount": 0.00,
- "SentToContact": false,
- "Type": "PURCHASEORDER",
- "CurrencyRate": 1.000000,
- "CurrencyCode": "NZD",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- null,
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- null,
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [
- {
- "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22",
- "Name": "Oasis",
- "Status": "ACTIVE",
- "Contacts": [],
- "HasValidationErrors": false
- }
- ],
- "IsSupplier": true,
- "IsCustomer": true,
- "SalesTrackingCategories": [],
- "PurchasesTrackingCategories": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Status": "DRAFT",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.0000,
- "TaxType": "INPUT2",
- "TaxAmount": 3.00,
- "LineAmount": 20.00,
- "AccountCode": "710",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "d1d9b2cd-c9f2-4445-8d98-0b8096cf4dae"
- }
- ],
- "SubTotal": 20.00,
- "TotalTax": 3.00,
- "Total": 23.00,
- "UpdatedDateUTC": "/Date(1552523976853+0000)/"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PurchaseOrders'
- example: {
- "PurchaseOrders": [
- {
- "AttentionTo": "Peter Parker",
- "LineItems": [],
- "Contact": {}
- }
- ]
- }
- '/PurchaseOrders/{PurchaseOrderNumber}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getPurchaseOrderByNumber
- summary: Retrieves a specific purchase order using purchase order number
- parameters:
- - required: true
- in: path
- name: PurchaseOrderNumber
- x-snake: purchase_order_number
- description: Unique identifier for a PurchaseOrder
- example: "PO1234"
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of type PurchaseOrder array for specified PurchaseOrder
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PurchaseOrders'
- example: {
- "Id": "53a8c7a5-92e8-475b-a037-acf7c55c3afd",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553626110950)/",
- "PurchaseOrders": [
- {
- "PurchaseOrderID": "15369a9f-17b6-4235-83c4-0029256d1c37",
- "PurchaseOrderNumber": "PO-0006",
- "DateString": "2019-03-26T00:00:00",
- "Date": "/Date(1553558400000+0000)/",
- "DeliveryDateString": "2019-03-28T00:00:00",
- "DeliveryDate": "/Date(1553731200000+0000)/",
- "DeliveryAddress": "101 Grafton Road\nRoseneath\nWellington\n6011\nNew Zealand",
- "AttentionTo": "CEO",
- "Telephone": "64 123-2222",
- "DeliveryInstructions": "Drop off at front door",
- "HasErrors": false,
- "IsDiscounted": true,
- "TotalDiscount": 250.00,
- "SentToContact": false,
- "Reference": "foobar",
- "Type": "PURCHASEORDER",
- "CurrencyRate": 1.000000,
- "CurrencyCode": "NZD",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- null,
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- null,
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1553672800957+0000)/",
- "ContactGroups": [
- {
- "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22",
- "Name": "Oasis",
- "Status": "ACTIVE",
- "Contacts": [],
- "HasValidationErrors": false
- }
- ],
- "IsSupplier": true,
- "IsCustomer": true,
- "DefaultCurrency": "NZD",
- "SalesTrackingCategories": [],
- "PurchasesTrackingCategories": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "BrandingThemeID": "414d4a87-46d6-4cfc-ab42-4e29d22e5076",
- "Status": "DRAFT",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "ItemCode": "123",
- "Description": "Brand new Fender Strats",
- "UnitAmount": 2500.0000,
- "TaxType": "INPUT2",
- "TaxAmount": 337.50,
- "LineAmount": 2250.00,
- "AccountCode": "630",
- "Tracking": [
- {
- "Name": "Simpsons",
- "Option": "Homer",
- "TrackingCategoryID": "6a68adde-f210-4465-b0a9-0d8cc6f50762",
- "TrackingOptionID": "94faf12f-f65c-4331-8004-b0b7c5a2da23"
- }
- ],
- "Quantity": 1.0000,
- "DiscountRate": 10.00,
- "LineItemID": "8a9d3eca-e052-43bc-9b87-221d0648c045"
- }
- ],
- "SubTotal": 2250.00,
- "TotalTax": 337.50,
- "Total": 2587.50,
- "UpdatedDateUTC": "/Date(1553626029823+0000)/",
- "HasAttachments": true,
- "Attachments": [
- {
- "AttachmentID": "7d94ccdc-ef7b-4806-87ac-8442f25e593b",
- "FileName": "HelloWorld.png",
- "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/15369a9f-17b6-4235-83c4-0029256d1c37/Attachments/HelloWorld.png",
- "MimeType": "image/png",
- "ContentLength": 76091
- }
- ]
- }
- ]
- }
- '/PurchaseOrders/{PurchaseOrderID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getPurchaseOrderHistory
- summary: Retrieves history for a specific purchase order
- parameters:
- - $ref: '#/components/parameters/PurchaseOrderID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createPurchaseOrderHistory
- summary: Creates a history record for a specific purchase orders
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/PurchaseOrderID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- '/PurchaseOrders/{PurchaseOrderID}/Attachments':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getPurchaseOrderAttachments
- summary: Retrieves attachments for a specific purchase order
- parameters:
- - $ref: '#/components/parameters/PurchaseOrderID'
- responses:
- '200':
- description: Success - return response of type Attachments array of Purchase Orders
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "dfc29f55-8ddd-4921-a82c-bcc0798d207f",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1602100184437)/",
- "Attachments": [
- {
- "AttachmentID": "dce4eaa7-c8a9-4867-9434-95832b427d3b",
- "FileName": "xero-dev1.png",
- "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D_2.png",
- "MimeType": "image/png",
- "ContentLength": 98715
- },
- {
- "AttachmentID": "e58bd37b-e47f-451a-a42c-f946ef229c3e",
- "FileName": "xero-dev2.png",
- "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D.png",
- "MimeType": "image/png",
- "ContentLength": 82529
- },
- {
- "AttachmentID": "c8faa564-223f-45e4-a5a1-94430a5b52c1",
- "FileName": "xero-dev3.png",
- "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/Screen%20Shot%202020-09-12%20at%204.31.14%20pm.png",
- "MimeType": "image/png",
- "ContentLength": 146384
- }
- ]
- }
- '/PurchaseOrders/{PurchaseOrderID}/Attachments/{AttachmentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getPurchaseOrderAttachmentById
- summary: Retrieves specific attachment for a specific purchase order using a unique attachment Id
- parameters:
- - $ref: '#/components/parameters/PurchaseOrderID'
- - $ref: '#/components/parameters/AttachmentID'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Account as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getPurchaseOrderAttachmentByFileName
- summary: Retrieves a specific attachment for a specific purchase order by filename
- parameters:
- - $ref: '#/components/parameters/PurchaseOrderID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Purchase Order as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- post:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: updatePurchaseOrderAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Updates a specific attachment for a specific purchase order by filename
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/PurchaseOrderID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of type Attachments array of Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "aeff9be0-54c2-45dd-8e3d-aa4f8af0fbd7",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1602100086197)/",
- "Attachments": [
- {
- "AttachmentID": "dce4eaa7-c8a9-4867-9434-95832b427d3b",
- "FileName": "xero-dev.png",
- "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D_2.png",
- "MimeType": "image/png",
- "ContentLength": 98715
- }
- ]
- }
- '400':
- description: Validation Error - some data was incorrect returns response of type Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- put:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: createPurchaseOrderAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Creates attachment for a specific purchase order
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/PurchaseOrderID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of type Attachments array of Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "c728a4a4-179e-4bbd-a2d5-63e7f9ceba92",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1602099934723)/",
- "Attachments": [
- {
- "AttachmentID": "e58bd37b-e47f-451a-a42c-f946ef229c3e",
- "FileName": "xero-dev.png",
- "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D.png",
- "MimeType": "image/png",
- "ContentLength": 82529
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- /Quotes:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getQuotes
- summary: Retrieves sales quotes
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: DateFrom
- x-snake: date_from
- description: Filter for quotes after a particular date
- example: "2019-10-31"
- schema:
- type: string
- format: date
- - in: query
- name: DateTo
- x-snake: date_to
- description: Filter for quotes before a particular date
- example: "2019-10-31"
- schema:
- type: string
- format: date
- - in: query
- name: ExpiryDateFrom
- x-snake: expiry_date_from
- description: Filter for quotes expiring after a particular date
- example: "2019-10-31"
- schema:
- type: string
- format: date
- - in: query
- name: ExpiryDateTo
- x-snake: expiry_date_to
- description: Filter for quotes before a particular date
- example: "2019-10-31"
- schema:
- type: string
- format: date
- - in: query
- name: ContactID
- x-snake: contact_id
- description: Filter for quotes belonging to a particular contact
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- - in: query
- name: Status
- x-snake: status
- description: Filter for quotes of a particular Status
- example: "DRAFT"
- schema:
- type: string
- - in: query
- name: page
- description: e.g. page=1 – Up to 100 Quotes will be returned in a single API call with line items shown for each quote
- example: 1
- schema:
- type: integer
- - in: query
- name: order
- description: Order by an any element
- example: Status ASC
- schema:
- type: string
- - in: query
- name: QuoteNumber
- x-snake: quote_number
- description: Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001)
- example: "QU-0001"
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of type quotes array with all quotes
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Quotes'
- example: {
- "Id": "bb583e7e-9b6b-471e-88da-4cbfcfad7a57",
- "Status": "OK",
- "ProviderName": "Adams OAuth2 App",
- "DateTimeUTC": "/Date(1571876635477)/",
- "Quotes": [
- {
- "QuoteID": "be59294f-2a9c-4cee-8c64-0f0ddbc1883a",
- "QuoteNumber": "QU-0001",
- "Reference": "REF-123",
- "Terms": "Not valid after the expiry date",
- "Contact": {
- "ContactID": "060816db-0ed7-44de-ab58-8fee9316fcd5",
- "Name": "Adam"
- },
- "LineItems": [
- {
- "LineItemID": "ccf5e45c-73b6-4659-83e8-520f4c6126fd",
- "AccountCode": "200",
- "Description": "Fish out of Water",
- "UnitAmount": 19.9500,
- "DiscountRate": 10.00,
- "LineAmount": 17.96,
- "ItemCode": "BOOK",
- "Quantity": 1.0000,
- "TaxAmount": 2.69,
- "TaxType": "OUTPUT2",
- "Tracking": [
- {
- "TrackingCategoryID": "351953c4-8127-4009-88c3-f9cd8c9cbe9f",
- "TrackingOptionID": "ce205173-7387-4651-9726-2cf4c5405ba2",
- "Name": "Region",
- "Option": "Eastside"
- }
- ]
- }
- ],
- "Date": "/Date(1571875200000)/",
- "DateString": "2019-10-24T00:00:00",
- "ExpiryDate": "/Date(1571961600000)/",
- "ExpiryDateString": "2019-10-25T00:00:00",
- "Status": "ACCEPTED",
- "CurrencyRate": 0.937053,
- "CurrencyCode": "AUD",
- "SubTotal": 17.96,
- "TotalTax": 2.69,
- "Total": 20.65,
- "TotalDiscount": 1.99,
- "Title": "Your Quote",
- "Summary": "Please buy this",
- "BrandingThemeID": "4c82c365-35cb-467f-bb11-dce1f2f2f67c",
- "UpdatedDateUTC": "/Date(1571869373890)/",
- "LineAmountTypes": "EXCLUSIVE"
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createQuotes
- summary: Create one or more quotes
- x-hasAccountingValidationError: true
- x-example:
- - dateValue:
- is_date: true
- key: dateValue
- keyPascal: Date
- keySnake: date_value
- java_datatype: LocalDate
- default: "LocalDate.of(2020, Month.OCTOBER, 10)"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- php: "new DateTime('2020-12-10')"
- node: "'2020-10-10'"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_last: true
- is_uuid: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - lineItem:
- is_object: true
- key: lineItem
- keyPascal: LineItem
- keySnake: line_item
- - description:
- key: description
- keyPascal: Description
- default: Foobar
- object: lineItem
- - quantity:
- nonString: true
- key: quantity
- keyPascal: Quantity
- default: 1.0
- is_money: true
- object: lineItem
- - unitAmount:
- nonString: true
- key: unitAmount
- keyPascal: UnitAmount
- keySnake: unit_amount
- default: 20.0
- is_money: true
- object: lineItem
- - accountCode:
- is_last: true
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: "000"
- object: lineItem
- - line_items:
- is_list: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- csharp: LineItem
- java: LineItem
- - add_lineitems:
- is_last: true
- is_list_add: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- java: LineItems
- python: line_item
- ruby: line_item
- csharp: LineItem
- object: lineItem
- - quote:
- is_object: true
- key: quote
- keyPascal: Quote
- - set_contact:
- is_variable: true
- nonString: true
- key: contact
- keyPascal: Contact
- default: contact
- object: quote
- - set_lineitem:
- is_variable: true
- nonString: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- default: lineItems
- python: line_items
- ruby: line_items
- object: quote
- - date:
- is_last: true
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: dateValue
- python: date_value
- ruby: date_value
- object: quote
- - quotes:
- is_object: true
- key: quotes
- keyPascal: Quotes
- - add_quote:
- is_last: true
- is_array_add: true
- key: quotes
- keyPascal: Quotes
- java: Quotes
- csharp: Quote
- object: quote
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Quotes with array with newly created Quote
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Quotes'
- example: {
- "SummarizeErrors":false,
- "Id":"29571f5a-bf73-4bb6-9de5-86be44e6bf2e",
- "Status":"OK",
- "ProviderName":"provider-name",
- "DateTimeUTC":"/Date(1580607782916)/",
- "Quotes":[
- {
- "QuoteID":"60031d53-6488-4321-9cbd-c1db6dbf9ba4",
- "QuoteNumber":"QU-0008",
- "Terms":"",
- "Contact":{
- "ContactID":"6a65f055-b0e0-471a-a933-d1ffdd89393f",
- "Name":"John Smith-82160",
- "EmailAddress":""
- },
- "LineItems":[
- {
- "LineItemID":"26995857-0eea-45fb-b46c-f8ea896ec46e",
- "AccountCode":"12775",
- "Description":"Foobar",
- "UnitAmount":20.0000,
- "LineAmount":20.00,
- "ItemCode":"",
- "Quantity":1.0000,
- "TaxAmount":0.00,
- "Tracking":[
-
- ]
- }
- ],
- "Date":"/Date(1580515200000)/",
- "DateString":"2020-02-01T00:00:00",
- "Status":"DRAFT",
- "CurrencyRate":1.000000,
- "CurrencyCode":"USD",
- "SubTotal":20.00,
- "TotalTax":0.00,
- "Total":20.00,
- "UpdatedDateUTC":"/Date(1580607782913)/",
- "LineAmountTypes":"EXCLUSIVE",
- "StatusAttributeString":"OK"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Quotes with an array of Quote object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Quotes'
- example: {
- "Quotes": [
- {
- "Contact": {
- "ContactID": "00000000-0000-0000-0000-000000000000"
- },
- "LineItems": [
- {
- "Description": "Foobar",
- "Quantity": 1,
- "UnitAmount": 20,
- "AccountCode": "12775"
- }
- ],
- "Date": "2020-02-01"
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateOrCreateQuotes
- summary: Updates or creates one or more quotes
- x-hasAccountingValidationError: true
- x-example:
- - dateValue:
- is_date: true
- key: dateValue
- keyPascal: Date
- keySnake: date_value
- java_datatype: LocalDate
- default: "LocalDate.of(2020, Month.OCTOBER, 10)"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- php: "new DateTime('2020-12-10')"
- node: "'2020-10-10'"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_last: true
- is_uuid: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - lineItem:
- is_object: true
- key: lineItem
- keyPascal: LineItem
- keySnake: line_item
- - description:
- key: description
- keyPascal: Description
- default: Foobar
- object: lineItem
- - quantity:
- nonString: true
- key: quantity
- keyPascal: Quantity
- default: 1.0
- is_money: true
- object: lineItem
- - unitAmount:
- nonString: true
- key: unitAmount
- keyPascal: UnitAmount
- keySnake: unit_amount
- default: 20.0
- is_money: true
- object: lineItem
- - accountCode:
- is_last: true
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: "000"
- object: lineItem
- - line_items:
- is_list: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- csharp: LineItem
- java: LineItem
- - add_lineitems:
- is_last: true
- is_list_add: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- java: LineItems
- python: line_item
- ruby: line_item
- csharp: LineItem
- object: lineItem
- - quote:
- is_object: true
- key: quote
- keyPascal: Quote
- - set_contact:
- is_variable: true
- nonString: true
- key: contact
- keyPascal: Contact
- default: contact
- object: quote
- - set_lineitem:
- is_variable: true
- nonString: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- default: lineItems
- python: line_items
- ruby: line_items
- object: quote
- - date:
- is_last: true
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: dateValue
- python: date_value
- ruby: date_value
- object: quote
- - quotes:
- is_object: true
- key: quotes
- keyPascal: Quotes
- - add_quote:
- is_last: true
- is_array_add: true
- key: quotes
- keyPascal: Quotes
- java: Quotes
- csharp: Quote
- object: quote
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Quotes array with updated or created Quote
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Quotes'
- example: {
- "SummarizeErrors":false,
- "Id":"b425754f-0512-481d-827b-c8958db7667e",
- "Status":"OK",
- "ProviderName":"provider-name",
- "DateTimeUTC":"/Date(1580607783833)/",
- "Quotes":[
- {
- "QuoteID":"fd53e0b7-4d24-4c20-be85-043a62ea5847",
- "QuoteNumber":"QU-0009",
- "Terms":"",
- "Contact":{
- "ContactID":"6a65f055-b0e0-471a-a933-d1ffdd89393f",
- "Name":"John Smith-82160",
- "EmailAddress":""
- },
- "LineItems":[
- {
- "LineItemID":"898c7fd6-0d94-4ac0-ace8-87e350a042de",
- "AccountCode":"12775",
- "Description":"Foobar",
- "UnitAmount":20.0000,
- "LineAmount":20.00,
- "ItemCode":"",
- "Quantity":1.0000,
- "TaxAmount":0.00,
- "Tracking":[
-
- ]
- }
- ],
- "Date":"/Date(1580515200000)/",
- "DateString":"2020-02-01T00:00:00",
- "Status":"DRAFT",
- "CurrencyRate":1.000000,
- "CurrencyCode":"USD",
- "SubTotal":20.00,
- "TotalTax":0.00,
- "Total":20.00,
- "UpdatedDateUTC":"/Date(1580607783467)/",
- "LineAmountTypes":"EXCLUSIVE",
- "StatusAttributeString":"OK"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Quotes'
- example: {
- "Quotes": [
- {
- "Contact": {
- "ContactID": "00000000-0000-0000-0000-000000000000"
- },
- "LineItems": [
- {
- "Description": "Foobar",
- "Quantity": 1,
- "UnitAmount": 20,
- "AccountCode": "12775"
- }
- ],
- "Date": "2020-02-01"
- }
- ]
- }
- '/Quotes/{QuoteID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getQuote
- summary: Retrieves a specific quote using a unique quote Id
- parameters:
- - $ref: '#/components/parameters/QuoteID'
- responses:
- '200':
- description: Success - return response of type Quotes array with specified Quote
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Quotes'
- example: {
- "SummarizeErrors":true,
- "Id":"e3626c45-77f1-4ab0-ba9b-3593c7bcd25c",
- "Status":"OK",
- "ProviderName":"provider-name",
- "DateTimeUTC":"/Date(1580607864786)/",
- "Quotes":[
- {
- "QuoteID":"1f90e77a-7b88-4462-874f-1aa675be8fef",
- "QuoteNumber":"QU-0007",
- "Reference":"MyQuote",
- "Terms":"These are my terms",
- "Contact":{
- "ContactID":"4bc3ecb2-8e2a-4267-a171-0e0ce7e5ac2a",
- "Name":"ABC Limited",
- "EmailAddress":"john.smith@gmail.com",
- "FirstName":"John",
- "LastName":"Smith"
- },
- "LineItems":[
- {
- "LineItemID":"09b47d9f-f78d-4bab-b226-957f55bfb1b5",
- "AccountCode":"400",
- "Description":"Half day training - Microsoft Office",
- "UnitAmount":500.0000,
- "LineAmount":500.00,
- "ItemCode":"Train-MS",
- "Quantity":1.0000,
- "TaxAmount":0.00,
- "TaxType":"NONE",
- "Tracking":[
- {
- "TrackingCategoryID":"9bd3f506-6d91-4625-81f0-0f9147f099f4",
- "TrackingOptionID":"d30e2a0d-ae6f-4806-88ca-d8ebdba2af73",
- "Name":"Avengers",
- "Option":"IronMan"
- }
- ]
- }
- ],
- "Date":"/Date(1580515200000)/",
- "DateString":"2020-02-01T00:00:00",
- "ExpiryDate":"/Date(1581724800000)/",
- "ExpiryDateString":"2020-02-15T00:00:00",
- "Status":"DRAFT",
- "CurrencyRate":1.547150,
- "CurrencyCode":"NZD",
- "SubTotal":500.00,
- "TotalTax":0.00,
- "Total":500.00,
- "TotalDiscount":0.00,
- "Title":"",
- "Summary":"",
- "BrandingThemeID":"324587a9-7eed-46c0-ad64-fa941a1b5b3e",
- "UpdatedDateUTC":"/Date(1580607757040)/",
- "LineAmountTypes":"EXCLUSIVE"
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateQuote
- summary: Updates a specific quote
- x-hasAccountingValidationError: true
- x-example:
- - dateValue:
- is_date: true
- key: dateValue
- keyPascal: Date
- keySnake: date_value
- java_datatype: LocalDate
- default: "LocalDate.of(2020, Month.OCTOBER, 10)"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- php: "new DateTime('2020-12-10')"
- node: "'2020-10-10'"
- python: "dateutil.parser.parse('2020-12-03T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_last: true
- is_uuid: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - quote:
- is_object: true
- key: quote
- keyPascal: Quote
- - reference:
- key: reference
- keyPascal: Reference
- default: I am an update
- object: quote
- - set_contact:
- is_variable: true
- nonString: true
- key: contact
- keyPascal: Contact
- default: contact
- object: quote
- - date:
- is_last: true
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: dateValue
- python: date_value
- ruby: date_value
- object: quote
- - quotes:
- is_object: true
- key: quotes
- keyPascal: Quotes
- - add_quote:
- is_last: true
- is_array_add: true
- key: quotes
- keyPascal: Quotes
- java: Quotes
- csharp: Quote
- object: quote
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/QuoteID'
- responses:
- '200':
- description: Success - return response of type Quotes array with updated Quote
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Quotes'
- example: {
- "SummarizeErrors":true,
- "Id":"be4f43a7-ef02-497a-96c2-fc0bc047a82a",
- "Status":"OK",
- "ProviderName":"provider-name",
- "DateTimeUTC":"/Date(1580605644385)/",
- "Quotes":[
- {
- "QuoteID":"8ce6b14c-ef87-4f45-93f0-853137c6d0e1",
- "QuoteNumber":"QU-0008",
- "Reference":"I am an update",
- "Terms":"",
- "Contact":{
- "ContactID":"8ed7dd03-4e6a-4078-a807-c5309abfec52",
- "Name":"Orlena Greenville 35",
- "EmailAddress":""
- },
- "LineItems":[
- {
- "LineItemID":"be69f44e-9c72-4fcd-9152-0174867cce49",
- "AccountCode":"12775",
- "Description":"Foobar",
- "UnitAmount":20.0000,
- "LineAmount":20.00,
- "ItemCode":"",
- "Quantity":1.0000,
- "TaxAmount":0.00,
- "Tracking":[]
- }
- ],
- "Date":"/Date(1580515200000)/",
- "DateString":"2020-02-01T00:00:00",
- "Status":"DRAFT",
- "CurrencyRate":1.000000,
- "CurrencyCode":"USD",
- "SubTotal":20.00,
- "TotalTax":0.00,
- "Total":20.00,
- "UpdatedDateUTC":"/Date(1580605644360)/",
- "LineAmountTypes":"EXCLUSIVE"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Quotes'
- example: {
- "Quotes": [
- {
- "Reference": "I am an update",
- "Contact": {
- "ContactID": "00000000-0000-0000-0000-000000000000"
- },
- "Date": "2020-02-01"
- }
- ]
- }
- '/Quotes/{QuoteID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getQuoteHistory
- summary: Retrieves history records of a specific quote
- parameters:
- - $ref: '#/components/parameters/QuoteID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createQuoteHistory
- summary: Creates a history record for a specific quote
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/QuoteID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- '/Quotes/{QuoteID}/pdf':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getQuoteAsPdf
- x-path: '/Quotes/{QuoteID}'
- summary: Retrieves a specific quote as a PDF file using a unique quote Id
- parameters:
- - $ref: '#/components/parameters/QuoteID'
- responses:
- '200':
- description: Success - return response of byte array pdf version of specified Quotes
- content:
- application/pdf:
- schema:
- type: string
- format: binary
- '/Quotes/{QuoteID}/Attachments':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getQuoteAttachments
- summary: Retrieves attachments for a specific quote
- parameters:
- - $ref: '#/components/parameters/QuoteID'
- responses:
- '200':
- description: Success - return response of type Attachments array of Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "439c1573-3cd8-4697-a9f6-81fa651ee8f3",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550852630329)/",
- "Attachments": [
- {
- "AttachmentID": "52a643be-cd5c-489f-9778-53a9fd337756",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Quotes/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '/Quotes/{QuoteID}/Attachments/{AttachmentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getQuoteAttachmentById
- summary: Retrieves a specific attachment from a specific quote using a unique attachment Id
- parameters:
- - $ref: '#/components/parameters/QuoteID'
- - $ref: '#/components/parameters/AttachmentID'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Quote as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/Quotes/{QuoteID}/Attachments/{FileName}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getQuoteAttachmentByFileName
- summary: Retrieves a specific attachment from a specific quote by filename
- parameters:
- - $ref: '#/components/parameters/QuoteID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Quote as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- post:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: updateQuoteAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Updates a specific attachment from a specific quote by filename
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/QuoteID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of type Attachments array of Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "c8d6413a-1da2-4faa-9848-21f60443e906",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550859714477)/",
- "Attachments": [
- {
- "AttachmentID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Quotes/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- description: Validation Error - some data was incorrect returns response of type Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- put:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: createQuoteAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Creates attachment for a specific quote
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/QuoteID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of type Attachments array of Attachment
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "724cdff5-bcd1-4c5c-977e-e864c24258e0",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550856817769)/",
- "Attachments": [
- {
- "AttachmentID": "ab95b276-9dce-4925-9077-439818ba270f",
- "FileName": "sample5.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Quotes/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- /Receipts:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getReceipts
- summary: Retrieves draft expense claim receipts for any user
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="DRAFT"
- x-example-csharp: Status==\"DRAFT\"
- x-example-java: Status=="' + Receipt.StatusEnum.DRAFT + '"
- x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Receipt::STATUS_DRAFT . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::Receipt::DRAFT}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "ReceiptNumber ASC"
- schema:
- type: string
- - $ref: '#/components/parameters/unitdp'
- responses:
- '200':
- description: Success - return response of type Receipts array for all Receipt
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Receipts'
- example: {
- "Id": "078b2a2c-902f-4154-8739-357ece5982e5",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552524584695)/",
- "Receipts": [
- {
- "ReceiptID": "a44fd147-af4e-4fe8-a09a-55332df74162",
- "ReceiptNumber": 1,
- "Status": "DRAFT",
- "User": {
- "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273",
- "FirstName": "API ",
- "LastName": "Team",
- "ValidationErrors": [],
- "Warnings": []
- },
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "SalesTrackingCategories": [],
- "PurchasesTrackingCategories": [],
- "ContactPersons": [],
- "Attachments": [],
- "HasValidationErrors": false,
- "ValidationErrors": [],
- "Warnings": []
- },
- "Date": "/Date(1552435200000+0000)/",
- "UpdatedDateUTC": "/Date(1552524583983+0000)/",
- "Reference": "",
- "LineAmountTypes": "NoTax",
- "LineItems": [],
- "SubTotal": 40.00,
- "TotalTax": 0.00,
- "Total": 40.00,
- "ID": "a44fd147-af4e-4fe8-a09a-55332df74162",
- "HasAttachments": false,
- "Attachments": [],
- "ValidationErrors": [],
- "Warnings": []
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createReceipt
- summary: Creates draft expense claim receipts for any user
- x-hasAccountingValidationError: true
- x-example:
- - contact:
- is_object: true
- key: contact
- keyPascal: Contact
- - contactID:
- is_last: true
- is_uuid: true
- key: contactID
- keyPascal: ContactID
- keySnake: contact_id
- default: 00000000-0000-0000-0000-000000000000
- object: contact
- - user:
- is_object: true
- key: user
- keyPascal: User
- - userID:
- is_last: true
- is_uuid: true
- key: userID
- keyPascal: UserID
- keySnake: user_id
- default: 00000000-0000-0000-0000-000000000000
- object: user
- - lineItem:
- is_object: true
- key: lineItem
- keyPascal: LineItem
- keySnake: line_item
- - description:
- key: description
- keyPascal: Description
- default: Foobar
- object: lineItem
- - quantity:
- nonString: true
- key: quantity
- keyPascal: Quantity
- default: 1.0
- is_money: true
- object: lineItem
- - unitAmount:
- nonString: true
- key: unitAmount
- keyPascal: UnitAmount
- keySnake: unit_amount
- default: 20.0
- is_money: true
- object: lineItem
- - accountCode:
- is_last: true
- key: accountCode
- keyPascal: AccountCode
- keySnake: account_code
- default: "000"
- object: lineItem
- - line_items:
- is_list: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- csharp: LineItem
- java: LineItem
- - add_lineitems:
- is_last: true
- is_list_add: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- java: LineItems
- python: line_item
- ruby: line_item
- csharp: LineItem
- object: lineItem
- - receipt:
- is_object: true
- key: receipt
- keyPascal: Receipt
- - set_contact:
- is_variable: true
- nonString: true
- key: contact
- keyPascal: Contact
- default: contact
- object: receipt
- - set_user:
- is_variable: true
- nonString: true
- key: user
- keyPascal: User
- default: user
- object: receipt
- - set_lineitem:
- is_variable: true
- nonString: true
- key: lineItems
- keyPascal: LineItems
- keySnake: line_items
- default: lineItems
- python: line_items
- ruby: line_items
- object: receipt
- - lineAmountTypes:
- nonString: true
- key: lineAmountTypes
- keyPascal: LineAmountTypes
- keySnake: line_amount_types
- default: INCLUSIVE
- php: XeroAPI\XeroPHP\Models\Accounting\LineAmountTypes::INCLUSIVE
- node: LineAmountTypes.Inclusive
- ruby: XeroRuby::Accounting::INCLUSIVE
- python: LineAmountTypes.INCLUSIVE
- java: com.xero.models.accounting.LineAmountTypes.INCLUSIVE
- csharp: LineAmountTypes.Exclusive
- object: receipt
- - status:
- is_last: true
- nonString: true
- key: status
- keyPascal: Status
- default: DRAFT
- php: XeroAPI\XeroPHP\Models\Accounting\Receipt::STATUS_DRAFT
- node: Receipt.StatusEnum.DRAFT
- ruby: XeroRuby::Accounting::Receipt::DRAFT
- python_string: DRAFT
- java: com.xero.models.accounting.Receipt.StatusEnum.DRAFT
- csharp: Receipt.StatusEnum.DRAFT
- object: receipt
- - receipts:
- is_object: true
- key: receipts
- keyPascal: Receipts
- - add_receipt:
- is_last: true
- is_array_add: true
- key: receipts
- keyPascal: Receipts
- java: Receipts
- csharp: Receipt
- object: receipt
- parameters:
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Receipts array for newly created Receipt
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Receipts'
- example: {
- "Id": "35898898-5361-4b42-b6ca-9d2c584fc53d",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552524583429)/",
- "Receipts": [
- {
- "ReceiptID": "a44fd147-af4e-4fe8-a09a-55332df74162",
- "ReceiptNumber": 1,
- "Status": "DRAFT",
- "User": {
- "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273",
- "EmailAddress": "api@xero.com",
- "FirstName": "API ",
- "LastName": "Team",
- "UpdatedDateUTC": "/Date(1511957179217+0000)/",
- "IsSubscriber": true,
- "OrganisationRole": "FINANCIALADVISER"
- },
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": "",
- "AttentionTo": ""
- },
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Date": "/Date(1552521600000+0000)/",
- "UpdatedDateUTC": "/Date(1552524583367+0000)/",
- "Reference": "",
- "LineAmountTypes": "NoTax",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.00,
- "TaxType": "NONE",
- "TaxAmount": 0.00,
- "LineAmount": 40.00,
- "AccountCode": "400",
- "Tracking": [],
- "Quantity": 2.0000
- }
- ],
- "SubTotal": 40.00,
- "TotalTax": 0.00,
- "Total": 40.00,
- "ID": "a44fd147-af4e-4fe8-a09a-55332df74162",
- "HasAttachments": false,
- "ValidationErrors": [
- {
- "Message": "A valid user should be identified using the UserID."
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Receipts with an array of Receipt object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Receipts'
- example: {
- "Receipts": [
- {
- "Contact": {
- "ContactID": "00000000-0000-0000-0000-000000000000"
- },
- "Lineitems": [
- {
- "Description": "Foobar",
- "Quantity": 2,
- "UnitAmount": 20,
- "AccountCode": "400",
- "TaxType": "NONE",
- "LineAmount": 40
- }
- ],
- "User": {
- "UserID": "00000000-0000-0000-0000-000000000000"
- },
- "LineAmountTypes": "NoTax",
- "Status": "DRAFT"
- }
- ]
- }
- '/Receipts/{ReceiptID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getReceipt
- summary: Retrieves a specific draft expense claim receipt by using a unique receipt Id
- parameters:
- - $ref: '#/components/parameters/ReceiptID'
- - $ref: '#/components/parameters/unitdp'
- responses:
- '200':
- description: Success - return response of type Receipts array for a specified Receipt
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Receipts'
- example: {
- "Id": "2c99af06-d278-4580-8c8c-463c806af5b6",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553800357225)/",
- "Receipts": [
- {
- "ReceiptID": "a44fd147-af4e-4fe8-a09a-55332df74162",
- "ReceiptNumber": 1,
- "Status": "DRAFT",
- "User": {
- "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273",
- "EmailAddress": "api@xero.com",
- "FirstName": "API ",
- "LastName": "Team",
- "UpdatedDateUTC": "/Date(1511957179217+0000)/",
- "IsSubscriber": true,
- "OrganisationRole": "FINANCIALADVISER"
- },
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": "",
- "AttentionTo": ""
- },
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1553672800957+0000)/",
- "ContactGroups": [],
- "DefaultCurrency": "NZD",
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Date": "/Date(1552435200000+0000)/",
- "UpdatedDateUTC": "/Date(1552524583983+0000)/",
- "Reference": "Foobar",
- "LineAmountTypes": "NoTax",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.00,
- "TaxType": "NONE",
- "TaxAmount": 0.00,
- "LineAmount": 40.00,
- "AccountCode": "400",
- "Tracking": [],
- "Quantity": 2.0000,
- "DiscountEnteredAsPercent": true
- }
- ],
- "SubTotal": 40.00,
- "TotalTax": 0.00,
- "Total": 40.00,
- "ID": "a44fd147-af4e-4fe8-a09a-55332df74162",
- "HasAttachments": true,
- "Attachments": [
- {
- "AttachmentID": "e02a84f6-b83a-4983-b3b9-35cd8880c7bc",
- "FileName": "HelloWorld.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/HelloWorld.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- },
- {
- "AttachmentID": "3451e34c-66a6-42b0-91e2-88618bdc169b",
- "FileName": "foobar.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/foobar.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateReceipt
- summary: Updates a specific draft expense claim receipts
- x-hasAccountingValidationError: true
- x-example:
- - dateValue:
- is_date: true
- key: dateValue
- keyPascal: Date
- java_datatype: LocalDate
- default: "LocalDate.of(2020, Month.OCTOBER, 10)"
- java: "LocalDate.now()"
- csharp: "DateTime.Now"
- php: "new DateTime('2020-12-10')"
- node: "'2020-10-10'"
- python: "dateutil.parser.parse('2020-10-10T00:00:00Z')"
- ruby: "'YYYY-MM-DD'"
- - user:
- is_object: true
- key: user
- keyPascal: User
- - userID:
- is_last: true
- is_uuid: true
- key: userID
- keyPascal: UserID
- keySnake: user_id
- default: 00000000-0000-0000-0000-000000000000
- object: user
- - receipt:
- is_object: true
- key: receipt
- keyPascal: Receipt
- - set_user:
- is_variable: true
- nonString: true
- key: user
- keyPascal: User
- default: user
- object: receipt
- - reference:
- key: reference
- keyPascal: Reference
- default: Foobar
- object: receipt
- - date:
- is_last: true
- is_variable: true
- nonString: true
- key: date
- keyPascal: Date
- default: dateValue
- object: receipt
- - receipts:
- is_object: true
- key: receipts
- keyPascal: Receipts
- - add_receipt:
- is_last: true
- is_array_add: true
- key: receipts
- keyPascal: Receipts
- java: Receipts
- csharp: Receipt
- object: receipt
- parameters:
- - $ref: '#/components/parameters/ReceiptID'
- - $ref: '#/components/parameters/unitdp'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type Receipts array for updated Receipt
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Receipts'
- example: {
- "Id": "05b76bf7-4734-4633-a399-7d569a6a25c6",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552675557052)/",
- "Receipts": [
- {
- "ReceiptID": "e3686fdc-c661-4581-b9df-cbb20782ea66",
- "ReceiptNumber": 2,
- "Status": "DRAFT",
- "User": {
- "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273",
- "EmailAddress": "api@xero.com",
- "FirstName": "API ",
- "LastName": "Team",
- "UpdatedDateUTC": "/Date(1511957179217+0000)/",
- "IsSubscriber": true,
- "OrganisationRole": "FINANCIALADVISER"
- },
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "ContactStatus": "ACTIVE",
- "Name": "Liam Gallagher",
- "FirstName": "Liam",
- "LastName": "Gallagher",
- "EmailAddress": "liam@rockstar.com",
- "BankAccountDetails": "",
- "Addresses": [
- {
- "AddressType": "STREET",
- "City": "",
- "Region": "",
- "PostalCode": "",
- "Country": "",
- "AttentionTo": ""
- },
- {
- "AddressType": "POBOX",
- "City": "Anytown",
- "Region": "NY",
- "PostalCode": "10101",
- "Country": "USA",
- "AttentionTo": ""
- }
- ],
- "Phones": [
- {
- "PhoneType": "DEFAULT",
- "PhoneNumber": "222-2222",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "DDI",
- "PhoneNumber": "",
- "PhoneAreaCode": "",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "FAX",
- "PhoneNumber": "333-2233",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- },
- {
- "PhoneType": "MOBILE",
- "PhoneNumber": "444-3433",
- "PhoneAreaCode": "212",
- "PhoneCountryCode": ""
- }
- ],
- "UpdatedDateUTC": "/Date(1551747281053+0000)/",
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Date": "/Date(1552694400000+0000)/",
- "UpdatedDateUTC": "/Date(1552675556927+0000)/",
- "Reference": "Foobar",
- "LineAmountTypes": "NoTax",
- "LineItems": [
- {
- "Description": "Foobar",
- "UnitAmount": 20.00,
- "TaxType": "NONE",
- "TaxAmount": 0.00,
- "LineAmount": 40.00,
- "AccountCode": "400",
- "Tracking": [],
- "Quantity": 2.0000
- }
- ],
- "SubTotal": 40.00,
- "TotalTax": 0.00,
- "Total": 40.00,
- "ID": "e3686fdc-c661-4581-b9df-cbb20782ea66",
- "HasAttachments": false,
- "ValidationErrors": []
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Receipts'
- example: {
- "Receipts": [
- {
- "Lineitems": [],
- "User": {
- "UserID": "00000000-0000-0000-0000-000000000000"
- },
- "Reference": "Foobar"
- }
- ]
- }
- '/Receipts/{ReceiptID}/Attachments':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getReceiptAttachments
- summary: Retrieves attachments for a specific expense claim receipt
- parameters:
- - $ref: '#/components/parameters/ReceiptID'
- responses:
- '200':
- description: Success - return response of type Attachments array of Attachments for a specified Receipt
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "d379c04d-d3aa-4034-95b8-af69a449bd78",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552686430436)/",
- "Attachments": [
- {
- "AttachmentID": "11e5ca6b-d38c-42ab-a29f-c1710d171aa1",
- "FileName": "giphy.gif",
- "Url": "https://api.xero.com/api.xro/2.0/Receipts/7923c00d-163d-404c-a608-af3de333db29/Attachments/giphy.gif",
- "MimeType": "image/gif",
- "ContentLength": 495727
- }
- ]
- }
- '/Receipts/{ReceiptID}/Attachments/{AttachmentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getReceiptAttachmentById
- summary: Retrieves a specific attachments from a specific expense claim receipts by using a unique attachment Id
- parameters:
- - $ref: '#/components/parameters/ReceiptID'
- - $ref: '#/components/parameters/AttachmentID'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Receipt as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/Receipts/{ReceiptID}/Attachments/{FileName}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getReceiptAttachmentByFileName
- summary: Retrieves a specific attachment from a specific expense claim receipts by file name
- parameters:
- - $ref: '#/components/parameters/ReceiptID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Receipt as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- post:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: updateReceiptAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Updates a specific attachment on a specific expense claim receipts by file name
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ReceiptID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of type Attachments array with updated Attachment for a specified Receipt
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "aeca1ea8-8fd9-4757-96a6-397dc4957a69",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552686602761)/",
- "Attachments": [
- {
- "AttachmentID": "e02a84f6-b83a-4983-b3b9-35cd8880c7bc",
- "FileName": "HelloWorld.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/HelloWorld.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- put:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: createReceiptAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Creates an attachment on a specific expense claim receipts by file name
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ReceiptID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of type Attachments array with newly created Attachment for a specified Receipt
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "01c9a720-b1f1-4477-8de8-ff46d945fd1d",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1552686599884)/",
- "Attachments": [
- {
- "AttachmentID": "3451e34c-66a6-42b0-91e2-88618bdc169b",
- "FileName": "foobar.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/foobar.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/Receipts/{ReceiptID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getReceiptHistory
- summary: Retrieves a history record for a specific receipt
- parameters:
- - $ref: '#/components/parameters/ReceiptID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createReceiptHistory
- summary: Creates a history record for a specific receipt
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/ReceiptID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- '400':
- description: Unsupported - return response incorrect exception, API is not able to create HistoryRecord for Receipts
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- example: {
- "ErrorNumber": 10,
- "Type": "ValidationException",
- "Message": "A validation exception occurred",
- "Elements": [
- {
- "DateUTCString": "2019-03-15T21:51:50",
- "DateUTC": "/Date(1552686710791)/",
- "Details": "Hello World",
- "ValidationErrors": [
- {
- "Message": "The document with the supplied id was not found for this endpoint."
- }
- ]
- }
- ]
- }
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- /RepeatingInvoices:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getRepeatingInvoices
- summary: Retrieves repeating invoices
- parameters:
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="DRAFT"
- x-example-csharp: Status==\"DRAFT\"
- x-example-java: Status=="' + RepeatingInvoice.StatusEnum.DRAFT + '"
- x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\RepeatingInvoice::STATUS_DRAFT . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::RepeatingInvoice::DRAFT}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Total ASC"
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of type Repeating Invoices array for all Repeating Invoice
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RepeatingInvoices'
- example: {
- "Id": "b336833d-a3a8-4a67-ab4c-6280b3ad87b0",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553805183228)/",
- "RepeatingInvoices": [
- {
- "Schedule": {
- "Period": 1,
- "Unit": "MONTHLY",
- "DueDate": 10,
- "DueDateType": "OFFOLLOWINGMONTH",
- "StartDate": "/Date(1555286400000+0000)/",
- "EndDate": "/Date(1569801600000+0000)/",
- "NextScheduledDate": "/Date(1555286400000+0000)/"
- },
- "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0",
- "Type": "ACCREC",
- "Reference": "[Week]",
- "HasAttachments": true,
- "ApprovedForSending": false,
- "SendCopy": false,
- "MarkAsSent": false,
- "IncludePDF": false,
- "ID": "428c0d75-909f-4b04-8403-a48dc27283b0",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Guitars Fender Strat",
- "UnitAmount": 5000.00,
- "TaxType": "OUTPUT2",
- "TaxAmount": 750.00,
- "LineAmount": 5000.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900",
- "DiscountEnteredAsPercent": true
- }
- ],
- "SubTotal": 5000.00,
- "TotalTax": 750.00,
- "Total": 5750.00,
- "CurrencyCode": "NZD"
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createRepeatingInvoices
- summary: Creates one or more repeating invoice templates
- x-hasAccountingValidationError: true
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type RepeatingInvoices array with newly created RepeatingInvoice
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RepeatingInvoices'
- example: {
- "Id": "b336833d-a3a8-4a67-ab4c-6280b3ad87b0",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553805183228)/",
- "RepeatingInvoices": [
- {
- "Schedule": {
- "Period": 1,
- "Unit": "MONTHLY",
- "DueDate": 10,
- "DueDateType": "OFFOLLOWINGMONTH",
- "StartDate": "/Date(1555286400000+0000)/",
- "EndDate": "/Date(1569801600000+0000)/",
- "NextScheduledDate": "/Date(1555286400000+0000)/"
- },
- "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0",
- "Type": "ACCREC",
- "Reference": "[Week]",
- "HasAttachments": true,
- "ApprovedForSending": false,
- "SendCopy": false,
- "MarkAsSent": false,
- "IncludePDF": false,
- "ID": "428c0d75-909f-4b04-8403-a48dc27283b0",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Guitars Fender Strat",
- "UnitAmount": 5000.00,
- "TaxType": "OUTPUT2",
- "TaxAmount": 750.00,
- "LineAmount": 5000.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900",
- "DiscountEnteredAsPercent": true
- }
- ],
- "SubTotal": 5000.00,
- "TotalTax": 750.00,
- "Total": 5750.00,
- "CurrencyCode": "NZD"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: RepeatingInvoices with an array of repeating invoice objects in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RepeatingInvoices'
- example: {
- "RepeatingInvoices": [
- {
- "Schedule": {
- "Period": 1,
- "Unit": "MONTHLY",
- "DueDate": 10,
- "DueDateType": "OFFOLLOWINGMONTH",
- "StartDate": "/Date(1555286400000+0000)/"
- },
- "Type": "ACCREC",
- "Reference": "[Week]",
- "ApprovedForSending": false,
- "SendCopy": false,
- "MarkAsSent": false,
- "IncludePDF": false,
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher"
- },
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Guitars Fender Strat",
- "UnitAmount": 5000.00,
- "TaxType": "OUTPUT2",
- "TaxAmount": 750.00,
- "LineAmount": 5000.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900",
- "DiscountEnteredAsPercent": true
- }
- ],
- "CurrencyCode": "NZD"
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateOrCreateRepeatingInvoices
- summary: Creates or deletes one or more repeating invoice templates
- x-hasAccountingValidationError: true
- parameters:
- - $ref: '#/components/parameters/summarizeErrors'
- - $ref: '#/components/parameters/idempotencyKey'
- responses:
- '200':
- description: Success - return response of type RepeatingInvoices array with newly created RepeatingInvoice
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RepeatingInvoices'
- example: {
- "Id": "b336833d-a3a8-4a67-ab4c-6280b3ad87b0",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553805183228)/",
- "RepeatingInvoices": [
- {
- "Schedule": {
- "Period": 1,
- "Unit": "MONTHLY",
- "DueDate": 10,
- "DueDateType": "OFFOLLOWINGMONTH",
- "StartDate": "/Date(1555286400000+0000)/",
- "EndDate": "/Date(1569801600000+0000)/",
- "NextScheduledDate": "/Date(1555286400000+0000)/"
- },
- "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0",
- "Type": "ACCREC",
- "Reference": "[Week]",
- "HasAttachments": true,
- "ApprovedForSending": false,
- "SendCopy": false,
- "MarkAsSent": false,
- "IncludePDF": false,
- "ID": "428c0d75-909f-4b04-8403-a48dc27283b0",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Guitars Fender Strat",
- "UnitAmount": 5000.00,
- "TaxType": "OUTPUT2",
- "TaxAmount": 750.00,
- "LineAmount": 5000.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900",
- "DiscountEnteredAsPercent": true
- }
- ],
- "SubTotal": 5000.00,
- "TotalTax": 750.00,
- "Total": 5750.00,
- "CurrencyCode": "NZD"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: RepeatingInvoices with an array of repeating invoice objects in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RepeatingInvoices'
- example: {
- "RepeatingInvoices": [
- {
- "Schedule": {
- "Period": 1,
- "Unit": "MONTHLY",
- "DueDate": 10,
- "DueDateType": "OFFOLLOWINGMONTH",
- "StartDate": "/Date(1555286400000+0000)/"
- },
- "Type": "ACCREC",
- "Reference": "[Week]",
- "ApprovedForSending": false,
- "SendCopy": false,
- "MarkAsSent": false,
- "IncludePDF": false,
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher"
- },
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Guitars Fender Strat",
- "UnitAmount": 5000.00,
- "TaxType": "OUTPUT2",
- "TaxAmount": 750.00,
- "LineAmount": 5000.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900",
- "DiscountEnteredAsPercent": true
- }
- ],
- "CurrencyCode": "NZD"
- }
- ]
- }
- '/RepeatingInvoices/{RepeatingInvoiceID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getRepeatingInvoice
- summary: Retrieves a specific repeating invoice by using a unique repeating invoice Id
- parameters:
- - $ref: '#/components/parameters/RepeatingInvoiceID'
- responses:
- '200':
- description: Success - return response of type Repeating Invoices array with a specified Repeating Invoice
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RepeatingInvoices'
- example: {
- "Id": "d9ac3755-7b81-4e3a-bef0-fa8a4f171442",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553805184820)/",
- "RepeatingInvoices": [
- {
- "Schedule": {
- "Period": 1,
- "Unit": "MONTHLY",
- "DueDate": 10,
- "DueDateType": "OFFOLLOWINGMONTH",
- "StartDate": "/Date(1555286400000+0000)/",
- "EndDate": "/Date(1569801600000+0000)/",
- "NextScheduledDate": "/Date(1555286400000+0000)/"
- },
- "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0",
- "Type": "ACCREC",
- "Reference": "[Week]",
- "HasAttachments": true,
- "Attachments": [
- {
- "AttachmentID": "2a488b0f-3966-4b6e-a7e1-b6d3286351f2",
- "FileName": "HelloWorld.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Invoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/HelloWorld.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- },
- {
- "AttachmentID": "48294e40-bfd2-4027-a365-f034383cb7aa",
- "FileName": "foobar.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Invoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/foobar.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- },
- {
- "AttachmentID": "528e978a-87b8-44c4-9465-9456ec2f7ee6",
- "FileName": "helo-heros.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/Invoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/helo-heros.jpg",
- "MimeType": "image/jpeg",
- "ContentLength": 2878711
- }
- ],
- "ID": "428c0d75-909f-4b04-8403-a48dc27283b0",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Status": "AUTHORISED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Guitars Fender Strat",
- "UnitAmount": 5000.00,
- "TaxType": "OUTPUT2",
- "TaxAmount": 750.00,
- "LineAmount": 5000.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900",
- "DiscountEnteredAsPercent": true
- }
- ],
- "SubTotal": 5000.00,
- "TotalTax": 750.00,
- "Total": 5750.00,
- "CurrencyCode": "NZD"
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: updateRepeatingInvoice
- summary: Deletes a specific repeating invoice template
- x-hasAccountingValidationError: true
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/RepeatingInvoiceID'
- responses:
- '200':
- description: Success - return response of type RepeatingInvoices array with deleted Invoice
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RepeatingInvoices'
- example: {
- "Id": "b336833d-a3a8-4a67-ab4c-6280b3ad87b0",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553805183228)/",
- "RepeatingInvoices": [
- {
- "Schedule": {
- "Period": 1,
- "Unit": "MONTHLY",
- "DueDate": 10,
- "DueDateType": "OFFOLLOWINGMONTH",
- "StartDate": "/Date(1555286400000+0000)/",
- "EndDate": "/Date(1569801600000+0000)/",
- "NextScheduledDate": "/Date(1555286400000+0000)/"
- },
- "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0",
- "Type": "ACCREC",
- "Reference": "[Week]",
- "HasAttachments": true,
- "ApprovedForSending": false,
- "SendCopy": false,
- "MarkAsSent": false,
- "IncludePDF": false,
- "ID": "428c0d75-909f-4b04-8403-a48dc27283b0",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Status": "DELETED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Guitars Fender Strat",
- "UnitAmount": 5000.00,
- "TaxType": "OUTPUT2",
- "TaxAmount": 750.00,
- "LineAmount": 5000.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900",
- "DiscountEnteredAsPercent": true
- }
- ],
- "SubTotal": 5000.00,
- "TotalTax": 750.00,
- "Total": 5750.00,
- "CurrencyCode": "NZD"
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/RepeatingInvoices'
- example: {
- "Schedule": {
- "Period": 1,
- "Unit": "MONTHLY",
- "DueDate": 10,
- "DueDateType": "OFFOLLOWINGMONTH",
- "StartDate": "/Date(1555286400000+0000)/",
- "EndDate": "/Date(1569801600000+0000)/",
- "NextScheduledDate": "/Date(1555286400000+0000)/"
- },
- "RepeatingInvoiceID": "428c0d75-909f-4b04-8403-a48dc27283b0",
- "Type": "ACCREC",
- "Reference": "[Week]",
- "HasAttachments": true,
- "ApprovedForSending": false,
- "SendCopy": false,
- "MarkAsSent": false,
- "IncludePDF": false,
- "ID": "428c0d75-909f-4b04-8403-a48dc27283b0",
- "Contact": {
- "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
- "Name": "Liam Gallagher",
- "Addresses": [],
- "Phones": [],
- "ContactGroups": [],
- "ContactPersons": [],
- "HasValidationErrors": false
- },
- "Status": "DELETED",
- "LineAmountTypes": "Exclusive",
- "LineItems": [
- {
- "Description": "Guitars Fender Strat",
- "UnitAmount": 5000.00,
- "TaxType": "OUTPUT2",
- "TaxAmount": 750.00,
- "LineAmount": 5000.00,
- "AccountCode": "200",
- "Tracking": [],
- "Quantity": 1.0000,
- "LineItemID": "13a8353c-d2af-4d5b-920c-438449f08900",
- "DiscountEnteredAsPercent": true
- }
- ],
- "SubTotal": 5000.00,
- "TotalTax": 750.00,
- "Total": 5750.00,
- "CurrencyCode": "NZD"
- }
- '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getRepeatingInvoiceAttachments
- summary: Retrieves attachments from a specific repeating invoice
- parameters:
- - $ref: '#/components/parameters/RepeatingInvoiceID'
- responses:
- '200':
- description: Success - return response of type Attachments array with all Attachments for a specified Repeating Invoice
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "b88b807b-3087-474b-a4f9-d8f1b4f5a899",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553805762049)/",
- "Attachments": [
- {
- "AttachmentID": "2a488b0f-3966-4b6e-a7e1-b6d3286351f2",
- "FileName": "HelloWorld.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/HelloWorld.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- },
- {
- "AttachmentID": "48294e40-bfd2-4027-a365-f034383cb7aa",
- "FileName": "foobar.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/foobar.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- },
- {
- "AttachmentID": "528e978a-87b8-44c4-9465-9456ec2f7ee6",
- "FileName": "helo-heros.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/helo-heros.jpg",
- "MimeType": "image/jpeg",
- "ContentLength": 2878711
- }
- ]
- }
- '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{AttachmentID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getRepeatingInvoiceAttachmentById
- summary: Retrieves a specific attachment from a specific repeating invoice
- parameters:
- - $ref: '#/components/parameters/RepeatingInvoiceID'
- - $ref: '#/components/parameters/AttachmentID'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Repeating Invoice as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.attachments, accounting.attachments.read]
- tags:
- - Accounting
- operationId: getRepeatingInvoiceAttachmentByFileName
- summary: Retrieves a specific attachment from a specific repeating invoices by file name
- parameters:
- - $ref: '#/components/parameters/RepeatingInvoiceID'
- - $ref: '#/components/parameters/FileName'
- - $ref: '#/components/parameters/ContentType'
- responses:
- '200':
- description: Success - return response of attachment for Repeating Invoice as binary data
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- post:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: updateRepeatingInvoiceAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Updates a specific attachment from a specific repeating invoices by file name
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/RepeatingInvoiceID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of type Attachments array with specified Attachment for a specified Repeating Invoice
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "61b24d5c-4d6e-468f-9de1-abbc234b239a",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553805873362)/",
- "Attachments": [
- {
- "AttachmentID": "d086d5f4-9c3d-4edc-a87e-906248eeb652",
- "FileName": "HelloWorld.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/HelloWorld.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- put:
- security:
- - OAuth2: [accounting.attachments]
- tags:
- - Accounting
- operationId: createRepeatingInvoiceAttachmentByFileName
- x-hasAccountingValidationError: true
- summary: Creates an attachment from a specific repeating invoices by file name
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/RepeatingInvoiceID'
- - $ref: '#/components/parameters/FileName'
- responses:
- '200':
- description: Success - return response of type Attachments array with updated Attachment for a specified Repeating Invoice
- x-isAttachment: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Attachments'
- example: {
- "Id": "219de8c0-ee70-48af-a000-594eba14b417",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553805866696)/",
- "Attachments": [
- {
- "AttachmentID": "e078e56c-9a2b-4f6c-a1fa-5d19b0dab611",
- "FileName": "foobar.jpg",
- "Url": "https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/foobar.jpg",
- "MimeType": "image/jpg",
- "ContentLength": 2878711
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: Byte array of file in body of request
- content:
- application/octet-stream:
- schema:
- type: string
- format: binary
- '/RepeatingInvoices/{RepeatingInvoiceID}/History':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.transactions, accounting.transactions.read]
- tags:
- - Accounting
- operationId: getRepeatingInvoiceHistory
- summary: Retrieves history record for a specific repeating invoice
- parameters:
- - $ref: '#/components/parameters/RepeatingInvoiceID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRetrieved'
- put:
- security:
- - OAuth2: [accounting.transactions]
- tags:
- - Accounting
- operationId: createRepeatingInvoiceHistory
- summary: Creates a history record for a specific repeating invoice
- x-hasAccountingValidationError: true
- x-example:
- - historyRecord:
- is_object: true
- key: historyRecord
- keyPascal: HistoryRecord
- keySnake: history_record
- - Details:
- is_last: true
- key: details
- keyPascal: Details
- default: Hello World
- object: historyRecord
- - historyRecords:
- is_object: true
- key: historyRecords
- keyPascal: HistoryRecords
- - add_historyRecord:
- is_last: true
- is_array_add: true
- key: historyRecords
- keyPascal: HistoryRecords
- keySnake: history_records
- java: HistoryRecords
- python: history_record
- ruby: history_record
- csharp: HistoryRecord
- object: historyRecord
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/RepeatingInvoiceID'
- responses:
- '200':
- $ref: '#/components/responses/HistoryRecordCreated'
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- $ref: '#/components/requestBodies/historyRecords'
- '/Reports/TenNinetyNine':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.reports.read, accounting.reports.tenninetynine.read]
- tags:
- - Accounting
- operationId: getReportTenNinetyNine
- summary: Retrieve reports for 1099
- parameters:
- - in: query
- name: reportYear
- x-snake: report_year
- description: The year of the 1099 report
- example: "2019"
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of type Reports
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Reports'
- example: {
- "Id": "8b474ddb-9ef4-457c-8640-1c0e3670ea0e",
- "Status": "OK",
- "ProviderName": "Java Public Example",
- "DateTimeUTC": "/Date(1691540171754)/",
- "Reports": [
- {
- "ReportName": "1099-NEC report",
- "ReportDate": "1 Jan 2023 to 31 Dec 2023",
- "Fields": [],
- "Contacts": [
- {
- "Box1": 0.00,
- "Box2": 0.00,
- "Box4": 1150.00,
- "Name": "Bank West",
- "FederalTaxIDType": "SSN",
- "City": "Pinehaven",
- "Zip": "12345",
- "State": "CA",
- "Email": "jack@bowest.com",
- "StreetAddress": "Procurement Services\r\nGPO 1234\r\n\r\n\r\n",
- "TaxID": "234-22-2223",
- "ContactId": "81d5706a-8057-4338-8511-747cd85f4c68",
- "LegalName": "Jack Sparrow",
- "BusinessName": "Bank West",
- "FederalTaxClassification": "PARTNERSHIP"
- }
- ]
- },
- {
- "ReportName": "1099-MISC report",
- "ReportDate": "1 Jan 2023 to 31 Dec 2023",
- "Fields": [],
- "Contacts": [
- {
- "Box1": 0.00,
- "Box2": 0.00,
- "Box3": 1000.00,
- "Box4": 0.00,
- "Box5": 0.00,
- "Box6": 0.00,
- "Box7": 0.00,
- "Box8": 0.00,
- "Box9": 0.00,
- "Box10": 0.00,
- "Box11": 0.00,
- "Box14": 0.00,
- "Name": "Bank West",
- "FederalTaxIDType": "SSN",
- "City": "Pinehaven",
- "Zip": "12345",
- "State": "CA",
- "Email": "jack@bowest.com",
- "StreetAddress": "Procurement Services\r\nGPO 1234\r\n\r\n\r\n",
- "TaxID": "234-22-2223",
- "ContactId": "81d5706a-8057-4338-8511-747cd85f4c68",
- "LegalName": "Jack Sparrow",
- "BusinessName": "Bank West",
- "FederalTaxClassification": "PARTNERSHIP"
- },
- {
- "Box1": 0.00,
- "Box2": 0.00,
- "Box3": 1000.00,
- "Box4": 0.00,
- "Box5": 0.00,
- "Box6": 0.00,
- "Box7": 0.00,
- "Box8": 0.00,
- "Box9": 0.00,
- "Box10": 0.00,
- "Box11": 0.00,
- "Box14": 0.00,
- "Name": "Hoyt Productions",
- "FederalTaxIDType": "SSN",
- "City": "Oaktown",
- "Zip": "45123",
- "State": "NY",
- "Email": "accounts@hoytmadeupdemo.com",
- "StreetAddress": "100 Rusty Ridge Road\r\nSuite 100\r\n\r\n\r\n",
- "TaxID": "123-45-6780",
- "ContactId": "19732b6a-9a5c-4651-b33c-3f8f682e2a2b",
- "LegalName": "Raymond Holt",
- "BusinessName": "Hoyt productions",
- "FederalTaxClassification": "S_CORP"
- },
- {
- "Box1": 5543.75,
- "Box2": 0.00,
- "Box3": 0.00,
- "Box4": 0.00,
- "Box5": 0.00,
- "Box6": 0.00,
- "Box7": 0.00,
- "Box8": 0.00,
- "Box9": 0.00,
- "Box10": 0.00,
- "Box11": 0.00,
- "Box14": 0.00,
- "Name": "Truxton Property Management",
- "FederalTaxIDType": "EIN",
- "City": "Coppertown",
- "Zip": "21321",
- "State": "FL",
- "Email": "accounts@truxtonmadeupdemo.com",
- "StreetAddress": "1000 Copper Avenue\r\nSuite 1000\r\n\r\n\r\n",
- "TaxID": "33-3332233",
- "ContactId": "018355fc-c67e-4352-b443-ef3873031983",
- "LegalName": "Jake Peralta",
- "BusinessName": "Truxton Property Management",
- "FederalTaxClassification": "C_CORP"
- }
- ]
- }
- ]
- }
- '/Reports/AgedPayablesByContact':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.reports.read]
- tags:
- - Accounting
- operationId: getReportAgedPayablesByContact
- summary: Retrieves report for aged payables by contact
- parameters:
- - in: query
- required: true
- name: contactId
- x-snake: contact_id
- description: Unique identifier for a Contact
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- - in: query
- name: date
- description: The date of the Aged Payables By Contact report
- example: "2019-10-31"
- schema:
- type: string
- format: date
- - $ref: '#/components/parameters/FromDate'
- - $ref: '#/components/parameters/ToDate'
- responses:
- '200':
- description: Success - return response of type ReportWithRows
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportWithRows'
- example: {
- "Id": "5a33f9d4-44a6-4467-a812-4f025506ee35",
- "Status": "OK",
- "ProviderName": "Java Public Example",
- "DateTimeUTC": "/Date(1555971088085)/",
- "Reports": [
- {
- "ReportName": "Aged Payables By Contact",
- "ReportType": "AgedPayablesByContact",
- "ReportTitles": [
- "Invoices",
- "ABC",
- "From 10 October 2017 to 22 April 2019",
- "Showing payments to 22 April 2019"
- ],
- "ReportDate": "22 April 2019",
- "UpdatedDateUTC": "/Date(1555971088085)/",
- "Fields": [],
- "Rows": [
- {
- "RowType": "Header",
- "Cells": [
- {
- "Value": "Date"
- },
- {
- "Value": "Reference"
- },
- {
- "Value": "Due Date"
- },
- {
- "Value": ""
- },
- {
- "Value": "Total"
- },
- {
- "Value": "Paid"
- },
- {
- "Value": "Credited"
- },
- {
- "Value": "Due"
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "2017-10-10T00:00:00"
- },
- {
- "Value": "Opening Balance"
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": "0.00"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "2018-10-09T00:00:00",
- "Attributes": [
- {
- "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "2018-10-23T00:00:00",
- "Attributes": [
- {
- "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "181 days overdue",
- "Attributes": [
- {
- "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "250.00",
- "Attributes": [
- {
- "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "250.00",
- "Attributes": [
- {
- "Value": "1f3960ae-0537-4438-a4dd-76d785e6d7d8",
- "Id": "invoiceID"
- }
- ]
- }
- ]
- },
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Total"
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": "250.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "250.00"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "",
- "Rows": [
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Closing Balance"
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": "250.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "250.00"
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- '/Reports/AgedReceivablesByContact':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.reports.read]
- tags:
- - Accounting
- operationId: getReportAgedReceivablesByContact
- summary: Retrieves report for aged receivables by contact
- parameters:
- - in: query
- required: true
- name: contactId
- x-snake: contact_id
- description: Unique identifier for a Contact
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- - in: query
- name: date
- description: The date of the Aged Receivables By Contact report
- example: "2019-10-31"
- schema:
- type: string
- format: date
- - $ref: '#/components/parameters/FromDate'
- - $ref: '#/components/parameters/ToDate'
- responses:
- '200':
- description: Success - return response of type ReportWithRows
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportWithRows'
- example: {
- "Id": "b977b607-955d-47cb-92fd-7c29b3dd755c",
- "Status": "OK",
- "ProviderName": "Java Public Example",
- "DateTimeUTC": "/Date(1556032862815)/",
- "Reports": [
- {
- "ReportName": "Aged Receivables By Contact",
- "ReportType": "AgedReceivablesByContact",
- "ReportTitles": [
- "Invoices",
- "ABC",
- "From 10 October 2017 to 23 April 2019",
- "Showing payments to 23 April 2019"
- ],
- "ReportDate": "23 April 2019",
- "UpdatedDateUTC": "/Date(1556032862815)/",
- "Fields": [],
- "Rows": [
- {
- "RowType": "Header",
- "Cells": [
- {
- "Value": "Date"
- },
- {
- "Value": "Number"
- },
- {
- "Value": "Due Date"
- },
- {
- "Value": ""
- },
- {
- "Value": "Total"
- },
- {
- "Value": "Paid"
- },
- {
- "Value": "Credited"
- },
- {
- "Value": "Due"
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "2017-10-10T00:00:00"
- },
- {
- "Value": "Opening Balance"
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": "0.00"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "2018-05-13T00:00:00",
- "Attributes": [
- {
- "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "IV1242016",
- "Attributes": [
- {
- "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "2018-06-22T00:00:00",
- "Attributes": [
- {
- "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "305 days overdue",
- "Attributes": [
- {
- "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "100.00",
- "Attributes": [
- {
- "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "100.00",
- "Attributes": [
- {
- "Value": "40ebad47-24e2-4dc9-a5f5-579df427671b",
- "Id": "invoiceID"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "2019-04-23T00:00:00",
- "Attributes": [
- {
- "Value": "ca0483ce-fa43-4335-8512-751e655337b8",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "INV-0086",
- "Attributes": [
- {
- "Value": "ca0483ce-fa43-4335-8512-751e655337b8",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "2019-05-07T00:00:00",
- "Attributes": [
- {
- "Value": "ca0483ce-fa43-4335-8512-751e655337b8",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "ca0483ce-fa43-4335-8512-751e655337b8",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "50.00",
- "Attributes": [
- {
- "Value": "ca0483ce-fa43-4335-8512-751e655337b8",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "ca0483ce-fa43-4335-8512-751e655337b8",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "ca0483ce-fa43-4335-8512-751e655337b8",
- "Id": "invoiceID"
- }
- ]
- },
- {
- "Value": "50.00",
- "Attributes": [
- {
- "Value": "ca0483ce-fa43-4335-8512-751e655337b8",
- "Id": "invoiceID"
- }
- ]
- }
- ]
- },
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Total"
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": "150.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "150.00"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "",
- "Rows": [
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Closing Balance"
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": "150.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "150.00"
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- '/Reports/BalanceSheet':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.reports.read]
- tags:
- - Accounting
- operationId: getReportBalanceSheet
- summary: Retrieves report for balancesheet
- parameters:
- - in: query
- name: date
- description: The date of the Balance Sheet report
- example: "2019-11-01"
- schema:
- type: string
- format: date
- - in: query
- name: periods
- description: The number of periods for the Balance Sheet report
- example: 3
- schema:
- type: integer
- - in: query
- name: timeframe
- description: The period size to compare to (MONTH, QUARTER, YEAR)
- example: "MONTH"
- schema:
- type: string
- enum:
- - MONTH
- - QUARTER
- - YEAR
- - in: query
- name: trackingOptionID1
- x-snake: tracking_option_id_1
- description: The tracking option 1 for the Balance Sheet report
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- - in: query
- name: trackingOptionID2
- x-snake: tracking_option_id_2
- description: The tracking option 2 for the Balance Sheet report
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- - in: query
- name: standardLayout
- x-snake: standard_layout
- description: The standard layout boolean for the Balance Sheet report
- example: true
- x-example-python: "True"
- schema:
- type: boolean
- - in: query
- name: paymentsOnly
- x-snake: payments_only
- description: return a cash basis for the Balance Sheet report
- example: false
- x-example-python: "False"
- schema:
- type: boolean
- responses:
- '200':
- description: Success - return response of type ReportWithRows
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportWithRows'
- example: {
- "Id": "2ddba304-6ed3-4da4-b185-3b6289699653",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1555099412778)/",
- "Reports": [
- {
- "ReportName": "Balance Sheet",
- "ReportType": "BalanceSheet",
- "ReportTitles": [
- "Balance Sheet",
- "Dev Evangelist - Sid Test 3 (NZ-2016-02)",
- "As at 30 April 2019"
- ],
- "ReportDate": "12 April 2019",
- "UpdatedDateUTC": "/Date(1555099412778)/",
- "Fields": [],
- "Rows": [
- {
- "RowType": "Header",
- "Cells": [
- {
- "Value": ""
- },
- {
- "Value": "30 Apr 2019"
- },
- {
- "Value": "31 Mar 2019"
- },
- {
- "Value": "28 Feb 2019"
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Assets",
- "Rows": []
- },
- {
- "RowType": "Section",
- "Title": "Bank",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Country Savings",
- "Attributes": [
- {
- "Value": "041207d2-3d61-4e5d-8c1a-b9236955a71c",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "-1850.00",
- "Attributes": [
- {
- "Value": "041207d2-3d61-4e5d-8c1a-b9236955a71c",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "-1850.00",
- "Attributes": [
- {
- "Value": "041207d2-3d61-4e5d-8c1a-b9236955a71c",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "041207d2-3d61-4e5d-8c1a-b9236955a71c",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "My Big Bank",
- "Attributes": [
- {
- "Value": "300f3bde-3a5c-4035-9ec5-45b09777679a",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "2146.37",
- "Attributes": [
- {
- "Value": "300f3bde-3a5c-4035-9ec5-45b09777679a",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "2020.00",
- "Attributes": [
- {
- "Value": "300f3bde-3a5c-4035-9ec5-45b09777679a",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "300f3bde-3a5c-4035-9ec5-45b09777679a",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Total Bank"
- },
- {
- "Value": "296.37"
- },
- {
- "Value": "170.00"
- },
- {
- "Value": "0.00"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Current Assets",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Accounts Receivable",
- "Attributes": [
- {
- "Value": "b94495d0-44ab-4199-a1d0-427a4877e100",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "154355.72",
- "Attributes": [
- {
- "Value": "b94495d0-44ab-4199-a1d0-427a4877e100",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "154351.78",
- "Attributes": [
- {
- "Value": "b94495d0-44ab-4199-a1d0-427a4877e100",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "356.50",
- "Attributes": [
- {
- "Value": "b94495d0-44ab-4199-a1d0-427a4877e100",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Inventory",
- "Attributes": [
- {
- "Value": "53a12a15-7e9b-4a31-85f4-a7cee6d04215",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "25000.00",
- "Attributes": [
- {
- "Value": "53a12a15-7e9b-4a31-85f4-a7cee6d04215",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "25000.00",
- "Attributes": [
- {
- "Value": "53a12a15-7e9b-4a31-85f4-a7cee6d04215",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "53a12a15-7e9b-4a31-85f4-a7cee6d04215",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Total Current Assets"
- },
- {
- "Value": "179355.72"
- },
- {
- "Value": "179351.78"
- },
- {
- "Value": "356.50"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Fixed Assets",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Office Equipment",
- "Attributes": [
- {
- "Value": "7132cab3-ce56-4389-8e47-8f60d4c137f8",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "-119.00",
- "Attributes": [
- {
- "Value": "7132cab3-ce56-4389-8e47-8f60d4c137f8",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "-119.00",
- "Attributes": [
- {
- "Value": "7132cab3-ce56-4389-8e47-8f60d4c137f8",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "7132cab3-ce56-4389-8e47-8f60d4c137f8",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Total Fixed Assets"
- },
- {
- "Value": "-119.00"
- },
- {
- "Value": "-119.00"
- },
- {
- "Value": "0.00"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "",
- "Rows": [
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Total Assets"
- },
- {
- "Value": "179533.09"
- },
- {
- "Value": "179402.78"
- },
- {
- "Value": "356.50"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Liabilities",
- "Rows": []
- },
- {
- "RowType": "Section",
- "Title": "Current Liabilities",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Accounts Payable",
- "Attributes": [
- {
- "Value": "a2a4795b-a01f-40eb-afa6-a34b4514875d",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "-3469.00",
- "Attributes": [
- {
- "Value": "a2a4795b-a01f-40eb-afa6-a34b4514875d",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "-3469.00",
- "Attributes": [
- {
- "Value": "a2a4795b-a01f-40eb-afa6-a34b4514875d",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "-184.00",
- "Attributes": [
- {
- "Value": "a2a4795b-a01f-40eb-afa6-a34b4514875d",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "GST",
- "Attributes": [
- {
- "Value": "17d9a4a0-3181-4803-a96b-f0dbe589091b",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "-2446.21",
- "Attributes": [
- {
- "Value": "17d9a4a0-3181-4803-a96b-f0dbe589091b",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "-2461.89",
- "Attributes": [
- {
- "Value": "17d9a4a0-3181-4803-a96b-f0dbe589091b",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "76.50",
- "Attributes": [
- {
- "Value": "17d9a4a0-3181-4803-a96b-f0dbe589091b",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Total Current Liabilities"
- },
- {
- "Value": "-5915.21"
- },
- {
- "Value": "-5930.89"
- },
- {
- "Value": "-107.50"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "",
- "Rows": [
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Total Liabilities"
- },
- {
- "Value": "-5915.21"
- },
- {
- "Value": "-5930.89"
- },
- {
- "Value": "-107.50"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Net Assets"
- },
- {
- "Value": "185448.30"
- },
- {
- "Value": "185333.67"
- },
- {
- "Value": "464.00"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Equity",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Current Year Earnings",
- "Attributes": [
- {
- "Value": "00000000-0000-0000-0000-000000000000",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "114.62",
- "Attributes": [
- {
- "Value": "00000000-0000-0000-0000-000000000000",
- "Id": "account"
- },
- {
- "Value": "4/1/2019",
- "Id": "fromDate"
- },
- {
- "Value": "4/30/2019",
- "Id": "toDate"
- }
- ]
- },
- {
- "Value": "156621.67",
- "Attributes": [
- {
- "Value": "00000000-0000-0000-0000-000000000000",
- "Id": "account"
- },
- {
- "Value": "4/1/2018",
- "Id": "fromDate"
- },
- {
- "Value": "3/31/2019",
- "Id": "toDate"
- }
- ]
- },
- {
- "Value": "500.00",
- "Attributes": [
- {
- "Value": "00000000-0000-0000-0000-000000000000",
- "Id": "account"
- },
- {
- "Value": "4/1/2018",
- "Id": "fromDate"
- },
- {
- "Value": "2/28/2019",
- "Id": "toDate"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Owner A Drawings",
- "Attributes": [
- {
- "Value": "136ebd08-60ea-4592-8982-be92c153b53a",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "28752.00",
- "Attributes": [
- {
- "Value": "136ebd08-60ea-4592-8982-be92c153b53a",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "28752.00",
- "Attributes": [
- {
- "Value": "136ebd08-60ea-4592-8982-be92c153b53a",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "136ebd08-60ea-4592-8982-be92c153b53a",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Owner A Funds Introduced",
- "Attributes": [
- {
- "Value": "5690f1e8-1d02-4893-90c2-ee1a69eff942",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "-50.00",
- "Attributes": [
- {
- "Value": "5690f1e8-1d02-4893-90c2-ee1a69eff942",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "-50.00",
- "Attributes": [
- {
- "Value": "5690f1e8-1d02-4893-90c2-ee1a69eff942",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "-46.00",
- "Attributes": [
- {
- "Value": "5690f1e8-1d02-4893-90c2-ee1a69eff942",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Retained Earnings",
- "Attributes": [
- {
- "Value": "7fc16c06-c342-4f32-995f-889b5f9996fd",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "156631.67",
- "Attributes": [
- {
- "Value": "7fc16c06-c342-4f32-995f-889b5f9996fd",
- "Id": "account"
- },
- {
- "Value": "",
- "Id": "fromDate"
- },
- {
- "Value": "4/30/2019",
- "Id": "toDate"
- }
- ]
- },
- {
- "Value": "10.00",
- "Attributes": [
- {
- "Value": "7fc16c06-c342-4f32-995f-889b5f9996fd",
- "Id": "account"
- },
- {
- "Value": "",
- "Id": "fromDate"
- },
- {
- "Value": "3/31/2019",
- "Id": "toDate"
- }
- ]
- },
- {
- "Value": "10.00",
- "Attributes": [
- {
- "Value": "7fc16c06-c342-4f32-995f-889b5f9996fd",
- "Id": "account"
- },
- {
- "Value": "",
- "Id": "fromDate"
- },
- {
- "Value": "2/28/2019",
- "Id": "toDate"
- }
- ]
- }
- ]
- },
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Total Equity"
- },
- {
- "Value": "185448.29"
- },
- {
- "Value": "185333.67"
- },
- {
- "Value": "464.00"
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- '/Reports/BankSummary':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.reports.read]
- tags:
- - Accounting
- operationId: getReportBankSummary
- summary: Retrieves report for bank summary
- parameters:
- - $ref: '#/components/parameters/FromDate'
- - $ref: '#/components/parameters/ToDate'
- responses:
- '200':
- description: Success - return response of type ReportWithRows
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportWithRows'
- example: {
- "Id": "ae58d0ec-9c5c-455f-b96e-690107579257",
- "Status": "OK",
- "ProviderName": "Java Public Example",
- "DateTimeUTC": "/Date(1556035526223)/",
- "Reports": [
- {
- "ReportName": "Bank Summary",
- "ReportType": "BankSummary",
- "ReportTitles": [
- "Bank Summary",
- "MindBody Test 10 (AU-2016-02)",
- "From 1 April 2019 to 30 April 2019"
- ],
- "ReportDate": "23 April 2019",
- "UpdatedDateUTC": "/Date(1556035526223)/",
- "Fields": [],
- "Rows": [
- {
- "RowType": "Header",
- "Cells": [
- {
- "Value": "Bank Accounts"
- },
- {
- "Value": "Opening Balance"
- },
- {
- "Value": "Cash Received"
- },
- {
- "Value": "Cash Spent"
- },
- {
- "Value": "Closing Balance"
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Big City Bank",
- "Attributes": [
- {
- "Value": "03f9cf1e-2deb-4bf1-b0a8-b57f08672eb8",
- "Id": "accountID"
- }
- ]
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "110.00",
- "Attributes": [
- {
- "Value": "03f9cf1e-2deb-4bf1-b0a8-b57f08672eb8",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "100.00",
- "Attributes": [
- {
- "Value": "03f9cf1e-2deb-4bf1-b0a8-b57f08672eb8",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "10.00"
- }
- ]
- },
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Total"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "110.00"
- },
- {
- "Value": "100.00"
- },
- {
- "Value": "10.00"
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- '/Reports/{ReportID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.reports.read]
- tags:
- - Accounting
- operationId: getReportFromId
- summary: Retrieves a specific report using a unique ReportID
- parameters:
- - in: path
- required: true
- name: ReportID
- x-snake: report_id
- description: Unique identifier for a Report
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of type ReportWithRows
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportWithRows'
- '/Reports/BudgetSummary':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.reports.read]
- tags:
- - Accounting
- operationId: getReportBudgetSummary
- summary: Retrieves report for budget summary
- parameters:
- - in: query
- name: date
- description: The date for the Bank Summary report e.g. 2018-03-31
- example: "2019-03-31"
- schema:
- type: string
- format: date
- - in: query
- name: periods
- description: The number of periods to compare (integer between 1 and 12)
- example: 2
- schema:
- type: integer
- - in: query
- name: timeframe
- description: The period size to compare to (1=month, 3=quarter, 12=year)
- example: 3
- schema:
- type: integer
- responses:
- '200':
- description: success- return a Report with Rows object
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportWithRows'
- example: {
- "Id": "9f1e2722-0d98-4669-890f-f8f4217c968b",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573755037865)/",
- "Reports": [
- {
- "ReportName": "Budget Summary",
- "ReportType": "BudgetSummary",
- "ReportTitles": [
- "Overall Budget",
- "Budget Summary",
- "Online Test 11",
- "November 2019 to October 2022"
- ],
- "ReportDate": "14 November 2019",
- "UpdatedDateUTC": "/Date(1573755037865)/",
- "Fields": [],
- "Rows": [
- {
- "RowType": "Header",
- "Cells": [
- {
- "Value": "Account"
- },
- {
- "Value": "Jan-20"
- },
- {
- "Value": "Apr-20"
- },
- {
- "Value": "Jul-20"
- },
- {
- "Value": "Oct-20"
- },
- {
- "Value": "Jan-21"
- },
- {
- "Value": "Apr-21"
- },
- {
- "Value": "Jul-21"
- },
- {
- "Value": "Oct-21"
- },
- {
- "Value": "Jan-22"
- },
- {
- "Value": "Apr-22"
- },
- {
- "Value": "Jul-22"
- },
- {
- "Value": "Oct-22"
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "",
- "Rows": [
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Gross Profit"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "",
- "Rows": [
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Total Expenses"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "",
- "Rows": [
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Net Profit"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- '/Reports/ExecutiveSummary':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.reports.read]
- tags:
- - Accounting
- operationId: getReportExecutiveSummary
- summary: Retrieves report for executive summary
- parameters:
- - in: query
- name: date
- description: The date for the Bank Summary report e.g. 2018-03-31
- example: "2019-03-31"
- schema:
- type: string
- format: date
- responses:
- '200':
- description: Success - return response of type ReportWithRows
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportWithRows'
- example: {
- "Id": "068d3505-ac37-43f3-8135-f912a5963d8a",
- "Status": "OK",
- "ProviderName": "provider-name",
- "DateTimeUTC": "/Date(1573755038314)/",
- "Reports": [
- {
- "ReportName": "Executive Summary",
- "ReportType": "ExecutiveSummary",
- "ReportTitles": [
- "Executive Summary",
- "Online Test 11",
- "For the month of November 2019"
- ],
- "ReportDate": "14 November 2019",
- "UpdatedDateUTC": "/Date(1573755038314)/",
- "Fields": [],
- "Rows": [
- {
- "RowType": "Header",
- "Cells": [
- {
- "Value": ""
- },
- {
- "Value": "Nov 2019"
- },
- {
- "Value": "Oct 2019"
- },
- {
- "Value": "Variance"
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Cash",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Cash received"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.0%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Cash spent"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.0%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Cash surplus (deficit)"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.0%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Closing bank balance"
- },
- {
- "Value": "79.01"
- },
- {
- "Value": "79.01"
- },
- {
- "Value": "0.0%"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Profitability",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Income"
- },
- {
- "Value": "40.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.0%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Direct costs"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.0%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Gross profit (loss)"
- },
- {
- "Value": "40.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.0%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Other Income"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.0%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Expenses"
- },
- {
- "Value": "205.40"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.0%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Profit (loss)"
- },
- {
- "Value": "-165.40"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.0%"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Balance Sheet",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Debtors"
- },
- {
- "Value": "590.00"
- },
- {
- "Value": "550.00"
- },
- {
- "Value": "7.3%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Creditors"
- },
- {
- "Value": "-44.00"
- },
- {
- "Value": "-44.00"
- },
- {
- "Value": "0.0%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Net assets"
- },
- {
- "Value": "594.16"
- },
- {
- "Value": "759.56"
- },
- {
- "Value": "-21.8%"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Income",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Number of invoices issued"
- },
- {
- "Value": "1"
- },
- {
- "Value": "0"
- },
- {
- "Value": "0.0%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Average value of invoices"
- },
- {
- "Value": "40.00"
- },
- {
- "Value": "0.00"
- },
- {
- "Value": "0.0%"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Performance",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Gross profit margin"
- },
- {
- "Value": "100.0%"
- },
- {
- "Value": ""
- },
- {
- "Value": "0.0%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Net profit margin"
- },
- {
- "Value": "-413.5%"
- },
- {
- "Value": ""
- },
- {
- "Value": "0.0%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Return on investment (p.a.)"
- },
- {
- "Value": "-334.1%"
- },
- {
- "Value": "0.0%"
- },
- {
- "Value": "0.0%"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Position",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Average debtors days"
- },
- {
- "Value": "442.50"
- },
- {
- "Value": "0"
- },
- {
- "Value": "0.0%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Average creditors days"
- },
- {
- "Value": "-6.426484907497565725413826680"
- },
- {
- "Value": "0"
- },
- {
- "Value": "0.0%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Short term cash forecast"
- },
- {
- "Value": "634.00"
- },
- {
- "Value": "594.00"
- },
- {
- "Value": "6.7%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Current assets to liabilities"
- },
- {
- "Value": "4.0729764675459012154124644427"
- },
- {
- "Value": "-62.034024896265560165975103734"
- },
- {
- "Value": "106.6%"
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Term assets to liabilities"
- },
- {
- "Value": ""
- },
- {
- "Value": ""
- },
- {
- "Value": "0.0%"
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- '/Reports':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.reports.read]
- tags:
- - Accounting
- operationId: getReportsList
- summary: Retrieves a list of the organistaions unique reports that require a uuid to fetch
- responses:
- '200':
- description: Success - return response of type ReportWithRows
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportWithRows'
- '/Reports/ProfitAndLoss':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.reports.read]
- tags:
- - Accounting
- operationId: getReportProfitAndLoss
- summary: Retrieves report for profit and loss
- parameters:
- - $ref: '#/components/parameters/FromDate'
- - $ref: '#/components/parameters/ToDate'
- - in: query
- name: periods
- description: The number of periods to compare (integer between 1 and 12)
- example: 3
- schema:
- type: integer
- - in: query
- name: timeframe
- description: The period size to compare to (MONTH, QUARTER, YEAR)
- example: "MONTH"
- schema:
- type: string
- enum:
- - MONTH
- - QUARTER
- - YEAR
- - in: query
- name: trackingCategoryID
- x-snake: tracking_category_id
- description: The trackingCategory 1 for the ProfitAndLoss report
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- - in: query
- name: trackingCategoryID2
- x-snake: tracking_category_id_2
- description: The trackingCategory 2 for the ProfitAndLoss report
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- - in: query
- name: trackingOptionID
- x-snake: tracking_option_id
- description: The tracking option 1 for the ProfitAndLoss report
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- - in: query
- name: trackingOptionID2
- x-snake: tracking_option_id_2
- description: The tracking option 2 for the ProfitAndLoss report
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- - in: query
- name: standardLayout
- x-snake: standard_layout
- description: Return the standard layout for the ProfitAndLoss report
- example: "true"
- x-example-python: "True"
- schema:
- type: boolean
- - in: query
- name: paymentsOnly
- x-snake: payments_only
- description: Return cash only basis for the ProfitAndLoss report
- example: "false"
- x-example-python: "False"
- schema:
- type: boolean
- responses:
- '200':
- description: Success - return response of type ReportWithRows
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportWithRows'
- '/Reports/TrialBalance':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.reports.read]
- tags:
- - Accounting
- operationId: getReportTrialBalance
- summary: Retrieves report for trial balance
- parameters:
- - in: query
- name: date
- description: The date for the Trial Balance report e.g. 2018-03-31
- example: "2019-10-31"
- schema:
- type: string
- format: date
- - in: query
- name: paymentsOnly
- x-snake: payments_only
- description: Return cash only basis for the Trial Balance report
- example: "true"
- x-example-python: "True"
- schema:
- type: boolean
- responses:
- '200':
- description: Success - return response of type ReportWithRows
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ReportWithRows'
- example: {
- "Id": "0b3ee35e-b97c-4b3c-b7e2-9a465233e329",
- "Status": "OK",
- "ProviderName": "Java Public Example",
- "DateTimeUTC": "/Date(1556129558740)/",
- "Reports": [
- {
- "ReportName": "Trial Balance",
- "ReportType": "TrialBalance",
- "ReportTitles": [
- "Trial Balance",
- "Dev Evangelist - Sid Test 1 (US-2016-06)",
- "As at 24 April 2019"
- ],
- "ReportDate": "24 April 2019",
- "UpdatedDateUTC": "/Date(1556129558724)/",
- "Fields": [],
- "Rows": [
- {
- "RowType": "Header",
- "Cells": [
- {
- "Value": "Account"
- },
- {
- "Value": "Debit"
- },
- {
- "Value": "Credit"
- },
- {
- "Value": "YTD Debit"
- },
- {
- "Value": "YTD Credit"
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Revenue",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Big Expense (002)",
- "Attributes": [
- {
- "Value": "da962997-a8bd-4dff-9616-01cdc199283f",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "da962997-a8bd-4dff-9616-01cdc199283f",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "da962997-a8bd-4dff-9616-01cdc199283f",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "da962997-a8bd-4dff-9616-01cdc199283f",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "80.00",
- "Attributes": [
- {
- "Value": "da962997-a8bd-4dff-9616-01cdc199283f",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Sales (400)",
- "Attributes": [
- {
- "Value": "02439bca-5fdc-4b62-b281-0bdf9f16fd5b",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "02439bca-5fdc-4b62-b281-0bdf9f16fd5b",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "200.00",
- "Attributes": [
- {
- "Value": "02439bca-5fdc-4b62-b281-0bdf9f16fd5b",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "02439bca-5fdc-4b62-b281-0bdf9f16fd5b",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "1020.22",
- "Attributes": [
- {
- "Value": "02439bca-5fdc-4b62-b281-0bdf9f16fd5b",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Sales-35325 (1302)",
- "Attributes": [
- {
- "Value": "3f50db14-1fe6-450b-bfe8-b2d894f18c62",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "3f50db14-1fe6-450b-bfe8-b2d894f18c62",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "1000.00",
- "Attributes": [
- {
- "Value": "3f50db14-1fe6-450b-bfe8-b2d894f18c62",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "3f50db14-1fe6-450b-bfe8-b2d894f18c62",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "1000.00",
- "Attributes": [
- {
- "Value": "3f50db14-1fe6-450b-bfe8-b2d894f18c62",
- "Id": "account"
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Expenses",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Foobar14043 (123)",
- "Attributes": [
- {
- "Value": "d1602f69-f900-4616-8d34-90af393fa368",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "d1602f69-f900-4616-8d34-90af393fa368",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "d1602f69-f900-4616-8d34-90af393fa368",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "40.00",
- "Attributes": [
- {
- "Value": "d1602f69-f900-4616-8d34-90af393fa368",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "d1602f69-f900-4616-8d34-90af393fa368",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "MyExp51937 (1231239)",
- "Attributes": [
- {
- "Value": "90f10e0a-a043-46fe-b87e-630e9a951dae",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "90f10e0a-a043-46fe-b87e-630e9a951dae",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "90f10e0a-a043-46fe-b87e-630e9a951dae",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "80.00",
- "Attributes": [
- {
- "Value": "90f10e0a-a043-46fe-b87e-630e9a951dae",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "90f10e0a-a043-46fe-b87e-630e9a951dae",
- "Id": "account"
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Assets",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Accounts Receivable (120)",
- "Attributes": [
- {
- "Value": "31ae5bb4-611c-4f89-a369-86e4d56e90b6",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "1190.00",
- "Attributes": [
- {
- "Value": "31ae5bb4-611c-4f89-a369-86e4d56e90b6",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "31ae5bb4-611c-4f89-a369-86e4d56e90b6",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "36555.04",
- "Attributes": [
- {
- "Value": "31ae5bb4-611c-4f89-a369-86e4d56e90b6",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "31ae5bb4-611c-4f89-a369-86e4d56e90b6",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Business Wells Fargo (088)",
- "Attributes": [
- {
- "Value": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "7639.04",
- "Attributes": [
- {
- "Value": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "6f7594f2-f059-4d56-9e67-47ac9733bfe9",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Generic Cash Clearing (8003)",
- "Attributes": [
- {
- "Value": "f4be973a-25fc-48d0-a7df-7f719f239729",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "f4be973a-25fc-48d0-a7df-7f719f239729",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "f4be973a-25fc-48d0-a7df-7f719f239729",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "1443.00",
- "Attributes": [
- {
- "Value": "f4be973a-25fc-48d0-a7df-7f719f239729",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "f4be973a-25fc-48d0-a7df-7f719f239729",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Generic Credit Card Clearing (8002)",
- "Attributes": [
- {
- "Value": "a10867ac-0bc4-4aa5-af00-b9e5b207c6c3",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "a10867ac-0bc4-4aa5-af00-b9e5b207c6c3",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "a10867ac-0bc4-4aa5-af00-b9e5b207c6c3",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "a10867ac-0bc4-4aa5-af00-b9e5b207c6c3",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "96.49",
- "Attributes": [
- {
- "Value": "a10867ac-0bc4-4aa5-af00-b9e5b207c6c3",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Generic Inventory (1400)",
- "Attributes": [
- {
- "Value": "7422f1b6-619f-488c-89e1-91bdde20216c",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "7422f1b6-619f-488c-89e1-91bdde20216c",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "7422f1b6-619f-488c-89e1-91bdde20216c",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "7422f1b6-619f-488c-89e1-91bdde20216c",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "160.00",
- "Attributes": [
- {
- "Value": "7422f1b6-619f-488c-89e1-91bdde20216c",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "My Savings (090)",
- "Attributes": [
- {
- "Value": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "219.92",
- "Attributes": [
- {
- "Value": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Payment Wall Clearing Account (8001)",
- "Attributes": [
- {
- "Value": "bc06840c-12c5-4e22-bb57-fef4d64bac10",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "bc06840c-12c5-4e22-bb57-fef4d64bac10",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "bc06840c-12c5-4e22-bb57-fef4d64bac10",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "1.00",
- "Attributes": [
- {
- "Value": "bc06840c-12c5-4e22-bb57-fef4d64bac10",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "bc06840c-12c5-4e22-bb57-fef4d64bac10",
- "Id": "account"
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Liabilities",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Accounts Payable (200)",
- "Attributes": [
- {
- "Value": "e9132ee7-4dcf-4fad-b76c-86e212af645a",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "e9132ee7-4dcf-4fad-b76c-86e212af645a",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "e9132ee7-4dcf-4fad-b76c-86e212af645a",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "e9132ee7-4dcf-4fad-b76c-86e212af645a",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "9223.00",
- "Attributes": [
- {
- "Value": "e9132ee7-4dcf-4fad-b76c-86e212af645a",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Deferred Revenue (2300)",
- "Attributes": [
- {
- "Value": "f22cd74e-f59d-4f38-a08d-07e14df28c24",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "f22cd74e-f59d-4f38-a08d-07e14df28c24",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "f22cd74e-f59d-4f38-a08d-07e14df28c24",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "f22cd74e-f59d-4f38-a08d-07e14df28c24",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "1854.24",
- "Attributes": [
- {
- "Value": "f22cd74e-f59d-4f38-a08d-07e14df28c24",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Rounding (260)",
- "Attributes": [
- {
- "Value": "f0072999-8f7c-4b01-bce9-bd9352f98e02",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "f0072999-8f7c-4b01-bce9-bd9352f98e02",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "f0072999-8f7c-4b01-bce9-bd9352f98e02",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "f0072999-8f7c-4b01-bce9-bd9352f98e02",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.01",
- "Attributes": [
- {
- "Value": "f0072999-8f7c-4b01-bce9-bd9352f98e02",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Sales Tax (220)",
- "Attributes": [
- {
- "Value": "af0be362-45fe-4730-a8af-634c2fb93f4d",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "af0be362-45fe-4730-a8af-634c2fb93f4d",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "af0be362-45fe-4730-a8af-634c2fb93f4d",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "af0be362-45fe-4730-a8af-634c2fb93f4d",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "1578.35",
- "Attributes": [
- {
- "Value": "af0be362-45fe-4730-a8af-634c2fb93f4d",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Suspense (250)",
- "Attributes": [
- {
- "Value": "5ec2f302-cd60-4f8b-a915-9229dd45e6fa",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "10.00",
- "Attributes": [
- {
- "Value": "5ec2f302-cd60-4f8b-a915-9229dd45e6fa",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "5ec2f302-cd60-4f8b-a915-9229dd45e6fa",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "41.00",
- "Attributes": [
- {
- "Value": "5ec2f302-cd60-4f8b-a915-9229dd45e6fa",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "5ec2f302-cd60-4f8b-a915-9229dd45e6fa",
- "Id": "account"
- }
- ]
- }
- ]
- },
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Unpaid Expense Claims (210)",
- "Attributes": [
- {
- "Value": "38e6967d-4da1-4a93-85f1-ea3c93b61041",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "38e6967d-4da1-4a93-85f1-ea3c93b61041",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "38e6967d-4da1-4a93-85f1-ea3c93b61041",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "38e6967d-4da1-4a93-85f1-ea3c93b61041",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "135.00",
- "Attributes": [
- {
- "Value": "38e6967d-4da1-4a93-85f1-ea3c93b61041",
- "Id": "account"
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "Equity",
- "Rows": [
- {
- "RowType": "Row",
- "Cells": [
- {
- "Value": "Retained Earnings (320)",
- "Attributes": [
- {
- "Value": "6ef53919-b47d-4341-b11a-735a3f8a6515",
- "Id": "account"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "6ef53919-b47d-4341-b11a-735a3f8a6515",
- "Id": "account"
- },
- {
- "Value": "",
- "Id": "fromDate"
- },
- {
- "Value": "12/31/2018",
- "Id": "toDate"
- }
- ]
- },
- {
- "Value": "0.00",
- "Attributes": [
- {
- "Value": "6ef53919-b47d-4341-b11a-735a3f8a6515",
- "Id": "account"
- },
- {
- "Value": "",
- "Id": "fromDate"
- },
- {
- "Value": "12/31/2018",
- "Id": "toDate"
- }
- ]
- },
- {
- "Value": "",
- "Attributes": [
- {
- "Value": "6ef53919-b47d-4341-b11a-735a3f8a6515",
- "Id": "account"
- },
- {
- "Value": "",
- "Id": "fromDate"
- },
- {
- "Value": "12/31/2018",
- "Id": "toDate"
- }
- ]
- },
- {
- "Value": "30871.69",
- "Attributes": [
- {
- "Value": "6ef53919-b47d-4341-b11a-735a3f8a6515",
- "Id": "account"
- },
- {
- "Value": "",
- "Id": "fromDate"
- },
- {
- "Value": "12/31/2018",
- "Id": "toDate"
- }
- ]
- }
- ]
- }
- ]
- },
- {
- "RowType": "Section",
- "Title": "",
- "Rows": [
- {
- "RowType": "SummaryRow",
- "Cells": [
- {
- "Value": "Total"
- },
- {
- "Value": "1200.00"
- },
- {
- "Value": "1200.00"
- },
- {
- "Value": "46019.00"
- },
- {
- "Value": "46019.00"
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- /Setup:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- post:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: postSetup
- summary: Sets the chart of accounts, the conversion date and conversion balances
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- x-example:
- - account:
- is_object: true
- key: account
- keyPascal: Account
- - code:
- key: code
- keyPascal: Code
- default: 123
- object: account
- - name:
- key: name
- keyPascal: Name
- default: Business supplies
- object: account
- - type:
- is_last: true
- key: type
- keyPascal: Type
- default: EXPENSE
- nonString: true
- php: XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE
- node: AccountType.EXPENSE
- ruby: XeroRuby::Accounting::AccountType::EXPENSE
- python: AccountType.EXPENSE
- java: com.xero.models.accounting.AccountType.EXPENSE
- csharp: AccountType.EXPENSE
- object: account
- - accounts:
- is_list: true
- key: accounts
- keyPascal: Account
- - add_accounts:
- is_last: true
- is_list_add: true
- key: accounts
- keyPascal: Accounts
- object: account
- - conversionDate:
- is_object: true
- key: conversionDate
- keyPascal: ConversionDate
- keySnake: conversion_date
- - month:
- nonString: true
- key: month
- keyPascal: Month
- default: 10
- object: conversionDate
- - year:
- is_last: true
- nonString: true
- key: year
- keyPascal: Year
- default: 2020
- object: conversionDate
- - conversionBalances:
- is_list: true
- key: conversionBalances
- keyPascal: ConversionBalances
- keySnake: conversion_balances
- - Setup:
- is_object: true
- key: setup
- keyPascal: Setup
- - set_accounts:
- is_variable: true
- nonString: true
- key: accounts
- keyPascal: Accounts
- default: accounts
- object: setup
- - set_conversionDate:
- is_variable: true
- nonString: true
- key: conversionDate
- keyPascal: ConversionDate
- keySnake: conversion_date
- default: conversionDate
- python: conversion_date
- ruby: conversion_date
- object: setup
- - set_conversionBalances:
- is_last: true
- is_variable: true
- nonString: true
- key: conversionBalances
- keyPascal: ConversionBalances
- keySnake: conversion_balances
- default: conversionBalances
- python: conversion_balances
- ruby: conversion_balances
- object: setup
- responses:
- '200':
- description: Success - returns a summary of the chart of accounts updates
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ImportSummaryObject'
- example: {
- "Id": "80dcb65b-4d14-4350-84e6-1438a809244a",
- "Status": "OK",
- "ProviderName": "Java Public Example",
- "DateTimeUTC": "/Date(1604457589645)/",
- "ImportSummary": {
- "Accounts": {
- "Total": 17,
- "New": 0,
- "Updated": 8,
- "Deleted": 0,
- "Locked": 0,
- "System": 9,
- "Errored": 0,
- "Present": true,
- "NewOrUpdated": 8
- },
- "Organisation": {
- "Present": false
- }
- }
- }
- requestBody:
- required: true
- description: Object including an accounts array, a conversion balances array and a conversion date object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Setup'
- example: {
- "ConversionDate": {},
- "ConversionBalances": [],
- "Accounts": [
- {
- "Code": "200",
- "Name": "Sales",
- "Type": "SALES",
- "ReportingCode": "REV.TRA.GOO"
- },
- {
- "Code": "400",
- "Name": "Advertising",
- "Type": "OVERHEADS",
- "ReportingCode": "EXP"
- },
- {
- "Code": "610",
- "Name": "Accounts Receivable",
- "Type": "CURRENT",
- "SystemAccount": "DEBTORS",
- "ReportingCode": "ASS.CUR.REC.TRA"
- },
- {
- "Code": "800",
- "Name": "Accounts Payable",
- "Type": "CURRLIAB",
- "SystemAccount": "CREDITORS",
- "ReportingCode": "LIA.CUR.PAY"
- }
- ]
- }
- /TaxRates:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getTaxRates
- summary: Retrieves tax rates
- parameters:
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="ACTIVE"
- x-example-csharp: Status==\"ACTIVE\"
- x-example-java: Status=="' + TaxRate.StatusEnum.ACTIVE + '"
- x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\TaxRate::STATUS_ACTIVE . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::TaxRate::ACTIVE}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Name ASC"
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of type TaxRates array with TaxRates
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TaxRates'
- example: {
- "Id": "455d494d-9706-465b-b584-7086ca406b27",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1555086839841)/",
- "TaxRates": [
- {
- "Name": "15% GST on Expenses",
- "TaxType": "INPUT2",
- "ReportTaxType": "INPUT",
- "CanApplyToAssets": true,
- "CanApplyToEquity": true,
- "CanApplyToExpenses": true,
- "CanApplyToLiabilities": true,
- "CanApplyToRevenue": false,
- "DisplayTaxRate": 15.0000,
- "EffectiveRate": 15.0000,
- "Status": "ACTIVE",
- "TaxComponents": [
- {
- "Name": "GST",
- "Rate": 15.0000,
- "IsCompound": false,
- "IsNonRecoverable": false
- }
- ]
- },
- {
- "Name": "15% GST on Income",
- "TaxType": "OUTPUT2",
- "ReportTaxType": "OUTPUT",
- "CanApplyToAssets": true,
- "CanApplyToEquity": true,
- "CanApplyToExpenses": false,
- "CanApplyToLiabilities": true,
- "CanApplyToRevenue": true,
- "DisplayTaxRate": 15.0000,
- "EffectiveRate": 15.0000,
- "Status": "ACTIVE",
- "TaxComponents": [
- {
- "Name": "GST",
- "Rate": 15.0000,
- "IsCompound": false,
- "IsNonRecoverable": false
- }
- ]
- },
- {
- "Name": "GST on Imports",
- "TaxType": "GSTONIMPORTS",
- "ReportTaxType": "GSTONIMPORTS",
- "CanApplyToAssets": false,
- "CanApplyToEquity": false,
- "CanApplyToExpenses": false,
- "CanApplyToLiabilities": true,
- "CanApplyToRevenue": false,
- "DisplayTaxRate": 0.0000,
- "EffectiveRate": 0.0000,
- "Status": "ACTIVE",
- "TaxComponents": [
- {
- "Name": "GST",
- "Rate": 0.0000,
- "IsCompound": false,
- "IsNonRecoverable": false
- }
- ]
- },
- {
- "Name": "No GST",
- "TaxType": "NONE",
- "ReportTaxType": "NONE",
- "CanApplyToAssets": true,
- "CanApplyToEquity": true,
- "CanApplyToExpenses": true,
- "CanApplyToLiabilities": true,
- "CanApplyToRevenue": true,
- "DisplayTaxRate": 0.0000,
- "EffectiveRate": 0.0000,
- "Status": "ACTIVE",
- "TaxComponents": [
- {
- "Name": "GST",
- "Rate": 0.0000,
- "IsCompound": false,
- "IsNonRecoverable": false
- }
- ]
- },
- {
- "Name": "Zero Rated",
- "TaxType": "ZERORATED",
- "ReportTaxType": "OUTPUT",
- "CanApplyToAssets": false,
- "CanApplyToEquity": false,
- "CanApplyToExpenses": false,
- "CanApplyToLiabilities": true,
- "CanApplyToRevenue": true,
- "DisplayTaxRate": 0.0000,
- "EffectiveRate": 0.0000,
- "Status": "ACTIVE",
- "TaxComponents": [
- {
- "Name": "GST",
- "Rate": 0.0000,
- "IsCompound": false,
- "IsNonRecoverable": false
- }
- ]
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: createTaxRates
- summary: Creates one or more tax rates
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- x-hasAccountingValidationError: true
- x-example:
- - taxComponent:
- is_object: true
- key: taxComponent
- keyPascal: TaxComponent
- keySnake: tax_component
- - name:
- key: name
- keyPascal: Name
- default: State Tax
- object: taxComponent
- - rate:
- is_last: true
- nonString: true
- key: rate
- keyPascal: Rate
- default: 2.25
- is_money: true
- object: taxComponent
- - taxComponents:
- is_list: true
- key: taxComponent
- keyPascal: TaxComponent
- csharp: TaxComponent
- - add_taxComponent:
- is_last: true
- is_list_add: true
- key: taxComponents
- keyPascal: TaxComponents
- keySnake: tax_components
- java: TaxComponents
- python: tax_component
- ruby: tax_component
- csharp: TaxComponent
- object: taxComponent
- - taxRate:
- is_object: true
- key: taxRate
- keyPascal: TaxRate
- keySnake: tax_rate
- - name:
- key: name
- keyPascal: Name
- default: CA State Tax
- object: taxRate
- - set_taxComponents:
- is_variable: true
- nonString: true
- key: taxComponents
- keyPascal: TaxComponents
- object: taxRate
- default: taxComponents
- - taxRates:
- is_object: true
- key: taxRates
- keyPascal: TaxRates
- - add_taxRate:
- is_last: true
- is_array_add: true
- key: taxRates
- keyPascal: TaxRates
- keySnake: tax_rates
- java: TaxRates
- python: tax_rate
- ruby: tax_rate
- csharp: TaxRate
- object: taxRate
- responses:
- '200':
- description: Success - return response of type TaxRates array newly created TaxRate
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TaxRates'
- example: {
- "Id": "9d2c5e56-fab4-450b-a5ff-d47409508eab",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1555086839080)/",
- "TaxRates": [
- {
- "Name": "SDKTax29067",
- "TaxType": "TAX002",
- "ReportTaxType": "INPUT",
- "CanApplyToAssets": true,
- "CanApplyToEquity": true,
- "CanApplyToExpenses": true,
- "CanApplyToLiabilities": true,
- "CanApplyToRevenue": false,
- "DisplayTaxRate": 2.2500,
- "EffectiveRate": 2.2500,
- "Status": "ACTIVE",
- "TaxComponents": [
- {
- "Name": "State Tax",
- "Rate": 2.2500,
- "IsCompound": false,
- "IsNonRecoverable": false
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: TaxRates array with TaxRate object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TaxRates'
- example: {
- "TaxRates": [
- {
- "Name": "CA State Tax",
- "TaxComponents": [
- {
- "Name": "State Tax",
- "Rate": 2.25
- }
- ]
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: updateTaxRate
- summary: Updates tax rates
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- x-hasAccountingValidationError: true
- x-example:
- - taxComponent:
- is_object: true
- key: taxComponent
- keyPascal: TaxComponent
- keySnake: tax_component
- - name:
- key: name
- keyPascal: Name
- default: State Tax
- object: taxComponent
- - rate:
- is_last: true
- nonString: true
- key: rate
- keyPascal: Rate
- default: 2.25
- is_money: true
- object: taxComponent
- - taxComponents:
- is_list: true
- key: taxComponents
- keyPascal: TaxComponents
- csharp: TaxComponent
- - add_taxComponent:
- is_last: true
- is_list_add: true
- key: taxComponents
- keyPascal: TaxComponents
- keySnake: tax_components
- java: TaxComponents
- python: tax_component
- ruby: tax_component
- csharp: TaxComponent
- object: taxComponent
- - taxRate:
- is_object: true
- key: taxRate
- keyPascal: TaxRate
- keySnake: tax_rate
- - name:
- key: name
- keyPascal: Name
- default: CA State Tax
- object: taxRate
- - set_taxComponents:
- is_variable: true
- nonString: true
- key: taxComponents
- keyPascal: TaxComponents
- object: taxRate
- default: taxComponents
- - taxRates:
- is_object: true
- key: taxRates
- keyPascal: TaxRates
- - add_taxRate:
- is_last: true
- is_array_add: true
- key: taxRates
- keyPascal: TaxRates
- keySnake: tax_rates
- java: TaxRates
- python: tax_rate
- ruby: tax_rate
- csharp: TaxRate
- object: taxRate
- responses:
- '200':
- description: Success - return response of type TaxRates array updated TaxRate
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TaxRates'
- example: {
- "Id": "12f4c453-2e25-41aa-a52f-6faaf6c05832",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1555086839658)/",
- "TaxRates": [
- {
- "Name": "SDKTax29067",
- "TaxType": "TAX002",
- "ReportTaxType": "INPUT",
- "CanApplyToAssets": true,
- "CanApplyToEquity": true,
- "CanApplyToExpenses": true,
- "CanApplyToLiabilities": true,
- "CanApplyToRevenue": false,
- "DisplayTaxRate": 2.2500,
- "EffectiveRate": 2.2500,
- "Status": "DELETED",
- "TaxComponents": [
- {
- "Name": "State Tax",
- "Rate": 2.2500,
- "IsCompound": false,
- "IsNonRecoverable": false
- }
- ]
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TaxRates'
- example: {
- "TaxRates": [
- {
- "Name": "State Tax NY",
- "TaxComponents": [
- {
- "Name": "State Tax",
- "Rate": 2.25
- }
- ],
- "Status": "DELETED",
- "ReportTaxType": "INPUT"
- }
- ]
- }
- "/TaxRates/{TaxType}":
- parameters:
- - $ref: "#/components/parameters/requiredHeader"
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getTaxRateByTaxType
- summary: Retrieves a specific tax rate according to given TaxType code
- parameters:
- - $ref: "#/components/parameters/TaxType"
- responses:
- "200":
- description: Success - return response of type TaxRates array with one TaxRate
- content:
- application/json:
- schema:
- $ref: "#/components/schemas/TaxRates"
- example: {
- "Id": "455d494d-9706-465b-b584-7086ca406b27",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550797359081)/",
- "TaxRates": [
- {
- "Name": "15% GST on Expenses",
- "TaxType": "INPUT2",
- "ReportTaxType": "INPUT",
- "CanApplyToAssets": true,
- "CanApplyToEquity": true,
- "CanApplyToExpenses": true,
- "CanApplyToLiabilities": true,
- "CanApplyToRevenue": false,
- "DisplayTaxRate": 15.0000,
- "EffectiveRate": 15.0000,
- "Status": "ACTIVE",
- "TaxComponents": [
- {
- "Name": "GST",
- "Rate": 15.0000,
- "IsCompound": false,
- "IsNonRecoverable": false
- }
- ]
- }
- ]
- }
- /TrackingCategories:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getTrackingCategories
- summary: Retrieves tracking categories and options
- parameters:
- - in: query
- name: where
- description: Filter by an any element
- example: Status=="ACTIVE"
- x-example-csharp: Status==\"ACTIVE\"
- x-example-java: Status=="' + TrackingCategory.StatusEnum.ACTIVE + '"
- x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\TrackingCategory::STATUS_ACTIVE . '"
- x-example-ruby: Status==#{XeroRuby::Accounting::TrackingCategory::ACTIVE}
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "Name ASC"
- schema:
- type: string
- - in: query
- name: includeArchived
- x-snake: include_archived
- description: e.g. includeArchived=true - Categories and options with a status of ARCHIVED will be included in the response
- example: true
- x-example-python: "True"
- schema:
- type: boolean
- responses:
- '200':
- description: Success - return response of type TrackingCategories array of TrackingCategory
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TrackingCategories'
- example: {
- "Id": "cec55068-8061-48e5-ac83-c77e7c54cf3d",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1555085855047)/",
- "TrackingCategories": [
- {
- "Name": "BarFoo",
- "Status": "ACTIVE",
- "TrackingCategoryID": "22f10184-0deb-44ae-a312-b1f6ea70e51f",
- "Options": []
- },
- {
- "Name": "HelloWorld",
- "Status": "ACTIVE",
- "TrackingCategoryID": "0c9fce3e-a111-4d99-803a-62cf3f40e633",
- "Options": []
- }
- ]
- }
- put:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: createTrackingCategory
- summary: Create tracking categories
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- x-hasAccountingValidationError: true
- x-example:
- - trackingCategory:
- is_object: true
- key: trackingCategory
- keyPascal: TrackingCategory
- - name:
- is_last: true
- key: name
- keyPascal: Name
- default: Foobar
- object: trackingCategory
- responses:
- '200':
- description: Success - return response of type TrackingCategories array of newly created TrackingCategory
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TrackingCategories'
- example: {
- "Id": "1a9f8e03-9916-4a42-93a9-e8fa4902d49c",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1555085855988)/",
- "TrackingCategories": [
- {
- "Name": "FooBar",
- "Status": "ACTIVE",
- "TrackingCategoryID": "b1df776b-b093-4730-b6ea-590cca40e723",
- "Options": []
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: TrackingCategory object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TrackingCategory'
- example: { name: "FooBar" }
- '/TrackingCategories/{TrackingCategoryID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getTrackingCategory
- summary: Retrieves specific tracking categories and options using a unique tracking category Id
- parameters:
- - $ref: '#/components/parameters/TrackingCategoryID'
- responses:
- '200':
- description: Success - return response of type TrackingCategories array of specified TrackingCategory
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TrackingCategories'
- example: {
- "Id": "b75b8862-39c0-45a8-82b8-30ab4831996b",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1555085855442)/",
- "TrackingCategories": [
- {
- "Name": "Foo41157",
- "Status": "DELETED",
- "TrackingCategoryID": "22f10184-0deb-44ae-a312-b1f6ea70e51f",
- "Options": []
- }
- ]
- }
- post:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: updateTrackingCategory
- summary: Updates a specific tracking category
- x-hasAccountingValidationError: true
- x-example:
- - trackingCategory:
- is_object: true
- key: trackingCategory
- keyPascal: TrackingCategory
- - name:
- is_last: true
- key: name
- keyPascal: Name
- default: Foobar
- object: trackingCategory
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/TrackingCategoryID'
- responses:
- '200':
- description: Success - return response of type TrackingCategories array of updated TrackingCategory
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TrackingCategories'
- example: {
- "Id": "55438774-f87d-4731-b586-799cf0f914ed",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1555085856275)/",
- "TrackingCategories": [
- {
- "Name": "BarFoo",
- "Status": "ACTIVE",
- "TrackingCategoryID": "b1df776b-b093-4730-b6ea-590cca40e723",
- "Options": []
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TrackingCategory'
- example: { "Name": "Avengers" }
- delete:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: deleteTrackingCategory
- summary: Deletes a specific tracking category
- parameters:
- - $ref: '#/components/parameters/TrackingCategoryID'
- responses:
- '200':
- description: Success - return response of type TrackingCategories array of deleted TrackingCategory
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TrackingCategories'
- example: {
- "Id": "ca7f8145-c8a5-4366-a2fb-784edc0cfbb7",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1555086457922)/",
- "TrackingCategories": [
- {
- "Name": "Foo46189",
- "Status": "DELETED",
- "TrackingCategoryID": "0390bdfd-94f2-49d6-b7a0-4a38c46ebf03",
- "Options": []
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- '/TrackingCategories/{TrackingCategoryID}/Options':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- put:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: createTrackingOptions
- summary: Creates options for a specific tracking category
- x-hasAccountingValidationError: true
- x-example:
- - trackingOption:
- is_object: true
- key: trackingOption
- keyPascal: TrackingOption
- - name:
- is_last: true
- key: name
- keyPascal: Name
- default: Foobar
- object: trackingOption
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/TrackingCategoryID'
- responses:
- '200':
- description: Success - return response of type TrackingOptions array of options for a specified category
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TrackingOptions'
- example: {
- "Id": "923be702-d124-4f5c-a568-760906538d8e",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1555085857061)/",
- "Options": [
- {
- "TrackingOptionID": "34669548-b989-487a-979f-0787d04568a2",
- "Name": "Bar40423",
- "Status": "ACTIVE",
- "HasValidationErrors": false,
- "IsDeleted": false,
- "IsArchived": false,
- "IsActive": true
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- description: TrackingOption object in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TrackingOption'
- example: { name: " Bar" }
- '/TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- post:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: updateTrackingOptions
- summary: Updates a specific option for a specific tracking category
- x-hasAccountingValidationError: true
- x-example:
- - trackingOption:
- is_object: true
- key: trackingOption
- keyPascal: TrackingOption
- - name:
- is_last: true
- key: name
- keyPascal: Name
- default: Foobar
- object: trackingOption
- parameters:
- - $ref: '#/components/parameters/idempotencyKey'
- - $ref: '#/components/parameters/TrackingCategoryID'
- - $ref: '#/components/parameters/TrackingOptionID'
- responses:
- '200':
- description: Success - return response of type TrackingOptions array of options for a specified category
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TrackingOptions'
- example: {
- "Id": "923be702-d124-4f5c-a568-760906538d8e",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1555085857061)/",
- "Options": [
- {
- "TrackingOptionID": "34669548-b989-487a-979f-0787d04568a2",
- "Name": "Bar40423",
- "Status": "ACTIVE",
- "HasValidationErrors": false,
- "IsDeleted": false,
- "IsArchived": false,
- "IsActive": true
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TrackingOption'
- example: { name: "Vision" }
- delete:
- security:
- - OAuth2: [accounting.settings]
- tags:
- - Accounting
- operationId: deleteTrackingOptions
- summary: Deletes a specific option for a specific tracking category
- parameters:
- - $ref: '#/components/parameters/TrackingCategoryID'
- - $ref: '#/components/parameters/TrackingOptionID'
- responses:
- '200':
- description: Success - return response of type TrackingOptions array of remaining options for a specified category
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TrackingOptions'
- example: {
- "Id": "d985866e-0831-418f-a07c-4d843ff66d25",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1555085857338)/",
- "Options": [
- {
- "TrackingOptionID": "34669548-b989-487a-979f-0787d04568a2",
- "Name": "Bar40423",
- "Status": "DELETED",
- "HasValidationErrors": false,
- "IsDeleted": true,
- "IsArchived": false,
- "IsActive": false
- }
- ]
- }
- '400':
- $ref: '#/components/responses/400Error'
- /Users:
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getUsers
- summary: Retrieves users
- parameters:
- - $ref: '#/components/parameters/ifModifiedSince'
- - in: query
- name: where
- description: Filter by an any element
- example: IsSubscriber==true
- schema:
- type: string
- - in: query
- name: order
- description: Order by an any element
- example: "LastName ASC"
- schema:
- type: string
- responses:
- '200':
- description: Success - return response of type Users array of all User
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Users'
- example: {
- "Id": "17932a4e-4948-4d50-8672-4ef0e1dd90c5",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553880796393)/",
- "Users": [
- {
- "UserID": "3c37ef1d-cd49-4589-9787-3c418ed8b6ac",
- "EmailAddress": "test@email.com",
- "FirstName": "Test",
- "LastName": "Xero",
- "UpdatedDateUTC": "/Date(1508523261613+0000)/",
- "IsSubscriber": false,
- "OrganisationRole": "FINANCIALADVISER"
- },
- {
- "UserID": "d1164823-0ac1-41ad-987b-b4e30fe0b273",
- "EmailAddress": "api@xero.com",
- "FirstName": "API ",
- "LastName": "Team",
- "UpdatedDateUTC": "/Date(1511957179217+0000)/",
- "IsSubscriber": true,
- "OrganisationRole": "FINANCIALADVISER"
- }
- ]
- }
- '/Users/{UserID}':
- parameters:
- - $ref: '#/components/parameters/requiredHeader'
- get:
- security:
- - OAuth2: [accounting.settings, accounting.settings.read]
- tags:
- - Accounting
- operationId: getUser
- summary: Retrieves a specific user
- parameters:
- - $ref: '#/components/parameters/UserID'
- responses:
- '200':
- description: Success - return response of type Users array of specified User
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Users'
- example: {
- "Id": "51250ce8-1b35-4ba4-b404-dc94ff75bd87",
- "Status": "OK",
- "ProviderName": "Provider Name Example",
- "DateTimeUTC": "/Date(1553880796732)/",
- "Users": [
- {
- "UserID": "3c37ef1d-cd49-4589-9787-3c418ed8b6ac",
- "EmailAddress": "test@email.com",
- "FirstName": "Test",
- "LastName": "Xero",
- "UpdatedDateUTC": "/Date(1508523261613+0000)/",
- "IsSubscriber": false,
- "OrganisationRole": "FINANCIALADVISER"
- }
- ]
- }
-components:
- securitySchemes:
- OAuth2:
- type: oauth2
- description: For more information
- flows:
- authorizationCode:
- authorizationUrl: 'https://login.xero.com/identity/connect/authorize'
- tokenUrl: 'https://identity.xero.com/connect/token'
- scopes:
- email: Grant read-only access to your email
- openid: Grant read-only access to your open id
- profile: your profile information
- accounting.attachments: Grant read-write access to attachments
- accounting.attachments.read: Grant read-only access to attachments
- accounting.contacts: Grant read-write access to contacts and contact groups
- accounting.contacts.read: Grant read-only access to contacts and contact groups
- accounting.journals.read: Grant read-only access to journals
- accounting.reports.read: Grant read-only access to accounting reports
- accounting.reports.tenninetynine.read: Grant read-only access to 1099 reports
- accounting.settings: Grant read-write access to organisation and account settings
- accounting.settings.read: Grant read-only access to organisation and account settings
- accounting.transactions: Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
- accounting.transactions.read: Grant read-only access to invoices
- paymentservices: Grant read-write access to payment services
- requestBodies:
- historyRecords:
- required: true
- description: HistoryRecords containing an array of HistoryRecord objects in body of request
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HistoryRecords'
- example: {
- "HistoryRecords": [
- {
- "Details": "Hello World"
- }
- ]
- }
- parameters:
- requiredHeader:
- in: header
- name: xero-tenant-id
- x-snake: xero_tenant_id
- description: Xero identifier for Tenant
- example: YOUR_XERO_TENANT_ID
- schema:
- type: string
- required: true
- summarizeErrors:
- in: query
- name: summarizeErrors
- x-snake: summarize_errors
- description: If false return 200 OK and mix of successfully created objects and any with validation errors
- example: true
- x-example-python: "True"
- schema:
- type: boolean
- default: false
- unitdp:
- in: query
- name: unitdp
- description: e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- example: 4
- schema:
- type: integer
- ifModifiedSince:
- in: header
- name: If-Modified-Since
- x-snake: if_modified_since
- description: Only records created or modified since this timestamp will be returned
- example: "2020-02-06T12:17:43.202-08:00"
- schema:
- type: string
- format: date-time
- idempotencyKey:
- in: header
- name: Idempotency-Key
- x-snake: idempotency_key
- description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
- example: "KEY_VALUE"
- schema:
- type: string
- includeOnline:
- in: query
- name: IncludeOnline
- x-snake: include_online
- description: Allows an attachment to be seen by the end customer within their online invoice
- example: true
- x-example-python: "True"
- schema:
- type: boolean
- default: false
- summaryOnly:
- in: query
- name: summaryOnly
- x-snake: summary_only
- description: Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
- example: true
- x-example-python: "True"
- schema:
- type: boolean
- default: false
- searchTerm:
- in: query
- name: searchTerm
- x-snake: search_term
- description: Search parameter that performs a case-insensitive text search across the fields e.g. InvoiceNumber, Reference.
- example: "SearchTerm=REF12"
- x-example-python: "True"
- schema:
- type: string
- FromDate:
- in: query
- name: fromDate
- x-snake: from_date
- description: filter by the from date of the report e.g. 2021-02-01
- example: "2019-10-31"
- schema:
- type: string
- format: date
- ToDate:
- in: query
- name: toDate
- x-snake: to_date
- description: filter by the to date of the report e.g. 2021-02-28
- example: "2019-10-31"
- schema:
- type: string
- format: date
- pageSize:
- in: query
- name: pageSize
- description: Number of records to retrieve per page
- example: 100
- schema:
- type: integer
- AccountID:
- required: true
- in: path
- name: AccountID
- x-snake: account_id
- description: Unique identifier for Account object
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- AllocationID:
- required: true
- in: path
- name: AllocationID
- x-snake: allocation_id
- description: Unique identifier for Allocation object
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- AttachmentID:
- required: true
- in: path
- name: AttachmentID
- x-snake: attachment_id
- description: Unique identifier for Attachment object
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- ContentType:
- required: true
- in: header
- name: contentType
- x-snake: content_type
- description: The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
- example: image/jpg
- schema:
- type: string
- FileName:
- required: true
- in: path
- name: FileName
- x-snake: file_name
- description: Name of the attachment
- example: "xero-dev.jpg"
- schema:
- type: string
- BatchPaymentID:
- required: true
- in: path
- name: BatchPaymentID
- x-snake: batch_payment_id
- description: Unique identifier for BatchPayment
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- BankTransactionID:
- required: true
- in: path
- name: BankTransactionID
- x-snake: bank_transaction_id
- description: Xero generated unique identifier for a bank transaction
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- BankTransferID:
- required: true
- in: path
- name: BankTransferID
- x-snake: bank_transfer_id
- description: Xero generated unique identifier for a bank transfer
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- BrandingThemeID:
- required: true
- in: path
- name: BrandingThemeID
- x-snake: branding_theme_id
- description: Unique identifier for a Branding Theme
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- BudgetID:
- required: true
- in: path
- name: BudgetID
- x-snake: budget_id
- description: Unique identifier for Budgets
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- ContactID:
- required: true
- in: path
- name: ContactID
- x-snake: contact_id
- description: Unique identifier for a Contact
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- ContactGroupID:
- required: true
- in: path
- name: ContactGroupID
- x-snake: contact_group_id
- description: Unique identifier for a Contact Group
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- CreditNoteID:
- required: true
- in: path
- name: CreditNoteID
- x-snake: credit_note_id
- description: Unique identifier for a Credit Note
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- EmployeeID:
- required: true
- in: path
- name: EmployeeID
- x-snake: employee_id
- description: Unique identifier for a Employee
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- ExpenseClaimID:
- required: true
- in: path
- name: ExpenseClaimID
- x-snake: expense_claim_id
- description: Unique identifier for a ExpenseClaim
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- InvoiceID:
- required: true
- in: path
- name: InvoiceID
- x-snake: invoice_id
- description: Unique identifier for an Invoice
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- ItemID:
- required: true
- in: path
- name: ItemID
- x-snake: item_id
- description: Unique identifier for an Item
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- JournalID:
- required: true
- in: path
- name: JournalID
- x-snake: journal_id
- description: Unique identifier for a Journal
- example: "00000000-0000-0000-0000-000000000000"
- 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
- name: LinkedTransactionID
- x-snake: linked_transaction_id
- description: Unique identifier for a LinkedTransaction
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- ManualJournalID:
- required: true
- in: path
- name: ManualJournalID
- x-snake: manual_journal_id
- description: Unique identifier for a ManualJournal
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- OrganisationID:
- required: true
- in: path
- name: OrganisationID
- x-snake: organisation_id
- description: The unique Xero identifier for an organisation
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- OverpaymentID:
- required: true
- in: path
- name: OverpaymentID
- x-snake: overpayment_id
- description: Unique identifier for a Overpayment
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- PaymentID:
- required: true
- in: path
- name: PaymentID
- x-snake: payment_id
- description: Unique identifier for a Payment
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- PrepaymentID:
- required: true
- in: path
- name: PrepaymentID
- x-snake: prepayment_id
- description: Unique identifier for a PrePayment
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- PurchaseOrderID:
- required: true
- in: path
- name: PurchaseOrderID
- x-snake: purchase_order_id
- description: Unique identifier for an Purchase Order
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- QuoteID:
- required: true
- in: path
- name: QuoteID
- x-snake: quote_id
- description: Unique identifier for an Quote
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- ReceiptID:
- required: true
- in: path
- name: ReceiptID
- x-snake: receipt_id
- description: Unique identifier for a Receipt
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- RepeatingInvoiceID:
- required: true
- in: path
- name: RepeatingInvoiceID
- x-snake: repeating_invoice_id
- description: Unique identifier for a Repeating Invoice
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- TrackingCategoryID:
- required: true
- in: path
- name: TrackingCategoryID
- x-snake: tracking_category_id
- description: Unique identifier for a TrackingCategory
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- TrackingOptionID:
- required: true
- in: path
- name: TrackingOptionID
- x-snake: tracking_option_id
- description: Unique identifier for a Tracking Option
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- UserID:
- required: true
- in: path
- name: UserID
- x-snake: user_id
- description: Unique identifier for a User
- example: "00000000-0000-0000-0000-000000000000"
- schema:
- type: string
- format: uuid
- TaxType:
- required: true
- in: path
- name: TaxType
- description: A valid TaxType code
- example: "INPUT2"
- schema:
- type: string
- responses:
- 400Error:
- description: A failed request due to validation error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- HistoryRecordCreated:
- description: Success - return response of type HistoryRecords array of HistoryRecord objects
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HistoryRecords'
- example: {
- "Id": "d7525479-3392-44c0-bb37-ff4a0b5df5bd",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1550899400362)/",
- "HistoryRecords": [
- {
- "DateUTCString": "2019-02-23T05:23:20",
- "DateUTC": "/Date(1550899400362)/",
- "Details": "Hello World",
- "ValidationErrors": []
- }
- ]
- }
- HistoryRetrieved:
- description: Success - return response of HistoryRecords array of 0 to N HistoryRecord
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/HistoryRecords'
- example: {
- "Id": "cd54cc7b-b721-4207-b11d-7d13c7902f91",
- "Status": "OK",
- "ProviderName": "Xero API Partner",
- "DateTimeUTC": "/Date(1551311321819)/",
- "HistoryRecords": [
- {
- "Changes": "Attached a file",
- "DateUTCString": "2018-11-08T15:01:21",
- "DateUTC": "/Date(1541689281470+0000)/",
- "User": "System Generated",
- "Details": "Attached the file sample2.jpg through the Xero API using Xero API Partner"
- },
- {
- "Changes": "Credit Applied",
- "DateUTCString": "2016-10-17T20:46:01",
- "DateUTC": "/Date(1476737161173+0000)/",
- "User": "System Generated",
- "Details": "Bank transfer from Business Wells Fargo to My Savings on November 12, 2016 for 20.00."
- }
- ]
- }
- schemas:
- AddressForOrganisation:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/types'
- properties:
- AddressType:
- description: define the type of address
- type: string
- enum:
- - POBOX
- - STREET
- - DELIVERY
- AddressLine1:
- description: max length = 500
- maxLength: 500
- type: string
- AddressLine2:
- description: max length = 500
- maxLength: 500
- type: string
- AddressLine3:
- description: max length = 500
- maxLength: 500
- type: string
- AddressLine4:
- description: max length = 500
- maxLength: 500
- type: string
- City:
- description: max length = 255
- maxLength: 255
- type: string
- Region:
- description: max length = 255
- maxLength: 255
- type: string
- PostalCode:
- description: max length = 50
- maxLength: 50
- type: string
- Country:
- description: 'max length = 50, [A-Z], [a-z] only'
- maxLength: 50
- type: string
- AttentionTo:
- description: max length = 255
- maxLength: 255
- type: string
- type: object
- Address:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/types'
- properties:
- AddressType:
- description: define the type of address
- type: string
- enum:
- - POBOX
- - STREET
- AddressLine1:
- description: max length = 500
- maxLength: 500
- type: string
- AddressLine2:
- description: max length = 500
- maxLength: 500
- type: string
- AddressLine3:
- description: max length = 500
- maxLength: 500
- type: string
- AddressLine4:
- description: max length = 500
- maxLength: 500
- type: string
- City:
- description: max length = 255
- maxLength: 255
- type: string
- Region:
- description: max length = 255
- maxLength: 255
- type: string
- PostalCode:
- description: max length = 50
- maxLength: 50
- type: string
- Country:
- description: 'max length = 50, [A-Z], [a-z] only'
- maxLength: 50
- type: string
- AttentionTo:
- description: max length = 255
- maxLength: 255
- type: string
- type: object
- Phone:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/types'
- properties:
- PhoneType:
- type: string
- enum:
- - DEFAULT
- - DDI
- - MOBILE
- - FAX
- - OFFICE
- PhoneNumber:
- description: max length = 50
- maxLength: 50
- type: string
- PhoneAreaCode:
- description: max length = 10
- maxLength: 10
- type: string
- PhoneCountryCode:
- description: max length = 20
- maxLength: 20
- type: string
- type: object
- Accounts:
- type: object
- x-objectArrayKey: accounts
- properties:
- Accounts:
- type: array
- items:
- $ref: '#/components/schemas/Account'
- Account:
- type: object
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/accounts/'
- properties:
- Code:
- description:
- Customer defined alpha numeric account code e.g 200 or SALES (max
- length = 10)
- type: string
- example: 4400
- Name:
- description: Name of account (max length = 150)
- maxLength: 150
- type: string
- example: Food Sales
- AccountID:
- description: The Xero identifier for an account – specified as a string following the endpoint name e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9
- type: string
- format: uuid
- example: 00000000-0000-0000-0000-000000000000
- Type:
- $ref: '#/components/schemas/AccountType'
- type: string
- BankAccountNumber:
- description: For bank accounts only (Account Type BANK)
- type: string
- Status:
- description:
- Accounts with a status of ACTIVE can be updated to ARCHIVED. See
- Account Status Codes
- type: string
- enum:
- - ACTIVE
- - ARCHIVED
- - DELETED
- Description:
- description: Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000)
- type: string
- BankAccountType:
- description: For bank accounts only. See Bank Account types
- type: string
- enum:
- - BANK
- - CREDITCARD
- - PAYPAL
- - NONE
- - ''
- CurrencyCode:
- $ref: '#/components/schemas/CurrencyCode'
- type: string
- TaxType:
- description: The tax type from taxRates
- type: string
- EnablePaymentsToAccount:
- description: Boolean – describes whether account can have payments applied to it
- type: boolean
- ShowInExpenseClaims:
- description: Boolean – describes whether account code is available for use with
- expense claims
- type: boolean
- Class:
- description: See Account Class Types
- readOnly: true
- type: string
- enum:
- - ASSET
- - EQUITY
- - EXPENSE
- - LIABILITY
- - REVENUE
- SystemAccount:
- description:
- If this is a system account then this element is returned. See
- System Account types. Note that non-system accounts may have this
- element set as either “” or null.
- readOnly: true
- type: string
- enum:
- - DEBTORS
- - CREDITORS
- - BANKCURRENCYGAIN
- - GST
- - GSTONIMPORTS
- - HISTORICAL
- - REALISEDCURRENCYGAIN
- - RETAINEDEARNINGS
- - ROUNDING
- - TRACKINGTRANSFERS
- - UNPAIDEXPCLM
- - UNREALISEDCURRENCYGAIN
- - WAGEPAYABLES
- - CISASSETS
- - CISASSET
- - CISLABOUR
- - CISLABOUREXPENSE
- - CISLABOURINCOME
- - CISLIABILITY
- - CISMATERIALS
- - ''
- ReportingCode:
- description: Shown if set
- type: string
- ReportingCodeName:
- description: Shown if set
- readOnly: true
- type: string
- HasAttachments:
- description: boolean to indicate if an account has an attachment (read only)
- readOnly: true
- type: boolean
- default: "false"
- example: "false"
- UpdatedDateUTC:
- description: Last modified date UTC format
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- AddToWatchlist:
- description: Boolean – describes whether the account is shown in the watchlist widget on the dashboard
- type: boolean
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- AccountType:
- description: See Account Types
- type: string
- enum:
- - BANK
- - CURRENT
- - CURRLIAB
- - DEPRECIATN
- - DIRECTCOSTS
- - EQUITY
- - EXPENSE
- - FIXED
- - INVENTORY
- - LIABILITY
- - NONCURRENT
- - OTHERINCOME
- - OVERHEADS
- - PREPAYMENT
- - REVENUE
- - SALES
- - TERMLIAB
- - PAYG
- Attachments:
- type: object
- x-objectArrayKey: attachments
- properties:
- Attachments:
- type: array
- items:
- $ref: '#/components/schemas/Attachment'
- Attachment:
- type: object
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/attachments/'
- properties:
- AttachmentID:
- description: Unique ID for the file
- type: string
- format: uuid
- example: "00000000-0000-0000-0000-000000000000"
- FileName:
- description: Name of the file
- type: string
- example: xero-dev.jpg
- Url:
- description: URL to the file on xero.com
- type: string
- example: "https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg"
- MimeType:
- description: Type of file
- type: string
- example: "image/jpg"
- ContentLength:
- description: Length of the file content
- type: integer
- IncludeOnline:
- description: Include the file with the online invoice
- type: boolean
- BankTransactions:
- type: object
- x-objectArrayKey: bank_transactions
- properties:
- pagination:
- $ref: '#/components/schemas/Pagination'
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- BankTransactions:
- type: array
- items:
- $ref: '#/components/schemas/BankTransaction'
- BankTransaction:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/banktransactions/'
- properties:
- Type:
- description: See Bank Transaction Types
- type: string
- enum:
- - RECEIVE
- - RECEIVE-OVERPAYMENT
- - RECEIVE-PREPAYMENT
- - SPEND
- - SPEND-OVERPAYMENT
- - SPEND-PREPAYMENT
- - RECEIVE-TRANSFER
- - SPEND-TRANSFER
- Contact:
- $ref: '#/components/schemas/Contact'
- LineItems:
- description: See LineItems
- type: array
- items:
- $ref: '#/components/schemas/LineItem'
- BankAccount:
- $ref: '#/components/schemas/Account'
- IsReconciled:
- description: Boolean to show if transaction is reconciled
- type: boolean
- Date:
- description: Date of transaction – YYYY-MM-DD
- type: string
- x-is-msdate: true
- Reference:
- description:
- Reference for the transaction. Only supported for SPEND and RECEIVE
- transactions.
- type: string
- CurrencyCode:
- $ref: '#/components/schemas/CurrencyCode'
- type: string
- 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
- format: double
- x-is-money: true
- Url:
- description: URL link to a source document – shown as “Go to App Name”
- type: string
- Status:
- description: See Bank Transaction Status Codes
- type: string
- enum:
- - AUTHORISED
- - DELETED
- - VOIDED
- LineAmountTypes:
- $ref: '#/components/schemas/LineAmountTypes'
- type: string
- SubTotal:
- description: Total of bank transaction excluding taxes
- type: number
- format: double
- x-is-money: true
- TotalTax:
- description: Total tax on bank transaction
- type: number
- format: double
- x-is-money: true
- Total:
- description: Total of bank transaction tax inclusive
- type: number
- format: double
- x-is-money: true
- BankTransactionID:
- description: Xero generated unique identifier for bank transaction
- type: string
- format: uuid
- example: "00000000-0000-0000-0000-000000000000"
- PrepaymentID:
- description: Xero generated unique identifier for a Prepayment. This will be returned on BankTransactions with a Type of SPEND-PREPAYMENT or RECEIVE-PREPAYMENT
- readOnly: true
- type: string
- format: uuid
- example: "00000000-0000-0000-0000-000000000000"
- OverpaymentID:
- description: Xero generated unique identifier for an Overpayment. This will be returned on BankTransactions with a Type of SPEND-OVERPAYMENT or RECEIVE-OVERPAYMENT
- readOnly: true
- type: string
- format: uuid
- example: "00000000-0000-0000-0000-000000000000"
- UpdatedDateUTC:
- description: Last modified date UTC format
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- HasAttachments:
- description: Boolean to indicate if a bank transaction has an attachment
- readOnly: true
- type: boolean
- default: "false"
- example: "false"
- StatusAttributeString:
- description: A string to indicate if a invoice status
- type: string
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- required:
- - Type
- - LineItems
- - BankAccount
- type: object
- LineAmountTypes:
- description: Line amounts are exclusive of tax by default if you don’t specify this element. See Line Amount Types
- type: string
- enum:
- - Exclusive
- - Inclusive
- - NoTax
- LineItem:
- externalDocs:
- url: 'https://developer.xero.com/documentation/api/invoices#post'
- properties:
- LineItemID:
- description: LineItem unique ID
- type: string
- format: uuid
- example: "00000000-0000-0000-0000-000000000000"
- Description:
- description: Description needs to be at least 1 char long. A line item with just
- a description (i.e no unit amount or quantity) can be created by
- specifying just a element that contains at least 1
- character
- type: string
- Quantity:
- description: LineItem Quantity
- type: number
- format: double
- x-is-money: true
- UnitAmount:
- description: LineItem Unit Amount
- type: number
- format: double
- x-is-money: true
- ItemCode:
- description: See Items
- type: string
- AccountCode:
- description: See Accounts
- type: string
- AccountID:
- description: The associated account ID related to this line item
- type: string
- format: uuid
- example: "00000000-0000-0000-0000-000000000000"
- TaxType:
- description: The tax type from TaxRates
- type: string
- 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 is not correct.
- type: number
- format: double
- x-is-money: true
- Item:
- $ref: '#/components/schemas/LineItemItem'
- LineAmount:
- description: If you wish to omit either 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 either a DiscountRate or DiscountAmount has been used i.e. LineAmount = Quantity * Unit Amount * ((100 - DiscountRate)/100) or LineAmount = (Quantity * UnitAmount) - DiscountAmount
- type: number
- format: double
- x-is-money: true
- Tracking:
- description: Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 elements.
- type: array
- items:
- $ref: '#/components/schemas/LineItemTracking'
- DiscountRate:
- description: Percentage discount being applied to a line item (only supported on ACCREC invoices – ACC PAY invoices and credit notes in Xero do not
- support discounts
- type: number
- format: double
- x-is-money: true
- DiscountAmount:
- description: Discount amount being applied to a line item. Only supported on ACCREC invoices and quotes. ACCPAY invoices and credit notes in Xero do not support discounts.
- type: number
- format: double
- x-is-money: true
- RepeatingInvoiceID:
- description: The Xero identifier for a Repeating Invoice
- example: "00000000-0000-0000-0000-000000000000"
- type: string
- format: uuid
- Taxability:
- description: The type of taxability
- type: string
- enum:
- - TAXABLE
- - NON_TAXABLE
- - EXEMPT
- - PART_TAXABLE
- - NOT_APPLICABLE
- SalesTaxCodeId:
- description: The ID of the sales tax code
- type: number
- TaxBreakdown:
- description: An array of tax components defined for this line item
- type: array
- items:
- $ref: '#/components/schemas/TaxBreakdownComponent'
- type: object
- LineItemItem:
- properties:
- Code:
- description: User defined item code (max length = 30)
- maxLength: 30
- type: string
- Name:
- description: The name of the item (max length = 50)
- maxLength: 50
- type: string
- ItemID:
- description: The Xero identifier for an Item
- type: string
- format: uuid
- LineItemTracking:
- externalDocs:
- url: 'https://developer.xero.com/documentation/api/invoices#post'
- properties:
- TrackingCategoryID:
- description: The Xero identifier for a tracking category
- type: string
- format: uuid
- example: "00000000-0000-0000-0000-000000000000"
- TrackingOptionID:
- description: The Xero identifier for a tracking category option
- type: string
- format: uuid
- example: "00000000-0000-0000-0000-000000000000"
- Name:
- description: The name of the tracking category
- maxLength: 100
- type: string
- example: Region
- Option:
- description: See Tracking Options
- type: string
- example: North
- type: object
- BankTransfers:
- type: object
- x-objectArrayKey: bank_transfers
- properties:
- BankTransfers:
- type: array
- items:
- $ref: '#/components/schemas/BankTransfer'
- BankTransfer:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/bank-transfers/'
- properties:
- FromBankAccount:
- $ref: '#/components/schemas/Account'
- ToBankAccount:
- $ref: '#/components/schemas/Account'
- Amount:
- description: 'amount of the transaction'
- type: number
- format: double
- x-is-money: true
- Date:
- description: The date of the Transfer YYYY-MM-DD
- type: string
- x-is-msdate: true
- BankTransferID:
- description: The identifier of the Bank Transfer
- readOnly: true
- type: string
- format: uuid
- CurrencyRate:
- description: The currency rate
- readOnly: true
- type: number
- format: double
- x-is-money: true
- FromBankTransactionID:
- description: The Bank Transaction ID for the source account
- readOnly: true
- type: string
- format: uuid
- ToBankTransactionID:
- description: The Bank Transaction ID for the destination account
- readOnly: true
- type: string
- format: uuid
- FromIsReconciled:
- description: The Bank Transaction boolean to show if it is reconciled for the source account
- type: boolean
- default: "false"
- example: "false"
- ToIsReconciled:
- description: The Bank Transaction boolean to show if it is reconciled for the destination account
- type: boolean
- default: "false"
- example: "false"
- Reference:
- description: Reference for the transactions.
- type: string
- HasAttachments:
- description: Boolean to indicate if a Bank Transfer has an attachment
- readOnly: true
- type: boolean
- default: "false"
- example: "false"
- CreatedDateUTC:
- description: UTC timestamp of creation date of bank transfer
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- required:
- - FromBankAccount
- - ToBankAccount
- - Amount
- type: object
- BatchPayments:
- type: object
- x-objectArrayKey: batch_payments
- properties:
- BatchPayments:
- type: array
- items:
- $ref: '#/components/schemas/BatchPayment'
- BatchPayment:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/BatchPayments/'
- properties:
- Account:
- $ref: '#/components/schemas/Account'
- Reference:
- description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
- type: string
- maxLength: 255
- Particulars:
- description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
- type: string
- maxLength: 12
- Code:
- description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
- type: string
- maxLength: 12
- Details:
- description: (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18
- type: string
- Narrative:
- description: (UK Only) Only shows on the statement line in Xero. Max length =18
- type: string
- maxLength: 18
- BatchPaymentID:
- description: The Xero generated unique identifier for the bank transaction (read-only)
- readOnly: true
- type: string
- format: uuid
- DateString:
- description: Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
- type: string
- Date:
- description: Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
- type: string
- x-is-msdate: true
- 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
- format: double
- x-is-money: true
- Payments:
- description: An array of payments
- type: array
- items:
- $ref: '#/components/schemas/Payment'
- Type:
- description: PAYBATCH for bill payments or RECBATCH for sales invoice payments (read-only)
- readOnly: true
- type: string
- enum:
- - PAYBATCH
- - RECBATCH
- Status:
- description: AUTHORISED or DELETED (read-only). New batch payments will have a status of AUTHORISED. It is not possible to delete batch payments via the API.
- readOnly: true
- type: string
- enum:
- - AUTHORISED
- - DELETED
- TotalAmount:
- description: The total of the payments that make up the batch (read-only)
- type: number
- format: double
- x-is-money: true
- readOnly: true
- UpdatedDateUTC:
- description: UTC timestamp of last update to the payment
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- IsReconciled:
- description: Booelan that tells you if the batch payment has been reconciled (read-only)
- readOnly: true
- type: boolean
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- type: object
- BatchPaymentDetails:
- description: Bank details for use on a batch payment stored with each contact
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/Contact/'
- properties:
- BankAccountNumber:
- description: Bank account number for use with Batch Payments
- type: string
- example: 123-456-1111111
- BankAccountName:
- description: Name of bank for use with Batch Payments
- type: string
- example: "ACME Bank"
- Details:
- description: (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18
- type: string
- example: Hello World
- Code:
- description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
- type: string
- maxLength: 12
- example: "ABC"
- Reference:
- description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
- type: string
- maxLength: 12
- example: "Foobar"
- BatchPaymentDelete:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/accounting/batchpayments'
- properties:
- BatchPaymentID:
- description: The Xero generated unique identifier for the bank transaction (read-only)
- type: string
- format: uuid
- Status:
- description: The status of the batch payment.
- type: string
- default: "DELETED"
- required:
- - Status
- - BatchPaymentID
- type: object
- BatchPaymentDeleteByUrlParam:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/accounting/batchpayments'
- properties:
- Status:
- description: The status of the batch payment.
- type: string
- default: "DELETED"
- required:
- - Status
- type: object
- BrandingThemes:
- type: object
- x-objectArrayKey: branding_themes
- properties:
- BrandingThemes:
- type: array
- items:
- $ref: '#/components/schemas/BrandingTheme'
- BrandingTheme:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/branding-themes/'
- properties:
- BrandingThemeID:
- description: Xero identifier
- type: string
- format: uuid
- Name:
- description: Name of branding theme
- type: string
- LogoUrl:
- description: The location of the image file used as the logo on this branding theme
- type: string
- Type:
- description: Always INVOICE
- type: string
- enum:
- - INVOICE
- SortOrder:
- description: Integer – ranked order of branding theme. The default branding theme has a value of 0
- type: integer
- CreatedDateUTC:
- description: UTC timestamp of creation date of branding theme
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- type: object
- PaymentServices:
- type: object
- x-objectArrayKey: payment_services
- properties:
- PaymentServices:
- type: array
- items:
- $ref: '#/components/schemas/PaymentService'
- PaymentService:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/branding-themes/'
- properties:
- PaymentServiceID:
- description: Xero identifier
- type: string
- format: uuid
- PaymentServiceName:
- description: Name of payment service
- type: string
- PaymentServiceUrl:
- description: The custom payment URL
- type: string
- PayNowText:
- description: The text displayed on the Pay Now button in Xero Online Invoicing. If this is not set it will default to Pay by credit card
- type: string
- PaymentServiceType:
- description: This will always be CUSTOM for payment services created via the API.
- type: string
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Contacts:
- type: object
- x-objectArrayKey: contacts
- properties:
- pagination:
- $ref: '#/components/schemas/Pagination'
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Contacts:
- type: array
- items:
- $ref: '#/components/schemas/Contact'
- Contact:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/contacts/'
- properties:
- ContactID:
- description: Xero identifier
- type: string
- format: uuid
- MergedToContactID:
- description: ID for the destination of a merged contact.
- Only returned when using paging or when fetching a contact by ContactId or ContactNumber.
- type: string
- format: uuid
- ContactNumber:
- description: This can be updated via the API only i.e. This field is read only on the Xero contact screen, used to identify contacts in external
- systems (max length = 50). If the Contact Number is used, this is
- displayed as Contact Code in the Contacts UI in Xero.
- maxLength: 50
- type: string
- AccountNumber:
- description: A user defined account number. This can be updated via the API and
- the Xero UI (max length = 50)
- maxLength: 50
- type: string
- ContactStatus:
- description: Current status of a contact – see contact status types
- type: string
- enum:
- - ACTIVE
- - ARCHIVED
- - GDPRREQUEST
- Name:
- description: Full name of contact/organisation (max length = 255)
- maxLength: 255
- type: string
- FirstName:
- description: First name of contact person (max length = 255)
- maxLength: 255
- type: string
- LastName:
- description: Last name of contact person (max length = 255)
- maxLength: 255
- type: string
- CompanyNumber:
- description: Company registration number (max length = 50)
- maxLength: 50
- type: string
- EmailAddress:
- description: Email address of contact person (umlauts not supported) (max length = 255)
- maxLength: 255
- type: string
- ContactPersons:
- description: See contact persons
- type: array
- items:
- $ref: '#/components/schemas/ContactPerson'
- BankAccountDetails:
- description: Bank account number of contact
- type: string
- TaxNumber:
- description: Tax number of contact – this is also known as the ABN (Australia),
- GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and
- global) in the Xero UI depending on which regionalized version of
- Xero you are using (max length = 50)
- maxLength: 50
- type: string
- AccountsReceivableTaxType:
- description: The tax type from TaxRates
- type: string
- AccountsPayableTaxType:
- description: The tax type from TaxRates
- type: string
- Addresses:
- description: Store certain address types for a contact – see address types
- type: array
- items:
- $ref: '#/components/schemas/Address'
- Phones:
- description: Store certain phone types for a contact – see phone types
- type: array
- items:
- $ref: '#/components/schemas/Phone'
- IsSupplier:
- description: true or false – Boolean that describes if a contact that has any AP invoices entered against them. Cannot be set via PUT or POST – it is
- automatically set when an accounts payable invoice is generated
- against this contact.
- type: boolean
- IsCustomer:
- description: true or false – Boolean that describes if a contact has any AR
- invoices entered against them. Cannot be set via PUT or POST – it is
- automatically set when an accounts receivable invoice is generated
- against this contact.
- type: boolean
- SalesDefaultLineAmountType:
- description: The default sales line amount type for a contact.
- Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber.
- type: string
- enum:
- - INCLUSIVE
- - EXCLUSIVE
- - NONE
- PurchasesDefaultLineAmountType:
- description: The default purchases line amount type for a contact
- Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber.
- type: string
- enum:
- - INCLUSIVE
- - EXCLUSIVE
- - NONE
- DefaultCurrency:
- $ref: '#/components/schemas/CurrencyCode'
- type: string
- XeroNetworkKey:
- description: Store XeroNetworkKey for contacts.
- type: string
- SalesDefaultAccountCode:
- description: The default sales account code for contacts
- type: string
- PurchasesDefaultAccountCode:
- description: The default purchases account code for contacts
- type: string
- SalesTrackingCategories:
- description: The default sales tracking categories for contacts
- type: array
- items:
- $ref: '#/components/schemas/SalesTrackingCategory'
- PurchasesTrackingCategories:
- description: The default purchases tracking categories for contacts
- type: array
- items:
- $ref: '#/components/schemas/SalesTrackingCategory'
- TrackingCategoryName:
- description: The name of the Tracking Category assigned to the contact under
- SalesTrackingCategories and PurchasesTrackingCategories
- type: string
- TrackingCategoryOption:
- description: The name of the Tracking Option assigned to the contact under
- SalesTrackingCategories and PurchasesTrackingCategories
- type: string
- PaymentTerms:
- $ref: '#/components/schemas/PaymentTerm'
- UpdatedDateUTC:
- description: UTC timestamp of last update to contact
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- ContactGroups:
- description: Displays which contact groups a contact is included in
- type: array
- items:
- $ref: '#/components/schemas/ContactGroup'
- Website:
- description: Website address for contact (read only)
- readOnly: true
- type: string
- BrandingTheme:
- $ref: '#/components/schemas/BrandingTheme'
- BatchPayments:
- $ref: '#/components/schemas/BatchPaymentDetails'
- Discount:
- description: The default discount rate for the contact (read only)
- readOnly: true
- type: number
- format: double
- x-is-money: true
- Balances:
- $ref: '#/components/schemas/Balances'
- Attachments:
- description: Displays array of attachments from the API
- type: array
- items:
- $ref: '#/components/schemas/Attachment'
- HasAttachments:
- description: A boolean to indicate if a contact has an attachment
- type: boolean
- default: "false"
- example: "false"
- ValidationErrors:
- description: Displays validation errors returned from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- HasValidationErrors:
- description: A boolean to indicate if a contact has an validation errors
- type: boolean
- default: "false"
- example: "false"
- StatusAttributeString:
- description: Status of object
- type: string
- type: object
- Budgets:
- type: object
- x-objectArrayKey: budgets
- properties:
- Budgets:
- type: array
- items:
- $ref: '#/components/schemas/Budget'
- Budget:
- type: object
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/budgets/'
- properties:
- BudgetID:
- description: Xero identifier
- type: string
- format: uuid
- Type:
- description: Type of Budget. OVERALL or TRACKING
- type: string
- enum:
- - OVERALL
- - TRACKING
- Description:
- description: The Budget description
- maxLength: 255
- type: string
- UpdatedDateUTC:
- description: UTC timestamp of last update to budget
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- BudgetLines:
- type: array
- items:
- $ref: '#/components/schemas/BudgetLine'
- Tracking:
- type: array
- items:
- $ref: '#/components/schemas/TrackingCategory'
- BudgetLine:
- type: object
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/budgets/'
- properties:
- AccountID:
- description: See Accounts
- type: string
- format: uuid
- AccountCode:
- description: See Accounts
- type: string
- example: 090
- BudgetBalances:
- type: array
- items:
- $ref: '#/components/schemas/BudgetBalance'
- BudgetBalance:
- type: object
- properties:
- Period:
- description: Period the amount applies to (e.g. “2019-08”)
- type: string
- x-is-msdate: true
- Amount:
- description: LineItem Quantity
- type: number
- format: double
- x-is-money: true
- UnitAmount:
- description: Budgeted amount
- type: number
- format: double
- x-is-money: true
- Notes:
- description: Any footnotes associated with this balance
- maxLength: 255
- type: string
- Balances:
- type: object
- description: The raw AccountsReceivable(sales invoices) and
- AccountsPayable(bills) outstanding and overdue amounts, not
- converted to base currency (read only)
- properties:
- AccountsReceivable:
- $ref: '#/components/schemas/AccountsReceivable'
- AccountsPayable:
- $ref: '#/components/schemas/AccountsPayable'
- AccountsReceivable:
- type: object
- properties:
- Outstanding:
- type: number
- format: double
- x-is-money: true
- Overdue:
- type: number
- format: double
- x-is-money: true
- AccountsPayable:
- type: object
- properties:
- Outstanding:
- type: number
- format: double
- x-is-money: true
- Overdue:
- type: number
- format: double
- x-is-money: true
- CISSettings:
- type: object
- x-objectArrayKey: cis_settings
- properties:
- CISSettings:
- type: array
- items:
- $ref: '#/components/schemas/CISSetting'
- CISSetting:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/contacts/'
- properties:
- CISEnabled:
- description: Boolean that describes if the contact is a CIS Subcontractor
- type: boolean
- 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
- format: double
- readOnly: true
- x-is-money: true
- CISOrgSettings:
- type: object
- x-objectArrayKey: cis_settings
- properties:
- CISSettings:
- type: array
- items:
- $ref: '#/components/schemas/CISOrgSetting'
- CISOrgSetting:
- externalDocs:
- url: 'https://developer.xero.com/documentation/api/organisation'
- properties:
- CISContractorEnabled:
- description: true or false - Boolean that describes if the organisation is a CIS Contractor
- type: boolean
- CISSubContractorEnabled:
- description: true or false - Boolean that describes if the organisation is a CIS SubContractor
- type: boolean
- Rate:
- description: CIS Deduction rate for the organisation
- type: number
- format: double
- readOnly: true
- x-is-money: true
- ContactPerson:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/contacts/'
- properties:
- FirstName:
- description: First name of person
- type: string
- LastName:
- description: Last name of person
- type: string
- EmailAddress:
- description: Email address of person
- type: string
- IncludeInEmails:
- description: boolean to indicate whether contact should be included on emails
- with invoices etc.
- type: boolean
- type: object
- ContactGroups:
- type: object
-
- x-objectArrayKey: contact_groups
- properties:
- ContactGroups:
- type: array
- items:
- $ref: '#/components/schemas/ContactGroup'
- ContactGroup:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/contactgroups/'
- properties:
- Name:
- description: The Name of the contact group. Required when creating a new contact group
- type: string
- Status:
- description: The Status of a contact group. To delete a contact group update the status to DELETED. Only contact groups with a status of ACTIVE are
- returned on GETs.
- type: string
- enum:
- - ACTIVE
- - DELETED
- ContactGroupID:
- description: The Xero identifier for an contact group – specified as a string
- following the endpoint name. e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9
- type: string
- format: uuid
- Contacts:
- description: The ContactID and Name of Contacts in a contact group. Returned on
- GETs when the ContactGroupID is supplied in the URL.
- type: array
- items:
- $ref: '#/components/schemas/Contact'
- type: object
- RequestEmpty:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/invoice/'
- properties:
- Status:
- description: Need at least one field to create an empty JSON payload
- type: string
- type: object
- CreditNotes:
- type: object
- x-objectArrayKey: credit_notes
- properties:
- pagination:
- $ref: '#/components/schemas/Pagination'
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- CreditNotes:
- type: array
- items:
- $ref: '#/components/schemas/CreditNote'
- CreditNote:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/credit-notes/'
- properties:
- Type:
- description: See Credit Note Types
- type: string
- enum:
- - ACCPAYCREDIT
- - ACCRECCREDIT
- Contact:
- $ref: '#/components/schemas/Contact'
- Date:
- description: The date the credit note is issued YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on
- the timezone setting of the organisation
- type: string
- x-is-msdate: true
- DueDate:
- description: Date invoice is due – YYYY-MM-DD
- type: string
- x-is-msdate: true
- Status:
- description: See Credit Note Status Codes
- type: string
- enum:
- - DRAFT
- - SUBMITTED
- - DELETED
- - AUTHORISED
- - PAID
- - VOIDED
- LineAmountTypes:
- $ref: '#/components/schemas/LineAmountTypes'
- type: string
- LineItems:
- description: See Invoice Line Items
- type: array
- items:
- $ref: '#/components/schemas/LineItem'
- SubTotal:
- description: The subtotal of the credit note excluding taxes
- type: number
- format: double
- x-is-money: true
- TotalTax:
- description: The total tax on the credit note
- type: number
- format: double
- x-is-money: true
- Total:
- description: The total of the Credit Note(subtotal + total tax)
- type: number
- format: double
- x-is-money: true
- CISDeduction:
- description: CIS deduction for UK contractors
- readOnly: true
- type: number
- format: double
- x-is-money: true
- CISRate:
- description: CIS Deduction rate for the organisation
- type: number
- format: double
- readOnly: true
- x-is-money: true
- UpdatedDateUTC:
- description: UTC timestamp of last update to the credit note
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- CurrencyCode:
- description: The specified currency code
- $ref: '#/components/schemas/CurrencyCode'
- type: string
- FullyPaidOnDate:
- description: Date when credit note was fully paid(UTC format)
- type: string
- x-is-msdate: true
- CreditNoteID:
- description: Xero generated unique identifier
- type: string
- format: uuid
- CreditNoteNumber:
- description: ACCRECCREDIT – Unique alpha numeric code identifying credit note
- (when missing will auto-generate from your Organisation Invoice
- Settings)
- type: string
- Reference:
- description: ACCRECCREDIT only – additional reference number
- type: string
- SentToContact:
- description: Boolean to set whether the credit note in the Xero app should be marked
- as “sent”. This can be set only on credit notes that have been approved
- readOnly: true
- type: boolean
- CurrencyRate:
- description: The currency rate for a multicurrency invoice. If no rate is
- specified, the XE.com day rate is used
- type: number
- format: double
- x-is-money: true
- RemainingCredit:
- description: The remaining credit balance on the Credit Note
- type: number
- format: double
- x-is-money: true
- Allocations:
- description: See Allocations
- type: array
- items:
- $ref: '#/components/schemas/Allocation'
- AppliedAmount:
- description: The amount of applied to an invoice
- type: number
- format: double
- example: 2.00
- x-is-money: true
- Payments:
- description: See Payments
- type: array
- items:
- $ref: '#/components/schemas/Payment'
- BrandingThemeID:
- description: See BrandingThemes
- type: string
- format: uuid
- StatusAttributeString:
- description: A string to indicate if a invoice status
- type: string
- HasAttachments:
- description: boolean to indicate if a credit note has an attachment
- type: boolean
- default: "false"
- example: "false"
- HasErrors:
- description: A boolean to indicate if a credit note has an validation errors
- type: boolean
- default: "false"
- example: "false"
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- InvoiceAddresses:
- description: An array of addresses used to auto calculate sales tax
- type: array
- items:
- $ref: '#/components/schemas/InvoiceAddress'
- type: object
- Allocations:
- type: object
- x-objectArrayKey: allocations
- properties:
- Allocations:
- type: array
- items:
- $ref: '#/components/schemas/Allocation'
- Allocation:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/prepayments/'
- properties:
- AllocationID:
- description: Xero generated unique identifier
- type: string
- format: uuid
- Invoice:
- $ref: '#/components/schemas/Invoice'
- Overpayment:
- $ref: '#/components/schemas/Overpayment'
- Prepayment:
- $ref: '#/components/schemas/Prepayment'
- CreditNote:
- $ref: '#/components/schemas/CreditNote'
- Amount:
- description: the amount being applied to the invoice
- type: number
- format: double
- x-is-money: true
- Date:
- description: the date the allocation is applied YYYY-MM-DD.
- type: string
- x-is-msdate: true
- IsDeleted:
- description: A flag that returns true when the allocation is succesfully deleted
- type: boolean
- readOnly: true
- StatusAttributeString:
- description: A string to indicate if a invoice status
- type: string
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- required:
- - Amount
- - Invoice
- - Date
- type: object
- Currencies:
- type: object
- x-objectArrayKey: currencies
- properties:
- Currencies:
- type: array
- items:
- $ref: '#/components/schemas/Currency'
- Currency:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/currencies/'
- properties:
- Code:
- $ref: '#/components/schemas/CurrencyCode'
- type: string
- Description:
- description: Name of Currency
- type: string
- type: object
- CurrencyCode:
- description: 3 letter alpha code for the currency – see list of currency codes
- type: string
- x-enum-varnames:
- - AED
- - AFN
- - ALL
- - AMD
- - ANG
- - AOA
- - ARS
- - AUD
- - AWG
- - AZN
- - BAM
- - BBD
- - BDT
- - BGN
- - BHD
- - BIF
- - BMD
- - BND
- - BOB
- - BRL
- - BSD
- - BTN
- - BWP
- - BYN
- - BYR
- - BZD
- - CAD
- - CDF
- - CHF
- - CLF
- - CLP
- - CNY
- - COP
- - CRC
- - CUC
- - CUP
- - CVE
- - CZK
- - DJF
- - DKK
- - DOP
- - DZD
- - EEK
- - EGP
- - ERN
- - ETB
- - EUR
- - FJD
- - FKP
- - GBP
- - GEL
- - GHS
- - GIP
- - GMD
- - GNF
- - GTQ
- - GYD
- - HKD
- - HNL
- - HRK
- - HTG
- - HUF
- - IDR
- - ILS
- - INR
- - IQD
- - IRR
- - ISK
- - JMD
- - JOD
- - JPY
- - KES
- - KGS
- - KHR
- - KMF
- - KPW
- - KRW
- - KWD
- - KYD
- - KZT
- - LAK
- - LBP
- - LKR
- - LRD
- - LSL
- - LTL
- - LVL
- - LYD
- - MAD
- - MDL
- - MGA
- - MKD
- - MMK
- - MNT
- - MOP
- - MRO
- - MRU
- - MUR
- - MVR
- - MWK
- - MXN
- - MXV
- - MYR
- - MZN
- - NAD
- - NGN
- - NIO
- - NOK
- - NPR
- - NZD
- - OMR
- - PAB
- - PEN
- - PGK
- - PHP
- - PKR
- - PLN
- - PYG
- - QAR
- - RON
- - RSD
- - RUB
- - RWF
- - SAR
- - SBD
- - SCR
- - SDG
- - SEK
- - SGD
- - SHP
- - SKK
- - SLE
- - SLL
- - SOS
- - SRD
- - STN
- - STD
- - SVC
- - SYP
- - SZL
- - THB
- - TJS
- - TMT
- - TND
- - TOP
- - TRY_LIRA
- - TTD
- - TWD
- - TZS
- - UAH
- - UGX
- - USD
- - UYU
- - UZS
- - VEF
- - VES
- - VND
- - VUV
- - WST
- - XAF
- - XCD
- - XOF
- - XPF
- - YER
- - ZAR
- - ZMW
- - ZMK
- - ZWD
- - EMPTY_CURRENCY
- enum:
- - AED
- - AFN
- - ALL
- - AMD
- - ANG
- - AOA
- - ARS
- - AUD
- - AWG
- - AZN
- - BAM
- - BBD
- - BDT
- - BGN
- - BHD
- - BIF
- - BMD
- - BND
- - BOB
- - BRL
- - BSD
- - BTN
- - BWP
- - BYN
- - BYR
- - BZD
- - CAD
- - CDF
- - CHF
- - CLF
- - CLP
- - CNY
- - COP
- - CRC
- - CUC
- - CUP
- - CVE
- - CZK
- - DJF
- - DKK
- - DOP
- - DZD
- - EEK
- - EGP
- - ERN
- - ETB
- - EUR
- - FJD
- - FKP
- - GBP
- - GEL
- - GHS
- - GIP
- - GMD
- - GNF
- - GTQ
- - GYD
- - HKD
- - HNL
- - HRK
- - HTG
- - HUF
- - IDR
- - ILS
- - INR
- - IQD
- - IRR
- - ISK
- - JMD
- - JOD
- - JPY
- - KES
- - KGS
- - KHR
- - KMF
- - KPW
- - KRW
- - KWD
- - KYD
- - KZT
- - LAK
- - LBP
- - LKR
- - LRD
- - LSL
- - LTL
- - LVL
- - LYD
- - MAD
- - MDL
- - MGA
- - MKD
- - MMK
- - MNT
- - MOP
- - MRO
- - MRU
- - MUR
- - MVR
- - MWK
- - MXN
- - MXV
- - MYR
- - MZN
- - NAD
- - NGN
- - NIO
- - NOK
- - NPR
- - NZD
- - OMR
- - PAB
- - PEN
- - PGK
- - PHP
- - PKR
- - PLN
- - PYG
- - QAR
- - RON
- - RSD
- - RUB
- - RWF
- - SAR
- - SBD
- - SCR
- - SDG
- - SEK
- - SGD
- - SHP
- - SKK
- - SLE
- - SLL
- - SOS
- - SRD
- - STD
- - STN
- - SVC
- - SYP
- - SZL
- - THB
- - TJS
- - TMT
- - TND
- - TOP
- - TRY
- - TTD
- - TWD
- - TZS
- - UAH
- - UGX
- - USD
- - UYU
- - UZS
- - VEF
- - VES
- - VND
- - VUV
- - WST
- - XAF
- - XCD
- - XOF
- - XPF
- - YER
- - ZAR
- - ZMW
- - ZMK
- - ZWD
- Employees:
- type: object
- x-objectArrayKey: employees
- properties:
- Employees:
- type: array
- items:
- $ref: '#/components/schemas/Employee'
- Employee:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/employees/'
- properties:
- EmployeeID:
- description: The Xero identifier for an employee e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
- type: string
- format: uuid
- Status:
- description: Current status of an employee – see contact status types
- type: string
- enum:
- - ACTIVE
- - ARCHIVED
- - GDPRREQUEST
- - DELETED
- FirstName:
- description: First name of an employee (max length = 255)
- maxLength: 255
- type: string
- LastName:
- description: Last name of an employee (max length = 255)
- maxLength: 255
- type: string
- ExternalLink:
- $ref: '#/components/schemas/ExternalLink'
- UpdatedDateUTC:
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- StatusAttributeString:
- description: A string to indicate if a invoice status
- type: string
- example: ERROR
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- type: object
- ExpenseClaims:
- type: object
- x-objectArrayKey: expense_claims
- properties:
- ExpenseClaims:
- type: array
- items:
- $ref: '#/components/schemas/ExpenseClaim'
- ExpenseClaim:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/expense-claims/'
- properties:
- ExpenseClaimID:
- description: Xero generated unique identifier for an expense claim
- type: string
- format: uuid
- Status:
- description: Current status of an expense claim – see status types
- type: string
- enum:
- - SUBMITTED
- - AUTHORISED
- - PAID
- - VOIDED
- - DELETED
- Payments:
- description: See Payments
- type: array
- items:
- $ref: '#/components/schemas/Payment'
- User:
- $ref: '#/components/schemas/User'
- Receipts:
- type: array
- items:
- $ref: '#/components/schemas/Receipt'
- UpdatedDateUTC:
- description: Last modified date UTC format
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- Total:
- description: The total of an expense claim being paid
- readOnly: true
- type: number
- format: double
- x-is-money: true
- AmountDue:
- description: The amount due to be paid for an expense claim
- readOnly: true
- type: number
- format: double
- x-is-money: true
- AmountPaid:
- description: The amount still to pay for an expense claim
- readOnly: true
- type: number
- format: double
- x-is-money: true
- PaymentDueDate:
- description: The date when the expense claim is due to be paid YYYY-MM-DD
- readOnly: true
- type: string
- x-is-msdate: true
- ReportingDate:
- description: The date the expense claim will be reported in Xero YYYY-MM-DD
- readOnly: true
- type: string
- x-is-msdate: true
- ReceiptID:
- description: The Xero identifier for the Receipt e.g. e59a2c7f-1306-4078-a0f3-73537afcbba9
- type: string
- format: uuid
- type: object
- HistoryRecords:
- type: object
- x-objectArrayKey: history_records
- properties:
- HistoryRecords:
- type: array
- items:
- $ref: '#/components/schemas/HistoryRecord'
- HistoryRecord:
- externalDocs:
- url: 'https://developer.xero.com/documentation/api/history-and-notes'
- properties:
- Details:
- description: details
- type: string
- Changes:
- description: Name of branding theme
- type: string
- User:
- description: has a value of 0
- type: string
- DateUTC:
- description: UTC timestamp of creation date of branding theme
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- type: object
- Invoices:
- type: object
- x-objectArrayKey: invoices
- properties:
- pagination:
- $ref: '#/components/schemas/Pagination'
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Invoices:
- type: array
- items:
- $ref: '#/components/schemas/Invoice'
- Invoice:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/invoices/'
- properties:
- Type:
- description: See Invoice Types
- type: string
- enum:
- - ACCPAY
- - ACCPAYCREDIT
- - APOVERPAYMENT
- - APPREPAYMENT
- - ACCREC
- - ACCRECCREDIT
- - AROVERPAYMENT
- - ARPREPAYMENT
- Contact:
- $ref: '#/components/schemas/Contact'
- LineItems:
- description: See LineItems
- type: array
- items:
- $ref: '#/components/schemas/LineItem'
- Date:
- description: Date invoice was issued – YYYY-MM-DD. If the Date element is not
- specified it will default to the current date based on the timezone
- setting of the organisation
- type: string
- x-is-msdate: true
- DueDate:
- description: Date invoice is due – YYYY-MM-DD
- type: string
- x-is-msdate: true
- LineAmountTypes:
- $ref: '#/components/schemas/LineAmountTypes'
- type: string
- InvoiceNumber:
- description: ACCREC – Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max
- length = 255)
- maxLength: 255
- type: string
- Reference:
- description: ACCREC only – additional reference number
- type: string
- BrandingThemeID:
- description: See BrandingThemes
- type: string
- format: uuid
- Url:
- description: URL link to a source document – shown as “Go to [appName]” in the
- Xero app
- type: string
- CurrencyCode:
- $ref: '#/components/schemas/CurrencyCode'
- type: string
- CurrencyRate:
- description: The currency rate for a multicurrency invoice. If no rate is
- specified, the XE.com day rate is used. (max length = [18].[6])
- type: number
- format: double
- x-is-money: true
- Status:
- description: See Invoice Status Codes
- type: string
- enum:
- - DRAFT
- - SUBMITTED
- - DELETED
- - AUTHORISED
- - PAID
- - VOIDED
- SentToContact:
- description: Boolean to set whether the invoice in the Xero app should be marked as “sent”. This can be set only on invoices that have been approved
- type: boolean
- ExpectedPaymentDate:
- description: Shown on sales invoices (Accounts Receivable) when this has been set
- type: string
- x-is-msdate: true
- PlannedPaymentDate:
- description: Shown on bills (Accounts Payable) when this has been set
- type: string
- x-is-msdate: true
- CISDeduction:
- description: CIS deduction for UK contractors
- readOnly: true
- type: number
- format: double
- x-is-money: true
- CISRate:
- description: CIS Deduction rate for the organisation
- type: number
- format: double
- readOnly: true
- x-is-money: true
- SubTotal:
- description: Total of invoice excluding taxes
- readOnly: true
- type: number
- format: double
- x-is-money: true
- TotalTax:
- description: Total tax on invoice
- readOnly: true
- type: number
- format: double
- x-is-money: true
- Total:
- description: Total of Invoice tax inclusive (i.e. SubTotal + TotalTax). This will be ignored if it doesn’t equal the sum of the LineAmounts
- readOnly: true
- type: number
- format: double
- x-is-money: true
- TotalDiscount:
- description: Total of discounts applied on the invoice line items
- readOnly: true
- type: number
- format: double
- x-is-money: true
- InvoiceID:
- description: Xero generated unique identifier for invoice
- type: string
- format: uuid
- RepeatingInvoiceID:
- description: Xero generated unique identifier for repeating invoices
- type: string
- format: uuid
- HasAttachments:
- description: boolean to indicate if an invoice has an attachment
- readOnly: true
- type: boolean
- default: "false"
- example: "false"
- IsDiscounted:
- description: boolean to indicate if an invoice has a discount
- readOnly: true
- type: boolean
- Payments:
- description: See Payments
- readOnly: true
- type: array
- items:
- $ref: '#/components/schemas/Payment'
- Prepayments:
- description: See Prepayments
- readOnly: true
- type: array
- items:
- $ref: '#/components/schemas/Prepayment'
- Overpayments:
- description: See Overpayments
- readOnly: true
- type: array
- items:
- $ref: '#/components/schemas/Overpayment'
- AmountDue:
- description: Amount remaining to be paid on invoice
- readOnly: true
- type: number
- format: double
- x-is-money: true
- AmountPaid:
- description: Sum of payments received for invoice
- readOnly: true
- type: number
- format: double
- x-is-money: true
- FullyPaidOnDate:
- description: The date the invoice was fully paid. Only returned on fully paid invoices
- readOnly: true
- type: string
- x-is-msdate: true
- AmountCredited:
- description: Sum of all credit notes, over-payments and pre-payments applied to
- invoice
- readOnly: true
- type: number
- format: double
- x-is-money: true
- UpdatedDateUTC:
- description: Last modified date UTC format
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- CreditNotes:
- description: Details of credit notes that have been applied to an invoice
- readOnly: true
- type: array
- items:
- $ref: '#/components/schemas/CreditNote'
- Attachments:
- description: Displays array of attachments from the API
- type: array
- items:
- $ref: '#/components/schemas/Attachment'
- HasErrors:
- description: A boolean to indicate if a invoice has an validation errors
- type: boolean
- default: "false"
- example: "false"
- StatusAttributeString:
- description: A string to indicate if a invoice status
- type: string
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- InvoiceAddresses:
- description: An array of addresses used to auto calculate sales tax
- type: array
- items:
- $ref: '#/components/schemas/InvoiceAddress'
- type: object
- OnlineInvoices:
- type: object
- x-objectArrayKey: online_invoices
- properties:
- OnlineInvoices:
- type: array
- items:
- $ref: '#/components/schemas/OnlineInvoice'
- OnlineInvoice:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/invoices/'
- properties:
- OnlineInvoiceUrl:
- description: the URL to an online invoice
- type: string
- type: object
- InvoiceReminders:
- type: object
- x-objectArrayKey: invoice_reminders
- properties:
- InvoiceReminders:
- type: array
- items:
- $ref: '#/components/schemas/InvoiceReminder'
- InvoiceReminder:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/invoice-reminders/'
- properties:
- Enabled:
- description: setting for on or off
- type: boolean
- type: object
- Items:
- type: object
- x-objectArrayKey: items
- properties:
- Items:
- type: array
- items:
- $ref: '#/components/schemas/Item'
- Item:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/items/'
- properties:
- Code:
- description: User defined item code (max length = 30)
- maxLength: 30
- type: string
- InventoryAssetAccountCode:
- description: The inventory asset account for the item. The account must be of
- type INVENTORY. The COGSAccountCode in PurchaseDetails is also
- required to create a tracked item
- type: string
- Name:
- description: The name of the item (max length = 50)
- maxLength: 50
- type: string
- IsSold:
- description: Boolean value, defaults to true. When IsSold is true the item will
- be available on sales transactions in the Xero UI. If IsSold is
- updated to false then Description and SalesDetails values will be
- nulled.
- type: boolean
- IsPurchased:
- description: Boolean value, defaults to true. When IsPurchased is true the item
- is available for purchase transactions in the Xero UI. If
- IsPurchased is updated to false then PurchaseDescription and
- PurchaseDetails values will be nulled.
- type: boolean
- Description:
- description: The sales description of the item (max length = 4000)
- maxLength: 4000
- type: string
- PurchaseDescription:
- description: The purchase description of the item (max length = 4000)
- maxLength: 4000
- type: string
- PurchaseDetails:
- $ref: '#/components/schemas/Purchase'
- SalesDetails:
- $ref: '#/components/schemas/Purchase'
- IsTrackedAsInventory:
- description: True for items that are tracked as inventory. An item will be
- tracked as inventory if the InventoryAssetAccountCode and
- COGSAccountCode are set.
- type: boolean
- TotalCostPool:
- description: The value of the item on hand. Calculated using average cost
- accounting.
- type: number
- format: double
- x-is-money: true
- QuantityOnHand:
- description: The quantity of the item on hand
- type: number
- format: double
- x-is-money: true
- UpdatedDateUTC:
- description: Last modified date in UTC format
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- ItemID:
- description: The Xero identifier for an Item
- type: string
- format: uuid
- StatusAttributeString:
- description: Status of object
- type: string
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- required:
- - Code
- type: object
- Purchase:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/items/'
- 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
- format: double
- x-is-money: true
- AccountCode:
- description: Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items
- type: string
- COGSAccountCode:
- description: Cost of goods sold account. Only applicable to the purchase details of tracked items.
- type: string
- TaxType:
- description: The tax type from TaxRates
- type: string
- type: object
- Journals:
- type: object
- x-objectArrayKey: journals
- properties:
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Journals:
- type: array
- items:
- $ref: '#/components/schemas/Journal'
- Journal:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/journals/'
- properties:
- JournalID:
- description: Xero identifier
- type: string
- format: uuid
- JournalDate:
- description: Date the journal was posted
- type: string
- x-is-msdate: true
- JournalNumber:
- description: Xero generated journal number
- type: integer
- CreatedDateUTC:
- description: Created date UTC format
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- Reference:
- description: reference field for additional indetifying information
- type: string
- SourceID:
- description: The identifier for the source transaction (e.g. InvoiceID)
- type: string
- format: uuid
- SourceType:
- description: The journal source type. The type of transaction that created the
- journal
- type: string
- enum:
- - ACCREC
- - ACCPAY
- - ACCRECCREDIT
- - ACCPAYCREDIT
- - ACCRECPAYMENT
- - ACCPAYPAYMENT
- - ARCREDITPAYMENT
- - APCREDITPAYMENT
- - CASHREC
- - CASHPAID
- - TRANSFER
- - ARPREPAYMENT
- - APPREPAYMENT
- - AROVERPAYMENT
- - APOVERPAYMENT
- - EXPCLAIM
- - EXPPAYMENT
- - MANJOURNAL
- - PAYSLIP
- - WAGEPAYABLE
- - INTEGRATEDPAYROLLPE
- - INTEGRATEDPAYROLLPT
- - EXTERNALSPENDMONEY
- - INTEGRATEDPAYROLLPTPAYMENT
- - INTEGRATEDPAYROLLCN
- JournalLines:
- description: See JournalLines
- type: array
- items:
- $ref: '#/components/schemas/JournalLine'
- type: object
- JournalLine:
- externalDocs:
- url: 'https://developer.xero.com/documentation/api/journals#JournalLines'
- properties:
- JournalLineID:
- description: Xero identifier for Journal
- type: string
- format: uuid
- example: 7be9db36-3598-4755-ba5c-c2dbc8c4a7a2
- AccountID:
- description: See Accounts
- type: string
- format: uuid
- example: ceef66a5-a545-413b-9312-78a53caadbc4
- AccountCode:
- description: See Accounts
- type: string
- example: 090
- AccountType:
- $ref: '#/components/schemas/AccountType'
- type: string
- AccountName:
- description: See AccountCodes
- type: string
- example: Checking Account
- Description:
- description: The description from the source transaction line item. Only returned if populated.
- type: string
- example: My business checking account
- NetAmount:
- description: Net amount of journal line. This will be a positive value for a debit and negative for a credit
- type: number
- format: double
- x-is-money: true
- example: 4130.98
- GrossAmount:
- description: Gross amount of journal line (NetAmount + TaxAmount).
- type: number
- format: double
- x-is-money: true
- example: 4130.98
- TaxAmount:
- description: Total tax on a journal line
- type: number
- format: double
- x-is-money: true
- readOnly: true
- example: 0.00
- TaxType:
- description: The tax type from taxRates
- type: string
- TaxName:
- description: see TaxRates
- type: string
- example: Tax Exempt
- TrackingCategories:
- description: Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 elements.
- type: array
- items:
- $ref: '#/components/schemas/TrackingCategory'
- type: object
- LinkedTransactions:
- type: object
- x-objectArrayKey: linked_transactions
- properties:
- LinkedTransactions:
- type: array
- items:
- $ref: '#/components/schemas/LinkedTransaction'
- LinkedTransaction:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/linked-transactions/'
- properties:
- SourceTransactionID:
- description: Filter by the SourceTransactionID. Get all the linked transactions created from a particular ACCPAY invoice
- type: string
- format: uuid
- SourceLineItemID:
- description: The line item identifier from the source transaction.
- type: string
- format: uuid
- ContactID:
- description: Filter by the combination of ContactID and Status. Get all the
- linked transactions that have been assigned to a particular customer
- and have a particular status e.g. GET
- /LinkedTransactions?ContactID=4bb34b03-3378-4bb2-a0ed-6345abf3224e&Status=APPROVED.
- type: string
- format: uuid
- TargetTransactionID:
- description: Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice
- type: string
- format: uuid
- TargetLineItemID:
- description: The line item identifier from the target transaction. It is possible to link multiple billable expenses to the same TargetLineItemID.
- type: string
- format: uuid
- LinkedTransactionID:
- description: The Xero identifier for an Linked Transaction e.g./LinkedTransactions/297c2dc5-cc47-4afd-8ec8-74990b8761e9
- type: string
- format: uuid
- Status:
- description: Filter by the combination of ContactID and Status. Get all the
- linked transactions that have been assigned to a particular customer
- and have a particular status e.g. GET
- /LinkedTransactions?ContactID=4bb34b03-3378-4bb2-a0ed-6345abf3224e&Status=APPROVED.
- type: string
- enum:
- - APPROVED
- - DRAFT
- - ONDRAFT
- - BILLED
- - VOIDED
- Type:
- description: This will always be BILLABLEEXPENSE. More types may be added in
- future.
- type: string
- enum:
- - BILLABLEEXPENSE
- UpdatedDateUTC:
- description: The last modified date in UTC format
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- SourceTransactionTypeCode:
- description: The Type of the source tranasction. This will be ACCPAY if the
- linked transaction was created from an invoice and SPEND if it was
- created from a bank transaction.
- type: string
- enum:
- - ACCPAY
- - SPEND
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- type: object
- ManualJournals:
- type: object
- x-objectArrayKey: manual_journals
- properties:
- pagination:
- $ref: '#/components/schemas/Pagination'
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- ManualJournals:
- type: array
- items:
- $ref: '#/components/schemas/ManualJournal'
- ManualJournal:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/manual-journals/'
- properties:
- Narration:
- description: Description of journal being posted
- type: string
- JournalLines:
- description: See JournalLines
- type: array
- items:
- $ref: '#/components/schemas/ManualJournalLine'
- Date:
- description: Date journal was posted – YYYY-MM-DD
- type: string
- x-is-msdate: true
- LineAmountTypes:
- $ref: '#/components/schemas/LineAmountTypes'
- type: string
- Status:
- description: See Manual Journal Status Codes
- type: string
- enum:
- - DRAFT
- - POSTED
- - DELETED
- - VOIDED
- - ARCHIVED
- Url:
- description: Url link to a source document – shown as “Go to [appName]” in the
- Xero app
- type: string
- ShowOnCashBasisReports:
- description: Boolean – default is true if not specified
- type: boolean
- HasAttachments:
- description: Boolean to indicate if a manual journal has an attachment
- readOnly: true
- type: boolean
- default: "false"
- example: "false"
- UpdatedDateUTC:
- description: Last modified date UTC format
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- ManualJournalID:
- description: The Xero identifier for a Manual Journal
- type: string
- format: uuid
- StatusAttributeString:
- description: A string to indicate if a invoice status
- type: string
- example: ERROR
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Attachments:
- description: Displays array of attachments from the API
- type: array
- items:
- $ref: '#/components/schemas/Attachment'
- required:
- - Narration
- type: object
- ManualJournalLine:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/manual-journals/'
- properties:
- LineAmount:
- description: 'total for line. Debits are positive, credits are negative value'
- type: number
- format: double
- x-is-money: true
- example: -2569.00
- AccountCode:
- description: See Accounts
- type: string
- example: 720
- AccountID:
- description: See Accounts
- type: string
- format: uuid
- Description:
- description: Description for journal line
- type: string
- example: Coded incorrectly Office Equipment should be Computer Equipment
- TaxType:
- description: The tax type from TaxRates
- type: string
- Tracking:
- description: Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 elements.
- type: array
- items:
- $ref: '#/components/schemas/TrackingCategory'
- TaxAmount:
- description: The calculated tax amount based on the TaxType and LineAmount
- type: number
- format: double
- x-is-money: true
- example: 0.00
- IsBlank:
- description: is the line blank
- type: boolean
- example: false
- type: object
- Actions:
- type: object
- x-objectArrayKey: actions
- properties:
- Actions:
- type: array
- items:
- $ref: '#/components/schemas/Action'
- Action:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/organisation/'
- properties:
- Name:
- description: Name of the actions for this organisation
- type: string
- example: UseMulticurrency
- Status:
- description: Status of the action for this organisation
- type: string
- enum:
- - ALLOWED
- - NOT-ALLOWED
- Organisations:
- type: object
- x-objectArrayKey: organisations
- properties:
- Organisations:
- type: array
- items:
- $ref: '#/components/schemas/Organisation'
- Organisation:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/organisation/'
- properties:
- OrganisationID:
- description: Unique Xero identifier
- type: string
- format: uuid
- example: 8be9db36-3598-4755-ba5c-c2dbc8c4a7a2
- APIKey:
- description: Display a unique key used for Xero-to-Xero transactions
- type: string
- Name:
- description: Display name of organisation shown in Xero
- type: string
- LegalName:
- description: Organisation name shown on Reports
- type: string
- PaysTax:
- description: Boolean to describe if organisation is registered with a local tax
- authority i.e. true, false
- type: boolean
- Version:
- description: See Version Types
- type: string
- enum:
- - AU
- - NZ
- - GLOBAL
- - UK
- - US
- - AUONRAMP
- - NZONRAMP
- - GLOBALONRAMP
- - UKONRAMP
- - USONRAMP
- OrganisationType:
- description: Organisation Type
- type: string
- enum:
- - ACCOUNTING_PRACTICE
- - COMPANY
- - CHARITY
- - CLUB_OR_SOCIETY
- - INDIVIDUAL
- - LOOK_THROUGH_COMPANY
- - NOT_FOR_PROFIT
- - PARTNERSHIP
- - S_CORPORATION
- - SELF_MANAGED_SUPERANNUATION_FUND
- - SOLE_TRADER
- - SUPERANNUATION_FUND
- - TRUST
- BaseCurrency:
- $ref: '#/components/schemas/CurrencyCode'
- type: string
- CountryCode:
- $ref: '#/components/schemas/CountryCode'
- type: string
- IsDemoCompany:
- description: Boolean to describe if organisation is a demo company.
- type: boolean
- OrganisationStatus:
- description: Will be set to ACTIVE if you can connect to organisation via the
- Xero API
- type: string
- RegistrationNumber:
- description: Shows for New Zealand, Australian and UK organisations
- type: string
- EmployerIdentificationNumber:
- description: Shown if set. US Only.
- type: string
- TaxNumber:
- description: Shown if set. Displays in the Xero UI as Tax File Number (AU), GST
- Number (NZ), VAT Number (UK) and Tax ID Number (US & Global).
- type: string
- FinancialYearEndDay:
- description: Calendar day e.g. 0-31
- type: integer
- FinancialYearEndMonth:
- description: Calendar Month e.g. 1-12
- type: integer
- SalesTaxBasis:
- description: The accounting basis used for tax returns. See Sales Tax Basis
- type: string
- enum:
- - PAYMENTS
- - INVOICE
- - NONE
- - CASH
- - ACCRUAL
- - FLATRATECASH
- - FLATRATEACCRUAL
- - ACCRUALS
- SalesTaxPeriod:
- description: The frequency with which tax returns are processed. See Sales Tax
- Period
- type: string
- enum:
- - MONTHLY
- - QUARTERLY1
- - QUARTERLY2
- - QUARTERLY3
- - ANNUALLY
- - ONEMONTHS
- - TWOMONTHS
- - SIXMONTHS
- - 1MONTHLY
- - 2MONTHLY
- - 3MONTHLY
- - 6MONTHLY
- - QUARTERLY
- - YEARLY
- - NONE
- DefaultSalesTax:
- description: The default for LineAmountTypes on sales transactions
- type: string
- DefaultPurchasesTax:
- description: The default for LineAmountTypes on purchase transactions
- type: string
- PeriodLockDate:
- description: Shown if set. See lock dates
- type: string
- x-is-msdate: true
- EndOfYearLockDate:
- description: Shown if set. See lock dates
- type: string
- x-is-msdate: true
- CreatedDateUTC:
- description: Timestamp when the organisation was created in Xero
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- Timezone:
- $ref: '#/components/schemas/TimeZone'
- type: string
- OrganisationEntityType:
- description: Organisation Entity Type
- type: string
- enum:
- - ACCOUNTING_PRACTICE
- - COMPANY
- - CHARITY
- - CLUB_OR_SOCIETY
- - INDIVIDUAL
- - LOOK_THROUGH_COMPANY
- - NOT_FOR_PROFIT
- - PARTNERSHIP
- - S_CORPORATION
- - SELF_MANAGED_SUPERANNUATION_FUND
- - SOLE_TRADER
- - SUPERANNUATION_FUND
- - TRUST
- ShortCode:
- description: A unique identifier for the organisation. Potential uses.
- type: string
- Class:
- description: Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM)
- type: string
- enum:
- - DEMO
- - TRIAL
- - STARTER
- - STANDARD
- - PREMIUM
- - PREMIUM_20
- - PREMIUM_50
- - PREMIUM_100
- - LEDGER
- - GST_CASHBOOK
- - NON_GST_CASHBOOK
- - ULTIMATE
- - LITE
- - ULTIMATE_10
- - ULTIMATE_20
- - ULTIMATE_50
- - ULTIMATE_100
- - IGNITE
- - GROW
- - COMPREHENSIVE
- Edition:
- description: BUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing)
- type: string
- enum:
- - BUSINESS
- - PARTNER
- LineOfBusiness:
- description: Description of business type as defined in Organisation settings
- type: string
- Addresses:
- description: Address details for organisation – see Addresses
- type: array
- items:
- $ref: '#/components/schemas/AddressForOrganisation'
- Phones:
- description: Phones details for organisation – see Phones
- type: array
- items:
- $ref: '#/components/schemas/Phone'
- ExternalLinks:
- description: Organisation profile links for popular services such as Facebook,Twitter, GooglePlus and LinkedIn. You can also add link to your
- website here. Shown if Organisation settings is updated in Xero.
- See ExternalLinks below
- type: array
- items:
- $ref: '#/components/schemas/ExternalLink'
- PaymentTerms:
- $ref: '#/components/schemas/PaymentTerm'
- type: object
- CountryCode:
- type: string
- enum:
- - AD
- - AE
- - AF
- - AG
- - AI
- - AL
- - AM
- - AN
- - AO
- - AQ
- - AR
- - AS
- - AT
- - AU
- - AW
- - AZ
- - BA
- - BB
- - BD
- - BE
- - BF
- - BG
- - BH
- - BI
- - BJ
- - BL
- - BM
- - BN
- - BO
- - BR
- - BS
- - BT
- - BW
- - BY
- - BZ
- - CA
- - CC
- - CD
- - CF
- - CG
- - CH
- - CI
- - CK
- - CL
- - CM
- - CN
- - CO
- - CR
- - CU
- - CV
- - CW
- - CX
- - CY
- - CZ
- - DE
- - DJ
- - DK
- - DM
- - DO
- - DZ
- - EC
- - EE
- - EG
- - EH
- - ER
- - ES
- - ET
- - FI
- - FJ
- - FK
- - FM
- - FO
- - FR
- - GA
- - GB
- - GD
- - GE
- - GG
- - GH
- - GI
- - GL
- - GM
- - GN
- - GQ
- - GR
- - GT
- - GU
- - GW
- - GY
- - HK
- - HN
- - HR
- - HT
- - HU
- - ID
- - IE
- - IL
- - IM
- - IN
- - IO
- - IQ
- - IR
- - IS
- - IT
- - JE
- - JM
- - JO
- - JP
- - KE
- - KG
- - KH
- - KI
- - KM
- - KN
- - KP
- - KR
- - KW
- - KY
- - KZ
- - LA
- - LB
- - LC
- - LI
- - LK
- - LR
- - LS
- - LT
- - LU
- - LV
- - LY
- - MA
- - MC
- - MD
- - ME
- - MF
- - MG
- - MH
- - MK
- - ML
- - MM
- - MN
- - MO
- - MP
- - MR
- - MS
- - MT
- - MU
- - MV
- - MW
- - MX
- - MY
- - MZ
- - NA
- - NC
- - NE
- - NG
- - NI
- - NL
- - "NO"
- - NP
- - NR
- - NU
- - NZ
- - OM
- - PA
- - PE
- - PF
- - PG
- - PH
- - PK
- - PL
- - PM
- - PN
- - PR
- - PS
- - PT
- - PW
- - PY
- - QA
- - RE
- - RO
- - RS
- - RU
- - RW
- - SA
- - SB
- - SC
- - SD
- - SE
- - SG
- - SH
- - SI
- - SJ
- - SK
- - SL
- - SM
- - SN
- - SO
- - SR
- - SS
- - ST
- - SV
- - SX
- - SY
- - SZ
- - TC
- - TD
- - TG
- - TH
- - TJ
- - TK
- - TL
- - TM
- - TN
- - TO
- - TR
- - TT
- - TV
- - TW
- - TZ
- - UA
- - UG
- - US
- - UY
- - UZ
- - VA
- - VC
- - VE
- - VG
- - VI
- - VN
- - VU
- - WF
- - WS
- - XK
- - YE
- - YT
- - ZA
- - ZM
- - ZW
- TimeZone:
- description: Timezone specifications
- type: string
- enum:
- - AFGHANISTANSTANDARDTIME
- - ALASKANSTANDARDTIME
- - ALEUTIANSTANDARDTIME
- - ALTAISTANDARDTIME
- - ARABIANSTANDARDTIME
- - ARABICSTANDARDTIME
- - ARABSTANDARDTIME
- - ARGENTINASTANDARDTIME
- - ASTRAKHANSTANDARDTIME
- - ATLANTICSTANDARDTIME
- - AUSCENTRALSTANDARDTIME
- - AUSCENTRALWSTANDARDTIME
- - AUSEASTERNSTANDARDTIME
- - AZERBAIJANSTANDARDTIME
- - AZORESSTANDARDTIME
- - BAHIASTANDARDTIME
- - BANGLADESHSTANDARDTIME
- - BELARUSSTANDARDTIME
- - BOUGAINVILLESTANDARDTIME
- - CANADACENTRALSTANDARDTIME
- - CAPEVERDESTANDARDTIME
- - CAUCASUSSTANDARDTIME
- - CENAUSTRALIASTANDARDTIME
- - CENTRALAMERICASTANDARDTIME
- - CENTRALASIASTANDARDTIME
- - CENTRALBRAZILIANSTANDARDTIME
- - CENTRALEUROPEANSTANDARDTIME
- - CENTRALEUROPESTANDARDTIME
- - CENTRALPACIFICSTANDARDTIME
- - CENTRALSTANDARDTIME
- - CENTRALSTANDARDTIME(MEXICO)
- - CHATHAMISLANDSSTANDARDTIME
- - CHINASTANDARDTIME
- - CUBASTANDARDTIME
- - DATELINESTANDARDTIME
- - EAFRICASTANDARDTIME
- - EASTERISLANDSTANDARDTIME
- - EASTERNSTANDARDTIME
- - EASTERNSTANDARDTIME(MEXICO)
- - EAUSTRALIASTANDARDTIME
- - EEUROPESTANDARDTIME
- - EGYPTSTANDARDTIME
- - EKATERINBURGSTANDARDTIME
- - ESOUTHAMERICASTANDARDTIME
- - FIJISTANDARDTIME
- - FLESTANDARDTIME
- - GEORGIANSTANDARDTIME
- - GMTSTANDARDTIME
- - GREENLANDSTANDARDTIME
- - GREENWICHSTANDARDTIME
- - GTBSTANDARDTIME
- - HAITISTANDARDTIME
- - HAWAIIANSTANDARDTIME
- - INDIASTANDARDTIME
- - IRANSTANDARDTIME
- - ISRAELSTANDARDTIME
- - JORDANSTANDARDTIME
- - KALININGRADSTANDARDTIME
- - KAMCHATKASTANDARDTIME
- - KOREASTANDARDTIME
- - LIBYASTANDARDTIME
- - LINEISLANDSSTANDARDTIME
- - LORDHOWESTANDARDTIME
- - MAGADANSTANDARDTIME
- - MAGALLANESSTANDARDTIME
- - MARQUESASSTANDARDTIME
- - MAURITIUSSTANDARDTIME
- - MIDATLANTICSTANDARDTIME
- - MIDDLEEASTSTANDARDTIME
- - MONTEVIDEOSTANDARDTIME
- - MOROCCOSTANDARDTIME
- - MOUNTAINSTANDARDTIME
- - MOUNTAINSTANDARDTIME(MEXICO)
- - MYANMARSTANDARDTIME
- - NAMIBIASTANDARDTIME
- - NCENTRALASIASTANDARDTIME
- - NEPALSTANDARDTIME
- - NEWFOUNDLANDSTANDARDTIME
- - NEWZEALANDSTANDARDTIME
- - NORFOLKSTANDARDTIME
- - NORTHASIAEASTSTANDARDTIME
- - NORTHASIASTANDARDTIME
- - NORTHKOREASTANDARDTIME
- - OMSKSTANDARDTIME
- - PACIFICSASTANDARDTIME
- - PACIFICSTANDARDTIME
- - PACIFICSTANDARDTIME(MEXICO)
- - PAKISTANSTANDARDTIME
- - PARAGUAYSTANDARDTIME
- - QYZYLORDASTANDARDTIME
- - ROMANCESTANDARDTIME
- - RUSSIANSTANDARDTIME
- - RUSSIATIMEZONE10
- - RUSSIATIMEZONE11
- - RUSSIATIMEZONE3
- - SAEASTERNSTANDARDTIME
- - SAINTPIERRESTANDARDTIME
- - SAKHALINSTANDARDTIME
- - SAMOASTANDARDTIME
- - SAOTOMESTANDARDTIME
- - SAPACIFICSTANDARDTIME
- - SARATOVSTANDARDTIME
- - SAWESTERNSTANDARDTIME
- - SEASIASTANDARDTIME
- - SINGAPORESTANDARDTIME
- - SOUTHAFRICASTANDARDTIME
- - SOUTHSUDANSTANDARDTIME
- - SRILANKASTANDARDTIME
- - SUDANSTANDARDTIME
- - SYRIASTANDARDTIME
- - TAIPEISTANDARDTIME
- - TASMANIASTANDARDTIME
- - TOCANTINSSTANDARDTIME
- - TOKYOSTANDARDTIME
- - TOMSKSTANDARDTIME
- - TONGASTANDARDTIME
- - TRANSBAIKALSTANDARDTIME
- - TURKEYSTANDARDTIME
- - TURKSANDCAICOSSTANDARDTIME
- - ULAANBAATARSTANDARDTIME
- - USEASTERNSTANDARDTIME
- - USMOUNTAINSTANDARDTIME
- - UTC
- - UTC+12
- - UTC+13
- - UTC02
- - UTC08
- - UTC09
- - UTC11
- - VENEZUELASTANDARDTIME
- - VLADIVOSTOKSTANDARDTIME
- - VOLGOGRADSTANDARDTIME
- - WAUSTRALIASTANDARDTIME
- - WCENTRALAFRICASTANDARDTIME
- - WESTASIASTANDARDTIME
- - WESTBANKSTANDARDTIME
- - WESTPACIFICSTANDARDTIME
- - WEUROPESTANDARDTIME
- - WMONGOLIASTANDARDTIME
- - YAKUTSKSTANDARDTIME
- - YUKONSTANDARDTIME
- PaymentTerm:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/organisation/'
- properties:
- Bills:
- $ref: '#/components/schemas/Bill'
- Sales:
- $ref: '#/components/schemas/Bill'
- type: object
- PaymentTermType:
- type: string
- enum:
- - DAYSAFTERBILLDATE
- - DAYSAFTERBILLMONTH
- - OFCURRENTMONTH
- - OFFOLLOWINGMONTH
- ExternalLink:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/organisation/'
- properties:
- LinkType:
- description: See External link types
- type: string
- enum:
- - Facebook
- - GooglePlus
- - LinkedIn
- - Twitter
- - Website
- Url:
- description: 'URL for service e.g. http://twitter.com/xeroapi'
- type: string
- Description:
- type: string
- type: object
- Bill:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/organisation/'
- properties:
- Day:
- description: Day of Month (0-31)
- type: integer
- Type:
- $ref: '#/components/schemas/PaymentTermType'
- type: object
- Overpayments:
- type: object
- x-objectArrayKey: overpayments
- properties:
- pagination:
- $ref: '#/components/schemas/Pagination'
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Overpayments:
- type: array
- items:
- $ref: '#/components/schemas/Overpayment'
- Overpayment:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/overpayments/'
- properties:
- Type:
- description: See Overpayment Types
- type: string
- enum:
- - RECEIVE-OVERPAYMENT
- - SPEND-OVERPAYMENT
- - AROVERPAYMENT
- Contact:
- $ref: '#/components/schemas/Contact'
- Date:
- description: The date the overpayment is created YYYY-MM-DD
- type: string
- x-is-msdate: true
- Status:
- description: See Overpayment Status Codes
- type: string
- enum:
- - AUTHORISED
- - PAID
- - VOIDED
- LineAmountTypes:
- $ref: '#/components/schemas/LineAmountTypes'
- type: string
- LineItems:
- description: See Overpayment Line Items
- type: array
- items:
- $ref: '#/components/schemas/LineItem'
- SubTotal:
- description: The subtotal of the overpayment excluding taxes
- type: number
- format: double
- x-is-money: true
- TotalTax:
- description: The total tax on the overpayment
- type: number
- format: double
- x-is-money: true
- Total:
- description: The total of the overpayment (subtotal + total tax)
- type: number
- format: double
- x-is-money: true
- UpdatedDateUTC:
- description: UTC timestamp of last update to the overpayment
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- CurrencyCode:
- $ref: '#/components/schemas/CurrencyCode'
- type: string
- OverpaymentID:
- description: Xero generated unique identifier
- type: string
- format: uuid
- CurrencyRate:
- description: The currency rate for a multicurrency overpayment. If no rate is
- specified, the XE.com day rate is used
- type: number
- format: double
- x-is-money: true
- RemainingCredit:
- description: The remaining credit balance on the overpayment
- type: number
- format: double
- x-is-money: true
- Allocations:
- description: See Allocations
- type: array
- items:
- $ref: '#/components/schemas/Allocation'
- AppliedAmount:
- description: The amount of applied to an invoice
- type: number
- format: double
- example: 2.00
- Payments:
- description: See Payments
- type: array
- items:
- $ref: '#/components/schemas/Payment'
- HasAttachments:
- description: boolean to indicate if a overpayment has an attachment
- readOnly: true
- type: boolean
- default: "false"
- example: "false"
- Attachments:
- description: See Attachments
- type: array
- items:
- $ref: '#/components/schemas/Attachment'
- type: object
- Payments:
- type: object
- x-objectArrayKey: payments
- properties:
- pagination:
- $ref: '#/components/schemas/Pagination'
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Payments:
- type: array
- items:
- $ref: '#/components/schemas/Payment'
- PaymentDelete:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/payments/'
- properties:
- Status:
- description: The status of the payment.
- type: string
- default: "DELETED"
- required:
- - Status
- type: object
- Payment:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/payments/'
- properties:
- Invoice:
- $ref: '#/components/schemas/Invoice'
- CreditNote:
- $ref: '#/components/schemas/CreditNote'
- Prepayment:
- $ref: '#/components/schemas/Prepayment'
- Overpayment:
- $ref: '#/components/schemas/Overpayment'
- InvoiceNumber:
- description: Number of invoice or credit note you are applying payment to e.g.INV-4003
- type: string
- CreditNoteNumber:
- description: Number of invoice or credit note you are applying payment to e.g. INV-4003
- type: string
- BatchPayment:
- $ref: '#/components/schemas/BatchPayment'
- Account:
- $ref: '#/components/schemas/Account'
- Code:
- description: Code of account you are using to make the payment e.g. 001 (note- not all accounts have a code value)
- type: string
- Date:
- description: Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
- type: string
- x-is-msdate: true
- CurrencyRate:
- description: Exchange rate when payment is received. Only used for non base currency invoices and credit notes e.g. 0.7500
- type: number
- format: double
- x-is-money: true
- 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
- format: double
- x-is-money: true
- BankAmount:
- description: The amount of the payment in the currency of the bank account.
- type: number
- format: double
- x-is-money: true
- Reference:
- description: An optional description for the payment e.g. Direct Debit
- type: string
- IsReconciled:
- description: An optional parameter for the payment. A boolean indicating whether you would like the payment to be created as reconciled when using
- PUT, or whether a payment has been reconciled when using GET
- type: boolean
- Status:
- description: The status of the payment.
- type: string
- enum:
- - AUTHORISED
- - DELETED
- PaymentType:
- description: See Payment Types.
- readOnly: true
- type: string
- enum:
- - ACCRECPAYMENT
- - ACCPAYPAYMENT
- - ARCREDITPAYMENT
- - APCREDITPAYMENT
- - AROVERPAYMENTPAYMENT
- - ARPREPAYMENTPAYMENT
- - APPREPAYMENTPAYMENT
- - APOVERPAYMENTPAYMENT
- UpdatedDateUTC:
- description: UTC timestamp of last update to the payment
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- PaymentID:
- description: The Xero identifier for an Payment e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
- type: string
- format: uuid
- example: 00000000-0000-0000-0000-000000000000
- BatchPaymentID:
- description: Present if the payment was created as part of a batch.
- type: string
- format: uuid
- example: 00000000-0000-0000-0000-000000000000
- BankAccountNumber:
- description: The suppliers bank account number the payment is being made to
- type: string
- Particulars:
- description: The suppliers bank account number the payment is being made to
- type: string
- Details:
- description: The information to appear on the supplier's bank account
- type: string
- HasAccount:
- description: A boolean to indicate if a contact has an validation errors
- type: boolean
- default: "false"
- example: "false"
- HasValidationErrors:
- description: A boolean to indicate if a contact has an validation errors
- type: boolean
- default: "false"
- example: "false"
- StatusAttributeString:
- description: A string to indicate if a invoice status
- type: string
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- type: object
- Prepayments:
- type: object
- x-objectArrayKey: prepayments
- properties:
- pagination:
- $ref: '#/components/schemas/Pagination'
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Prepayments:
- type: array
- items:
- $ref: '#/components/schemas/Prepayment'
- Prepayment:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/prepayments/'
- properties:
- Type:
- description: See Prepayment Types
- type: string
- enum:
- - RECEIVE-PREPAYMENT
- - SPEND-PREPAYMENT
- - ARPREPAYMENT
- - APPREPAYMENT
- Contact:
- $ref: '#/components/schemas/Contact'
- Date:
- description: The date the prepayment is created YYYY-MM-DD
- type: string
- x-is-msdate: true
- Status:
- description: See Prepayment Status Codes
- type: string
- enum:
- - AUTHORISED
- - PAID
- - VOIDED
- LineAmountTypes:
- $ref: '#/components/schemas/LineAmountTypes'
- type: string
- LineItems:
- description: See Prepayment Line Items
- type: array
- items:
- $ref: '#/components/schemas/LineItem'
- SubTotal:
- description: The subtotal of the prepayment excluding taxes
- type: number
- format: double
- x-is-money: true
- TotalTax:
- description: The total tax on the prepayment
- type: number
- format: double
- x-is-money: true
- Total:
- description: The total of the prepayment(subtotal + total tax)
- type: number
- format: double
- x-is-money: true
- Reference:
- description: Returns Invoice number field. Reference field isn't available.
- type: string
- readOnly: true
- UpdatedDateUTC:
- description: UTC timestamp of last update to the prepayment
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- CurrencyCode:
- $ref: '#/components/schemas/CurrencyCode'
- type: string
- PrepaymentID:
- description: Xero generated unique identifier
- type: string
- format: uuid
- CurrencyRate:
- description: The currency rate for a multicurrency prepayment. If no rate is
- specified, the XE.com day rate is used
- type: number
- format: double
- x-is-money: true
- RemainingCredit:
- description: The remaining credit balance on the prepayment
- type: number
- format: double
- x-is-money: true
- Allocations:
- description: See Allocations
- type: array
- items:
- $ref: '#/components/schemas/Allocation'
- Payments:
- description: See Payments
- type: array
- items:
- $ref: '#/components/schemas/Payment'
- AppliedAmount:
- description: The amount of applied to an invoice
- type: number
- format: double
- example: 2.00
- HasAttachments:
- description: boolean to indicate if a prepayment has an attachment
- readOnly: true
- type: boolean
- default: "false"
- example: "false"
- Attachments:
- description: See Attachments
- type: array
- items:
- $ref: '#/components/schemas/Attachment'
- type: object
- PurchaseOrders:
- type: object
- x-objectArrayKey: purchase_orders
- properties:
- pagination:
- $ref: '#/components/schemas/Pagination'
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- PurchaseOrders:
- type: array
- items:
- $ref: '#/components/schemas/PurchaseOrder'
- PurchaseOrder:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/purchase-orders/'
- properties:
- Contact:
- $ref: '#/components/schemas/Contact'
- LineItems:
- description: See LineItems
- type: array
- items:
- $ref: '#/components/schemas/LineItem'
- Date:
- description: Date purchase order was issued – YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the
- timezone setting of the organisation
- type: string
- x-is-msdate: true
- DeliveryDate:
- description: Date the goods are to be delivered – YYYY-MM-DD
- type: string
- x-is-msdate: true
- LineAmountTypes:
- $ref: '#/components/schemas/LineAmountTypes'
- type: string
- PurchaseOrderNumber:
- description: Unique alpha numeric code identifying purchase order (when missing
- will auto-generate from your Organisation Invoice Settings)
- type: string
- Reference:
- description: Additional reference number
- type: string
- BrandingThemeID:
- description: See BrandingThemes
- type: string
- format: uuid
- CurrencyCode:
- $ref: '#/components/schemas/CurrencyCode'
- type: string
- Status:
- description: See Purchase Order Status Codes
- type: string
- enum:
- - DRAFT
- - SUBMITTED
- - AUTHORISED
- - BILLED
- - DELETED
- SentToContact:
- description: Boolean to set whether the purchase order should be marked as
- “sent”. This can be set only on purchase orders that have been
- approved or billed
- type: boolean
- DeliveryAddress:
- description: The address the goods are to be delivered to
- type: string
- AttentionTo:
- description: The person that the delivery is going to
- type: string
- Telephone:
- description: The phone number for the person accepting the delivery
- type: string
- DeliveryInstructions:
- description: A free text feild for instructions (500 characters max)
- type: string
- ExpectedArrivalDate:
- description: The date the goods are expected to arrive.
- type: string
- x-is-msdate: true
- PurchaseOrderID:
- description: Xero generated unique identifier for purchase order
- type: string
- format: uuid
- CurrencyRate:
- description: The currency rate for a multicurrency purchase order. If no rate is specified, the XE.com day rate is used.
- type: number
- format: double
- x-is-money: true
- SubTotal:
- description: Total of purchase order excluding taxes
- readOnly: true
- type: number
- format: double
- x-is-money: true
- TotalTax:
- description: Total tax on purchase order
- readOnly: true
- type: number
- format: double
- x-is-money: true
- Total:
- description: Total of Purchase Order tax inclusive (i.e. SubTotal + TotalTax)
- readOnly: true
- type: number
- format: double
- x-is-money: true
- TotalDiscount:
- description: Total of discounts applied on the purchase order line items
- readOnly: true
- type: number
- format: double
- x-is-money: true
- HasAttachments:
- description: boolean to indicate if a purchase order has an attachment
- readOnly: true
- type: boolean
- default: "false"
- example: "false"
- UpdatedDateUTC:
- description: Last modified date UTC format
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- StatusAttributeString:
- description: A string to indicate if a invoice status
- type: string
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Attachments:
- description: Displays array of attachments from the API
- type: array
- items:
- $ref: '#/components/schemas/Attachment'
- type: object
- Pagination:
- type: object
- properties:
- page:
- type: integer
- pageSize:
- type: integer
- pageCount:
- type: integer
- itemCount:
- type: integer
- Quotes:
- type: object
- x-objectArrayKey: quotes
- properties:
- Quotes:
- type: array
- items:
- $ref: '#/components/schemas/Quote'
- Quote:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/Quotes/'
- properties:
- QuoteID:
- description: QuoteID GUID is automatically generated and is returned after create or GET.
- type: string
- format: uuid
- QuoteNumber:
- description: Unique alpha numeric code identifying a quote (Max Length = 255)
- maxLength: 255
- type: string
- Reference:
- description: Additional reference number
- maxLength: 4000
- type: string
- Terms:
- description: Terms of the quote
- maxLength: 4000
- type: string
- Contact:
- $ref: '#/components/schemas/Contact'
- type: string
- LineItems:
- description: See LineItems
- type: array
- items:
- $ref: '#/components/schemas/LineItem'
- Date:
- description: Date quote was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation
- type: string
- x-is-msdate: true
- DateString:
- description: Date the quote was issued (YYYY-MM-DD)
- type: string
- ExpiryDate:
- description: Date the quote expires – YYYY-MM-DD.
- type: string
- x-is-msdate: true
- ExpiryDateString:
- description: Date the quote expires – YYYY-MM-DD.
- type: string
- Status:
- $ref: '#/components/schemas/QuoteStatusCodes'
- type: string
- CurrencyCode:
- $ref: '#/components/schemas/CurrencyCode'
- type: string
- CurrencyRate:
- description: The currency rate for a multicurrency quote
- type: number
- format: double
- SubTotal:
- description: Total of quote excluding taxes.
- readOnly: true
- type: number
- format: double
- x-is-money: true
- TotalTax:
- description: Total tax on quote
- readOnly: true
- type: number
- format: double
- x-is-money: true
- Total:
- description: Total of Quote tax inclusive (i.e. SubTotal + TotalTax). This will be ignored if it doesn’t equal the sum of the LineAmounts
- readOnly: true
- type: number
- format: double
- x-is-money: true
- TotalDiscount:
- description: Total of discounts applied on the quote line items
- readOnly: true
- type: number
- format: double
- x-is-money: true
- Title:
- description: Title text for the quote
- type: string
- maxLength: 100
- Summary:
- description: Summary text for the quote
- type: string
- maxLength: 3000
- BrandingThemeID:
- description: See BrandingThemes
- type: string
- format: uuid
- UpdatedDateUTC:
- description: Last modified date UTC format
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- LineAmountTypes:
- $ref: '#/components/schemas/QuoteLineAmountTypes'
- type: string
- description: See Quote Line Amount Types
- StatusAttributeString:
- description: A string to indicate if a invoice status
- type: string
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- type: object
- QuoteLineAmountTypes:
- description: Line amounts are exclusive of tax by default if you don’t specify this element. See Line Amount Types
- type: string
- enum:
- - EXCLUSIVE
- - INCLUSIVE
- - NOTAX
- QuoteStatusCodes:
- description: The status of the quote.
- type: string
- enum:
- - DRAFT
- - SENT
- - DECLINED
- - ACCEPTED
- - INVOICED
- - DELETED
- Receipts:
- type: object
- x-objectArrayKey: receipts
- properties:
- Receipts:
- type: array
- items:
- $ref: '#/components/schemas/Receipt'
- Receipt:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/receipts/'
- properties:
- Date:
- description: Date of receipt – YYYY-MM-DD
- type: string
- x-is-msdate: true
- Contact:
- $ref: '#/components/schemas/Contact'
- LineItems:
- type: array
- items:
- $ref: '#/components/schemas/LineItem'
- User:
- $ref: '#/components/schemas/User'
- Reference:
- description: Additional reference number
- type: string
- LineAmountTypes:
- $ref: '#/components/schemas/LineAmountTypes'
- type: string
- SubTotal:
- description: Total of receipt excluding taxes
- type: number
- format: double
- x-is-money: true
- TotalTax:
- description: Total tax on receipt
- type: number
- format: double
- x-is-money: true
- Total:
- description: Total of receipt tax inclusive (i.e. SubTotal + TotalTax)
- type: number
- format: double
- x-is-money: true
- ReceiptID:
- description: Xero generated unique identifier for receipt
- type: string
- format: uuid
- Status:
- description: Current status of receipt – see status types
- type: string
- enum:
- - DRAFT
- - SUBMITTED
- - AUTHORISED
- - DECLINED
- - VOIDED
- ReceiptNumber:
- description: Xero generated sequence number for receipt in current claim for a given user
- readOnly: true
- type: string
- UpdatedDateUTC:
- description: Last modified date UTC format
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- HasAttachments:
- description: boolean to indicate if a receipt has an attachment
- readOnly: true
- type: boolean
- default: "false"
- example: "false"
- Url:
- description: URL link to a source document – shown as “Go to [appName]” in the Xero app
- readOnly: true
- type: string
- ValidationErrors:
- description: Displays array of validation error messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Warnings:
- description: Displays array of warning messages from the API
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- Attachments:
- description: Displays array of attachments from the API
- type: array
- items:
- $ref: '#/components/schemas/Attachment'
- type: object
- RepeatingInvoices:
- type: object
- x-objectArrayKey: repeating_invoices
- properties:
- RepeatingInvoices:
- type: array
- items:
- $ref: '#/components/schemas/RepeatingInvoice'
- RepeatingInvoice:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/repeating-invoices/'
- properties:
- Type:
- description: See Invoice Types
- type: string
- enum:
- - ACCPAY
- - ACCREC
- Contact:
- $ref: '#/components/schemas/Contact'
- Schedule:
- $ref: '#/components/schemas/Schedule'
- LineItems:
- description: See LineItems
- type: array
- items:
- $ref: '#/components/schemas/LineItem'
- LineAmountTypes:
- $ref: '#/components/schemas/LineAmountTypes'
- type: string
- Reference:
- description: ACCREC only – additional reference number
- type: string
- BrandingThemeID:
- description: See BrandingThemes
- type: string
- format: uuid
- CurrencyCode:
- $ref: '#/components/schemas/CurrencyCode'
- type: string
- Status:
- description: One of the following - DRAFT or AUTHORISED – See Invoice Status
- Codes
- type: string
- enum:
- - DRAFT
- - AUTHORISED
- - DELETED
- SubTotal:
- description: Total of invoice excluding taxes
- type: number
- format: double
- x-is-money: true
- TotalTax:
- description: Total tax on invoice
- type: number
- format: double
- x-is-money: true
- Total:
- description: Total of Invoice tax inclusive (i.e. SubTotal + TotalTax)
- type: number
- format: double
- x-is-money: true
- RepeatingInvoiceID:
- description: Xero generated unique identifier for repeating invoice template
- type: string
- format: uuid
- ID:
- description: Xero generated unique identifier for repeating invoice template
- type: string
- format: uuid
- HasAttachments:
- description: Boolean to indicate if an invoice has an attachment
- readOnly: true
- type: boolean
- default: "false"
- example: "false"
- Attachments:
- description: Displays array of attachments from the API
- type: array
- items:
- $ref: '#/components/schemas/Attachment'
- ApprovedForSending:
- description: Boolean to indicate whether the invoice has been approved for sending
- type: boolean
- default: "false"
- example: "false"
- SendCopy:
- description: Boolean to indicate whether a copy is sent to sender's email
- type: boolean
- default: "false"
- example: "false"
- MarkAsSent:
- description: Boolean to indicate whether the invoice in the Xero app displays as "sent"
- type: boolean
- default: "false"
- example: "false"
- IncludePDF:
- description: Boolean to indicate whether to include PDF attachment
- type: boolean
- default: "false"
- example: "false"
- type: object
- ReportWithRows:
- type: object
- properties:
- Reports:
- type: array
- items:
- $ref: '#/components/schemas/ReportWithRow'
- ReportWithRow:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/reports/'
- properties:
- ReportID:
- description: ID of the Report
- type: string
- ReportName:
- description: Name of the report
- type: string
- ReportTitle:
- description: Title of the report
- type: string
- ReportType:
- description: The type of report (BalanceSheet,ProfitLoss, etc)
- type: string
- ReportTitles:
- description: Report titles array (3 to 4 strings with the report name, orgnisation name and time frame of report)
- type: array
- items:
- type: string
- ReportDate:
- description: Date of report
- type: string
- Rows:
- type: array
- items:
- $ref: '#/components/schemas/ReportRows'
- UpdatedDateUTC:
- description: Updated Date
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- Fields:
- type: array
- items:
- $ref: '#/components/schemas/ReportFields'
- ReportRows:
- type: object
- properties:
- RowType:
- $ref: '#/components/schemas/RowType'
- Title:
- type: string
- Cells:
- type: array
- items:
- $ref: '#/components/schemas/ReportCell'
- Rows:
- type: array
- items:
- $ref: '#/components/schemas/ReportRow'
- RowType:
- type: string
- enum:
- - Header
- - Section
- - Row
- - SummaryRow
- ReportRow:
- type: object
- properties:
- RowType:
- $ref: '#/components/schemas/RowType'
- Title:
- type: string
- Cells:
- type: array
- items:
- $ref: '#/components/schemas/ReportCell'
- ReportCell:
- type: object
- properties:
- Value:
- type: string
- Attributes:
- type: array
- items:
- $ref: '#/components/schemas/ReportAttribute'
- ReportAttribute:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/reports/'
- properties:
- Id:
- type: string
- Value:
- type: string
- ReportFields:
- type: object
- properties:
- FieldID:
- type: string
- Description:
- type: string
- Value:
- type: string
- Reports:
- type: object
- x-objectArrayKey: reports
- properties:
- Reports:
- type: array
- items:
- $ref: '#/components/schemas/Report'
- Report:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/reports/'
- properties:
- ReportName:
- description: See Prepayment Types
- type: string
- ReportType:
- description: See Prepayment Types
- type: string
- enum:
- - AgedPayablesByContact
- ReportTitle:
- description: See Prepayment Types
- type: string
- ReportDate:
- description: Date of report
- type: string
- UpdatedDateUTC:
- description: Updated Date
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- Contacts:
- type: array
- items:
- $ref: '#/components/schemas/TenNinetyNineContact'
- TenNinetyNineContact:
- properties:
- Box1:
- description: Box 1 on 1099 Form
- type: number
- format: double
- x-is-money: true
- Box2:
- description: Box 2 on 1099 Form
- type: number
- format: double
- x-is-money: true
- Box3:
- description: Box 3 on 1099 Form
- type: number
- format: double
- x-is-money: true
- Box4:
- description: Box 4 on 1099 Form
- type: number
- format: double
- x-is-money: true
- Box5:
- description: Box 5 on 1099 Form
- type: number
- format: double
- x-is-money: true
- Box6:
- description: Box 6 on 1099 Form
- type: number
- format: double
- x-is-money: true
- Box7:
- description: Box 7 on 1099 Form
- type: number
- format: double
- x-is-money: true
- Box8:
- description: Box 8 on 1099 Form
- type: number
- format: double
- x-is-money: true
- Box9:
- description: Box 9 on 1099 Form
- type: number
- format: double
- x-is-money: true
- Box10:
- description: Box 10 on 1099 Form
- type: number
- format: double
- x-is-money: true
- Box11:
- description: Box 11 on 1099 Form
- type: number
- format: double
- x-is-money: true
- Box13:
- description: Box 13 on 1099 Form
- type: number
- format: double
- x-is-money: true
- Box14:
- description: Box 14 on 1099 Form
- type: number
- format: double
- x-is-money: true
- Name:
- description: Contact name on 1099 Form
- type: string
- FederalTaxIDType:
- description: Contact Fed Tax ID type
- type: string
- City:
- description: Contact city on 1099 Form
- type: string
- Zip:
- description: Contact zip on 1099 Form
- type: string
- State:
- description: Contact State on 1099 Form
- type: string
- Email:
- description: Contact email on 1099 Form
- type: string
- StreetAddress:
- description: Contact address on 1099 Form
- type: string
- TaxID:
- description: Contact tax id on 1099 Form
- type: string
- ContactId:
- description: Contact contact id
- type: string
- format: uuid
- LegalName:
- description: Contact legal name
- type: string
- BusinessName:
- description: Contact business name
- type: string
- FederalTaxClassification:
- description: Contact federal tax classification
- type: string
- enum:
- - SOLE_PROPRIETOR
- - PARTNERSHIP
- - TRUST_OR_ESTATE
- - NONPROFIT
- - C_CORP
- - S_CORP
- - OTHER
- Schedule:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/repeating-invoices/'
- properties:
- Period:
- description: Integer used with the unit e.g. 1 (every 1 week), 2 (every 2 months)
- type: integer
- Unit:
- description: One of the following - WEEKLY or MONTHLY
- type: string
- enum:
- - WEEKLY
- - MONTHLY
- DueDate:
- description: Integer used with due date type e.g 20 (of following month), 31 (of current month)
- type: integer
- DueDateType:
- description: the payment terms
- type: string
- enum:
- - DAYSAFTERBILLDATE
- - DAYSAFTERBILLMONTH
- - DAYSAFTERINVOICEDATE
- - DAYSAFTERINVOICEMONTH
- - OFCURRENTMONTH
- - OFFOLLOWINGMONTH
- StartDate:
- description: Date the first invoice of the current version of the repeating
- schedule was generated (changes when repeating invoice is edited)
- type: string
- x-is-msdate: true
- NextScheduledDate:
- description: The calendar date of the next invoice in the schedule to be generated
- type: string
- x-is-msdate: true
- EndDate:
- description: Invoice end date – only returned if the template has an end date set
- type: string
- x-is-msdate: true
- type: object
- TaxRates:
- type: object
- x-objectArrayKey: tax_rates
- properties:
- TaxRates:
- type: array
- items:
- $ref: '#/components/schemas/TaxRate'
- TaxType:
- description: See Tax Types – can only be used on update calls
- type: string
- enum:
- - OUTPUT
- - INPUT
- - CAPEXINPUT
- - EXEMPTEXPORT
- - EXEMPTEXPENSES
- - EXEMPTCAPITAL
- - EXEMPTOUTPUT
- - INPUTTAXED
- - BASEXCLUDED
- - GSTONCAPIMPORTS
- - GSTONIMPORTS
- - NONE
- - INPUT2
- - ZERORATED
- - OUTPUT2
- - CAPEXINPUT2
- - CAPEXOUTPUT
- - CAPEXOUTPUT2
- - CAPEXSRINPUT
- - CAPEXSROUTPUT
- - ECACQUISITIONS
- - ECZRINPUT
- - ECZROUTPUT
- - ECZROUTPUTSERVICES
- - EXEMPTINPUT
- - REVERSECHARGES
- - RRINPUT
- - RROUTPUT
- - SRINPUT
- - SROUTPUT
- - ZERORATEDINPUT
- - ZERORATEDOUTPUT
- - BLINPUT
- - DSOUTPUT
- - EPINPUT
- - ES33OUTPUT
- - ESN33OUTPUT
- - IGDSINPUT2
- - IMINPUT2
- - MEINPUT
- - NRINPUT
- - OPINPUT
- - OSOUTPUT
- - TXESSINPUT
- - TXN33INPUT
- - TXPETINPUT
- - TXREINPUT
- - INPUT3
- - INPUT4
- - OUTPUT3
- - OUTPUT4
- - SROUTPUT2
- - TXCA
- - SRCAS
- - BLINPUT2
- - DRCHARGESUPPLY20
- - DRCHARGE20
- - DRCHARGESUPPLY5
- - DRCHARGE5
- - BADDEBTRELIEF
- - IGDSINPUT3
- - SROVR
- - TOURISTREFUND
- - TXRCN33
- - TXRCRE
- - TXRCESS
- - TXRCTS
- - OUTPUTY23
- - DSOUTPUTY23
- - INPUTY23
- - IMINPUT2Y23
- - IGDSINPUT2Y23
- - TXPETINPUTY23
- - TXESSINPUTY23
- - TXN33INPUTY23
- - TXREINPUTY23
- - TXCAY23
- - BADDEBTRELIEFY23
- - IGDSINPUT3Y23
- - SROVRRSY23
- - SROVRLVGY23
- - SRLVGY23
- - TXRCN33Y23
- - TXRCREY23
- - TXRCESSY23
- - TXRCTSY23
- - IM
- - IMY23
- - IMESS
- - IMESSY23
- - IMN33
- - IMN33Y23
- - IMRE
- - IMREY23
- - BADDEBTRECOVERY
- - BADDEBTRECOVERYY23
- - OUTPUTY24
- - DSOUTPUTY24
- - INPUTY24
- - IGDSINPUT2Y24
- - TXPETINPUTY24
- - TXESSINPUTY24
- - TXN33INPUTY24
- - TXREINPUTY24
- - TXCAY24
- - BADDEBTRELIEFY24
- - IGDSINPUT3Y24
- - SROVRRSY24
- - SROVRLVGY24
- - SRLVGY24
- - TXRCTSY24
- - TXRCESSY24
- - TXRCN33Y24
- - TXRCREY24
- - IMY24
- - IMESSY24
- - IMN33Y24
- - IMREY24
- - BADDEBTRECOVERYY24
- - OSOUTPUT2
- - BLINPUT3
- - BLINPUT3Y23
- - BLINPUT3Y24
- Setup:
- externalDocs:
- url: 'https://developer.xero.com/documentation/api-guides/conversions'
- properties:
- ConversionDate:
- $ref: '#/components/schemas/ConversionDate'
- ConversionBalances:
- description: Balance supplied for each account that has a value as at the conversion date.
- type: array
- items:
- $ref: '#/components/schemas/ConversionBalances'
- Accounts:
- type: array
- items:
- $ref: '#/components/schemas/Account'
- ConversionDate:
- description: The date when the organisation starts using Xero
- type: object
- properties:
- Month:
- description: The month the organisation starts using Xero. Value is an integer between 1 and 12
- type: integer
- example: 1
- Year:
- description: The year the organisation starts using Xero. Value is an integer greater than 2006
- type: integer
- example: 2020
- ConversionBalances:
- description: Balance supplied for each account that has a value as at the conversion date.
- properties:
- AccountCode:
- description: The account code for a account
- type: string
- Balance:
- description: The opening balances of the account. Debits are positive, credits are negative values
- type: number
- format: double
- BalanceDetails:
- type: array
- items:
- $ref: '#/components/schemas/BalanceDetails'
- type: object
- BalanceDetails:
- description: An array to specify multiple currency balances of an account
- properties:
- Balance:
- description: The opening balances of the account. Debits are positive, credits are negative values
- type: number
- format: double
- CurrencyCode:
- description: The currency of the balance (Not required for base currency)
- type: string
- CurrencyRate:
- description: (Optional) Exchange rate to base currency when money is spent or received. If not specified, XE rate for the day is applied
- type: number
- format: double
- x-is-money: true
- type: object
- ImportSummaryObject:
- externalDocs:
- url: 'https://developer.xero.com/documentation/api-guides/conversions'
- properties:
- ImportSummary:
- $ref: '#/components/schemas/ImportSummary'
- ImportSummary:
- externalDocs:
- url: 'https://developer.xero.com/documentation/api-guides/conversions'
- description: A summary of the import from setup endpoint
- type: object
- properties:
- Accounts:
- $ref: '#/components/schemas/ImportSummaryAccounts'
- Organisation:
- $ref: '#/components/schemas/ImportSummaryOrganisation'
- ImportSummaryAccounts:
- description: A summary of the accounts changes
- type: object
- properties:
- Total:
- description: The total number of accounts in the org
- type: integer
- format: int32
- New:
- description: The number of new accounts created
- type: integer
- format: int32
- Updated:
- description: The number of accounts updated
- type: integer
- format: int32
- Deleted:
- description: The number of accounts deleted
- type: integer
- format: int32
- Locked:
- description: The number of locked accounts
- type: integer
- format: int32
- System:
- description: The number of system accounts
- type: integer
- format: int32
- Errored:
- description: The number of accounts that had an error
- type: integer
- format: int32
- Present:
- type: boolean
- NewOrUpdated:
- description: The number of new or updated accounts
- type: integer
- format: int32
- ImportSummaryOrganisation:
- type: object
- properties:
- Present:
- type: boolean
- TaxRate:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/tax-rates/'
- properties:
- Name:
- description: Name of tax rate
- type: string
- TaxType:
- description: The tax type
- type: string
- TaxComponents:
- description: See TaxComponents
- type: array
- items:
- $ref: '#/components/schemas/TaxComponent'
- Status:
- description: See Status Codes
- type: string
- enum:
- - ACTIVE
- - DELETED
- - ARCHIVED
- - PENDING
- ReportTaxType:
- description: See ReportTaxTypes
- type: string
- enum:
- - AVALARA
- - BASEXCLUDED
- - CAPITALSALESOUTPUT
- - CAPITALEXPENSESINPUT
- - ECOUTPUT
- - ECOUTPUTSERVICES
- - ECINPUT
- - ECACQUISITIONS
- - EXEMPTEXPENSES
- - EXEMPTINPUT
- - EXEMPTOUTPUT
- - GSTONIMPORTS
- - INPUT
- - INPUTTAXED
- - MOSSSALES
- - NONE
- - NONEOUTPUT
- - OUTPUT
- - PURCHASESINPUT
- - SALESOUTPUT
- - EXEMPTCAPITAL
- - EXEMPTEXPORT
- - CAPITALEXINPUT
- - GSTONCAPIMPORTS
- - GSTONCAPITALIMPORTS
- - REVERSECHARGES
- - PAYMENTS
- - INVOICE
- - CASH
- - ACCRUAL
- - FLATRATECASH
- - FLATRATEACCRUAL
- - ACCRUALS
- - TXCA
- - SRCAS
- - DSOUTPUT
- - BLINPUT2
- - EPINPUT
- - IMINPUT2
- - MEINPUT
- - IGDSINPUT2
- - ESN33OUTPUT
- - OPINPUT
- - OSOUTPUT
- - TXN33INPUT
- - TXESSINPUT
- - TXREINPUT
- - TXPETINPUT
- - NRINPUT
- - ES33OUTPUT
- - ZERORATEDINPUT
- - ZERORATEDOUTPUT
- - DRCHARGESUPPLY
- - DRCHARGE
- - CAPINPUT
- - CAPIMPORTS
- - IMINPUT
- - INPUT2
- - CIUINPUT
- - SRINPUT
- - OUTPUT2
- - SROUTPUT
- - CAPOUTPUT
- - SROUTPUT2
- - CIUOUTPUT
- - ZROUTPUT
- - ZREXPORT
- - ACC28PLUS
- - ACCUPTO28
- - OTHEROUTPUT
- - SHOUTPUT
- - ZRINPUT
- - BADDEBT
- - OTHERINPUT
- - BADDEBTRELIEF
- - IGDSINPUT3
- - SROVR
- - TOURISTREFUND
- - TXRCN33
- - TXRCRE
- - TXRCESS
- - TXRCTS
- - CAPEXINPUT
- - UNDEFINED
- - CAPEXOUTPUT
- - ZEROEXPOUTPUT
- - GOODSIMPORT
- - NONEINPUT
- - NOTREPORTED
- - SROVRRS
- - SROVRLVG
- - SRLVG
- - IM
- - IMESS
- - IMN33
- - IMRE
- - BADDEBTRECOVERY
- - USSALESTAX
- - BLINPUT3
- CanApplyToAssets:
- description: Boolean to describe if tax rate can be used for asset accounts i.e. true,false
- readOnly: true
- type: boolean
- CanApplyToEquity:
- description: Boolean to describe if tax rate can be used for equity accounts i.e true,false
- readOnly: true
- type: boolean
- CanApplyToExpenses:
- description: Boolean to describe if tax rate can be used for expense accounts i.e. true,false
- readOnly: true
- type: boolean
- CanApplyToLiabilities:
- description: Boolean to describe if tax rate can be used for liability accounts i.e. true,false
- readOnly: true
- type: boolean
- CanApplyToRevenue:
- description: Boolean to describe if tax rate can be used for revenue accounts
- i.e. true,false
- readOnly: true
- type: boolean
- DisplayTaxRate:
- description: Tax Rate (decimal to 4dp) e.g 12.5000
- readOnly: true
- type: number
- format: double
- x-is-money: true
- EffectiveRate:
- description: Effective Tax Rate (decimal to 4dp) e.g 12.5000
- readOnly: true
- type: number
- format: double
- x-is-money: true
- type: object
- TaxComponent:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/tax-rates/'
- properties:
- Name:
- description: Name of Tax Component
- type: string
- Rate:
- description: Tax Rate (up to 4dp)
- type: number
- format: double
- x-is-money: true
- IsCompound:
- description: Boolean to describe if Tax rate is compounded.
- type: boolean
- IsNonRecoverable:
- description: Boolean to describe if tax rate is non-recoverable. Non-recoverable rates are only applicable to Canadian organisations
- type: boolean
- type: object
- TrackingCategories:
- type: object
- x-objectArrayKey: tracking_categories
- properties:
- TrackingCategories:
- type: array
- items:
- $ref: '#/components/schemas/TrackingCategory'
- TrackingCategory:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/tracking-categories/'
- properties:
- TrackingCategoryID:
- description: The Xero identifier for a tracking category e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
- type: string
- format: uuid
- TrackingOptionID:
- description: The Xero identifier for a tracking option e.g. dc54c220-0140-495a-b925-3246adc0075f
- type: string
- format: uuid
- Name:
- description: The name of the tracking category e.g. Department, Region (max
- length = 100)
- maxLength: 100
- type: string
- Option:
- description: The option name of the tracking option e.g. East, West (max
- length = 100)
- maxLength: 100
- type: string
- Status:
- description: The status of a tracking category
- type: string
- enum:
- - ACTIVE
- - ARCHIVED
- - DELETED
- Options:
- description: See Tracking Options
- type: array
- items:
- $ref: '#/components/schemas/TrackingOption'
- type: object
- TrackingOptions:
- type: object
- x-objectArrayKey: options
- properties:
- Options:
- type: array
- items:
- $ref: '#/components/schemas/TrackingOption'
- TrackingOption:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/tracking-categories/'
- properties:
- TrackingOptionID:
- description: The Xero identifier for a tracking option e.g.
- ae777a87-5ef3-4fa0-a4f0-d10e1f13073a
- type: string
- format: uuid
- Name:
- description: The name of the tracking option e.g. Marketing, East (max length = 100)
- maxLength: 100
- type: string
- Status:
- description: The status of a tracking option
- type: string
- enum:
- - ACTIVE
- - ARCHIVED
- - DELETED
- TrackingCategoryID:
- description: Filter by a tracking category e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
- type: string
- format: uuid
- type: object
- SalesTrackingCategory:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/tracking-categories/'
- properties:
- TrackingCategoryName:
- description: The default sales tracking category name for contacts
- type: string
- TrackingOptionName:
- description: The default purchase tracking category name for contacts
- type: string
- type: object
- Users:
- type: object
- x-objectArrayKey: users
- properties:
- Users:
- type: array
- items:
- $ref: '#/components/schemas/User'
- User:
- externalDocs:
- url: 'http://developer.xero.com/documentation/api/users/'
- properties:
- UserID:
- description: Xero identifier
- type: string
- format: uuid
- EmailAddress:
- description: Email address of user
- type: string
- FirstName:
- description: First name of user
- type: string
- LastName:
- description: Last name of user
- type: string
- UpdatedDateUTC:
- description: Timestamp of last change to user
- type: string
- x-is-msdate-time: true
- example: "/Date(1573755038314)/"
- readOnly: true
- IsSubscriber:
- description: Boolean to indicate if user is the subscriber
- type: boolean
- OrganisationRole:
- description: User role that defines permissions in Xero and via API (READONLY, INVOICEONLY, STANDARD, FINANCIALADVISER, etc)
- type: string
- enum:
- - READONLY
- - INVOICEONLY
- - STANDARD
- - FINANCIALADVISER
- - MANAGEDCLIENT
- - CASHBOOKCLIENT
- - UNKNOWN
- type: object
- Error:
- externalDocs:
- url: 'https://developer.xero.com/documentation/api/http-response-codes'
- properties:
- ErrorNumber:
- description: Exception number
- type: integer
- Type:
- description: Exception type
- type: string
- Message:
- description: Exception message
- type: string
- Elements:
- description: Array of Elements of validation Errors
- type: array
- items:
- $ref: '#/components/schemas/Element'
- type: object
- Element:
- externalDocs:
- url: 'https://developer.xero.com/documentation/api/http-response-codes'
- properties:
- ValidationErrors:
- description: Array of Validation Error message
- type: array
- items:
- $ref: '#/components/schemas/ValidationError'
- BatchPaymentID:
- description: Unique ID for batch payment object with validation error
- type: string
- format: uuid
- BankTransactionID:
- type: string
- format: uuid
- CreditNoteID:
- type: string
- format: uuid
- ContactID:
- type: string
- format: uuid
- InvoiceID:
- type: string
- format: uuid
- ItemID:
- type: string
- format: uuid
- PurchaseOrderID:
- type: string
- format: uuid
- type: object
- ValidationError:
- externalDocs:
- url: 'https://developer.xero.com/documentation/api/http-response-codes'
- properties:
- Message:
- description: Validation error message
- type: string
- type: object
- InvoiceAddress:
- properties:
- InvoiceAddressType:
- description: Indicates whether the address is defined as origin (FROM) or destination (TO)
- type: string
- enum:
- - FROM
- - TO
- AddressLine1:
- description: First line of a physical address
- type: string
- AddressLine2:
- description: Second line of a physical address
- type: string
- AddressLine3:
- description: Third line of a physical address
- type: string
- AddressLine4:
- description: Fourth line of a physical address
- type: string
- City:
- description: City of a physical address
- type: string
- Region:
- description: Region or state of a physical address
- type: string
- PostalCode:
- description: Postal code of a physical address
- type: string
- Country:
- description: Country of a physical address
- type: string
- type: object
- TaxBreakdownComponent:
- properties:
- TaxComponentId:
- description: The unique ID number of this component
- type: string
- format: uuid
- Type:
- description: The type of the jurisdiction
- type: string
- enum:
- - SYSGST/USCOUNTRY
- - SYSGST/USSTATE
- - SYSGST/USCOUNTY
- - SYSGST/USCITY
- - SYSGST/USSPECIAL
- Name:
- description: The name of the jurisdiction
- type: string
- TaxPercentage:
- description: The percentage of the tax
- type: number
- TaxAmount:
- description: The amount of the tax
- type: number
- TaxableAmount:
- description: The amount that is taxable
- type: number
- NonTaxableAmount:
- description: The amount that is not taxable
- type: number
- ExemptAmount:
- description: The amount that is exempt
- type: number
- StateAssignedNo:
- description: The state assigned number of the jurisdiction
- type: string
- JurisdictionRegion:
- description: Name identifying the region within the country
- type: string
- type: object
\ No newline at end of file
+openapi: 3.0.0
+info:
+ title: Xero Accounting API
+ version: 6.3.0
+ termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/
+ contact:
+ name: Xero Platform Team
+ email: api@xero.com
+ url: https://developer.xero.com
+servers:
+ - description: The Xero Accounting API exposes accounting and related functions of the main Xero application and can be used for a variety of purposes such as creating transactions like invoices and credit notes, right through to extracting accounting data via our reports endpoint.
+ url: https://api.xero.com/api.xro/2.0
+paths:
+ /Accounts:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ type: string
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getAccounts
+ summary: Retrieves the full chart of accounts
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="ACTIVE" AND Type=="BANK"
+ x-example-csharp: Status==\"ACTIVE\"
+ x-example-java: Status=="' + Account.StatusEnum.ACTIVE+ '"
+ x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Account::STATUS_ACTIVE . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::Account::ACTIVE}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Name ASC
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of type Accounts array with 0 to n Account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Accounts'
+ example:
+ Accounts:
+ - AccountID: ebd06280-af70-4bed-97c6-7451a454ad85
+ Code: "091"
+ Name: Business Savings Account
+ Type: BANK
+ TaxType: NONE
+ EnablePaymentsToAccount: false
+ BankAccountNumber: "0209087654321050"
+ BankAccountType: BANK
+ CurrencyCode: NZD
+ - AccountID: 7d05a53d-613d-4eb2-a2fc-dcb6adb80b80
+ Code: "200"
+ Name: Sales
+ Type: REVENUE
+ TaxType: OUTPUT2
+ Description: Income from any normal business activity
+ EnablePaymentsToAccount: false
+ put:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: createAccount
+ summary: Creates a new chart of accounts
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ x-hasAccountingValidationError: true
+ x-example:
+ - object:
+ is_object: true
+ key: account
+ keyPascal: Account
+ - code:
+ key: code
+ keyPascal: Code
+ default: 123456
+ object: account
+ - name:
+ key: name
+ keyPascal: Name
+ default: FooBar
+ object: account
+ - type:
+ key: type
+ keyPascal: Type
+ default: EXPENSE
+ nonString: true
+ php: XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE
+ node: AccountType.EXPENSE
+ ruby: XeroRuby::Accounting::AccountType::EXPENSE
+ python: AccountType.EXPENSE
+ java: com.xero.models.accounting.AccountType.EXPENSE
+ csharp: AccountType.EXPENSE
+ object: account
+ - description:
+ is_last: true
+ key: description
+ keyPascal: Description
+ default: Hello World
+ object: account
+ responses:
+ "200":
+ description: Success - created new Account and return response of type Accounts array with new Account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Accounts'
+ example:
+ Id: 11814c9d-3b5e-492e-93b0-fad16bf3244f
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550793549392)/
+ Accounts:
+ - AccountID: 66b262e2-561e-423e-8937-47d558f13442
+ Code: "123456"
+ Name: Foobar
+ Status: ACTIVE
+ Type: EXPENSE
+ TaxType: INPUT
+ Description: Hello World
+ Class: EXPENSE
+ EnablePaymentsToAccount: false
+ ShowInExpenseClaims: false
+ ReportingCode: EXP
+ ReportingCodeName: Expense
+ UpdatedDateUTC: /Date(1550793549320+0000)/
+ "400":
+ description: Validation Error - some data was incorrect returns response of type Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ example:
+ ErrorNumber: 10
+ Type: ValidationException
+ Message: A validation exception occurred
+ Elements:
+ - AccountID: 00000000-0000-0000-0000-000000000000
+ Code: "123456"
+ Name: Foobar
+ Type: EXPENSE
+ Description: Hello World
+ ValidationErrors:
+ - Message: Please enter a unique Name.
+ requestBody:
+ required: true
+ description: Account object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Account'
+ example:
+ Code: "123456"
+ Name: Foobar
+ Type: EXPENSE
+ Description: Hello World
+ /Accounts/{AccountID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getAccount
+ summary: Retrieves a single chart of accounts by using a unique account Id
+ parameters:
+ - $ref: '#/components/parameters/AccountID'
+ responses:
+ "200":
+ description: Success - return response of type Accounts array with one Account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Accounts'
+ example:
+ Id: 323455cc-9511-4451-a873-248d2983f38e
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550797359081)/
+ Accounts:
+ - AccountID: 99ce6032-0678-4aa0-8148-240c75fee33a
+ Code: "123456"
+ Name: FooBar
+ Status: ACTIVE
+ Type: EXPENSE
+ TaxType: INPUT
+ Description: Hello World
+ Class: EXPENSE
+ EnablePaymentsToAccount: false
+ ShowInExpenseClaims: false
+ ReportingCode: EXP
+ ReportingCodeName: Expense
+ UpdatedDateUTC: /Date(1550797359120+0000)/
+ post:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: updateAccount
+ summary: Updates a chart of accounts
+ x-hasAccountingValidationError: true
+ x-example:
+ - account:
+ is_object: true
+ key: account
+ keyPascal: Account
+ - code:
+ key: code
+ keyPascal: Code
+ default: 123456
+ object: account
+ - name:
+ key: name
+ keyPascal: Name
+ default: BarFoo
+ object: account
+ - type:
+ key: type
+ keyPascal: Type
+ default: EXPENSE
+ nonString: true
+ php: XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE
+ node: AccountType.EXPENSE
+ ruby: XeroRuby::Accounting::AccountType::EXPENSE
+ python: AccountType.EXPENSE
+ java: com.xero.models.accounting.AccountType.EXPENSE
+ csharp: AccountType.EXPENSE
+ object: account
+ - description:
+ key: description
+ keyPascal: Description
+ default: Hello World
+ object: account
+ - taxType:
+ is_last: true
+ key: taxType
+ keyPascal: TaxType
+ keySnake: tax_type
+ default: NONE
+ object: account
+ - accounts:
+ is_object: true
+ key: accounts
+ keyPascal: Accounts
+ - accounts:
+ is_last: true
+ is_array_add: true
+ key: accounts
+ keyPascal: Accounts
+ java: Accounts
+ csharp: Account
+ object: account
+ parameters:
+ - $ref: '#/components/parameters/AccountID'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - update existing Account and return response of type Accounts array with updated Account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Accounts'
+ example:
+ Id: 9012e75c-ec08-40a9-ae15-153fc1f35c4d
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550795389340)/
+ Accounts:
+ - AccountID: 99ce6032-0678-4aa0-8148-240c75fee33a
+ Code: "654321"
+ Name: BarFoo
+ Status: ACTIVE
+ Type: EXPENSE
+ TaxType: INPUT
+ Description: Good Bye World
+ Class: EXPENSE
+ EnablePaymentsToAccount: false
+ ShowInExpenseClaims: false
+ ReportingCode: EXP
+ ReportingCodeName: Expense
+ UpdatedDateUTC: /Date(1550795389333+0000)/
+ "400":
+ description: Validation Error - some data was incorrect returns response of type Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ example:
+ ErrorNumber: 10
+ Type: ValidationException
+ Message: A validation exception occurred
+ Elements:
+ - AccountID: 00000000-0000-0000-0000-000000000000
+ Code: "123456"
+ Name: Foobar
+ Type: EXPENSE
+ Description: Hello World
+ ValidationErrors:
+ - Message: Please enter a unique Name.
+ requestBody:
+ required: true
+ description: Request of type Accounts array with one Account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Accounts'
+ example:
+ Accounts:
+ - Code: "123456"
+ Name: BarFoo
+ AccountID: 99ce6032-0678-4aa0-8148-240c75fee33a
+ Type: EXPENSE
+ Description: GoodBye World
+ TaxType: INPUT
+ EnablePaymentsToAccount: false
+ ShowInExpenseClaims: false
+ Class: EXPENSE
+ ReportingCode: EXP
+ ReportingCodeName: Expense
+ UpdatedDateUTC: "2019-02-21T16:29:47.96-08:00"
+ delete:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: deleteAccount
+ x-hasAccountingValidationError: true
+ summary: Deletes a chart of accounts
+ parameters:
+ - $ref: '#/components/parameters/AccountID'
+ responses:
+ "200":
+ description: Success - delete existing Account and return response of type Accounts array with deleted Account
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Accounts'
+ example:
+ Id: 76bb0543-8efe-4acc-b7f6-67dfcdec37b4
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550798217216)/
+ Accounts:
+ - AccountID: 7f3c0bec-f3e7-4073-b4d6-cc56dd027ef1
+ Code: "123456"
+ Name: FooBar
+ Status: DELETED
+ Type: EXPENSE
+ TaxType: INPUT
+ Description: Hello World
+ Class: EXPENSE
+ EnablePaymentsToAccount: false
+ ShowInExpenseClaims: false
+ ReportingCode: EXP
+ ReportingCodeName: Expense
+ UpdatedDateUTC: /Date(1550798217210+0000)/
+ "400":
+ description: Validation Error - some data was incorrect returns response of type Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ example:
+ ErrorNumber: 10
+ Type: ValidationException
+ Message: A validation exception occurred
+ Elements:
+ - AccountID: 00000000-0000-0000-0000-000000000000
+ Code: "123456"
+ Name: Foobar
+ Type: EXPENSE
+ Description: Hello World
+ ValidationErrors:
+ - Message: Please enter a unique Name.
+ /Accounts/{AccountID}/Attachments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getAccountAttachments
+ summary: Retrieves attachments for a specific accounts by using a unique account Id
+ parameters:
+ - $ref: '#/components/parameters/AccountID'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array of Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 439c1573-3cd8-4697-a9f6-81fa651ee8f3
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550852630329)/
+ Attachments:
+ - AttachmentID: 52a643be-cd5c-489f-9778-53a9fd337756
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ /Accounts/{AccountID}/Attachments/{AttachmentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getAccountAttachmentById
+ summary: Retrieves a specific attachment from a specific account using a unique attachment Id
+ parameters:
+ - $ref: '#/components/parameters/AccountID'
+ - $ref: '#/components/parameters/AttachmentID'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Account as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /Accounts/{AccountID}/Attachments/{FileName}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getAccountAttachmentByFileName
+ summary: Retrieves an attachment for a specific account by filename
+ parameters:
+ - $ref: '#/components/parameters/AccountID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Account as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ post:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: updateAccountAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Updates attachment on a specific account by filename
+ parameters:
+ - $ref: '#/components/parameters/AccountID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array of Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: c8d6413a-1da2-4faa-9848-21f60443e906
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550859714477)/
+ Attachments:
+ - AttachmentID: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ description: Validation Error - some data was incorrect returns response of type Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ put:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: createAccountAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Creates an attachment on a specific account
+ parameters:
+ - $ref: '#/components/parameters/AccountID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array of Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 724cdff5-bcd1-4c5c-977e-e864c24258e0
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550856817769)/
+ Attachments:
+ - AttachmentID: ab95b276-9dce-4925-9077-439818ba270f
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /BatchPayments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ description: Batch payments allow you to bundle multiple bills or invoices into one payment transaction. This means a single payment in Xero can be reconciled with a single transaction on the bank statement making for a much simpler bank reconciliation experience.
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getBatchPayments
+ summary: Retrieves either one or many batch payments for invoices
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="AUTHORISED"
+ x-example-csharp: Status==\"AUTHORISED\"
+ x-example-java: Status=="' + BatchPayment.StatusEnum.AUTHORISED + '"
+ x-example-php: Status=="' . XeroAPI\XeroPHP\Models\Accounting\BatchPayment::STATUS_AUTHORISED . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::BatchPayment::AUTHORISED}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Date ASC
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of type BatchPayments array of BatchPayment objects
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BatchPayments'
+ example:
+ Id: 6ab84949-4fe5-4788-a135-4d8f690d24d7
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550866184006)/
+ BatchPayments:
+ - Account:
+ AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Reference: Hello World
+ BatchPaymentID: d0e9bbbf-5b8a-48b6-906a-035591fcb061
+ DateString: 2017-11-28T00:00:00
+ Date: /Date(1511827200000+0000)/
+ Payments:
+ - Invoice:
+ InvoiceID: 0975dec2-0cf6-498d-9c9f-c6775b45c61d
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ PaymentID: 97ec2ef8-f4d6-4de5-9f2a-385d41cdc2fc
+ Amount: 200.00
+ - Invoice:
+ InvoiceID: 600982d9-6605-4e11-afa1-d8dec2be7b52
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ PaymentID: e232795f-b919-4865-a754-12f6ae8402c0
+ Amount: 200.00
+ - Invoice:
+ InvoiceID: 99a2bd54-4ab1-413c-90bb-57f6464fe5d6
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ PaymentID: c2d571a5-38ff-4d37-9d43-dfadb4ad53ff
+ Amount: 200.00
+ - Invoice:
+ InvoiceID: c81942c8-bfc5-4c88-a21a-b892a4a8c1c5
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ PaymentID: 0f3c18dc-49bd-47a4-a875-03c84a29978f
+ Amount: 200.00
+ - Invoice:
+ InvoiceID: 6c9a1d89-8319-42f6-87d6-7690e748af85
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ PaymentID: 43541eed-f3ac-44ac-88cb-9fe1cb7ed8b8
+ Amount: 200.00
+ Type: RECBATCH
+ Status: AUTHORISED
+ TotalAmount: 1000.00
+ UpdatedDateUTC: /Date(1511893792820+0000)/
+ IsReconciled: false
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createBatchPayment
+ summary: Creates one or many batch payments for invoices
+ x-hasAccountingValidationError: true
+ x-example:
+ - currDate:
+ is_date: true
+ key: currDate
+ keyPascal: CurrDate
+ keySnake: curr_date
+ java_datatype: LocalDate
+ default: LocalDate.now()
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ node: '''2020-12-10'''
+ php: new DateTime('2020-12-10')
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - paymentAccount:
+ is_object: true
+ key: paymentAccount
+ keyPascal: Account
+ keySnake: payment_account
+ - accountID:
+ is_last: true
+ is_uuid: true
+ key: accountID
+ keyPascal: AccountID
+ keySnake: account_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: paymentAccount
+ - bankAccount:
+ is_object: true
+ key: bankAccount
+ keyPascal: Account
+ keySnake: bank_account
+ - accountID:
+ is_last: true
+ is_uuid: true
+ key: accountID
+ keyPascal: AccountID
+ keySnake: account_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: bankAccount
+ - invoice:
+ is_object: true
+ key: invoice
+ keyPascal: Invoice
+ - invoiceID:
+ is_last: true
+ is_uuid: true
+ key: invoiceID
+ keyPascal: InvoiceID
+ keySnake: invoice_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: invoice
+ - payment:
+ is_object: true
+ key: payment
+ keyPascal: Payment
+ - set_bankaccount:
+ is_variable: true
+ nonString: true
+ key: account
+ keyPascal: Account
+ default: bankAccount
+ python: bank_account
+ ruby: bank_account
+ object: payment
+ - date:
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: currDate
+ python: curr_date
+ ruby: curr_date
+ object: payment
+ - amount:
+ nonString: true
+ key: amount
+ keyPascal: Amount
+ default: 1.00
+ is_money: true
+ object: payment
+ - set_invoice:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: invoice
+ keyPascal: Invoice
+ default: invoice
+ object: payment
+ - payments:
+ is_list: true
+ key: payments
+ keyPascal: Payment
+ - add_payments:
+ is_last: true
+ is_list_add: true
+ key: payments
+ keyPascal: Payments
+ object: payment
+ - batchPayment:
+ is_object: true
+ key: batchPayment
+ keyPascal: BatchPayment
+ keySnake: batch_payment
+ - set_paymentaccount:
+ is_variable: true
+ nonString: true
+ key: account
+ keyPascal: Account
+ default: paymentAccount
+ python: payment_account
+ ruby: payment_account
+ object: batchPayment
+ - reference:
+ key: reference
+ keyPascal: Reference
+ default: hello foobar
+ object: batchPayment
+ - date:
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: currDate
+ python: curr_date
+ ruby: curr_date
+ object: batchPayment
+ - set_payments:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: payments
+ keyPascal: Payments
+ default: payments
+ object: batchPayment
+ - batchPayments:
+ is_object: true
+ key: batchPayments
+ keyPascal: BatchPayments
+ - add_batchPayments:
+ is_last: true
+ is_array_add: true
+ key: batchPayments
+ keyPascal: BatchPayments
+ keySnake: batch_payments
+ java: BatchPayments
+ python: batch_payment
+ ruby: batch_payment
+ csharp: BatchPayment
+ object: batchPayment
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type BatchPayments array of BatchPayment objects
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BatchPayments'
+ example:
+ Id: 424745ed-6356-46ad-87d4-3585f9062fb4
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550865988111)/
+ BatchPayments:
+ - Account:
+ AccountID: 5ec2f302-cd60-4f8b-a915-9229dd45e6fa
+ Reference: Foobar123
+ BatchPaymentID: d318c343-208e-49fe-b04a-45642349bcf1
+ DateString: 2019-02-22T00:00:00
+ Date: /Date(1550793600000+0000)/
+ Payments:
+ - Invoice:
+ InvoiceID: 3323652c-155e-433b-8a73-4dde7cfbf410
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ PaymentID: c05098fa-ae3c-4f00-80ec-0a9df07dedff
+ Amount: 1.00
+ - Invoice:
+ InvoiceID: e4abafb4-1f5b-4d9f-80b3-9a7b815bc302
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ PaymentID: 96409489-2f7d-4804-9a6d-6b939b0e038a
+ Amount: 1.00
+ - Invoice:
+ InvoiceID: e6039672-b161-40cd-b07b-a0178e7186ad
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ PaymentID: d2796067-bf71-4f06-b386-81f1454fa866
+ Amount: 1.00
+ Type: RECBATCH
+ Status: AUTHORISED
+ TotalAmount: 3.00
+ UpdatedDateUTC: /Date(1550865987783+0000)/
+ IsReconciled: false
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: BatchPayments with an array of Payments in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BatchPayments'
+ example:
+ BatchPayments:
+ - Account:
+ AccountID: 00000000-0000-0000-0000-000000000000
+ Reference: ref
+ Date: "2018-08-01"
+ Payments:
+ - Account:
+ Code: "001"
+ Date: "2019-12-31"
+ Amount: 500
+ Invoice:
+ InvoiceID: 00000000-0000-0000-0000-000000000000
+ LineItems: []
+ Contact: {}
+ Type: ACCPAY
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: deleteBatchPayment
+ summary: Updates a specific batch payment for invoices and credit notes
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ x-hasAccountingValidationError: true
+ x-example:
+ - batchPaymentDelete:
+ is_object: true
+ key: batchPaymentDelete
+ keyPascal: BatchPaymentDelete
+ - status:
+ is_last: true
+ key: status
+ keyPascal: Status
+ default: DELETED
+ object: batchPaymentDelete
+ - batchPaymentID:
+ is_last: true
+ is_uuid: true
+ key: batchPaymentID
+ keyPascal: BatchPaymentID
+ keySnake: batch_payment_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: batchPaymentDelete
+ responses:
+ "200":
+ description: Success - return response of type BatchPayments array for updated BatchPayment
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BatchPayments'
+ example:
+ Id: ee23328c-4a8b-4ee7-8fb6-9796ffab9cb0
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1583945852489)/
+ BatchPayments:
+ - Account:
+ AccountID: efb6e3a4-3156-4cee-bfe1-a282a3cc1d8f
+ BatchPaymentID: b649632e-2782-4c74-95a5-d994d7140ed9
+ DateString: 2022-08-01T00:00:00
+ Date: /Date(1659312000000+0000)/
+ Payments: []
+ Type: PAYBATCH
+ Status: DELETED
+ TotalAmount: 18.00
+ UpdatedDateUTC: /Date(1659377631813+0000)/
+ IsReconciled: false
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BatchPaymentDelete'
+ example:
+ BatchPaymentID: 9bf296e9-0748-4d29-a3dc-24dde1098030
+ Status: DELETED
+ /BatchPayments/{BatchPaymentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getBatchPayment
+ summary: Retrieves a specific batch payment using a unique batch payment Id
+ parameters:
+ - $ref: '#/components/parameters/BatchPaymentID'
+ responses:
+ "200":
+ description: Success - return response of type BatchPayments array with matching batch payment Id
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BatchPayments'
+ example:
+ Id: 6ab84949-4fe5-4788-a135-4d8f690d24d7
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550866184006)/
+ BatchPayments:
+ - Account:
+ AccountID: 13918178-849a-4823-9a31-57b7eac713d7
+ Reference: ref
+ BatchPaymentID: 44a1013e-4946-4a73-b207-dfe5424a5ea5
+ DateString: 2018-10-03T00:00:00
+ Date: /Date(1538524800000+0000)/
+ Payments:
+ - Invoice:
+ InvoiceID: 5aa9451d-95d1-4f95-a966-bbab2573f71c
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ PaymentID: a22a64cb-364e-43fa-9a1f-bb2cd1f4adde
+ Reference: ref/cheque
+ Amount: 913.55
+ - Invoice:
+ InvoiceID: 30a87092-31b5-4a2c-831e-327486533dd2
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ PaymentID: 6e20be79-32d8-4ae1-978e-f76d9b245c02
+ Amount: 495
+ - Invoice:
+ InvoiceID: 86d6e00f-ef56-49f7-9a54-796ccd5ca057
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ PaymentID: 4ba761b8-5940-4a3f-bcdf-7775adb00332
+ Amount: 3080
+ Type: RECBATCH
+ Status: AUTHORISED
+ TotalAmount: 4488.55
+ UpdatedDateUTC: /Date(1538525239370+0000)/
+ IsReconciled: false
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: deleteBatchPaymentByUrlParam
+ summary: Updates a specific batch payment for invoices and credit notes
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/BatchPaymentID'
+ responses:
+ "200":
+ description: Success - return response of type BatchPayments array for updated BatchPayment
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BatchPayments'
+ example:
+ Id: ee23328c-4a8b-4ee7-8fb6-9796ffab9cb0
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1583945852489)/
+ BatchPayments:
+ - Account:
+ AccountID: efb6e3a4-3156-4cee-bfe1-a282a3cc1d8f
+ BatchPaymentID: b649632e-2782-4c74-95a5-d994d7140ed9
+ DateString: 2022-08-01T00:00:00
+ Date: /Date(1659312000000+0000)/
+ Payments: []
+ Type: PAYBATCH
+ Status: DELETED
+ TotalAmount: 18.00
+ UpdatedDateUTC: /Date(1659377631813+0000)/
+ IsReconciled: false
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BatchPaymentDeleteByUrlParam'
+ example:
+ Status: DELETED
+ /BatchPayments/{BatchPaymentID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getBatchPaymentHistory
+ summary: Retrieves history from a specific batch payment
+ parameters:
+ - $ref: '#/components/parameters/BatchPaymentID'
+ responses:
+ "200":
+ description: Success - return response of HistoryRecords array of 0 to N HistoryRecord
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HistoryRecords'
+ example:
+ Id: c58e2f9c-baad-42a4-8bb7-f32b6f88fa04
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550898452503)/
+ HistoryRecords:
+ - Changes: Approved
+ DateUTCString: 2017-11-28T18:29:52
+ DateUTC: /Date(1511893792813+0000)/
+ User: Buzz Lightyear
+ Details: ""
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createBatchPaymentHistoryRecord
+ summary: Creates a history record for a specific batch payment
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/BatchPaymentID'
+ responses:
+ "200":
+ description: Success - return response of type HistoryRecords array of HistoryRecord objects
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HistoryRecords'
+ example:
+ Id: d7525479-3392-44c0-bb37-ff4a0b5df5bd
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550899400362)/
+ HistoryRecords:
+ - DateUTCString: 2019-02-23T05:23:20
+ DateUTC: /Date(1550899400362)/
+ Details: Hello World
+ ValidationErrors: []
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /BankTransactions:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getBankTransactions
+ summary: Retrieves any spent or received money transactions
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="AUTHORISED"
+ x-example-java: Status=="' + BankTransaction.StatusEnum.AUTHORISED + '"
+ x-example-csharp: Status==\"AUTHORISED\"
+ x-example-php: Status=="' . XeroAPI\XeroPHP\Models\Accounting\BankTransaction::STATUS_AUTHORISED . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::BankTransaction::AUTHORISED}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Type ASC
+ schema:
+ type: string
+ - in: query
+ name: page
+ description: Up to 100 bank transactions will be returned in a single API call with line items details
+ example: 1
+ schema:
+ type: integer
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/pageSize'
+ responses:
+ "200":
+ description: Success - return response of type BankTransactions array with 0 to n BankTransaction
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BankTransactions'
+ example:
+ Id: 18e7e80c-5dca-4a57-974e-8b572cc5efe8
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551212901659)/
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 3
+ BankTransactions:
+ - BankTransactionID: db54aab0-ad40-4ced-bcff-0940ba20db2c
+ BankAccount:
+ AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Code: "088"
+ Name: Business Wells Fargo
+ BatchPayment:
+ Account:
+ AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ BatchPaymentID: b54aa50c-794c-461b-89d1-846e1b84d9c0
+ Date: /Date(1476316800000+0000)/
+ Type: RECBATCH
+ Status: AUTHORISED
+ TotalAmount: "12.00"
+ UpdatedDateUTC: /Date(1476392487037+0000)/
+ IsReconciled: "false"
+ Type: RECEIVE
+ IsReconciled: false
+ PrepaymentID: cb62750f-b49c-464b-a45b-e2e2c514c8a9
+ HasAttachments: true
+ Contact:
+ ContactID: 9c2c64de-12c9-4167-b503-e2c0e1aa1f49
+ Name: sam
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2016-10-13T00:00:00
+ Date: /Date(1476316800000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems: []
+ SubTotal: 10
+ TotalTax: 0
+ Total: 10
+ UpdatedDateUTC: /Date(1476389616437+0000)/
+ CurrencyCode: USD
+ - BankTransactionID: 29a69c45-64ca-4805-a1cc-34990de837b3
+ BankAccount:
+ AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Code: "088"
+ Name: Business Wells Fargo
+ Type: SPEND-OVERPAYMENT
+ IsReconciled: false
+ OverpaymentID: 7d457db3-3b0a-47e9-8b79-81252a7bcdcb
+ HasAttachments: false
+ Contact:
+ ContactID: 9c2c64de-12c9-4167-b503-e2c0e1aa1f49
+ Name: sam
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2016-10-13T00:00:00
+ Date: /Date(1476316800000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: NoTax
+ LineItems: []
+ SubTotal: 9
+ TotalTax: 0
+ Total: 9
+ UpdatedDateUTC: /Date(1476389930500+0000)/
+ CurrencyCode: USD
+ - BankTransactionID: 0b89bf5c-d40b-4514-96be-36a739fb0188
+ BankAccount:
+ AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Code: "088"
+ Name: Business Wells Fargo
+ Type: SPEND-OVERPAYMENT
+ IsReconciled: false
+ OverpaymentID: bf9b5f33-c0d6-4182-84a2-40848023e5a1
+ HasAttachments: false
+ Contact:
+ ContactID: 9c2c64de-12c9-4167-b503-e2c0e1aa1f49
+ Name: sam
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2016-10-13T00:00:00
+ Date: /Date(1476316800000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: NoTax
+ LineItems: []
+ SubTotal: 8
+ TotalTax: 0
+ Total: 8
+ UpdatedDateUTC: /Date(1476392487037+0000)/
+ CurrencyCode: USD
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createBankTransactions
+ summary: Creates one or more spent or received money transaction
+ x-hasAccountingValidationError: true
+ x-example:
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_uuid: true
+ is_last: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - lineItem:
+ is_object: true
+ key: lineItem
+ keyPascal: LineItem
+ keySnake: line_item
+ - description:
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: lineItem
+ - quantity:
+ nonString: true
+ key: quantity
+ keyPascal: Quantity
+ default: 1.0
+ is_money: true
+ object: lineItem
+ - unitAmount:
+ nonString: true
+ key: unitAmount
+ keyPascal: UnitAmount
+ keySnake: unit_amount
+ default: 20.0
+ is_money: true
+ object: lineItem
+ - accountCode:
+ is_last: true
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: "000"
+ object: lineItem
+ - line_items:
+ is_list: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ csharp: LineItem
+ java: LineItem
+ - add_lineitems:
+ is_last: true
+ is_list_add: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ java: LineItems
+ python: line_item
+ ruby: line_item
+ csharp: LineItem
+ object: lineItem
+ - bankAccount:
+ is_object: true
+ key: bankAccount
+ keyPascal: Account
+ keySnake: bank_account
+ - accountID:
+ is_last: true
+ is_uuid: true
+ key: accountID
+ keyPascal: AccountID
+ keySnake: account_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: bankAccount
+ - bankTransaction:
+ is_object: true
+ key: bankTransaction
+ keyPascal: BankTransaction
+ keySnake: bank_transaction
+ - type:
+ nonString: true
+ key: type
+ keyPascal: Type
+ default: RECEIVE
+ php: XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE
+ node: BankTransaction.TypeEnum.RECEIVE
+ ruby: XeroRuby::Accounting::BankTransaction::RECEIVE
+ python_string: RECEIVE
+ java: com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE
+ csharp: BankTransaction.TypeEnum.RECEIVE
+ object: bankTransaction
+ - set_contact:
+ is_variable: true
+ nonString: true
+ key: contact
+ keyPascal: Contact
+ default: contact
+ object: bankTransaction
+ - set_lineitems:
+ is_variable: true
+ nonString: true
+ key: lineItems
+ keyPascal: LineItems
+ object: bankTransaction
+ default: lineItems
+ - set_bankaccount:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: bankAccount
+ keyPascal: BankAccount
+ keySnake: bank_account
+ python: bank_account
+ ruby: bank_account
+ default: bankAccount
+ object: bankTransaction
+ - bankTransactions:
+ is_object: true
+ key: bankTransactions
+ keyPascal: BankTransactions
+ - add_bankTransaction:
+ is_last: true
+ is_array_add: true
+ key: bankTransactions
+ keyPascal: BankTransactions
+ keySnake: bank_transactions
+ java: BankTransactions
+ python: bank_transaction
+ ruby: bank_transaction
+ csharp: BankTransaction
+ object: bankTransaction
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type BankTransactions array with new BankTransaction
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BankTransactions'
+ example:
+ Id: 5bc1d776-3c7f-4fe8-9b2d-09e747077a88
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551213568047)/
+ BankTransactions:
+ - BankTransactionID: 1289c190-e46d-434b-9628-463ffdb52f00
+ BankAccount:
+ AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Code: "088"
+ Name: Business Wells Fargo
+ Type: SPEND
+ Reference: ""
+ IsReconciled: false
+ CurrencyRate: 1.000000
+ Contact:
+ ContactID: 5cc8cf28-567e-4d43-b287-687cfcaec47c
+ ContactStatus: ACTIVE
+ Name: Katherine Warren
+ FirstName: Katherine
+ LastName: Warren
+ EmailAddress: kat.warren@clampett.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ - AddressType: POBOX
+ AddressLine1: ""
+ AddressLine2: ""
+ AddressLine3: ""
+ AddressLine4: ""
+ City: Palo Alto
+ Region: CA
+ PostalCode: "94020"
+ Country: United States
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 847-1294
+ PhoneAreaCode: (626)
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1503348544227+0000)/
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-02-26T00:00:00
+ Date: /Date(1551139200000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Inclusive
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.00
+ TaxType: TAX001
+ TaxAmount: 1.74
+ LineAmount: 20.00
+ AccountCode: "400"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: d2a06879-da49-4d6c-83b5-72a93a523ec6
+ AccountID: ebd06280-af70-4bed-97c6-7451a454ad85
+ ValidationErrors: []
+ SubTotal: 18.26
+ TotalTax: 1.74
+ Total: 20.00
+ UpdatedDateUTC: /Date(1551213567813+0000)/
+ CurrencyCode: USD
+ StatusAttributeString: ERROR
+ ValidationErrors:
+ - Message: 'The Contact must contain at least 1 of the following elements to identify the contact: Name, ContactID, ContactNumber'
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: BankTransactions with an array of BankTransaction objects in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BankTransactions'
+ example:
+ bankTransactions:
+ - type: BankTransaction.TypeEnum.SPEND
+ contact:
+ contactID: 00000000-0000-0000-0000-000000000000
+ lineItems:
+ - description: Foobar
+ quantity: 1.0
+ unitAmount: 20.0
+ accountCode: "000"
+ bankAccount:
+ code: "000"
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateOrCreateBankTransactions
+ summary: Updates or creates one or more spent or received money transaction
+ x-hasAccountingValidationError: true
+ x-example:
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_uuid: true
+ is_last: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - lineItem:
+ is_object: true
+ key: lineItem
+ keyPascal: LineItem
+ keySnake: line_item
+ - description:
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: lineItem
+ - quantity:
+ nonString: true
+ key: quantity
+ keyPascal: Quantity
+ default: 1.0
+ is_money: true
+ object: lineItem
+ - unitAmount:
+ nonString: true
+ key: unitAmount
+ keyPascal: UnitAmount
+ keySnake: unit_amount
+ default: 20.0
+ is_money: true
+ object: lineItem
+ - accountCode:
+ is_last: true
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: "000"
+ object: lineItem
+ - line_items:
+ is_list: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ csharp: LineItem
+ java: LineItem
+ - add_lineitems:
+ is_last: true
+ is_list_add: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ java: LineItems
+ python: line_item
+ ruby: line_item
+ csharp: LineItem
+ object: lineItem
+ - bankAccount:
+ is_object: true
+ key: bankAccount
+ keyPascal: Account
+ keySnake: bank_account
+ - accountID:
+ is_last: true
+ is_uuid: true
+ key: accountID
+ keyPascal: AccountID
+ keySnake: account_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: bankAccount
+ - bankTransaction:
+ is_object: true
+ key: bankTransaction
+ keyPascal: BankTransaction
+ keySnake: bank_transaction
+ - type:
+ nonString: true
+ key: type
+ keyPascal: Type
+ default: RECEIVE
+ php: XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE
+ node: BankTransaction.TypeEnum.RECEIVE
+ ruby: XeroRuby::Accounting::BankTransaction::RECEIVE
+ python_string: RECEIVE
+ java: com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE
+ csharp: BankTransaction.TypeEnum.RECEIVE
+ object: bankTransaction
+ - set_contact:
+ is_variable: true
+ nonString: true
+ key: contact
+ keyPascal: Contact
+ default: contact
+ object: bankTransaction
+ - set_lineitems:
+ is_variable: true
+ nonString: true
+ key: lineItems
+ keyPascal: LineItems
+ object: bankTransaction
+ default: lineItems
+ - set_bankaccount:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: bankAccount
+ keyPascal: BankAccount
+ keySnake: bank_account
+ python: bank_account
+ ruby: bank_account
+ default: bankAccount
+ object: bankTransaction
+ - bankTransactions:
+ is_object: true
+ key: bankTransactions
+ keyPascal: BankTransactions
+ - add_bankTransaction:
+ is_last: true
+ is_array_add: true
+ key: bankTransactions
+ keyPascal: BankTransactions
+ keySnake: bank_transactions
+ java: BankTransactions
+ python: bank_transaction
+ ruby: bank_transaction
+ csharp: BankTransaction
+ object: bankTransaction
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type BankTransactions array with new BankTransaction
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BankTransactions'
+ example:
+ Id: 5bc1d776-3c7f-4fe8-9b2d-09e747077a88
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551213568047)/
+ BankTransactions:
+ - BankTransactionID: 1289c190-e46d-434b-9628-463ffdb52f00
+ BankAccount:
+ AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Code: "088"
+ Name: Business Wells Fargo
+ Type: SPEND
+ Reference: ""
+ IsReconciled: false
+ CurrencyRate: 1.000000
+ Contact:
+ ContactID: 5cc8cf28-567e-4d43-b287-687cfcaec47c
+ ContactStatus: ACTIVE
+ Name: Katherine Warren
+ FirstName: Katherine
+ LastName: Warren
+ EmailAddress: kat.warren@clampett.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ - AddressType: POBOX
+ AddressLine1: ""
+ AddressLine2: ""
+ AddressLine3: ""
+ AddressLine4: ""
+ City: Palo Alto
+ Region: CA
+ PostalCode: "94020"
+ Country: United States
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 847-1294
+ PhoneAreaCode: (626)
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1503348544227+0000)/
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-02-26T00:00:00
+ Date: /Date(1551139200000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Inclusive
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.00
+ TaxType: TAX001
+ TaxAmount: 1.74
+ LineAmount: 20.00
+ AccountCode: "400"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: d2a06879-da49-4d6c-83b5-72a93a523ec6
+ AccountID: ebd06280-af70-4bed-97c6-7451a454ad85
+ ValidationErrors: []
+ SubTotal: 18.26
+ TotalTax: 1.74
+ Total: 20.00
+ UpdatedDateUTC: /Date(1551213567813+0000)/
+ CurrencyCode: USD
+ StatusAttributeString: ERROR
+ ValidationErrors:
+ - Message: 'The Contact must contain at least 1 of the following elements to identify the contact: Name, ContactID, ContactNumber'
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BankTransactions'
+ example:
+ BankTransactions:
+ - Type: SPEND
+ Contact:
+ ContactID: 00000000-0000-0000-0000-000000000000
+ Lineitems:
+ - Description: Foobar
+ Quantity: 1
+ UnitAmount: 20
+ AccountCode: "400"
+ BankAccount:
+ Code: "088"
+ /BankTransactions/{BankTransactionID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getBankTransaction
+ summary: Retrieves a single spent or received money transaction by using a unique bank transaction Id
+ parameters:
+ - $ref: '#/components/parameters/BankTransactionID'
+ - $ref: '#/components/parameters/unitdp'
+ responses:
+ "200":
+ description: Success - return response of type BankTransactions array with a specific BankTransaction
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BankTransactions'
+ example:
+ Id: 612e204d-21ab-469b-ac84-afe0697b4461
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551212902962)/
+ BankTransactions:
+ - BankTransactionID: db54aab0-ad40-4ced-bcff-0940ba20db2c
+ BankAccount:
+ AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Code: "088"
+ Name: Business Wells Fargo
+ BatchPayment:
+ Account:
+ AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ BatchPaymentID: b54aa50c-794c-461b-89d1-846e1b84d9c0
+ Date: /Date(1476316800000+0000)/
+ Type: RECBATCH
+ Status: AUTHORISED
+ TotalAmount: "12.00"
+ UpdatedDateUTC: /Date(1476392487037+0000)/
+ IsReconciled: "false"
+ Type: RECEIVE
+ IsReconciled: false
+ CurrencyRate: 1.000000
+ PrepaymentID: cb62750f-b49c-464b-a45b-e2e2c514c8a9
+ HasAttachments: true
+ Attachments:
+ - AttachmentID: 45dd3143-9856-42d2-9a6c-53814f67a33e
+ FileName: sample2.jpg
+ Url: https://api.xero.com/api.xro/2.0/banktransaction/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample2.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ Contact:
+ ContactID: 9c2c64de-12c9-4167-b503-e2c0e1aa1f49
+ ContactStatus: ACTIVE
+ Name: sam
+ EmailAddress: ""
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ - AddressType: POBOX
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1518821703467+0000)/
+ ContactGroups: []
+ DefaultCurrency: USD
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2016-10-13T00:00:00
+ Date: /Date(1476316800000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: hello
+ UnitAmount: 10.00
+ TaxType: OUTPUT
+ TaxAmount: 0.00
+ LineAmount: 10.00
+ AccountCode: "400"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 40bec527-a744-4149-96c5-0ab643b51158
+ AccountID: ebd06280-af70-4bed-97c6-7451a454ad85
+ ValidationErrors: []
+ SubTotal: 10.00
+ TotalTax: 0.00
+ Total: 10.00
+ UpdatedDateUTC: /Date(1476389616437+0000)/
+ CurrencyCode: USD
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateBankTransaction
+ summary: Updates a single spent or received money transaction
+ x-hasAccountingValidationError: true
+ x-example:
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_uuid: true
+ is_last: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - lineItem:
+ is_object: true
+ key: lineItem
+ keyPascal: LineItem
+ keySnake: line_item
+ - description:
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: lineItem
+ - quantity:
+ nonString: true
+ key: quantity
+ keyPascal: Quantity
+ default: 1.0
+ is_money: true
+ object: lineItem
+ - unitAmount:
+ nonString: true
+ key: unitAmount
+ keyPascal: UnitAmount
+ keySnake: unit_amount
+ default: 20.0
+ is_money: true
+ object: lineItem
+ - accountCode:
+ is_last: true
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: "000"
+ object: lineItem
+ - line_items:
+ is_list: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ csharp: LineItem
+ java: LineItem
+ - add_lineitems:
+ is_last: true
+ is_list_add: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ java: LineItems
+ python: line_item
+ ruby: line_item
+ csharp: LineItem
+ object: lineItem
+ - bankAccount:
+ is_object: true
+ key: bankAccount
+ keyPascal: Account
+ keySnake: bank_account
+ - accountID:
+ is_last: true
+ is_uuid: true
+ key: accountID
+ keyPascal: AccountID
+ keySnake: account_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: bankAccount
+ - bankTransaction:
+ is_object: true
+ key: bankTransaction
+ keyPascal: BankTransaction
+ keySnake: bank_transaction
+ - reference:
+ key: reference
+ keyPascal: Reference
+ default: You just updated
+ object: bankTransaction
+ - type:
+ nonString: true
+ key: type
+ keyPascal: Type
+ default: RECEIVE
+ php: XeroAPI\XeroPHP\Models\Accounting\BankTransaction::TYPE_RECEIVE
+ node: BankTransaction.TypeEnum.RECEIVE
+ ruby: XeroRuby::Accounting::BankTransaction::RECEIVE
+ python_string: RECEIVE
+ java: com.xero.models.accounting.BankTransaction.TypeEnum.RECEIVE
+ csharp: BankTransaction.TypeEnum.RECEIVE
+ object: bankTransaction
+ - set_contact:
+ is_variable: true
+ nonString: true
+ key: contact
+ keyPascal: Contact
+ default: contact
+ object: bankTransaction
+ - set_lineitems:
+ is_variable: true
+ nonString: true
+ key: lineItems
+ keyPascal: LineItems
+ object: bankTransaction
+ default: lineItems
+ - set_bankaccount:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: bankAccount
+ keyPascal: BankAccount
+ keySnake: bank_account
+ python: bank_account
+ ruby: bank_account
+ default: bankAccount
+ object: bankTransaction
+ - bankTransactions:
+ is_object: true
+ key: bankTransactions
+ keyPascal: BankTransactions
+ - add_bankTransaction:
+ is_last: true
+ is_array_add: true
+ key: bankTransactions
+ keyPascal: BankTransactions
+ keySnake: bank_transactions
+ java: BankTransactions
+ python: bank_transaction
+ ruby: bank_transaction
+ csharp: BankTransaction
+ object: bankTransaction
+ parameters:
+ - $ref: '#/components/parameters/BankTransactionID'
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type BankTransactions array with updated BankTransaction
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BankTransactions'
+ example:
+ Id: f2c7f037-96fc-49bd-8f59-d3c7bfdd4746
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551213568875)/
+ BankTransactions:
+ - BankTransactionID: 1289c190-e46d-434b-9628-463ffdb52f00
+ BankAccount:
+ AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Code: "088"
+ Name: Business Wells Fargo
+ Type: SPEND
+ Reference: You just updated
+ IsReconciled: false
+ CurrencyRate: 1.000000
+ HasAttachments: false
+ Attachments: []
+ Contact:
+ ContactID: 5cc8cf28-567e-4d43-b287-687cfcaec47c
+ ContactStatus: ACTIVE
+ Name: Katherine Warren
+ FirstName: Katherine
+ LastName: Warren
+ EmailAddress: kat.warren@clampett.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ - AddressType: POBOX
+ AddressLine1: ""
+ AddressLine2: ""
+ AddressLine3: ""
+ AddressLine4: ""
+ City: Palo Alto
+ Region: CA
+ PostalCode: "94020"
+ Country: United States
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 847-1294
+ PhoneAreaCode: (626)
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1503348544227+0000)/
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-02-25T00:00:00
+ Date: /Date(1551052800000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Inclusive
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.00
+ TaxType: TAX001
+ TaxAmount: 1.74
+ LineAmount: 20.00
+ AccountCode: "400"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: d2a06879-da49-4d6c-83b5-72a93a523ec6
+ AccountID: ebd06280-af70-4bed-97c6-7451a454ad85
+ ValidationErrors: []
+ SubTotal: 18.26
+ TotalTax: 1.74
+ Total: 20.00
+ UpdatedDateUTC: /Date(1551213568733+0000)/
+ CurrencyCode: USD
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BankTransactions'
+ example:
+ BankTransactions:
+ - Type: SPEND
+ Contact:
+ ContactID: 00000000-0000-0000-0000-000000000000
+ ContactStatus: ACTIVE
+ Name: Buzz Lightyear
+ FirstName: Buzz
+ LastName: Lightyear
+ EmailAddress: buzz.Lightyear@email.com
+ ContactPersons: []
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ - AddressType: POBOX
+ AddressLine1: ""
+ AddressLine2: ""
+ AddressLine3: ""
+ AddressLine4: ""
+ City: Palo Alto
+ Region: CA
+ PostalCode: "94020"
+ Country: United States
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 847-1294
+ PhoneAreaCode: (626)
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ UpdatedDateUTC: "2017-08-21T13:49:04.227-07:00"
+ ContactGroups: []
+ Lineitems: []
+ BankAccount:
+ Code: "088"
+ Name: Business Wells Fargo
+ AccountID: 00000000-0000-0000-0000-000000000000
+ IsReconciled: false
+ Date: "2019-02-25"
+ Reference: You just updated
+ CurrencyCode: USD
+ CurrencyRate: 1
+ Status: AUTHORISED
+ LineAmountTypes: Inclusive
+ TotalTax: 1.74
+ BankTransactionID: 00000000-0000-0000-0000-000000000000
+ UpdatedDateUTC: "2019-02-26T12:39:27.813-08:00"
+ /BankTransactions/{BankTransactionID}/Attachments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getBankTransactionAttachments
+ summary: Retrieves any attachments from a specific bank transactions
+ parameters:
+ - $ref: '#/components/parameters/BankTransactionID'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with 0 to n Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: c50798e1-29e9-4a30-a452-bb6e42e400c8
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551303999577)/
+ Attachments:
+ - AttachmentID: 4508a692-e52c-4ad8-a138-2f13e22bf57b
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ - AttachmentID: 45dd3143-9856-42d2-9a6c-53814f67a33e
+ FileName: sample2.jpg
+ Url: https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample2.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ /BankTransactions/{BankTransactionID}/Attachments/{AttachmentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getBankTransactionAttachmentById
+ summary: Retrieves specific attachments from a specific BankTransaction using a unique attachment Id
+ parameters:
+ - $ref: '#/components/parameters/BankTransactionID'
+ - $ref: '#/components/parameters/AttachmentID'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for BankTransaction as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /BankTransactions/{BankTransactionID}/Attachments/{FileName}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getBankTransactionAttachmentByFileName
+ summary: Retrieves a specific attachment from a specific bank transaction by filename
+ parameters:
+ - $ref: '#/components/parameters/BankTransactionID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for BankTransaction as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ post:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: updateBankTransactionAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Updates a specific attachment from a specific bank transaction by filename
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/BankTransactionID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of Attachments array of Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 572ad2fe-8c23-45aa-82f9-864485327685
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551286166630)/
+ Attachments:
+ - AttachmentID: 4508a692-e52c-4ad8-a138-2f13e22bf57b
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ put:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: createBankTransactionAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Creates an attachment for a specific bank transaction by filename
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/BankTransactionID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of Attachments array of Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 572ad2fe-8c23-45aa-82f9-864485327685
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551286166630)/
+ Attachments:
+ - AttachmentID: 4508a692-e52c-4ad8-a138-2f13e22bf57b
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/BankTransactions/db54aab0-ad40-4ced-bcff-0940ba20db2c/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /BankTransactions/{BankTransactionID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getBankTransactionsHistory
+ summary: Retrieves history from a specific bank transaction using a unique bank transaction Id
+ parameters:
+ - $ref: '#/components/parameters/BankTransactionID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createBankTransactionHistoryRecord
+ summary: Creates a history record for a specific bank transactions
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/BankTransactionID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /BankTransfers:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getBankTransfers
+ summary: Retrieves all bank transfers
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: HasAttachments==true
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Amount ASC
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of BankTransfers array of 0 to N BankTransfer
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BankTransfers'
+ example:
+ Id: dfc0d130-9007-4a98-a5ef-6f01700f18e2
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551311318988)/
+ BankTransfers:
+ - BankTransferID: 6221458a-ef7a-4d5f-9b1c-1b96ce03833c
+ CreatedDateUTCString: 2016-10-17T20:46:01
+ CreatedDateUTC: /Date(1476737161140+0000)/
+ DateString: 2016-11-12T21:10:00
+ Date: /Date(1478985000000+0000)/
+ FromBankAccount:
+ AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Name: Business Wells Fargo
+ ToBankAccount:
+ AccountID: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa
+ Name: My Savings
+ Amount: 20.00
+ FromBankTransactionID: a3eca480-bc04-4292-9bbd-5c57b8ba12b4
+ ToBankTransactionID: 4ca13f40-f3a0-4530-a442-a600f5696118
+ FromIsReconciled: true
+ ToIsReconciled: true
+ Reference: Sub 098801
+ HasAttachments: true
+ - BankTransferID: 9f0153d5-617c-4903-887b-3875807aa27a
+ CreatedDateUTCString: 2016-10-21T23:28:42
+ CreatedDateUTC: /Date(1477092522333+0000)/
+ DateString: 2016-10-19T20:10:00
+ Date: /Date(1476907800000+0000)/
+ FromBankAccount:
+ AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Name: Business Wells Fargo
+ ToBankAccount:
+ AccountID: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa
+ Name: My Savings
+ Amount: 20.00
+ FromBankTransactionID: cb74287e-5682-4973-b354-93e2c7a836d3
+ ToBankTransactionID: 4c48ba6c-f318-4405-aee6-b5efa2c70f55
+ FromIsReconciled: false
+ ToIsReconciled: false
+ Reference: Sub 098801
+ HasAttachments: false
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createBankTransfer
+ summary: Creates a bank transfer
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ x-hasAccountingValidationError: true
+ x-example:
+ - fromBankAccount:
+ is_object: true
+ key: fromBankAccount
+ keyPascal: Account
+ - accountID:
+ is_last: true
+ is_uuid: true
+ key: accountID
+ keyPascal: AccountID
+ keySnake: account_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: fromBankAccount
+ - toBankAccount:
+ is_object: true
+ key: toBankAccount
+ keyPascal: Account
+ - accountID:
+ is_last: true
+ is_uuid: true
+ key: accountID
+ keyPascal: AccountID
+ keySnake: account_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: toBankAccount
+ - bankTransfer:
+ is_object: true
+ key: bankTransfer
+ keyPascal: BankTransfer
+ keySnake: bank_transfer
+ - set_fromBankAccount:
+ is_variable: true
+ nonString: true
+ key: fromBankAccount
+ keyPascal: FromBankAccount
+ keySnake: from_bank_account
+ default: fromBankAccount
+ object: bankTransfer
+ - set_toBankAccount:
+ is_variable: true
+ nonString: true
+ key: toBankAccount
+ keyPascal: ToBankAccount
+ keySnake: to_bank_account
+ default: toBankAccount
+ object: bankTransfer
+ - amount:
+ is_last: true
+ nonString: true
+ key: amount
+ keyPascal: Amount
+ default: 1.0
+ is_money: true
+ object: bankTransfer
+ - bankTransfers:
+ is_object: true
+ key: bankTransfers
+ keyPascal: BankTransfers
+ - add_bankTransfer:
+ is_last: true
+ is_array_add: true
+ key: bankTransfers
+ keyPascal: BankTransfers
+ keySnake: bank_transfers
+ java: BankTransfers
+ python: bank_transfer
+ ruby: bank_transfer
+ csharp: BankTransfer
+ object: bankTransfer
+ responses:
+ "200":
+ description: Success - return response of BankTransfers array of one BankTransfer
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BankTransfers'
+ example:
+ Id: ae767b68-affd-4e17-bac0-83eaf1854dcd
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551311317475)/
+ BankTransfers:
+ - BankTransferID: 76eea4b6-f026-464c-b6f3-5fb39a196145
+ DateString: 2019-02-27T00:00:00
+ Date: /Date(1551225600000+0000)/
+ FromBankAccount:
+ AccountID: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa
+ Code: "090"
+ Name: My Savings
+ ToBankAccount:
+ AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Code: "088"
+ Name: Business Wells Fargo
+ Amount: 50.00
+ FromBankTransactionID: e4059952-5acb-4a56-b076-53fad85f2930
+ ToBankTransactionID: 88e4ac17-293b-4e5a-8d8b-3ce3a0b1ee17
+ FromIsReconciled: true
+ ToIsReconciled: true
+ Reference: Sub 098801
+ CurrencyRate: 1.000000
+ ValidationErrors: []
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: BankTransfers with array of BankTransfer objects in request body
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BankTransfers'
+ example:
+ BankTransfers:
+ - FromBankAccount:
+ Code: "090"
+ Name: My Savings
+ AccountID: 00000000-0000-0000-0000-000000000000
+ Type: BANK
+ BankAccountNumber: "123455"
+ Status: ACTIVE
+ BankAccountType: BANK
+ CurrencyCode: USD
+ TaxType: NONE
+ EnablePaymentsToAccount: false
+ ShowInExpenseClaims: false
+ Class: ASSET
+ ReportingCode: ASS
+ ReportingCodeName: Assets
+ HasAttachments: false
+ UpdatedDateUTC: "2016-10-17T13:45:33.993-07:00"
+ ToBankAccount:
+ Code: "088"
+ Name: Business Wells Fargo
+ AccountID: 00000000-0000-0000-0000-000000000000
+ Type: BANK
+ BankAccountNumber: "123455"
+ Status: ACTIVE
+ BankAccountType: BANK
+ CurrencyCode: USD
+ TaxType: NONE
+ EnablePaymentsToAccount: false
+ ShowInExpenseClaims: false
+ Class: ASSET
+ ReportingCode: ASS
+ ReportingCodeName: Assets
+ HasAttachments: false
+ UpdatedDateUTC: "2016-06-03T08:31:14.517-07:00"
+ Amount: "50.00"
+ FromIsReconciled: true
+ ToIsReconciled: true
+ Reference: Sub 098801
+ /BankTransfers/{BankTransferID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getBankTransfer
+ summary: Retrieves specific bank transfers by using a unique bank transfer Id
+ parameters:
+ - $ref: '#/components/parameters/BankTransferID'
+ responses:
+ "200":
+ description: Success - return response of BankTransfers array with one BankTransfer
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BankTransfers'
+ example:
+ Id: 1a5fa46d-5ece-4ef2-89b1-77c293b5d833
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551311320368)/
+ BankTransfers:
+ - BankTransferID: 6221458a-ef7a-4d5f-9b1c-1b96ce03833c
+ CreatedDateUTCString: 2016-10-17T20:46:01
+ CreatedDateUTC: /Date(1476737161140+0000)/
+ DateString: 2016-11-12T21:10:00
+ Date: /Date(1478985000000+0000)/
+ FromBankAccount:
+ AccountID: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Code: "088"
+ Name: Business Wells Fargo
+ ToBankAccount:
+ AccountID: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa
+ Code: "090"
+ Name: My Savings
+ Amount: 20.00
+ FromBankTransactionID: a3eca480-bc04-4292-9bbd-5c57b8ba12b4
+ ToBankTransactionID: 4ca13f40-f3a0-4530-a442-a600f5696118
+ FromIsReconciled: false
+ ToIsReconciled: false
+ Reference: Sub 098801
+ CurrencyRate: 1.000000
+ HasAttachments: true
+ Attachments:
+ - AttachmentID: e05a6fd8-0e47-47a9-9799-b809c8267260
+ FileName: HelloWorld.jpg
+ Url: https://api.xero.com/api.xro/2.0/banktransfer/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/HelloWorld.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ /BankTransfers/{BankTransferID}/Attachments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getBankTransferAttachments
+ summary: Retrieves attachments from a specific bank transfer
+ parameters:
+ - $ref: '#/components/parameters/BankTransferID'
+ responses:
+ "200":
+ description: Success - return response of Attachments array of 0 to N Attachment for a Bank Transfer
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 5cb6b587-7b02-46b6-97fe-d8ad8f20321b
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551397557272)/
+ Attachments:
+ - AttachmentID: e05a6fd8-0e47-47a9-9799-b809c8267260
+ FileName: HelloWorld.jpg
+ Url: https://api.xero.com/api.xro/2.0/BankTransfers/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/HelloWorld.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ /BankTransfers/{BankTransferID}/Attachments/{AttachmentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getBankTransferAttachmentById
+ summary: Retrieves a specific attachment from a specific bank transfer using a unique attachment ID
+ parameters:
+ - $ref: '#/components/parameters/BankTransferID'
+ - $ref: '#/components/parameters/AttachmentID'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of binary data from the Attachment to a Bank Transfer
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /BankTransfers/{BankTransferID}/Attachments/{FileName}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getBankTransferAttachmentByFileName
+ summary: Retrieves a specific attachment on a specific bank transfer by file name
+ parameters:
+ - $ref: '#/components/parameters/BankTransferID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of binary data from the Attachment to a Bank Transfer
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ post:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: updateBankTransferAttachmentByFileName
+ x-hasAccountingValidationError: true
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/BankTransferID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of Attachments array of 0 to N Attachment for a Bank Transfer
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: c7810140-19c2-4ff7-b3ec-b7e95ce7becf
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551398138226)/
+ Attachments:
+ - AttachmentID: 0851935c-c4c5-4de8-9247-ce22efde6f82
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/BankTransfers/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ put:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: createBankTransferAttachmentByFileName
+ x-hasAccountingValidationError: true
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/BankTransferID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of Attachments array of 0 to N Attachment for a Bank Transfer
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: b73ba149-76a9-4e7c-a5c6-b9230022f416
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551397998372)/
+ Attachments:
+ - AttachmentID: 9478be4c-c707-48c1-b4a7-83d8eaf442b5
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/BankTransfers/6221458a-ef7a-4d5f-9b1c-1b96ce03833c/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /BankTransfers/{BankTransferID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getBankTransferHistory
+ summary: Retrieves history from a specific bank transfer using a unique bank transfer Id
+ parameters:
+ - $ref: '#/components/parameters/BankTransferID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createBankTransferHistoryRecord
+ summary: Creates a history record for a specific bank transfer
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/BankTransferID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /BrandingThemes:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getBrandingThemes
+ summary: Retrieves all the branding themes
+ responses:
+ "200":
+ description: Success - return response of type BrandingThemes
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BrandingThemes'
+ example:
+ Id: d1a1beea-bdfe-4ee4-9dbc-27226a26cd68
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550881711906)/
+ BrandingThemes:
+ - BrandingThemeID: dabc7637-62c1-4941-8a6e-ee44fa5090e7
+ Name: Standard
+ SortOrder: 0
+ CreatedDateUTC: /Date(1464967643813+0000)/
+ /BrandingThemes/{BrandingThemeID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getBrandingTheme
+ summary: Retrieves a specific branding theme using a unique branding theme Id
+ parameters:
+ - $ref: '#/components/parameters/BrandingThemeID'
+ responses:
+ "200":
+ description: Success - return response of type BrandingThemes with one BrandingTheme
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/BrandingThemes'
+ example:
+ Id: df671650-cf14-4a7f-b609-4166933719bc
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550881713071)/
+ BrandingThemes:
+ - BrandingThemeID: dabc7637-62c1-4941-8a6e-ee44fa5090e7
+ Name: Standard
+ SortOrder: 0
+ CreatedDateUTC: /Date(1464967643813+0000)/
+ /BrandingThemes/{BrandingThemeID}/PaymentServices:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - paymentservices
+ tags:
+ - Accounting
+ operationId: getBrandingThemePaymentServices
+ summary: Retrieves the payment services for a specific branding theme
+ x-excludeFromPreview: true
+ parameters:
+ - $ref: '#/components/parameters/BrandingThemeID'
+ responses:
+ "200":
+ description: Success - return response of type PaymentServices array with 0 to N PaymentService
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaymentServices'
+ example:
+ Id: bfd5adbe-0e92-48f0-8c5a-39072f6c4ed3
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551139339419)/
+ PaymentServices:
+ - PaymentServiceID: 8cc53aa4-ae01-45b9-b06c-69c42eeae61f
+ PaymentServiceName: Buzz Lightyear
+ PaymentServiceType: PayPal
+ - PaymentServiceID: dede7858-14e3-4a46-bf95-4d4cc491e645
+ PaymentServiceName: ACME Payment
+ PaymentServiceUrl: https://www.payupnow.com/
+ PaymentServiceType: Custom
+ PayNowText: Pay Now
+ post:
+ security:
+ - OAuth2:
+ - paymentservices
+ tags:
+ - Accounting
+ operationId: createBrandingThemePaymentServices
+ summary: Creates a new custom payment service for a specific branding theme
+ x-excludeFromPreview: true
+ x-hasAccountingValidationError: true
+ x-example:
+ - object:
+ is_object: true
+ key: paymentService
+ keyPascal: PaymentService
+ keySnake: payment_service
+ - paymentServiceID:
+ is_uuid: true
+ key: paymentServiceID
+ keyPascal: PaymentServiceID
+ keySnake: payment_service_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: paymentService
+ - paymentServiceName:
+ key: paymentServiceName
+ keyPascal: PaymentServiceName
+ keySnake: payment_service_name
+ default: ACME Payments
+ object: paymentService
+ - paymentServiceUrl:
+ key: paymentServiceUrl
+ keyPascal: PaymentServiceUrl
+ keySnake: payment_service_url
+ default: https://www.payupnow.com/
+ object: paymentService
+ - payNowText:
+ is_last: true
+ key: payNowText
+ keyPascal: PayNowText
+ keySnake: pay_now_text
+ default: Pay Now
+ object: paymentService
+ - paymentServices:
+ is_object: true
+ key: paymentServices
+ keyPascal: PaymentServices
+ - add_paymentService:
+ is_last: true
+ is_array_add: true
+ key: paymentServices
+ keyPascal: PaymentServices
+ java: PaymentServices
+ csharp: PaymentService
+ object: paymentService
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/BrandingThemeID'
+ responses:
+ "200":
+ description: Success - return response of type PaymentServices array with newly created PaymentService
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaymentServices'
+ example:
+ Id: 918feecb-067a-4ed9-841b-571c04eaada3
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551139338915)/
+ PaymentServices:
+ - PaymentServiceID: 00000000-0000-0000-0000-000000000000
+ PaymentServiceName: ACME Payments
+ PaymentServiceUrl: https://www.payupnow.com/
+ PaymentServiceType: Custom
+ PayNowText: Pay Now
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: PaymentServices array with PaymentService object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaymentServices'
+ example:
+ PaymentServices:
+ - PaymentServiceID: 54b3b4f6-0443-4fba-bcd1-61ec0c35ca55
+ PaymentServiceName: PayUpNow
+ PaymentServiceUrl: https://www.payupnow.com/
+ PaymentServiceType: Custom
+ PayNowText: Time To Pay
+ /Budgets:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.budgets.read
+ tags:
+ - Accounting
+ operationId: getBudgets
+ summary: Retrieve a list of budgets
+ parameters:
+ - in: query
+ name: IDs
+ x-snake: ids
+ description: Filter by BudgetID. Allows you to retrieve a specific individual budget.
+ style: form
+ explode: false
+ example: '"00000000-0000-0000-0000-000000000000"'
+ x-example-java: UUID.fromString("00000000-0000-0000-0000-000000000000")
+ x-example-php: '"00000000-0000-0000-0000-000000000000"'
+ x-example-csharp: Guid.Parse("00000000-0000-0000-0000-000000000000");
+ schema:
+ type: string
+ items:
+ type: string
+ format: uuid
+ - in: query
+ name: DateTo
+ x-snake: date_to
+ description: Filter by start date
+ example: "2019-10-31"
+ schema:
+ type: string
+ format: date
+ - in: query
+ name: DateFrom
+ x-snake: date_from
+ description: Filter by end date
+ example: "2019-10-31"
+ schema:
+ type: string
+ format: date
+ responses:
+ "200":
+ description: Success - return response of type Budgets array with 0 to N Budgets
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Budgets'
+ example:
+ Id: 04e93d48-e72f-4775-b7dd-15a041fab972
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551399323399)/
+ Budgets:
+ - BudgetID: 847da917-9565-466c-a9cd-3ecf7eb9d094
+ Status: APPROVED
+ Description: FY2021 budget
+ Type: TRACKING
+ UpdatedDateUTC: /Date(1622138002077+0000)/
+ BudgetLines: []
+ Tracking: []
+ - BudgetID: 93a4bab1-0021-4320-a2ec-c250528b4bc5
+ Status: APPROVED
+ Description: Overall Budget
+ Type: OVERALL
+ UpdatedDateUTC: /Date(1622137786913+0000)/
+ BudgetLines: []
+ Tracking: []
+ /Budgets/{BudgetID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.budgets.read
+ tags:
+ - Accounting
+ operationId: getBudget
+ summary: Retrieves a specific budget, which includes budget lines
+ parameters:
+ - $ref: '#/components/parameters/BudgetID'
+ - in: query
+ name: DateTo
+ x-snake: date_to
+ description: Filter by start date
+ example: "2019-10-31"
+ schema:
+ type: string
+ format: date
+ - in: query
+ name: DateFrom
+ x-snake: date_from
+ description: Filter by end date
+ example: "2019-10-31"
+ schema:
+ type: string
+ format: date
+ responses:
+ "200":
+ description: Success - return response of type Invoices array with specified Invoices
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Budgets'
+ example:
+ Id: 04e93d48-e72f-4775-b7dd-15a041fab972
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551399323399)/
+ Budgets:
+ BudgetID: c1d195d4-92aa-4abd-867a-7ac2f9d60500
+ Type: TRACKING
+ Description: Daniels Northern Budget
+ UpdatedDateUTC: 2017-08-14T01:18:26.74
+ Tracking:
+ - TrackingCategoryID: e94ba240-3edf-4ef3-8317-10147b968f94
+ Name: Region
+ TrackingOptionID: e94ba240-3edf-4ef3-8317-10147b968f94
+ Option: North
+ - TrackingCategoryID: d8580491-4167-4a81-9624-ad3bdd8e46ce
+ Name: Salesperson
+ TrackingOptionID: 9c24de87-a2b7-439d-a216-35d1af7bdec3
+ Option: Daniel
+ BudgetLines:
+ - AccountID: 9c24de87-a2b7-439d-a216-35d1af7bdec3
+ AccountCode: "200"
+ BudgetBalances:
+ - Period: 2019-08
+ Amount: "1000"
+ Notes: Sample note
+ - Period: 2019-09
+ Amount: "1050"
+ Notes: ""
+ - Period: 2019-10
+ Amount: "1102"
+ Notes: ""
+ - AccountID: 385f90ae-e798-4990-9b1c-db8eb8b735c2
+ AccountCode: "420"
+ BudgetBalances:
+ - Period: 2019-08
+ Amount: "500"
+ Notes: ""
+ - Period: 2019-09
+ Amount: "505"
+ Notes: Special Month
+ - Period: 2019-10
+ Amount: "510"
+ Notes: ""
+ /Contacts:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ - accounting.contacts.read
+ tags:
+ - Accounting
+ operationId: getContacts
+ summary: Retrieves all contacts in a Xero organisation
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: ContactStatus=="ACTIVE"
+ x-example-csharp: ContactStatus==\"ACTIVE\"
+ x-example-java: ContactStatus=="' + Contact.ContactStatusEnum.ACTIVE + '"
+ x-example-php: ContactStatus=="' . \XeroAPI\XeroPHP\Models\Accounting\Contact::CONTACT_STATUS_ACTIVE . '"
+ x-example-ruby: ContactStatus==#{XeroRuby::Accounting::Contact::ACTIVE}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Name ASC
+ schema:
+ type: string
+ - in: query
+ name: IDs
+ x-snake: ids
+ description: Filter by a comma separated list of ContactIDs. Allows you to retrieve a specific set of contacts in a single call.
+ style: form
+ explode: false
+ example: '"00000000-0000-0000-0000-000000000000"'
+ x-example-java: Arrays.asList(UUID.fromString("00000000-0000-0000-0000-000000000000"))
+ x-example-php: '"00000000-0000-0000-0000-000000000000"'
+ x-example-csharp: new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")};
+ schema:
+ type: array
+ items:
+ type: string
+ format: uuid
+ - in: query
+ name: page
+ description: e.g. page=1 - Up to 100 contacts will be returned in a single API call.
+ example: 1
+ schema:
+ type: integer
+ - in: query
+ name: includeArchived
+ x-snake: include_archived
+ description: e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response
+ example: true
+ x-example-python: "True"
+ schema:
+ type: boolean
+ - $ref: '#/components/parameters/summaryOnly'
+ - in: query
+ name: searchTerm
+ x-snake: search_term
+ description: Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields.
+ example: Joe Bloggs
+ schema:
+ type: string
+ - $ref: '#/components/parameters/pageSize'
+ responses:
+ "200":
+ description: Success - return response of type Contacts array with 0 to N Contact
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Contacts'
+ example:
+ Id: 04e93d48-e72f-4775-b7dd-15a041fab972
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551399323399)/
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 2
+ Contacts:
+ - ContactID: 5cc8cf28-567e-4d43-b287-687cfcaec47c
+ ContactStatus: ACTIVE
+ Name: Katherine Warren
+ FirstName: Katherine
+ LastName: Warren
+ CompanyNumber: NumberBusiness1234
+ EmailAddress: kat.warren@clampett.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ - AddressType: POBOX
+ AddressLine1: ""
+ AddressLine2: ""
+ AddressLine3: ""
+ AddressLine4: ""
+ City: Palo Alto
+ Region: CA
+ PostalCode: "94020"
+ Country: United States
+ Phones:
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: DEFAULT
+ PhoneNumber: 847-1294
+ PhoneAreaCode: (626)
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1503348544227+0000)/
+ ContactGroups: []
+ IsSupplier: true
+ IsCustomer: true
+ SalesDefaultLineAmountType: INCLUSIVE
+ PurchasesDefaultLineAmountType: INCLUSIVE
+ Balances:
+ AccountsReceivable:
+ Outstanding: 760.00
+ Overdue: 920.00
+ AccountsPayable:
+ Outstanding: 231.60
+ Overdue: 360.00
+ ContactPersons: []
+ HasAttachments: false
+ HasValidationErrors: false
+ - ContactID: 3ec601ad-eddc-4ccb-a8ac-736e88293b1b
+ ContactStatus: ACTIVE
+ Name: Lisa Parker
+ FirstName: Lisa
+ LastName: Parker
+ EmailAddress: lparker@parkerandco.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ - AddressType: POBOX
+ AddressLine1: ""
+ AddressLine2: ""
+ AddressLine3: ""
+ AddressLine4: ""
+ City: Anchorage
+ Region: AK
+ PostalCode: "99501"
+ Country: United States
+ Phones:
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: DEFAULT
+ PhoneNumber: 266-3583
+ PhoneAreaCode: (510)
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1503348546760+0000)/
+ ContactGroups: []
+ IsSupplier: false
+ IsCustomer: false
+ ContactPersons: []
+ HasAttachments: false
+ HasValidationErrors: false
+ put:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ tags:
+ - Accounting
+ operationId: createContacts
+ summary: Creates multiple contacts (bulk) in a Xero organisation
+ x-hasAccountingValidationError: true
+ x-example:
+ - phone:
+ is_object: true
+ key: phone
+ keyPascal: Phone
+ - phoneNumber:
+ key: phoneNumber
+ keyPascal: PhoneNumber
+ keySnake: phone_number
+ default: 555-1212
+ object: phone
+ - phoneType:
+ is_last: true
+ nonString: true
+ key: phoneType
+ keyPascal: PhoneType
+ keySnake: phone_type
+ default: MOBILE
+ php: XeroAPI\XeroPHP\Models\Accounting\Phone::PHONE_TYPE_MOBILE
+ node: Phone.PhoneTypeEnum.MOBILE
+ ruby: XeroRuby::Accounting::PhoneType::MOBILE
+ python_string: MOBILE
+ java: com.xero.models.accounting.Phone.PhoneTypeEnum.MOBILE
+ csharp: Phone.PhoneTypeEnum.MOBILE
+ object: phone
+ - phones:
+ is_list: true
+ key: phones
+ keyPascal: Phone
+ - add_phone:
+ is_last: true
+ is_list_add: true
+ key: phones
+ keyPascal: Phones
+ object: phone
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - name:
+ key: name
+ keyPascal: Name
+ default: Bruce Banner
+ object: contact
+ - emailAddress:
+ key: emailAddress
+ keyPascal: EmailAddress
+ keySnake: email_address
+ default: hulk@avengers.com
+ object: contact
+ - set_phones:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: phones
+ keyPascal: Phones
+ default: phones
+ object: contact
+ - contacts:
+ is_object: true
+ key: contacts
+ keyPascal: Contacts
+ - add_contact:
+ is_last: true
+ is_array_add: true
+ key: contacts
+ keyPascal: Contacts
+ java: Contacts
+ csharp: Contact
+ object: contact
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Contacts array with newly created Contact
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Contacts'
+ example:
+ Id: e997d6d7-6dad-4458-beb8-d9c1bf7f2edf
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551399321121)/
+ Contacts:
+ - ContactID: 3ff6d40c-af9a-40a3-89ce-3c1556a25591
+ ContactStatus: ACTIVE
+ CompanyNumber: NumberBusiness1234
+ Name: Foo9987
+ EmailAddress: sid32476@blah.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ - AddressType: POBOX
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 555-1212
+ PhoneAreaCode: "415"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551399321043+0000)/
+ ContactGroups: []
+ IsSupplier: false
+ IsCustomer: false
+ SalesDefaultLineAmountType: INCLUSIVE
+ PurchasesDefaultLineAmountType: INCLUSIVE
+ SalesTrackingCategories: []
+ PurchasesTrackingCategories: []
+ PaymentTerms:
+ Bills:
+ Day: 15
+ Type: OFCURRENTMONTH
+ Sales:
+ Day: 10
+ Type: DAYSAFTERBILLMONTH
+ ContactPersons: []
+ HasValidationErrors: false
+ "400":
+ description: Validation Error - some data was incorrect returns response of type Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ example:
+ ErrorNumber: 10
+ Type: ValidationException
+ Message: A validation exception occurred
+ Elements:
+ - ContactID: 00000000-0000-0000-0000-000000000000
+ AccountNumber: 12345-ABCD
+ Name: Buzz Lightyear
+ EmailAddress: buzzlightyear@email.com
+ AccountsReceivableTaxType: NONE
+ AccountsPayableTaxType: INPUT
+ Addresses:
+ - AddressType: STREET
+ AddressLine1: 101 Green St
+ AddressLine2: 5th floor
+ City: San Francisco
+ Region: CA
+ PostalCode: "94041"
+ Country: US
+ AttentionTo: Rod Drury
+ ValidationErrors: []
+ Phones:
+ - PhoneType: MOBILE
+ PhoneNumber: 555-1212
+ PhoneAreaCode: "415"
+ ValidationErrors: []
+ ContactGroups: []
+ PaymentTerms:
+ Bills:
+ Day: 15
+ Type: OFCURRENTMONTH
+ ValidationErrors: []
+ Sales:
+ Day: 10
+ Type: DAYSAFTERBILLMONTH
+ ValidationErrors: []
+ ContactPersons: []
+ HasValidationErrors: true
+ ValidationErrors:
+ - Message: The contact name Buzz Lightyear is already assigned to another contact. The contact name must be unique across all active contacts.
+ requestBody:
+ required: true
+ description: Contacts with an array of Contact objects to create in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Contacts'
+ example:
+ Contacts:
+ - ContactID: 3ff6d40c-af9a-40a3-89ce-3c1556a25591
+ ContactStatus: ACTIVE
+ Name: Foo9987
+ EmailAddress: sid32476@blah.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ - AddressType: POBOX
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 555-1212
+ PhoneAreaCode: "415"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551399321043+0000)/
+ ContactGroups: []
+ IsSupplier: false
+ IsCustomer: false
+ SalesTrackingCategories: []
+ PurchasesTrackingCategories: []
+ PaymentTerms:
+ Bills:
+ Day: 15
+ Type: OFCURRENTMONTH
+ Sales:
+ Day: 10
+ Type: DAYSAFTERBILLMONTH
+ ContactPersons: []
+ post:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ tags:
+ - Accounting
+ operationId: updateOrCreateContacts
+ summary: Updates or creates one or more contacts in a Xero organisation
+ x-hasAccountingValidationError: true
+ x-example:
+ - phone:
+ is_object: true
+ key: phone
+ keyPascal: Phone
+ - phoneNumber:
+ key: phoneNumber
+ keyPascal: PhoneNumber
+ keySnake: phone_number
+ default: 555-1212
+ object: phone
+ - phoneType:
+ is_last: true
+ nonString: true
+ key: phoneType
+ keyPascal: PhoneType
+ keySnake: phone_type
+ default: MOBILE
+ php: XeroAPI\XeroPHP\Models\Accounting\Phone::PHONE_TYPE_MOBILE
+ node: Phone.PhoneTypeEnum.MOBILE
+ ruby: XeroRuby::Accounting::PhoneType::MOBILE
+ python_string: MOBILE
+ java: com.xero.models.accounting.Phone.PhoneTypeEnum.MOBILE
+ csharp: Phone.PhoneTypeEnum.MOBILE
+ object: phone
+ - phones:
+ is_list: true
+ key: phones
+ keyPascal: Phone
+ - add_phone:
+ is_last: true
+ is_list_add: true
+ key: phones
+ keyPascal: Phones
+ object: phone
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - name:
+ key: name
+ keyPascal: Name
+ default: Bruce Banner
+ object: contact
+ - emailAddress:
+ key: emailAddress
+ keyPascal: EmailAddress
+ keySnake: email_address
+ default: hulk@avengers.com
+ object: contact
+ - set_phones:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: phones
+ keyPascal: Phones
+ default: phones
+ object: contact
+ - contacts:
+ is_object: true
+ key: contacts
+ keyPascal: Contacts
+ - add_contact:
+ is_last: true
+ is_array_add: true
+ key: contacts
+ keyPascal: Contacts
+ java: Contacts
+ csharp: Contact
+ object: contact
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Contacts array with newly created Contact
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Contacts'
+ example:
+ Id: e997d6d7-6dad-4458-beb8-d9c1bf7f2edf
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551399321121)/
+ Contacts:
+ - ContactID: 00000000-0000-0000-0000-000000000000
+ ContactStatus: ACTIVE
+ Name: Bruce Banner
+ CompanyNumber: NumberBusiness1234
+ EmailAddress: bruce@banner.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ - AddressType: POBOX
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 555-1212
+ PhoneAreaCode: "415"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551399321043+0000)/
+ ContactGroups: []
+ IsSupplier: false
+ IsCustomer: false
+ SalesDefaultLineAmountType: INCLUSIVE
+ PurchasesDefaultLineAmountType: INCLUSIVE
+ SalesTrackingCategories: []
+ PurchasesTrackingCategories: []
+ PaymentTerms:
+ Bills:
+ Day: 15
+ Type: OFCURRENTMONTH
+ Sales:
+ Day: 10
+ Type: DAYSAFTERBILLMONTH
+ ContactPersons: []
+ HasValidationErrors: false
+ "400":
+ description: Validation Error - some data was incorrect returns response of type Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ example:
+ ErrorNumber: 10
+ Type: ValidationException
+ Message: A validation exception occurred
+ Elements:
+ - ContactID: 00000000-0000-0000-0000-000000000000
+ AccountNumber: 12345-ABCD
+ Name: Buzz Lightyear
+ EmailAddress: buzzlightyear@email.com
+ AccountsReceivableTaxType: NONE
+ AccountsPayableTaxType: INPUT
+ Addresses:
+ - AddressType: STREET
+ AddressLine1: 101 Green St
+ AddressLine2: 5th floor
+ City: San Francisco
+ Region: CA
+ PostalCode: "94041"
+ Country: US
+ AttentionTo: Rod Drury
+ ValidationErrors: []
+ Phones:
+ - PhoneType: MOBILE
+ PhoneNumber: 555-1212
+ PhoneAreaCode: "415"
+ ValidationErrors: []
+ ContactGroups: []
+ PaymentTerms:
+ Bills:
+ Day: 15
+ Type: OFCURRENTMONTH
+ ValidationErrors: []
+ Sales:
+ Day: 10
+ Type: DAYSAFTERBILLMONTH
+ ValidationErrors: []
+ ContactPersons: []
+ HasValidationErrors: true
+ ValidationErrors:
+ - Message: The contact name Buzz Lightyear is already assigned to another contact. The contact name must be unique across all active contacts.
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Contacts'
+ example:
+ Contacts:
+ - Name: Bruce Banner
+ EmailAddress: hulk@avengers.com
+ Phones:
+ - PhoneType: MOBILE
+ PhoneNumber: 555-1212
+ PhoneAreaCode: "415"
+ PaymentTerms:
+ Bills:
+ Day: 15
+ Type: OFCURRENTMONTH
+ Sales:
+ Day: 10
+ Type: DAYSAFTERBILLMONTH
+ /Contacts/{ContactNumber}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ - accounting.contacts.read
+ tags:
+ - Accounting
+ operationId: getContactByContactNumber
+ summary: Retrieves a specific contact by contact number in a Xero organisation
+ parameters:
+ - required: true
+ in: path
+ name: ContactNumber
+ x-snake: contact_number
+ description: This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50).
+ example: SB2
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of type Contacts array with a unique Contact
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Contacts'
+ example:
+ Id: 5c83b115-a6e8-4f2a-877f-ba63d009235b
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551462703288)/
+ Contacts:
+ - ContactID: 8138a266-fb42-49b2-a104-014b7045753d
+ ContactNumber: SB2
+ AccountNumber: "1234567"
+ ContactStatus: ACTIVE
+ Name: Acme Parts Co.
+ FirstName: Blake
+ LastName: Kohler
+ CompanyNumber: NumberBusiness1234
+ EmailAddress: bk@krave.co
+ BankAccountDetails: "12334567"
+ TaxNumber: 123-22-3456
+ AccountsReceivableTaxType: TAX003
+ AccountsPayableTaxType: TAX022
+ Addresses:
+ - AddressType: STREET
+ AddressLine1: 123 Fake Street
+ City: Vancouver
+ Region: British Columbia
+ PostalCode: V6B 2T4
+ Country: ""
+ AttentionTo: ""
+ - AddressType: POBOX
+ AddressLine1: 1234 Fake Street
+ City: Vancouver
+ Region: British Columbia
+ PostalCode: V6B 2T4
+ Country: ""
+ AttentionTo: Blake
+ Phones:
+ - PhoneType: DDI
+ PhoneNumber: 489-44493
+ PhoneAreaCode: "345"
+ PhoneCountryCode: "4"
+ - PhoneType: DEFAULT
+ PhoneNumber: 408-0914
+ PhoneAreaCode: "604"
+ PhoneCountryCode: "1"
+ - PhoneType: FAX
+ PhoneNumber: 123-9933
+ PhoneAreaCode: "123"
+ PhoneCountryCode: "2"
+ - PhoneType: MOBILE
+ PhoneNumber: 999-44
+ PhoneAreaCode: "234"
+ PhoneCountryCode: "3"
+ UpdatedDateUTC: /Date(1551459777193+0000)/
+ ContactGroups: []
+ IsSupplier: true
+ IsCustomer: true
+ SalesDefaultLineAmountType: INCLUSIVE
+ PurchasesDefaultLineAmountType: INCLUSIVE
+ DefaultCurrency: USD
+ Discount: 13.00
+ Website: http://www.google.com
+ BrandingTheme:
+ BrandingThemeID: dabc7637-62c1-4941-8a6e-ee44fa5090e7
+ Name: Standard
+ PurchasesDefaultAccountCode: "660"
+ SalesDefaultAccountCode: "002"
+ BatchPayments:
+ BankAccountNumber: "12334567"
+ BankAccountName: Citi Bank
+ Details: biz checking
+ Code: ""
+ Reference: ""
+ Balances:
+ AccountsReceivable:
+ Outstanding: 118.90
+ Overdue: 136.90
+ AccountsPayable:
+ Outstanding: -43.60
+ Overdue: 40.00
+ PaymentTerms:
+ Bills:
+ Day: 12
+ Type: OFFOLLOWINGMONTH
+ Sales:
+ Day: 14
+ Type: OFCURRENTMONTH
+ ContactPersons:
+ - FirstName: Sue
+ LastName: Johnson
+ EmailAddress: sue.johnson@krave.com
+ IncludeInEmails: true
+ HasAttachments: true
+ Attachments:
+ - AttachmentID: 04e0a3e3-b116-456a-9f32-9706f0d33afa
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/contact/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ HasValidationErrors: false
+ /Contacts/{ContactID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ - accounting.contacts.read
+ tags:
+ - Accounting
+ operationId: getContact
+ summary: Retrieves a specific contacts in a Xero organisation using a unique contact Id
+ parameters:
+ - $ref: '#/components/parameters/ContactID'
+ responses:
+ "200":
+ description: Success - return response of type Contacts array with a unique Contact
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Contacts'
+ example:
+ Id: 5c83b115-a6e8-4f2a-877f-ba63d009235b
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551462703288)/
+ Contacts:
+ - ContactID: 8138a266-fb42-49b2-a104-014b7045753d
+ ContactNumber: SB2
+ AccountNumber: "1234567"
+ ContactStatus: ACTIVE
+ Name: Acme Parts Co.
+ FirstName: Blake
+ LastName: Kohler
+ CompanyNumber: NumberBusiness1234
+ EmailAddress: bk@krave.co
+ BankAccountDetails: "12334567"
+ TaxNumber: 123-22-3456
+ AccountsReceivableTaxType: TAX003
+ AccountsPayableTaxType: TAX022
+ Addresses:
+ - AddressType: STREET
+ AddressLine1: 123 Fake Street
+ City: Vancouver
+ Region: British Columbia
+ PostalCode: V6B 2T4
+ Country: ""
+ AttentionTo: ""
+ - AddressType: POBOX
+ AddressLine1: 1234 Fake Street
+ City: Vancouver
+ Region: British Columbia
+ PostalCode: V6B 2T4
+ Country: ""
+ AttentionTo: Blake
+ Phones:
+ - PhoneType: DDI
+ PhoneNumber: 489-44493
+ PhoneAreaCode: "345"
+ PhoneCountryCode: "4"
+ - PhoneType: DEFAULT
+ PhoneNumber: 408-0914
+ PhoneAreaCode: "604"
+ PhoneCountryCode: "1"
+ - PhoneType: FAX
+ PhoneNumber: 123-9933
+ PhoneAreaCode: "123"
+ PhoneCountryCode: "2"
+ - PhoneType: MOBILE
+ PhoneNumber: 999-44
+ PhoneAreaCode: "234"
+ PhoneCountryCode: "3"
+ UpdatedDateUTC: /Date(1551459777193+0000)/
+ ContactGroups: []
+ IsSupplier: true
+ IsCustomer: true
+ SalesDefaultLineAmountType: INCLUSIVE
+ PurchasesDefaultLineAmountType: INCLUSIVE
+ DefaultCurrency: USD
+ Discount: 13.00
+ Website: http://www.google.com
+ BrandingTheme:
+ BrandingThemeID: dabc7637-62c1-4941-8a6e-ee44fa5090e7
+ Name: Standard
+ PurchasesDefaultAccountCode: "660"
+ SalesDefaultAccountCode: "002"
+ BatchPayments:
+ BankAccountNumber: "12334567"
+ BankAccountName: Citi Bank
+ Details: biz checking
+ Code: ""
+ Reference: ""
+ Balances:
+ AccountsReceivable:
+ Outstanding: 118.90
+ Overdue: 136.90
+ AccountsPayable:
+ Outstanding: -43.60
+ Overdue: 40.00
+ PaymentTerms:
+ Bills:
+ Day: 12
+ Type: OFFOLLOWINGMONTH
+ Sales:
+ Day: 14
+ Type: OFCURRENTMONTH
+ ContactPersons:
+ - FirstName: Sue
+ LastName: Johnson
+ EmailAddress: sue.johnson@krave.com
+ IncludeInEmails: true
+ HasAttachments: true
+ Attachments:
+ - AttachmentID: 04e0a3e3-b116-456a-9f32-9706f0d33afa
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/contact/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ HasValidationErrors: false
+ post:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ tags:
+ - Accounting
+ operationId: updateContact
+ summary: Updates a specific contact in a Xero organisation
+ x-hasAccountingValidationError: true
+ x-example:
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - name:
+ key: name
+ keyPascal: Name
+ default: Thanos
+ object: contact
+ - contactID:
+ is_last: true
+ is_uuid: true
+ key: contactID
+ keyPascal: ContactID
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - contacts:
+ is_object: true
+ key: contacts
+ keyPascal: Contacts
+ - add_contact:
+ is_last: true
+ is_array_add: true
+ key: contacts
+ keyPascal: Contacts
+ java: Contacts
+ csharp: Contact
+ object: contact
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ContactID'
+ responses:
+ "200":
+ description: Success - return response of type Contacts array with an updated Contact
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Contacts'
+ example:
+ Id: 4166b727-c3f0-4881-acd0-d4f7c0e8fcda
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551400031795)/
+ Contacts:
+ - ContactID: d5be01fb-b09f-4c3a-9c67-e10c2a03412c
+ ContactStatus: ACTIVE
+ Name: FooBar
+ EmailAddress: sid30680@blah.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ - AddressType: POBOX
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 555-1212
+ PhoneAreaCode: "415"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551400031763+0000)/
+ ContactGroups: []
+ IsSupplier: false
+ IsCustomer: false
+ SalesDefaultLineAmountType: INCLUSIVE
+ PurchasesDefaultLineAmountType: INCLUSIVE
+ SalesTrackingCategories: []
+ PurchasesTrackingCategories: []
+ PaymentTerms:
+ Bills:
+ Day: 15
+ Type: OFCURRENTMONTH
+ Sales:
+ Day: 10
+ Type: DAYSAFTERBILLMONTH
+ ContactPersons: []
+ HasValidationErrors: false
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ description: an array of Contacts containing single Contact object with properties to update
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Contacts'
+ example:
+ Contacts:
+ - ContactID: 00000000-0000-0000-0000-000000000000
+ Name: Thanos
+ /Contacts/{ContactID}/Attachments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getContactAttachments
+ x-hasAccountingValidationError: true
+ summary: Retrieves attachments for a specific contact in a Xero organisation
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with 0 to N Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 0f63b631-a205-496d-b1d2-e6b13a9b497b
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551483890413)/
+ Attachments:
+ - AttachmentID: 04e0a3e3-b116-456a-9f32-9706f0d33afa
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/Contacts/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ parameters:
+ - $ref: '#/components/parameters/ContactID'
+ /Contacts/{ContactID}/Attachments/{AttachmentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getContactAttachmentById
+ summary: Retrieves a specific attachment from a specific contact using a unique attachment Id
+ parameters:
+ - $ref: '#/components/parameters/ContactID'
+ - $ref: '#/components/parameters/AttachmentID'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Contact as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /Contacts/{ContactID}/Attachments/{FileName}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getContactAttachmentByFileName
+ summary: Retrieves a specific attachment from a specific contact by file name
+ parameters:
+ - $ref: '#/components/parameters/ContactID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Contact as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ post:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: updateContactAttachmentByFileName
+ x-hasAccountingValidationError: true
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ContactID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with an updated Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 8543ae1a-297c-49b8-bf91-47decac452d5
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551485146555)/
+ Attachments:
+ - AttachmentID: 8b537c1b-bbb5-47fd-857e-370c369dda7c
+ FileName: HelloWorld.jpg
+ Url: https://api.xero.com/api.xro/2.0/Contacts/8138a266-fb42-49b2-a104-014b7045753d/Attachments/HelloWorld.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ put:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: createContactAttachmentByFileName
+ x-hasAccountingValidationError: true
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ContactID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with an newly created Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: a5eddf71-86aa-42f5-99e2-0aaf9caf96b6
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551484292734)/
+ Attachments:
+ - AttachmentID: 27e37b01-6996-4ebe-836c-95fd472ad674
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/Contacts/8138a266-fb42-49b2-a104-014b7045753d/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /Contacts/{ContactID}/CISSettings:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getContactCISSettings
+ summary: Retrieves CIS settings for a specific contact in a Xero organisation
+ parameters:
+ - $ref: '#/components/parameters/ContactID'
+ responses:
+ "200":
+ description: Success - return response of type CISSettings for a specific Contact
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CISSettings'
+ example:
+ CISSetting:
+ - CISContractorEnabled: true
+ CISSubContractorEnabled: true
+ Rate: 100
+ /Contacts/{ContactID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ - accounting.contacts.read
+ tags:
+ - Accounting
+ operationId: getContactHistory
+ summary: Retrieves history records for a specific contact
+ parameters:
+ - $ref: '#/components/parameters/ContactID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ tags:
+ - Accounting
+ operationId: createContactHistory
+ summary: Creates a new history record for a specific contact
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ContactID'
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ "400":
+ $ref: '#/components/responses/400Error'
+ /ContactGroups:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ - accounting.contacts.read
+ tags:
+ - Accounting
+ operationId: getContactGroups
+ summary: Retrieves the contact Id and name of each contact group
+ parameters:
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="ACTIVE"
+ x-example-csharp: Status==\"ACTIVE\"
+ x-example-java: Status=="' + ContactGroup.StatusEnum.ACTIVE + '"
+ x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ContactGroup::STATUS_ACTIVE . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::ContactGroup::ACTIVE}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Name ASC
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of type Contact Groups array of Contact Group
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ContactGroups'
+ example:
+ Id: b825df86-1a72-49c9-97dd-36afc7d04bd5
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551746015603)/
+ ContactGroups:
+ - ContactGroupID: d7a86b80-8dac-4d89-a334-9dcf5753676c
+ Name: Suppliers
+ Status: ACTIVE
+ Contacts: []
+ HasValidationErrors: false
+ - ContactGroupID: ab089fd4-012f-4043-a6e4-e7be01e87e50
+ Name: Old Group84262
+ Status: ACTIVE
+ Contacts: []
+ HasValidationErrors: false
+ put:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ tags:
+ - Accounting
+ operationId: createContactGroup
+ summary: Creates a contact group
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ x-hasAccountingValidationError: true
+ x-example:
+ - contact:
+ is_object: true
+ key: contactGroup
+ keyPascal: ContactGroup
+ keySnake: contact_group
+ - name:
+ is_last: true
+ key: name
+ keyPascal: Name
+ default: VIPs
+ object: contactGroup
+ - contactGroups:
+ is_object: true
+ key: contactGroups
+ keyPascal: ContactGroups
+ - add_ContactGroup:
+ is_last: true
+ is_array_add: true
+ key: contactGroups
+ keyPascal: ContactGroups
+ keySnake: contact_groups
+ java: ContactGroups
+ python: contact_group
+ ruby: contact_group
+ csharp: ContactGroup
+ object: contactGroup
+ responses:
+ "200":
+ description: Success - return response of type Contact Groups array of newly created Contact Group
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ContactGroups'
+ example:
+ Id: 5afe53f9-2271-45b8-9767-88d023b71d34
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551745740920)/
+ ContactGroups:
+ - ContactGroupID: d7a86b80-8dac-4d89-a334-9dcf5753676c
+ Name: Suppliers
+ Status: ACTIVE
+ Contacts: []
+ HasValidationErrors: false
+ "400":
+ description: Validation Error - some data was incorrect returns response of type Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ example:
+ ErrorNumber: 10
+ Type: ValidationException
+ Message: A validation exception occurred
+ Elements:
+ - ContactGroupID: 00000000-0000-0000-0000-000000000000
+ Name: Suppliers
+ Contacts: []
+ HasValidationErrors: true
+ ValidationErrors:
+ - Message: You’ve reached the limit of 100 contact groups.
+ requestBody:
+ description: ContactGroups with an array of names in request body
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ContactGroups'
+ example:
+ ContactGroups:
+ - Name: VIPs
+ /ContactGroups/{ContactGroupID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ - accounting.contacts.read
+ tags:
+ - Accounting
+ operationId: getContactGroup
+ summary: Retrieves a specific contact group by using a unique contact group Id
+ parameters:
+ - $ref: '#/components/parameters/ContactGroupID'
+ responses:
+ "200":
+ description: Success - return response of type Contact Groups array with a specific Contact Group
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ContactGroups'
+ example:
+ Id: 079c14f6-2c2d-464e-a2c7-0edf7e465723
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551746772976)/
+ ContactGroups:
+ - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22
+ Name: Oasis
+ Status: ACTIVE
+ Contacts:
+ - ContactID: 4e1753b9-018a-4775-b6aa-1bc7871cfee3
+ Name: Noel Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ - ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ HasValidationErrors: false
+ post:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ tags:
+ - Accounting
+ operationId: updateContactGroup
+ summary: Updates a specific contact group
+ x-hasAccountingValidationError: true
+ x-example:
+ - contact:
+ is_object: true
+ key: contactGroup
+ keyPascal: ContactGroup
+ keySnake: contact_group
+ - name:
+ is_last: true
+ key: name
+ keyPascal: Name
+ default: Vendor
+ object: contactGroup
+ - contactGroups:
+ is_object: true
+ key: contactGroups
+ keyPascal: ContactGroups
+ - add_ContactGroup:
+ is_last: true
+ is_array_add: true
+ key: contactGroups
+ keyPascal: ContactGroups
+ keySnake: contact_groups
+ java: ContactGroups
+ python: contact_group
+ ruby: contact_group
+ csharp: ContactGroup
+ object: contactGroup
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ContactGroupID'
+ responses:
+ "200":
+ description: Success - return response of type Contact Groups array of updated Contact Group
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ContactGroups'
+ example:
+ Id: b1ba6cdb-1637-4209-bb92-bd0c593f3243
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551746288544)/
+ ContactGroups:
+ - ContactGroupID: 13f47537-7c1d-4e62-966e-617d76558fc5
+ Name: Supplier Vendor
+ Status: ACTIVE
+ Contacts: []
+ HasValidationErrors: false
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ description: an array of Contact groups with Name of specific group to update
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ContactGroups'
+ example:
+ ContactGroups:
+ - Name: Suppliers
+ /ContactGroups/{ContactGroupID}/Contacts:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ put:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ tags:
+ - Accounting
+ operationId: createContactGroupContacts
+ summary: Creates contacts to a specific contact group
+ x-hasAccountingValidationError: true
+ x-example:
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_last: true
+ is_uuid: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - contacts:
+ is_object: true
+ key: contacts
+ keyPascal: Contacts
+ - add_contact:
+ is_last: true
+ is_array_add: true
+ key: contacts
+ keyPascal: Contacts
+ java: Contacts
+ csharp: Contact
+ object: contact
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ContactGroupID'
+ responses:
+ "200":
+ description: Success - return response of type Contacts array of added Contacts
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Contacts'
+ example:
+ Id: 99db8024-6895-45c8-a1b5-54805aa8689c
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551747495785)/
+ Contacts:
+ - ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ ValidationErrors: []
+ - ContactID: 4e1753b9-018a-4775-b6aa-1bc7871cfee3
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ ValidationErrors: []
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ description: Contacts with array of contacts specifying the ContactID to be added to ContactGroup in body of request
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Contacts'
+ example:
+ Contacts:
+ - ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7
+ - ContactID: 4e1753b9-018a-4775-b6aa-1bc7871cfee3
+ delete:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ tags:
+ - Accounting
+ operationId: deleteContactGroupContacts
+ summary: Deletes all contacts from a specific contact group
+ parameters:
+ - $ref: '#/components/parameters/ContactGroupID'
+ responses:
+ "204":
+ description: Success - return response 204 no content
+ x-isEmpty: true
+ /ContactGroups/{ContactGroupID}/Contacts/{ContactID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ delete:
+ security:
+ - OAuth2:
+ - accounting.contacts
+ tags:
+ - Accounting
+ operationId: deleteContactGroupContact
+ summary: Deletes a specific contact from a contact group using a unique contact Id
+ parameters:
+ - $ref: '#/components/parameters/ContactGroupID'
+ - $ref: '#/components/parameters/ContactID'
+ responses:
+ "204":
+ description: Success - return response 204 no content
+ x-isEmpty: true
+ "400":
+ $ref: '#/components/responses/400Error'
+ /CreditNotes:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getCreditNotes
+ summary: Retrieves any credit notes
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="DRAFT"
+ x-example-csharp: Status==\"DRAFT\"
+ x-example-java: Status=="' + CreditNote.StatusEnum.DRAFT + '"
+ x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\CreditNote::STATUS_DRAFT . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::CreditNote::DRAFT}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: CreditNoteNumber ASC
+ schema:
+ type: string
+ - in: query
+ 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
+ example: 1
+ schema:
+ type: integer
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/pageSize'
+ responses:
+ "200":
+ description: Success - return response of type Credit Notes array of CreditNote
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreditNotes'
+ example:
+ Id: 306379b0-3d75-4c77-953a-be08fa0efae8
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551812506620)/
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 2
+ CreditNotes:
+ - CreditNoteID: 249f15fa-f2a7-4acc-8769-0984103f2225
+ CreditNoteNumber: CN-0005
+ Payments:
+ - PaymentID: 6b037c9b-2e5d-4905-84d3-eabfb3438242
+ Date: /Date(1552521600000+0000)/
+ Amount: 2.00
+ Reference: Too much
+ CurrencyRate: 1.000000
+ HasAccount: false
+ HasValidationErrors: false
+ ID: 249f15fa-f2a7-4acc-8769-0984103f2225
+ CurrencyRate: 1.000000
+ Type: ACCRECCREDIT
+ Reference: US Tour
+ RemainingCredit: 32.50
+ Allocations: []
+ HasAttachments: true
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-03-05T00:00:00
+ Date: /Date(1551744000000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems: []
+ SubTotal: 30.00
+ TotalTax: 4.50
+ Total: 34.50
+ UpdatedDateUTC: /Date(1551812346157+0000)/
+ CurrencyCode: NZD
+ - CreditNoteID: f8021bd2-9a6a-4c19-8477-163da0b9290f
+ CreditNoteNumber: ""
+ Payments: []
+ ID: f8021bd2-9a6a-4c19-8477-163da0b9290f
+ CurrencyRate: 1.000000
+ Type: ACCPAYCREDIT
+ Reference: ""
+ RemainingCredit: 46.00
+ Allocations: []
+ HasAttachments: false
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-01-05T00:00:00
+ Date: /Date(1546646400000+0000)/
+ Status: DRAFT
+ LineAmountTypes: Exclusive
+ LineItems: []
+ SubTotal: 40.00
+ TotalTax: 6.00
+ Total: 46.00
+ UpdatedDateUTC: /Date(1551812506153+0000)/
+ CurrencyCode: NZD
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createCreditNotes
+ summary: Creates a new credit note
+ x-hasAccountingValidationError: true
+ x-example:
+ - currDate:
+ is_date: true
+ key: currDate
+ keyPascal: CurrDate
+ keySnake: curr_date
+ java_datatype: LocalDate
+ default: LocalDate.now()
+ java: LocalDate.now()
+ node: '''2020-12-10'''
+ csharp: DateTime.Now
+ php: new DateTime('2020-12-10')
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_last: true
+ is_uuid: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - lineItem:
+ is_object: true
+ key: lineItem
+ keyPascal: LineItem
+ keySnake: line_item
+ - description:
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: lineItem
+ - quantity:
+ nonString: true
+ key: quantity
+ keyPascal: Quantity
+ default: 1.0
+ is_money: true
+ object: lineItem
+ - unitAmount:
+ nonString: true
+ key: unitAmount
+ keyPascal: UnitAmount
+ keySnake: unit_amount
+ default: 20.0
+ is_money: true
+ object: lineItem
+ - accountCode:
+ is_last: true
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: "000"
+ object: lineItem
+ - line_items:
+ is_list: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ csharp: LineItem
+ java: LineItem
+ - add_lineitems:
+ is_last: true
+ is_list_add: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ java: LineItems
+ python: line_item
+ ruby: line_item
+ csharp: LineItem
+ object: lineItem
+ - creditNote:
+ is_object: true
+ key: creditNote
+ keyPascal: CreditNote
+ keySnake: credit_note
+ - type:
+ nonString: true
+ key: type
+ keyPascal: Type
+ default: ACCPAYCREDIT
+ php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT
+ node: CreditNote.TypeEnum.ACCPAYCREDIT
+ ruby: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT
+ python_string: ACCPAYCREDIT
+ java: com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT
+ csharp: CreditNote.TypeEnum.ACCPAYCREDIT
+ object: creditNote
+ - set_contact:
+ is_variable: true
+ nonString: true
+ key: contact
+ keyPascal: Contact
+ default: contact
+ object: creditNote
+ - date:
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: currDate
+ python: curr_date
+ ruby: curr_date
+ object: creditNote
+ - set_lineitem:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ default: lineItems
+ python: line_items
+ ruby: line_items
+ object: creditNote
+ - creditNotes:
+ is_object: true
+ key: creditNotes
+ keyPascal: CreditNotes
+ - add_creditNote:
+ is_last: true
+ is_array_add: true
+ key: creditNotes
+ keyPascal: CreditNotes
+ keySnake: credit_notes
+ java: CreditNotes
+ python: credit_note
+ ruby: credit_note
+ csharp: CreditNote
+ object: creditNote
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Credit Notes array of newly created CreditNote
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreditNotes'
+ example:
+ Id: 5e57a661-42da-4a19-96a0-00405a0e946d
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551812702713)/
+ CreditNotes:
+ - CreditNoteID: f9256f04-5a99-4680-acb9-6b4639cc439a
+ CreditNoteNumber: ""
+ Payments: []
+ ID: f9256f04-5a99-4680-acb9-6b4639cc439a
+ CurrencyRate: 1.000000
+ Type: ACCPAYCREDIT
+ Reference: ""
+ RemainingCredit: 46.00
+ Allocations: []
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ AttentionTo: ""
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-01-05T00:00:00
+ Date: /Date(1546646400000+0000)/
+ Status: DRAFT
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.00
+ TaxType: INPUT2
+ TaxAmount: 6.00
+ LineAmount: 40.00
+ AccountCode: "400"
+ Tracking: []
+ Quantity: 2.0000
+ ValidationErrors: []
+ SubTotal: 40.00
+ TotalTax: 6.00
+ Total: 46.00
+ UpdatedDateUTC: /Date(1551812702650+0000)/
+ CurrencyCode: NZD
+ StatusAttributeString: OK
+ ValidationErrors:
+ - Message: An existing Credit Note with the specified CreditNoteID could not be found
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ description: Credit Notes with array of CreditNote object in body of request
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreditNotes'
+ example:
+ CreditNotes:
+ - Type: ACCPAYCREDIT
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Date: "2019-01-05"
+ LineItems:
+ - Description: Foobar
+ Quantity: 2.0
+ UnitAmount: 20.0
+ AccountCode: "400"
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateOrCreateCreditNotes
+ summary: Updates or creates one or more credit notes
+ x-hasAccountingValidationError: true
+ x-example:
+ - currDate:
+ is_date: true
+ key: currDate
+ keyPascal: CurrDate
+ keySnake: curr_date
+ java_datatype: LocalDate
+ default: LocalDate.now()
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ node: '''2020-12-10'''
+ php: new DateTime('2020-12-10')
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_last: true
+ is_uuid: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - lineItem:
+ is_object: true
+ key: lineItem
+ keyPascal: LineItem
+ keySnake: line_item
+ - description:
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: lineItem
+ - quantity:
+ nonString: true
+ key: quantity
+ keyPascal: Quantity
+ default: 1.0
+ is_money: true
+ object: lineItem
+ - unitAmount:
+ nonString: true
+ key: unitAmount
+ keyPascal: UnitAmount
+ keySnake: unit_amount
+ default: 20.0
+ is_money: true
+ object: lineItem
+ - accountCode:
+ is_last: true
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: "000"
+ object: lineItem
+ - line_items:
+ is_list: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ csharp: LineItem
+ java: LineItem
+ - add_lineitems:
+ is_last: true
+ is_list_add: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ java: LineItems
+ python: line_item
+ ruby: line_item
+ csharp: LineItem
+ object: lineItem
+ - creditNote:
+ is_object: true
+ key: creditNote
+ keyPascal: CreditNote
+ keySnake: credit_note
+ - type:
+ nonString: true
+ key: type
+ keyPascal: Type
+ default: ACCPAYCREDIT
+ php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT
+ node: CreditNote.TypeEnum.ACCPAYCREDIT
+ ruby: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT
+ python_string: ACCPAYCREDIT
+ java: com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT
+ csharp: CreditNote.TypeEnum.ACCPAYCREDIT
+ object: creditNote
+ - set_contact:
+ is_variable: true
+ nonString: true
+ key: contact
+ keyPascal: Contact
+ default: contact
+ object: creditNote
+ - date:
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: currDate
+ python: curr_date
+ ruby: curr_date
+ object: creditNote
+ - set_lineitem:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ default: lineItems
+ python: line_items
+ ruby: line_items
+ object: creditNote
+ - creditNotes:
+ is_object: true
+ key: creditNotes
+ keyPascal: CreditNotes
+ - add_creditNote:
+ is_last: true
+ is_array_add: true
+ key: creditNotes
+ keyPascal: CreditNotes
+ keySnake: credit_notes
+ java: CreditNotes
+ python: credit_note
+ ruby: credit_note
+ csharp: CreditNote
+ object: creditNote
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Credit Notes array of newly created CreditNote
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreditNotes'
+ example:
+ Id: 5e57a661-42da-4a19-96a0-00405a0e946d
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551812702713)/
+ CreditNotes:
+ - CreditNoteID: f9256f04-5a99-4680-acb9-6b4639cc439a
+ CreditNoteNumber: ""
+ Payments: []
+ ID: f9256f04-5a99-4680-acb9-6b4639cc439a
+ CurrencyRate: 1.000000
+ Type: ACCPAYCREDIT
+ Reference: ""
+ SentToContact: true
+ RemainingCredit: 46.00
+ Allocations: []
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ AttentionTo: ""
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-01-05T00:00:00
+ Date: /Date(1546646400000+0000)/
+ Status: DRAFT
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.00
+ TaxType: INPUT2
+ TaxAmount: 6.00
+ LineAmount: 40.00
+ AccountCode: "400"
+ Tracking: []
+ Quantity: 2.0000
+ ValidationErrors: []
+ SubTotal: 40.00
+ TotalTax: 6.00
+ Total: 46.00
+ UpdatedDateUTC: /Date(1551812702650+0000)/
+ CurrencyCode: NZD
+ StatusAttributeString: OK
+ ValidationErrors:
+ - Message: An existing Credit Note with the specified CreditNoteID could not be found
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ description: an array of Credit Notes with a single CreditNote object.
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreditNotes'
+ example:
+ CreditNotes:
+ - Type: ACCPAYCREDIT
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Date: "2019-01-05"
+ Status: AUTHORISED
+ Reference: HelloWorld
+ LineItems:
+ - Description: Foobar
+ Quantity: 2.0
+ UnitAmount: 20.0
+ AccountCode: "400"
+ /CreditNotes/{CreditNoteID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getCreditNote
+ summary: Retrieves a specific credit note using a unique credit note Id
+ parameters:
+ - $ref: '#/components/parameters/CreditNoteID'
+ - $ref: '#/components/parameters/unitdp'
+ responses:
+ "200":
+ description: Success - return response of type Credit Notes array with a unique CreditNote
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreditNotes'
+ example:
+ Id: dd5c5da7-08ab-486a-ac34-aea295f1614b
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551812703811)/
+ CreditNotes:
+ - CreditNoteID: 249f15fa-f2a7-4acc-8769-0984103f2225
+ CreditNoteNumber: CN-0005
+ Payments:
+ - PaymentID: 6b037c9b-2e5d-4905-84d3-eabfb3438242
+ Date: /Date(1552521600000+0000)/
+ Amount: 2.00
+ Reference: Too much
+ CurrencyRate: 1.000000
+ HasAccount: false
+ HasValidationErrors: false
+ ID: 249f15fa-f2a7-4acc-8769-0984103f2225
+ CurrencyRate: 1.000000
+ Type: ACCRECCREDIT
+ Reference: US Tour
+ RemainingCredit: 32.50
+ Allocations: []
+ HasAttachments: true
+ Attachments:
+ - AttachmentID: 9b9c9b62-069e-4f5a-a172-183195f084bb
+ FileName: Screen Shot 2019-03-04 at 9.00.06 AM.png
+ Url: https://api.xero.com/api.xro/2.0/creditnotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/Screen%20Shot%202019-03-04%20at%209.00.06%20AM.png
+ MimeType: image/png
+ ContentLength: 82334
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ AttentionTo: ""
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-03-05T00:00:00
+ Date: /Date(1551744000000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Mic Stand
+ UnitAmount: 30.00
+ TaxType: OUTPUT2
+ TaxAmount: 4.50
+ LineAmount: 30.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 1.0000
+ ValidationErrors: []
+ SubTotal: 30.00
+ TotalTax: 4.50
+ Total: 34.50
+ UpdatedDateUTC: /Date(1551812346157+0000)/
+ CurrencyCode: NZD
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateCreditNote
+ summary: Updates a specific credit note
+ x-hasAccountingValidationError: true
+ x-example:
+ - currDate:
+ is_date: true
+ key: currDate
+ keyPascal: CurrDate
+ keySnake: curr_date
+ java_datatype: LocalDate
+ default: LocalDate.now()
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ node: '''2020-12-10'''
+ php: new DateTime('2020-12-10')
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_last: true
+ is_uuid: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - lineItem:
+ is_object: true
+ key: lineItem
+ keyPascal: LineItem
+ keySnake: line_item
+ - description:
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: lineItem
+ - quantity:
+ nonString: true
+ key: quantity
+ keyPascal: Quantity
+ default: 1.0
+ is_money: true
+ object: lineItem
+ - unitAmount:
+ nonString: true
+ key: unitAmount
+ keyPascal: UnitAmount
+ keySnake: unit_amount
+ default: 20.0
+ is_money: true
+ object: lineItem
+ - accountCode:
+ is_last: true
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: "000"
+ object: lineItem
+ - line_items:
+ is_list: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ csharp: LineItem
+ java: LineItem
+ - add_lineitems:
+ is_last: true
+ is_list_add: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ java: LineItems
+ python: line_item
+ ruby: line_item
+ csharp: LineItem
+ object: lineItem
+ - creditNote:
+ is_object: true
+ key: creditNote
+ keyPascal: CreditNote
+ keySnake: credit_note
+ - type:
+ nonString: true
+ key: type
+ keyPascal: Type
+ default: ACCPAYCREDIT
+ php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::TYPE_ACCPAYCREDIT
+ node: CreditNote.TypeEnum.ACCPAYCREDIT
+ ruby: XeroRuby::Accounting::CreditNote::ACCPAYCREDIT
+ python_string: ACCPAYCREDIT
+ java: com.xero.models.accounting.CreditNote.TypeEnum.ACCPAYCREDIT
+ csharp: CreditNote.TypeEnum.ACCPAYCREDIT
+ object: creditNote
+ - status:
+ nonString: true
+ key: status
+ keyPascal: Status
+ default: AUTHORISED
+ php: XeroAPI\XeroPHP\Models\Accounting\CreditNote::STATUS_AUTHORISED
+ node: CreditNote.StatusEnum.AUTHORISED
+ ruby: XeroRuby::Accounting::CreditNote::AUTHORISED
+ python_string: AUTHORISED
+ java: com.xero.models.accounting.CreditNote.StatusEnum.AUTHORISED
+ csharp: CreditNote.StatusEnum.AUTHORISED
+ object: creditNote
+ - reference:
+ key: reference
+ keyPascal: Reference
+ default: My ref.
+ object: creditNote
+ - set_contact:
+ is_variable: true
+ nonString: true
+ key: contact
+ keyPascal: Contact
+ default: contact
+ object: creditNote
+ - date:
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: currDate
+ python: curr_date
+ ruby: curr_date
+ object: creditNote
+ - set_lineitem:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ default: lineItems
+ python: line_items
+ ruby: line_items
+ object: creditNote
+ - creditNotes:
+ is_object: true
+ key: creditNotes
+ keyPascal: CreditNotes
+ - add_creditNote:
+ is_last: true
+ is_array_add: true
+ key: creditNotes
+ keyPascal: CreditNotes
+ keySnake: credit_notes
+ java: CreditNotes
+ python: credit_note
+ ruby: credit_note
+ csharp: CreditNote
+ object: creditNote
+ parameters:
+ - $ref: '#/components/parameters/CreditNoteID'
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Credit Notes array with updated CreditNote
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreditNotes'
+ example:
+ Id: db2f7659-6044-418d-a4c6-d4b93eba4e1e
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551812704253)/
+ CreditNotes:
+ - CreditNoteID: f9256f04-5a99-4680-acb9-6b4639cc439a
+ CreditNoteNumber: ""
+ Payments: []
+ ID: f9256f04-5a99-4680-acb9-6b4639cc439a
+ CurrencyRate: 1.000000
+ Type: ACCPAYCREDIT
+ Reference: HelloWorld
+ RemainingCredit: 46.00
+ Allocations: []
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ AttentionTo: ""
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-01-05T00:00:00
+ Date: /Date(1546646400000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.00
+ TaxType: INPUT2
+ TaxAmount: 6.00
+ LineAmount: 40.00
+ AccountCode: "400"
+ Tracking: []
+ Quantity: 2.0000
+ ValidationErrors: []
+ SubTotal: 40.00
+ TotalTax: 6.00
+ Total: 46.00
+ UpdatedDateUTC: /Date(1551812704223+0000)/
+ CurrencyCode: NZD
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ description: an array of Credit Notes containing credit note details to update
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreditNotes'
+ example:
+ CreditNotes:
+ - Type: ACCPAYCREDIT
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Date: "2019-01-05"
+ Status: AUTHORISED
+ Reference: HelloWorld
+ SentToContact: true
+ LineItems:
+ - Description: Foobar
+ Quantity: 2
+ UnitAmount: 20
+ AccountCode: "400"
+ /CreditNotes/{CreditNoteID}/Attachments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getCreditNoteAttachments
+ summary: Retrieves attachments for a specific credit notes
+ parameters:
+ - $ref: '#/components/parameters/CreditNoteID'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with all Attachment for specific Credit Note
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 2bb15054-3868-4f85-a9c6-0402ec8c1201
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551822670731)/
+ Attachments:
+ - AttachmentID: b7eb1fc9-a0f9-4e8e-9373-6689f5350832
+ FileName: HelloWorld.png
+ Url: https://api.xero.com/api.xro/2.0/CreditNotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/HelloWorld.png
+ MimeType: image/png
+ ContentLength: 76091
+ /CreditNotes/{CreditNoteID}/Attachments/{AttachmentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getCreditNoteAttachmentById
+ summary: Retrieves a specific attachment from a specific credit note using a unique attachment Id
+ parameters:
+ - $ref: '#/components/parameters/CreditNoteID'
+ - $ref: '#/components/parameters/AttachmentID'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Credit Note as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /CreditNotes/{CreditNoteID}/Attachments/{FileName}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getCreditNoteAttachmentByFileName
+ summary: Retrieves a specific attachment on a specific credit note by file name
+ parameters:
+ - $ref: '#/components/parameters/CreditNoteID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Credit Note as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ post:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: updateCreditNoteAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Updates attachments on a specific credit note by file name
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/CreditNoteID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with updated Attachment for specific Credit Note
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 27253066-8c4d-4e34-a251-7a749b72de40
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551828247939)/
+ Attachments:
+ - AttachmentID: 103e49f1-e47c-4b4d-b5e8-77d9d00fa70a
+ FileName: HelloWorld.jpg
+ Url: https://api.xero.com/api.xro/2.0/CreditNotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/HelloWorld.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ put:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: createCreditNoteAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Creates an attachment for a specific credit note
+ parameters:
+ - $ref: '#/components/parameters/CreditNoteID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/includeOnline'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with newly created Attachment for specific Credit Note
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 22a8d402-5dea-40ed-9d01-26896429f649
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551822953320)/
+ Attachments:
+ - AttachmentID: 91bbae3f-5de5-4e3d-875f-8662f25897bd
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/CreditNotes/249f15fa-f2a7-4acc-8769-0984103f2225/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /CreditNotes/{CreditNoteID}/pdf:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getCreditNoteAsPdf
+ x-path: /CreditNotes/{CreditNoteID}
+ summary: Retrieves credit notes as PDF files
+ parameters:
+ - $ref: '#/components/parameters/CreditNoteID'
+ responses:
+ "200":
+ description: Success - return response of binary data from the Attachment to a Credit Note
+ content:
+ application/pdf:
+ schema:
+ type: string
+ format: binary
+ /CreditNotes/{CreditNoteID}/Allocations:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createCreditNoteAllocation
+ summary: Creates allocation for a specific credit note
+ x-hasAccountingValidationError: true
+ x-example:
+ - currDate:
+ is_date: true
+ key: currDate
+ keyPascal: CurrDate
+ keySnake: curr_date
+ java_datatype: LocalDate
+ default: LocalDate.now()
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ node: '''2020-12-10'''
+ php: new DateTime('2020-12-10')
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - invoice:
+ is_object: true
+ key: invoice
+ keyPascal: Invoice
+ - invoiceID:
+ is_last: true
+ is_uuid: true
+ key: invoiceID
+ keyPascal: InvoiceID
+ default: 00000000-0000-0000-0000-000000000000
+ object: invoice
+ - allocation:
+ is_object: true
+ key: allocation
+ keyPascal: Allocation
+ - amount:
+ nonString: true
+ key: amount
+ keyPascal: Amount
+ default: 1.0
+ is_money: true
+ csharp: new decimal(1.0)
+ object: allocation
+ - date:
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: currDate
+ python: curr_date
+ ruby: curr_date
+ object: allocation
+ - set_invoice:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: invoice
+ keyPascal: Invoice
+ default: invoice
+ object: allocation
+ - allocations:
+ is_object: true
+ key: allocations
+ keyPascal: Allocations
+ - add_allocation:
+ is_last: true
+ is_array_add: true
+ key: allocations
+ keyPascal: Allocations
+ java: Allocations
+ csharp: Allocation
+ object: allocation
+ parameters:
+ - $ref: '#/components/parameters/CreditNoteID'
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Allocations array with newly created Allocation for specific Credit Note
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Allocations'
+ example:
+ Id: 73452751-6eaa-4bcb-86f5-4c013316f4cf
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551828543255)/
+ Allocations:
+ - Amount: 1.00
+ Date: /Date(1551744000000+0000)/
+ Invoice:
+ InvoiceID: c45720a1-ade3-4a38-a064-d15489be6841
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ ValidationErrors: []
+ CreditNote:
+ CreditNoteID: 7be578f5-63af-45c8-9b00-dcc4732baf0b
+ ID: 7be578f5-63af-45c8-9b00-dcc4732baf0b
+ LineItems: []
+ ValidationErrors: []
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ description: Allocations with array of Allocation object in body of request.
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Allocations'
+ example:
+ Allocations:
+ - Invoice:
+ LineItems: []
+ InvoiceID: c45720a1-ade3-4a38-a064-d15489be6841
+ Amount: 1
+ Date: "2019-03-05"
+ /CreditNotes/{CreditNoteID}/Allocations/{AllocationID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ delete:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: deleteCreditNoteAllocations
+ summary: Deletes an Allocation from a Credit Note
+ parameters:
+ - $ref: '#/components/parameters/CreditNoteID'
+ - $ref: '#/components/parameters/AllocationID'
+ responses:
+ "200":
+ description: Success - return response of type Allocation with the isDeleted flag as true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Allocation'
+ example:
+ AllocationId: 2bb15054-3868-4f85-a9c6-0402ec8c1201
+ Date: /Date(1551822670731)/
+ Invoice:
+ - InvoiceID: b7eb1fc9-a0f9-4e8e-9373-6689f5350832
+ IsDeleted: true
+ /CreditNotes/{CreditNoteID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getCreditNoteHistory
+ summary: Retrieves history records of a specific credit note
+ parameters:
+ - $ref: '#/components/parameters/CreditNoteID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createCreditNoteHistory
+ summary: Retrieves history records of a specific credit note
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/CreditNoteID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /Currencies:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getCurrencies
+ summary: Retrieves currencies for your Xero organisation
+ parameters:
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Code=="USD"
+ x-example-csharp: Code==\"USD\"
+ x-example-php: Code=="' . \XeroAPI\XeroPHP\Models\Accounting\CurrencyCode::USD . '"
+ x-example-ruby: Code==#{XeroRuby::Accounting::CurrencyCode::USD}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Code ASC
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of type Currencies array with all Currencies
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Currencies'
+ example:
+ Id: e6803fc8-8035-4251-b3e4-39d6b2de0f4a
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552322853043)/
+ Currencies:
+ - Code: NZD
+ Description: New Zealand Dollar
+ put:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: createCurrency
+ summary: Create a new currency for a Xero organisation
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ x-hasAccountingValidationError: true
+ x-example:
+ - currency:
+ is_object: true
+ key: currency
+ keyPascal: Currency
+ - code:
+ nonString: true
+ key: code
+ keyPascal: Code
+ default: USD
+ php: XeroAPI\XeroPHP\Models\Accounting\CurrencyCode::USD
+ node: CurrencyCode.USD
+ ruby: XeroRuby::Accounting::CurrencyCode::USD
+ python: CurrencyCode.USD
+ java: com.xero.models.accounting.CurrencyCode.USD
+ csharp: CurrencyCode.USD
+ object: currency
+ - description:
+ is_last: true
+ key: description
+ keyPascal: Description
+ default: United States Dollar
+ object: currency
+ responses:
+ "200":
+ description: Unsupported - return response incorrect exception, API is not able to create new Currency
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Currencies'
+ example:
+ Currencies:
+ - Code: USD
+ Description: United States Dollar
+ requestBody:
+ required: true
+ description: Currency object in the body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Currency'
+ example:
+ Code: USD
+ Description: United States Dollar
+ /Employees:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getEmployees
+ summary: Retrieves employees used in Xero payrun
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="ACTIVE"
+ x-example-csharp: Status==\"ACTIVE\"
+ x-example-java: Status=="' + Employee.StatusEnum.ACTIVE + '"
+ x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Employee::STATUS_ACTIVE . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::Employee::ACTIVE}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: LastName ASC
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of type Employees array with all Employee
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Employees'
+ example:
+ Id: 593cbccc-5cd2-4cd2-be5e-150f0843709e
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552325082775)/
+ Employees:
+ - EmployeeID: 972615c5-ad3d-47a0-b579-20370d374578
+ Status: ACTIVE
+ FirstName: Tony
+ LastName: Stark
+ ExternalLink:
+ Url: http://twitter.com/#!/search/Stark+Industries
+ Description: Go to external link
+ UpdatedDateUTC: /Date(1552324681593+0000)/
+ - EmployeeID: ad3db144-6362-459c-8c36-5d31d196e629
+ Status: ACTIVE
+ FirstName: Bruce
+ LastName: Banner
+ ExternalLink:
+ Url: http://twitter.com/#!/search/Nick+Fury
+ Description: Go to external link
+ UpdatedDateUTC: /Date(1552325081303+0000)/
+ - EmployeeID: e1ada26b-a10e-4065-a941-af34b53740e3
+ Status: ACTIVE
+ FirstName: Nick
+ LastName: Fury
+ ExternalLink:
+ Url: http://twitter.com/#!/search/Nick+Fury
+ Description: Go to external link
+ UpdatedDateUTC: /Date(1552324737990+0000)/
+ put:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: createEmployees
+ summary: Creates new employees used in Xero payrun
+ x-hasAccountingValidationError: true
+ x-example:
+ - employee:
+ is_object: true
+ key: employee
+ keyPascal: Employee
+ - firstName:
+ key: firstName
+ keyPascal: FirstName
+ keySnake: first_name
+ default: Nick
+ object: employee
+ - lastName:
+ is_last: true
+ key: lastName
+ keyPascal: LastName
+ keySnake: last_name
+ default: Fury
+ object: employee
+ - employees:
+ is_object: true
+ key: employees
+ keyPascal: Employees
+ - add_employee:
+ is_last: true
+ is_array_add: true
+ key: employees
+ keyPascal: Employees
+ java: Employees
+ csharp: Employee
+ object: employee
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Employees array with new Employee
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Employees'
+ example:
+ Id: 0d6a08e7-6936-4828-a1bc-e4595e0ef778
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552324736508)/
+ Employees:
+ - EmployeeID: e1ada26b-a10e-4065-a941-af34b53740e3
+ Status: ACTIVE
+ FirstName: Nick
+ LastName: Fury
+ ExternalLink:
+ Url: http://twitter.com/#!/search/Nick+Fury
+ Description: Go to external link
+ UpdatedDateUTC: /Date(1552324736463+0000)/
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Employees with array of Employee object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Employees'
+ example:
+ Employees:
+ - FirstName: Nick
+ LastName: Fury
+ ExternalLink:
+ Url: http://twitter.com/#!/search/Nick+Fury
+ post:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: updateOrCreateEmployees
+ summary: Creates a single new employees used in Xero payrun
+ x-hasAccountingValidationError: true
+ x-example:
+ - employee:
+ is_object: true
+ key: employee
+ keyPascal: Employee
+ - firstName:
+ key: firstName
+ keyPascal: FirstName
+ keySnake: first_name
+ default: Nick
+ object: employee
+ - lastName:
+ is_last: true
+ key: lastName
+ keyPascal: LastName
+ keySnake: last_name
+ default: Fury
+ object: employee
+ - employees:
+ is_object: true
+ key: employees
+ keyPascal: Employees
+ - add_employee:
+ is_last: true
+ is_array_add: true
+ key: employees
+ keyPascal: Employees
+ java: Employees
+ csharp: Employee
+ object: employee
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Employees array with new Employee
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Employees'
+ example:
+ Id: 0d6a08e7-6936-4828-a1bc-e4595e0ef778
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552324736508)/
+ Employees:
+ - EmployeeID: e1ada26b-a10e-4065-a941-af34b53740e3
+ Status: ACTIVE
+ FirstName: Nick
+ LastName: Fury
+ ExternalLink:
+ Url: http://twitter.com/#!/search/Nick+Fury
+ Description: Go to external link
+ UpdatedDateUTC: /Date(1552324736463+0000)/
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Employees with array of Employee object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Employees'
+ example:
+ Employees:
+ - FirstName: Nick
+ LastName: Fury
+ ExternalLink:
+ Url: http://twitter.com/#!/search/Nick+Fury
+ /Employees/{EmployeeID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getEmployee
+ summary: Retrieves a specific employee used in Xero payrun using a unique employee Id
+ parameters:
+ - $ref: '#/components/parameters/EmployeeID'
+ responses:
+ "200":
+ description: Success - return response of type Employees array with specified Employee
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Employees'
+ example:
+ Id: 417a529e-4f8d-4b1a-8816-7100245cf8b2
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552325084085)/
+ Employees:
+ - EmployeeID: 972615c5-ad3d-47a0-b579-20370d374578
+ Status: ACTIVE
+ FirstName: Tony
+ LastName: Stark
+ ExternalLink:
+ Url: http://twitter.com/#!/search/Stark+Industries
+ Description: Go to external link
+ UpdatedDateUTC: /Date(1552324681593+0000)/
+ /ExpenseClaims:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getExpenseClaims
+ summary: Retrieves expense claims
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="SUBMITTED"
+ x-example-csharp: Status==\"SUBMITTED\"
+ x-example-java: Status=="' + ExpenseClaim.StatusEnum.SUBMITTED + '"
+ x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim::STATUS_SUBMITTED . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::ExpenseClaim::SUBMITTED}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Status ASC
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of type ExpenseClaims array with all ExpenseClaims
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExpenseClaims'
+ example:
+ Id: f6a8867e-af29-41ee-8f77-855f5ff214fe
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552325853538)/
+ ExpenseClaims:
+ - ExpenseClaimID: 646b15ab-b874-4e13-82ae-f4385b2ac4b6
+ Status: AUTHORISED
+ UpdatedDateUTC: /Date(1552325851767+0000)/
+ User:
+ UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273
+ EmailAddress: api@xero.com
+ FirstName: 'API '
+ LastName: Team
+ UpdatedDateUTC: /Date(1511957179217+0000)/
+ IsSubscriber: true
+ OrganisationRole: FINANCIALADVISER
+ Receipts: []
+ Payments: []
+ Total: 40.00
+ AmountDue: 40.00
+ AmountPaid: 0.00
+ ReportingDate: /Date(1552262400000+0000)/
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createExpenseClaims
+ summary: Creates expense claims
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ x-hasAccountingValidationError: true
+ x-example:
+ - currDate:
+ is_date: true
+ key: currDate
+ keyPascal: CurrDate
+ keySnake: curr_date
+ java_datatype: LocalDate
+ default: LocalDate.now()
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ node: '''2020-12-10'''
+ php: new DateTime('2020-12-10')
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - user:
+ is_object: true
+ key: user
+ keyPascal: User
+ - userID:
+ is_last: true
+ is_uuid: true
+ key: userID
+ keyPascal: UserID
+ keySnake: user_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: user
+ - receipt:
+ is_object: true
+ key: receipt
+ keyPascal: Receipt
+ - receiptID:
+ is_uuid: true
+ key: receiptID
+ keyPascal: ReceiptID
+ keySnake: receipt_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: receipt
+ - date:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: currDate
+ python: curr_date
+ ruby: curr_date
+ object: receipt
+ - receipts:
+ is_list: true
+ key: receipts
+ keyPascal: Receipt
+ - add_receipts:
+ is_last: true
+ is_list_add: true
+ key: receipts
+ keyPascal: Receipts
+ object: receipt
+ - expenseClaim:
+ is_object: true
+ key: expenseClaim
+ keyPascal: ExpenseClaim
+ keySnake: expense_claim
+ - status:
+ nonString: true
+ key: status
+ keyPascal: Status
+ default: SUBMITTED
+ php: XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim::STATUS_SUBMITTED
+ node: ExpenseClaim.StatusEnum.SUBMITTED
+ ruby: XeroRuby::Accounting::ExpenseClaim::SUBMITTED
+ python_string: SUBMITTED
+ java: com.xero.models.accounting.ExpenseClaim.StatusEnum.SUBMITTED
+ csharp: ExpenseClaim.StatusEnum.SUBMITTED
+ object: expenseClaim
+ - set_user:
+ is_variable: true
+ nonString: true
+ key: user
+ keyPascal: User
+ default: user
+ object: expenseClaim
+ - set_receipt:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: receipts
+ keyPascal: Receipts
+ default: receipts
+ object: expenseClaim
+ - expenseClaims:
+ is_object: true
+ key: expenseClaims
+ keyPascal: ExpenseClaims
+ - add_expenseClaim:
+ is_array_add: true
+ is_last: true
+ key: expenseClaims
+ keyPascal: ExpenseClaims
+ keySnake: expense_claims
+ java: ExpenseClaims
+ python: expense_claim
+ ruby: expense_claim
+ csharp: ExpenseClaim
+ object: expenseClaim
+ requestBody:
+ required: true
+ description: ExpenseClaims with array of ExpenseClaim object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExpenseClaims'
+ example:
+ ExpenseClaims:
+ - Status: SUBMITTED
+ User:
+ UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273
+ Receipts:
+ - Lineitems: []
+ ReceiptID: dc1c7f6d-0a4c-402f-acac-551d62ce5816
+ responses:
+ "200":
+ description: Success - return response of type ExpenseClaims array with newly created ExpenseClaim
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExpenseClaims'
+ example:
+ Id: 4a0879a6-3860-4b73-adc6-f6a0e0f68fc8
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552325850201)/
+ ExpenseClaims:
+ - ExpenseClaimID: 646b15ab-b874-4e13-82ae-f4385b2ac4b6
+ Status: SUBMITTED
+ UpdatedDateUTC: /Date(1552325850107+0000)/
+ User:
+ UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273
+ EmailAddress: api@xero.com
+ FirstName: 'API '
+ LastName: Team
+ UpdatedDateUTC: /Date(1511957179217+0000)/
+ IsSubscriber: true
+ OrganisationRole: FINANCIALADVISER
+ Receipts:
+ - ReceiptID: dc1c7f6d-0a4c-402f-acac-551d62ce5816
+ ReceiptNumber: 1
+ Status: SUBMITTED
+ User:
+ UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273
+ EmailAddress: api@xero.com
+ FirstName: 'API '
+ LastName: Team
+ UpdatedDateUTC: /Date(1511957179217+0000)/
+ IsSubscriber: true
+ OrganisationRole: FINANCIALADVISER
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Date: /Date(1552348800000+0000)/
+ UpdatedDateUTC: /Date(1552325848457+0000)/
+ Reference: ""
+ LineAmountTypes: NoTax
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.00
+ TaxType: NONE
+ TaxAmount: 0.00
+ LineAmount: 40.00
+ Tracking: []
+ Quantity: 2.0000
+ SubTotal: 40.00
+ TotalTax: 0.00
+ Total: 40.00
+ ID: dc1c7f6d-0a4c-402f-acac-551d62ce5816
+ HasAttachments: false
+ Payments: []
+ Total: 40.00
+ AmountDue: 40.00
+ AmountPaid: 0.00
+ StatusAttributeString: OK
+ "400":
+ $ref: '#/components/responses/400Error'
+ /ExpenseClaims/{ExpenseClaimID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getExpenseClaim
+ summary: Retrieves a specific expense claim using a unique expense claim Id
+ parameters:
+ - $ref: '#/components/parameters/ExpenseClaimID'
+ responses:
+ "200":
+ description: Success - return response of type ExpenseClaims array with specified ExpenseClaim
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExpenseClaims'
+ example:
+ Id: b54bb45d-37da-4f53-9f1d-536302d6bad7
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552325854864)/
+ ExpenseClaims:
+ - ExpenseClaimID: 646b15ab-b874-4e13-82ae-f4385b2ac4b6
+ Status: AUTHORISED
+ UpdatedDateUTC: /Date(1552325851767+0000)/
+ User:
+ UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273
+ EmailAddress: api@xero.com
+ FirstName: 'API '
+ LastName: Team
+ UpdatedDateUTC: /Date(1511957179217+0000)/
+ IsSubscriber: true
+ OrganisationRole: FINANCIALADVISER
+ Receipts:
+ - ReceiptID: dc1c7f6d-0a4c-402f-acac-551d62ce5816
+ ReceiptNumber: 1
+ Status: AUTHORISED
+ User:
+ UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273
+ EmailAddress: api@xero.com
+ FirstName: 'API '
+ LastName: Team
+ UpdatedDateUTC: /Date(1511957179217+0000)/
+ IsSubscriber: true
+ OrganisationRole: FINANCIALADVISER
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Date: /Date(1552348800000+0000)/
+ UpdatedDateUTC: /Date(1552325848457+0000)/
+ Reference: ""
+ LineAmountTypes: NoTax
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.00
+ TaxType: NONE
+ TaxAmount: 0.00
+ LineAmount: 40.00
+ AccountCode: "400"
+ Tracking: []
+ Quantity: 2.0000
+ SubTotal: 40.00
+ TotalTax: 0.00
+ Total: 40.00
+ ID: dc1c7f6d-0a4c-402f-acac-551d62ce5816
+ HasAttachments: false
+ Payments: []
+ Total: 40.00
+ AmountDue: 40.00
+ AmountPaid: 0.00
+ ReportingDate: /Date(1552262400000+0000)/
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateExpenseClaim
+ summary: Updates a specific expense claims
+ x-hasAccountingValidationError: true
+ x-example:
+ - currDate:
+ is_date: true
+ key: currDate
+ keyPascal: CurrDate
+ keySnake: curr_date
+ java_datatype: LocalDate
+ default: LocalDate.now()
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ node: '''2020-12-10'''
+ php: new DateTime('2020-12-10')
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - user:
+ is_object: true
+ key: user
+ keyPascal: User
+ - userID:
+ is_last: true
+ is_uuid: true
+ key: userID
+ keyPascal: UserID
+ keySnake: user_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: user
+ - receipt:
+ is_object: true
+ key: receipt
+ keyPascal: Receipt
+ - receiptID:
+ is_uuid: true
+ key: receiptID
+ keyPascal: ReceiptID
+ keySnake: receipt_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: receipt
+ - date:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: currDate
+ python: curr_date
+ ruby: curr_date
+ object: receipt
+ - receipts:
+ is_list: true
+ key: receipts
+ keyPascal: Receipt
+ - add_receipts:
+ is_last: true
+ is_list_add: true
+ key: receipts
+ keyPascal: Receipts
+ object: receipt
+ - expenseClaim:
+ is_object: true
+ key: expenseClaim
+ keyPascal: ExpenseClaim
+ keySnake: expense_claim
+ - status:
+ nonString: true
+ key: status
+ keyPascal: Status
+ default: SUBMITTED
+ php: XeroAPI\XeroPHP\Models\Accounting\ExpenseClaim::STATUS_SUBMITTED
+ node: ExpenseClaim.StatusEnum.SUBMITTED
+ ruby: XeroRuby::Accounting::ExpenseClaim::SUBMITTED
+ python_string: SUBMITTED
+ java: com.xero.models.accounting.ExpenseClaim.StatusEnum.SUBMITTED
+ csharp: ExpenseClaim.StatusEnum.SUBMITTED
+ object: expenseClaim
+ - set_user:
+ is_variable: true
+ nonString: true
+ key: user
+ keyPascal: User
+ default: user
+ object: expenseClaim
+ - set_receipt:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: receipts
+ keyPascal: Receipts
+ default: receipts
+ object: expenseClaim
+ - expenseClaims:
+ is_object: true
+ key: expenseClaims
+ keyPascal: ExpenseClaims
+ - add_expenseClaim:
+ is_array_add: true
+ is_last: true
+ key: expenseClaims
+ keyPascal: ExpenseClaims
+ keySnake: expense_claims
+ java: ExpenseClaims
+ python: expense_claim
+ ruby: expense_claim
+ csharp: ExpenseClaim
+ object: expenseClaim
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ExpenseClaimID'
+ responses:
+ "200":
+ description: Success - return response of type ExpenseClaims array with updated ExpenseClaim
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExpenseClaims'
+ example:
+ Id: 8ee87f9c-058b-4f1b-b5b2-29569bf055d7
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552325851907)/
+ ExpenseClaims:
+ - ExpenseClaimID: 646b15ab-b874-4e13-82ae-f4385b2ac4b6
+ Status: AUTHORISED
+ UpdatedDateUTC: /Date(1552325851767+0000)/
+ User:
+ UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273
+ EmailAddress: api@xero.com
+ FirstName: 'API '
+ LastName: Team
+ UpdatedDateUTC: /Date(1511957179217+0000)/
+ IsSubscriber: true
+ OrganisationRole: FINANCIALADVISER
+ Receipts:
+ - ReceiptID: dc1c7f6d-0a4c-402f-acac-551d62ce5816
+ ReceiptNumber: 1
+ Status: AUTHORISED
+ User:
+ UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273
+ EmailAddress: api@xero.com
+ FirstName: 'API '
+ LastName: Team
+ UpdatedDateUTC: /Date(1511957179217+0000)/
+ IsSubscriber: true
+ OrganisationRole: FINANCIALADVISER
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Date: /Date(1552348800000+0000)/
+ UpdatedDateUTC: /Date(1552325848457+0000)/
+ Reference: ""
+ LineAmountTypes: NoTax
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.00
+ TaxType: NONE
+ TaxAmount: 0.00
+ LineAmount: 40.00
+ AccountCode: "400"
+ Tracking: []
+ Quantity: 2.0000
+ SubTotal: 40.00
+ TotalTax: 0.00
+ Total: 40.00
+ ID: dc1c7f6d-0a4c-402f-acac-551d62ce5816
+ HasAttachments: false
+ Payments: []
+ Total: 40.00
+ AmountDue: 40.00
+ AmountPaid: 0.00
+ ReportingDate: /Date(1552262400000+0000)/
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ExpenseClaims'
+ example:
+ ExpenseClaims:
+ - Status: SUBMITTED
+ User:
+ UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273
+ Receipts:
+ - Lineitems: []
+ ReceiptID: dc1c7f6d-0a4c-402f-acac-551d62ce5816
+ /ExpenseClaims/{ExpenseClaimID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getExpenseClaimHistory
+ summary: Retrieves history records of a specific expense claim
+ parameters:
+ - $ref: '#/components/parameters/ExpenseClaimID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createExpenseClaimHistory
+ summary: Creates a history record for a specific expense claim
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ExpenseClaimID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /Invoices:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getInvoices
+ summary: Retrieves sales invoices or purchase bills
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="DRAFT"
+ x-example-java: Status=="' + Invoice.StatusEnum.DRAFT + '"
+ x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::Invoice::DRAFT}
+ x-example-csharp: Status==\"DRAFT\"
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: InvoiceNumber ASC
+ schema:
+ type: string
+ - in: query
+ name: IDs
+ x-snake: ids
+ description: Filter by a comma-separated list of InvoicesIDs.
+ style: form
+ explode: false
+ example: '"00000000-0000-0000-0000-000000000000"'
+ x-example-java: Arrays.asList(UUID.fromString("00000000-0000-0000-0000-000000000000"))
+ x-example-php: '"00000000-0000-0000-0000-000000000000"'
+ x-example-csharp: new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")};
+ schema:
+ type: array
+ items:
+ type: string
+ format: uuid
+ - in: query
+ name: InvoiceNumbers
+ x-snake: invoice_numbers
+ description: Filter by a comma-separated list of InvoiceNumbers.
+ style: form
+ explode: false
+ example: '"INV-001", "INV-002"'
+ x-example-java: Arrays.asList("INV-001","INV-002")
+ x-example-php: '"INV-001", "INV-002"'
+ x-example-csharp: new List<string>{"INV-001","INV-002"};
+ schema:
+ type: array
+ items:
+ type: string
+ - in: query
+ name: ContactIDs
+ x-snake: contact_ids
+ description: Filter by a comma-separated list of ContactIDs.
+ style: form
+ explode: false
+ example: '"00000000-0000-0000-0000-000000000000"'
+ x-example-java: Arrays.asList(UUID.fromString("00000000-0000-0000-0000-000000000000"))
+ x-example-php: '"00000000-0000-0000-0000-000000000000"'
+ x-example-csharp: new List<Guid>{Guid.Parse("00000000-0000-0000-0000-000000000000")};
+ schema:
+ type: array
+ items:
+ type: string
+ format: uuid
+ - in: query
+ name: Statuses
+ x-snake: statuses
+ description: Filter by a comma-separated list Statuses. For faster response times we recommend using these explicit parameters instead of passing OR conditions into the Where filter.
+ explode: false
+ example: '"DRAFT", "SUBMITTED"'
+ x-example-java: Arrays.asList("DRAFT","SUBMITTED")
+ x-example-php: '"DRAFT", "SUBMITTED"'
+ x-example-csharp: new List<string>{"DRAFT","SUBMITTED"};
+ schema:
+ type: array
+ items:
+ type: string
+ - in: query
+ 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
+ example: 1
+ schema:
+ type: integer
+ - in: query
+ name: includeArchived
+ x-snake: include_archived
+ description: e.g. includeArchived=true - Invoices with a status of ARCHIVED will be included in the response
+ example: true
+ x-example-python: "True"
+ schema:
+ type: boolean
+ - in: query
+ name: createdByMyApp
+ x-snake: created_by_my_app
+ description: When set to true you'll only retrieve Invoices created by your app
+ example: false
+ x-example-python: "False"
+ schema:
+ type: boolean
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/summaryOnly'
+ - $ref: '#/components/parameters/pageSize'
+ - $ref: '#/components/parameters/searchTerm'
+ responses:
+ "200":
+ description: Success - return response of type Invoices array with all Invoices
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Invoices'
+ example:
+ Id: 900c500b-e83c-4ce2-902a-b8ba04751748
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552326816230)/
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 3
+ Invoices:
+ - Type: ACCREC
+ InvoiceID: d4956132-ed94-4dd7-9eaa-aa22dfdf06f2
+ InvoiceNumber: INV-0001
+ Reference: Red Fish, Blue Fish
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ AmountDue: 0.00
+ AmountPaid: 0.00
+ AmountCredited: 0.00
+ SentToContact: true
+ CurrencyRate: 1.000000
+ HasErrors: false
+ IsDiscounted: false
+ HasAttachments: false
+ RepeatingInvoiceID: 428c0d75-909f-4b04-8403-a48dc27283b0
+ Contact:
+ ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7
+ Name: Barney Rubble-83203
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2018-10-20T00:00:00
+ Date: /Date(1539993600000+0000)/
+ DueDateString: 2018-12-30T00:00:00
+ DueDate: /Date(1546128000000+0000)/
+ Status: VOIDED
+ LineAmountTypes: Exclusive
+ LineItems: []
+ SubTotal: 40.00
+ TotalTax: 0.00
+ Total: 40.00
+ UpdatedDateUTC: /Date(1541176290160+0000)/
+ CurrencyCode: NZD
+ - Type: ACCREC
+ InvoiceID: 046d8a6d-1ae1-4b4d-9340-5601bdf41b87
+ InvoiceNumber: INV-0002
+ Reference: Red Fish, Blue Fish
+ Payments:
+ - PaymentID: 99ea7f6b-c513-4066-bc27-b7c65dcd76c2
+ Date: /Date(1543449600000+0000)/
+ Amount: 46.00
+ CurrencyRate: 1.000000
+ HasAccount: false
+ HasValidationErrors: false
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ AmountDue: 0.00
+ AmountPaid: 46.00
+ AmountCredited: 0.00
+ SentToContact: true
+ CurrencyRate: 1.000000
+ HasErrors: false
+ IsDiscounted: false
+ HasAttachments: false
+ Contact:
+ ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7
+ Name: Barney Rubble-83203
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2018-10-20T00:00:00
+ Date: /Date(1539993600000+0000)/
+ DueDateString: 2018-12-30T00:00:00
+ DueDate: /Date(1546128000000+0000)/
+ Status: PAID
+ LineAmountTypes: Exclusive
+ LineItems: []
+ SubTotal: 40.00
+ TotalTax: 6.00
+ Total: 46.00
+ UpdatedDateUTC: /Date(1541176592690+0000)/
+ CurrencyCode: NZD
+ FullyPaidOnDate: /Date(1543449600000+0000)/
+ - Type: ACCREC
+ InvoiceID: 7ef31b20-de17-4312-8382-412f869b1510
+ InvoiceNumber: INV-0003
+ Reference: ""
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ AmountDue: 115.00
+ AmountPaid: 0.00
+ AmountCredited: 0.00
+ CurrencyRate: 1.000000
+ HasErrors: false
+ IsDiscounted: false
+ HasAttachments: false
+ Contact:
+ ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7
+ Name: Barney Rubble-83203
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2018-11-02T00:00:00
+ Date: /Date(1541116800000+0000)/
+ DueDateString: 2018-11-07T00:00:00
+ DueDate: /Date(1541548800000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems: []
+ SubTotal: 100.00
+ TotalTax: 15.00
+ Total: 115.00
+ UpdatedDateUTC: /Date(1541176648927+0000)/
+ CurrencyCode: NZD
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createInvoices
+ summary: Creates one or more sales invoices or purchase bills
+ x-hasAccountingValidationError: true
+ x-example:
+ - dateValue:
+ is_date: true
+ key: dateValue
+ keyPascal: Date
+ keySnake: date_value
+ java_datatype: LocalDate
+ default: LocalDate.of(2020, Month.OCTOBER, 10)
+ java: LocalDate.of(2020, Month.OCTOBER, 10)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-10')
+ node: '''2020-10-10'''
+ python: dateutil.parser.parse('2020-10-10T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - dueDateValue:
+ is_date: true
+ key: dueDateValue
+ keyPascal: Date
+ keySnake: due_date_value
+ java_datatype: LocalDate
+ csharp_datatype: DateTime
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_last: true
+ is_uuid: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - lineItemTracking:
+ is_object: true
+ key: lineItemTracking
+ keyPascal: LineItemTracking
+ keySnake: line_item_tracking
+ - trackingCategoryId:
+ is_uuid: true
+ key: trackingCategoryID
+ keyPascal: TrackingCategoryID
+ keySnake: tracking_category_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: lineItemTracking
+ - trackingOptionID:
+ is_last: true
+ is_uuid: true
+ key: trackingOptionID
+ keyPascal: TrackingOptionID
+ keySnake: tracking_option_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: lineItemTracking
+ - lineItemTrackings:
+ is_list: true
+ key: lineItemTrackings
+ keyPascal: LineItemTracking
+ keySnake: line_item_trackings
+ - add_lineitemtrackings:
+ is_last: true
+ is_list_add: true
+ key: lineItemTrackings
+ keyPascal: LineItemTrackings
+ keySnake: line_item_trackings
+ python: line_item_tracking
+ ruby: line_item_tracking
+ object: lineItemTracking
+ - lineItem:
+ is_object: true
+ key: lineItem
+ keyPascal: LineItem
+ keySnake: line_item
+ - description:
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: lineItem
+ - quantity:
+ nonString: true
+ key: quantity
+ keyPascal: Quantity
+ default: 1.0
+ is_money: true
+ object: lineItem
+ - unitAmount:
+ nonString: true
+ key: unitAmount
+ keyPascal: UnitAmount
+ keySnake: unit_amount
+ default: 20.0
+ is_money: true
+ object: lineItem
+ - accountCode:
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: "000"
+ object: lineItem
+ - tracking:
+ is_last: true
+ nonString: true
+ key: tracking
+ keyPascal: Tracking
+ default: lineItemTrackings
+ object: lineItem
+ - line_items:
+ is_list: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ csharp: LineItem
+ java: LineItem
+ - add_lineitems:
+ is_last: true
+ is_list_add: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ java: LineItems
+ python: line_item
+ ruby: line_item
+ csharp: LineItem
+ object: lineItem
+ - invoice:
+ is_object: true
+ key: invoice
+ keyPascal: Invoice
+ - type:
+ nonString: true
+ key: type
+ keyPascal: Type
+ default: ACCREC
+ php: XeroAPI\XeroPHP\Models\Accounting\Invoice::TYPE_ACCREC
+ node: Invoice.TypeEnum.ACCREC
+ ruby: XeroRuby::Accounting::Invoice::ACCREC
+ python_string: ACCREC
+ java: com.xero.models.accounting.Invoice.TypeEnum.ACCREC
+ csharp: Invoice.TypeEnum.ACCREC
+ object: invoice
+ - set_contact:
+ is_variable: true
+ nonString: true
+ key: contact
+ keyPascal: Contact
+ default: contact
+ object: invoice
+ - date:
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: dateValue
+ python: date_value
+ ruby: date_value
+ object: invoice
+ - dueDate:
+ is_variable: true
+ nonString: true
+ key: dueDate
+ keyPascal: DueDate
+ keySnake: due_date
+ default: dueDateValue
+ python: due_date_value
+ ruby: due_date_value
+ object: invoice
+ - set_lineitem:
+ is_variable: true
+ nonString: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ default: lineItems
+ python: line_items
+ ruby: line_items
+ object: invoice
+ - reference:
+ key: reference
+ keyPascal: Reference
+ default: Website Design
+ object: invoice
+ - status:
+ is_last: true
+ nonString: true
+ key: status
+ keyPascal: Status
+ default: DRAFT
+ php: XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT
+ node: Invoice.StatusEnum.DRAFT
+ ruby: XeroRuby::Accounting::Invoice::DRAFT
+ python_string: DRAFT
+ java: com.xero.models.accounting.Invoice.StatusEnum.DRAFT
+ csharp: Invoice.StatusEnum.DRAFT
+ object: invoice
+ - invoices:
+ is_object: true
+ key: invoices
+ keyPascal: Invoices
+ - add_invoice:
+ is_last: true
+ is_array_add: true
+ key: invoices
+ keyPascal: Invoices
+ java: Invoices
+ csharp: Invoice
+ object: invoice
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Invoices array with newly created Invoice
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Invoices'
+ example:
+ Id: ccece84a-075c-4fcd-9073-149d4f7a91cf
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552327126164)/
+ Invoices:
+ - Type: ACCREC
+ InvoiceID: ed255415-e141-4150-aab7-89c3bbbb851c
+ InvoiceNumber: INV-0007
+ Reference: Website Design
+ Prepayments: []
+ Overpayments: []
+ AmountDue: 40.00
+ AmountPaid: 0.00
+ SentToContact: false
+ CurrencyRate: 1.000000
+ HasErrors: false
+ IsDiscounted: false
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ AttentionTo: ""
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups:
+ - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22
+ Name: Oasis
+ Status: ACTIVE
+ Contacts: []
+ HasValidationErrors: false
+ IsSupplier: true
+ IsCustomer: true
+ SalesTrackingCategories: []
+ PurchasesTrackingCategories: []
+ ContactPersons:
+ - FirstName: Debbie
+ LastName: Gwyther
+ EmailAddress: debbie@rockstar.com
+ IncludeInEmails: false
+ HasValidationErrors: false
+ DateString: 2019-03-11T00:00:00
+ Date: /Date(1552262400000+0000)/
+ DueDateString: 2018-12-10T00:00:00
+ DueDate: /Date(1544400000000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Acme Tires
+ UnitAmount: 20.00
+ TaxType: NONE
+ TaxAmount: 0.00
+ LineAmount: 40.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 2.0000
+ LineItemID: 5f7a612b-fdcc-4d33-90fa-a9f6bc6db32f
+ ValidationErrors: []
+ SubTotal: 40.00
+ TotalTax: 0.00
+ Total: 40.00
+ UpdatedDateUTC: /Date(1552327126117+0000)/
+ CurrencyCode: NZD
+ StatusAttributeString: OK
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Invoices with an array of invoice objects in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Invoices'
+ example:
+ Invoices:
+ - Type: ACCREC
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ LineItems:
+ - Description: Acme Tires
+ Quantity: 2
+ UnitAmount: 20
+ AccountCode: "200"
+ TaxType: NONE
+ LineAmount: 40
+ Date: "2019-03-11"
+ DueDate: "2018-12-10"
+ Reference: Website Design
+ Status: AUTHORISED
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateOrCreateInvoices
+ summary: Updates or creates one or more sales invoices or purchase bills
+ x-hasAccountingValidationError: true
+ x-example:
+ - dateValue:
+ is_date: true
+ key: dateValue
+ keyPascal: Date
+ keySnake: date_value
+ java_datatype: LocalDate
+ default: LocalDate.of(2020, Month.OCTOBER, 10)
+ java: LocalDate.of(2020, Month.OCTOBER, 10)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-10')
+ node: '''2020-10-10'''
+ python: dateutil.parser.parse('2020-10-10T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - dueDateValue:
+ is_date: true
+ key: dueDateValue
+ keyPascal: Date
+ keySnake: due_date_value
+ java_datatype: LocalDate
+ default: LocalDate.of(2020, Month.OCTOBER, 28)
+ java: LocalDate.of(2020, Month.OCTOBER, 28)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-28')
+ node: '''2020-10-28'''
+ python: dateutil.parser.parse('2020-10-28T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_last: true
+ is_uuid: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - lineItem:
+ is_object: true
+ key: lineItem
+ keyPascal: LineItem
+ keySnake: line_item
+ - description:
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: lineItem
+ - quantity:
+ nonString: true
+ key: quantity
+ keyPascal: Quantity
+ default: 1.0
+ is_money: true
+ object: lineItem
+ - unitAmount:
+ nonString: true
+ key: unitAmount
+ keyPascal: UnitAmount
+ keySnake: unit_amount
+ default: 20.0
+ is_money: true
+ object: lineItem
+ - accountCode:
+ is_last: true
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: "000"
+ object: lineItem
+ - line_items:
+ is_list: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ csharp: LineItem
+ java: LineItem
+ - add_lineitems:
+ is_last: true
+ is_list_add: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ java: LineItems
+ python: line_item
+ ruby: line_item
+ csharp: LineItem
+ object: lineItem
+ - invoice:
+ is_object: true
+ key: invoice
+ keyPascal: Invoice
+ - type:
+ nonString: true
+ key: type
+ keyPascal: Type
+ default: ACCREC
+ php: XeroAPI\XeroPHP\Models\Accounting\Invoice::TYPE_ACCREC
+ node: Invoice.TypeEnum.ACCREC
+ ruby: XeroRuby::Accounting::Invoice::ACCREC
+ python_string: ACCREC
+ java: com.xero.models.accounting.Invoice.TypeEnum.ACCREC
+ csharp: Invoice.TypeEnum.ACCREC
+ object: invoice
+ - set_contact:
+ is_variable: true
+ nonString: true
+ key: contact
+ keyPascal: Contact
+ default: contact
+ object: invoice
+ - date:
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: dateValue
+ python: date_value
+ ruby: date_value
+ object: invoice
+ - dueDate:
+ is_variable: true
+ nonString: true
+ key: dueDate
+ keyPascal: Date
+ keySnake: due_date
+ default: dueDateValue
+ python: due_date_value
+ ruby: due_date_value
+ object: invoice
+ - set_lineitem:
+ is_variable: true
+ nonString: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ default: lineItems
+ python: line_items
+ ruby: line_items
+ object: invoice
+ - reference:
+ key: reference
+ keyPascal: Reference
+ default: Website Design
+ object: invoice
+ - status:
+ is_last: true
+ nonString: true
+ key: status
+ keyPascal: Status
+ default: DRAFT
+ php: XeroAPI\XeroPHP\Models\Accounting\Invoice::STATUS_DRAFT
+ node: Invoice.StatusEnum.DRAFT
+ ruby: XeroRuby::Accounting::Invoice::DRAFT
+ python_string: DRAFT
+ java: com.xero.models.accounting.Invoice.StatusEnum.DRAFT
+ csharp: Invoice.StatusEnum.DRAFT
+ object: invoice
+ - invoices:
+ is_object: true
+ key: invoices
+ keyPascal: Invoices
+ - add_invoice:
+ is_last: true
+ is_array_add: true
+ key: invoices
+ keyPascal: Invoices
+ java: Invoices
+ csharp: Invoice
+ object: invoice
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Invoices array with newly created Invoice
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Invoices'
+ example:
+ Id: ccece84a-075c-4fcd-9073-149d4f7a91cf
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552327126164)/
+ Invoices:
+ - Type: ACCREC
+ InvoiceID: ed255415-e141-4150-aab7-89c3bbbb851c
+ InvoiceNumber: INV-0007
+ Reference: Website Design
+ Prepayments: []
+ Overpayments: []
+ AmountDue: 40.00
+ AmountPaid: 0.00
+ SentToContact: false
+ CurrencyRate: 1.000000
+ HasErrors: false
+ IsDiscounted: false
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ AttentionTo: ""
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups:
+ - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22
+ Name: Oasis
+ Status: ACTIVE
+ Contacts: []
+ HasValidationErrors: false
+ IsSupplier: true
+ IsCustomer: true
+ SalesTrackingCategories: []
+ PurchasesTrackingCategories: []
+ ContactPersons:
+ - FirstName: Debbie
+ LastName: Gwyther
+ EmailAddress: debbie@rockstar.com
+ IncludeInEmails: false
+ HasValidationErrors: false
+ DateString: 2019-03-11T00:00:00
+ Date: /Date(1552262400000+0000)/
+ DueDateString: 2018-12-10T00:00:00
+ DueDate: /Date(1544400000000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Acme Tires
+ UnitAmount: 20.00
+ TaxType: NONE
+ TaxAmount: 0.00
+ LineAmount: 40.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 2.0000
+ LineItemID: 5f7a612b-fdcc-4d33-90fa-a9f6bc6db32f
+ ValidationErrors: []
+ SubTotal: 40.00
+ TotalTax: 0.00
+ Total: 40.00
+ UpdatedDateUTC: /Date(1552327126117+0000)/
+ CurrencyCode: NZD
+ StatusAttributeString: OK
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Invoices'
+ example:
+ Invoices:
+ - Type: ACCREC
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ LineItems:
+ - Description: Acme Tires
+ Quantity: 2
+ UnitAmount: 20
+ AccountCode: "200"
+ TaxType: NONE
+ LineAmount: 40
+ Date: "2019-03-11"
+ DueDate: "2018-12-10"
+ Reference: Website Design
+ Status: AUTHORISED
+ /Invoices/{InvoiceID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getInvoice
+ summary: Retrieves a specific sales invoice or purchase bill using a unique invoice Id
+ parameters:
+ - $ref: '#/components/parameters/InvoiceID'
+ - $ref: '#/components/parameters/unitdp'
+ responses:
+ "200":
+ description: Success - return response of type Invoices array with specified Invoices
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Invoices'
+ example:
+ Id: 516f400a-b764-4c88-831b-12d2b210fa24
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1551981658323)/
+ Invoices:
+ - Type: ACCREC
+ InvoiceID: a03ffcd2-5d91-4c7e-b483-318584e9e439
+ InvoiceNumber: INV-0006
+ Reference: Tour
+ Payments:
+ - PaymentID: 38928000-e9a0-420c-8884-f624bab2a351
+ Date: /Date(1552953600000+0000)/
+ Amount: 148062.76
+ Reference: Yahoo
+ CurrencyRate: 1.000000
+ HasAccount: false
+ HasValidationErrors: false
+ Prepayments: []
+ Overpayments: []
+ AmountDue: 0.00
+ AmountPaid: 148062.76
+ SentToContact: false
+ CurrencyRate: 1.000000
+ HasErrors: false
+ IsDiscounted: false
+ HasAttachments: true
+ Attachments:
+ - AttachmentID: 3a2fe7e0-fac7-4ea2-afb2-31cedaabd294
+ FileName: helo-heros.jpg
+ Url: https://api.xero.com/api.xro/2.0/Invoices/a03ffcd2-5d91-4c7e-b483-318584e9e439/Attachments/helo-heros.jpg
+ MimeType: image/jpeg
+ ContentLength: 2878711
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ AttentionTo: ""
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups:
+ - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22
+ Name: Oasis
+ Status: ACTIVE
+ Contacts: []
+ HasValidationErrors: false
+ IsSupplier: true
+ IsCustomer: true
+ SalesTrackingCategories: []
+ PurchasesTrackingCategories: []
+ ContactPersons:
+ - FirstName: Debbie
+ LastName: Gwyther
+ EmailAddress: debbie@rockstar.com
+ IncludeInEmails: false
+ HasValidationErrors: false
+ DateString: 2019-03-07T00:00:00
+ Date: /Date(1551916800000+0000)/
+ DueDateString: 2019-03-13T00:00:00
+ DueDate: /Date(1552435200000+0000)/
+ Status: PAID
+ LineAmountTypes: Exclusive
+ LineItems:
+ - ItemCode: "123"
+ Description: Guitars Fender Strat
+ UnitAmount: 148062.76
+ TaxType: NONE
+ TaxAmount: 0.00
+ LineAmount: 148062.76
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: b18f39d9-7739-4246-9288-72afe939d2d5
+ ValidationErrors: []
+ SubTotal: 148062.76
+ TotalTax: 0.00
+ Total: 148062.76
+ UpdatedDateUTC: /Date(1551981568133+0000)/
+ CurrencyCode: NZD
+ FullyPaidOnDate: /Date(1552953600000+0000)/
+ StatusAttributeString: ERROR
+ ValidationErrors:
+ - Message: 'Invoice # must be unique.'
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateInvoice
+ summary: Updates a specific sales invoices or purchase bills
+ x-hasAccountingValidationError: true
+ x-example:
+ - invoice:
+ is_object: true
+ key: invoice
+ keyPascal: Invoice
+ - reference:
+ is_last: true
+ key: reference
+ keyPascal: Reference
+ default: I am Iron man
+ object: invoice
+ - invoices:
+ is_object: true
+ key: invoices
+ keyPascal: Invoices
+ - add_invoice:
+ is_last: true
+ is_array_add: true
+ key: invoices
+ keyPascal: Invoices
+ java: Invoices
+ csharp: Invoice
+ object: invoice
+ parameters:
+ - $ref: '#/components/parameters/InvoiceID'
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Invoices array with updated Invoice
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Invoices'
+ example:
+ Id: bd83b60e-9d16-4a3b-9f59-0a2d0ccd35f2
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552329729002)/
+ Invoices:
+ - Type: ACCREC
+ InvoiceID: 4074292c-09b3-456d-84e7-add864c6c39b
+ InvoiceNumber: INV-0008
+ Reference: My the Force be With You
+ Prepayments: []
+ Overpayments: []
+ AmountDue: 575.00
+ AmountPaid: 0.00
+ SentToContact: false
+ CurrencyRate: 1.000000
+ HasErrors: false
+ IsDiscounted: false
+ Contact:
+ ContactID: be392c72-c121-4f83-9512-03ac71e54c20
+ ContactStatus: ACTIVE
+ Name: Luke Skywalker
+ EmailAddress: ""
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ - AddressType: POBOX
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1552329691573+0000)/
+ ContactGroups: []
+ IsSupplier: false
+ IsCustomer: true
+ DefaultCurrency: NZD
+ SalesTrackingCategories: []
+ PurchasesTrackingCategories: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-03-11T00:00:00
+ Date: /Date(1552262400000+0000)/
+ DueDateString: 2019-03-12T00:00:00
+ DueDate: /Date(1552348800000+0000)/
+ Status: SUBMITTED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Light Saber
+ UnitAmount: 500.00
+ TaxType: OUTPUT2
+ TaxAmount: 75.00
+ LineAmount: 500.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 6de1bf9f-de95-4c47-9287-37305db758c9
+ ValidationErrors: []
+ SubTotal: 500.00
+ TotalTax: 75.00
+ Total: 575.00
+ UpdatedDateUTC: /Date(1552329728987+0000)/
+ CurrencyCode: NZD
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Invoices'
+ example:
+ Invoices:
+ - Reference: May the force be with you
+ InvoiceID: 00000000-0000-0000-0000-000000000000
+ LineItems: []
+ Contact: {}
+ Type: ACCPAY
+ /Invoices/{InvoiceID}/pdf:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getInvoiceAsPdf
+ x-path: /Invoices/{InvoiceID}
+ summary: Retrieves invoices or purchase bills as PDF files
+ parameters:
+ - $ref: '#/components/parameters/InvoiceID'
+ responses:
+ "200":
+ description: Success - return response of byte array pdf version of specified Invoices
+ content:
+ application/pdf:
+ schema:
+ type: string
+ format: binary
+ /Invoices/{InvoiceID}/Attachments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getInvoiceAttachments
+ summary: Retrieves attachments for a specific invoice or purchase bill
+ parameters:
+ - $ref: '#/components/parameters/InvoiceID'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array of Attachments for specified Invoices
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 7e357a45-69f5-4e8f-8d7b-15da8ef50aab
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552330258523)/
+ Attachments:
+ - AttachmentID: 9808ad7f-c8d4-41cf-995e-bc29cb76fd2c
+ FileName: foobar.jpg
+ Url: https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/foobar.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ - AttachmentID: 5a500c1a-5a02-48de-939e-1d234fd170d4
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ /Invoices/{InvoiceID}/Attachments/{AttachmentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getInvoiceAttachmentById
+ summary: Retrieves a specific attachment from a specific invoices or purchase bills by using a unique attachment Id
+ parameters:
+ - $ref: '#/components/parameters/InvoiceID'
+ - $ref: '#/components/parameters/AttachmentID'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Invoice as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /Invoices/{InvoiceID}/Attachments/{FileName}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getInvoiceAttachmentByFileName
+ summary: Retrieves an attachment from a specific invoice or purchase bill by filename
+ parameters:
+ - $ref: '#/components/parameters/InvoiceID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Invoice as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ post:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: updateInvoiceAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Updates an attachment from a specific invoices or purchase bill by filename
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/InvoiceID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with updated Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: acd7d618-5fef-4d45-849c-a339ea31a973
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552330524005)/
+ Attachments:
+ - AttachmentID: 08085449-fda3-45f4-a685-ff44c8a29ee3
+ FileName: HelloWorld.jpg
+ Url: https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/HelloWorld.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ put:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: createInvoiceAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Creates an attachment for a specific invoice or purchase bill by filename
+ parameters:
+ - $ref: '#/components/parameters/InvoiceID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/includeOnline'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with newly created Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 971fbd18-c850-453a-825f-63f2fee096ee
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552330001318)/
+ Attachments:
+ - AttachmentID: 5a500c1a-5a02-48de-939e-1d234fd170d4
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/Invoices/4074292c-09b3-456d-84e7-add864c6c39b/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /Invoices/{InvoiceID}/OnlineInvoice:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getOnlineInvoice
+ summary: Retrieves a URL to an online invoice
+ parameters:
+ - $ref: '#/components/parameters/InvoiceID'
+ responses:
+ "200":
+ description: Success - return response of type OnlineInvoice array with one OnlineInvoice
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OnlineInvoices'
+ example:
+ Id: d20705fb-fe1c-4366-835b-98de7474da3c
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552331100745)/
+ OnlineInvoices:
+ - OnlineInvoiceUrl: https://in.xero.com/bCWCCfytGdTXoJam9HENWlQt07G6zcDaj4gQojHu
+ /Invoices/{InvoiceID}/Email:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: emailInvoice
+ summary: Sends a copy of a specific invoice to related contact via email
+ x-hasAccountingValidationError: true
+ x-example:
+ - requestEmpty:
+ is_last: true
+ is_object: true
+ key: requestEmpty
+ keyPascal: RequestEmpty
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/InvoiceID'
+ responses:
+ "204":
+ description: Success - return response 204 no content
+ x-isEmpty: true
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RequestEmpty'
+ example: {}
+ /Invoices/{InvoiceID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getInvoiceHistory
+ summary: Retrieves history records for a specific invoice
+ parameters:
+ - $ref: '#/components/parameters/InvoiceID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createInvoiceHistory
+ summary: Creates a history record for a specific invoice
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/InvoiceID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /InvoiceReminders/Settings:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getInvoiceReminders
+ summary: Retrieves invoice reminder settings
+ responses:
+ "200":
+ description: Success - return response of Invoice Reminders
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/InvoiceReminders'
+ example:
+ Id: c7cd0953-c012-4be8-b618-63ce4c2c3494
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552331430618)/
+ InvoiceReminders:
+ - Enabled: false
+ /Items:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getItems
+ summary: Retrieves items
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: IsSold==true
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Code ASC
+ schema:
+ type: string
+ - $ref: '#/components/parameters/unitdp'
+ responses:
+ "200":
+ description: Success - return response of type Items array with all Item
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Items'
+ example:
+ Id: 8487e8d7-5fb3-4f02-b949-dec8f1e38182
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552331874897)/
+ Items:
+ - ItemID: c8c54d65-f3f2-452d-926e-bf450b12fb07
+ Code: "123"
+ Description: Guitars Fender Strat
+ UpdatedDateUTC: /Date(1551981476267+0000)/
+ PurchaseDetails: {}
+ SalesDetails:
+ UnitPrice: 5000.0000
+ AccountCode: "200"
+ TaxType: OUTPUT2
+ Name: Guitars
+ IsTrackedAsInventory: false
+ IsSold: true
+ IsPurchased: false
+ - ItemID: a4544d51-48f6-441f-a623-99ecbced6ab7
+ Code: abc65591
+ Description: Barfoo
+ UpdatedDateUTC: /Date(1552331873580+0000)/
+ PurchaseDetails: {}
+ SalesDetails: {}
+ Name: Hello11350
+ IsTrackedAsInventory: false
+ IsSold: true
+ IsPurchased: true
+ put:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: createItems
+ summary: Creates one or more items
+ x-hasAccountingValidationError: true
+ x-example:
+ - purchaseDetails:
+ is_object: true
+ key: purchaseDetails
+ keyPascal: Purchase
+ keySnake: purchase_details
+ - cOGSAccountCode:
+ is_last: true
+ key: cOGSAccountCode
+ keyPascal: CoGSAccountCode
+ keySnake: cogs_account_code
+ keyCsharp: COGSAccountCode
+ default: 500
+ object: purchaseDetails
+ - item:
+ is_object: true
+ key: item
+ keyPascal: Item
+ - code:
+ key: code
+ keyPascal: Code
+ default: abcXYZ123
+ object: item
+ - name:
+ key: name
+ keyPascal: Name
+ default: HelloWorld
+ object: item
+ - description:
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: item
+ - inventoryAssetAccountCode:
+ key: inventoryAssetAccountCode
+ keyPascal: InventoryAssetAccountCode
+ keySnake: inventory_asset_account_code
+ default: 140
+ object: item
+ - set_purchaseDetails:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: purchaseDetails
+ keyPascal: PurchaseDetails
+ keySnake: purchase_details
+ default: purchaseDetails
+ python: purchase_details
+ ruby: purchase_details
+ object: item
+ - items:
+ is_object: true
+ key: items
+ keyPascal: Items
+ - add_item:
+ is_last: true
+ is_array_add: true
+ key: items
+ keyPascal: Items
+ java: Items
+ csharp: Item
+ object: item
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Items array with newly created Item
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Items'
+ example:
+ Id: ae7ef7c8-9024-4d42-8d59-5f26ed3f508b
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552331871904)/
+ Items:
+ - ItemID: a4544d51-48f6-441f-a623-99ecbced6ab7
+ Code: abc65591
+ Description: foobar
+ UpdatedDateUTC: /Date(1552331871707)/
+ PurchaseDetails: {}
+ SalesDetails: {}
+ Name: Hello11350
+ IsTrackedAsInventory: false
+ IsSold: true
+ IsPurchased: true
+ ValidationErrors:
+ - Message: Price List Item with Code ''abc'' already exists
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Items with an array of Item objects in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Items'
+ example:
+ Items:
+ - Code: code123
+ Name: Item Name XYZ
+ Description: Foobar
+ InventoryAssetAccountCode: "140"
+ PurchaseDetails:
+ COGSAccountCode: "500"
+ post:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: updateOrCreateItems
+ summary: Updates or creates one or more items
+ x-hasAccountingValidationError: true
+ x-example:
+ - item:
+ is_object: true
+ key: item
+ keyPascal: Item
+ - code:
+ key: code
+ keyPascal: Code
+ default: abcXYZ123
+ object: item
+ - name:
+ key: name
+ keyPascal: Name
+ default: HelloWorld
+ object: item
+ - description:
+ is_last: true
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: item
+ - items:
+ is_object: true
+ key: items
+ keyPascal: Items
+ - add_item:
+ is_last: true
+ is_array_add: true
+ key: items
+ keyPascal: Items
+ java: Items
+ csharp: Item
+ object: item
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Items array with newly created Item
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Items'
+ example:
+ Id: ae7ef7c8-9024-4d42-8d59-5f26ed3f508b
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552331871904)/
+ Items:
+ - ItemID: a4544d51-48f6-441f-a623-99ecbced6ab7
+ Code: abc65591
+ Description: foobar
+ UpdatedDateUTC: /Date(1552331871707)/
+ PurchaseDetails: {}
+ SalesDetails: {}
+ Name: Hello11350
+ IsTrackedAsInventory: false
+ IsSold: true
+ IsPurchased: true
+ ValidationErrors:
+ - Message: Price List Item with Code ''abc'' already exists
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Items'
+ example:
+ Items:
+ - Code: ItemCode123
+ Name: ItemName XYZ
+ Description: Item Description ABC
+ /Items/{ItemID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getItem
+ summary: Retrieves a specific item using a unique item Id
+ parameters:
+ - $ref: '#/components/parameters/ItemID'
+ - $ref: '#/components/parameters/unitdp'
+ responses:
+ "200":
+ description: Success - return response of type Items array with specified Item
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Items'
+ example:
+ Id: 0bbd8a92-9ba7-4711-8040-8d6a609ca7e8
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552333420160)/
+ Items:
+ - ItemID: c8c54d65-f3f2-452d-926e-bf450b12fb07
+ Code: "123"
+ Description: Guitars Fender Strat
+ PurchaseDescription: Brand new Fender Strats
+ UpdatedDateUTC: /Date(1552333309387+0000)/
+ PurchaseDetails:
+ UnitPrice: 2500.0000
+ COGSAccountCode: "310"
+ TaxType: INPUT2
+ SalesDetails:
+ UnitPrice: 5000.0000
+ AccountCode: "200"
+ TaxType: OUTPUT2
+ Name: Guitars
+ IsTrackedAsInventory: true
+ InventoryAssetAccountCode: "630"
+ TotalCostPool: 25000.00
+ QuantityOnHand: 10.0000
+ IsSold: true
+ IsPurchased: true
+ ValidationErrors: []
+ post:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: updateItem
+ summary: Updates a specific item
+ x-hasAccountingValidationError: true
+ x-example:
+ - item:
+ is_object: true
+ key: item
+ keyPascal: Item
+ - code:
+ key: code
+ keyPascal: Code
+ default: ItemCode123
+ object: item
+ - description:
+ is_last: true
+ key: description
+ keyPascal: Description
+ default: Goodbye
+ object: item
+ - items:
+ is_object: true
+ key: items
+ keyPascal: Items
+ - add_item:
+ is_last: true
+ is_array_add: true
+ key: items
+ keyPascal: Items
+ java: Items
+ csharp: Item
+ object: item
+ parameters:
+ - $ref: '#/components/parameters/ItemID'
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Items array with updated Item
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Items'
+ example:
+ Id: 24feb629-6b14-499e-9aa1-fc2c596c0280
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552332558975)/
+ Items:
+ - ItemID: a7e87086-e0ae-4df2-83d7-e26e9a6b7786
+ Code: abc38306
+ Description: Hello Xero
+ UpdatedDateUTC: /Date(1552332558924)/
+ PurchaseDetails: {}
+ SalesDetails: {}
+ Name: Hello8746
+ IsTrackedAsInventory: false
+ IsSold: true
+ IsPurchased: true
+ ValidationErrors: []
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Items'
+ example:
+ Items:
+ - Code: ItemCode123
+ Description: Description 123
+ delete:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: deleteItem
+ summary: Deletes a specific item
+ parameters:
+ - $ref: '#/components/parameters/ItemID'
+ responses:
+ "204":
+ description: Success - return response 204 no content
+ x-isEmpty: true
+ "400":
+ $ref: '#/components/responses/400Error'
+ /Items/{ItemID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getItemHistory
+ summary: Retrieves history for a specific item
+ parameters:
+ - $ref: '#/components/parameters/ItemID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: createItemHistory
+ summary: Creates a history record for a specific item
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ItemID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /Journals:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.journals.read
+ tags:
+ - Accounting
+ operationId: getJournals
+ summary: Retrieves journals
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: offset
+ description: Offset by a specified journal number. e.g. journals with a JournalNumber greater than the offset will be returned
+ example: 10
+ schema:
+ type: integer
+ - in: query
+ name: paymentsOnly
+ x-snake: payments_only
+ description: Filter to retrieve journals on a cash basis. Journals are returned on an accrual basis by default.
+ example: true
+ x-example-python: "True"
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: Success - return response of type Journals array with all Journals
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Journals'
+ example:
+ Id: 49a09a97-df50-4679-8043-02c86e0dcf5f
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552335214210)/
+ Journals:
+ - JournalID: 1b31feeb-aa23-404c-8c19-24c827c53661
+ JournalDate: /Date(1539993600000+0000)/
+ JournalNumber: 1
+ CreatedDateUTC: /Date(1541176243467+0000)/
+ Reference: Red Fish, Blue Fish
+ SourceID: d4956132-ed94-4dd7-9eaa-aa22dfdf06f2
+ SourceType: ACCREC
+ 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
+ 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: []
+ - JournalID: 2be66e45-805b-46de-921d-c67e1d3dad2a
+ JournalDate: /Date(1539993600000+0000)/
+ JournalNumber: 9
+ CreatedDateUTC: /Date(1541176504083+0000)/
+ Reference: Red Fish, Blue Fish
+ SourceID: 046d8a6d-1ae1-4b4d-9340-5601bdf41b87
+ SourceType: ACCREC
+ JournalLines:
+ - JournalLineID: ba8a5680-a753-4a35-b3dd-0bc72e5c26a1
+ AccountID: b94495d0-44ab-4199-a1d0-427a4877e100
+ AccountCode: "610"
+ AccountType: CURRENT
+ AccountName: Accounts Receivable
+ Description: ""
+ NetAmount: 40.00
+ GrossAmount: 40.00
+ TaxAmount: 0.00
+ TrackingCategories: []
+ - JournalLineID: 09a0b9b9-0222-4e24-8c31-efef472e22f1
+ 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: []
+ - JournalID: d0ed2957-ebba-4d3a-8367-ae9ccd574885
+ JournalDate: /Date(1543449600000+0000)/
+ JournalNumber: 14
+ CreatedDateUTC: /Date(1541176592673+0000)/
+ SourceID: 99ea7f6b-c513-4066-bc27-b7c65dcd76c2
+ SourceType: ACCRECPAYMENT
+ JournalLines:
+ - JournalLineID: 1bdae2b7-3035-40ec-b344-b12b1c23adc4
+ AccountID: b94495d0-44ab-4199-a1d0-427a4877e100
+ AccountCode: "610"
+ AccountType: CURRENT
+ AccountName: Accounts Receivable
+ Description: ""
+ NetAmount: -46.00
+ GrossAmount: -46.00
+ TaxAmount: 0.00
+ TrackingCategories: []
+ - JournalLineID: 353be85e-ae79-4bb3-9483-5ea7682fc0a3
+ AccountID: 5690f1e8-1d02-4893-90c2-ee1a69eff942
+ AccountCode: "970"
+ AccountType: EQUITY
+ AccountName: Owner A Funds Introduced
+ Description: ""
+ NetAmount: 46.00
+ GrossAmount: 46.00
+ TaxAmount: 0.00
+ TrackingCategories: []
+ - JournalID: 772e8133-7f12-4edc-ab98-aa6dceb16c9d
+ JournalDate: /Date(1552262400000+0000)/
+ JournalNumber: 30
+ CreatedDateUTC: /Date(1552333389227+0000)/
+ Reference: ""
+ SourceID: 5376633d-0456-43a3-8234-e457a3f50a12
+ SourceType: ACCPAY
+ JournalLines:
+ - JournalLineID: 33469836-642f-4973-a708-0e99339dff4a
+ AccountID: a2a4795b-a01f-40eb-afa6-a34b4514875d
+ AccountCode: "800"
+ AccountType: CURRLIAB
+ AccountName: Accounts Payable
+ Description: ""
+ NetAmount: -28750.00
+ GrossAmount: -28750.00
+ TaxAmount: 0.00
+ TrackingCategories: []
+ - JournalLineID: 4f3b6462-5cf6-4b55-a2ae-de4039878215
+ AccountID: 53a12a15-7e9b-4a31-85f4-a7cee6d04215
+ AccountCode: "630"
+ AccountType: CURRENT
+ AccountName: Inventory
+ Description: Brand new Fender Strats
+ NetAmount: 25000.00
+ GrossAmount: 28750.00
+ TaxAmount: 3750.00
+ TaxType: INPUT2
+ TaxName: 15% GST on Expenses
+ TrackingCategories: []
+ - JournalLineID: 534e822e-d441-48a7-8e57-5ad54729e83e
+ AccountID: 17d9a4a0-3181-4803-a96b-f0dbe589091b
+ AccountCode: "820"
+ AccountType: CURRLIAB
+ AccountName: GST
+ Description: ""
+ NetAmount: 3750.00
+ GrossAmount: 3750.00
+ TaxAmount: 0.00
+ TrackingCategories: []
+ /Journals/{JournalID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.journals.read
+ tags:
+ - Accounting
+ operationId: getJournal
+ summary: Retrieves a specific journal using a unique journal Id.
+ parameters:
+ - $ref: '#/components/parameters/JournalID'
+ 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: []
+ /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'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getLinkedTransactions
+ summary: Retrieves linked transactions (billable expenses)
+ parameters:
+ - in: query
+ 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.
+ example: 1
+ schema:
+ type: integer
+ - in: query
+ name: LinkedTransactionID
+ x-snake: linked_transaction_id
+ description: The Xero identifier for an Linked Transaction
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ - in: query
+ name: SourceTransactionID
+ x-snake: source_transaction_id
+ description: Filter by the SourceTransactionID. Get the linked transactions created from a particular ACCPAY invoice
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ - in: query
+ name: ContactID
+ x-snake: contact_id
+ description: Filter by the ContactID. Get all the linked transactions that have been assigned to a particular customer.
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ - in: query
+ name: Status
+ x-snake: status
+ description: Filter by the combination of ContactID and Status. Get the linked transactions associated to a customer and with a status
+ example: APPROVED
+ schema:
+ type: string
+ - in: query
+ name: TargetTransactionID
+ x-snake: target_transaction_id
+ description: Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ responses:
+ "200":
+ description: Success - return response of type LinkedTransactions array with all LinkedTransaction
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LinkedTransactions'
+ example:
+ Id: 516aabd0-e670-48d5-b0eb-10dce4494dd8
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552348338096)/
+ LinkedTransactions:
+ - LinkedTransactionID: 5cf7d9c0-b9a7-4433-a2dc-ae3c11bba39b
+ SourceTransactionID: aec416dd-38ea-40dc-9f0b-813c8c71f87f
+ SourceLineItemID: 77e0b23b-5b79-4f4b-ae20-c9031d41442f
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ TargetTransactionID: 83693fc1-5b05-4807-b190-109d4a85dd5f
+ TargetLineItemID: d5128ff1-0f39-4d2a-a6d5-46dfaf5f075c
+ Status: ONDRAFT
+ Type: BILLABLEEXPENSE
+ UpdatedDateUTC: /Date(1552347991000+0000)/
+ SourceTransactionTypeCode: ACCPAY
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createLinkedTransaction
+ summary: Creates linked transactions (billable expenses)
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ x-hasAccountingValidationError: true
+ x-example:
+ - linkedTransaction:
+ is_object: true
+ key: linkedTransaction
+ keyPascal: LinkedTransaction
+ keySnake: linked_transaction
+ - sourceTransactionID:
+ is_uuid: true
+ key: sourceTransactionID
+ keyPascal: SourceTransactionID
+ keySnake: source_transaction_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: linkedTransaction
+ - sourceLineItemID:
+ is_last: true
+ is_uuid: true
+ key: sourceLineItemID
+ keyPascal: SourceLineItemID
+ keySnake: source_line_item_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: linkedTransaction
+ responses:
+ "200":
+ description: Success - return response of type LinkedTransactions array with newly created LinkedTransaction
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LinkedTransactions'
+ example:
+ Id: f32b30e5-32d1-42a8-bcc9-5b22828f725c
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552351054646)/
+ LinkedTransactions:
+ - LinkedTransactionID: e9684b6c-4df9-45a0-917b-85cc29857008
+ SourceTransactionID: a848644a-f20f-4630-98c3-386bd7505631
+ SourceLineItemID: b0df260d-3cc8-4ced-9bd6-41924f624ed3
+ Status: DRAFT
+ Type: BILLABLEEXPENSE
+ UpdatedDateUTC: /Date(1552351055000+0000)/
+ SourceTransactionTypeCode: ACCPAY
+ ValidationErrors:
+ - Message: The SourceLineItemID and SourceTransactionID do not match
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: LinkedTransaction object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LinkedTransaction'
+ example:
+ LinkedTransactions:
+ - SourceTransactionID: a848644a-f20f-4630-98c3-386bd7505631
+ SourceLineItemID: b0df260d-3cc8-4ced-9bd6-41924f624ed3
+ /LinkedTransactions/{LinkedTransactionID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getLinkedTransaction
+ summary: Retrieves a specific linked transaction (billable expenses) using a unique linked transaction Id
+ parameters:
+ - $ref: '#/components/parameters/LinkedTransactionID'
+ responses:
+ "200":
+ description: Success - return response of type LinkedTransactions array with a specified LinkedTransaction
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LinkedTransactions'
+ example:
+ Id: 171ca542-874d-44e2-8930-db9bccd7d88b
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552348339875)/
+ LinkedTransactions:
+ - LinkedTransactionID: 5cf7d9c0-b9a7-4433-a2dc-ae3c11bba39b
+ SourceTransactionID: aec416dd-38ea-40dc-9f0b-813c8c71f87f
+ SourceLineItemID: 77e0b23b-5b79-4f4b-ae20-c9031d41442f
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ TargetTransactionID: 83693fc1-5b05-4807-b190-109d4a85dd5f
+ TargetLineItemID: d5128ff1-0f39-4d2a-a6d5-46dfaf5f075c
+ Status: ONDRAFT
+ Type: BILLABLEEXPENSE
+ UpdatedDateUTC: /Date(1552347991000+0000)/
+ SourceTransactionTypeCode: ACCPAY
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateLinkedTransaction
+ summary: Updates a specific linked transactions (billable expenses)
+ x-hasAccountingValidationError: true
+ x-example:
+ - linkedTransaction:
+ is_object: true
+ key: linkedTransaction
+ keyPascal: LinkedTransaction
+ keySnake: linked_transaction
+ - sourceLineItemID:
+ is_uuid: true
+ key: sourceLineItemID
+ keyPascal: SourceLineItemID
+ keySnake: source_line_item_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: linkedTransaction
+ - contactID:
+ is_last: true
+ is_uuid: true
+ key: contactID
+ keyPascal: ContactID
+ default: 00000000-0000-0000-0000-000000000000
+ object: linkedTransaction
+ - linkedTransactions:
+ is_object: true
+ key: linkedTransactions
+ keyPascal: LinkedTransactions
+ - add_linkedTransaction:
+ is_last: true
+ is_array_add: true
+ key: linkedTransactions
+ keyPascal: LinkedTransactions
+ keySnake: linked_transactions
+ java: LinkedTransactions
+ python: linked_transaction
+ ruby: linked_transaction
+ csharp: LinkedTransaction
+ object: linkedTransaction
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/LinkedTransactionID'
+ responses:
+ "200":
+ description: Success - return response of type LinkedTransactions array with updated LinkedTransaction
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LinkedTransactions'
+ example:
+ Id: bd364af7-08f0-432b-81db-c1e5ba05f3dd
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552351488159)/
+ LinkedTransactions:
+ - LinkedTransactionID: e9684b6c-4df9-45a0-917b-85cc29857008
+ SourceTransactionID: a848644a-f20f-4630-98c3-386bd7505631
+ SourceLineItemID: b0df260d-3cc8-4ced-9bd6-41924f624ed3
+ ContactID: 4e1753b9-018a-4775-b6aa-1bc7871cfee3
+ Status: DRAFT
+ Type: BILLABLEEXPENSE
+ UpdatedDateUTC: /Date(1552351055000+0000)/
+ SourceTransactionTypeCode: ACCPAY
+ "400":
+ description: Success - return response of type LinkedTransactions array with updated LinkedTransaction
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ example:
+ ErrorNumber: 10
+ Type: ValidationException
+ Message: A validation exception occurred
+ Elements:
+ - LinkedTransactionID: 5a68b5b4-8cf0-4af5-8c3c-513cc19e1c73
+ SourceTransactionID: aec416dd-38ea-40dc-9f0b-813c8c71f87f
+ SourceLineItemID: 77e0b23b-5b79-4f4b-ae20-c9031d41442f
+ ContactID: 4e1753b9-018a-4775-b6aa-1bc7871cfee3
+ TargetTransactionID: 83693fc1-5b05-4807-b190-109d4a85dd5f
+ TargetLineItemID: d5128ff1-0f39-4d2a-a6d5-46dfaf5f075c
+ Status: ONDRAFT
+ Type: BILLABLEEXPENSE
+ UpdatedDateUTC: /Date(1552349706000+0000)/
+ SourceTransactionTypeCode: ACCPAY
+ ValidationErrors:
+ - Message: The ContactID and the TargetTransaction ContactID do not match
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LinkedTransactions'
+ example:
+ LinkedTransactions:
+ - SourceTransactionID: 00000000-0000-0000-0000-000000000000
+ SourceLineItemID: 00000000-0000-0000-0000-000000000000
+ delete:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: deleteLinkedTransaction
+ summary: Deletes a specific linked transactions (billable expenses)
+ parameters:
+ - $ref: '#/components/parameters/LinkedTransactionID'
+ responses:
+ "204":
+ description: Success - return response 204 no content
+ x-isEmpty: true
+ "400":
+ $ref: '#/components/responses/400Error'
+ /ManualJournals:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getManualJournals
+ summary: Retrieves manual journals
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="DRAFT"
+ x-example-csharp: Status==\"DRAFT\"
+ x-example-java: Status=="' + ManualJournal.StatusEnum.DRAFT + '"
+ x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\ManualJournal::STATUS_DRAFT . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::ManualJournal::DRAFT}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Date ASC
+ schema:
+ type: string
+ - in: query
+ 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
+ example: 1
+ schema:
+ type: integer
+ - $ref: '#/components/parameters/pageSize'
+ responses:
+ "200":
+ description: Success - return response of type ManualJournals array with a all ManualJournals
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ManualJournals'
+ example:
+ Id: 8a508ec1-b578-48bf-97df-020c918fbf7d
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552357217359)/
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 3
+ ManualJournals:
+ - Date: /Date(1553126400000+0000)/
+ Status: POSTED
+ LineAmountTypes: NoTax
+ UpdatedDateUTC: /Date(1552357188083+0000)/
+ ManualJournalID: 0b159335-606b-485f-b51b-97b3b32bad32
+ Narration: 'Reversal: These aren''''t the droids you are looking for'
+ JournalLines: []
+ ShowOnCashBasisReports: true
+ HasAttachments: false
+ - Date: /Date(1552348800000+0000)/
+ Status: POSTED
+ LineAmountTypes: NoTax
+ UpdatedDateUTC: /Date(1552357188147+0000)/
+ ManualJournalID: 99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4
+ Narration: These aren''t the droids you are looking for
+ JournalLines: []
+ ShowOnCashBasisReports: true
+ HasAttachments: true
+ - Date: /Date(1552262400000+0000)/
+ Status: DRAFT
+ LineAmountTypes: NoTax
+ UpdatedDateUTC: /Date(1552357216843+0000)/
+ ManualJournalID: ecb6b362-c78f-462a-a229-a66abf115e92
+ Narration: Foo bar
+ JournalLines: []
+ ShowOnCashBasisReports: true
+ HasAttachments: false
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createManualJournals
+ summary: Creates one or more manual journals
+ x-hasAccountingValidationError: true
+ x-example:
+ - dateValue:
+ is_date: true
+ key: dateValue
+ keyPascal: Date
+ keySnake: date_value
+ java_datatype: LocalDate
+ default: LocalDate.of(2020, Month.OCTOBER, 10)
+ java: LocalDate.of(2020, Month.OCTOBER, 10)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2019-10-10')
+ node: '''2020-10-10'''
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - manualJournalLines:
+ is_list: true
+ key: manualJournalLines
+ keyPascal: ManualJournalLine
+ keySnake: manual_journal_lines
+ - credit:
+ is_object: true
+ key: credit
+ keyPascal: ManualJournalLine
+ - lineAmount:
+ nonString: true
+ key: lineAmount
+ keyPascal: LineAmount
+ keySnake: line_amount
+ default: -100.0
+ is_money: true
+ object: credit
+ - accountCode:
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: 400
+ object: credit
+ - description:
+ is_last: true
+ key: description
+ keyPascal: Description
+ default: Hello there
+ object: credit
+ - add_credit:
+ is_last: true
+ is_list_add: true
+ key: manualJournalLines
+ keyPascal: ManualJournalLine
+ keySnake: manual_journal_lines
+ object: credit
+ - debit:
+ is_object: true
+ key: debit
+ keyPascal: ManualJournalLine
+ - lineAmount:
+ nonString: true
+ key: lineAmount
+ keyPascal: LineAmount
+ keySnake: line_amount
+ default: 100.0
+ is_money: true
+ object: debit
+ - accountCode:
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: 120
+ object: debit
+ - description:
+ is_last: true
+ key: description
+ keyPascal: Description
+ default: Hello there
+ object: debit
+ - add_debit:
+ is_last: true
+ is_list_add: true
+ key: manualJournalLines
+ keyPascal: ManualJournalLine
+ keySnake: manual_journal_lines
+ object: debit
+ - manualJournal:
+ is_object: true
+ key: manualJournal
+ keyPascal: ManualJournal
+ keySnake: manual_journal
+ - narration:
+ key: narration
+ keyPascal: Narration
+ default: Foobar
+ object: manualJournal
+ - date:
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: dateValue
+ python: date_value
+ ruby: date_value
+ object: manualJournal
+ - set_manualJournalLines:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: journalLines
+ keyPascal: JournalLines
+ keySnake: journal_lines
+ default: manualJournalLines
+ python: manual_journal_lines
+ ruby: manual_journal_lines
+ object: manualJournal
+ - manualJournals:
+ is_object: true
+ key: manualJournals
+ keyPascal: ManualJournals
+ - add_manualJournal:
+ is_last: true
+ is_array_add: true
+ key: manualJournals
+ keyPascal: ManualJournals
+ keySnake: manual_journals
+ java: ManualJournals
+ php: manualJournals
+ python: manual_journal
+ ruby: manual_journal
+ csharp: ManualJournal
+ object: manualJournal
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type ManualJournals array with newly created ManualJournal
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ManualJournals'
+ example:
+ Id: 45dfa608-0fcb-4f30-a377-c82cd348569c
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552595972952)/
+ ManualJournals:
+ - Date: /Date(1552521600000+0000)/
+ Status: DRAFT
+ LineAmountTypes: NoTax
+ UpdatedDateUTC: /Date(1552595972920+0000)/
+ ManualJournalID: d312dd5e-a53e-46d1-9d51-c569ef4570b7
+ Narration: Foo bar
+ JournalLines:
+ - Description: Hello there
+ TaxType: NONE
+ LineAmount: 100.00
+ AccountCode: "400"
+ Tracking: []
+ AccountID: c4f29c22-28c2-4a13-9eab-ecbbd641ffdf
+ IsBlank: false
+ - Description: Goodbye
+ TaxType: NONE
+ LineAmount: -100.00
+ AccountCode: "400"
+ Tracking:
+ - Name: Simpsons
+ Option: Bart
+ TrackingCategoryID: 6a68adde-f210-4465-b0a9-0d8cc6f50762
+ TrackingOptionID: dc54c220-0140-495a-b925-3246adc0075f
+ AccountID: c4f29c22-28c2-4a13-9eab-ecbbd641ffdf
+ IsBlank: false
+ ShowOnCashBasisReports: true
+ Warnings:
+ - Message: Account code ''476'' has been removed as it does not match a recognised account.
+ ValidationErrors:
+ - Message: The total debits (100.00) must equal total credits (-10.00)
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: ManualJournals array with ManualJournal object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ManualJournals'
+ example:
+ ManualJournals:
+ - Narration: Journal Desc
+ JournalLines:
+ - LineAmount: 100
+ AccountCode: "400"
+ Description: Money Movement
+ - LineAmount: -100
+ AccountCode: "400"
+ Description: Prepayment of things
+ Tracking:
+ - Name: North
+ Option: Region
+ Date: "2019-03-14"
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateOrCreateManualJournals
+ summary: Updates or creates a single manual journal
+ x-hasAccountingValidationError: true
+ x-example:
+ - dateValue:
+ is_date: true
+ key: dateValue
+ keyPascal: Date
+ keySnake: date_value
+ java_datatype: LocalDate
+ default: LocalDate.of(2020, Month.OCTOBER, 10)
+ java: LocalDate.of(2020, Month.OCTOBER, 10)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-10')
+ node: '''2020-10-10'''
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - manualJournalLines:
+ is_list: true
+ key: manualJournalLines
+ keyPascal: ManualJournalLine
+ keySnake: manual_journal_lines
+ - credit:
+ is_object: true
+ key: credit
+ keyPascal: ManualJournalLine
+ - lineAmount:
+ nonString: true
+ key: lineAmount
+ keyPascal: LineAmount
+ keySnake: line_amount
+ default: -100.0
+ is_money: true
+ object: credit
+ - accountCode:
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: 400
+ object: credit
+ - description:
+ is_last: true
+ key: description
+ keyPascal: Description
+ default: Hello there
+ object: credit
+ - add_credit:
+ is_last: true
+ is_list_add: true
+ key: manualJournalLines
+ keyPascal: ManualJournalLine
+ keySnake: manual_journal_lines
+ object: credit
+ - debit:
+ is_object: true
+ key: debit
+ keyPascal: ManualJournalLine
+ - lineAmount:
+ nonString: true
+ key: lineAmount
+ keyPascal: LineAmount
+ keySnake: line_amount
+ default: 100.0
+ is_money: true
+ object: debit
+ - accountCode:
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: 120
+ object: debit
+ - description:
+ is_last: true
+ key: description
+ keyPascal: Description
+ default: Hello there
+ object: debit
+ - add_debit:
+ is_last: true
+ is_list_add: true
+ key: manualJournalLines
+ keyPascal: ManualJournalLine
+ keySnake: manual_journal_lines
+ object: debit
+ - manualJournal:
+ is_object: true
+ key: manualJournal
+ keyPascal: ManualJournal
+ keySnake: manual_journal
+ - narration:
+ key: narration
+ keyPascal: Narration
+ default: Foobar
+ object: manualJournal
+ - date:
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: dateValue
+ python: date_value
+ ruby: date_value
+ object: manualJournal
+ - set_manualJournalLines:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: manualJournalLines
+ keyPascal: JournalLines
+ keySnake: journal_lines
+ default: manualJournalLines
+ python: manual_journal_lines
+ ruby: manual_journal_lines
+ object: manualJournal
+ - manualJournals:
+ is_object: true
+ key: manualJournals
+ keyPascal: ManualJournals
+ - add_manualJournal:
+ is_last: true
+ is_array_add: true
+ key: manualJournals
+ keyPascal: ManualJournals
+ keySnake: manual_journals
+ java: ManualJournals
+ php: manualJournals
+ python: manual_journal
+ ruby: manual_journal
+ csharp: ManualJournal
+ object: manualJournal
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type ManualJournals array with newly created ManualJournal
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ManualJournals'
+ example:
+ Id: 45dfa608-0fcb-4f30-a377-c82cd348569c
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552595972952)/
+ ManualJournals:
+ - Date: /Date(1552521600000+0000)/
+ Status: DRAFT
+ LineAmountTypes: NoTax
+ UpdatedDateUTC: /Date(1552595972920+0000)/
+ ManualJournalID: d312dd5e-a53e-46d1-9d51-c569ef4570b7
+ Narration: Foo bar
+ JournalLines:
+ - Description: Hello there
+ TaxType: NONE
+ LineAmount: 100.00
+ AccountCode: "400"
+ Tracking: []
+ AccountID: c4f29c22-28c2-4a13-9eab-ecbbd641ffdf
+ IsBlank: false
+ - Description: Goodbye
+ TaxType: NONE
+ LineAmount: -100.00
+ AccountCode: "400"
+ Tracking:
+ - Name: Simpsons
+ Option: Bart
+ TrackingCategoryID: 6a68adde-f210-4465-b0a9-0d8cc6f50762
+ TrackingOptionID: dc54c220-0140-495a-b925-3246adc0075f
+ AccountID: c4f29c22-28c2-4a13-9eab-ecbbd641ffdf
+ IsBlank: false
+ ShowOnCashBasisReports: true
+ Warnings:
+ - Message: Account code ''476'' has been removed as it does not match a recognised account.
+ ValidationErrors:
+ - Message: The total debits (100.00) must equal total credits (-10.00)
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: ManualJournals array with ManualJournal object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ManualJournals'
+ example:
+ ManualJournals:
+ - Narration: Journal Desc
+ JournalLines:
+ - LineAmount: 100
+ AccountCode: "400"
+ Description: Money Movement
+ - LineAmount: -100
+ AccountCode: "400"
+ Description: Prepayment of things
+ Tracking:
+ - Name: North
+ Option: Region
+ Date: "2019-03-14"
+ /ManualJournals/{ManualJournalID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getManualJournal
+ summary: Retrieves a specific manual journal
+ parameters:
+ - $ref: '#/components/parameters/ManualJournalID'
+ responses:
+ "200":
+ description: Success - return response of type ManualJournals array with a specified ManualJournals
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ManualJournals'
+ example:
+ Id: 7321fc21-1a13-4f40-ae47-df59cff5676d
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552399859139)/
+ ManualJournals:
+ - Date: /Date(1552348800000+0000)/
+ Status: POSTED
+ LineAmountTypes: NoTax
+ UpdatedDateUTC: /Date(1552357188147+0000)/
+ ManualJournalID: 99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4
+ Narration: These aren''t the droids you are looking for
+ JournalLines:
+ - Description: These aren''t the droids you are looking for
+ TaxType: NONE
+ TaxAmount: 0.00
+ LineAmount: 100.00
+ AccountCode: "429"
+ Tracking: []
+ AccountID: 160bad11-c1b7-4c7e-8903-dca925d78721
+ IsBlank: false
+ - Description: Yes the are
+ TaxType: NONE
+ TaxAmount: 0.00
+ LineAmount: -100.00
+ AccountCode: "200"
+ Tracking: []
+ AccountID: e0a5d892-9f9f-44f0-a153-5cb7db125170
+ IsBlank: false
+ ShowOnCashBasisReports: true
+ HasAttachments: true
+ Attachments:
+ - AttachmentID: 166ca8f8-8bc6-4780-8466-a0e474d586ea
+ FileName: giphy.gif
+ Url: https://api.xero.com/api.xro/2.0/manualjournal/99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4/Attachments/giphy.gif
+ MimeType: image/gif
+ ContentLength: 495727
+ - AttachmentID: 5e5036f9-b1e0-4c5d-a93f-61900137e40b
+ FileName: ridehistory.pdf
+ Url: https://api.xero.com/api.xro/2.0/manualjournal/99cb8353-ce73-4a5d-8e0d-8b0edf86cfc4/Attachments/ridehistory.pdf
+ MimeType: application/pdf
+ ContentLength: 4423
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateManualJournal
+ summary: Updates a specific manual journal
+ x-hasAccountingValidationError: true
+ x-example:
+ - dateValue:
+ is_date: true
+ key: dateValue
+ keyPascal: Date
+ keySnake: date_value
+ java_datatype: LocalDate
+ default: LocalDate.of(2020, Month.OCTOBER, 10)
+ java: LocalDate.of(2020, Month.OCTOBER, 10)
+ csharp: new DateTime(2020, 10, 10)
+ php: new DateTime('2020-10-10')
+ node: '''2020-10-10'''
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - manualJournalLines:
+ is_list: true
+ key: manualJournalLines
+ keyPascal: ManualJournalLine
+ keySnake: manual_journal_lines
+ - credit:
+ is_object: true
+ key: credit
+ keyPascal: ManualJournalLine
+ - lineAmount:
+ nonString: true
+ key: lineAmount
+ keyPascal: LineAmount
+ keySnake: line_amount
+ default: -100.0
+ is_money: true
+ object: credit
+ - accountCode:
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: 400
+ object: credit
+ - description:
+ is_last: true
+ key: description
+ keyPascal: Description
+ default: Hello there
+ object: credit
+ - add_credit:
+ is_last: true
+ is_list_add: true
+ key: manualJournalLines
+ keyPascal: ManualJournalLine
+ keySnake: manual_journal_lines
+ object: credit
+ - debit:
+ is_object: true
+ key: debit
+ keyPascal: ManualJournalLine
+ - lineAmount:
+ nonString: true
+ key: lineAmount
+ keyPascal: LineAmount
+ keySnake: line_amount
+ default: 100.0
+ is_money: true
+ object: debit
+ - accountCode:
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: 120
+ object: debit
+ - description:
+ is_last: true
+ key: description
+ keyPascal: Description
+ default: Hello there
+ object: debit
+ - add_debit:
+ is_last: true
+ is_list_add: true
+ key: manualJournalLines
+ keyPascal: ManualJournalLine
+ keySnake: manual_journal_lines
+ object: debit
+ - manualJournal:
+ is_object: true
+ key: manualJournal
+ keyPascal: ManualJournal
+ keySnake: manual_journal
+ - narration:
+ key: narration
+ keyPascal: Narration
+ default: Foobar
+ object: manualJournal
+ - date:
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: dateValue
+ python: date_value
+ ruby: date_value
+ object: manualJournal
+ - set_manualJournalLines:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: manualJournalLines
+ keyPascal: JournalLines
+ keySnake: journal_lines
+ default: manualJournalLines
+ python: manual_journal_lines
+ ruby: manual_journal_lines
+ object: manualJournal
+ - manualJournals:
+ is_object: true
+ key: manualJournals
+ keyPascal: ManualJournals
+ - add_manualJournal:
+ is_last: true
+ is_array_add: true
+ key: manualJournals
+ keyPascal: ManualJournals
+ keySnake: manual_journals
+ java: ManualJournals
+ php: manualJournals
+ python: manual_journal
+ ruby: manual_journal
+ csharp: ManualJournal
+ object: manualJournal
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ManualJournalID'
+ responses:
+ "200":
+ description: Success - return response of type ManualJournals array with an updated ManualJournal
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ManualJournals'
+ example:
+ Id: b694559c-686c-4047-b657-661ba6c0dd1f
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552357736850)/
+ ManualJournals:
+ - Date: /Date(1552262400000+0000)/
+ Status: DRAFT
+ LineAmountTypes: NoTax
+ UpdatedDateUTC: /Date(1552357736820+0000)/
+ ManualJournalID: 07eac261-78ef-47a0-a0eb-a57b74137877
+ Narration: Hello Xero
+ JournalLines:
+ - Description: Hello there
+ TaxType: NONE
+ TaxAmount: 0.00
+ LineAmount: 100.00
+ AccountCode: "400"
+ Tracking: []
+ AccountID: c4f29c22-28c2-4a13-9eab-ecbbd641ffdf
+ IsBlank: false
+ - Description: Goodbye
+ TaxType: NONE
+ TaxAmount: 0.00
+ LineAmount: -100.00
+ AccountCode: "400"
+ Tracking: []
+ AccountID: c4f29c22-28c2-4a13-9eab-ecbbd641ffdf
+ IsBlank: false
+ ShowOnCashBasisReports: true
+ HasAttachments: false
+ Attachments: []
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ManualJournals'
+ example:
+ ManualJournals:
+ - Narration: Hello Xero
+ ManualJournalID: 00000000-0000-0000-0000-000000000000
+ JournalLines: []
+ /ManualJournals/{ManualJournalID}/Attachments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getManualJournalAttachments
+ summary: Retrieves attachment for a specific manual journal
+ parameters:
+ - $ref: '#/components/parameters/ManualJournalID'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with all Attachments for a ManualJournals
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 5fa4b3ef-7945-45a7-9bab-10e830673dfb
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552404121471)/
+ Attachments:
+ - AttachmentID: 16e86f32-3e25-4209-8662-c0dfd91b654c
+ FileName: HelloWorld.jpg
+ Url: https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/HelloWorld.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ - AttachmentID: ff7c439e-a057-4807-ac2c-b558d7df7511
+ FileName: foobar.jpg
+ Url: https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/foobar.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ /ManualJournals/{ManualJournalID}/Attachments/{AttachmentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getManualJournalAttachmentById
+ summary: Allows you to retrieve a specific attachment from a specific manual journal using a unique attachment Id
+ parameters:
+ - $ref: '#/components/parameters/ManualJournalID'
+ - $ref: '#/components/parameters/AttachmentID'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Manual Journal as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /ManualJournals/{ManualJournalID}/Attachments/{FileName}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getManualJournalAttachmentByFileName
+ summary: Retrieves a specific attachment from a specific manual journal by file name
+ parameters:
+ - $ref: '#/components/parameters/ManualJournalID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Manual Journal as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ post:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: updateManualJournalAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Updates a specific attachment from a specific manual journal by file name
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ManualJournalID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with an update Attachment for a ManualJournals
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: e1cb9deb-a8f0-477f-b4d1-cf0c6c39e080
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552401039306)/
+ Attachments:
+ - AttachmentID: 16e86f32-3e25-4209-8662-c0dfd91b654c
+ FileName: HelloWorld.jpg
+ Url: https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/HelloWorld.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ put:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: createManualJournalAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Creates a specific attachment for a specific manual journal by file name
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ManualJournalID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with a newly created Attachment for a ManualJournals
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: a864994c-e7d7-4dee-b5ca-0a729fde2f39
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552400898428)/
+ Attachments:
+ - AttachmentID: 47ac97ff-d4f9-48a0-8a8e-49fae29129e7
+ FileName: foobar.jpg
+ Url: https://api.xero.com/api.xro/2.0/ManualJournals/0b159335-606b-485f-b51b-97b3b32bad32/Attachments/foobar.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /ManualJournals/{ManualJournalID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getManualJournalsHistory
+ summary: Retrieves history for a specific manual journal
+ parameters:
+ - $ref: '#/components/parameters/ManualJournalID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createManualJournalHistoryRecord
+ summary: Creates a history record for a specific manual journal
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ManualJournalID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /Organisation:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getOrganisations
+ summary: Retrieves Xero organisation details
+ responses:
+ "200":
+ description: Success - return response of type Organisation array with all Organisation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Organisations'
+ example:
+ Id: 27b7a645-a3ee-43c8-b2c6-a2fa7b84c8c5
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552404447003)/
+ Organisations:
+ - APIKey: CTJ60UH519MXQIXEJSDPDALS3EOZ5Y
+ Name: Dev Evangelist - Sid Test 3 (NZ-2016-02)
+ LegalName: Dev Evangelist - Sid Test 3 (NZ-2016-02)
+ PaysTax: true
+ Version: NZ
+ OrganisationType: COMPANY
+ BaseCurrency: NZD
+ CountryCode: NZ
+ IsDemoCompany: false
+ OrganisationStatus: ACTIVE
+ TaxNumber: 071-138-054
+ FinancialYearEndDay: 31
+ FinancialYearEndMonth: 3
+ SalesTaxBasis: PAYMENTS
+ SalesTaxPeriod: TWOMONTHS
+ DefaultSalesTax: Tax Exclusive
+ DefaultPurchasesTax: Tax Exclusive
+ PeriodLockDate: /Date(1546214400000+0000)/
+ EndOfYearLockDate: /Date(1546214400000+0000)/
+ CreatedDateUTC: /Date(1455827393000)/
+ OrganisationEntityType: COMPANY
+ Timezone: NEWZEALANDSTANDARDTIME
+ ShortCode: '!mBdtL'
+ OrganisationID: b2c885a9-4bb9-4a00-9b6e-6c2bf60b1a2b
+ Edition: BUSINESS
+ Class: PREMIUM
+ Addresses: []
+ Phones: []
+ ExternalLinks: []
+ PaymentTerms: {}
+ /Organisation/Actions:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getOrganisationActions
+ summary: Retrieves a list of the key actions your app has permission to perform in the connected Xero organisation.
+ responses:
+ "200":
+ description: Success - return response of type Actions array with all key actions
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Actions'
+ example:
+ Id: f02c0dd1-1917-4d57-9853-997f6bcaf2bc
+ Status: OK
+ ProviderName: Java OA2 dev 01
+ DateTimeUTC: /Date(1602883301013)/
+ Actions:
+ - Name: CreateApprovedInvoice
+ Status: ALLOWED
+ - Name: CreateDraftPurchaseOrder
+ Status: ALLOWED
+ - Name: CreateApprovedBill
+ Status: ALLOWED
+ - Name: AttachFilesIntoInvoice
+ Status: ALLOWED
+ - Name: UseMulticurrency
+ Status: ALLOWED
+ - Name: CreateDraftInvoice
+ Status: ALLOWED
+ - Name: CreateRepeatingInvoice
+ Status: ALLOWED
+ - Name: CreateRepeatingBill
+ Status: ALLOWED
+ - Name: CreateSentQuote
+ Status: ALLOWED
+ - Name: CreateInvoicePayment
+ Status: ALLOWED
+ - Name: CreateApprovedPurchaseOrder
+ Status: ALLOWED
+ - Name: CreateDraftQuote
+ Status: ALLOWED
+ - Name: CreateDraftBill
+ Status: ALLOWED
+ /Organisation/{OrganisationID}/CISSettings:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getOrganisationCISSettings
+ summary: Retrieves the CIS settings for the Xero organistaion.
+ parameters:
+ - $ref: '#/components/parameters/OrganisationID'
+ responses:
+ "200":
+ description: Success - return response of type Organisation array with specified Organisation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CISOrgSettings'
+ example:
+ CISSettings:
+ - CISEnambed: true
+ Rate: 10
+ /Overpayments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getOverpayments
+ summary: Retrieves overpayments
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="AUTHORISED"
+ x-example-csharp: Status==\"AUTHORISED\"
+ x-example-java: Status=="' + Overpayment.StatusEnum.AUTHORISED + '"
+ x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Overpayment::STATUS_AUTHORISED . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::Overpayment::AUTHORISED}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Status ASC
+ schema:
+ type: string
+ - in: query
+ 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
+ example: 1
+ schema:
+ type: integer
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/pageSize'
+ responses:
+ "200":
+ description: Success - return response of type Overpayments array with all Overpayments
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Overpayments'
+ example:
+ Id: c0ce675e-e5bc-4b2a-a20e-76a9eaedf89d
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552428951416)/
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 5
+ Overpayments:
+ - OverpaymentID: 098b4dcb-5622-4699-87f8-9d40c4ccceb3
+ ID: 098b4dcb-5622-4699-87f8-9d40c4ccceb3
+ Type: SPEND-OVERPAYMENT
+ RemainingCredit: 500.00
+ Allocations: []
+ Payments: []
+ HasAttachments: false
+ Contact:
+ ContactID: af3ffcc1-c578-4658-82f3-5d8d458cc7af
+ Name: Daddy Warbucks
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-03-12T00:00:00
+ Date: /Date(1552348800000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: NoTax
+ LineItems: []
+ SubTotal: 500.00
+ TotalTax: 0.00
+ Total: 500.00
+ UpdatedDateUTC: /Date(1552428535123+0000)/
+ CurrencyCode: NZD
+ - OverpaymentID: 2a8bda49-8908-473b-8bcf-1f90990460eb
+ ID: 2a8bda49-8908-473b-8bcf-1f90990460eb
+ Type: RECEIVE-OVERPAYMENT
+ RemainingCredit: 20.00
+ Allocations: []
+ Payments: []
+ HasAttachments: false
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-03-13T00:00:00
+ Date: /Date(1552435200000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: NoTax
+ LineItems: []
+ SubTotal: 20.00
+ TotalTax: 0.00
+ Total: 20.00
+ UpdatedDateUTC: /Date(1552428568250+0000)/
+ CurrencyCode: NZD
+ - OverpaymentID: ed7f6041-c915-4667-bd1d-54c48e92161e
+ ID: ed7f6041-c915-4667-bd1d-54c48e92161e
+ Type: SPEND-OVERPAYMENT
+ RemainingCredit: 3000.00
+ Allocations: []
+ Payments: []
+ HasAttachments: false
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-03-12T00:00:00
+ Date: /Date(1552348800000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: NoTax
+ LineItems: []
+ SubTotal: 3000.00
+ TotalTax: 0.00
+ Total: 3000.00
+ UpdatedDateUTC: /Date(1552428781527+0000)/
+ CurrencyCode: NZD
+ - OverpaymentID: 0859adbc-ea00-40cd-a877-258cf8644975
+ ID: 0859adbc-ea00-40cd-a877-258cf8644975
+ Type: RECEIVE-OVERPAYMENT
+ RemainingCredit: 20.00
+ Allocations: []
+ Payments: []
+ HasAttachments: false
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-03-13T00:00:00
+ Date: /Date(1552435200000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: NoTax
+ LineItems: []
+ SubTotal: 20.00
+ TotalTax: 0.00
+ Total: 20.00
+ UpdatedDateUTC: /Date(1552428842190+0000)/
+ CurrencyCode: NZD
+ - OverpaymentID: 687b877f-634a-415d-92b2-74e62977de30
+ ID: 687b877f-634a-415d-92b2-74e62977de30
+ Type: RECEIVE-OVERPAYMENT
+ RemainingCredit: 20.00
+ Allocations: []
+ Payments: []
+ HasAttachments: false
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-03-13T00:00:00
+ Date: /Date(1552435200000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: NoTax
+ LineItems: []
+ SubTotal: 20.00
+ TotalTax: 0.00
+ Total: 20.00
+ UpdatedDateUTC: /Date(1552428950730+0000)/
+ CurrencyCode: NZD
+ /Overpayments/{OverpaymentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getOverpayment
+ summary: Retrieves a specific overpayment using a unique overpayment Id
+ parameters:
+ - $ref: '#/components/parameters/OverpaymentID'
+ responses:
+ "200":
+ description: Success - return response of type Overpayments array with specified Overpayments
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Overpayments'
+ example:
+ Id: 46c9e8e2-9410-4e75-9297-f0ca8fa76c32
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553278835158)/
+ Overpayments:
+ - OverpaymentID: ed7f6041-c915-4667-bd1d-54c48e92161e
+ ID: ed7f6041-c915-4667-bd1d-54c48e92161e
+ CurrencyRate: 1.000000
+ Type: SPEND-OVERPAYMENT
+ RemainingCredit: 2999.00
+ Allocations:
+ - Amount: 1.00
+ Date: /Date(1552348800000+0000)/
+ Invoice:
+ InvoiceID: c45720a1-ade3-4a38-a064-d15489be6841
+ InvoiceNumber: ""
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ Payments: []
+ HasAttachments: true
+ Attachments:
+ - AttachmentID: 247dd942-5245-47a7-adb1-4d9ea075b431
+ FileName: giphy.gif
+ Url: https://api.xero.com/api.xro/2.0/banktransaction/ed7f6041-c915-4667-bd1d-54c48e92161e/Attachments/giphy.gif
+ MimeType: image/gif
+ ContentLength: 495727
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ AttentionTo: ""
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-03-12T00:00:00
+ Date: /Date(1552348800000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: NoTax
+ LineItems:
+ - Description: Broken TV deposit
+ UnitAmount: 3000.00
+ TaxType: NONE
+ TaxAmount: 0.00
+ LineAmount: 3000.00
+ AccountCode: "800"
+ Tracking: []
+ Quantity: 1.0000
+ DiscountEnteredAsPercent: true
+ ValidationErrors: []
+ SubTotal: 3000.00
+ TotalTax: 0.00
+ Total: 3000.00
+ UpdatedDateUTC: /Date(1552428952890+0000)/
+ CurrencyCode: NZD
+ /Overpayments/{OverpaymentID}/Allocations:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createOverpaymentAllocations
+ summary: Creates a single allocation for a specific overpayment
+ x-hasAccountingValidationError: true
+ x-example:
+ - currDate:
+ is_date: true
+ key: currDate
+ keyPascal: CurrDate
+ keySnake: curr_date
+ java_datatype: LocalDate
+ default: LocalDate.now()
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ node: '''2020-12-10'''
+ php: new DateTime('2020-12-10')
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - invoice:
+ is_object: true
+ key: invoice
+ keyPascal: Invoice
+ - invoiceID:
+ is_last: true
+ is_uuid: true
+ key: invoiceID
+ keyPascal: InvoiceID
+ keySnake: invoice_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: invoice
+ - allocation:
+ is_object: true
+ key: allocation
+ keyPascal: Allocation
+ - amount:
+ nonString: true
+ key: amount
+ keyPascal: Amount
+ default: 1.0
+ is_money: true
+ object: allocation
+ - date:
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: currDate
+ python: curr_date
+ ruby: curr_date
+ object: allocation
+ - set_invoice:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: invoice
+ keyPascal: Invoice
+ default: invoice
+ object: allocation
+ - allocations:
+ is_object: true
+ key: allocations
+ keyPascal: Allocations
+ - add_allocation:
+ is_last: true
+ is_array_add: true
+ key: allocations
+ keyPascal: Allocations
+ java: Allocations
+ csharp: Allocation
+ object: allocation
+ parameters:
+ - $ref: '#/components/parameters/OverpaymentID'
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Allocations array with all Allocation for Overpayments
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Allocations'
+ example:
+ Id: 3b7f7be2-384a-4703-bcfb-c56e9116c914
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552428952968)/
+ Allocations:
+ - Amount: 1.00
+ Date: /Date(1552348800000+0000)/
+ Invoice:
+ InvoiceID: c45720a1-ade3-4a38-a064-d15489be6841
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ ValidationErrors: []
+ Overpayment:
+ OverpaymentID: ed7f6041-c915-4667-bd1d-54c48e92161e
+ ID: ed7f6041-c915-4667-bd1d-54c48e92161e
+ LineItems: []
+ ValidationErrors: []
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Allocations array with Allocation object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Allocations'
+ example:
+ Allocations:
+ - Invoice:
+ InvoiceID: 00000000-0000-0000-0000-000000000000
+ LineItems: []
+ Contact: {}
+ Type: ACCPAY
+ Amount: 10.00
+ Date: "2019-03-12"
+ /Overpayments/{OverpaymentID}/Allocations/{AllocationID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ delete:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: deleteOverpaymentAllocations
+ summary: Deletes an Allocation from an overpayment
+ parameters:
+ - $ref: '#/components/parameters/OverpaymentID'
+ - $ref: '#/components/parameters/AllocationID'
+ responses:
+ "200":
+ description: Success - return response of type Allocation with the isDeleted flag as true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Allocation'
+ example:
+ AllocationId: 2bb15054-3868-4f85-a9c6-0402ec8c1201
+ Date: /Date(1551822670731)/
+ Invoice:
+ - InvoiceID: b7eb1fc9-a0f9-4e8e-9373-6689f5350832
+ IsDeleted: true
+ /Overpayments/{OverpaymentID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getOverpaymentHistory
+ summary: Retrieves history records of a specific overpayment
+ parameters:
+ - $ref: '#/components/parameters/OverpaymentID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createOverpaymentHistory
+ summary: Creates a history record for a specific overpayment
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/OverpaymentID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ "400":
+ description: A failed request due to validation error - API is not able to create HistoryRecord for Overpayments
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ example:
+ ErrorNumber: 10
+ Type: ValidationException
+ Message: A validation exception occurred
+ Elements:
+ - DateUTCString: 2019-03-12T22:30:13
+ DateUTC: /Date(1552429813667)/
+ Details: Hello World
+ ValidationErrors:
+ - Message: The document with the supplied id was not found for this endpoint.
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /Payments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getPayments
+ summary: Retrieves payments for invoices and credit notes
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="AUTHORISED"
+ x-example-csharp: Status==\"AUTHORISED\"
+ x-example-java: Status=="' + Payment.StatusEnum.AUTHORISED + '"
+ x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Payment::STATUS_AUTHORISED . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::Payment::AUTHORISED}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Amount ASC
+ schema:
+ type: string
+ - in: query
+ name: page
+ description: Up to 100 payments will be returned in a single API call
+ example: 1
+ schema:
+ type: integer
+ - $ref: '#/components/parameters/pageSize'
+ responses:
+ "200":
+ description: Success - return response of type Payments array for all Payments
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Payments'
+ example:
+ Id: 9f310473-e1b5-4704-a25c-eec653deb596
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552431874205)/
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 2
+ Payments:
+ - PaymentID: 99ea7f6b-c513-4066-bc27-b7c65dcd76c2
+ BatchPaymentID: b54aa50c-794c-461b-89d1-846e1b84d9c0
+ BatchPayment:
+ Account:
+ AccountID: 5690f1e8-1d02-4893-90c2-ee1a69eff942
+ BatchPaymentID: b54aa50c-794c-461b-89d1-846e1b84d9c0
+ Date: /Date(1552521600000+0000)/
+ Type: RECBATCH
+ Status: AUTHORISED
+ TotalAmount: "50.00"
+ UpdatedDateUTC: /Date(1541176592690+0000)/
+ IsReconciled: "false"
+ Date: /Date(1543449600000+0000)/
+ BankAmount: 46.00
+ Amount: 46.00
+ Reference: ""
+ CurrencyRate: 1.000000
+ PaymentType: ACCRECPAYMENT
+ Status: AUTHORISED
+ UpdatedDateUTC: /Date(1541176592690+0000)/
+ HasAccount: true
+ IsReconciled: false
+ Account:
+ AccountID: 5690f1e8-1d02-4893-90c2-ee1a69eff942
+ Code: "970"
+ Invoice:
+ Type: ACCREC
+ InvoiceID: 046d8a6d-1ae1-4b4d-9340-5601bdf41b87
+ InvoiceNumber: INV-0002
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ Contact:
+ ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7
+ ContactNumber: ""
+ Name: Barney Rubble-83203
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ LineItems: []
+ CurrencyCode: NZD
+ HasValidationErrors: false
+ - PaymentID: 6b037c9b-2e5d-4905-84d3-eabfb3438242
+ Date: /Date(1552521600000+0000)/
+ BankAmount: 2.00
+ Amount: 2.00
+ Reference: Too much
+ CurrencyRate: 1.000000
+ PaymentType: ARCREDITPAYMENT
+ Status: AUTHORISED
+ UpdatedDateUTC: /Date(1551812346173+0000)/
+ HasAccount: true
+ IsReconciled: false
+ Account:
+ AccountID: 136ebd08-60ea-4592-8982-be92c153b53a
+ Code: "980"
+ Invoice:
+ Type: ACCRECCREDIT
+ InvoiceID: 249f15fa-f2a7-4acc-8769-0984103f2225
+ InvoiceNumber: CN-0005
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactNumber: ""
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ LineItems: []
+ CurrencyCode: NZD
+ HasValidationErrors: false
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createPayments
+ summary: Creates multiple payments for invoices or credit notes
+ x-hasAccountingValidationError: true
+ x-example:
+ - dateValue:
+ is_date: true
+ key: dateValue
+ keyPascal: Date
+ keySnake: date_value
+ java_datatype: LocalDate
+ default: LocalDate.of(2020, Month.OCTOBER, 10)
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ php: new DateTime('2020-10-10')
+ node: '''2020-10-10'''
+ python: dateutil.parser.parse('2020-10-10T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - invoice:
+ is_object: true
+ key: invoice
+ keyPascal: Invoice
+ - invoiceID:
+ is_last: true
+ is_uuid: true
+ key: invoiceID
+ keyPascal: InvoiceID
+ keySnake: invoice_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: invoice
+ - account:
+ is_object: true
+ key: account
+ keyPascal: Account
+ - accountID:
+ is_last: true
+ is_uuid: true
+ key: accountID
+ keyPascal: AccountID
+ keySnake: account_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: account
+ - payment:
+ is_object: true
+ key: payment
+ keyPascal: Payment
+ - set_invoice:
+ is_variable: true
+ nonString: true
+ key: invoice
+ keyPascal: Invoice
+ default: invoice
+ object: payment
+ - set_account:
+ is_variable: true
+ nonString: true
+ key: account
+ keyPascal: Account
+ default: account
+ object: payment
+ - amount:
+ nonString: true
+ key: amount
+ keyPascal: Amount
+ default: 1.0
+ is_money: true
+ object: payment
+ - date:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: dateValue
+ python: date_value
+ ruby: date_value
+ object: payment
+ - payments:
+ is_object: true
+ key: payments
+ keyPascal: Payments
+ - add_payment:
+ is_last: true
+ is_array_add: true
+ key: payments
+ keyPascal: Payments
+ java: Payments
+ csharp: Payment
+ object: payment
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Payments array for newly created Payment
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Payments'
+ example:
+ Id: 83b5715a-6a77-4c16-b5b8-2da08b5fde44
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552432238716)/
+ Payments:
+ - PaymentID: 61ed71fc-01bf-4eb8-8419-8a18789ff45f
+ Date: /Date(1552348800000+0000)/
+ BankAmount: 1.00
+ Amount: 1.00
+ CurrencyRate: 1.000000
+ PaymentType: ACCRECPAYMENT
+ Status: AUTHORISED
+ UpdatedDateUTC: /Date(1552432238623+0000)/
+ HasAccount: true
+ IsReconciled: false
+ Account:
+ AccountID: 5690f1e8-1d02-4893-90c2-ee1a69eff942
+ Code: "970"
+ Name: Owner A Funds Introduced
+ Invoice:
+ Type: ACCREC
+ InvoiceID: c7c37b83-ac95-45ea-88ba-8ad83a5f22fe
+ InvoiceNumber: INV-0004
+ Reference: ""
+ Prepayments: []
+ Overpayments: []
+ AmountDue: 229.00
+ AmountPaid: 1.00
+ SentToContact: false
+ CurrencyRate: 1.000000
+ HasErrors: false
+ IsDiscounted: false
+ Contact:
+ ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7
+ Name: Barney Rubble-83203
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2018-10-10T00:00:00
+ Date: /Date(1539129600000+0000)/
+ DueDateString: 2018-10-18T00:00:00
+ DueDate: /Date(1539820800000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: boo
+ UnitAmount: 200.00
+ TaxType: OUTPUT2
+ TaxAmount: 30.00
+ LineAmount: 200.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 173dfdb9-43b5-4bd2-ae25-9419e662a3a7
+ ValidationErrors: []
+ SubTotal: 200.00
+ TotalTax: 30.00
+ Total: 230.00
+ UpdatedDateUTC: /Date(1552432238623+0000)/
+ CurrencyCode: NZD
+ HasValidationErrors: true
+ ValidationErrors:
+ - Message: Payment amount exceeds the amount outstanding on this document
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Payments array with Payment object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Payments'
+ example:
+ Payments:
+ - Invoice:
+ LineItems: []
+ InvoiceID: 00000000-0000-0000-0000-000000000000
+ Account:
+ Code: "970"
+ Date: "2019-03-12"
+ Amount: 1
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createPayment
+ summary: Creates a single payment for invoice or credit notes
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ x-hasAccountingValidationError: true
+ x-example:
+ - dateValue:
+ is_date: true
+ key: dateValue
+ keyPascal: Date
+ keySnake: date_value
+ java_datatype: LocalDate
+ default: LocalDate.of(2020, Month.OCTOBER, 10)
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ php: new DateTime('2020-10-10')
+ node: '''2020-10-10'''
+ python: dateutil.parser.parse('2020-10-10T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - invoice:
+ is_object: true
+ key: invoice
+ keyPascal: Invoice
+ - invoiceID:
+ is_last: true
+ is_uuid: true
+ key: invoiceID
+ keyPascal: InvoiceID
+ keySnake: invoice_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: invoice
+ - account:
+ is_object: true
+ key: account
+ keyPascal: Account
+ - accountID:
+ is_last: true
+ is_uuid: true
+ key: accountID
+ keyPascal: AccountID
+ keySnake: account_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: account
+ - payment:
+ is_object: true
+ key: payment
+ keyPascal: Payment
+ - set_invoice:
+ is_variable: true
+ nonString: true
+ key: invoice
+ keyPascal: Invoice
+ default: invoice
+ object: payment
+ - set_account:
+ is_variable: true
+ nonString: true
+ key: account
+ keyPascal: Account
+ default: account
+ object: payment
+ - amount:
+ nonString: true
+ key: amount
+ keyPascal: Amount
+ default: 1.0
+ is_money: true
+ object: payment
+ - date:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: dateValue
+ python: date_value
+ ruby: date_value
+ object: payment
+ - payments:
+ is_object: true
+ key: payments
+ keyPascal: Payments
+ - add_payment:
+ is_last: true
+ is_array_add: true
+ key: payments
+ keyPascal: Payments
+ java: Payments
+ csharp: Payment
+ object: payment
+ responses:
+ "200":
+ description: Success - return response of type Payments array for newly created Payment
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Payments'
+ example:
+ Id: 83b5715a-6a77-4c16-b5b8-2da08b5fde44
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552432238716)/
+ Payments:
+ - PaymentID: 61ed71fc-01bf-4eb8-8419-8a18789ff45f
+ Date: /Date(1552348800000+0000)/
+ BankAmount: 1.00
+ Amount: 1.00
+ CurrencyRate: 1.000000
+ PaymentType: ACCRECPAYMENT
+ Status: AUTHORISED
+ UpdatedDateUTC: /Date(1552432238623+0000)/
+ HasAccount: true
+ IsReconciled: false
+ Account:
+ AccountID: 5690f1e8-1d02-4893-90c2-ee1a69eff942
+ Code: "970"
+ Name: Owner A Funds Introduced
+ Invoice:
+ Type: ACCREC
+ InvoiceID: c7c37b83-ac95-45ea-88ba-8ad83a5f22fe
+ InvoiceNumber: INV-0004
+ Reference: ""
+ Prepayments: []
+ Overpayments: []
+ AmountDue: 229.00
+ AmountPaid: 1.00
+ SentToContact: false
+ CurrencyRate: 1.000000
+ HasErrors: false
+ IsDiscounted: false
+ Contact:
+ ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7
+ Name: Barney Rubble-83203
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2018-10-10T00:00:00
+ Date: /Date(1539129600000+0000)/
+ DueDateString: 2018-10-18T00:00:00
+ DueDate: /Date(1539820800000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: boo
+ UnitAmount: 200.00
+ TaxType: OUTPUT2
+ TaxAmount: 30.00
+ LineAmount: 200.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 173dfdb9-43b5-4bd2-ae25-9419e662a3a7
+ ValidationErrors: []
+ SubTotal: 200.00
+ TotalTax: 30.00
+ Total: 230.00
+ UpdatedDateUTC: /Date(1552432238623+0000)/
+ CurrencyCode: NZD
+ HasValidationErrors: true
+ ValidationErrors:
+ - Message: Payment amount exceeds the amount outstanding on this document
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Request body with a single Payment object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Payment'
+ example:
+ Payments:
+ - Invoice:
+ LineItems: []
+ InvoiceID: 00000000-0000-0000-0000-000000000000
+ Account:
+ Code: "970"
+ Date: "2019-03-12"
+ Amount: 1
+ /Payments/{PaymentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getPayment
+ summary: Retrieves a specific payment for invoices and credit notes using a unique payment Id
+ parameters:
+ - $ref: '#/components/parameters/PaymentID'
+ responses:
+ "200":
+ description: Success - return response of type Payments array for specified Payment
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Payments'
+ example:
+ Id: 4876f9ee-3a17-47d8-8c1b-84377c8f2998
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552431874852)/
+ Payments:
+ - PaymentID: 99ea7f6b-c513-4066-bc27-b7c65dcd76c2
+ BatchPaymentID: b54aa50c-794c-461b-89d1-846e1b84d9c0
+ BatchPayment:
+ Account:
+ AccountID: 5690f1e8-1d02-4893-90c2-ee1a69eff942
+ BatchPaymentID: b54aa50c-794c-461b-89d1-846e1b84d9c0
+ Date: /Date(1543449600000+0000)/
+ Type: RECBATCH
+ Status: AUTHORISED
+ TotalAmount: "50.00"
+ UpdatedDateUTC: /Date(1541176592690+0000)/
+ IsReconciled: "false"
+ Date: /Date(1543449600000+0000)/
+ BankAmount: 46.00
+ Amount: 46.00
+ CurrencyRate: 1.000000
+ PaymentType: ACCRECPAYMENT
+ Status: AUTHORISED
+ UpdatedDateUTC: /Date(1541176592690+0000)/
+ HasAccount: true
+ IsReconciled: false
+ Account:
+ AccountID: 5690f1e8-1d02-4893-90c2-ee1a69eff942
+ Code: "970"
+ Name: Owner A Funds Introduced
+ Invoice:
+ Type: ACCREC
+ InvoiceID: 046d8a6d-1ae1-4b4d-9340-5601bdf41b87
+ InvoiceNumber: INV-0002
+ Reference: Red Fish, Blue Fish
+ Payments:
+ - PaymentID: 99ea7f6b-c513-4066-bc27-b7c65dcd76c2
+ Date: /Date(1543449600000+0000)/
+ Amount: 46.00
+ CurrencyRate: 1.000000
+ HasAccount: false
+ HasValidationErrors: false
+ Prepayments: []
+ Overpayments: []
+ AmountDue: 0.00
+ AmountPaid: 46.00
+ SentToContact: true
+ CurrencyRate: 1.000000
+ HasErrors: false
+ IsDiscounted: false
+ Contact:
+ ContactID: a3675fc4-f8dd-4f03-ba5b-f1870566bcd7
+ Name: Barney Rubble-83203
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2018-10-20T00:00:00
+ Date: /Date(1539993600000+0000)/
+ DueDateString: 2018-12-30T00:00:00
+ DueDate: /Date(1546128000000+0000)/
+ Status: PAID
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Acme Tires
+ UnitAmount: 20.00
+ TaxType: OUTPUT2
+ TaxAmount: 6.00
+ LineAmount: 40.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 2.0000
+ LineItemID: 878d1688-a905-4866-ae91-5a772c2540c7
+ ValidationErrors: []
+ SubTotal: 40.00
+ TotalTax: 6.00
+ Total: 46.00
+ UpdatedDateUTC: /Date(1541176592690+0000)/
+ CurrencyCode: NZD
+ FullyPaidOnDate: /Date(1543449600000+0000)/
+ HasValidationErrors: false
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: deletePayment
+ summary: Updates a specific payment for invoices and credit notes
+ x-hasAccountingValidationError: true
+ x-example:
+ - paymentDelete:
+ is_object: true
+ key: paymentDelete
+ keyPascal: PaymentDelete
+ - status:
+ is_last: true
+ key: status
+ keyPascal: Status
+ default: DELETED
+ object: paymentDelete
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/PaymentID'
+ responses:
+ "200":
+ description: Success - return response of type Payments array for updated Payment
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Payments'
+ example:
+ Id: ee23328c-4a8b-4ee7-8fb6-9796ffab9cb0
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1583945852489)/
+ Payments:
+ - PaymentID: c94c996b-1ab3-4ff3-ad19-1cdc77f30817
+ Date: /Date(1567382400000+0000)/
+ BankAmount: 2.00
+ Amount: 2.00
+ Reference: foobar
+ CurrencyRate: 1.000000
+ PaymentType: APCREDITPAYMENT
+ Status: DELETED
+ UpdatedDateUTC: /Date(1583945852373+0000)/
+ HasAccount: true
+ IsReconciled: false
+ Account:
+ AccountID: 57f261f0-e32d-4a7f-be82-22cd992c6367
+ Code: "033"
+ Name: Checking account
+ Invoice:
+ Type: ACCPAYCREDIT
+ InvoiceID: dba68ebc-c05a-4e2d-b97d-964349e5b8d6
+ InvoiceNumber: ""
+ Reference: ""
+ Prepayments: []
+ Overpayments: []
+ AmountDue: 22.00
+ AmountPaid: 0.00
+ SentToContact: false
+ CurrencyRate: 1.000000
+ IsDiscounted: false
+ HasErrors: false
+ Contact:
+ ContactID: 216830cb-9a68-487e-928b-c1a7ccc4fc81
+ Name: FooBar73005
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2017-01-02T00:00:00
+ Date: /Date(1483315200000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Sample Item72716
+ UnitAmount: 20.00
+ TaxType: INPUT
+ TaxAmount: 2.00
+ LineAmount: 20.00
+ AccountCode: "400"
+ Tracking: []
+ Quantity: 1.0000
+ ValidationErrors: []
+ SubTotal: 20.00
+ TotalTax: 2.00
+ Total: 22.00
+ UpdatedDateUTC: /Date(1583945852363+0000)/
+ CurrencyCode: AUD
+ HasValidationErrors: false
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaymentDelete'
+ example:
+ Payments:
+ - Status: DELETED
+ /Payments/{PaymentID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getPaymentHistory
+ summary: Retrieves history records of a specific payment
+ parameters:
+ - $ref: '#/components/parameters/PaymentID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createPaymentHistory
+ summary: Creates a history record for a specific payment
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/PaymentID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ "400":
+ description: A failed request due to validation error - API is not able to create HistoryRecord for Payments
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ example:
+ ErrorNumber: 10
+ Type: ValidationException
+ Message: A validation exception occurred
+ Elements:
+ - DateUTCString: 2019-03-12T22:30:13
+ DateUTC: /Date(1552429813667)/
+ Details: Hello World
+ ValidationErrors:
+ - Message: The document with the supplied id was not found for this endpoint.
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /PaymentServices:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - paymentservices
+ tags:
+ - Accounting
+ operationId: getPaymentServices
+ summary: Retrieves payment services
+ x-excludeFromPreview: true
+ responses:
+ "200":
+ description: Success - return response of type PaymentServices array for all PaymentService
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaymentServices'
+ example:
+ Id: ab82a7dd-5070-4e82-b841-0af52909fe04
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552488713171)/
+ PaymentServices:
+ - PaymentServiceID: 54b3b4f6-0443-4fba-bcd1-61ec0c35ca55
+ PaymentServiceName: PayUpNow
+ PaymentServiceUrl: https://www.payupnow.com/
+ PaymentServiceType: Custom
+ PayNowText: Time To Pay
+ put:
+ security:
+ - OAuth2:
+ - paymentservices
+ tags:
+ - Accounting
+ operationId: createPaymentService
+ summary: Creates a payment service
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ x-excludeFromPreview: true
+ x-hasAccountingValidationError: true
+ x-example:
+ - object:
+ is_object: true
+ key: paymentService
+ keyPascal: PaymentService
+ keySnake: payment_service
+ - paymentServiceName:
+ key: paymentServiceName
+ keyPascal: PaymentServiceName
+ keySnake: payment_service_name
+ default: ACME Payments
+ object: paymentService
+ - paymentServiceUrl:
+ key: paymentServiceUrl
+ keyPascal: PaymentServiceUrl
+ keySnake: payment_service_url
+ default: https://www.payupnow.com/
+ object: paymentService
+ - payNowText:
+ is_last: true
+ key: payNowText
+ keyPascal: PayNowText
+ keySnake: pay_now_text
+ default: Pay Now
+ object: paymentService
+ - paymentServices:
+ is_object: true
+ key: paymentServices
+ keyPascal: PaymentServices
+ - add_paymentService:
+ is_last: true
+ is_array_add: true
+ key: paymentServices
+ keyPascal: PaymentServices
+ java: PaymentServices
+ csharp: PaymentService
+ object: paymentService
+ responses:
+ "200":
+ description: Success - return response of type PaymentServices array for newly created PaymentService
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaymentServices'
+ example:
+ Id: 7ed8b3c0-2155-49ee-a583-f2dce6607dfb
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552488712813)/
+ PaymentServices:
+ - PaymentServiceID: 54b3b4f6-0443-4fba-bcd1-61ec0c35ca55
+ PaymentServiceName: PayUpNow
+ PaymentServiceUrl: https://www.payupnow.com/
+ PaymentServiceType: Custom
+ PayNowText: Time To Pay
+ ValidationErrors:
+ - Message: Payment service could not be found
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: PaymentServices array with PaymentService object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PaymentServices'
+ example:
+ PaymentServices:
+ - PaymentServiceName: PayUpNow
+ PaymentServiceUrl: https://www.payupnow.com/
+ PayNowText: Time To Pay
+ /Prepayments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getPrepayments
+ summary: Retrieves prepayments
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="AUTHORISED"
+ x-example-csharp: Status==\"AUTHORISED\"
+ x-example-java: Status=="' + Prepayment.StatusEnum.AUTHORISED + '"
+ x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Prepayment::STATUS_AUTHORISED . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::Prepayment::AUTHORISED}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Reference ASC
+ schema:
+ type: string
+ - in: query
+ 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
+ example: 1
+ schema:
+ type: integer
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/pageSize'
+ responses:
+ "200":
+ description: Success - return response of type Prepayments array for all Prepayment
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Prepayments'
+ example:
+ Id: d7a9ca0c-6159-4c26-ad2e-715440c50b7d
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552489227595)/
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 1
+ Prepayments:
+ - PrepaymentID: ce0cddef-cf5a-4e59-b638-f225679115a7
+ ID: ce0cddef-cf5a-4e59-b638-f225679115a7
+ Type: RECEIVE-PREPAYMENT
+ Reference: INV-0011
+ RemainingCredit: 3450.00
+ Allocations: []
+ Payments: []
+ HasAttachments: true
+ Contact:
+ ContactID: be392c72-c121-4f83-9512-03ac71e54c20
+ Name: Luke Skywalker
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-03-13T00:00:00
+ Date: /Date(1552435200000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems: []
+ SubTotal: 3000.00
+ TotalTax: 450.00
+ Total: 3450.00
+ UpdatedDateUTC: /Date(1552489187730+0000)/
+ CurrencyCode: NZD
+ /Prepayments/{PrepaymentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getPrepayment
+ summary: Allows you to retrieve a specified prepayments
+ parameters:
+ - $ref: '#/components/parameters/PrepaymentID'
+ responses:
+ "200":
+ description: Success - return response of type Prepayments array for a specified Prepayment
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Prepayments'
+ example:
+ Id: 18e5f578-ef28-4096-a7aa-d06d65574b99
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553540376847)/
+ Prepayments:
+ - PrepaymentID: ce0cddef-cf5a-4e59-b638-f225679115a7
+ ID: ce0cddef-cf5a-4e59-b638-f225679115a7
+ CurrencyRate: 1.000000
+ Type: RECEIVE-PREPAYMENT
+ Reference: INV-0011
+ RemainingCredit: 3449.00
+ Allocations:
+ - Amount: 1.00
+ Date: /Date(1552435200000+0000)/
+ Invoice:
+ InvoiceID: c7c37b83-ac95-45ea-88ba-8ad83a5f22fe
+ InvoiceNumber: INV-0004
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ Payments: []
+ HasAttachments: true
+ Attachments:
+ - AttachmentID: 2ca06aa0-3629-474a-9401-553d4b7fa9b0
+ FileName: giphy.gif
+ Url: https://api.xero.com/api.xro/2.0/banktransaction/ce0cddef-cf5a-4e59-b638-f225679115a7/Attachments/giphy.gif
+ MimeType: image/gif
+ ContentLength: 495727
+ Contact:
+ ContactID: be392c72-c121-4f83-9512-03ac71e54c20
+ ContactStatus: ACTIVE
+ Name: Luke Skywalker
+ EmailAddress: ""
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ - AddressType: POBOX
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1552329691573+0000)/
+ ContactGroups: []
+ DefaultCurrency: NZD
+ ContactPersons: []
+ HasValidationErrors: false
+ DateString: 2019-03-13T00:00:00
+ Date: /Date(1552435200000+0000)/
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Light Speeder
+ UnitAmount: 3000.00
+ TaxType: OUTPUT2
+ TaxAmount: 450.00
+ LineAmount: 3000.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 1.0000
+ DiscountEnteredAsPercent: true
+ ValidationErrors: []
+ SubTotal: 3000.00
+ TotalTax: 450.00
+ Total: 3450.00
+ UpdatedDateUTC: /Date(1552522424850+0000)/
+ CurrencyCode: NZD
+ /Prepayments/{PrepaymentID}/Allocations:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createPrepaymentAllocations
+ summary: Allows you to create an Allocation for prepayments
+ x-hasAccountingValidationError: true
+ x-example:
+ - currDate:
+ is_date: true
+ key: currDate
+ keyPascal: CurrDate
+ keySnake: curr_date
+ java_datatype: LocalDate
+ default: LocalDate.now()
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ node: '''2020-12-10'''
+ php: new DateTime('2020-12-10')
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - invoice:
+ is_object: true
+ key: invoice
+ keyPascal: Invoice
+ - invoiceID:
+ is_last: true
+ is_uuid: true
+ key: invoiceID
+ keyPascal: InvoiceID
+ keySnake: invoice_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: invoice
+ - allocation:
+ is_object: true
+ key: allocation
+ keyPascal: Allocation
+ - set_invoice:
+ is_variable: true
+ nonString: true
+ key: invoice
+ keyPascal: Invoice
+ default: invoice
+ object: allocation
+ - amount:
+ nonString: true
+ key: amount
+ keyPascal: Amount
+ default: 1.0
+ is_money: true
+ object: allocation
+ - date:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: currDate
+ python: curr_date
+ ruby: curr_date
+ object: allocation
+ - allocations:
+ is_object: true
+ key: allocations
+ keyPascal: Allocations
+ - add_allocation:
+ is_last: true
+ is_array_add: true
+ key: allocations
+ keyPascal: Allocations
+ java: Allocations
+ csharp: Allocation
+ object: allocation
+ parameters:
+ - $ref: '#/components/parameters/PrepaymentID'
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Allocations array of Allocation for all Prepayment
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Allocations'
+ example:
+ Id: d4758808-d14d-45d5-851a-52787ae5739a
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552522424927)/
+ Allocations:
+ - Amount: 1.00
+ Date: /Date(1552435200000+0000)/
+ Invoice:
+ InvoiceID: c7c37b83-ac95-45ea-88ba-8ad83a5f22fe
+ Payments: []
+ CreditNotes: []
+ Prepayments: []
+ Overpayments: []
+ HasErrors: false
+ IsDiscounted: false
+ LineItems: []
+ ValidationErrors: []
+ Prepayment:
+ PrepaymentID: ce0cddef-cf5a-4e59-b638-f225679115a7
+ ID: ce0cddef-cf5a-4e59-b638-f225679115a7
+ LineItems: []
+ ValidationErrors: []
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Allocations with an array of Allocation object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Allocations'
+ example:
+ Allocations:
+ - Invoice:
+ LineItems: []
+ InvoiceID: 00000000-0000-0000-0000-000000000000
+ Amount: 1
+ Date: "2019-01-10"
+ /Prepayments/{PrepaymentID}/Allocations/{AllocationID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ delete:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: deletePrepaymentAllocations
+ summary: Deletes an Allocation from a Prepayment
+ parameters:
+ - $ref: '#/components/parameters/PrepaymentID'
+ - $ref: '#/components/parameters/AllocationID'
+ responses:
+ "200":
+ description: Success - return response of type Allocation with the isDeleted flag as true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Allocation'
+ example:
+ AllocationId: 2bb15054-3868-4f85-a9c6-0402ec8c1201
+ Date: /Date(1551822670731)/
+ Invoice:
+ - InvoiceID: b7eb1fc9-a0f9-4e8e-9373-6689f5350832
+ IsDeleted: true
+ /Prepayments/{PrepaymentID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getPrepaymentHistory
+ summary: Retrieves history record for a specific prepayment
+ parameters:
+ - $ref: '#/components/parameters/PrepaymentID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createPrepaymentHistory
+ summary: Creates a history record for a specific prepayment
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/PrepaymentID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ "400":
+ description: Unsupported - return response incorrect exception, API is not able to create HistoryRecord for Expense Claims
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ example: ' { "ErrorNumber": 10, "Type": "ValidationException", "Message": "A validation exception occurred", "Elements": [ { "DateUTCString": "2019-03-14T00:15:35", "DateUTC": "/Date(1552522535440)/", "Details": "Hello World", "ValidationErrors": [ { "Message": "The document with the supplied id was not found for this endpoint." } ] } ] }'
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /PurchaseOrders:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getPurchaseOrders
+ summary: Retrieves purchase orders
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: Status
+ x-snake: status
+ description: Filter by purchase order status
+ example: SUBMITTED
+ schema:
+ type: string
+ enum:
+ - DRAFT
+ - SUBMITTED
+ - AUTHORISED
+ - BILLED
+ - DELETED
+ - in: query
+ name: DateFrom
+ x-snake: date_from
+ description: Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31
+ example: "2019-12-01"
+ schema:
+ type: string
+ - in: query
+ name: DateTo
+ x-snake: date_to
+ description: Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31
+ example: "2019-12-31"
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: PurchaseOrderNumber ASC
+ schema:
+ type: string
+ - in: query
+ 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.
+ example: 1
+ schema:
+ type: integer
+ - $ref: '#/components/parameters/pageSize'
+ responses:
+ "200":
+ description: Success - return response of type PurchaseOrder array of all PurchaseOrder
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PurchaseOrders'
+ example:
+ Id: 66910bfc-15cc-4692-bd4c-cc8f671e653c
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552523977238)/
+ pagination:
+ page: 1
+ pageSize: 100
+ pageCount: 1
+ itemCount: 2
+ PurchaseOrders:
+ - PurchaseOrderID: f9627f0d-b715-4039-bb6a-96dc3eae5ec5
+ PurchaseOrderNumber: PO-0001
+ DateString: 2019-03-12T00:00:00
+ Date: /Date(1552348800000+0000)/
+ AttentionTo: Jimmy
+ HasErrors: false
+ IsDiscounted: false
+ Type: PURCHASEORDER
+ CurrencyRate: 1.000000
+ CurrencyCode: NZD
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ Addresses:
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Status: DELETED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.0000
+ TaxAmount: 0.00
+ LineAmount: 20.00
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 0f7b54b8-bfa4-4c5d-9c22-73dbd5796e54
+ SubTotal: 20.00
+ TotalTax: 0.00
+ Total: 20.00
+ UpdatedDateUTC: /Date(1552522703443+0000)/
+ HasAttachments: false
+ - PurchaseOrderID: 6afa2e02-c514-4964-ab89-b5c0179b8c50
+ PurchaseOrderNumber: PO-0002
+ DateString: 2019-03-12T00:00:00
+ Date: /Date(1552348800000+0000)/
+ AttentionTo: Jimmy
+ HasErrors: false
+ IsDiscounted: false
+ Type: PURCHASEORDER
+ CurrencyRate: 1.000000
+ CurrencyCode: NZD
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ Addresses:
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Status: DELETED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.0000
+ TaxAmount: 0.00
+ LineAmount: 20.00
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 3e4ec232-32b9-491b-84dd-48fb9aa8916f
+ SubTotal: 20.00
+ TotalTax: 0.00
+ Total: 20.00
+ UpdatedDateUTC: /Date(1552522834733+0000)/
+ HasAttachments: false
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createPurchaseOrders
+ summary: Creates one or more purchase orders
+ x-hasAccountingValidationError: true
+ x-example:
+ - dateValue:
+ is_date: true
+ key: dateValue
+ keyPascal: Date
+ keySnake: date_value
+ java_datatype: LocalDate
+ default: LocalDate.of(2020, Month.OCTOBER, 10)
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ php: new DateTime('2020-12-10')
+ node: '''2020-10-10'''
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_last: true
+ is_uuid: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - lineItem:
+ is_object: true
+ key: lineItem
+ keyPascal: LineItem
+ keySnake: line_item
+ - description:
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: lineItem
+ - quantity:
+ nonString: true
+ key: quantity
+ keyPascal: Quantity
+ default: 1.0
+ is_money: true
+ object: lineItem
+ - unitAmount:
+ nonString: true
+ key: unitAmount
+ keyPascal: UnitAmount
+ keySnake: unit_amount
+ default: 20.0
+ is_money: true
+ object: lineItem
+ - accountCode:
+ is_last: true
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: "000"
+ object: lineItem
+ - line_items:
+ is_list: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ csharp: LineItem
+ java: LineItem
+ - add_lineitems:
+ is_last: true
+ is_list_add: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ java: LineItems
+ python: line_item
+ ruby: line_item
+ csharp: LineItem
+ object: lineItem
+ - purchaseOrder:
+ is_object: true
+ key: purchaseOrder
+ keyPascal: PurchaseOrder
+ keySnake: purchase_order
+ - set_contact:
+ is_variable: true
+ nonString: true
+ key: contact
+ keyPascal: Contact
+ default: contact
+ object: purchaseOrder
+ - set_lineitem:
+ is_variable: true
+ nonString: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ default: lineItems
+ python: line_items
+ ruby: line_items
+ object: purchaseOrder
+ - date:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: dateValue
+ python: date_value
+ ruby: date_value
+ object: purchaseOrder
+ - purchaseOrders:
+ is_object: true
+ key: purchaseOrders
+ keyPascal: PurchaseOrders
+ - add_purchaseOrder:
+ is_last: true
+ is_array_add: true
+ key: purchaseOrders
+ keyPascal: PurchaseOrders
+ keySnake: purchase_orders
+ java: PurchaseOrders
+ python: purchase_order
+ ruby: purchase_order
+ csharp: PurchaseOrder
+ object: purchaseOrder
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type PurchaseOrder array for specified PurchaseOrder
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PurchaseOrders'
+ example:
+ Id: aa2f9d23-fd76-4bee-9600-30c0f0f34036
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552522946173)/
+ PurchaseOrders:
+ - PurchaseOrderID: 56204648-8fbe-46f8-b09c-2125f7939533
+ PurchaseOrderNumber: PO-0004
+ DateString: 2019-03-13T00:00:00
+ Date: /Date(1552435200000+0000)/
+ HasErrors: false
+ IsDiscounted: false
+ TotalDiscount: 0.00
+ SentToContact: false
+ Type: PURCHASEORDER
+ CurrencyRate: 1.000000
+ CurrencyCode: NZD
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - null
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - null
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups:
+ - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22
+ Name: Oasis
+ Status: ACTIVE
+ Contacts: []
+ HasValidationErrors: false
+ IsSupplier: true
+ IsCustomer: true
+ SalesTrackingCategories: []
+ PurchasesTrackingCategories: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Status: DRAFT
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.0000
+ TaxType: INPUT2
+ TaxAmount: 3.00
+ LineAmount: 20.00
+ AccountCode: "710"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 792b7e40-b9f2-47f0-8624-b09f4b0166dd
+ SubTotal: 20.00
+ TotalTax: 3.00
+ Total: 23.00
+ UpdatedDateUTC: /Date(1552522946077+0000)/
+ StatusAttributeString: ERROR
+ Warnings:
+ - Message: Only AUTHORISED and BILLED purchase orders may have SentToContact updated.
+ ValidationErrors:
+ - Message: Order number must be unique
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: PurchaseOrders with an array of PurchaseOrder object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PurchaseOrders'
+ example:
+ PurchaseOrders:
+ - Contact:
+ ContactID: 00000000-0000-0000-0000-000000000000
+ LineItems:
+ - Description: Foobar
+ Quantity: 1
+ UnitAmount: 20
+ AccountCode: "710"
+ Date: "2019-03-13"
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateOrCreatePurchaseOrders
+ summary: Updates or creates one or more purchase orders
+ x-hasAccountingValidationError: true
+ x-example:
+ - dateValue:
+ is_date: true
+ key: dateValue
+ keyPascal: Date
+ keySnake: date_value
+ java_datatype: LocalDate
+ default: LocalDate.of(2020, Month.OCTOBER, 10)
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ php: new DateTime('2020-12-10')
+ node: '''2020-10-10'''
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_last: true
+ is_uuid: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - lineItem:
+ is_object: true
+ key: lineItem
+ keyPascal: LineItem
+ keySnake: line_item
+ - description:
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: lineItem
+ - quantity:
+ nonString: true
+ key: quantity
+ keyPascal: Quantity
+ default: 1.0
+ is_money: true
+ object: lineItem
+ - unitAmount:
+ nonString: true
+ key: unitAmount
+ keyPascal: UnitAmount
+ keySnake: unit_amount
+ default: 20.0
+ is_money: true
+ object: lineItem
+ - accountCode:
+ is_last: true
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: "000"
+ object: lineItem
+ - line_items:
+ is_list: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ csharp: LineItem
+ java: LineItem
+ - add_lineitems:
+ is_last: true
+ is_list_add: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ java: LineItems
+ python: line_item
+ ruby: line_item
+ csharp: LineItem
+ object: lineItem
+ - purchaseOrder:
+ is_object: true
+ key: purchaseOrder
+ keyPascal: PurchaseOrder
+ keySnake: purchase_order
+ - set_contact:
+ is_variable: true
+ nonString: true
+ key: contact
+ keyPascal: Contact
+ default: contact
+ object: purchaseOrder
+ - set_lineitem:
+ is_variable: true
+ nonString: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ default: lineItems
+ python: line_items
+ ruby: line_items
+ object: purchaseOrder
+ - date:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: dateValue
+ python: date_value
+ ruby: date_value
+ object: purchaseOrder
+ - purchaseOrders:
+ is_object: true
+ key: purchaseOrders
+ keyPascal: PurchaseOrders
+ - add_purchaseOrder:
+ is_last: true
+ is_array_add: true
+ key: purchaseOrders
+ keyPascal: PurchaseOrders
+ keySnake: purchase_orders
+ java: PurchaseOrders
+ python: purchase_order
+ ruby: purchase_order
+ csharp: PurchaseOrder
+ object: purchaseOrder
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type PurchaseOrder array for specified PurchaseOrder
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PurchaseOrders'
+ example:
+ Id: aa2f9d23-fd76-4bee-9600-30c0f0f34036
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552522946173)/
+ PurchaseOrders:
+ - PurchaseOrderID: 56204648-8fbe-46f8-b09c-2125f7939533
+ PurchaseOrderNumber: PO-0004
+ DateString: 2019-03-13T00:00:00
+ Date: /Date(1552435200000+0000)/
+ HasErrors: false
+ IsDiscounted: false
+ TotalDiscount: 0.00
+ SentToContact: false
+ Type: PURCHASEORDER
+ CurrencyRate: 1.000000
+ CurrencyCode: NZD
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - null
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - null
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups:
+ - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22
+ Name: Oasis
+ Status: ACTIVE
+ Contacts: []
+ HasValidationErrors: false
+ IsSupplier: true
+ IsCustomer: true
+ SalesTrackingCategories: []
+ PurchasesTrackingCategories: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Status: DRAFT
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.0000
+ TaxType: INPUT2
+ TaxAmount: 3.00
+ LineAmount: 20.00
+ AccountCode: "710"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 792b7e40-b9f2-47f0-8624-b09f4b0166dd
+ SubTotal: 20.00
+ TotalTax: 3.00
+ Total: 23.00
+ UpdatedDateUTC: /Date(1552522946077+0000)/
+ StatusAttributeString: ERROR
+ Warnings:
+ - Message: Only AUTHORISED and BILLED purchase orders may have SentToContact updated.
+ ValidationErrors:
+ - Message: Order number must be unique
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PurchaseOrders'
+ example:
+ PurchaseOrders:
+ - Contact:
+ ContactID: 00000000-0000-0000-0000-000000000000
+ LineItems:
+ - Description: Foobar
+ Quantity: 1
+ UnitAmount: 20
+ AccountCode: "710"
+ Date: "2019-03-13"
+ /PurchaseOrders/{PurchaseOrderID}/pdf:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getPurchaseOrderAsPdf
+ x-path: /PurchaseOrders/{PurchaseOrderID}
+ summary: Retrieves specific purchase order as PDF files using a unique purchase order Id
+ parameters:
+ - $ref: '#/components/parameters/PurchaseOrderID'
+ responses:
+ "200":
+ description: Success - return response of byte array pdf version of specified Purchase Orders
+ content:
+ application/pdf:
+ schema:
+ type: string
+ format: binary
+ /PurchaseOrders/{PurchaseOrderID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getPurchaseOrder
+ summary: Retrieves a specific purchase order using a unique purchase order Id
+ parameters:
+ - $ref: '#/components/parameters/PurchaseOrderID'
+ responses:
+ "200":
+ description: Success - return response of type PurchaseOrder array for specified PurchaseOrder
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PurchaseOrders'
+ example:
+ Id: 53a8c7a5-92e8-475b-a037-acf7c55c3afd
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553626110950)/
+ PurchaseOrders:
+ - PurchaseOrderID: 15369a9f-17b6-4235-83c4-0029256d1c37
+ PurchaseOrderNumber: PO-0006
+ DateString: 2019-03-26T00:00:00
+ Date: /Date(1553558400000+0000)/
+ DeliveryDateString: 2019-03-28T00:00:00
+ DeliveryDate: /Date(1553731200000+0000)/
+ DeliveryAddress: |-
+ 101 Grafton Road
+ Roseneath
+ Wellington
+ 6011
+ New Zealand
+ AttentionTo: CEO
+ Telephone: 64 123-2222
+ DeliveryInstructions: Drop off at front door
+ HasErrors: false
+ IsDiscounted: true
+ TotalDiscount: 250.00
+ SentToContact: false
+ Reference: foobar
+ Type: PURCHASEORDER
+ CurrencyRate: 1.000000
+ CurrencyCode: NZD
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - null
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - null
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1553672800957+0000)/
+ ContactGroups:
+ - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22
+ Name: Oasis
+ Status: ACTIVE
+ Contacts: []
+ HasValidationErrors: false
+ IsSupplier: true
+ IsCustomer: true
+ DefaultCurrency: NZD
+ SalesTrackingCategories: []
+ PurchasesTrackingCategories: []
+ ContactPersons: []
+ HasValidationErrors: false
+ BrandingThemeID: 414d4a87-46d6-4cfc-ab42-4e29d22e5076
+ Status: DRAFT
+ LineAmountTypes: Exclusive
+ LineItems:
+ - ItemCode: "123"
+ Description: Brand new Fender Strats
+ UnitAmount: 2500.0000
+ TaxType: INPUT2
+ TaxAmount: 337.50
+ LineAmount: 2250.00
+ AccountCode: "630"
+ Tracking:
+ - Name: Simpsons
+ Option: Homer
+ TrackingCategoryID: 6a68adde-f210-4465-b0a9-0d8cc6f50762
+ TrackingOptionID: 94faf12f-f65c-4331-8004-b0b7c5a2da23
+ Quantity: 1.0000
+ DiscountRate: 10.00
+ LineItemID: 8a9d3eca-e052-43bc-9b87-221d0648c045
+ SubTotal: 2250.00
+ TotalTax: 337.50
+ Total: 2587.50
+ UpdatedDateUTC: /Date(1553626029823+0000)/
+ HasAttachments: true
+ Attachments:
+ - AttachmentID: 7d94ccdc-ef7b-4806-87ac-8442f25e593b
+ FileName: HelloWorld.png
+ Url: https://api.xero.com/api.xro/2.0/PurchaseOrders/15369a9f-17b6-4235-83c4-0029256d1c37/Attachments/HelloWorld.png
+ MimeType: image/png
+ ContentLength: 76091
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updatePurchaseOrder
+ summary: Updates a specific purchase order
+ x-hasAccountingValidationError: true
+ x-example:
+ - purchaseOrder:
+ is_object: true
+ key: purchaseOrder
+ keyPascal: PurchaseOrder
+ keySnake: purchase_order
+ - attentionTo:
+ is_last: true
+ key: attentionTo
+ keyPascal: AttentionTo
+ default: Peter Parker
+ object: purchaseOrder
+ - purchaseOrders:
+ is_object: true
+ key: purchaseOrders
+ keyPascal: PurchaseOrders
+ - add_purchaseOrder:
+ is_last: true
+ is_array_add: true
+ key: purchaseOrders
+ keyPascal: PurchaseOrders
+ keySnake: purchase_orders
+ java: PurchaseOrders
+ python: purchase_order
+ ruby: purchase_order
+ csharp: PurchaseOrder
+ object: purchaseOrder
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/PurchaseOrderID'
+ responses:
+ "200":
+ description: Success - return response of type PurchaseOrder array for updated PurchaseOrder
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PurchaseOrders'
+ example:
+ Id: 0e9bb3f8-d68b-4bb2-a54d-7da240a4f51a
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552523976885)/
+ PurchaseOrders:
+ - PurchaseOrderID: f9fc1120-c937-489e-84bc-e822190cfe9c
+ PurchaseOrderNumber: PO-0005
+ DateString: 2019-03-13T00:00:00
+ Date: /Date(1552435200000+0000)/
+ AttentionTo: Jimmy
+ HasErrors: false
+ IsDiscounted: false
+ TotalDiscount: 0.00
+ SentToContact: false
+ Type: PURCHASEORDER
+ CurrencyRate: 1.000000
+ CurrencyCode: NZD
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - null
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - null
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups:
+ - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22
+ Name: Oasis
+ Status: ACTIVE
+ Contacts: []
+ HasValidationErrors: false
+ IsSupplier: true
+ IsCustomer: true
+ SalesTrackingCategories: []
+ PurchasesTrackingCategories: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Status: DRAFT
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.0000
+ TaxType: INPUT2
+ TaxAmount: 3.00
+ LineAmount: 20.00
+ AccountCode: "710"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: d1d9b2cd-c9f2-4445-8d98-0b8096cf4dae
+ SubTotal: 20.00
+ TotalTax: 3.00
+ Total: 23.00
+ UpdatedDateUTC: /Date(1552523976853+0000)/
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PurchaseOrders'
+ example:
+ PurchaseOrders:
+ - AttentionTo: Peter Parker
+ LineItems: []
+ Contact: {}
+ /PurchaseOrders/{PurchaseOrderNumber}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getPurchaseOrderByNumber
+ summary: Retrieves a specific purchase order using purchase order number
+ parameters:
+ - required: true
+ in: path
+ name: PurchaseOrderNumber
+ x-snake: purchase_order_number
+ description: Unique identifier for a PurchaseOrder
+ example: PO1234
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of type PurchaseOrder array for specified PurchaseOrder
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/PurchaseOrders'
+ example:
+ Id: 53a8c7a5-92e8-475b-a037-acf7c55c3afd
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553626110950)/
+ PurchaseOrders:
+ - PurchaseOrderID: 15369a9f-17b6-4235-83c4-0029256d1c37
+ PurchaseOrderNumber: PO-0006
+ DateString: 2019-03-26T00:00:00
+ Date: /Date(1553558400000+0000)/
+ DeliveryDateString: 2019-03-28T00:00:00
+ DeliveryDate: /Date(1553731200000+0000)/
+ DeliveryAddress: |-
+ 101 Grafton Road
+ Roseneath
+ Wellington
+ 6011
+ New Zealand
+ AttentionTo: CEO
+ Telephone: 64 123-2222
+ DeliveryInstructions: Drop off at front door
+ HasErrors: false
+ IsDiscounted: true
+ TotalDiscount: 250.00
+ SentToContact: false
+ Reference: foobar
+ Type: PURCHASEORDER
+ CurrencyRate: 1.000000
+ CurrencyCode: NZD
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - null
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - null
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1553672800957+0000)/
+ ContactGroups:
+ - ContactGroupID: 17b44ed7-4389-4162-91cb-3dd5766e4e22
+ Name: Oasis
+ Status: ACTIVE
+ Contacts: []
+ HasValidationErrors: false
+ IsSupplier: true
+ IsCustomer: true
+ DefaultCurrency: NZD
+ SalesTrackingCategories: []
+ PurchasesTrackingCategories: []
+ ContactPersons: []
+ HasValidationErrors: false
+ BrandingThemeID: 414d4a87-46d6-4cfc-ab42-4e29d22e5076
+ Status: DRAFT
+ LineAmountTypes: Exclusive
+ LineItems:
+ - ItemCode: "123"
+ Description: Brand new Fender Strats
+ UnitAmount: 2500.0000
+ TaxType: INPUT2
+ TaxAmount: 337.50
+ LineAmount: 2250.00
+ AccountCode: "630"
+ Tracking:
+ - Name: Simpsons
+ Option: Homer
+ TrackingCategoryID: 6a68adde-f210-4465-b0a9-0d8cc6f50762
+ TrackingOptionID: 94faf12f-f65c-4331-8004-b0b7c5a2da23
+ Quantity: 1.0000
+ DiscountRate: 10.00
+ LineItemID: 8a9d3eca-e052-43bc-9b87-221d0648c045
+ SubTotal: 2250.00
+ TotalTax: 337.50
+ Total: 2587.50
+ UpdatedDateUTC: /Date(1553626029823+0000)/
+ HasAttachments: true
+ Attachments:
+ - AttachmentID: 7d94ccdc-ef7b-4806-87ac-8442f25e593b
+ FileName: HelloWorld.png
+ Url: https://api.xero.com/api.xro/2.0/PurchaseOrders/15369a9f-17b6-4235-83c4-0029256d1c37/Attachments/HelloWorld.png
+ MimeType: image/png
+ ContentLength: 76091
+ /PurchaseOrders/{PurchaseOrderID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getPurchaseOrderHistory
+ summary: Retrieves history for a specific purchase order
+ parameters:
+ - $ref: '#/components/parameters/PurchaseOrderID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createPurchaseOrderHistory
+ summary: Creates a history record for a specific purchase orders
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/PurchaseOrderID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /PurchaseOrders/{PurchaseOrderID}/Attachments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getPurchaseOrderAttachments
+ summary: Retrieves attachments for a specific purchase order
+ parameters:
+ - $ref: '#/components/parameters/PurchaseOrderID'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array of Purchase Orders
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: dfc29f55-8ddd-4921-a82c-bcc0798d207f
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1602100184437)/
+ Attachments:
+ - AttachmentID: dce4eaa7-c8a9-4867-9434-95832b427d3b
+ FileName: xero-dev1.png
+ Url: https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D_2.png
+ MimeType: image/png
+ ContentLength: 98715
+ - AttachmentID: e58bd37b-e47f-451a-a42c-f946ef229c3e
+ FileName: xero-dev2.png
+ Url: https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D.png
+ MimeType: image/png
+ ContentLength: 82529
+ - AttachmentID: c8faa564-223f-45e4-a5a1-94430a5b52c1
+ FileName: xero-dev3.png
+ Url: https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/Screen%20Shot%202020-09-12%20at%204.31.14%20pm.png
+ MimeType: image/png
+ ContentLength: 146384
+ /PurchaseOrders/{PurchaseOrderID}/Attachments/{AttachmentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getPurchaseOrderAttachmentById
+ summary: Retrieves specific attachment for a specific purchase order using a unique attachment Id
+ parameters:
+ - $ref: '#/components/parameters/PurchaseOrderID'
+ - $ref: '#/components/parameters/AttachmentID'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Account as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /PurchaseOrders/{PurchaseOrderID}/Attachments/{FileName}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getPurchaseOrderAttachmentByFileName
+ summary: Retrieves a specific attachment for a specific purchase order by filename
+ parameters:
+ - $ref: '#/components/parameters/PurchaseOrderID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Purchase Order as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ post:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: updatePurchaseOrderAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Updates a specific attachment for a specific purchase order by filename
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/PurchaseOrderID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array of Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: aeff9be0-54c2-45dd-8e3d-aa4f8af0fbd7
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1602100086197)/
+ Attachments:
+ - AttachmentID: dce4eaa7-c8a9-4867-9434-95832b427d3b
+ FileName: xero-dev.png
+ Url: https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D_2.png
+ MimeType: image/png
+ ContentLength: 98715
+ "400":
+ description: Validation Error - some data was incorrect returns response of type Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ put:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: createPurchaseOrderAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Creates attachment for a specific purchase order
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/PurchaseOrderID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array of Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: c728a4a4-179e-4bbd-a2d5-63e7f9ceba92
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1602099934723)/
+ Attachments:
+ - AttachmentID: e58bd37b-e47f-451a-a42c-f946ef229c3e
+ FileName: xero-dev.png
+ Url: https://api.xero.com/api.xro/2.0/PurchaseOrders/93369c9b-c481-4e21-aaab-bb19e9a26efe/Attachments/2D.png
+ MimeType: image/png
+ ContentLength: 82529
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /Quotes:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getQuotes
+ summary: Retrieves sales quotes
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: DateFrom
+ x-snake: date_from
+ description: Filter for quotes after a particular date
+ example: "2019-10-31"
+ schema:
+ type: string
+ format: date
+ - in: query
+ name: DateTo
+ x-snake: date_to
+ description: Filter for quotes before a particular date
+ example: "2019-10-31"
+ schema:
+ type: string
+ format: date
+ - in: query
+ name: ExpiryDateFrom
+ x-snake: expiry_date_from
+ description: Filter for quotes expiring after a particular date
+ example: "2019-10-31"
+ schema:
+ type: string
+ format: date
+ - in: query
+ name: ExpiryDateTo
+ x-snake: expiry_date_to
+ description: Filter for quotes before a particular date
+ example: "2019-10-31"
+ schema:
+ type: string
+ format: date
+ - in: query
+ name: ContactID
+ x-snake: contact_id
+ description: Filter for quotes belonging to a particular contact
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ - in: query
+ name: Status
+ x-snake: status
+ description: Filter for quotes of a particular Status
+ example: DRAFT
+ schema:
+ type: string
+ - in: query
+ name: page
+ description: e.g. page=1 – Up to 100 Quotes will be returned in a single API call with line items shown for each quote
+ example: 1
+ schema:
+ type: integer
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Status ASC
+ schema:
+ type: string
+ - in: query
+ name: QuoteNumber
+ x-snake: quote_number
+ description: Filter by quote number (e.g. GET https://.../Quotes?QuoteNumber=QU-0001)
+ example: QU-0001
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of type quotes array with all quotes
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Quotes'
+ example:
+ Id: bb583e7e-9b6b-471e-88da-4cbfcfad7a57
+ Status: OK
+ ProviderName: Adams OAuth2 App
+ DateTimeUTC: /Date(1571876635477)/
+ Quotes:
+ - QuoteID: be59294f-2a9c-4cee-8c64-0f0ddbc1883a
+ QuoteNumber: QU-0001
+ Reference: REF-123
+ Terms: Not valid after the expiry date
+ Contact:
+ ContactID: 060816db-0ed7-44de-ab58-8fee9316fcd5
+ Name: Adam
+ LineItems:
+ - LineItemID: ccf5e45c-73b6-4659-83e8-520f4c6126fd
+ AccountCode: "200"
+ Description: Fish out of Water
+ UnitAmount: 19.9500
+ DiscountRate: 10.00
+ LineAmount: 17.96
+ ItemCode: BOOK
+ Quantity: 1.0000
+ TaxAmount: 2.69
+ TaxType: OUTPUT2
+ Tracking:
+ - TrackingCategoryID: 351953c4-8127-4009-88c3-f9cd8c9cbe9f
+ TrackingOptionID: ce205173-7387-4651-9726-2cf4c5405ba2
+ Name: Region
+ Option: Eastside
+ Date: /Date(1571875200000)/
+ DateString: 2019-10-24T00:00:00
+ ExpiryDate: /Date(1571961600000)/
+ ExpiryDateString: 2019-10-25T00:00:00
+ Status: ACCEPTED
+ CurrencyRate: 0.937053
+ CurrencyCode: AUD
+ SubTotal: 17.96
+ TotalTax: 2.69
+ Total: 20.65
+ TotalDiscount: 1.99
+ Title: Your Quote
+ Summary: Please buy this
+ BrandingThemeID: 4c82c365-35cb-467f-bb11-dce1f2f2f67c
+ UpdatedDateUTC: /Date(1571869373890)/
+ LineAmountTypes: EXCLUSIVE
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createQuotes
+ summary: Create one or more quotes
+ x-hasAccountingValidationError: true
+ x-example:
+ - dateValue:
+ is_date: true
+ key: dateValue
+ keyPascal: Date
+ keySnake: date_value
+ java_datatype: LocalDate
+ default: LocalDate.of(2020, Month.OCTOBER, 10)
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ php: new DateTime('2020-12-10')
+ node: '''2020-10-10'''
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_last: true
+ is_uuid: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - lineItem:
+ is_object: true
+ key: lineItem
+ keyPascal: LineItem
+ keySnake: line_item
+ - description:
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: lineItem
+ - quantity:
+ nonString: true
+ key: quantity
+ keyPascal: Quantity
+ default: 1.0
+ is_money: true
+ object: lineItem
+ - unitAmount:
+ nonString: true
+ key: unitAmount
+ keyPascal: UnitAmount
+ keySnake: unit_amount
+ default: 20.0
+ is_money: true
+ object: lineItem
+ - accountCode:
+ is_last: true
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: "000"
+ object: lineItem
+ - line_items:
+ is_list: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ csharp: LineItem
+ java: LineItem
+ - add_lineitems:
+ is_last: true
+ is_list_add: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ java: LineItems
+ python: line_item
+ ruby: line_item
+ csharp: LineItem
+ object: lineItem
+ - quote:
+ is_object: true
+ key: quote
+ keyPascal: Quote
+ - set_contact:
+ is_variable: true
+ nonString: true
+ key: contact
+ keyPascal: Contact
+ default: contact
+ object: quote
+ - set_lineitem:
+ is_variable: true
+ nonString: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ default: lineItems
+ python: line_items
+ ruby: line_items
+ object: quote
+ - date:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: dateValue
+ python: date_value
+ ruby: date_value
+ object: quote
+ - quotes:
+ is_object: true
+ key: quotes
+ keyPascal: Quotes
+ - add_quote:
+ is_last: true
+ is_array_add: true
+ key: quotes
+ keyPascal: Quotes
+ java: Quotes
+ csharp: Quote
+ object: quote
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Quotes with array with newly created Quote
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Quotes'
+ example:
+ SummarizeErrors: false
+ Id: 29571f5a-bf73-4bb6-9de5-86be44e6bf2e
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1580607782916)/
+ Quotes:
+ - QuoteID: 60031d53-6488-4321-9cbd-c1db6dbf9ba4
+ QuoteNumber: QU-0008
+ Terms: ""
+ Contact:
+ ContactID: 6a65f055-b0e0-471a-a933-d1ffdd89393f
+ Name: John Smith-82160
+ EmailAddress: ""
+ LineItems:
+ - LineItemID: 26995857-0eea-45fb-b46c-f8ea896ec46e
+ AccountCode: "12775"
+ Description: Foobar
+ UnitAmount: 20.0000
+ LineAmount: 20.00
+ ItemCode: ""
+ Quantity: 1.0000
+ TaxAmount: 0.00
+ Tracking: []
+ Date: /Date(1580515200000)/
+ DateString: 2020-02-01T00:00:00
+ Status: DRAFT
+ CurrencyRate: 1.000000
+ CurrencyCode: USD
+ SubTotal: 20.00
+ TotalTax: 0.00
+ Total: 20.00
+ UpdatedDateUTC: /Date(1580607782913)/
+ LineAmountTypes: EXCLUSIVE
+ StatusAttributeString: OK
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Quotes with an array of Quote object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Quotes'
+ example:
+ Quotes:
+ - Contact:
+ ContactID: 00000000-0000-0000-0000-000000000000
+ LineItems:
+ - Description: Foobar
+ Quantity: 1
+ UnitAmount: 20
+ AccountCode: "12775"
+ Date: "2020-02-01"
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateOrCreateQuotes
+ summary: Updates or creates one or more quotes
+ x-hasAccountingValidationError: true
+ x-example:
+ - dateValue:
+ is_date: true
+ key: dateValue
+ keyPascal: Date
+ keySnake: date_value
+ java_datatype: LocalDate
+ default: LocalDate.of(2020, Month.OCTOBER, 10)
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ php: new DateTime('2020-12-10')
+ node: '''2020-10-10'''
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_last: true
+ is_uuid: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - lineItem:
+ is_object: true
+ key: lineItem
+ keyPascal: LineItem
+ keySnake: line_item
+ - description:
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: lineItem
+ - quantity:
+ nonString: true
+ key: quantity
+ keyPascal: Quantity
+ default: 1.0
+ is_money: true
+ object: lineItem
+ - unitAmount:
+ nonString: true
+ key: unitAmount
+ keyPascal: UnitAmount
+ keySnake: unit_amount
+ default: 20.0
+ is_money: true
+ object: lineItem
+ - accountCode:
+ is_last: true
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: "000"
+ object: lineItem
+ - line_items:
+ is_list: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ csharp: LineItem
+ java: LineItem
+ - add_lineitems:
+ is_last: true
+ is_list_add: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ java: LineItems
+ python: line_item
+ ruby: line_item
+ csharp: LineItem
+ object: lineItem
+ - quote:
+ is_object: true
+ key: quote
+ keyPascal: Quote
+ - set_contact:
+ is_variable: true
+ nonString: true
+ key: contact
+ keyPascal: Contact
+ default: contact
+ object: quote
+ - set_lineitem:
+ is_variable: true
+ nonString: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ default: lineItems
+ python: line_items
+ ruby: line_items
+ object: quote
+ - date:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: dateValue
+ python: date_value
+ ruby: date_value
+ object: quote
+ - quotes:
+ is_object: true
+ key: quotes
+ keyPascal: Quotes
+ - add_quote:
+ is_last: true
+ is_array_add: true
+ key: quotes
+ keyPascal: Quotes
+ java: Quotes
+ csharp: Quote
+ object: quote
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Quotes array with updated or created Quote
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Quotes'
+ example:
+ SummarizeErrors: false
+ Id: b425754f-0512-481d-827b-c8958db7667e
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1580607783833)/
+ Quotes:
+ - QuoteID: fd53e0b7-4d24-4c20-be85-043a62ea5847
+ QuoteNumber: QU-0009
+ Terms: ""
+ Contact:
+ ContactID: 6a65f055-b0e0-471a-a933-d1ffdd89393f
+ Name: John Smith-82160
+ EmailAddress: ""
+ LineItems:
+ - LineItemID: 898c7fd6-0d94-4ac0-ace8-87e350a042de
+ AccountCode: "12775"
+ Description: Foobar
+ UnitAmount: 20.0000
+ LineAmount: 20.00
+ ItemCode: ""
+ Quantity: 1.0000
+ TaxAmount: 0.00
+ Tracking: []
+ Date: /Date(1580515200000)/
+ DateString: 2020-02-01T00:00:00
+ Status: DRAFT
+ CurrencyRate: 1.000000
+ CurrencyCode: USD
+ SubTotal: 20.00
+ TotalTax: 0.00
+ Total: 20.00
+ UpdatedDateUTC: /Date(1580607783467)/
+ LineAmountTypes: EXCLUSIVE
+ StatusAttributeString: OK
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Quotes'
+ example:
+ Quotes:
+ - Contact:
+ ContactID: 00000000-0000-0000-0000-000000000000
+ LineItems:
+ - Description: Foobar
+ Quantity: 1
+ UnitAmount: 20
+ AccountCode: "12775"
+ Date: "2020-02-01"
+ /Quotes/{QuoteID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getQuote
+ summary: Retrieves a specific quote using a unique quote Id
+ parameters:
+ - $ref: '#/components/parameters/QuoteID'
+ responses:
+ "200":
+ description: Success - return response of type Quotes array with specified Quote
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Quotes'
+ example:
+ SummarizeErrors: true
+ Id: e3626c45-77f1-4ab0-ba9b-3593c7bcd25c
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1580607864786)/
+ Quotes:
+ - QuoteID: 1f90e77a-7b88-4462-874f-1aa675be8fef
+ QuoteNumber: QU-0007
+ Reference: MyQuote
+ Terms: These are my terms
+ Contact:
+ ContactID: 4bc3ecb2-8e2a-4267-a171-0e0ce7e5ac2a
+ Name: ABC Limited
+ EmailAddress: john.smith@gmail.com
+ FirstName: John
+ LastName: Smith
+ LineItems:
+ - LineItemID: 09b47d9f-f78d-4bab-b226-957f55bfb1b5
+ AccountCode: "400"
+ Description: Half day training - Microsoft Office
+ UnitAmount: 500.0000
+ LineAmount: 500.00
+ ItemCode: Train-MS
+ Quantity: 1.0000
+ TaxAmount: 0.00
+ TaxType: NONE
+ Tracking:
+ - TrackingCategoryID: 9bd3f506-6d91-4625-81f0-0f9147f099f4
+ TrackingOptionID: d30e2a0d-ae6f-4806-88ca-d8ebdba2af73
+ Name: Avengers
+ Option: IronMan
+ Date: /Date(1580515200000)/
+ DateString: 2020-02-01T00:00:00
+ ExpiryDate: /Date(1581724800000)/
+ ExpiryDateString: 2020-02-15T00:00:00
+ Status: DRAFT
+ CurrencyRate: 1.547150
+ CurrencyCode: NZD
+ SubTotal: 500.00
+ TotalTax: 0.00
+ Total: 500.00
+ TotalDiscount: 0.00
+ Title: ""
+ Summary: ""
+ BrandingThemeID: 324587a9-7eed-46c0-ad64-fa941a1b5b3e
+ UpdatedDateUTC: /Date(1580607757040)/
+ LineAmountTypes: EXCLUSIVE
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateQuote
+ summary: Updates a specific quote
+ x-hasAccountingValidationError: true
+ x-example:
+ - dateValue:
+ is_date: true
+ key: dateValue
+ keyPascal: Date
+ keySnake: date_value
+ java_datatype: LocalDate
+ default: LocalDate.of(2020, Month.OCTOBER, 10)
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ php: new DateTime('2020-12-10')
+ node: '''2020-10-10'''
+ python: dateutil.parser.parse('2020-12-03T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_last: true
+ is_uuid: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - quote:
+ is_object: true
+ key: quote
+ keyPascal: Quote
+ - reference:
+ key: reference
+ keyPascal: Reference
+ default: I am an update
+ object: quote
+ - set_contact:
+ is_variable: true
+ nonString: true
+ key: contact
+ keyPascal: Contact
+ default: contact
+ object: quote
+ - date:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: dateValue
+ python: date_value
+ ruby: date_value
+ object: quote
+ - quotes:
+ is_object: true
+ key: quotes
+ keyPascal: Quotes
+ - add_quote:
+ is_last: true
+ is_array_add: true
+ key: quotes
+ keyPascal: Quotes
+ java: Quotes
+ csharp: Quote
+ object: quote
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/QuoteID'
+ responses:
+ "200":
+ description: Success - return response of type Quotes array with updated Quote
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Quotes'
+ example:
+ SummarizeErrors: true
+ Id: be4f43a7-ef02-497a-96c2-fc0bc047a82a
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1580605644385)/
+ Quotes:
+ - QuoteID: 8ce6b14c-ef87-4f45-93f0-853137c6d0e1
+ QuoteNumber: QU-0008
+ Reference: I am an update
+ Terms: ""
+ Contact:
+ ContactID: 8ed7dd03-4e6a-4078-a807-c5309abfec52
+ Name: Orlena Greenville 35
+ EmailAddress: ""
+ LineItems:
+ - LineItemID: be69f44e-9c72-4fcd-9152-0174867cce49
+ AccountCode: "12775"
+ Description: Foobar
+ UnitAmount: 20.0000
+ LineAmount: 20.00
+ ItemCode: ""
+ Quantity: 1.0000
+ TaxAmount: 0.00
+ Tracking: []
+ Date: /Date(1580515200000)/
+ DateString: 2020-02-01T00:00:00
+ Status: DRAFT
+ CurrencyRate: 1.000000
+ CurrencyCode: USD
+ SubTotal: 20.00
+ TotalTax: 0.00
+ Total: 20.00
+ UpdatedDateUTC: /Date(1580605644360)/
+ LineAmountTypes: EXCLUSIVE
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Quotes'
+ example:
+ Quotes:
+ - Reference: I am an update
+ Contact:
+ ContactID: 00000000-0000-0000-0000-000000000000
+ Date: "2020-02-01"
+ /Quotes/{QuoteID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getQuoteHistory
+ summary: Retrieves history records of a specific quote
+ parameters:
+ - $ref: '#/components/parameters/QuoteID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createQuoteHistory
+ summary: Creates a history record for a specific quote
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/QuoteID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /Quotes/{QuoteID}/pdf:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getQuoteAsPdf
+ x-path: /Quotes/{QuoteID}
+ summary: Retrieves a specific quote as a PDF file using a unique quote Id
+ parameters:
+ - $ref: '#/components/parameters/QuoteID'
+ responses:
+ "200":
+ description: Success - return response of byte array pdf version of specified Quotes
+ content:
+ application/pdf:
+ schema:
+ type: string
+ format: binary
+ /Quotes/{QuoteID}/Attachments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getQuoteAttachments
+ summary: Retrieves attachments for a specific quote
+ parameters:
+ - $ref: '#/components/parameters/QuoteID'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array of Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 439c1573-3cd8-4697-a9f6-81fa651ee8f3
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550852630329)/
+ Attachments:
+ - AttachmentID: 52a643be-cd5c-489f-9778-53a9fd337756
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/Quotes/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ /Quotes/{QuoteID}/Attachments/{AttachmentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getQuoteAttachmentById
+ summary: Retrieves a specific attachment from a specific quote using a unique attachment Id
+ parameters:
+ - $ref: '#/components/parameters/QuoteID'
+ - $ref: '#/components/parameters/AttachmentID'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Quote as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /Quotes/{QuoteID}/Attachments/{FileName}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getQuoteAttachmentByFileName
+ summary: Retrieves a specific attachment from a specific quote by filename
+ parameters:
+ - $ref: '#/components/parameters/QuoteID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Quote as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ post:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: updateQuoteAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Updates a specific attachment from a specific quote by filename
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/QuoteID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array of Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: c8d6413a-1da2-4faa-9848-21f60443e906
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550859714477)/
+ Attachments:
+ - AttachmentID: 3fa85f64-5717-4562-b3fc-2c963f66afa6
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/Quotes/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ description: Validation Error - some data was incorrect returns response of type Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ put:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: createQuoteAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Creates attachment for a specific quote
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/QuoteID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array of Attachment
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 724cdff5-bcd1-4c5c-977e-e864c24258e0
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550856817769)/
+ Attachments:
+ - AttachmentID: ab95b276-9dce-4925-9077-439818ba270f
+ FileName: sample5.jpg
+ Url: https://api.xero.com/api.xro/2.0/Quotes/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /Receipts:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getReceipts
+ summary: Retrieves draft expense claim receipts for any user
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="DRAFT"
+ x-example-csharp: Status==\"DRAFT\"
+ x-example-java: Status=="' + Receipt.StatusEnum.DRAFT + '"
+ x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\Receipt::STATUS_DRAFT . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::Receipt::DRAFT}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: ReceiptNumber ASC
+ schema:
+ type: string
+ - $ref: '#/components/parameters/unitdp'
+ responses:
+ "200":
+ description: Success - return response of type Receipts array for all Receipt
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Receipts'
+ example:
+ Id: 078b2a2c-902f-4154-8739-357ece5982e5
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552524584695)/
+ Receipts:
+ - ReceiptID: a44fd147-af4e-4fe8-a09a-55332df74162
+ ReceiptNumber: 1
+ Status: DRAFT
+ User:
+ UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273
+ FirstName: 'API '
+ LastName: Team
+ ValidationErrors: []
+ Warnings: []
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ SalesTrackingCategories: []
+ PurchasesTrackingCategories: []
+ ContactPersons: []
+ Attachments: []
+ HasValidationErrors: false
+ ValidationErrors: []
+ Warnings: []
+ Date: /Date(1552435200000+0000)/
+ UpdatedDateUTC: /Date(1552524583983+0000)/
+ Reference: ""
+ LineAmountTypes: NoTax
+ LineItems: []
+ SubTotal: 40.00
+ TotalTax: 0.00
+ Total: 40.00
+ ID: a44fd147-af4e-4fe8-a09a-55332df74162
+ HasAttachments: false
+ Attachments: []
+ ValidationErrors: []
+ Warnings: []
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createReceipt
+ summary: Creates draft expense claim receipts for any user
+ x-hasAccountingValidationError: true
+ x-example:
+ - contact:
+ is_object: true
+ key: contact
+ keyPascal: Contact
+ - contactID:
+ is_last: true
+ is_uuid: true
+ key: contactID
+ keyPascal: ContactID
+ keySnake: contact_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: contact
+ - user:
+ is_object: true
+ key: user
+ keyPascal: User
+ - userID:
+ is_last: true
+ is_uuid: true
+ key: userID
+ keyPascal: UserID
+ keySnake: user_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: user
+ - lineItem:
+ is_object: true
+ key: lineItem
+ keyPascal: LineItem
+ keySnake: line_item
+ - description:
+ key: description
+ keyPascal: Description
+ default: Foobar
+ object: lineItem
+ - quantity:
+ nonString: true
+ key: quantity
+ keyPascal: Quantity
+ default: 1.0
+ is_money: true
+ object: lineItem
+ - unitAmount:
+ nonString: true
+ key: unitAmount
+ keyPascal: UnitAmount
+ keySnake: unit_amount
+ default: 20.0
+ is_money: true
+ object: lineItem
+ - accountCode:
+ is_last: true
+ key: accountCode
+ keyPascal: AccountCode
+ keySnake: account_code
+ default: "000"
+ object: lineItem
+ - line_items:
+ is_list: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ csharp: LineItem
+ java: LineItem
+ - add_lineitems:
+ is_last: true
+ is_list_add: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ java: LineItems
+ python: line_item
+ ruby: line_item
+ csharp: LineItem
+ object: lineItem
+ - receipt:
+ is_object: true
+ key: receipt
+ keyPascal: Receipt
+ - set_contact:
+ is_variable: true
+ nonString: true
+ key: contact
+ keyPascal: Contact
+ default: contact
+ object: receipt
+ - set_user:
+ is_variable: true
+ nonString: true
+ key: user
+ keyPascal: User
+ default: user
+ object: receipt
+ - set_lineitem:
+ is_variable: true
+ nonString: true
+ key: lineItems
+ keyPascal: LineItems
+ keySnake: line_items
+ default: lineItems
+ python: line_items
+ ruby: line_items
+ object: receipt
+ - lineAmountTypes:
+ nonString: true
+ key: lineAmountTypes
+ keyPascal: LineAmountTypes
+ keySnake: line_amount_types
+ default: INCLUSIVE
+ php: XeroAPI\XeroPHP\Models\Accounting\LineAmountTypes::INCLUSIVE
+ node: LineAmountTypes.Inclusive
+ ruby: XeroRuby::Accounting::INCLUSIVE
+ python: LineAmountTypes.INCLUSIVE
+ java: com.xero.models.accounting.LineAmountTypes.INCLUSIVE
+ csharp: LineAmountTypes.Exclusive
+ object: receipt
+ - status:
+ is_last: true
+ nonString: true
+ key: status
+ keyPascal: Status
+ default: DRAFT
+ php: XeroAPI\XeroPHP\Models\Accounting\Receipt::STATUS_DRAFT
+ node: Receipt.StatusEnum.DRAFT
+ ruby: XeroRuby::Accounting::Receipt::DRAFT
+ python_string: DRAFT
+ java: com.xero.models.accounting.Receipt.StatusEnum.DRAFT
+ csharp: Receipt.StatusEnum.DRAFT
+ object: receipt
+ - receipts:
+ is_object: true
+ key: receipts
+ keyPascal: Receipts
+ - add_receipt:
+ is_last: true
+ is_array_add: true
+ key: receipts
+ keyPascal: Receipts
+ java: Receipts
+ csharp: Receipt
+ object: receipt
+ parameters:
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Receipts array for newly created Receipt
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Receipts'
+ example:
+ Id: 35898898-5361-4b42-b6ca-9d2c584fc53d
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552524583429)/
+ Receipts:
+ - ReceiptID: a44fd147-af4e-4fe8-a09a-55332df74162
+ ReceiptNumber: 1
+ Status: DRAFT
+ User:
+ UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273
+ EmailAddress: api@xero.com
+ FirstName: 'API '
+ LastName: Team
+ UpdatedDateUTC: /Date(1511957179217+0000)/
+ IsSubscriber: true
+ OrganisationRole: FINANCIALADVISER
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ AttentionTo: ""
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Date: /Date(1552521600000+0000)/
+ UpdatedDateUTC: /Date(1552524583367+0000)/
+ Reference: ""
+ LineAmountTypes: NoTax
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.00
+ TaxType: NONE
+ TaxAmount: 0.00
+ LineAmount: 40.00
+ AccountCode: "400"
+ Tracking: []
+ Quantity: 2.0000
+ SubTotal: 40.00
+ TotalTax: 0.00
+ Total: 40.00
+ ID: a44fd147-af4e-4fe8-a09a-55332df74162
+ HasAttachments: false
+ ValidationErrors:
+ - Message: A valid user should be identified using the UserID.
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Receipts with an array of Receipt object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Receipts'
+ example:
+ Receipts:
+ - Contact:
+ ContactID: 00000000-0000-0000-0000-000000000000
+ Lineitems:
+ - Description: Foobar
+ Quantity: 2
+ UnitAmount: 20
+ AccountCode: "400"
+ TaxType: NONE
+ LineAmount: 40
+ User:
+ UserID: 00000000-0000-0000-0000-000000000000
+ LineAmountTypes: NoTax
+ Status: DRAFT
+ /Receipts/{ReceiptID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getReceipt
+ summary: Retrieves a specific draft expense claim receipt by using a unique receipt Id
+ parameters:
+ - $ref: '#/components/parameters/ReceiptID'
+ - $ref: '#/components/parameters/unitdp'
+ responses:
+ "200":
+ description: Success - return response of type Receipts array for a specified Receipt
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Receipts'
+ example:
+ Id: 2c99af06-d278-4580-8c8c-463c806af5b6
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553800357225)/
+ Receipts:
+ - ReceiptID: a44fd147-af4e-4fe8-a09a-55332df74162
+ ReceiptNumber: 1
+ Status: DRAFT
+ User:
+ UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273
+ EmailAddress: api@xero.com
+ FirstName: 'API '
+ LastName: Team
+ UpdatedDateUTC: /Date(1511957179217+0000)/
+ IsSubscriber: true
+ OrganisationRole: FINANCIALADVISER
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ AttentionTo: ""
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1553672800957+0000)/
+ ContactGroups: []
+ DefaultCurrency: NZD
+ ContactPersons: []
+ HasValidationErrors: false
+ Date: /Date(1552435200000+0000)/
+ UpdatedDateUTC: /Date(1552524583983+0000)/
+ Reference: Foobar
+ LineAmountTypes: NoTax
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.00
+ TaxType: NONE
+ TaxAmount: 0.00
+ LineAmount: 40.00
+ AccountCode: "400"
+ Tracking: []
+ Quantity: 2.0000
+ DiscountEnteredAsPercent: true
+ SubTotal: 40.00
+ TotalTax: 0.00
+ Total: 40.00
+ ID: a44fd147-af4e-4fe8-a09a-55332df74162
+ HasAttachments: true
+ Attachments:
+ - AttachmentID: e02a84f6-b83a-4983-b3b9-35cd8880c7bc
+ FileName: HelloWorld.jpg
+ Url: https://api.xero.com/api.xro/2.0/receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/HelloWorld.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ - AttachmentID: 3451e34c-66a6-42b0-91e2-88618bdc169b
+ FileName: foobar.jpg
+ Url: https://api.xero.com/api.xro/2.0/receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/foobar.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateReceipt
+ summary: Updates a specific draft expense claim receipts
+ x-hasAccountingValidationError: true
+ x-example:
+ - dateValue:
+ is_date: true
+ key: dateValue
+ keyPascal: Date
+ java_datatype: LocalDate
+ default: LocalDate.of(2020, Month.OCTOBER, 10)
+ java: LocalDate.now()
+ csharp: DateTime.Now
+ php: new DateTime('2020-12-10')
+ node: '''2020-10-10'''
+ python: dateutil.parser.parse('2020-10-10T00:00:00Z')
+ ruby: '''YYYY-MM-DD'''
+ - user:
+ is_object: true
+ key: user
+ keyPascal: User
+ - userID:
+ is_last: true
+ is_uuid: true
+ key: userID
+ keyPascal: UserID
+ keySnake: user_id
+ default: 00000000-0000-0000-0000-000000000000
+ object: user
+ - receipt:
+ is_object: true
+ key: receipt
+ keyPascal: Receipt
+ - set_user:
+ is_variable: true
+ nonString: true
+ key: user
+ keyPascal: User
+ default: user
+ object: receipt
+ - reference:
+ key: reference
+ keyPascal: Reference
+ default: Foobar
+ object: receipt
+ - date:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: date
+ keyPascal: Date
+ default: dateValue
+ object: receipt
+ - receipts:
+ is_object: true
+ key: receipts
+ keyPascal: Receipts
+ - add_receipt:
+ is_last: true
+ is_array_add: true
+ key: receipts
+ keyPascal: Receipts
+ java: Receipts
+ csharp: Receipt
+ object: receipt
+ parameters:
+ - $ref: '#/components/parameters/ReceiptID'
+ - $ref: '#/components/parameters/unitdp'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type Receipts array for updated Receipt
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Receipts'
+ example:
+ Id: 05b76bf7-4734-4633-a399-7d569a6a25c6
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552675557052)/
+ Receipts:
+ - ReceiptID: e3686fdc-c661-4581-b9df-cbb20782ea66
+ ReceiptNumber: 2
+ Status: DRAFT
+ User:
+ UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273
+ EmailAddress: api@xero.com
+ FirstName: 'API '
+ LastName: Team
+ UpdatedDateUTC: /Date(1511957179217+0000)/
+ IsSubscriber: true
+ OrganisationRole: FINANCIALADVISER
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ ContactStatus: ACTIVE
+ Name: Liam Gallagher
+ FirstName: Liam
+ LastName: Gallagher
+ EmailAddress: liam@rockstar.com
+ BankAccountDetails: ""
+ Addresses:
+ - AddressType: STREET
+ City: ""
+ Region: ""
+ PostalCode: ""
+ Country: ""
+ AttentionTo: ""
+ - AddressType: POBOX
+ City: Anytown
+ Region: NY
+ PostalCode: "10101"
+ Country: USA
+ AttentionTo: ""
+ Phones:
+ - PhoneType: DEFAULT
+ PhoneNumber: 222-2222
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: DDI
+ PhoneNumber: ""
+ PhoneAreaCode: ""
+ PhoneCountryCode: ""
+ - PhoneType: FAX
+ PhoneNumber: 333-2233
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ - PhoneType: MOBILE
+ PhoneNumber: 444-3433
+ PhoneAreaCode: "212"
+ PhoneCountryCode: ""
+ UpdatedDateUTC: /Date(1551747281053+0000)/
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Date: /Date(1552694400000+0000)/
+ UpdatedDateUTC: /Date(1552675556927+0000)/
+ Reference: Foobar
+ LineAmountTypes: NoTax
+ LineItems:
+ - Description: Foobar
+ UnitAmount: 20.00
+ TaxType: NONE
+ TaxAmount: 0.00
+ LineAmount: 40.00
+ AccountCode: "400"
+ Tracking: []
+ Quantity: 2.0000
+ SubTotal: 40.00
+ TotalTax: 0.00
+ Total: 40.00
+ ID: e3686fdc-c661-4581-b9df-cbb20782ea66
+ HasAttachments: false
+ ValidationErrors: []
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Receipts'
+ example:
+ Receipts:
+ - Lineitems: []
+ User:
+ UserID: 00000000-0000-0000-0000-000000000000
+ Reference: Foobar
+ /Receipts/{ReceiptID}/Attachments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getReceiptAttachments
+ summary: Retrieves attachments for a specific expense claim receipt
+ parameters:
+ - $ref: '#/components/parameters/ReceiptID'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array of Attachments for a specified Receipt
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: d379c04d-d3aa-4034-95b8-af69a449bd78
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552686430436)/
+ Attachments:
+ - AttachmentID: 11e5ca6b-d38c-42ab-a29f-c1710d171aa1
+ FileName: giphy.gif
+ Url: https://api.xero.com/api.xro/2.0/Receipts/7923c00d-163d-404c-a608-af3de333db29/Attachments/giphy.gif
+ MimeType: image/gif
+ ContentLength: 495727
+ /Receipts/{ReceiptID}/Attachments/{AttachmentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getReceiptAttachmentById
+ summary: Retrieves a specific attachments from a specific expense claim receipts by using a unique attachment Id
+ parameters:
+ - $ref: '#/components/parameters/ReceiptID'
+ - $ref: '#/components/parameters/AttachmentID'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Receipt as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /Receipts/{ReceiptID}/Attachments/{FileName}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getReceiptAttachmentByFileName
+ summary: Retrieves a specific attachment from a specific expense claim receipts by file name
+ parameters:
+ - $ref: '#/components/parameters/ReceiptID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Receipt as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ post:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: updateReceiptAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Updates a specific attachment on a specific expense claim receipts by file name
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ReceiptID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with updated Attachment for a specified Receipt
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: aeca1ea8-8fd9-4757-96a6-397dc4957a69
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552686602761)/
+ Attachments:
+ - AttachmentID: e02a84f6-b83a-4983-b3b9-35cd8880c7bc
+ FileName: HelloWorld.jpg
+ Url: https://api.xero.com/api.xro/2.0/Receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/HelloWorld.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ put:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: createReceiptAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Creates an attachment on a specific expense claim receipts by file name
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ReceiptID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with newly created Attachment for a specified Receipt
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 01c9a720-b1f1-4477-8de8-ff46d945fd1d
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1552686599884)/
+ Attachments:
+ - AttachmentID: 3451e34c-66a6-42b0-91e2-88618bdc169b
+ FileName: foobar.jpg
+ Url: https://api.xero.com/api.xro/2.0/Receipts/a44fd147-af4e-4fe8-a09a-55332df74162/Attachments/foobar.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /Receipts/{ReceiptID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getReceiptHistory
+ summary: Retrieves a history record for a specific receipt
+ parameters:
+ - $ref: '#/components/parameters/ReceiptID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createReceiptHistory
+ summary: Creates a history record for a specific receipt
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/ReceiptID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ "400":
+ description: Unsupported - return response incorrect exception, API is not able to create HistoryRecord for Receipts
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ example:
+ ErrorNumber: 10
+ Type: ValidationException
+ Message: A validation exception occurred
+ Elements:
+ - DateUTCString: 2019-03-15T21:51:50
+ DateUTC: /Date(1552686710791)/
+ Details: Hello World
+ ValidationErrors:
+ - Message: The document with the supplied id was not found for this endpoint.
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /RepeatingInvoices:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getRepeatingInvoices
+ summary: Retrieves repeating invoices
+ parameters:
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="DRAFT"
+ x-example-csharp: Status==\"DRAFT\"
+ x-example-java: Status=="' + RepeatingInvoice.StatusEnum.DRAFT + '"
+ x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\RepeatingInvoice::STATUS_DRAFT . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::RepeatingInvoice::DRAFT}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Total ASC
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of type Repeating Invoices array for all Repeating Invoice
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RepeatingInvoices'
+ example:
+ Id: b336833d-a3a8-4a67-ab4c-6280b3ad87b0
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553805183228)/
+ RepeatingInvoices:
+ - Schedule:
+ Period: 1
+ Unit: MONTHLY
+ DueDate: 10
+ DueDateType: OFFOLLOWINGMONTH
+ StartDate: /Date(1555286400000+0000)/
+ EndDate: /Date(1569801600000+0000)/
+ NextScheduledDate: /Date(1555286400000+0000)/
+ RepeatingInvoiceID: 428c0d75-909f-4b04-8403-a48dc27283b0
+ Type: ACCREC
+ Reference: '[Week]'
+ HasAttachments: true
+ ApprovedForSending: false
+ SendCopy: false
+ MarkAsSent: false
+ IncludePDF: false
+ ID: 428c0d75-909f-4b04-8403-a48dc27283b0
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Guitars Fender Strat
+ UnitAmount: 5000.00
+ TaxType: OUTPUT2
+ TaxAmount: 750.00
+ LineAmount: 5000.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900
+ DiscountEnteredAsPercent: true
+ SubTotal: 5000.00
+ TotalTax: 750.00
+ Total: 5750.00
+ CurrencyCode: NZD
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createRepeatingInvoices
+ summary: Creates one or more repeating invoice templates
+ x-hasAccountingValidationError: true
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type RepeatingInvoices array with newly created RepeatingInvoice
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RepeatingInvoices'
+ example:
+ Id: b336833d-a3a8-4a67-ab4c-6280b3ad87b0
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553805183228)/
+ RepeatingInvoices:
+ - Schedule:
+ Period: 1
+ Unit: MONTHLY
+ DueDate: 10
+ DueDateType: OFFOLLOWINGMONTH
+ StartDate: /Date(1555286400000+0000)/
+ EndDate: /Date(1569801600000+0000)/
+ NextScheduledDate: /Date(1555286400000+0000)/
+ RepeatingInvoiceID: 428c0d75-909f-4b04-8403-a48dc27283b0
+ Type: ACCREC
+ Reference: '[Week]'
+ HasAttachments: true
+ ApprovedForSending: false
+ SendCopy: false
+ MarkAsSent: false
+ IncludePDF: false
+ ID: 428c0d75-909f-4b04-8403-a48dc27283b0
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Guitars Fender Strat
+ UnitAmount: 5000.00
+ TaxType: OUTPUT2
+ TaxAmount: 750.00
+ LineAmount: 5000.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900
+ DiscountEnteredAsPercent: true
+ SubTotal: 5000.00
+ TotalTax: 750.00
+ Total: 5750.00
+ CurrencyCode: NZD
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: RepeatingInvoices with an array of repeating invoice objects in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RepeatingInvoices'
+ example:
+ RepeatingInvoices:
+ - Schedule:
+ Period: 1
+ Unit: MONTHLY
+ DueDate: 10
+ DueDateType: OFFOLLOWINGMONTH
+ StartDate: /Date(1555286400000+0000)/
+ Type: ACCREC
+ Reference: '[Week]'
+ ApprovedForSending: false
+ SendCopy: false
+ MarkAsSent: false
+ IncludePDF: false
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Guitars Fender Strat
+ UnitAmount: 5000.00
+ TaxType: OUTPUT2
+ TaxAmount: 750.00
+ LineAmount: 5000.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900
+ DiscountEnteredAsPercent: true
+ CurrencyCode: NZD
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateOrCreateRepeatingInvoices
+ summary: Creates or deletes one or more repeating invoice templates
+ x-hasAccountingValidationError: true
+ parameters:
+ - $ref: '#/components/parameters/summarizeErrors'
+ - $ref: '#/components/parameters/idempotencyKey'
+ responses:
+ "200":
+ description: Success - return response of type RepeatingInvoices array with newly created RepeatingInvoice
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RepeatingInvoices'
+ example:
+ Id: b336833d-a3a8-4a67-ab4c-6280b3ad87b0
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553805183228)/
+ RepeatingInvoices:
+ - Schedule:
+ Period: 1
+ Unit: MONTHLY
+ DueDate: 10
+ DueDateType: OFFOLLOWINGMONTH
+ StartDate: /Date(1555286400000+0000)/
+ EndDate: /Date(1569801600000+0000)/
+ NextScheduledDate: /Date(1555286400000+0000)/
+ RepeatingInvoiceID: 428c0d75-909f-4b04-8403-a48dc27283b0
+ Type: ACCREC
+ Reference: '[Week]'
+ HasAttachments: true
+ ApprovedForSending: false
+ SendCopy: false
+ MarkAsSent: false
+ IncludePDF: false
+ ID: 428c0d75-909f-4b04-8403-a48dc27283b0
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Guitars Fender Strat
+ UnitAmount: 5000.00
+ TaxType: OUTPUT2
+ TaxAmount: 750.00
+ LineAmount: 5000.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900
+ DiscountEnteredAsPercent: true
+ SubTotal: 5000.00
+ TotalTax: 750.00
+ Total: 5750.00
+ CurrencyCode: NZD
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: RepeatingInvoices with an array of repeating invoice objects in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RepeatingInvoices'
+ example:
+ RepeatingInvoices:
+ - Schedule:
+ Period: 1
+ Unit: MONTHLY
+ DueDate: 10
+ DueDateType: OFFOLLOWINGMONTH
+ StartDate: /Date(1555286400000+0000)/
+ Type: ACCREC
+ Reference: '[Week]'
+ ApprovedForSending: false
+ SendCopy: false
+ MarkAsSent: false
+ IncludePDF: false
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Guitars Fender Strat
+ UnitAmount: 5000.00
+ TaxType: OUTPUT2
+ TaxAmount: 750.00
+ LineAmount: 5000.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900
+ DiscountEnteredAsPercent: true
+ CurrencyCode: NZD
+ /RepeatingInvoices/{RepeatingInvoiceID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getRepeatingInvoice
+ summary: Retrieves a specific repeating invoice by using a unique repeating invoice Id
+ parameters:
+ - $ref: '#/components/parameters/RepeatingInvoiceID'
+ responses:
+ "200":
+ description: Success - return response of type Repeating Invoices array with a specified Repeating Invoice
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RepeatingInvoices'
+ example:
+ Id: d9ac3755-7b81-4e3a-bef0-fa8a4f171442
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553805184820)/
+ RepeatingInvoices:
+ - Schedule:
+ Period: 1
+ Unit: MONTHLY
+ DueDate: 10
+ DueDateType: OFFOLLOWINGMONTH
+ StartDate: /Date(1555286400000+0000)/
+ EndDate: /Date(1569801600000+0000)/
+ NextScheduledDate: /Date(1555286400000+0000)/
+ RepeatingInvoiceID: 428c0d75-909f-4b04-8403-a48dc27283b0
+ Type: ACCREC
+ Reference: '[Week]'
+ HasAttachments: true
+ Attachments:
+ - AttachmentID: 2a488b0f-3966-4b6e-a7e1-b6d3286351f2
+ FileName: HelloWorld.jpg
+ Url: https://api.xero.com/api.xro/2.0/Invoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/HelloWorld.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ - AttachmentID: 48294e40-bfd2-4027-a365-f034383cb7aa
+ FileName: foobar.jpg
+ Url: https://api.xero.com/api.xro/2.0/Invoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/foobar.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ - AttachmentID: 528e978a-87b8-44c4-9465-9456ec2f7ee6
+ FileName: helo-heros.jpg
+ Url: https://api.xero.com/api.xro/2.0/Invoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/helo-heros.jpg
+ MimeType: image/jpeg
+ ContentLength: 2878711
+ ID: 428c0d75-909f-4b04-8403-a48dc27283b0
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Status: AUTHORISED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Guitars Fender Strat
+ UnitAmount: 5000.00
+ TaxType: OUTPUT2
+ TaxAmount: 750.00
+ LineAmount: 5000.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900
+ DiscountEnteredAsPercent: true
+ SubTotal: 5000.00
+ TotalTax: 750.00
+ Total: 5750.00
+ CurrencyCode: NZD
+ post:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: updateRepeatingInvoice
+ summary: Deletes a specific repeating invoice template
+ x-hasAccountingValidationError: true
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/RepeatingInvoiceID'
+ responses:
+ "200":
+ description: Success - return response of type RepeatingInvoices array with deleted Invoice
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RepeatingInvoices'
+ example:
+ Id: b336833d-a3a8-4a67-ab4c-6280b3ad87b0
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553805183228)/
+ RepeatingInvoices:
+ - Schedule:
+ Period: 1
+ Unit: MONTHLY
+ DueDate: 10
+ DueDateType: OFFOLLOWINGMONTH
+ StartDate: /Date(1555286400000+0000)/
+ EndDate: /Date(1569801600000+0000)/
+ NextScheduledDate: /Date(1555286400000+0000)/
+ RepeatingInvoiceID: 428c0d75-909f-4b04-8403-a48dc27283b0
+ Type: ACCREC
+ Reference: '[Week]'
+ HasAttachments: true
+ ApprovedForSending: false
+ SendCopy: false
+ MarkAsSent: false
+ IncludePDF: false
+ ID: 428c0d75-909f-4b04-8403-a48dc27283b0
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Status: DELETED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Guitars Fender Strat
+ UnitAmount: 5000.00
+ TaxType: OUTPUT2
+ TaxAmount: 750.00
+ LineAmount: 5000.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900
+ DiscountEnteredAsPercent: true
+ SubTotal: 5000.00
+ TotalTax: 750.00
+ Total: 5750.00
+ CurrencyCode: NZD
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RepeatingInvoices'
+ example:
+ Schedule:
+ Period: 1
+ Unit: MONTHLY
+ DueDate: 10
+ DueDateType: OFFOLLOWINGMONTH
+ StartDate: /Date(1555286400000+0000)/
+ EndDate: /Date(1569801600000+0000)/
+ NextScheduledDate: /Date(1555286400000+0000)/
+ RepeatingInvoiceID: 428c0d75-909f-4b04-8403-a48dc27283b0
+ Type: ACCREC
+ Reference: '[Week]'
+ HasAttachments: true
+ ApprovedForSending: false
+ SendCopy: false
+ MarkAsSent: false
+ IncludePDF: false
+ ID: 428c0d75-909f-4b04-8403-a48dc27283b0
+ Contact:
+ ContactID: 430fa14a-f945-44d3-9f97-5df5e28441b8
+ Name: Liam Gallagher
+ Addresses: []
+ Phones: []
+ ContactGroups: []
+ ContactPersons: []
+ HasValidationErrors: false
+ Status: DELETED
+ LineAmountTypes: Exclusive
+ LineItems:
+ - Description: Guitars Fender Strat
+ UnitAmount: 5000.00
+ TaxType: OUTPUT2
+ TaxAmount: 750.00
+ LineAmount: 5000.00
+ AccountCode: "200"
+ Tracking: []
+ Quantity: 1.0000
+ LineItemID: 13a8353c-d2af-4d5b-920c-438449f08900
+ DiscountEnteredAsPercent: true
+ SubTotal: 5000.00
+ TotalTax: 750.00
+ Total: 5750.00
+ CurrencyCode: NZD
+ /RepeatingInvoices/{RepeatingInvoiceID}/Attachments:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getRepeatingInvoiceAttachments
+ summary: Retrieves attachments from a specific repeating invoice
+ parameters:
+ - $ref: '#/components/parameters/RepeatingInvoiceID'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with all Attachments for a specified Repeating Invoice
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: b88b807b-3087-474b-a4f9-d8f1b4f5a899
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553805762049)/
+ Attachments:
+ - AttachmentID: 2a488b0f-3966-4b6e-a7e1-b6d3286351f2
+ FileName: HelloWorld.jpg
+ Url: https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/HelloWorld.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ - AttachmentID: 48294e40-bfd2-4027-a365-f034383cb7aa
+ FileName: foobar.jpg
+ Url: https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/foobar.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ - AttachmentID: 528e978a-87b8-44c4-9465-9456ec2f7ee6
+ FileName: helo-heros.jpg
+ Url: https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/helo-heros.jpg
+ MimeType: image/jpeg
+ ContentLength: 2878711
+ /RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{AttachmentID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getRepeatingInvoiceAttachmentById
+ summary: Retrieves a specific attachment from a specific repeating invoice
+ parameters:
+ - $ref: '#/components/parameters/RepeatingInvoiceID'
+ - $ref: '#/components/parameters/AttachmentID'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Repeating Invoice as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /RepeatingInvoices/{RepeatingInvoiceID}/Attachments/{FileName}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ - accounting.attachments.read
+ tags:
+ - Accounting
+ operationId: getRepeatingInvoiceAttachmentByFileName
+ summary: Retrieves a specific attachment from a specific repeating invoices by file name
+ parameters:
+ - $ref: '#/components/parameters/RepeatingInvoiceID'
+ - $ref: '#/components/parameters/FileName'
+ - $ref: '#/components/parameters/ContentType'
+ responses:
+ "200":
+ description: Success - return response of attachment for Repeating Invoice as binary data
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ post:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: updateRepeatingInvoiceAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Updates a specific attachment from a specific repeating invoices by file name
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/RepeatingInvoiceID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with specified Attachment for a specified Repeating Invoice
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 61b24d5c-4d6e-468f-9de1-abbc234b239a
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553805873362)/
+ Attachments:
+ - AttachmentID: d086d5f4-9c3d-4edc-a87e-906248eeb652
+ FileName: HelloWorld.jpg
+ Url: https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/HelloWorld.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ put:
+ security:
+ - OAuth2:
+ - accounting.attachments
+ tags:
+ - Accounting
+ operationId: createRepeatingInvoiceAttachmentByFileName
+ x-hasAccountingValidationError: true
+ summary: Creates an attachment from a specific repeating invoices by file name
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/RepeatingInvoiceID'
+ - $ref: '#/components/parameters/FileName'
+ responses:
+ "200":
+ description: Success - return response of type Attachments array with updated Attachment for a specified Repeating Invoice
+ x-isAttachment: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Attachments'
+ example:
+ Id: 219de8c0-ee70-48af-a000-594eba14b417
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553805866696)/
+ Attachments:
+ - AttachmentID: e078e56c-9a2b-4f6c-a1fa-5d19b0dab611
+ FileName: foobar.jpg
+ Url: https://api.xero.com/api.xro/2.0/RepeatingInvoices/428c0d75-909f-4b04-8403-a48dc27283b0/Attachments/foobar.jpg
+ MimeType: image/jpg
+ ContentLength: 2878711
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: Byte array of file in body of request
+ content:
+ application/octet-stream:
+ schema:
+ type: string
+ format: binary
+ /RepeatingInvoices/{RepeatingInvoiceID}/History:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ - accounting.transactions.read
+ tags:
+ - Accounting
+ operationId: getRepeatingInvoiceHistory
+ summary: Retrieves history record for a specific repeating invoice
+ parameters:
+ - $ref: '#/components/parameters/RepeatingInvoiceID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRetrieved'
+ put:
+ security:
+ - OAuth2:
+ - accounting.transactions
+ tags:
+ - Accounting
+ operationId: createRepeatingInvoiceHistory
+ summary: Creates a history record for a specific repeating invoice
+ x-hasAccountingValidationError: true
+ x-example:
+ - historyRecord:
+ is_object: true
+ key: historyRecord
+ keyPascal: HistoryRecord
+ keySnake: history_record
+ - Details:
+ is_last: true
+ key: details
+ keyPascal: Details
+ default: Hello World
+ object: historyRecord
+ - historyRecords:
+ is_object: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ - add_historyRecord:
+ is_last: true
+ is_array_add: true
+ key: historyRecords
+ keyPascal: HistoryRecords
+ keySnake: history_records
+ java: HistoryRecords
+ python: history_record
+ ruby: history_record
+ csharp: HistoryRecord
+ object: historyRecord
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/RepeatingInvoiceID'
+ responses:
+ "200":
+ $ref: '#/components/responses/HistoryRecordCreated'
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ $ref: '#/components/requestBodies/historyRecords'
+ /Reports/TenNinetyNine:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.reports.read
+ - accounting.reports.tenninetynine.read
+ tags:
+ - Accounting
+ operationId: getReportTenNinetyNine
+ summary: Retrieve reports for 1099
+ parameters:
+ - in: query
+ name: reportYear
+ x-snake: report_year
+ description: The year of the 1099 report
+ example: "2019"
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of type Reports
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Reports'
+ example:
+ Id: 8b474ddb-9ef4-457c-8640-1c0e3670ea0e
+ Status: OK
+ ProviderName: Java Public Example
+ DateTimeUTC: /Date(1691540171754)/
+ Reports:
+ - ReportName: 1099-NEC report
+ ReportDate: 1 Jan 2023 to 31 Dec 2023
+ Fields: []
+ Contacts:
+ - Box1: 0.00
+ Box2: 0.00
+ Box4: 1150.00
+ Name: Bank West
+ FederalTaxIDType: SSN
+ City: Pinehaven
+ Zip: "12345"
+ State: CA
+ Email: jack@bowest.com
+ StreetAddress: "Procurement Services\r\nGPO 1234\r\n\r\n\r\n"
+ TaxID: 234-22-2223
+ ContactId: 81d5706a-8057-4338-8511-747cd85f4c68
+ LegalName: Jack Sparrow
+ BusinessName: Bank West
+ FederalTaxClassification: PARTNERSHIP
+ - ReportName: 1099-MISC report
+ ReportDate: 1 Jan 2023 to 31 Dec 2023
+ Fields: []
+ Contacts:
+ - Box1: 0.00
+ Box2: 0.00
+ Box3: 1000.00
+ Box4: 0.00
+ Box5: 0.00
+ Box6: 0.00
+ Box7: 0.00
+ Box8: 0.00
+ Box9: 0.00
+ Box10: 0.00
+ Box11: 0.00
+ Box14: 0.00
+ Name: Bank West
+ FederalTaxIDType: SSN
+ City: Pinehaven
+ Zip: "12345"
+ State: CA
+ Email: jack@bowest.com
+ StreetAddress: "Procurement Services\r\nGPO 1234\r\n\r\n\r\n"
+ TaxID: 234-22-2223
+ ContactId: 81d5706a-8057-4338-8511-747cd85f4c68
+ LegalName: Jack Sparrow
+ BusinessName: Bank West
+ FederalTaxClassification: PARTNERSHIP
+ - Box1: 0.00
+ Box2: 0.00
+ Box3: 1000.00
+ Box4: 0.00
+ Box5: 0.00
+ Box6: 0.00
+ Box7: 0.00
+ Box8: 0.00
+ Box9: 0.00
+ Box10: 0.00
+ Box11: 0.00
+ Box14: 0.00
+ Name: Hoyt Productions
+ FederalTaxIDType: SSN
+ City: Oaktown
+ Zip: "45123"
+ State: NY
+ Email: accounts@hoytmadeupdemo.com
+ StreetAddress: "100 Rusty Ridge Road\r\nSuite 100\r\n\r\n\r\n"
+ TaxID: 123-45-6780
+ ContactId: 19732b6a-9a5c-4651-b33c-3f8f682e2a2b
+ LegalName: Raymond Holt
+ BusinessName: Hoyt productions
+ FederalTaxClassification: S_CORP
+ - Box1: 5543.75
+ Box2: 0.00
+ Box3: 0.00
+ Box4: 0.00
+ Box5: 0.00
+ Box6: 0.00
+ Box7: 0.00
+ Box8: 0.00
+ Box9: 0.00
+ Box10: 0.00
+ Box11: 0.00
+ Box14: 0.00
+ Name: Truxton Property Management
+ FederalTaxIDType: EIN
+ City: Coppertown
+ Zip: "21321"
+ State: FL
+ Email: accounts@truxtonmadeupdemo.com
+ StreetAddress: "1000 Copper Avenue\r\nSuite 1000\r\n\r\n\r\n"
+ TaxID: 33-3332233
+ ContactId: 018355fc-c67e-4352-b443-ef3873031983
+ LegalName: Jake Peralta
+ BusinessName: Truxton Property Management
+ FederalTaxClassification: C_CORP
+ /Reports/AgedPayablesByContact:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.reports.read
+ tags:
+ - Accounting
+ operationId: getReportAgedPayablesByContact
+ summary: Retrieves report for aged payables by contact
+ parameters:
+ - in: query
+ required: true
+ name: contactId
+ x-snake: contact_id
+ description: Unique identifier for a Contact
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ - in: query
+ name: date
+ description: The date of the Aged Payables By Contact report
+ example: "2019-10-31"
+ schema:
+ type: string
+ format: date
+ - $ref: '#/components/parameters/FromDate'
+ - $ref: '#/components/parameters/ToDate'
+ responses:
+ "200":
+ description: Success - return response of type ReportWithRows
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReportWithRows'
+ example:
+ Id: 5a33f9d4-44a6-4467-a812-4f025506ee35
+ Status: OK
+ ProviderName: Java Public Example
+ DateTimeUTC: /Date(1555971088085)/
+ Reports:
+ - ReportName: Aged Payables By Contact
+ ReportType: AgedPayablesByContact
+ ReportTitles:
+ - Invoices
+ - ABC
+ - From 10 October 2017 to 22 April 2019
+ - Showing payments to 22 April 2019
+ ReportDate: 22 April 2019
+ UpdatedDateUTC: /Date(1555971088085)/
+ Fields: []
+ Rows:
+ - RowType: Header
+ Cells:
+ - Value: Date
+ - Value: Reference
+ - Value: Due Date
+ - Value: ""
+ - Value: Total
+ - Value: Paid
+ - Value: Credited
+ - Value: Due
+ - RowType: Section
+ Title: ""
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: 2017-10-10T00:00:00
+ - Value: Opening Balance
+ - Value: ""
+ - Value: ""
+ - Value: ""
+ - Value: ""
+ - Value: ""
+ - Value: "0.00"
+ - RowType: Section
+ Title: ""
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: 2018-10-09T00:00:00
+ Attributes:
+ - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8
+ Id: invoiceID
+ - Value: ""
+ Attributes:
+ - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8
+ Id: invoiceID
+ - Value: 2018-10-23T00:00:00
+ Attributes:
+ - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8
+ Id: invoiceID
+ - Value: 181 days overdue
+ Attributes:
+ - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8
+ Id: invoiceID
+ - Value: "250.00"
+ Attributes:
+ - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8
+ Id: invoiceID
+ - Value: "0.00"
+ Attributes:
+ - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8
+ Id: invoiceID
+ - Value: "0.00"
+ Attributes:
+ - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8
+ Id: invoiceID
+ - Value: "250.00"
+ Attributes:
+ - Value: 1f3960ae-0537-4438-a4dd-76d785e6d7d8
+ Id: invoiceID
+ - RowType: SummaryRow
+ Cells:
+ - Value: Total
+ - Value: ""
+ - Value: ""
+ - Value: ""
+ - Value: "250.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "250.00"
+ - RowType: Section
+ Title: ""
+ Rows:
+ - RowType: SummaryRow
+ Cells:
+ - Value: Closing Balance
+ - Value: ""
+ - Value: ""
+ - Value: ""
+ - Value: "250.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "250.00"
+ /Reports/AgedReceivablesByContact:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.reports.read
+ tags:
+ - Accounting
+ operationId: getReportAgedReceivablesByContact
+ summary: Retrieves report for aged receivables by contact
+ parameters:
+ - in: query
+ required: true
+ name: contactId
+ x-snake: contact_id
+ description: Unique identifier for a Contact
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ - in: query
+ name: date
+ description: The date of the Aged Receivables By Contact report
+ example: "2019-10-31"
+ schema:
+ type: string
+ format: date
+ - $ref: '#/components/parameters/FromDate'
+ - $ref: '#/components/parameters/ToDate'
+ responses:
+ "200":
+ description: Success - return response of type ReportWithRows
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReportWithRows'
+ example:
+ Id: b977b607-955d-47cb-92fd-7c29b3dd755c
+ Status: OK
+ ProviderName: Java Public Example
+ DateTimeUTC: /Date(1556032862815)/
+ Reports:
+ - ReportName: Aged Receivables By Contact
+ ReportType: AgedReceivablesByContact
+ ReportTitles:
+ - Invoices
+ - ABC
+ - From 10 October 2017 to 23 April 2019
+ - Showing payments to 23 April 2019
+ ReportDate: 23 April 2019
+ UpdatedDateUTC: /Date(1556032862815)/
+ Fields: []
+ Rows:
+ - RowType: Header
+ Cells:
+ - Value: Date
+ - Value: Number
+ - Value: Due Date
+ - Value: ""
+ - Value: Total
+ - Value: Paid
+ - Value: Credited
+ - Value: Due
+ - RowType: Section
+ Title: ""
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: 2017-10-10T00:00:00
+ - Value: Opening Balance
+ - Value: ""
+ - Value: ""
+ - Value: ""
+ - Value: ""
+ - Value: ""
+ - Value: "0.00"
+ - RowType: Section
+ Title: ""
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: 2018-05-13T00:00:00
+ Attributes:
+ - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b
+ Id: invoiceID
+ - Value: IV1242016
+ Attributes:
+ - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b
+ Id: invoiceID
+ - Value: 2018-06-22T00:00:00
+ Attributes:
+ - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b
+ Id: invoiceID
+ - Value: 305 days overdue
+ Attributes:
+ - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b
+ Id: invoiceID
+ - Value: "100.00"
+ Attributes:
+ - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b
+ Id: invoiceID
+ - Value: "0.00"
+ Attributes:
+ - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b
+ Id: invoiceID
+ - Value: "0.00"
+ Attributes:
+ - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b
+ Id: invoiceID
+ - Value: "100.00"
+ Attributes:
+ - Value: 40ebad47-24e2-4dc9-a5f5-579df427671b
+ Id: invoiceID
+ - RowType: Row
+ Cells:
+ - Value: 2019-04-23T00:00:00
+ Attributes:
+ - Value: ca0483ce-fa43-4335-8512-751e655337b8
+ Id: invoiceID
+ - Value: INV-0086
+ Attributes:
+ - Value: ca0483ce-fa43-4335-8512-751e655337b8
+ Id: invoiceID
+ - Value: 2019-05-07T00:00:00
+ Attributes:
+ - Value: ca0483ce-fa43-4335-8512-751e655337b8
+ Id: invoiceID
+ - Value: ""
+ Attributes:
+ - Value: ca0483ce-fa43-4335-8512-751e655337b8
+ Id: invoiceID
+ - Value: "50.00"
+ Attributes:
+ - Value: ca0483ce-fa43-4335-8512-751e655337b8
+ Id: invoiceID
+ - Value: "0.00"
+ Attributes:
+ - Value: ca0483ce-fa43-4335-8512-751e655337b8
+ Id: invoiceID
+ - Value: "0.00"
+ Attributes:
+ - Value: ca0483ce-fa43-4335-8512-751e655337b8
+ Id: invoiceID
+ - Value: "50.00"
+ Attributes:
+ - Value: ca0483ce-fa43-4335-8512-751e655337b8
+ Id: invoiceID
+ - RowType: SummaryRow
+ Cells:
+ - Value: Total
+ - Value: ""
+ - Value: ""
+ - Value: ""
+ - Value: "150.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "150.00"
+ - RowType: Section
+ Title: ""
+ Rows:
+ - RowType: SummaryRow
+ Cells:
+ - Value: Closing Balance
+ - Value: ""
+ - Value: ""
+ - Value: ""
+ - Value: "150.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "150.00"
+ /Reports/BalanceSheet:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.reports.read
+ tags:
+ - Accounting
+ operationId: getReportBalanceSheet
+ summary: Retrieves report for balancesheet
+ parameters:
+ - in: query
+ name: date
+ description: The date of the Balance Sheet report
+ example: "2019-11-01"
+ schema:
+ type: string
+ format: date
+ - in: query
+ name: periods
+ description: The number of periods for the Balance Sheet report
+ example: 3
+ schema:
+ type: integer
+ - in: query
+ name: timeframe
+ description: The period size to compare to (MONTH, QUARTER, YEAR)
+ example: MONTH
+ schema:
+ type: string
+ enum:
+ - MONTH
+ - QUARTER
+ - YEAR
+ - in: query
+ name: trackingOptionID1
+ x-snake: tracking_option_id_1
+ description: The tracking option 1 for the Balance Sheet report
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ - in: query
+ name: trackingOptionID2
+ x-snake: tracking_option_id_2
+ description: The tracking option 2 for the Balance Sheet report
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ - in: query
+ name: standardLayout
+ x-snake: standard_layout
+ description: The standard layout boolean for the Balance Sheet report
+ example: true
+ x-example-python: "True"
+ schema:
+ type: boolean
+ - in: query
+ name: paymentsOnly
+ x-snake: payments_only
+ description: return a cash basis for the Balance Sheet report
+ example: false
+ x-example-python: "False"
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: Success - return response of type ReportWithRows
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReportWithRows'
+ example:
+ Id: 2ddba304-6ed3-4da4-b185-3b6289699653
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1555099412778)/
+ Reports:
+ - ReportName: Balance Sheet
+ ReportType: BalanceSheet
+ ReportTitles:
+ - Balance Sheet
+ - Dev Evangelist - Sid Test 3 (NZ-2016-02)
+ - As at 30 April 2019
+ ReportDate: 12 April 2019
+ UpdatedDateUTC: /Date(1555099412778)/
+ Fields: []
+ Rows:
+ - RowType: Header
+ Cells:
+ - Value: ""
+ - Value: 30 Apr 2019
+ - Value: 31 Mar 2019
+ - Value: 28 Feb 2019
+ - RowType: Section
+ Title: Assets
+ Rows: []
+ - RowType: Section
+ Title: Bank
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Country Savings
+ Attributes:
+ - Value: 041207d2-3d61-4e5d-8c1a-b9236955a71c
+ Id: account
+ - Value: "-1850.00"
+ Attributes:
+ - Value: 041207d2-3d61-4e5d-8c1a-b9236955a71c
+ Id: account
+ - Value: "-1850.00"
+ Attributes:
+ - Value: 041207d2-3d61-4e5d-8c1a-b9236955a71c
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: 041207d2-3d61-4e5d-8c1a-b9236955a71c
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: My Big Bank
+ Attributes:
+ - Value: 300f3bde-3a5c-4035-9ec5-45b09777679a
+ Id: account
+ - Value: "2146.37"
+ Attributes:
+ - Value: 300f3bde-3a5c-4035-9ec5-45b09777679a
+ Id: account
+ - Value: "2020.00"
+ Attributes:
+ - Value: 300f3bde-3a5c-4035-9ec5-45b09777679a
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: 300f3bde-3a5c-4035-9ec5-45b09777679a
+ Id: account
+ - RowType: SummaryRow
+ Cells:
+ - Value: Total Bank
+ - Value: "296.37"
+ - Value: "170.00"
+ - Value: "0.00"
+ - RowType: Section
+ Title: Current Assets
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Accounts Receivable
+ Attributes:
+ - Value: b94495d0-44ab-4199-a1d0-427a4877e100
+ Id: account
+ - Value: "154355.72"
+ Attributes:
+ - Value: b94495d0-44ab-4199-a1d0-427a4877e100
+ Id: account
+ - Value: "154351.78"
+ Attributes:
+ - Value: b94495d0-44ab-4199-a1d0-427a4877e100
+ Id: account
+ - Value: "356.50"
+ Attributes:
+ - Value: b94495d0-44ab-4199-a1d0-427a4877e100
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Inventory
+ Attributes:
+ - Value: 53a12a15-7e9b-4a31-85f4-a7cee6d04215
+ Id: account
+ - Value: "25000.00"
+ Attributes:
+ - Value: 53a12a15-7e9b-4a31-85f4-a7cee6d04215
+ Id: account
+ - Value: "25000.00"
+ Attributes:
+ - Value: 53a12a15-7e9b-4a31-85f4-a7cee6d04215
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: 53a12a15-7e9b-4a31-85f4-a7cee6d04215
+ Id: account
+ - RowType: SummaryRow
+ Cells:
+ - Value: Total Current Assets
+ - Value: "179355.72"
+ - Value: "179351.78"
+ - Value: "356.50"
+ - RowType: Section
+ Title: Fixed Assets
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Office Equipment
+ Attributes:
+ - Value: 7132cab3-ce56-4389-8e47-8f60d4c137f8
+ Id: account
+ - Value: "-119.00"
+ Attributes:
+ - Value: 7132cab3-ce56-4389-8e47-8f60d4c137f8
+ Id: account
+ - Value: "-119.00"
+ Attributes:
+ - Value: 7132cab3-ce56-4389-8e47-8f60d4c137f8
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: 7132cab3-ce56-4389-8e47-8f60d4c137f8
+ Id: account
+ - RowType: SummaryRow
+ Cells:
+ - Value: Total Fixed Assets
+ - Value: "-119.00"
+ - Value: "-119.00"
+ - Value: "0.00"
+ - RowType: Section
+ Title: ""
+ Rows:
+ - RowType: SummaryRow
+ Cells:
+ - Value: Total Assets
+ - Value: "179533.09"
+ - Value: "179402.78"
+ - Value: "356.50"
+ - RowType: Section
+ Title: Liabilities
+ Rows: []
+ - RowType: Section
+ Title: Current Liabilities
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Accounts Payable
+ Attributes:
+ - Value: a2a4795b-a01f-40eb-afa6-a34b4514875d
+ Id: account
+ - Value: "-3469.00"
+ Attributes:
+ - Value: a2a4795b-a01f-40eb-afa6-a34b4514875d
+ Id: account
+ - Value: "-3469.00"
+ Attributes:
+ - Value: a2a4795b-a01f-40eb-afa6-a34b4514875d
+ Id: account
+ - Value: "-184.00"
+ Attributes:
+ - Value: a2a4795b-a01f-40eb-afa6-a34b4514875d
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: GST
+ Attributes:
+ - Value: 17d9a4a0-3181-4803-a96b-f0dbe589091b
+ Id: account
+ - Value: "-2446.21"
+ Attributes:
+ - Value: 17d9a4a0-3181-4803-a96b-f0dbe589091b
+ Id: account
+ - Value: "-2461.89"
+ Attributes:
+ - Value: 17d9a4a0-3181-4803-a96b-f0dbe589091b
+ Id: account
+ - Value: "76.50"
+ Attributes:
+ - Value: 17d9a4a0-3181-4803-a96b-f0dbe589091b
+ Id: account
+ - RowType: SummaryRow
+ Cells:
+ - Value: Total Current Liabilities
+ - Value: "-5915.21"
+ - Value: "-5930.89"
+ - Value: "-107.50"
+ - RowType: Section
+ Title: ""
+ Rows:
+ - RowType: SummaryRow
+ Cells:
+ - Value: Total Liabilities
+ - Value: "-5915.21"
+ - Value: "-5930.89"
+ - Value: "-107.50"
+ - RowType: Section
+ Title: ""
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Net Assets
+ - Value: "185448.30"
+ - Value: "185333.67"
+ - Value: "464.00"
+ - RowType: Section
+ Title: Equity
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Current Year Earnings
+ Attributes:
+ - Value: 00000000-0000-0000-0000-000000000000
+ Id: account
+ - Value: "114.62"
+ Attributes:
+ - Value: 00000000-0000-0000-0000-000000000000
+ Id: account
+ - Value: 4/1/2019
+ Id: fromDate
+ - Value: 4/30/2019
+ Id: toDate
+ - Value: "156621.67"
+ Attributes:
+ - Value: 00000000-0000-0000-0000-000000000000
+ Id: account
+ - Value: 4/1/2018
+ Id: fromDate
+ - Value: 3/31/2019
+ Id: toDate
+ - Value: "500.00"
+ Attributes:
+ - Value: 00000000-0000-0000-0000-000000000000
+ Id: account
+ - Value: 4/1/2018
+ Id: fromDate
+ - Value: 2/28/2019
+ Id: toDate
+ - RowType: Row
+ Cells:
+ - Value: Owner A Drawings
+ Attributes:
+ - Value: 136ebd08-60ea-4592-8982-be92c153b53a
+ Id: account
+ - Value: "28752.00"
+ Attributes:
+ - Value: 136ebd08-60ea-4592-8982-be92c153b53a
+ Id: account
+ - Value: "28752.00"
+ Attributes:
+ - Value: 136ebd08-60ea-4592-8982-be92c153b53a
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: 136ebd08-60ea-4592-8982-be92c153b53a
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Owner A Funds Introduced
+ Attributes:
+ - Value: 5690f1e8-1d02-4893-90c2-ee1a69eff942
+ Id: account
+ - Value: "-50.00"
+ Attributes:
+ - Value: 5690f1e8-1d02-4893-90c2-ee1a69eff942
+ Id: account
+ - Value: "-50.00"
+ Attributes:
+ - Value: 5690f1e8-1d02-4893-90c2-ee1a69eff942
+ Id: account
+ - Value: "-46.00"
+ Attributes:
+ - Value: 5690f1e8-1d02-4893-90c2-ee1a69eff942
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Retained Earnings
+ Attributes:
+ - Value: 7fc16c06-c342-4f32-995f-889b5f9996fd
+ Id: account
+ - Value: "156631.67"
+ Attributes:
+ - Value: 7fc16c06-c342-4f32-995f-889b5f9996fd
+ Id: account
+ - Value: ""
+ Id: fromDate
+ - Value: 4/30/2019
+ Id: toDate
+ - Value: "10.00"
+ Attributes:
+ - Value: 7fc16c06-c342-4f32-995f-889b5f9996fd
+ Id: account
+ - Value: ""
+ Id: fromDate
+ - Value: 3/31/2019
+ Id: toDate
+ - Value: "10.00"
+ Attributes:
+ - Value: 7fc16c06-c342-4f32-995f-889b5f9996fd
+ Id: account
+ - Value: ""
+ Id: fromDate
+ - Value: 2/28/2019
+ Id: toDate
+ - RowType: SummaryRow
+ Cells:
+ - Value: Total Equity
+ - Value: "185448.29"
+ - Value: "185333.67"
+ - Value: "464.00"
+ /Reports/BankSummary:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.reports.read
+ tags:
+ - Accounting
+ operationId: getReportBankSummary
+ summary: Retrieves report for bank summary
+ parameters:
+ - $ref: '#/components/parameters/FromDate'
+ - $ref: '#/components/parameters/ToDate'
+ responses:
+ "200":
+ description: Success - return response of type ReportWithRows
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReportWithRows'
+ example:
+ Id: ae58d0ec-9c5c-455f-b96e-690107579257
+ Status: OK
+ ProviderName: Java Public Example
+ DateTimeUTC: /Date(1556035526223)/
+ Reports:
+ - ReportName: Bank Summary
+ ReportType: BankSummary
+ ReportTitles:
+ - Bank Summary
+ - MindBody Test 10 (AU-2016-02)
+ - From 1 April 2019 to 30 April 2019
+ ReportDate: 23 April 2019
+ UpdatedDateUTC: /Date(1556035526223)/
+ Fields: []
+ Rows:
+ - RowType: Header
+ Cells:
+ - Value: Bank Accounts
+ - Value: Opening Balance
+ - Value: Cash Received
+ - Value: Cash Spent
+ - Value: Closing Balance
+ - RowType: Section
+ Title: ""
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Big City Bank
+ Attributes:
+ - Value: 03f9cf1e-2deb-4bf1-b0a8-b57f08672eb8
+ Id: accountID
+ - Value: "0.00"
+ - Value: "110.00"
+ Attributes:
+ - Value: 03f9cf1e-2deb-4bf1-b0a8-b57f08672eb8
+ Id: account
+ - Value: "100.00"
+ Attributes:
+ - Value: 03f9cf1e-2deb-4bf1-b0a8-b57f08672eb8
+ Id: account
+ - Value: "10.00"
+ - RowType: SummaryRow
+ Cells:
+ - Value: Total
+ - Value: "0.00"
+ - Value: "110.00"
+ - Value: "100.00"
+ - Value: "10.00"
+ /Reports/{ReportID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.reports.read
+ tags:
+ - Accounting
+ operationId: getReportFromId
+ summary: Retrieves a specific report using a unique ReportID
+ parameters:
+ - in: path
+ required: true
+ name: ReportID
+ x-snake: report_id
+ description: Unique identifier for a Report
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of type ReportWithRows
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReportWithRows'
+ /Reports/BudgetSummary:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.reports.read
+ tags:
+ - Accounting
+ operationId: getReportBudgetSummary
+ summary: Retrieves report for budget summary
+ parameters:
+ - in: query
+ name: date
+ description: The date for the Bank Summary report e.g. 2018-03-31
+ example: "2019-03-31"
+ schema:
+ type: string
+ format: date
+ - in: query
+ name: periods
+ description: The number of periods to compare (integer between 1 and 12)
+ example: 2
+ schema:
+ type: integer
+ - in: query
+ name: timeframe
+ description: The period size to compare to (1=month, 3=quarter, 12=year)
+ example: 3
+ schema:
+ type: integer
+ responses:
+ "200":
+ description: success- return a Report with Rows object
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReportWithRows'
+ example:
+ Id: 9f1e2722-0d98-4669-890f-f8f4217c968b
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573755037865)/
+ Reports:
+ - ReportName: Budget Summary
+ ReportType: BudgetSummary
+ ReportTitles:
+ - Overall Budget
+ - Budget Summary
+ - Online Test 11
+ - November 2019 to October 2022
+ ReportDate: 14 November 2019
+ UpdatedDateUTC: /Date(1573755037865)/
+ Fields: []
+ Rows:
+ - RowType: Header
+ Cells:
+ - Value: Account
+ - Value: Jan-20
+ - Value: Apr-20
+ - Value: Jul-20
+ - Value: Oct-20
+ - Value: Jan-21
+ - Value: Apr-21
+ - Value: Jul-21
+ - Value: Oct-21
+ - Value: Jan-22
+ - Value: Apr-22
+ - Value: Jul-22
+ - Value: Oct-22
+ - RowType: Section
+ Title: ""
+ Rows:
+ - RowType: SummaryRow
+ Cells:
+ - Value: Gross Profit
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - RowType: Section
+ Title: ""
+ Rows:
+ - RowType: SummaryRow
+ Cells:
+ - Value: Total Expenses
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - RowType: Section
+ Title: ""
+ Rows:
+ - RowType: SummaryRow
+ Cells:
+ - Value: Net Profit
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: "0.00"
+ /Reports/ExecutiveSummary:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.reports.read
+ tags:
+ - Accounting
+ operationId: getReportExecutiveSummary
+ summary: Retrieves report for executive summary
+ parameters:
+ - in: query
+ name: date
+ description: The date for the Bank Summary report e.g. 2018-03-31
+ example: "2019-03-31"
+ schema:
+ type: string
+ format: date
+ responses:
+ "200":
+ description: Success - return response of type ReportWithRows
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReportWithRows'
+ example:
+ Id: 068d3505-ac37-43f3-8135-f912a5963d8a
+ Status: OK
+ ProviderName: provider-name
+ DateTimeUTC: /Date(1573755038314)/
+ Reports:
+ - ReportName: Executive Summary
+ ReportType: ExecutiveSummary
+ ReportTitles:
+ - Executive Summary
+ - Online Test 11
+ - For the month of November 2019
+ ReportDate: 14 November 2019
+ UpdatedDateUTC: /Date(1573755038314)/
+ Fields: []
+ Rows:
+ - RowType: Header
+ Cells:
+ - Value: ""
+ - Value: Nov 2019
+ - Value: Oct 2019
+ - Value: Variance
+ - RowType: Section
+ Title: Cash
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Cash received
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: 0.0%
+ - RowType: Row
+ Cells:
+ - Value: Cash spent
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: 0.0%
+ - RowType: Row
+ Cells:
+ - Value: Cash surplus (deficit)
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: 0.0%
+ - RowType: Row
+ Cells:
+ - Value: Closing bank balance
+ - Value: "79.01"
+ - Value: "79.01"
+ - Value: 0.0%
+ - RowType: Section
+ Title: Profitability
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Income
+ - Value: "40.00"
+ - Value: "0.00"
+ - Value: 0.0%
+ - RowType: Row
+ Cells:
+ - Value: Direct costs
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: 0.0%
+ - RowType: Row
+ Cells:
+ - Value: Gross profit (loss)
+ - Value: "40.00"
+ - Value: "0.00"
+ - Value: 0.0%
+ - RowType: Row
+ Cells:
+ - Value: Other Income
+ - Value: "0.00"
+ - Value: "0.00"
+ - Value: 0.0%
+ - RowType: Row
+ Cells:
+ - Value: Expenses
+ - Value: "205.40"
+ - Value: "0.00"
+ - Value: 0.0%
+ - RowType: Row
+ Cells:
+ - Value: Profit (loss)
+ - Value: "-165.40"
+ - Value: "0.00"
+ - Value: 0.0%
+ - RowType: Section
+ Title: Balance Sheet
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Debtors
+ - Value: "590.00"
+ - Value: "550.00"
+ - Value: 7.3%
+ - RowType: Row
+ Cells:
+ - Value: Creditors
+ - Value: "-44.00"
+ - Value: "-44.00"
+ - Value: 0.0%
+ - RowType: Row
+ Cells:
+ - Value: Net assets
+ - Value: "594.16"
+ - Value: "759.56"
+ - Value: -21.8%
+ - RowType: Section
+ Title: Income
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Number of invoices issued
+ - Value: "1"
+ - Value: "0"
+ - Value: 0.0%
+ - RowType: Row
+ Cells:
+ - Value: Average value of invoices
+ - Value: "40.00"
+ - Value: "0.00"
+ - Value: 0.0%
+ - RowType: Section
+ Title: Performance
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Gross profit margin
+ - Value: 100.0%
+ - Value: ""
+ - Value: 0.0%
+ - RowType: Row
+ Cells:
+ - Value: Net profit margin
+ - Value: -413.5%
+ - Value: ""
+ - Value: 0.0%
+ - RowType: Row
+ Cells:
+ - Value: Return on investment (p.a.)
+ - Value: -334.1%
+ - Value: 0.0%
+ - Value: 0.0%
+ - RowType: Section
+ Title: Position
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Average debtors days
+ - Value: "442.50"
+ - Value: "0"
+ - Value: 0.0%
+ - RowType: Row
+ Cells:
+ - Value: Average creditors days
+ - Value: "-6.426484907497565725413826680"
+ - Value: "0"
+ - Value: 0.0%
+ - RowType: Row
+ Cells:
+ - Value: Short term cash forecast
+ - Value: "634.00"
+ - Value: "594.00"
+ - Value: 6.7%
+ - RowType: Row
+ Cells:
+ - Value: Current assets to liabilities
+ - Value: "4.0729764675459012154124644427"
+ - Value: "-62.034024896265560165975103734"
+ - Value: 106.6%
+ - RowType: Row
+ Cells:
+ - Value: Term assets to liabilities
+ - Value: ""
+ - Value: ""
+ - Value: 0.0%
+ /Reports:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.reports.read
+ tags:
+ - Accounting
+ operationId: getReportsList
+ summary: Retrieves a list of the organistaions unique reports that require a uuid to fetch
+ responses:
+ "200":
+ description: Success - return response of type ReportWithRows
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReportWithRows'
+ /Reports/ProfitAndLoss:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.reports.read
+ tags:
+ - Accounting
+ operationId: getReportProfitAndLoss
+ summary: Retrieves report for profit and loss
+ parameters:
+ - $ref: '#/components/parameters/FromDate'
+ - $ref: '#/components/parameters/ToDate'
+ - in: query
+ name: periods
+ description: The number of periods to compare (integer between 1 and 12)
+ example: 3
+ schema:
+ type: integer
+ - in: query
+ name: timeframe
+ description: The period size to compare to (MONTH, QUARTER, YEAR)
+ example: MONTH
+ schema:
+ type: string
+ enum:
+ - MONTH
+ - QUARTER
+ - YEAR
+ - in: query
+ name: trackingCategoryID
+ x-snake: tracking_category_id
+ description: The trackingCategory 1 for the ProfitAndLoss report
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ - in: query
+ name: trackingCategoryID2
+ x-snake: tracking_category_id_2
+ description: The trackingCategory 2 for the ProfitAndLoss report
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ - in: query
+ name: trackingOptionID
+ x-snake: tracking_option_id
+ description: The tracking option 1 for the ProfitAndLoss report
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ - in: query
+ name: trackingOptionID2
+ x-snake: tracking_option_id_2
+ description: The tracking option 2 for the ProfitAndLoss report
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ - in: query
+ name: standardLayout
+ x-snake: standard_layout
+ description: Return the standard layout for the ProfitAndLoss report
+ example: "true"
+ x-example-python: "True"
+ schema:
+ type: boolean
+ - in: query
+ name: paymentsOnly
+ x-snake: payments_only
+ description: Return cash only basis for the ProfitAndLoss report
+ example: "false"
+ x-example-python: "False"
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: Success - return response of type ReportWithRows
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReportWithRows'
+ /Reports/TrialBalance:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.reports.read
+ tags:
+ - Accounting
+ operationId: getReportTrialBalance
+ summary: Retrieves report for trial balance
+ parameters:
+ - in: query
+ name: date
+ description: The date for the Trial Balance report e.g. 2018-03-31
+ example: "2019-10-31"
+ schema:
+ type: string
+ format: date
+ - in: query
+ name: paymentsOnly
+ x-snake: payments_only
+ description: Return cash only basis for the Trial Balance report
+ example: "true"
+ x-example-python: "True"
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: Success - return response of type ReportWithRows
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ReportWithRows'
+ example:
+ Id: 0b3ee35e-b97c-4b3c-b7e2-9a465233e329
+ Status: OK
+ ProviderName: Java Public Example
+ DateTimeUTC: /Date(1556129558740)/
+ Reports:
+ - ReportName: Trial Balance
+ ReportType: TrialBalance
+ ReportTitles:
+ - Trial Balance
+ - Dev Evangelist - Sid Test 1 (US-2016-06)
+ - As at 24 April 2019
+ ReportDate: 24 April 2019
+ UpdatedDateUTC: /Date(1556129558724)/
+ Fields: []
+ Rows:
+ - RowType: Header
+ Cells:
+ - Value: Account
+ - Value: Debit
+ - Value: Credit
+ - Value: YTD Debit
+ - Value: YTD Credit
+ - RowType: Section
+ Title: Revenue
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Big Expense (002)
+ Attributes:
+ - Value: da962997-a8bd-4dff-9616-01cdc199283f
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: da962997-a8bd-4dff-9616-01cdc199283f
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: da962997-a8bd-4dff-9616-01cdc199283f
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: da962997-a8bd-4dff-9616-01cdc199283f
+ Id: account
+ - Value: "80.00"
+ Attributes:
+ - Value: da962997-a8bd-4dff-9616-01cdc199283f
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Sales (400)
+ Attributes:
+ - Value: 02439bca-5fdc-4b62-b281-0bdf9f16fd5b
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 02439bca-5fdc-4b62-b281-0bdf9f16fd5b
+ Id: account
+ - Value: "200.00"
+ Attributes:
+ - Value: 02439bca-5fdc-4b62-b281-0bdf9f16fd5b
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 02439bca-5fdc-4b62-b281-0bdf9f16fd5b
+ Id: account
+ - Value: "1020.22"
+ Attributes:
+ - Value: 02439bca-5fdc-4b62-b281-0bdf9f16fd5b
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Sales-35325 (1302)
+ Attributes:
+ - Value: 3f50db14-1fe6-450b-bfe8-b2d894f18c62
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 3f50db14-1fe6-450b-bfe8-b2d894f18c62
+ Id: account
+ - Value: "1000.00"
+ Attributes:
+ - Value: 3f50db14-1fe6-450b-bfe8-b2d894f18c62
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 3f50db14-1fe6-450b-bfe8-b2d894f18c62
+ Id: account
+ - Value: "1000.00"
+ Attributes:
+ - Value: 3f50db14-1fe6-450b-bfe8-b2d894f18c62
+ Id: account
+ - RowType: Section
+ Title: Expenses
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Foobar14043 (123)
+ Attributes:
+ - Value: d1602f69-f900-4616-8d34-90af393fa368
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: d1602f69-f900-4616-8d34-90af393fa368
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: d1602f69-f900-4616-8d34-90af393fa368
+ Id: account
+ - Value: "40.00"
+ Attributes:
+ - Value: d1602f69-f900-4616-8d34-90af393fa368
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: d1602f69-f900-4616-8d34-90af393fa368
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: MyExp51937 (1231239)
+ Attributes:
+ - Value: 90f10e0a-a043-46fe-b87e-630e9a951dae
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: 90f10e0a-a043-46fe-b87e-630e9a951dae
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 90f10e0a-a043-46fe-b87e-630e9a951dae
+ Id: account
+ - Value: "80.00"
+ Attributes:
+ - Value: 90f10e0a-a043-46fe-b87e-630e9a951dae
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 90f10e0a-a043-46fe-b87e-630e9a951dae
+ Id: account
+ - RowType: Section
+ Title: Assets
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Accounts Receivable (120)
+ Attributes:
+ - Value: 31ae5bb4-611c-4f89-a369-86e4d56e90b6
+ Id: account
+ - Value: "1190.00"
+ Attributes:
+ - Value: 31ae5bb4-611c-4f89-a369-86e4d56e90b6
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 31ae5bb4-611c-4f89-a369-86e4d56e90b6
+ Id: account
+ - Value: "36555.04"
+ Attributes:
+ - Value: 31ae5bb4-611c-4f89-a369-86e4d56e90b6
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 31ae5bb4-611c-4f89-a369-86e4d56e90b6
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Business Wells Fargo (088)
+ Attributes:
+ - Value: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Id: account
+ - Value: "7639.04"
+ Attributes:
+ - Value: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 6f7594f2-f059-4d56-9e67-47ac9733bfe9
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Generic Cash Clearing (8003)
+ Attributes:
+ - Value: f4be973a-25fc-48d0-a7df-7f719f239729
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: f4be973a-25fc-48d0-a7df-7f719f239729
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: f4be973a-25fc-48d0-a7df-7f719f239729
+ Id: account
+ - Value: "1443.00"
+ Attributes:
+ - Value: f4be973a-25fc-48d0-a7df-7f719f239729
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: f4be973a-25fc-48d0-a7df-7f719f239729
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Generic Credit Card Clearing (8002)
+ Attributes:
+ - Value: a10867ac-0bc4-4aa5-af00-b9e5b207c6c3
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: a10867ac-0bc4-4aa5-af00-b9e5b207c6c3
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: a10867ac-0bc4-4aa5-af00-b9e5b207c6c3
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: a10867ac-0bc4-4aa5-af00-b9e5b207c6c3
+ Id: account
+ - Value: "96.49"
+ Attributes:
+ - Value: a10867ac-0bc4-4aa5-af00-b9e5b207c6c3
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Generic Inventory (1400)
+ Attributes:
+ - Value: 7422f1b6-619f-488c-89e1-91bdde20216c
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: 7422f1b6-619f-488c-89e1-91bdde20216c
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 7422f1b6-619f-488c-89e1-91bdde20216c
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 7422f1b6-619f-488c-89e1-91bdde20216c
+ Id: account
+ - Value: "160.00"
+ Attributes:
+ - Value: 7422f1b6-619f-488c-89e1-91bdde20216c
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: My Savings (090)
+ Attributes:
+ - Value: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa
+ Id: account
+ - Value: "219.92"
+ Attributes:
+ - Value: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 7e5e243b-9fcd-4aef-8e3a-c70be1e39bfa
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Payment Wall Clearing Account (8001)
+ Attributes:
+ - Value: bc06840c-12c5-4e22-bb57-fef4d64bac10
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: bc06840c-12c5-4e22-bb57-fef4d64bac10
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: bc06840c-12c5-4e22-bb57-fef4d64bac10
+ Id: account
+ - Value: "1.00"
+ Attributes:
+ - Value: bc06840c-12c5-4e22-bb57-fef4d64bac10
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: bc06840c-12c5-4e22-bb57-fef4d64bac10
+ Id: account
+ - RowType: Section
+ Title: Liabilities
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Accounts Payable (200)
+ Attributes:
+ - Value: e9132ee7-4dcf-4fad-b76c-86e212af645a
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: e9132ee7-4dcf-4fad-b76c-86e212af645a
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: e9132ee7-4dcf-4fad-b76c-86e212af645a
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: e9132ee7-4dcf-4fad-b76c-86e212af645a
+ Id: account
+ - Value: "9223.00"
+ Attributes:
+ - Value: e9132ee7-4dcf-4fad-b76c-86e212af645a
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Deferred Revenue (2300)
+ Attributes:
+ - Value: f22cd74e-f59d-4f38-a08d-07e14df28c24
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: f22cd74e-f59d-4f38-a08d-07e14df28c24
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: f22cd74e-f59d-4f38-a08d-07e14df28c24
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: f22cd74e-f59d-4f38-a08d-07e14df28c24
+ Id: account
+ - Value: "1854.24"
+ Attributes:
+ - Value: f22cd74e-f59d-4f38-a08d-07e14df28c24
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Rounding (260)
+ Attributes:
+ - Value: f0072999-8f7c-4b01-bce9-bd9352f98e02
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: f0072999-8f7c-4b01-bce9-bd9352f98e02
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: f0072999-8f7c-4b01-bce9-bd9352f98e02
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: f0072999-8f7c-4b01-bce9-bd9352f98e02
+ Id: account
+ - Value: "0.01"
+ Attributes:
+ - Value: f0072999-8f7c-4b01-bce9-bd9352f98e02
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Sales Tax (220)
+ Attributes:
+ - Value: af0be362-45fe-4730-a8af-634c2fb93f4d
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: af0be362-45fe-4730-a8af-634c2fb93f4d
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: af0be362-45fe-4730-a8af-634c2fb93f4d
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: af0be362-45fe-4730-a8af-634c2fb93f4d
+ Id: account
+ - Value: "1578.35"
+ Attributes:
+ - Value: af0be362-45fe-4730-a8af-634c2fb93f4d
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Suspense (250)
+ Attributes:
+ - Value: 5ec2f302-cd60-4f8b-a915-9229dd45e6fa
+ Id: account
+ - Value: "10.00"
+ Attributes:
+ - Value: 5ec2f302-cd60-4f8b-a915-9229dd45e6fa
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 5ec2f302-cd60-4f8b-a915-9229dd45e6fa
+ Id: account
+ - Value: "41.00"
+ Attributes:
+ - Value: 5ec2f302-cd60-4f8b-a915-9229dd45e6fa
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 5ec2f302-cd60-4f8b-a915-9229dd45e6fa
+ Id: account
+ - RowType: Row
+ Cells:
+ - Value: Unpaid Expense Claims (210)
+ Attributes:
+ - Value: 38e6967d-4da1-4a93-85f1-ea3c93b61041
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 38e6967d-4da1-4a93-85f1-ea3c93b61041
+ Id: account
+ - Value: "0.00"
+ Attributes:
+ - Value: 38e6967d-4da1-4a93-85f1-ea3c93b61041
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 38e6967d-4da1-4a93-85f1-ea3c93b61041
+ Id: account
+ - Value: "135.00"
+ Attributes:
+ - Value: 38e6967d-4da1-4a93-85f1-ea3c93b61041
+ Id: account
+ - RowType: Section
+ Title: Equity
+ Rows:
+ - RowType: Row
+ Cells:
+ - Value: Retained Earnings (320)
+ Attributes:
+ - Value: 6ef53919-b47d-4341-b11a-735a3f8a6515
+ Id: account
+ - Value: ""
+ Attributes:
+ - Value: 6ef53919-b47d-4341-b11a-735a3f8a6515
+ Id: account
+ - Value: ""
+ Id: fromDate
+ - Value: 12/31/2018
+ Id: toDate
+ - Value: "0.00"
+ Attributes:
+ - Value: 6ef53919-b47d-4341-b11a-735a3f8a6515
+ Id: account
+ - Value: ""
+ Id: fromDate
+ - Value: 12/31/2018
+ Id: toDate
+ - Value: ""
+ Attributes:
+ - Value: 6ef53919-b47d-4341-b11a-735a3f8a6515
+ Id: account
+ - Value: ""
+ Id: fromDate
+ - Value: 12/31/2018
+ Id: toDate
+ - Value: "30871.69"
+ Attributes:
+ - Value: 6ef53919-b47d-4341-b11a-735a3f8a6515
+ Id: account
+ - Value: ""
+ Id: fromDate
+ - Value: 12/31/2018
+ Id: toDate
+ - RowType: Section
+ Title: ""
+ Rows:
+ - RowType: SummaryRow
+ Cells:
+ - Value: Total
+ - Value: "1200.00"
+ - Value: "1200.00"
+ - Value: "46019.00"
+ - Value: "46019.00"
+ /Setup:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ post:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: postSetup
+ summary: Sets the chart of accounts, the conversion date and conversion balances
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ x-example:
+ - account:
+ is_object: true
+ key: account
+ keyPascal: Account
+ - code:
+ key: code
+ keyPascal: Code
+ default: 123
+ object: account
+ - name:
+ key: name
+ keyPascal: Name
+ default: Business supplies
+ object: account
+ - type:
+ is_last: true
+ key: type
+ keyPascal: Type
+ default: EXPENSE
+ nonString: true
+ php: XeroAPI\XeroPHP\Models\Accounting\AccountType::EXPENSE
+ node: AccountType.EXPENSE
+ ruby: XeroRuby::Accounting::AccountType::EXPENSE
+ python: AccountType.EXPENSE
+ java: com.xero.models.accounting.AccountType.EXPENSE
+ csharp: AccountType.EXPENSE
+ object: account
+ - accounts:
+ is_list: true
+ key: accounts
+ keyPascal: Account
+ - add_accounts:
+ is_last: true
+ is_list_add: true
+ key: accounts
+ keyPascal: Accounts
+ object: account
+ - conversionDate:
+ is_object: true
+ key: conversionDate
+ keyPascal: ConversionDate
+ keySnake: conversion_date
+ - month:
+ nonString: true
+ key: month
+ keyPascal: Month
+ default: 10
+ object: conversionDate
+ - year:
+ is_last: true
+ nonString: true
+ key: year
+ keyPascal: Year
+ default: 2020
+ object: conversionDate
+ - conversionBalances:
+ is_list: true
+ key: conversionBalances
+ keyPascal: ConversionBalances
+ keySnake: conversion_balances
+ - Setup:
+ is_object: true
+ key: setup
+ keyPascal: Setup
+ - set_accounts:
+ is_variable: true
+ nonString: true
+ key: accounts
+ keyPascal: Accounts
+ default: accounts
+ object: setup
+ - set_conversionDate:
+ is_variable: true
+ nonString: true
+ key: conversionDate
+ keyPascal: ConversionDate
+ keySnake: conversion_date
+ default: conversionDate
+ python: conversion_date
+ ruby: conversion_date
+ object: setup
+ - set_conversionBalances:
+ is_last: true
+ is_variable: true
+ nonString: true
+ key: conversionBalances
+ keyPascal: ConversionBalances
+ keySnake: conversion_balances
+ default: conversionBalances
+ python: conversion_balances
+ ruby: conversion_balances
+ object: setup
+ responses:
+ "200":
+ description: Success - returns a summary of the chart of accounts updates
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ImportSummaryObject'
+ example:
+ Id: 80dcb65b-4d14-4350-84e6-1438a809244a
+ Status: OK
+ ProviderName: Java Public Example
+ DateTimeUTC: /Date(1604457589645)/
+ ImportSummary:
+ Accounts:
+ Total: 17
+ New: 0
+ Updated: 8
+ Deleted: 0
+ Locked: 0
+ System: 9
+ Errored: 0
+ Present: true
+ NewOrUpdated: 8
+ Organisation:
+ Present: false
+ requestBody:
+ required: true
+ description: Object including an accounts array, a conversion balances array and a conversion date object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Setup'
+ example:
+ ConversionDate: {}
+ ConversionBalances: []
+ Accounts:
+ - Code: "200"
+ Name: Sales
+ Type: SALES
+ ReportingCode: REV.TRA.GOO
+ - Code: "400"
+ Name: Advertising
+ Type: OVERHEADS
+ ReportingCode: EXP
+ - Code: "610"
+ Name: Accounts Receivable
+ Type: CURRENT
+ SystemAccount: DEBTORS
+ ReportingCode: ASS.CUR.REC.TRA
+ - Code: "800"
+ Name: Accounts Payable
+ Type: CURRLIAB
+ SystemAccount: CREDITORS
+ ReportingCode: LIA.CUR.PAY
+ /TaxRates:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getTaxRates
+ summary: Retrieves tax rates
+ parameters:
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="ACTIVE"
+ x-example-csharp: Status==\"ACTIVE\"
+ x-example-java: Status=="' + TaxRate.StatusEnum.ACTIVE + '"
+ x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\TaxRate::STATUS_ACTIVE . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::TaxRate::ACTIVE}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Name ASC
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of type TaxRates array with TaxRates
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaxRates'
+ example:
+ Id: 455d494d-9706-465b-b584-7086ca406b27
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1555086839841)/
+ TaxRates:
+ - Name: 15% GST on Expenses
+ TaxType: INPUT2
+ ReportTaxType: INPUT
+ CanApplyToAssets: true
+ CanApplyToEquity: true
+ CanApplyToExpenses: true
+ CanApplyToLiabilities: true
+ CanApplyToRevenue: false
+ DisplayTaxRate: 15.0000
+ EffectiveRate: 15.0000
+ Status: ACTIVE
+ TaxComponents:
+ - Name: GST
+ Rate: 15.0000
+ IsCompound: false
+ IsNonRecoverable: false
+ - Name: 15% GST on Income
+ TaxType: OUTPUT2
+ ReportTaxType: OUTPUT
+ CanApplyToAssets: true
+ CanApplyToEquity: true
+ CanApplyToExpenses: false
+ CanApplyToLiabilities: true
+ CanApplyToRevenue: true
+ DisplayTaxRate: 15.0000
+ EffectiveRate: 15.0000
+ Status: ACTIVE
+ TaxComponents:
+ - Name: GST
+ Rate: 15.0000
+ IsCompound: false
+ IsNonRecoverable: false
+ - Name: GST on Imports
+ TaxType: GSTONIMPORTS
+ ReportTaxType: GSTONIMPORTS
+ CanApplyToAssets: false
+ CanApplyToEquity: false
+ CanApplyToExpenses: false
+ CanApplyToLiabilities: true
+ CanApplyToRevenue: false
+ DisplayTaxRate: 0.0000
+ EffectiveRate: 0.0000
+ Status: ACTIVE
+ TaxComponents:
+ - Name: GST
+ Rate: 0.0000
+ IsCompound: false
+ IsNonRecoverable: false
+ - Name: No GST
+ TaxType: NONE
+ ReportTaxType: NONE
+ CanApplyToAssets: true
+ CanApplyToEquity: true
+ CanApplyToExpenses: true
+ CanApplyToLiabilities: true
+ CanApplyToRevenue: true
+ DisplayTaxRate: 0.0000
+ EffectiveRate: 0.0000
+ Status: ACTIVE
+ TaxComponents:
+ - Name: GST
+ Rate: 0.0000
+ IsCompound: false
+ IsNonRecoverable: false
+ - Name: Zero Rated
+ TaxType: ZERORATED
+ ReportTaxType: OUTPUT
+ CanApplyToAssets: false
+ CanApplyToEquity: false
+ CanApplyToExpenses: false
+ CanApplyToLiabilities: true
+ CanApplyToRevenue: true
+ DisplayTaxRate: 0.0000
+ EffectiveRate: 0.0000
+ Status: ACTIVE
+ TaxComponents:
+ - Name: GST
+ Rate: 0.0000
+ IsCompound: false
+ IsNonRecoverable: false
+ put:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: createTaxRates
+ summary: Creates one or more tax rates
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ x-hasAccountingValidationError: true
+ x-example:
+ - taxComponent:
+ is_object: true
+ key: taxComponent
+ keyPascal: TaxComponent
+ keySnake: tax_component
+ - name:
+ key: name
+ keyPascal: Name
+ default: State Tax
+ object: taxComponent
+ - rate:
+ is_last: true
+ nonString: true
+ key: rate
+ keyPascal: Rate
+ default: 2.25
+ is_money: true
+ object: taxComponent
+ - taxComponents:
+ is_list: true
+ key: taxComponent
+ keyPascal: TaxComponent
+ csharp: TaxComponent
+ - add_taxComponent:
+ is_last: true
+ is_list_add: true
+ key: taxComponents
+ keyPascal: TaxComponents
+ keySnake: tax_components
+ java: TaxComponents
+ python: tax_component
+ ruby: tax_component
+ csharp: TaxComponent
+ object: taxComponent
+ - taxRate:
+ is_object: true
+ key: taxRate
+ keyPascal: TaxRate
+ keySnake: tax_rate
+ - name:
+ key: name
+ keyPascal: Name
+ default: CA State Tax
+ object: taxRate
+ - set_taxComponents:
+ is_variable: true
+ nonString: true
+ key: taxComponents
+ keyPascal: TaxComponents
+ object: taxRate
+ default: taxComponents
+ - taxRates:
+ is_object: true
+ key: taxRates
+ keyPascal: TaxRates
+ - add_taxRate:
+ is_last: true
+ is_array_add: true
+ key: taxRates
+ keyPascal: TaxRates
+ keySnake: tax_rates
+ java: TaxRates
+ python: tax_rate
+ ruby: tax_rate
+ csharp: TaxRate
+ object: taxRate
+ responses:
+ "200":
+ description: Success - return response of type TaxRates array newly created TaxRate
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaxRates'
+ example:
+ Id: 9d2c5e56-fab4-450b-a5ff-d47409508eab
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1555086839080)/
+ TaxRates:
+ - Name: SDKTax29067
+ TaxType: TAX002
+ ReportTaxType: INPUT
+ CanApplyToAssets: true
+ CanApplyToEquity: true
+ CanApplyToExpenses: true
+ CanApplyToLiabilities: true
+ CanApplyToRevenue: false
+ DisplayTaxRate: 2.2500
+ EffectiveRate: 2.2500
+ Status: ACTIVE
+ TaxComponents:
+ - Name: State Tax
+ Rate: 2.2500
+ IsCompound: false
+ IsNonRecoverable: false
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: TaxRates array with TaxRate object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaxRates'
+ example:
+ TaxRates:
+ - Name: CA State Tax
+ TaxComponents:
+ - Name: State Tax
+ Rate: 2.25
+ post:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: updateTaxRate
+ summary: Updates tax rates
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ x-hasAccountingValidationError: true
+ x-example:
+ - taxComponent:
+ is_object: true
+ key: taxComponent
+ keyPascal: TaxComponent
+ keySnake: tax_component
+ - name:
+ key: name
+ keyPascal: Name
+ default: State Tax
+ object: taxComponent
+ - rate:
+ is_last: true
+ nonString: true
+ key: rate
+ keyPascal: Rate
+ default: 2.25
+ is_money: true
+ object: taxComponent
+ - taxComponents:
+ is_list: true
+ key: taxComponents
+ keyPascal: TaxComponents
+ csharp: TaxComponent
+ - add_taxComponent:
+ is_last: true
+ is_list_add: true
+ key: taxComponents
+ keyPascal: TaxComponents
+ keySnake: tax_components
+ java: TaxComponents
+ python: tax_component
+ ruby: tax_component
+ csharp: TaxComponent
+ object: taxComponent
+ - taxRate:
+ is_object: true
+ key: taxRate
+ keyPascal: TaxRate
+ keySnake: tax_rate
+ - name:
+ key: name
+ keyPascal: Name
+ default: CA State Tax
+ object: taxRate
+ - set_taxComponents:
+ is_variable: true
+ nonString: true
+ key: taxComponents
+ keyPascal: TaxComponents
+ object: taxRate
+ default: taxComponents
+ - taxRates:
+ is_object: true
+ key: taxRates
+ keyPascal: TaxRates
+ - add_taxRate:
+ is_last: true
+ is_array_add: true
+ key: taxRates
+ keyPascal: TaxRates
+ keySnake: tax_rates
+ java: TaxRates
+ python: tax_rate
+ ruby: tax_rate
+ csharp: TaxRate
+ object: taxRate
+ responses:
+ "200":
+ description: Success - return response of type TaxRates array updated TaxRate
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaxRates'
+ example:
+ Id: 12f4c453-2e25-41aa-a52f-6faaf6c05832
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1555086839658)/
+ TaxRates:
+ - Name: SDKTax29067
+ TaxType: TAX002
+ ReportTaxType: INPUT
+ CanApplyToAssets: true
+ CanApplyToEquity: true
+ CanApplyToExpenses: true
+ CanApplyToLiabilities: true
+ CanApplyToRevenue: false
+ DisplayTaxRate: 2.2500
+ EffectiveRate: 2.2500
+ Status: DELETED
+ TaxComponents:
+ - Name: State Tax
+ Rate: 2.2500
+ IsCompound: false
+ IsNonRecoverable: false
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaxRates'
+ example:
+ TaxRates:
+ - Name: State Tax NY
+ TaxComponents:
+ - Name: State Tax
+ Rate: 2.25
+ Status: DELETED
+ ReportTaxType: INPUT
+ /TaxRates/{TaxType}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getTaxRateByTaxType
+ summary: Retrieves a specific tax rate according to given TaxType code
+ parameters:
+ - $ref: '#/components/parameters/TaxType'
+ responses:
+ "200":
+ description: Success - return response of type TaxRates array with one TaxRate
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TaxRates'
+ example:
+ Id: 455d494d-9706-465b-b584-7086ca406b27
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550797359081)/
+ TaxRates:
+ - Name: 15% GST on Expenses
+ TaxType: INPUT2
+ ReportTaxType: INPUT
+ CanApplyToAssets: true
+ CanApplyToEquity: true
+ CanApplyToExpenses: true
+ CanApplyToLiabilities: true
+ CanApplyToRevenue: false
+ DisplayTaxRate: 15.0000
+ EffectiveRate: 15.0000
+ Status: ACTIVE
+ TaxComponents:
+ - Name: GST
+ Rate: 15.0000
+ IsCompound: false
+ IsNonRecoverable: false
+ /TrackingCategories:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getTrackingCategories
+ summary: Retrieves tracking categories and options
+ parameters:
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: Status=="ACTIVE"
+ x-example-csharp: Status==\"ACTIVE\"
+ x-example-java: Status=="' + TrackingCategory.StatusEnum.ACTIVE + '"
+ x-example-php: Status=="' . \XeroAPI\XeroPHP\Models\Accounting\TrackingCategory::STATUS_ACTIVE . '"
+ x-example-ruby: Status==#{XeroRuby::Accounting::TrackingCategory::ACTIVE}
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: Name ASC
+ schema:
+ type: string
+ - in: query
+ name: includeArchived
+ x-snake: include_archived
+ description: e.g. includeArchived=true - Categories and options with a status of ARCHIVED will be included in the response
+ example: true
+ x-example-python: "True"
+ schema:
+ type: boolean
+ responses:
+ "200":
+ description: Success - return response of type TrackingCategories array of TrackingCategory
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TrackingCategories'
+ example:
+ Id: cec55068-8061-48e5-ac83-c77e7c54cf3d
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1555085855047)/
+ TrackingCategories:
+ - Name: BarFoo
+ Status: ACTIVE
+ TrackingCategoryID: 22f10184-0deb-44ae-a312-b1f6ea70e51f
+ Options: []
+ - Name: HelloWorld
+ Status: ACTIVE
+ TrackingCategoryID: 0c9fce3e-a111-4d99-803a-62cf3f40e633
+ Options: []
+ put:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: createTrackingCategory
+ summary: Create tracking categories
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ x-hasAccountingValidationError: true
+ x-example:
+ - trackingCategory:
+ is_object: true
+ key: trackingCategory
+ keyPascal: TrackingCategory
+ - name:
+ is_last: true
+ key: name
+ keyPascal: Name
+ default: Foobar
+ object: trackingCategory
+ responses:
+ "200":
+ description: Success - return response of type TrackingCategories array of newly created TrackingCategory
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TrackingCategories'
+ example:
+ Id: 1a9f8e03-9916-4a42-93a9-e8fa4902d49c
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1555085855988)/
+ TrackingCategories:
+ - Name: FooBar
+ Status: ACTIVE
+ TrackingCategoryID: b1df776b-b093-4730-b6ea-590cca40e723
+ Options: []
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: TrackingCategory object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TrackingCategory'
+ example:
+ name: FooBar
+ /TrackingCategories/{TrackingCategoryID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getTrackingCategory
+ summary: Retrieves specific tracking categories and options using a unique tracking category Id
+ parameters:
+ - $ref: '#/components/parameters/TrackingCategoryID'
+ responses:
+ "200":
+ description: Success - return response of type TrackingCategories array of specified TrackingCategory
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TrackingCategories'
+ example:
+ Id: b75b8862-39c0-45a8-82b8-30ab4831996b
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1555085855442)/
+ TrackingCategories:
+ - Name: Foo41157
+ Status: DELETED
+ TrackingCategoryID: 22f10184-0deb-44ae-a312-b1f6ea70e51f
+ Options: []
+ post:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: updateTrackingCategory
+ summary: Updates a specific tracking category
+ x-hasAccountingValidationError: true
+ x-example:
+ - trackingCategory:
+ is_object: true
+ key: trackingCategory
+ keyPascal: TrackingCategory
+ - name:
+ is_last: true
+ key: name
+ keyPascal: Name
+ default: Foobar
+ object: trackingCategory
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/TrackingCategoryID'
+ responses:
+ "200":
+ description: Success - return response of type TrackingCategories array of updated TrackingCategory
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TrackingCategories'
+ example:
+ Id: 55438774-f87d-4731-b586-799cf0f914ed
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1555085856275)/
+ TrackingCategories:
+ - Name: BarFoo
+ Status: ACTIVE
+ TrackingCategoryID: b1df776b-b093-4730-b6ea-590cca40e723
+ Options: []
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TrackingCategory'
+ example:
+ Name: Avengers
+ delete:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: deleteTrackingCategory
+ summary: Deletes a specific tracking category
+ parameters:
+ - $ref: '#/components/parameters/TrackingCategoryID'
+ responses:
+ "200":
+ description: Success - return response of type TrackingCategories array of deleted TrackingCategory
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TrackingCategories'
+ example:
+ Id: ca7f8145-c8a5-4366-a2fb-784edc0cfbb7
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1555086457922)/
+ TrackingCategories:
+ - Name: Foo46189
+ Status: DELETED
+ TrackingCategoryID: 0390bdfd-94f2-49d6-b7a0-4a38c46ebf03
+ Options: []
+ "400":
+ $ref: '#/components/responses/400Error'
+ /TrackingCategories/{TrackingCategoryID}/Options:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ put:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: createTrackingOptions
+ summary: Creates options for a specific tracking category
+ x-hasAccountingValidationError: true
+ x-example:
+ - trackingOption:
+ is_object: true
+ key: trackingOption
+ keyPascal: TrackingOption
+ - name:
+ is_last: true
+ key: name
+ keyPascal: Name
+ default: Foobar
+ object: trackingOption
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/TrackingCategoryID'
+ responses:
+ "200":
+ description: Success - return response of type TrackingOptions array of options for a specified category
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TrackingOptions'
+ example:
+ Id: 923be702-d124-4f5c-a568-760906538d8e
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1555085857061)/
+ Options:
+ - TrackingOptionID: 34669548-b989-487a-979f-0787d04568a2
+ Name: Bar40423
+ Status: ACTIVE
+ HasValidationErrors: false
+ IsDeleted: false
+ IsArchived: false
+ IsActive: true
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ description: TrackingOption object in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TrackingOption'
+ example:
+ name: ' Bar'
+ /TrackingCategories/{TrackingCategoryID}/Options/{TrackingOptionID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ post:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: updateTrackingOptions
+ summary: Updates a specific option for a specific tracking category
+ x-hasAccountingValidationError: true
+ x-example:
+ - trackingOption:
+ is_object: true
+ key: trackingOption
+ keyPascal: TrackingOption
+ - name:
+ is_last: true
+ key: name
+ keyPascal: Name
+ default: Foobar
+ object: trackingOption
+ parameters:
+ - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/TrackingCategoryID'
+ - $ref: '#/components/parameters/TrackingOptionID'
+ responses:
+ "200":
+ description: Success - return response of type TrackingOptions array of options for a specified category
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TrackingOptions'
+ example:
+ Id: 923be702-d124-4f5c-a568-760906538d8e
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1555085857061)/
+ Options:
+ - TrackingOptionID: 34669548-b989-487a-979f-0787d04568a2
+ Name: Bar40423
+ Status: ACTIVE
+ HasValidationErrors: false
+ IsDeleted: false
+ IsArchived: false
+ IsActive: true
+ "400":
+ $ref: '#/components/responses/400Error'
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TrackingOption'
+ example:
+ name: Vision
+ delete:
+ security:
+ - OAuth2:
+ - accounting.settings
+ tags:
+ - Accounting
+ operationId: deleteTrackingOptions
+ summary: Deletes a specific option for a specific tracking category
+ parameters:
+ - $ref: '#/components/parameters/TrackingCategoryID'
+ - $ref: '#/components/parameters/TrackingOptionID'
+ responses:
+ "200":
+ description: Success - return response of type TrackingOptions array of remaining options for a specified category
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TrackingOptions'
+ example:
+ Id: d985866e-0831-418f-a07c-4d843ff66d25
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1555085857338)/
+ Options:
+ - TrackingOptionID: 34669548-b989-487a-979f-0787d04568a2
+ Name: Bar40423
+ Status: DELETED
+ HasValidationErrors: false
+ IsDeleted: true
+ IsArchived: false
+ IsActive: false
+ "400":
+ $ref: '#/components/responses/400Error'
+ /Users:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getUsers
+ summary: Retrieves users
+ parameters:
+ - $ref: '#/components/parameters/ifModifiedSince'
+ - in: query
+ name: where
+ description: Filter by an any element
+ example: IsSubscriber==true
+ schema:
+ type: string
+ - in: query
+ name: order
+ description: Order by an any element
+ example: LastName ASC
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success - return response of type Users array of all User
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Users'
+ example:
+ Id: 17932a4e-4948-4d50-8672-4ef0e1dd90c5
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553880796393)/
+ Users:
+ - UserID: 3c37ef1d-cd49-4589-9787-3c418ed8b6ac
+ EmailAddress: test@email.com
+ FirstName: Test
+ LastName: Xero
+ UpdatedDateUTC: /Date(1508523261613+0000)/
+ IsSubscriber: false
+ OrganisationRole: FINANCIALADVISER
+ - UserID: d1164823-0ac1-41ad-987b-b4e30fe0b273
+ EmailAddress: api@xero.com
+ FirstName: 'API '
+ LastName: Team
+ UpdatedDateUTC: /Date(1511957179217+0000)/
+ IsSubscriber: true
+ OrganisationRole: FINANCIALADVISER
+ /Users/{UserID}:
+ parameters:
+ - $ref: '#/components/parameters/requiredHeader'
+ get:
+ security:
+ - OAuth2:
+ - accounting.settings
+ - accounting.settings.read
+ tags:
+ - Accounting
+ operationId: getUser
+ summary: Retrieves a specific user
+ parameters:
+ - $ref: '#/components/parameters/UserID'
+ responses:
+ "200":
+ description: Success - return response of type Users array of specified User
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Users'
+ example:
+ Id: 51250ce8-1b35-4ba4-b404-dc94ff75bd87
+ Status: OK
+ ProviderName: Provider Name Example
+ DateTimeUTC: /Date(1553880796732)/
+ Users:
+ - UserID: 3c37ef1d-cd49-4589-9787-3c418ed8b6ac
+ EmailAddress: test@email.com
+ FirstName: Test
+ LastName: Xero
+ UpdatedDateUTC: /Date(1508523261613+0000)/
+ IsSubscriber: false
+ OrganisationRole: FINANCIALADVISER
+components:
+ securitySchemes:
+ OAuth2:
+ type: oauth2
+ description: For more information
+ flows:
+ authorizationCode:
+ authorizationUrl: https://login.xero.com/identity/connect/authorize
+ tokenUrl: https://identity.xero.com/connect/token
+ scopes:
+ email: Grant read-only access to your email
+ openid: Grant read-only access to your open id
+ profile: your profile information
+ accounting.attachments: Grant read-write access to attachments
+ accounting.attachments.read: Grant read-only access to attachments
+ accounting.contacts: Grant read-write access to contacts and contact groups
+ accounting.contacts.read: Grant read-only access to contacts and contact groups
+ accounting.journals.read: Grant read-only access to journals
+ accounting.reports.read: Grant read-only access to accounting reports
+ accounting.reports.tenninetynine.read: Grant read-only access to 1099 reports
+ accounting.settings: Grant read-write access to organisation and account settings
+ accounting.settings.read: Grant read-only access to organisation and account settings
+ accounting.transactions: Grant read-write access to bank transactions, credit notes, invoices, repeating invoices
+ accounting.transactions.read: Grant read-only access to invoices
+ paymentservices: Grant read-write access to payment services
+ requestBodies:
+ historyRecords:
+ required: true
+ description: HistoryRecords containing an array of HistoryRecord objects in body of request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HistoryRecords'
+ example:
+ HistoryRecords:
+ - Details: Hello World
+ parameters:
+ requiredHeader:
+ in: header
+ name: xero-tenant-id
+ x-snake: xero_tenant_id
+ description: Xero identifier for Tenant
+ example: YOUR_XERO_TENANT_ID
+ schema:
+ type: string
+ required: true
+ summarizeErrors:
+ in: query
+ name: summarizeErrors
+ x-snake: summarize_errors
+ description: If false return 200 OK and mix of successfully created objects and any with validation errors
+ example: true
+ x-example-python: "True"
+ schema:
+ type: boolean
+ default: false
+ unitdp:
+ in: query
+ name: unitdp
+ description: e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
+ example: 4
+ schema:
+ type: integer
+ ifModifiedSince:
+ in: header
+ name: If-Modified-Since
+ x-snake: if_modified_since
+ description: Only records created or modified since this timestamp will be returned
+ example: "2020-02-06T12:17:43.202-08:00"
+ schema:
+ type: string
+ format: date-time
+ idempotencyKey:
+ in: header
+ name: Idempotency-Key
+ x-snake: idempotency_key
+ description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
+ example: KEY_VALUE
+ schema:
+ type: string
+ includeOnline:
+ in: query
+ name: IncludeOnline
+ x-snake: include_online
+ description: Allows an attachment to be seen by the end customer within their online invoice
+ example: true
+ x-example-python: "True"
+ schema:
+ type: boolean
+ default: false
+ summaryOnly:
+ in: query
+ name: summaryOnly
+ x-snake: summary_only
+ description: Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
+ example: true
+ x-example-python: "True"
+ schema:
+ type: boolean
+ default: false
+ searchTerm:
+ in: query
+ name: searchTerm
+ x-snake: search_term
+ description: Search parameter that performs a case-insensitive text search across the fields e.g. InvoiceNumber, Reference.
+ example: SearchTerm=REF12
+ x-example-python: "True"
+ schema:
+ type: string
+ FromDate:
+ in: query
+ name: fromDate
+ x-snake: from_date
+ description: filter by the from date of the report e.g. 2021-02-01
+ example: "2019-10-31"
+ schema:
+ type: string
+ format: date
+ ToDate:
+ in: query
+ name: toDate
+ x-snake: to_date
+ description: filter by the to date of the report e.g. 2021-02-28
+ example: "2019-10-31"
+ schema:
+ type: string
+ format: date
+ pageSize:
+ in: query
+ name: pageSize
+ description: Number of records to retrieve per page
+ example: 100
+ schema:
+ type: integer
+ AccountID:
+ required: true
+ in: path
+ name: AccountID
+ x-snake: account_id
+ description: Unique identifier for Account object
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ AllocationID:
+ required: true
+ in: path
+ name: AllocationID
+ x-snake: allocation_id
+ description: Unique identifier for Allocation object
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ AttachmentID:
+ required: true
+ in: path
+ name: AttachmentID
+ x-snake: attachment_id
+ description: Unique identifier for Attachment object
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ ContentType:
+ required: true
+ in: header
+ name: contentType
+ x-snake: content_type
+ description: The mime type of the attachment file you are retrieving i.e image/jpg, application/pdf
+ example: image/jpg
+ schema:
+ type: string
+ FileName:
+ required: true
+ in: path
+ name: FileName
+ x-snake: file_name
+ description: Name of the attachment
+ example: xero-dev.jpg
+ schema:
+ type: string
+ BatchPaymentID:
+ required: true
+ in: path
+ name: BatchPaymentID
+ x-snake: batch_payment_id
+ description: Unique identifier for BatchPayment
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ BankTransactionID:
+ required: true
+ in: path
+ name: BankTransactionID
+ x-snake: bank_transaction_id
+ description: Xero generated unique identifier for a bank transaction
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ BankTransferID:
+ required: true
+ in: path
+ name: BankTransferID
+ x-snake: bank_transfer_id
+ description: Xero generated unique identifier for a bank transfer
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ BrandingThemeID:
+ required: true
+ in: path
+ name: BrandingThemeID
+ x-snake: branding_theme_id
+ description: Unique identifier for a Branding Theme
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ BudgetID:
+ required: true
+ in: path
+ name: BudgetID
+ x-snake: budget_id
+ description: Unique identifier for Budgets
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ ContactID:
+ required: true
+ in: path
+ name: ContactID
+ x-snake: contact_id
+ description: Unique identifier for a Contact
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ ContactGroupID:
+ required: true
+ in: path
+ name: ContactGroupID
+ x-snake: contact_group_id
+ description: Unique identifier for a Contact Group
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ CreditNoteID:
+ required: true
+ in: path
+ name: CreditNoteID
+ x-snake: credit_note_id
+ description: Unique identifier for a Credit Note
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ EmployeeID:
+ required: true
+ in: path
+ name: EmployeeID
+ x-snake: employee_id
+ description: Unique identifier for a Employee
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ ExpenseClaimID:
+ required: true
+ in: path
+ name: ExpenseClaimID
+ x-snake: expense_claim_id
+ description: Unique identifier for a ExpenseClaim
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ InvoiceID:
+ required: true
+ in: path
+ name: InvoiceID
+ x-snake: invoice_id
+ description: Unique identifier for an Invoice
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ ItemID:
+ required: true
+ in: path
+ name: ItemID
+ x-snake: item_id
+ description: Unique identifier for an Item
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ JournalID:
+ required: true
+ in: path
+ name: JournalID
+ x-snake: journal_id
+ description: Unique identifier for a Journal
+ example: 00000000-0000-0000-0000-000000000000
+ 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
+ name: LinkedTransactionID
+ x-snake: linked_transaction_id
+ description: Unique identifier for a LinkedTransaction
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ ManualJournalID:
+ required: true
+ in: path
+ name: ManualJournalID
+ x-snake: manual_journal_id
+ description: Unique identifier for a ManualJournal
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ OrganisationID:
+ required: true
+ in: path
+ name: OrganisationID
+ x-snake: organisation_id
+ description: The unique Xero identifier for an organisation
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ OverpaymentID:
+ required: true
+ in: path
+ name: OverpaymentID
+ x-snake: overpayment_id
+ description: Unique identifier for a Overpayment
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ PaymentID:
+ required: true
+ in: path
+ name: PaymentID
+ x-snake: payment_id
+ description: Unique identifier for a Payment
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ PrepaymentID:
+ required: true
+ in: path
+ name: PrepaymentID
+ x-snake: prepayment_id
+ description: Unique identifier for a PrePayment
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ PurchaseOrderID:
+ required: true
+ in: path
+ name: PurchaseOrderID
+ x-snake: purchase_order_id
+ description: Unique identifier for an Purchase Order
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ QuoteID:
+ required: true
+ in: path
+ name: QuoteID
+ x-snake: quote_id
+ description: Unique identifier for an Quote
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ ReceiptID:
+ required: true
+ in: path
+ name: ReceiptID
+ x-snake: receipt_id
+ description: Unique identifier for a Receipt
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ RepeatingInvoiceID:
+ required: true
+ in: path
+ name: RepeatingInvoiceID
+ x-snake: repeating_invoice_id
+ description: Unique identifier for a Repeating Invoice
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ TrackingCategoryID:
+ required: true
+ in: path
+ name: TrackingCategoryID
+ x-snake: tracking_category_id
+ description: Unique identifier for a TrackingCategory
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ TrackingOptionID:
+ required: true
+ in: path
+ name: TrackingOptionID
+ x-snake: tracking_option_id
+ description: Unique identifier for a Tracking Option
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ UserID:
+ required: true
+ in: path
+ name: UserID
+ x-snake: user_id
+ description: Unique identifier for a User
+ example: 00000000-0000-0000-0000-000000000000
+ schema:
+ type: string
+ format: uuid
+ TaxType:
+ required: true
+ in: path
+ name: TaxType
+ description: A valid TaxType code
+ example: INPUT2
+ schema:
+ type: string
+ responses:
+ 400Error:
+ description: A failed request due to validation error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ HistoryRecordCreated:
+ description: Success - return response of type HistoryRecords array of HistoryRecord objects
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HistoryRecords'
+ example:
+ Id: d7525479-3392-44c0-bb37-ff4a0b5df5bd
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1550899400362)/
+ HistoryRecords:
+ - DateUTCString: 2019-02-23T05:23:20
+ DateUTC: /Date(1550899400362)/
+ Details: Hello World
+ ValidationErrors: []
+ HistoryRetrieved:
+ description: Success - return response of HistoryRecords array of 0 to N HistoryRecord
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HistoryRecords'
+ example:
+ Id: cd54cc7b-b721-4207-b11d-7d13c7902f91
+ Status: OK
+ ProviderName: Xero API Partner
+ DateTimeUTC: /Date(1551311321819)/
+ HistoryRecords:
+ - Changes: Attached a file
+ DateUTCString: 2018-11-08T15:01:21
+ DateUTC: /Date(1541689281470+0000)/
+ User: System Generated
+ Details: Attached the file sample2.jpg through the Xero API using Xero API Partner
+ - Changes: Credit Applied
+ DateUTCString: 2016-10-17T20:46:01
+ DateUTC: /Date(1476737161173+0000)/
+ User: System Generated
+ Details: Bank transfer from Business Wells Fargo to My Savings on November 12, 2016 for 20.00.
+ schemas:
+ AddressForOrganisation:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/types
+ properties:
+ AddressType:
+ description: define the type of address
+ type: string
+ enum:
+ - POBOX
+ - STREET
+ - DELIVERY
+ AddressLine1:
+ description: max length = 500
+ maxLength: 500
+ type: string
+ AddressLine2:
+ description: max length = 500
+ maxLength: 500
+ type: string
+ AddressLine3:
+ description: max length = 500
+ maxLength: 500
+ type: string
+ AddressLine4:
+ description: max length = 500
+ maxLength: 500
+ type: string
+ City:
+ description: max length = 255
+ maxLength: 255
+ type: string
+ Region:
+ description: max length = 255
+ maxLength: 255
+ type: string
+ PostalCode:
+ description: max length = 50
+ maxLength: 50
+ type: string
+ Country:
+ description: max length = 50, [A-Z], [a-z] only
+ maxLength: 50
+ type: string
+ AttentionTo:
+ description: max length = 255
+ maxLength: 255
+ type: string
+ type: object
+ Address:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/types
+ properties:
+ AddressType:
+ description: define the type of address
+ type: string
+ enum:
+ - POBOX
+ - STREET
+ AddressLine1:
+ description: max length = 500
+ maxLength: 500
+ type: string
+ AddressLine2:
+ description: max length = 500
+ maxLength: 500
+ type: string
+ AddressLine3:
+ description: max length = 500
+ maxLength: 500
+ type: string
+ AddressLine4:
+ description: max length = 500
+ maxLength: 500
+ type: string
+ City:
+ description: max length = 255
+ maxLength: 255
+ type: string
+ Region:
+ description: max length = 255
+ maxLength: 255
+ type: string
+ PostalCode:
+ description: max length = 50
+ maxLength: 50
+ type: string
+ Country:
+ description: max length = 50, [A-Z], [a-z] only
+ maxLength: 50
+ type: string
+ AttentionTo:
+ description: max length = 255
+ maxLength: 255
+ type: string
+ type: object
+ Phone:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/types
+ properties:
+ PhoneType:
+ type: string
+ enum:
+ - DEFAULT
+ - DDI
+ - MOBILE
+ - FAX
+ - OFFICE
+ PhoneNumber:
+ description: max length = 50
+ maxLength: 50
+ type: string
+ PhoneAreaCode:
+ description: max length = 10
+ maxLength: 10
+ type: string
+ PhoneCountryCode:
+ description: max length = 20
+ maxLength: 20
+ type: string
+ type: object
+ Accounts:
+ type: object
+ x-objectArrayKey: accounts
+ properties:
+ Accounts:
+ type: array
+ items:
+ $ref: '#/components/schemas/Account'
+ Account:
+ type: object
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/accounts/
+ properties:
+ Code:
+ description: Customer defined alpha numeric account code e.g 200 or SALES (max length = 10)
+ type: string
+ example: 4400
+ Name:
+ description: Name of account (max length = 150)
+ maxLength: 150
+ type: string
+ example: Food Sales
+ AccountID:
+ description: The Xero identifier for an account – specified as a string following the endpoint name e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9
+ type: string
+ format: uuid
+ example: 00000000-0000-0000-0000-000000000000
+ Type:
+ $ref: '#/components/schemas/AccountType'
+ type: string
+ BankAccountNumber:
+ description: For bank accounts only (Account Type BANK)
+ type: string
+ Status:
+ description: Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes
+ type: string
+ enum:
+ - ACTIVE
+ - ARCHIVED
+ - DELETED
+ Description:
+ description: Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000)
+ type: string
+ BankAccountType:
+ description: For bank accounts only. See Bank Account types
+ type: string
+ enum:
+ - BANK
+ - CREDITCARD
+ - PAYPAL
+ - NONE
+ - ""
+ CurrencyCode:
+ $ref: '#/components/schemas/CurrencyCode'
+ type: string
+ TaxType:
+ description: The tax type from taxRates
+ type: string
+ EnablePaymentsToAccount:
+ description: Boolean – describes whether account can have payments applied to it
+ type: boolean
+ ShowInExpenseClaims:
+ description: Boolean – describes whether account code is available for use with expense claims
+ type: boolean
+ Class:
+ description: See Account Class Types
+ readOnly: true
+ type: string
+ enum:
+ - ASSET
+ - EQUITY
+ - EXPENSE
+ - LIABILITY
+ - REVENUE
+ SystemAccount:
+ description: If this is a system account then this element is returned. See System Account types. Note that non-system accounts may have this element set as either “” or null.
+ readOnly: true
+ type: string
+ enum:
+ - DEBTORS
+ - CREDITORS
+ - BANKCURRENCYGAIN
+ - GST
+ - GSTONIMPORTS
+ - HISTORICAL
+ - REALISEDCURRENCYGAIN
+ - RETAINEDEARNINGS
+ - ROUNDING
+ - TRACKINGTRANSFERS
+ - UNPAIDEXPCLM
+ - UNREALISEDCURRENCYGAIN
+ - WAGEPAYABLES
+ - CISASSETS
+ - CISASSET
+ - CISLABOUR
+ - CISLABOUREXPENSE
+ - CISLABOURINCOME
+ - CISLIABILITY
+ - CISMATERIALS
+ - ""
+ ReportingCode:
+ description: Shown if set
+ type: string
+ ReportingCodeName:
+ description: Shown if set
+ readOnly: true
+ type: string
+ HasAttachments:
+ description: boolean to indicate if an account has an attachment (read only)
+ readOnly: true
+ type: boolean
+ default: "false"
+ example: "false"
+ UpdatedDateUTC:
+ description: Last modified date UTC format
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ AddToWatchlist:
+ description: Boolean – describes whether the account is shown in the watchlist widget on the dashboard
+ type: boolean
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ AccountType:
+ description: See Account Types
+ type: string
+ enum:
+ - BANK
+ - CURRENT
+ - CURRLIAB
+ - DEPRECIATN
+ - DIRECTCOSTS
+ - EQUITY
+ - EXPENSE
+ - FIXED
+ - INVENTORY
+ - LIABILITY
+ - NONCURRENT
+ - OTHERINCOME
+ - OVERHEADS
+ - PREPAYMENT
+ - REVENUE
+ - SALES
+ - TERMLIAB
+ - PAYG
+ Attachments:
+ type: object
+ x-objectArrayKey: attachments
+ properties:
+ Attachments:
+ type: array
+ items:
+ $ref: '#/components/schemas/Attachment'
+ Attachment:
+ type: object
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/attachments/
+ properties:
+ AttachmentID:
+ description: Unique ID for the file
+ type: string
+ format: uuid
+ example: 00000000-0000-0000-0000-000000000000
+ FileName:
+ description: Name of the file
+ type: string
+ example: xero-dev.jpg
+ Url:
+ description: URL to the file on xero.com
+ type: string
+ example: https://api.xero.com/api.xro/2.0/Accounts/da962997-a8bd-4dff-9616-01cdc199283f/Attachments/sample5.jpg
+ MimeType:
+ description: Type of file
+ type: string
+ example: image/jpg
+ ContentLength:
+ description: Length of the file content
+ type: integer
+ IncludeOnline:
+ description: Include the file with the online invoice
+ type: boolean
+ BankTransactions:
+ type: object
+ x-objectArrayKey: bank_transactions
+ properties:
+ pagination:
+ $ref: '#/components/schemas/Pagination'
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ BankTransactions:
+ type: array
+ items:
+ $ref: '#/components/schemas/BankTransaction'
+ BankTransaction:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/banktransactions/
+ properties:
+ Type:
+ description: See Bank Transaction Types
+ type: string
+ enum:
+ - RECEIVE
+ - RECEIVE-OVERPAYMENT
+ - RECEIVE-PREPAYMENT
+ - SPEND
+ - SPEND-OVERPAYMENT
+ - SPEND-PREPAYMENT
+ - RECEIVE-TRANSFER
+ - SPEND-TRANSFER
+ Contact:
+ $ref: '#/components/schemas/Contact'
+ LineItems:
+ description: See LineItems
+ type: array
+ items:
+ $ref: '#/components/schemas/LineItem'
+ BankAccount:
+ $ref: '#/components/schemas/Account'
+ IsReconciled:
+ description: Boolean to show if transaction is reconciled
+ type: boolean
+ Date:
+ description: Date of transaction – YYYY-MM-DD
+ type: string
+ x-is-msdate: true
+ Reference:
+ description: Reference for the transaction. Only supported for SPEND and RECEIVE transactions.
+ type: string
+ CurrencyCode:
+ $ref: '#/components/schemas/CurrencyCode'
+ type: string
+ 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
+ format: double
+ x-is-money: true
+ Url:
+ description: URL link to a source document – shown as “Go to App Name”
+ type: string
+ Status:
+ description: See Bank Transaction Status Codes
+ type: string
+ enum:
+ - AUTHORISED
+ - DELETED
+ - VOIDED
+ LineAmountTypes:
+ $ref: '#/components/schemas/LineAmountTypes'
+ type: string
+ SubTotal:
+ description: Total of bank transaction excluding taxes
+ type: number
+ format: double
+ x-is-money: true
+ TotalTax:
+ description: Total tax on bank transaction
+ type: number
+ format: double
+ x-is-money: true
+ Total:
+ description: Total of bank transaction tax inclusive
+ type: number
+ format: double
+ x-is-money: true
+ BankTransactionID:
+ description: Xero generated unique identifier for bank transaction
+ type: string
+ format: uuid
+ example: 00000000-0000-0000-0000-000000000000
+ PrepaymentID:
+ description: Xero generated unique identifier for a Prepayment. This will be returned on BankTransactions with a Type of SPEND-PREPAYMENT or RECEIVE-PREPAYMENT
+ readOnly: true
+ type: string
+ format: uuid
+ example: 00000000-0000-0000-0000-000000000000
+ OverpaymentID:
+ description: Xero generated unique identifier for an Overpayment. This will be returned on BankTransactions with a Type of SPEND-OVERPAYMENT or RECEIVE-OVERPAYMENT
+ readOnly: true
+ type: string
+ format: uuid
+ example: 00000000-0000-0000-0000-000000000000
+ UpdatedDateUTC:
+ description: Last modified date UTC format
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ HasAttachments:
+ description: Boolean to indicate if a bank transaction has an attachment
+ readOnly: true
+ type: boolean
+ default: "false"
+ example: "false"
+ StatusAttributeString:
+ description: A string to indicate if a invoice status
+ type: string
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ required:
+ - Type
+ - LineItems
+ - BankAccount
+ type: object
+ LineAmountTypes:
+ description: Line amounts are exclusive of tax by default if you don’t specify this element. See Line Amount Types
+ type: string
+ enum:
+ - Exclusive
+ - Inclusive
+ - NoTax
+ LineItem:
+ externalDocs:
+ url: https://developer.xero.com/documentation/api/invoices#post
+ properties:
+ LineItemID:
+ description: LineItem unique ID
+ type: string
+ format: uuid
+ example: 00000000-0000-0000-0000-000000000000
+ Description:
+ description: Description needs to be at least 1 char long. A line item with just a description (i.e no unit amount or quantity) can be created by specifying just a element that contains at least 1 character
+ type: string
+ Quantity:
+ description: LineItem Quantity
+ type: number
+ format: double
+ x-is-money: true
+ UnitAmount:
+ description: LineItem Unit Amount
+ type: number
+ format: double
+ x-is-money: true
+ ItemCode:
+ description: See Items
+ type: string
+ AccountCode:
+ description: See Accounts
+ type: string
+ AccountID:
+ description: The associated account ID related to this line item
+ type: string
+ format: uuid
+ example: 00000000-0000-0000-0000-000000000000
+ TaxType:
+ description: The tax type from TaxRates
+ type: string
+ 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 is not correct.
+ type: number
+ format: double
+ x-is-money: true
+ Item:
+ $ref: '#/components/schemas/LineItemItem'
+ LineAmount:
+ description: If you wish to omit either 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 either a DiscountRate or DiscountAmount has been used i.e. LineAmount = Quantity * Unit Amount * ((100 - DiscountRate)/100) or LineAmount = (Quantity * UnitAmount) - DiscountAmount
+ type: number
+ format: double
+ x-is-money: true
+ Tracking:
+ description: Optional Tracking Category – see Tracking. Any LineItem can have a maximum of 2 elements.
+ type: array
+ items:
+ $ref: '#/components/schemas/LineItemTracking'
+ DiscountRate:
+ description: Percentage discount being applied to a line item (only supported on ACCREC invoices – ACC PAY invoices and credit notes in Xero do not support discounts
+ type: number
+ format: double
+ x-is-money: true
+ DiscountAmount:
+ description: Discount amount being applied to a line item. Only supported on ACCREC invoices and quotes. ACCPAY invoices and credit notes in Xero do not support discounts.
+ type: number
+ format: double
+ x-is-money: true
+ RepeatingInvoiceID:
+ description: The Xero identifier for a Repeating Invoice
+ example: 00000000-0000-0000-0000-000000000000
+ type: string
+ format: uuid
+ Taxability:
+ description: The type of taxability
+ type: string
+ enum:
+ - TAXABLE
+ - NON_TAXABLE
+ - EXEMPT
+ - PART_TAXABLE
+ - NOT_APPLICABLE
+ SalesTaxCodeId:
+ description: The ID of the sales tax code
+ type: number
+ TaxBreakdown:
+ description: An array of tax components defined for this line item
+ type: array
+ items:
+ $ref: '#/components/schemas/TaxBreakdownComponent'
+ type: object
+ LineItemItem:
+ properties:
+ Code:
+ description: User defined item code (max length = 30)
+ maxLength: 30
+ type: string
+ Name:
+ description: The name of the item (max length = 50)
+ maxLength: 50
+ type: string
+ ItemID:
+ description: The Xero identifier for an Item
+ type: string
+ format: uuid
+ LineItemTracking:
+ externalDocs:
+ url: https://developer.xero.com/documentation/api/invoices#post
+ properties:
+ TrackingCategoryID:
+ description: The Xero identifier for a tracking category
+ type: string
+ format: uuid
+ example: 00000000-0000-0000-0000-000000000000
+ TrackingOptionID:
+ description: The Xero identifier for a tracking category option
+ type: string
+ format: uuid
+ example: 00000000-0000-0000-0000-000000000000
+ Name:
+ description: The name of the tracking category
+ maxLength: 100
+ type: string
+ example: Region
+ Option:
+ description: See Tracking Options
+ type: string
+ example: North
+ type: object
+ BankTransfers:
+ type: object
+ x-objectArrayKey: bank_transfers
+ properties:
+ BankTransfers:
+ type: array
+ items:
+ $ref: '#/components/schemas/BankTransfer'
+ BankTransfer:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/bank-transfers/
+ properties:
+ FromBankAccount:
+ $ref: '#/components/schemas/Account'
+ ToBankAccount:
+ $ref: '#/components/schemas/Account'
+ Amount:
+ description: amount of the transaction
+ type: number
+ format: double
+ x-is-money: true
+ Date:
+ description: The date of the Transfer YYYY-MM-DD
+ type: string
+ x-is-msdate: true
+ BankTransferID:
+ description: The identifier of the Bank Transfer
+ readOnly: true
+ type: string
+ format: uuid
+ CurrencyRate:
+ description: The currency rate
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ FromBankTransactionID:
+ description: The Bank Transaction ID for the source account
+ readOnly: true
+ type: string
+ format: uuid
+ ToBankTransactionID:
+ description: The Bank Transaction ID for the destination account
+ readOnly: true
+ type: string
+ format: uuid
+ FromIsReconciled:
+ description: The Bank Transaction boolean to show if it is reconciled for the source account
+ type: boolean
+ default: "false"
+ example: "false"
+ ToIsReconciled:
+ description: The Bank Transaction boolean to show if it is reconciled for the destination account
+ type: boolean
+ default: "false"
+ example: "false"
+ Reference:
+ description: Reference for the transactions.
+ type: string
+ HasAttachments:
+ description: Boolean to indicate if a Bank Transfer has an attachment
+ readOnly: true
+ type: boolean
+ default: "false"
+ example: "false"
+ CreatedDateUTC:
+ description: UTC timestamp of creation date of bank transfer
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ required:
+ - FromBankAccount
+ - ToBankAccount
+ - Amount
+ type: object
+ BatchPayments:
+ type: object
+ x-objectArrayKey: batch_payments
+ properties:
+ BatchPayments:
+ type: array
+ items:
+ $ref: '#/components/schemas/BatchPayment'
+ BatchPayment:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/BatchPayments/
+ properties:
+ Account:
+ $ref: '#/components/schemas/Account'
+ Reference:
+ description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
+ type: string
+ maxLength: 255
+ Particulars:
+ description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
+ type: string
+ maxLength: 12
+ Code:
+ description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
+ type: string
+ maxLength: 12
+ Details:
+ description: (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18
+ type: string
+ Narrative:
+ description: (UK Only) Only shows on the statement line in Xero. Max length =18
+ type: string
+ maxLength: 18
+ BatchPaymentID:
+ description: The Xero generated unique identifier for the bank transaction (read-only)
+ readOnly: true
+ type: string
+ format: uuid
+ DateString:
+ description: Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
+ type: string
+ Date:
+ description: Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
+ type: string
+ x-is-msdate: true
+ 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
+ format: double
+ x-is-money: true
+ Payments:
+ description: An array of payments
+ type: array
+ items:
+ $ref: '#/components/schemas/Payment'
+ Type:
+ description: PAYBATCH for bill payments or RECBATCH for sales invoice payments (read-only)
+ readOnly: true
+ type: string
+ enum:
+ - PAYBATCH
+ - RECBATCH
+ Status:
+ description: AUTHORISED or DELETED (read-only). New batch payments will have a status of AUTHORISED. It is not possible to delete batch payments via the API.
+ readOnly: true
+ type: string
+ enum:
+ - AUTHORISED
+ - DELETED
+ TotalAmount:
+ description: The total of the payments that make up the batch (read-only)
+ type: number
+ format: double
+ x-is-money: true
+ readOnly: true
+ UpdatedDateUTC:
+ description: UTC timestamp of last update to the payment
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ IsReconciled:
+ description: Booelan that tells you if the batch payment has been reconciled (read-only)
+ readOnly: true
+ type: boolean
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ type: object
+ BatchPaymentDetails:
+ description: Bank details for use on a batch payment stored with each contact
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/Contact/
+ properties:
+ BankAccountNumber:
+ description: Bank account number for use with Batch Payments
+ type: string
+ example: 123-456-1111111
+ BankAccountName:
+ description: Name of bank for use with Batch Payments
+ type: string
+ example: ACME Bank
+ Details:
+ description: (Non-NZ Only) These details are sent to the org’s bank as a reference for the batch payment transaction. They will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement imported into Xero. Maximum field length = 18
+ type: string
+ example: Hello World
+ Code:
+ description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
+ type: string
+ maxLength: 12
+ example: ABC
+ Reference:
+ description: (NZ Only) Optional references for the batch payment transaction. It will also show with the batch payment transaction in the bank reconciliation Find & Match screen. Depending on your individual bank, the detail may also show on the bank statement you import into Xero.
+ type: string
+ maxLength: 12
+ example: Foobar
+ BatchPaymentDelete:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/accounting/batchpayments
+ properties:
+ BatchPaymentID:
+ description: The Xero generated unique identifier for the bank transaction (read-only)
+ type: string
+ format: uuid
+ Status:
+ description: The status of the batch payment.
+ type: string
+ default: DELETED
+ required:
+ - Status
+ - BatchPaymentID
+ type: object
+ BatchPaymentDeleteByUrlParam:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/accounting/batchpayments
+ properties:
+ Status:
+ description: The status of the batch payment.
+ type: string
+ default: DELETED
+ required:
+ - Status
+ type: object
+ BrandingThemes:
+ type: object
+ x-objectArrayKey: branding_themes
+ properties:
+ BrandingThemes:
+ type: array
+ items:
+ $ref: '#/components/schemas/BrandingTheme'
+ BrandingTheme:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/branding-themes/
+ properties:
+ BrandingThemeID:
+ description: Xero identifier
+ type: string
+ format: uuid
+ Name:
+ description: Name of branding theme
+ type: string
+ LogoUrl:
+ description: The location of the image file used as the logo on this branding theme
+ type: string
+ Type:
+ description: Always INVOICE
+ type: string
+ enum:
+ - INVOICE
+ SortOrder:
+ description: Integer – ranked order of branding theme. The default branding theme has a value of 0
+ type: integer
+ CreatedDateUTC:
+ description: UTC timestamp of creation date of branding theme
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ type: object
+ PaymentServices:
+ type: object
+ x-objectArrayKey: payment_services
+ properties:
+ PaymentServices:
+ type: array
+ items:
+ $ref: '#/components/schemas/PaymentService'
+ PaymentService:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/branding-themes/
+ properties:
+ PaymentServiceID:
+ description: Xero identifier
+ type: string
+ format: uuid
+ PaymentServiceName:
+ description: Name of payment service
+ type: string
+ PaymentServiceUrl:
+ description: The custom payment URL
+ type: string
+ PayNowText:
+ description: The text displayed on the Pay Now button in Xero Online Invoicing. If this is not set it will default to Pay by credit card
+ type: string
+ PaymentServiceType:
+ description: This will always be CUSTOM for payment services created via the API.
+ type: string
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Contacts:
+ type: object
+ x-objectArrayKey: contacts
+ properties:
+ pagination:
+ $ref: '#/components/schemas/Pagination'
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Contacts:
+ type: array
+ items:
+ $ref: '#/components/schemas/Contact'
+ Contact:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/contacts/
+ properties:
+ ContactID:
+ description: Xero identifier
+ type: string
+ format: uuid
+ MergedToContactID:
+ description: ID for the destination of a merged contact. Only returned when using paging or when fetching a contact by ContactId or ContactNumber.
+ type: string
+ format: uuid
+ ContactNumber:
+ description: This can be updated via the API only i.e. This field is read only on the Xero contact screen, used to identify contacts in external systems (max length = 50). If the Contact Number is used, this is displayed as Contact Code in the Contacts UI in Xero.
+ maxLength: 50
+ type: string
+ AccountNumber:
+ description: A user defined account number. This can be updated via the API and the Xero UI (max length = 50)
+ maxLength: 50
+ type: string
+ ContactStatus:
+ description: Current status of a contact – see contact status types
+ type: string
+ enum:
+ - ACTIVE
+ - ARCHIVED
+ - GDPRREQUEST
+ Name:
+ description: Full name of contact/organisation (max length = 255)
+ maxLength: 255
+ type: string
+ FirstName:
+ description: First name of contact person (max length = 255)
+ maxLength: 255
+ type: string
+ LastName:
+ description: Last name of contact person (max length = 255)
+ maxLength: 255
+ type: string
+ CompanyNumber:
+ description: Company registration number (max length = 50)
+ maxLength: 50
+ type: string
+ EmailAddress:
+ description: Email address of contact person (umlauts not supported) (max length = 255)
+ maxLength: 255
+ type: string
+ ContactPersons:
+ description: See contact persons
+ type: array
+ items:
+ $ref: '#/components/schemas/ContactPerson'
+ BankAccountDetails:
+ description: Bank account number of contact
+ type: string
+ TaxNumber:
+ description: Tax number of contact – this is also known as the ABN (Australia), GST Number (New Zealand), VAT Number (UK) or Tax ID Number (US and global) in the Xero UI depending on which regionalized version of Xero you are using (max length = 50)
+ maxLength: 50
+ type: string
+ AccountsReceivableTaxType:
+ description: The tax type from TaxRates
+ type: string
+ AccountsPayableTaxType:
+ description: The tax type from TaxRates
+ type: string
+ Addresses:
+ description: Store certain address types for a contact – see address types
+ type: array
+ items:
+ $ref: '#/components/schemas/Address'
+ Phones:
+ description: Store certain phone types for a contact – see phone types
+ type: array
+ items:
+ $ref: '#/components/schemas/Phone'
+ IsSupplier:
+ description: true or false – Boolean that describes if a contact that has any AP invoices entered against them. Cannot be set via PUT or POST – it is automatically set when an accounts payable invoice is generated against this contact.
+ type: boolean
+ IsCustomer:
+ description: true or false – Boolean that describes if a contact has any AR invoices entered against them. Cannot be set via PUT or POST – it is automatically set when an accounts receivable invoice is generated against this contact.
+ type: boolean
+ SalesDefaultLineAmountType:
+ description: The default sales line amount type for a contact. Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber.
+ type: string
+ enum:
+ - INCLUSIVE
+ - EXCLUSIVE
+ - NONE
+ PurchasesDefaultLineAmountType:
+ description: The default purchases line amount type for a contact Only available when summaryOnly parameter or paging is used, or when fetch by ContactId or ContactNumber.
+ type: string
+ enum:
+ - INCLUSIVE
+ - EXCLUSIVE
+ - NONE
+ DefaultCurrency:
+ $ref: '#/components/schemas/CurrencyCode'
+ type: string
+ XeroNetworkKey:
+ description: Store XeroNetworkKey for contacts.
+ type: string
+ SalesDefaultAccountCode:
+ description: The default sales account code for contacts
+ type: string
+ PurchasesDefaultAccountCode:
+ description: The default purchases account code for contacts
+ type: string
+ SalesTrackingCategories:
+ description: The default sales tracking categories for contacts
+ type: array
+ items:
+ $ref: '#/components/schemas/SalesTrackingCategory'
+ PurchasesTrackingCategories:
+ description: The default purchases tracking categories for contacts
+ type: array
+ items:
+ $ref: '#/components/schemas/SalesTrackingCategory'
+ TrackingCategoryName:
+ description: The name of the Tracking Category assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories
+ type: string
+ TrackingCategoryOption:
+ description: The name of the Tracking Option assigned to the contact under SalesTrackingCategories and PurchasesTrackingCategories
+ type: string
+ PaymentTerms:
+ $ref: '#/components/schemas/PaymentTerm'
+ UpdatedDateUTC:
+ description: UTC timestamp of last update to contact
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ ContactGroups:
+ description: Displays which contact groups a contact is included in
+ type: array
+ items:
+ $ref: '#/components/schemas/ContactGroup'
+ Website:
+ description: Website address for contact (read only)
+ readOnly: true
+ type: string
+ BrandingTheme:
+ $ref: '#/components/schemas/BrandingTheme'
+ BatchPayments:
+ $ref: '#/components/schemas/BatchPaymentDetails'
+ Discount:
+ description: The default discount rate for the contact (read only)
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ Balances:
+ $ref: '#/components/schemas/Balances'
+ Attachments:
+ description: Displays array of attachments from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/Attachment'
+ HasAttachments:
+ description: A boolean to indicate if a contact has an attachment
+ type: boolean
+ default: "false"
+ example: "false"
+ ValidationErrors:
+ description: Displays validation errors returned from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ HasValidationErrors:
+ description: A boolean to indicate if a contact has an validation errors
+ type: boolean
+ default: "false"
+ example: "false"
+ StatusAttributeString:
+ description: Status of object
+ type: string
+ type: object
+ Budgets:
+ type: object
+ x-objectArrayKey: budgets
+ properties:
+ Budgets:
+ type: array
+ items:
+ $ref: '#/components/schemas/Budget'
+ Budget:
+ type: object
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/budgets/
+ properties:
+ BudgetID:
+ description: Xero identifier
+ type: string
+ format: uuid
+ Type:
+ description: Type of Budget. OVERALL or TRACKING
+ type: string
+ enum:
+ - OVERALL
+ - TRACKING
+ Description:
+ description: The Budget description
+ maxLength: 255
+ type: string
+ UpdatedDateUTC:
+ description: UTC timestamp of last update to budget
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ BudgetLines:
+ type: array
+ items:
+ $ref: '#/components/schemas/BudgetLine'
+ Tracking:
+ type: array
+ items:
+ $ref: '#/components/schemas/TrackingCategory'
+ BudgetLine:
+ type: object
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/budgets/
+ properties:
+ AccountID:
+ description: See Accounts
+ type: string
+ format: uuid
+ AccountCode:
+ description: See Accounts
+ type: string
+ example: 090
+ BudgetBalances:
+ type: array
+ items:
+ $ref: '#/components/schemas/BudgetBalance'
+ BudgetBalance:
+ type: object
+ properties:
+ Period:
+ description: Period the amount applies to (e.g. “2019-08”)
+ type: string
+ x-is-msdate: true
+ Amount:
+ description: LineItem Quantity
+ type: number
+ format: double
+ x-is-money: true
+ UnitAmount:
+ description: Budgeted amount
+ type: number
+ format: double
+ x-is-money: true
+ Notes:
+ description: Any footnotes associated with this balance
+ maxLength: 255
+ type: string
+ Balances:
+ type: object
+ description: The raw AccountsReceivable(sales invoices) and AccountsPayable(bills) outstanding and overdue amounts, not converted to base currency (read only)
+ properties:
+ AccountsReceivable:
+ $ref: '#/components/schemas/AccountsReceivable'
+ AccountsPayable:
+ $ref: '#/components/schemas/AccountsPayable'
+ AccountsReceivable:
+ type: object
+ properties:
+ Outstanding:
+ type: number
+ format: double
+ x-is-money: true
+ Overdue:
+ type: number
+ format: double
+ x-is-money: true
+ AccountsPayable:
+ type: object
+ properties:
+ Outstanding:
+ type: number
+ format: double
+ x-is-money: true
+ Overdue:
+ type: number
+ format: double
+ x-is-money: true
+ CISSettings:
+ type: object
+ x-objectArrayKey: cis_settings
+ properties:
+ CISSettings:
+ type: array
+ items:
+ $ref: '#/components/schemas/CISSetting'
+ CISSetting:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/contacts/
+ properties:
+ CISEnabled:
+ description: Boolean that describes if the contact is a CIS Subcontractor
+ type: boolean
+ 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
+ format: double
+ readOnly: true
+ x-is-money: true
+ CISOrgSettings:
+ type: object
+ x-objectArrayKey: cis_settings
+ properties:
+ CISSettings:
+ type: array
+ items:
+ $ref: '#/components/schemas/CISOrgSetting'
+ CISOrgSetting:
+ externalDocs:
+ url: https://developer.xero.com/documentation/api/organisation
+ properties:
+ CISContractorEnabled:
+ description: true or false - Boolean that describes if the organisation is a CIS Contractor
+ type: boolean
+ CISSubContractorEnabled:
+ description: true or false - Boolean that describes if the organisation is a CIS SubContractor
+ type: boolean
+ Rate:
+ description: CIS Deduction rate for the organisation
+ type: number
+ format: double
+ readOnly: true
+ x-is-money: true
+ ContactPerson:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/contacts/
+ properties:
+ FirstName:
+ description: First name of person
+ type: string
+ LastName:
+ description: Last name of person
+ type: string
+ EmailAddress:
+ description: Email address of person
+ type: string
+ IncludeInEmails:
+ description: boolean to indicate whether contact should be included on emails with invoices etc.
+ type: boolean
+ type: object
+ ContactGroups:
+ type: object
+ x-objectArrayKey: contact_groups
+ properties:
+ ContactGroups:
+ type: array
+ items:
+ $ref: '#/components/schemas/ContactGroup'
+ ContactGroup:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/contactgroups/
+ properties:
+ Name:
+ description: The Name of the contact group. Required when creating a new contact group
+ type: string
+ Status:
+ description: The Status of a contact group. To delete a contact group update the status to DELETED. Only contact groups with a status of ACTIVE are returned on GETs.
+ type: string
+ enum:
+ - ACTIVE
+ - DELETED
+ ContactGroupID:
+ description: The Xero identifier for an contact group – specified as a string following the endpoint name. e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9
+ type: string
+ format: uuid
+ Contacts:
+ description: The ContactID and Name of Contacts in a contact group. Returned on GETs when the ContactGroupID is supplied in the URL.
+ type: array
+ items:
+ $ref: '#/components/schemas/Contact'
+ type: object
+ RequestEmpty:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/invoice/
+ properties:
+ Status:
+ description: Need at least one field to create an empty JSON payload
+ type: string
+ type: object
+ CreditNotes:
+ type: object
+ x-objectArrayKey: credit_notes
+ properties:
+ pagination:
+ $ref: '#/components/schemas/Pagination'
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ CreditNotes:
+ type: array
+ items:
+ $ref: '#/components/schemas/CreditNote'
+ CreditNote:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/credit-notes/
+ properties:
+ Type:
+ description: See Credit Note Types
+ type: string
+ enum:
+ - ACCPAYCREDIT
+ - ACCRECCREDIT
+ Contact:
+ $ref: '#/components/schemas/Contact'
+ Date:
+ description: The date the credit note is issued YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation
+ type: string
+ x-is-msdate: true
+ DueDate:
+ description: Date invoice is due – YYYY-MM-DD
+ type: string
+ x-is-msdate: true
+ Status:
+ description: See Credit Note Status Codes
+ type: string
+ enum:
+ - DRAFT
+ - SUBMITTED
+ - DELETED
+ - AUTHORISED
+ - PAID
+ - VOIDED
+ LineAmountTypes:
+ $ref: '#/components/schemas/LineAmountTypes'
+ type: string
+ LineItems:
+ description: See Invoice Line Items
+ type: array
+ items:
+ $ref: '#/components/schemas/LineItem'
+ SubTotal:
+ description: The subtotal of the credit note excluding taxes
+ type: number
+ format: double
+ x-is-money: true
+ TotalTax:
+ description: The total tax on the credit note
+ type: number
+ format: double
+ x-is-money: true
+ Total:
+ description: The total of the Credit Note(subtotal + total tax)
+ type: number
+ format: double
+ x-is-money: true
+ CISDeduction:
+ description: CIS deduction for UK contractors
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ CISRate:
+ description: CIS Deduction rate for the organisation
+ type: number
+ format: double
+ readOnly: true
+ x-is-money: true
+ UpdatedDateUTC:
+ description: UTC timestamp of last update to the credit note
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ CurrencyCode:
+ description: The specified currency code
+ $ref: '#/components/schemas/CurrencyCode'
+ type: string
+ FullyPaidOnDate:
+ description: Date when credit note was fully paid(UTC format)
+ type: string
+ x-is-msdate: true
+ CreditNoteID:
+ description: Xero generated unique identifier
+ type: string
+ format: uuid
+ CreditNoteNumber:
+ description: ACCRECCREDIT – Unique alpha numeric code identifying credit note (when missing will auto-generate from your Organisation Invoice Settings)
+ type: string
+ Reference:
+ description: ACCRECCREDIT only – additional reference number
+ type: string
+ SentToContact:
+ description: Boolean to set whether the credit note in the Xero app should be marked as “sent”. This can be set only on credit notes that have been approved
+ readOnly: true
+ type: boolean
+ CurrencyRate:
+ description: The currency rate for a multicurrency invoice. If no rate is specified, the XE.com day rate is used
+ type: number
+ format: double
+ x-is-money: true
+ RemainingCredit:
+ description: The remaining credit balance on the Credit Note
+ type: number
+ format: double
+ x-is-money: true
+ Allocations:
+ description: See Allocations
+ type: array
+ items:
+ $ref: '#/components/schemas/Allocation'
+ AppliedAmount:
+ description: The amount of applied to an invoice
+ type: number
+ format: double
+ example: 2.00
+ x-is-money: true
+ Payments:
+ description: See Payments
+ type: array
+ items:
+ $ref: '#/components/schemas/Payment'
+ BrandingThemeID:
+ description: See BrandingThemes
+ type: string
+ format: uuid
+ StatusAttributeString:
+ description: A string to indicate if a invoice status
+ type: string
+ HasAttachments:
+ description: boolean to indicate if a credit note has an attachment
+ type: boolean
+ default: "false"
+ example: "false"
+ HasErrors:
+ description: A boolean to indicate if a credit note has an validation errors
+ type: boolean
+ default: "false"
+ example: "false"
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ InvoiceAddresses:
+ description: An array of addresses used to auto calculate sales tax
+ type: array
+ items:
+ $ref: '#/components/schemas/InvoiceAddress'
+ type: object
+ Allocations:
+ type: object
+ x-objectArrayKey: allocations
+ properties:
+ Allocations:
+ type: array
+ items:
+ $ref: '#/components/schemas/Allocation'
+ Allocation:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/prepayments/
+ properties:
+ AllocationID:
+ description: Xero generated unique identifier
+ type: string
+ format: uuid
+ Invoice:
+ $ref: '#/components/schemas/Invoice'
+ Overpayment:
+ $ref: '#/components/schemas/Overpayment'
+ Prepayment:
+ $ref: '#/components/schemas/Prepayment'
+ CreditNote:
+ $ref: '#/components/schemas/CreditNote'
+ Amount:
+ description: the amount being applied to the invoice
+ type: number
+ format: double
+ x-is-money: true
+ Date:
+ description: the date the allocation is applied YYYY-MM-DD.
+ type: string
+ x-is-msdate: true
+ IsDeleted:
+ description: A flag that returns true when the allocation is succesfully deleted
+ type: boolean
+ readOnly: true
+ StatusAttributeString:
+ description: A string to indicate if a invoice status
+ type: string
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ required:
+ - Amount
+ - Invoice
+ - Date
+ type: object
+ Currencies:
+ type: object
+ x-objectArrayKey: currencies
+ properties:
+ Currencies:
+ type: array
+ items:
+ $ref: '#/components/schemas/Currency'
+ Currency:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/currencies/
+ properties:
+ Code:
+ $ref: '#/components/schemas/CurrencyCode'
+ type: string
+ Description:
+ description: Name of Currency
+ type: string
+ type: object
+ CurrencyCode:
+ description: 3 letter alpha code for the currency – see list of currency codes
+ type: string
+ x-enum-varnames:
+ - AED
+ - AFN
+ - ALL
+ - AMD
+ - ANG
+ - AOA
+ - ARS
+ - AUD
+ - AWG
+ - AZN
+ - BAM
+ - BBD
+ - BDT
+ - BGN
+ - BHD
+ - BIF
+ - BMD
+ - BND
+ - BOB
+ - BRL
+ - BSD
+ - BTN
+ - BWP
+ - BYN
+ - BYR
+ - BZD
+ - CAD
+ - CDF
+ - CHF
+ - CLF
+ - CLP
+ - CNY
+ - COP
+ - CRC
+ - CUC
+ - CUP
+ - CVE
+ - CZK
+ - DJF
+ - DKK
+ - DOP
+ - DZD
+ - EEK
+ - EGP
+ - ERN
+ - ETB
+ - EUR
+ - FJD
+ - FKP
+ - GBP
+ - GEL
+ - GHS
+ - GIP
+ - GMD
+ - GNF
+ - GTQ
+ - GYD
+ - HKD
+ - HNL
+ - HRK
+ - HTG
+ - HUF
+ - IDR
+ - ILS
+ - INR
+ - IQD
+ - IRR
+ - ISK
+ - JMD
+ - JOD
+ - JPY
+ - KES
+ - KGS
+ - KHR
+ - KMF
+ - KPW
+ - KRW
+ - KWD
+ - KYD
+ - KZT
+ - LAK
+ - LBP
+ - LKR
+ - LRD
+ - LSL
+ - LTL
+ - LVL
+ - LYD
+ - MAD
+ - MDL
+ - MGA
+ - MKD
+ - MMK
+ - MNT
+ - MOP
+ - MRO
+ - MRU
+ - MUR
+ - MVR
+ - MWK
+ - MXN
+ - MXV
+ - MYR
+ - MZN
+ - NAD
+ - NGN
+ - NIO
+ - NOK
+ - NPR
+ - NZD
+ - OMR
+ - PAB
+ - PEN
+ - PGK
+ - PHP
+ - PKR
+ - PLN
+ - PYG
+ - QAR
+ - RON
+ - RSD
+ - RUB
+ - RWF
+ - SAR
+ - SBD
+ - SCR
+ - SDG
+ - SEK
+ - SGD
+ - SHP
+ - SKK
+ - SLE
+ - SLL
+ - SOS
+ - SRD
+ - STN
+ - STD
+ - SVC
+ - SYP
+ - SZL
+ - THB
+ - TJS
+ - TMT
+ - TND
+ - TOP
+ - TRY_LIRA
+ - TTD
+ - TWD
+ - TZS
+ - UAH
+ - UGX
+ - USD
+ - UYU
+ - UZS
+ - VEF
+ - VES
+ - VND
+ - VUV
+ - WST
+ - XAF
+ - XCD
+ - XOF
+ - XPF
+ - YER
+ - ZAR
+ - ZMW
+ - ZMK
+ - ZWD
+ - EMPTY_CURRENCY
+ enum:
+ - AED
+ - AFN
+ - ALL
+ - AMD
+ - ANG
+ - AOA
+ - ARS
+ - AUD
+ - AWG
+ - AZN
+ - BAM
+ - BBD
+ - BDT
+ - BGN
+ - BHD
+ - BIF
+ - BMD
+ - BND
+ - BOB
+ - BRL
+ - BSD
+ - BTN
+ - BWP
+ - BYN
+ - BYR
+ - BZD
+ - CAD
+ - CDF
+ - CHF
+ - CLF
+ - CLP
+ - CNY
+ - COP
+ - CRC
+ - CUC
+ - CUP
+ - CVE
+ - CZK
+ - DJF
+ - DKK
+ - DOP
+ - DZD
+ - EEK
+ - EGP
+ - ERN
+ - ETB
+ - EUR
+ - FJD
+ - FKP
+ - GBP
+ - GEL
+ - GHS
+ - GIP
+ - GMD
+ - GNF
+ - GTQ
+ - GYD
+ - HKD
+ - HNL
+ - HRK
+ - HTG
+ - HUF
+ - IDR
+ - ILS
+ - INR
+ - IQD
+ - IRR
+ - ISK
+ - JMD
+ - JOD
+ - JPY
+ - KES
+ - KGS
+ - KHR
+ - KMF
+ - KPW
+ - KRW
+ - KWD
+ - KYD
+ - KZT
+ - LAK
+ - LBP
+ - LKR
+ - LRD
+ - LSL
+ - LTL
+ - LVL
+ - LYD
+ - MAD
+ - MDL
+ - MGA
+ - MKD
+ - MMK
+ - MNT
+ - MOP
+ - MRO
+ - MRU
+ - MUR
+ - MVR
+ - MWK
+ - MXN
+ - MXV
+ - MYR
+ - MZN
+ - NAD
+ - NGN
+ - NIO
+ - NOK
+ - NPR
+ - NZD
+ - OMR
+ - PAB
+ - PEN
+ - PGK
+ - PHP
+ - PKR
+ - PLN
+ - PYG
+ - QAR
+ - RON
+ - RSD
+ - RUB
+ - RWF
+ - SAR
+ - SBD
+ - SCR
+ - SDG
+ - SEK
+ - SGD
+ - SHP
+ - SKK
+ - SLE
+ - SLL
+ - SOS
+ - SRD
+ - STD
+ - STN
+ - SVC
+ - SYP
+ - SZL
+ - THB
+ - TJS
+ - TMT
+ - TND
+ - TOP
+ - TRY
+ - TTD
+ - TWD
+ - TZS
+ - UAH
+ - UGX
+ - USD
+ - UYU
+ - UZS
+ - VEF
+ - VES
+ - VND
+ - VUV
+ - WST
+ - XAF
+ - XCD
+ - XOF
+ - XPF
+ - YER
+ - ZAR
+ - ZMW
+ - ZMK
+ - ZWD
+ Employees:
+ type: object
+ x-objectArrayKey: employees
+ properties:
+ Employees:
+ type: array
+ items:
+ $ref: '#/components/schemas/Employee'
+ Employee:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/employees/
+ properties:
+ EmployeeID:
+ description: The Xero identifier for an employee e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
+ type: string
+ format: uuid
+ Status:
+ description: Current status of an employee – see contact status types
+ type: string
+ enum:
+ - ACTIVE
+ - ARCHIVED
+ - GDPRREQUEST
+ - DELETED
+ FirstName:
+ description: First name of an employee (max length = 255)
+ maxLength: 255
+ type: string
+ LastName:
+ description: Last name of an employee (max length = 255)
+ maxLength: 255
+ type: string
+ ExternalLink:
+ $ref: '#/components/schemas/ExternalLink'
+ UpdatedDateUTC:
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ StatusAttributeString:
+ description: A string to indicate if a invoice status
+ type: string
+ example: ERROR
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ type: object
+ ExpenseClaims:
+ type: object
+ x-objectArrayKey: expense_claims
+ properties:
+ ExpenseClaims:
+ type: array
+ items:
+ $ref: '#/components/schemas/ExpenseClaim'
+ ExpenseClaim:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/expense-claims/
+ properties:
+ ExpenseClaimID:
+ description: Xero generated unique identifier for an expense claim
+ type: string
+ format: uuid
+ Status:
+ description: Current status of an expense claim – see status types
+ type: string
+ enum:
+ - SUBMITTED
+ - AUTHORISED
+ - PAID
+ - VOIDED
+ - DELETED
+ Payments:
+ description: See Payments
+ type: array
+ items:
+ $ref: '#/components/schemas/Payment'
+ User:
+ $ref: '#/components/schemas/User'
+ Receipts:
+ type: array
+ items:
+ $ref: '#/components/schemas/Receipt'
+ UpdatedDateUTC:
+ description: Last modified date UTC format
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ Total:
+ description: The total of an expense claim being paid
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ AmountDue:
+ description: The amount due to be paid for an expense claim
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ AmountPaid:
+ description: The amount still to pay for an expense claim
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ PaymentDueDate:
+ description: The date when the expense claim is due to be paid YYYY-MM-DD
+ readOnly: true
+ type: string
+ x-is-msdate: true
+ ReportingDate:
+ description: The date the expense claim will be reported in Xero YYYY-MM-DD
+ readOnly: true
+ type: string
+ x-is-msdate: true
+ ReceiptID:
+ description: The Xero identifier for the Receipt e.g. e59a2c7f-1306-4078-a0f3-73537afcbba9
+ type: string
+ format: uuid
+ type: object
+ HistoryRecords:
+ type: object
+ x-objectArrayKey: history_records
+ properties:
+ HistoryRecords:
+ type: array
+ items:
+ $ref: '#/components/schemas/HistoryRecord'
+ HistoryRecord:
+ externalDocs:
+ url: https://developer.xero.com/documentation/api/history-and-notes
+ properties:
+ Details:
+ description: details
+ type: string
+ Changes:
+ description: Name of branding theme
+ type: string
+ User:
+ description: has a value of 0
+ type: string
+ DateUTC:
+ description: UTC timestamp of creation date of branding theme
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ type: object
+ Invoices:
+ type: object
+ x-objectArrayKey: invoices
+ properties:
+ pagination:
+ $ref: '#/components/schemas/Pagination'
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Invoices:
+ type: array
+ items:
+ $ref: '#/components/schemas/Invoice'
+ Invoice:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/invoices/
+ properties:
+ Type:
+ description: See Invoice Types
+ type: string
+ enum:
+ - ACCPAY
+ - ACCPAYCREDIT
+ - APOVERPAYMENT
+ - APPREPAYMENT
+ - ACCREC
+ - ACCRECCREDIT
+ - AROVERPAYMENT
+ - ARPREPAYMENT
+ Contact:
+ $ref: '#/components/schemas/Contact'
+ LineItems:
+ description: See LineItems
+ type: array
+ items:
+ $ref: '#/components/schemas/LineItem'
+ Date:
+ description: Date invoice was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation
+ type: string
+ x-is-msdate: true
+ DueDate:
+ description: Date invoice is due – YYYY-MM-DD
+ type: string
+ x-is-msdate: true
+ LineAmountTypes:
+ $ref: '#/components/schemas/LineAmountTypes'
+ type: string
+ InvoiceNumber:
+ description: ACCREC – Unique alpha numeric code identifying invoice (when missing will auto-generate from your Organisation Invoice Settings) (max length = 255)
+ maxLength: 255
+ type: string
+ Reference:
+ description: ACCREC only – additional reference number
+ type: string
+ BrandingThemeID:
+ description: See BrandingThemes
+ type: string
+ format: uuid
+ Url:
+ description: URL link to a source document – shown as “Go to [appName]” in the Xero app
+ type: string
+ CurrencyCode:
+ $ref: '#/components/schemas/CurrencyCode'
+ type: string
+ CurrencyRate:
+ description: The currency rate for a multicurrency invoice. If no rate is specified, the XE.com day rate is used. (max length = [18].[6])
+ type: number
+ format: double
+ x-is-money: true
+ Status:
+ description: See Invoice Status Codes
+ type: string
+ enum:
+ - DRAFT
+ - SUBMITTED
+ - DELETED
+ - AUTHORISED
+ - PAID
+ - VOIDED
+ SentToContact:
+ description: Boolean to set whether the invoice in the Xero app should be marked as “sent”. This can be set only on invoices that have been approved
+ type: boolean
+ ExpectedPaymentDate:
+ description: Shown on sales invoices (Accounts Receivable) when this has been set
+ type: string
+ x-is-msdate: true
+ PlannedPaymentDate:
+ description: Shown on bills (Accounts Payable) when this has been set
+ type: string
+ x-is-msdate: true
+ CISDeduction:
+ description: CIS deduction for UK contractors
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ CISRate:
+ description: CIS Deduction rate for the organisation
+ type: number
+ format: double
+ readOnly: true
+ x-is-money: true
+ SubTotal:
+ description: Total of invoice excluding taxes
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ TotalTax:
+ description: Total tax on invoice
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ Total:
+ description: Total of Invoice tax inclusive (i.e. SubTotal + TotalTax). This will be ignored if it doesn’t equal the sum of the LineAmounts
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ TotalDiscount:
+ description: Total of discounts applied on the invoice line items
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ InvoiceID:
+ description: Xero generated unique identifier for invoice
+ type: string
+ format: uuid
+ RepeatingInvoiceID:
+ description: Xero generated unique identifier for repeating invoices
+ type: string
+ format: uuid
+ HasAttachments:
+ description: boolean to indicate if an invoice has an attachment
+ readOnly: true
+ type: boolean
+ default: "false"
+ example: "false"
+ IsDiscounted:
+ description: boolean to indicate if an invoice has a discount
+ readOnly: true
+ type: boolean
+ Payments:
+ description: See Payments
+ readOnly: true
+ type: array
+ items:
+ $ref: '#/components/schemas/Payment'
+ Prepayments:
+ description: See Prepayments
+ readOnly: true
+ type: array
+ items:
+ $ref: '#/components/schemas/Prepayment'
+ Overpayments:
+ description: See Overpayments
+ readOnly: true
+ type: array
+ items:
+ $ref: '#/components/schemas/Overpayment'
+ AmountDue:
+ description: Amount remaining to be paid on invoice
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ AmountPaid:
+ description: Sum of payments received for invoice
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ FullyPaidOnDate:
+ description: The date the invoice was fully paid. Only returned on fully paid invoices
+ readOnly: true
+ type: string
+ x-is-msdate: true
+ AmountCredited:
+ description: Sum of all credit notes, over-payments and pre-payments applied to invoice
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ UpdatedDateUTC:
+ description: Last modified date UTC format
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ CreditNotes:
+ description: Details of credit notes that have been applied to an invoice
+ readOnly: true
+ type: array
+ items:
+ $ref: '#/components/schemas/CreditNote'
+ Attachments:
+ description: Displays array of attachments from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/Attachment'
+ HasErrors:
+ description: A boolean to indicate if a invoice has an validation errors
+ type: boolean
+ default: "false"
+ example: "false"
+ StatusAttributeString:
+ description: A string to indicate if a invoice status
+ type: string
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ InvoiceAddresses:
+ description: An array of addresses used to auto calculate sales tax
+ type: array
+ items:
+ $ref: '#/components/schemas/InvoiceAddress'
+ type: object
+ OnlineInvoices:
+ type: object
+ x-objectArrayKey: online_invoices
+ properties:
+ OnlineInvoices:
+ type: array
+ items:
+ $ref: '#/components/schemas/OnlineInvoice'
+ OnlineInvoice:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/invoices/
+ properties:
+ OnlineInvoiceUrl:
+ description: the URL to an online invoice
+ type: string
+ type: object
+ InvoiceReminders:
+ type: object
+ x-objectArrayKey: invoice_reminders
+ properties:
+ InvoiceReminders:
+ type: array
+ items:
+ $ref: '#/components/schemas/InvoiceReminder'
+ InvoiceReminder:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/invoice-reminders/
+ properties:
+ Enabled:
+ description: setting for on or off
+ type: boolean
+ type: object
+ Items:
+ type: object
+ x-objectArrayKey: items
+ properties:
+ Items:
+ type: array
+ items:
+ $ref: '#/components/schemas/Item'
+ Item:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/items/
+ properties:
+ Code:
+ description: User defined item code (max length = 30)
+ maxLength: 30
+ type: string
+ InventoryAssetAccountCode:
+ description: The inventory asset account for the item. The account must be of type INVENTORY. The COGSAccountCode in PurchaseDetails is also required to create a tracked item
+ type: string
+ Name:
+ description: The name of the item (max length = 50)
+ maxLength: 50
+ type: string
+ IsSold:
+ description: Boolean value, defaults to true. When IsSold is true the item will be available on sales transactions in the Xero UI. If IsSold is updated to false then Description and SalesDetails values will be nulled.
+ type: boolean
+ IsPurchased:
+ description: Boolean value, defaults to true. When IsPurchased is true the item is available for purchase transactions in the Xero UI. If IsPurchased is updated to false then PurchaseDescription and PurchaseDetails values will be nulled.
+ type: boolean
+ Description:
+ description: The sales description of the item (max length = 4000)
+ maxLength: 4000
+ type: string
+ PurchaseDescription:
+ description: The purchase description of the item (max length = 4000)
+ maxLength: 4000
+ type: string
+ PurchaseDetails:
+ $ref: '#/components/schemas/Purchase'
+ SalesDetails:
+ $ref: '#/components/schemas/Purchase'
+ IsTrackedAsInventory:
+ description: True for items that are tracked as inventory. An item will be tracked as inventory if the InventoryAssetAccountCode and COGSAccountCode are set.
+ type: boolean
+ TotalCostPool:
+ description: The value of the item on hand. Calculated using average cost accounting.
+ type: number
+ format: double
+ x-is-money: true
+ QuantityOnHand:
+ description: The quantity of the item on hand
+ type: number
+ format: double
+ x-is-money: true
+ UpdatedDateUTC:
+ description: Last modified date in UTC format
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ ItemID:
+ description: The Xero identifier for an Item
+ type: string
+ format: uuid
+ StatusAttributeString:
+ description: Status of object
+ type: string
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ required:
+ - Code
+ type: object
+ Purchase:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/items/
+ 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
+ format: double
+ x-is-money: true
+ AccountCode:
+ description: Default account code to be used for purchased/sale. Not applicable to the purchase details of tracked items
+ type: string
+ COGSAccountCode:
+ description: Cost of goods sold account. Only applicable to the purchase details of tracked items.
+ type: string
+ TaxType:
+ description: The tax type from TaxRates
+ type: string
+ type: object
+ Journals:
+ type: object
+ x-objectArrayKey: journals
+ properties:
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Journals:
+ type: array
+ items:
+ $ref: '#/components/schemas/Journal'
+ Journal:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/journals/
+ properties:
+ JournalID:
+ description: Xero identifier
+ type: string
+ format: uuid
+ JournalDate:
+ description: Date the journal was posted
+ type: string
+ x-is-msdate: true
+ JournalNumber:
+ description: Xero generated journal number
+ type: integer
+ CreatedDateUTC:
+ description: Created date UTC format
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ Reference:
+ description: reference field for additional indetifying information
+ type: string
+ SourceID:
+ description: The identifier for the source transaction (e.g. InvoiceID)
+ type: string
+ format: uuid
+ SourceType:
+ description: The journal source type. The type of transaction that created the journal
+ type: string
+ enum:
+ - ACCREC
+ - ACCPAY
+ - ACCRECCREDIT
+ - ACCPAYCREDIT
+ - ACCRECPAYMENT
+ - ACCPAYPAYMENT
+ - ARCREDITPAYMENT
+ - APCREDITPAYMENT
+ - CASHREC
+ - CASHPAID
+ - TRANSFER
+ - ARPREPAYMENT
+ - APPREPAYMENT
+ - AROVERPAYMENT
+ - APOVERPAYMENT
+ - EXPCLAIM
+ - EXPPAYMENT
+ - MANJOURNAL
+ - PAYSLIP
+ - WAGEPAYABLE
+ - INTEGRATEDPAYROLLPE
+ - INTEGRATEDPAYROLLPT
+ - EXTERNALSPENDMONEY
+ - INTEGRATEDPAYROLLPTPAYMENT
+ - INTEGRATEDPAYROLLCN
+ JournalLines:
+ description: See JournalLines
+ type: array
+ items:
+ $ref: '#/components/schemas/JournalLine'
+ type: object
+ JournalLine:
+ externalDocs:
+ url: https://developer.xero.com/documentation/api/journals#JournalLines
+ properties:
+ JournalLineID:
+ description: Xero identifier for Journal
+ type: string
+ format: uuid
+ example: 7be9db36-3598-4755-ba5c-c2dbc8c4a7a2
+ AccountID:
+ description: See Accounts
+ type: string
+ format: uuid
+ example: ceef66a5-a545-413b-9312-78a53caadbc4
+ AccountCode:
+ description: See Accounts
+ type: string
+ example: 090
+ AccountType:
+ $ref: '#/components/schemas/AccountType'
+ type: string
+ AccountName:
+ description: See AccountCodes
+ type: string
+ example: Checking Account
+ Description:
+ description: The description from the source transaction line item. Only returned if populated.
+ type: string
+ example: My business checking account
+ NetAmount:
+ description: Net amount of journal line. This will be a positive value for a debit and negative for a credit
+ type: number
+ format: double
+ x-is-money: true
+ example: 4130.98
+ GrossAmount:
+ description: Gross amount of journal line (NetAmount + TaxAmount).
+ type: number
+ format: double
+ x-is-money: true
+ example: 4130.98
+ TaxAmount:
+ description: Total tax on a journal line
+ type: number
+ format: double
+ x-is-money: true
+ readOnly: true
+ example: 0.00
+ TaxType:
+ description: The tax type from taxRates
+ type: string
+ TaxName:
+ description: see TaxRates
+ type: string
+ example: Tax Exempt
+ TrackingCategories:
+ description: Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 elements.
+ type: array
+ items:
+ $ref: '#/components/schemas/TrackingCategory'
+ type: object
+ LinkedTransactions:
+ type: object
+ x-objectArrayKey: linked_transactions
+ properties:
+ LinkedTransactions:
+ type: array
+ items:
+ $ref: '#/components/schemas/LinkedTransaction'
+ LinkedTransaction:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/linked-transactions/
+ properties:
+ SourceTransactionID:
+ description: Filter by the SourceTransactionID. Get all the linked transactions created from a particular ACCPAY invoice
+ type: string
+ format: uuid
+ SourceLineItemID:
+ description: The line item identifier from the source transaction.
+ type: string
+ format: uuid
+ ContactID:
+ description: Filter by the combination of ContactID and Status. Get all the linked transactions that have been assigned to a particular customer and have a particular status e.g. GET /LinkedTransactions?ContactID=4bb34b03-3378-4bb2-a0ed-6345abf3224e&Status=APPROVED.
+ type: string
+ format: uuid
+ TargetTransactionID:
+ description: Filter by the TargetTransactionID. Get all the linked transactions allocated to a particular ACCREC invoice
+ type: string
+ format: uuid
+ TargetLineItemID:
+ description: The line item identifier from the target transaction. It is possible to link multiple billable expenses to the same TargetLineItemID.
+ type: string
+ format: uuid
+ LinkedTransactionID:
+ description: The Xero identifier for an Linked Transaction e.g./LinkedTransactions/297c2dc5-cc47-4afd-8ec8-74990b8761e9
+ type: string
+ format: uuid
+ Status:
+ description: Filter by the combination of ContactID and Status. Get all the linked transactions that have been assigned to a particular customer and have a particular status e.g. GET /LinkedTransactions?ContactID=4bb34b03-3378-4bb2-a0ed-6345abf3224e&Status=APPROVED.
+ type: string
+ enum:
+ - APPROVED
+ - DRAFT
+ - ONDRAFT
+ - BILLED
+ - VOIDED
+ Type:
+ description: This will always be BILLABLEEXPENSE. More types may be added in future.
+ type: string
+ enum:
+ - BILLABLEEXPENSE
+ UpdatedDateUTC:
+ description: The last modified date in UTC format
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ SourceTransactionTypeCode:
+ description: The Type of the source tranasction. This will be ACCPAY if the linked transaction was created from an invoice and SPEND if it was created from a bank transaction.
+ type: string
+ enum:
+ - ACCPAY
+ - SPEND
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ type: object
+ ManualJournals:
+ type: object
+ x-objectArrayKey: manual_journals
+ properties:
+ pagination:
+ $ref: '#/components/schemas/Pagination'
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ ManualJournals:
+ type: array
+ items:
+ $ref: '#/components/schemas/ManualJournal'
+ ManualJournal:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/manual-journals/
+ properties:
+ Narration:
+ description: Description of journal being posted
+ type: string
+ JournalLines:
+ description: See JournalLines
+ type: array
+ items:
+ $ref: '#/components/schemas/ManualJournalLine'
+ Date:
+ description: Date journal was posted – YYYY-MM-DD
+ type: string
+ x-is-msdate: true
+ LineAmountTypes:
+ $ref: '#/components/schemas/LineAmountTypes'
+ type: string
+ Status:
+ description: See Manual Journal Status Codes
+ type: string
+ enum:
+ - DRAFT
+ - POSTED
+ - DELETED
+ - VOIDED
+ - ARCHIVED
+ Url:
+ description: Url link to a source document – shown as “Go to [appName]” in the Xero app
+ type: string
+ ShowOnCashBasisReports:
+ description: Boolean – default is true if not specified
+ type: boolean
+ HasAttachments:
+ description: Boolean to indicate if a manual journal has an attachment
+ readOnly: true
+ type: boolean
+ default: "false"
+ example: "false"
+ UpdatedDateUTC:
+ description: Last modified date UTC format
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ ManualJournalID:
+ description: The Xero identifier for a Manual Journal
+ type: string
+ format: uuid
+ StatusAttributeString:
+ description: A string to indicate if a invoice status
+ type: string
+ example: ERROR
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Attachments:
+ description: Displays array of attachments from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/Attachment'
+ required:
+ - Narration
+ type: object
+ ManualJournalLine:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/manual-journals/
+ properties:
+ LineAmount:
+ description: total for line. Debits are positive, credits are negative value
+ type: number
+ format: double
+ x-is-money: true
+ example: -2569.00
+ AccountCode:
+ description: See Accounts
+ type: string
+ example: 720
+ AccountID:
+ description: See Accounts
+ type: string
+ format: uuid
+ Description:
+ description: Description for journal line
+ type: string
+ example: Coded incorrectly Office Equipment should be Computer Equipment
+ TaxType:
+ description: The tax type from TaxRates
+ type: string
+ Tracking:
+ description: Optional Tracking Category – see Tracking. Any JournalLine can have a maximum of 2 elements.
+ type: array
+ items:
+ $ref: '#/components/schemas/TrackingCategory'
+ TaxAmount:
+ description: The calculated tax amount based on the TaxType and LineAmount
+ type: number
+ format: double
+ x-is-money: true
+ example: 0.00
+ IsBlank:
+ description: is the line blank
+ type: boolean
+ example: false
+ type: object
+ Actions:
+ type: object
+ x-objectArrayKey: actions
+ properties:
+ Actions:
+ type: array
+ items:
+ $ref: '#/components/schemas/Action'
+ Action:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/organisation/
+ properties:
+ Name:
+ description: Name of the actions for this organisation
+ type: string
+ example: UseMulticurrency
+ Status:
+ description: Status of the action for this organisation
+ type: string
+ enum:
+ - ALLOWED
+ - NOT-ALLOWED
+ Organisations:
+ type: object
+ x-objectArrayKey: organisations
+ properties:
+ Organisations:
+ type: array
+ items:
+ $ref: '#/components/schemas/Organisation'
+ Organisation:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/organisation/
+ properties:
+ OrganisationID:
+ description: Unique Xero identifier
+ type: string
+ format: uuid
+ example: 8be9db36-3598-4755-ba5c-c2dbc8c4a7a2
+ APIKey:
+ description: Display a unique key used for Xero-to-Xero transactions
+ type: string
+ Name:
+ description: Display name of organisation shown in Xero
+ type: string
+ LegalName:
+ description: Organisation name shown on Reports
+ type: string
+ PaysTax:
+ description: Boolean to describe if organisation is registered with a local tax authority i.e. true, false
+ type: boolean
+ Version:
+ description: See Version Types
+ type: string
+ enum:
+ - AU
+ - NZ
+ - GLOBAL
+ - UK
+ - US
+ - AUONRAMP
+ - NZONRAMP
+ - GLOBALONRAMP
+ - UKONRAMP
+ - USONRAMP
+ OrganisationType:
+ description: Organisation Type
+ type: string
+ enum:
+ - ACCOUNTING_PRACTICE
+ - COMPANY
+ - CHARITY
+ - CLUB_OR_SOCIETY
+ - INDIVIDUAL
+ - LOOK_THROUGH_COMPANY
+ - NOT_FOR_PROFIT
+ - PARTNERSHIP
+ - S_CORPORATION
+ - SELF_MANAGED_SUPERANNUATION_FUND
+ - SOLE_TRADER
+ - SUPERANNUATION_FUND
+ - TRUST
+ BaseCurrency:
+ $ref: '#/components/schemas/CurrencyCode'
+ type: string
+ CountryCode:
+ $ref: '#/components/schemas/CountryCode'
+ type: string
+ IsDemoCompany:
+ description: Boolean to describe if organisation is a demo company.
+ type: boolean
+ OrganisationStatus:
+ description: Will be set to ACTIVE if you can connect to organisation via the Xero API
+ type: string
+ RegistrationNumber:
+ description: Shows for New Zealand, Australian and UK organisations
+ type: string
+ EmployerIdentificationNumber:
+ description: Shown if set. US Only.
+ type: string
+ TaxNumber:
+ description: Shown if set. Displays in the Xero UI as Tax File Number (AU), GST Number (NZ), VAT Number (UK) and Tax ID Number (US & Global).
+ type: string
+ FinancialYearEndDay:
+ description: Calendar day e.g. 0-31
+ type: integer
+ FinancialYearEndMonth:
+ description: Calendar Month e.g. 1-12
+ type: integer
+ SalesTaxBasis:
+ description: The accounting basis used for tax returns. See Sales Tax Basis
+ type: string
+ enum:
+ - PAYMENTS
+ - INVOICE
+ - NONE
+ - CASH
+ - ACCRUAL
+ - FLATRATECASH
+ - FLATRATEACCRUAL
+ - ACCRUALS
+ SalesTaxPeriod:
+ description: The frequency with which tax returns are processed. See Sales Tax Period
+ type: string
+ enum:
+ - MONTHLY
+ - QUARTERLY1
+ - QUARTERLY2
+ - QUARTERLY3
+ - ANNUALLY
+ - ONEMONTHS
+ - TWOMONTHS
+ - SIXMONTHS
+ - 1MONTHLY
+ - 2MONTHLY
+ - 3MONTHLY
+ - 6MONTHLY
+ - QUARTERLY
+ - YEARLY
+ - NONE
+ DefaultSalesTax:
+ description: The default for LineAmountTypes on sales transactions
+ type: string
+ DefaultPurchasesTax:
+ description: The default for LineAmountTypes on purchase transactions
+ type: string
+ PeriodLockDate:
+ description: Shown if set. See lock dates
+ type: string
+ x-is-msdate: true
+ EndOfYearLockDate:
+ description: Shown if set. See lock dates
+ type: string
+ x-is-msdate: true
+ CreatedDateUTC:
+ description: Timestamp when the organisation was created in Xero
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ Timezone:
+ $ref: '#/components/schemas/TimeZone'
+ type: string
+ OrganisationEntityType:
+ description: Organisation Entity Type
+ type: string
+ enum:
+ - ACCOUNTING_PRACTICE
+ - COMPANY
+ - CHARITY
+ - CLUB_OR_SOCIETY
+ - INDIVIDUAL
+ - LOOK_THROUGH_COMPANY
+ - NOT_FOR_PROFIT
+ - PARTNERSHIP
+ - S_CORPORATION
+ - SELF_MANAGED_SUPERANNUATION_FUND
+ - SOLE_TRADER
+ - SUPERANNUATION_FUND
+ - TRUST
+ ShortCode:
+ description: A unique identifier for the organisation. Potential uses.
+ type: string
+ Class:
+ description: Organisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM)
+ type: string
+ enum:
+ - DEMO
+ - TRIAL
+ - STARTER
+ - STANDARD
+ - PREMIUM
+ - PREMIUM_20
+ - PREMIUM_50
+ - PREMIUM_100
+ - LEDGER
+ - GST_CASHBOOK
+ - NON_GST_CASHBOOK
+ - ULTIMATE
+ - LITE
+ - ULTIMATE_10
+ - ULTIMATE_20
+ - ULTIMATE_50
+ - ULTIMATE_100
+ - IGNITE
+ - GROW
+ - COMPREHENSIVE
+ Edition:
+ description: BUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing)
+ type: string
+ enum:
+ - BUSINESS
+ - PARTNER
+ LineOfBusiness:
+ description: Description of business type as defined in Organisation settings
+ type: string
+ Addresses:
+ description: Address details for organisation – see Addresses
+ type: array
+ items:
+ $ref: '#/components/schemas/AddressForOrganisation'
+ Phones:
+ description: Phones details for organisation – see Phones
+ type: array
+ items:
+ $ref: '#/components/schemas/Phone'
+ ExternalLinks:
+ description: Organisation profile links for popular services such as Facebook,Twitter, GooglePlus and LinkedIn. You can also add link to your website here. Shown if Organisation settings is updated in Xero. See ExternalLinks below
+ type: array
+ items:
+ $ref: '#/components/schemas/ExternalLink'
+ PaymentTerms:
+ $ref: '#/components/schemas/PaymentTerm'
+ type: object
+ CountryCode:
+ type: string
+ enum:
+ - AD
+ - AE
+ - AF
+ - AG
+ - AI
+ - AL
+ - AM
+ - AN
+ - AO
+ - AQ
+ - AR
+ - AS
+ - AT
+ - AU
+ - AW
+ - AZ
+ - BA
+ - BB
+ - BD
+ - BE
+ - BF
+ - BG
+ - BH
+ - BI
+ - BJ
+ - BL
+ - BM
+ - BN
+ - BO
+ - BR
+ - BS
+ - BT
+ - BW
+ - BY
+ - BZ
+ - CA
+ - CC
+ - CD
+ - CF
+ - CG
+ - CH
+ - CI
+ - CK
+ - CL
+ - CM
+ - CN
+ - CO
+ - CR
+ - CU
+ - CV
+ - CW
+ - CX
+ - CY
+ - CZ
+ - DE
+ - DJ
+ - DK
+ - DM
+ - DO
+ - DZ
+ - EC
+ - EE
+ - EG
+ - EH
+ - ER
+ - ES
+ - ET
+ - FI
+ - FJ
+ - FK
+ - FM
+ - FO
+ - FR
+ - GA
+ - GB
+ - GD
+ - GE
+ - GG
+ - GH
+ - GI
+ - GL
+ - GM
+ - GN
+ - GQ
+ - GR
+ - GT
+ - GU
+ - GW
+ - GY
+ - HK
+ - HN
+ - HR
+ - HT
+ - HU
+ - ID
+ - IE
+ - IL
+ - IM
+ - IN
+ - IO
+ - IQ
+ - IR
+ - IS
+ - IT
+ - JE
+ - JM
+ - JO
+ - JP
+ - KE
+ - KG
+ - KH
+ - KI
+ - KM
+ - KN
+ - KP
+ - KR
+ - KW
+ - KY
+ - KZ
+ - LA
+ - LB
+ - LC
+ - LI
+ - LK
+ - LR
+ - LS
+ - LT
+ - LU
+ - LV
+ - LY
+ - MA
+ - MC
+ - MD
+ - ME
+ - MF
+ - MG
+ - MH
+ - MK
+ - ML
+ - MM
+ - MN
+ - MO
+ - MP
+ - MR
+ - MS
+ - MT
+ - MU
+ - MV
+ - MW
+ - MX
+ - MY
+ - MZ
+ - NA
+ - NC
+ - NE
+ - NG
+ - NI
+ - NL
+ - "NO"
+ - NP
+ - NR
+ - NU
+ - NZ
+ - OM
+ - PA
+ - PE
+ - PF
+ - PG
+ - PH
+ - PK
+ - PL
+ - PM
+ - PN
+ - PR
+ - PS
+ - PT
+ - PW
+ - PY
+ - QA
+ - RE
+ - RO
+ - RS
+ - RU
+ - RW
+ - SA
+ - SB
+ - SC
+ - SD
+ - SE
+ - SG
+ - SH
+ - SI
+ - SJ
+ - SK
+ - SL
+ - SM
+ - SN
+ - SO
+ - SR
+ - SS
+ - ST
+ - SV
+ - SX
+ - SY
+ - SZ
+ - TC
+ - TD
+ - TG
+ - TH
+ - TJ
+ - TK
+ - TL
+ - TM
+ - TN
+ - TO
+ - TR
+ - TT
+ - TV
+ - TW
+ - TZ
+ - UA
+ - UG
+ - US
+ - UY
+ - UZ
+ - VA
+ - VC
+ - VE
+ - VG
+ - VI
+ - VN
+ - VU
+ - WF
+ - WS
+ - XK
+ - YE
+ - YT
+ - ZA
+ - ZM
+ - ZW
+ TimeZone:
+ description: Timezone specifications
+ type: string
+ enum:
+ - AFGHANISTANSTANDARDTIME
+ - ALASKANSTANDARDTIME
+ - ALEUTIANSTANDARDTIME
+ - ALTAISTANDARDTIME
+ - ARABIANSTANDARDTIME
+ - ARABICSTANDARDTIME
+ - ARABSTANDARDTIME
+ - ARGENTINASTANDARDTIME
+ - ASTRAKHANSTANDARDTIME
+ - ATLANTICSTANDARDTIME
+ - AUSCENTRALSTANDARDTIME
+ - AUSCENTRALWSTANDARDTIME
+ - AUSEASTERNSTANDARDTIME
+ - AZERBAIJANSTANDARDTIME
+ - AZORESSTANDARDTIME
+ - BAHIASTANDARDTIME
+ - BANGLADESHSTANDARDTIME
+ - BELARUSSTANDARDTIME
+ - BOUGAINVILLESTANDARDTIME
+ - CANADACENTRALSTANDARDTIME
+ - CAPEVERDESTANDARDTIME
+ - CAUCASUSSTANDARDTIME
+ - CENAUSTRALIASTANDARDTIME
+ - CENTRALAMERICASTANDARDTIME
+ - CENTRALASIASTANDARDTIME
+ - CENTRALBRAZILIANSTANDARDTIME
+ - CENTRALEUROPEANSTANDARDTIME
+ - CENTRALEUROPESTANDARDTIME
+ - CENTRALPACIFICSTANDARDTIME
+ - CENTRALSTANDARDTIME
+ - CENTRALSTANDARDTIME(MEXICO)
+ - CHATHAMISLANDSSTANDARDTIME
+ - CHINASTANDARDTIME
+ - CUBASTANDARDTIME
+ - DATELINESTANDARDTIME
+ - EAFRICASTANDARDTIME
+ - EASTERISLANDSTANDARDTIME
+ - EASTERNSTANDARDTIME
+ - EASTERNSTANDARDTIME(MEXICO)
+ - EAUSTRALIASTANDARDTIME
+ - EEUROPESTANDARDTIME
+ - EGYPTSTANDARDTIME
+ - EKATERINBURGSTANDARDTIME
+ - ESOUTHAMERICASTANDARDTIME
+ - FIJISTANDARDTIME
+ - FLESTANDARDTIME
+ - GEORGIANSTANDARDTIME
+ - GMTSTANDARDTIME
+ - GREENLANDSTANDARDTIME
+ - GREENWICHSTANDARDTIME
+ - GTBSTANDARDTIME
+ - HAITISTANDARDTIME
+ - HAWAIIANSTANDARDTIME
+ - INDIASTANDARDTIME
+ - IRANSTANDARDTIME
+ - ISRAELSTANDARDTIME
+ - JORDANSTANDARDTIME
+ - KALININGRADSTANDARDTIME
+ - KAMCHATKASTANDARDTIME
+ - KOREASTANDARDTIME
+ - LIBYASTANDARDTIME
+ - LINEISLANDSSTANDARDTIME
+ - LORDHOWESTANDARDTIME
+ - MAGADANSTANDARDTIME
+ - MAGALLANESSTANDARDTIME
+ - MARQUESASSTANDARDTIME
+ - MAURITIUSSTANDARDTIME
+ - MIDATLANTICSTANDARDTIME
+ - MIDDLEEASTSTANDARDTIME
+ - MONTEVIDEOSTANDARDTIME
+ - MOROCCOSTANDARDTIME
+ - MOUNTAINSTANDARDTIME
+ - MOUNTAINSTANDARDTIME(MEXICO)
+ - MYANMARSTANDARDTIME
+ - NAMIBIASTANDARDTIME
+ - NCENTRALASIASTANDARDTIME
+ - NEPALSTANDARDTIME
+ - NEWFOUNDLANDSTANDARDTIME
+ - NEWZEALANDSTANDARDTIME
+ - NORFOLKSTANDARDTIME
+ - NORTHASIAEASTSTANDARDTIME
+ - NORTHASIASTANDARDTIME
+ - NORTHKOREASTANDARDTIME
+ - OMSKSTANDARDTIME
+ - PACIFICSASTANDARDTIME
+ - PACIFICSTANDARDTIME
+ - PACIFICSTANDARDTIME(MEXICO)
+ - PAKISTANSTANDARDTIME
+ - PARAGUAYSTANDARDTIME
+ - QYZYLORDASTANDARDTIME
+ - ROMANCESTANDARDTIME
+ - RUSSIANSTANDARDTIME
+ - RUSSIATIMEZONE10
+ - RUSSIATIMEZONE11
+ - RUSSIATIMEZONE3
+ - SAEASTERNSTANDARDTIME
+ - SAINTPIERRESTANDARDTIME
+ - SAKHALINSTANDARDTIME
+ - SAMOASTANDARDTIME
+ - SAOTOMESTANDARDTIME
+ - SAPACIFICSTANDARDTIME
+ - SARATOVSTANDARDTIME
+ - SAWESTERNSTANDARDTIME
+ - SEASIASTANDARDTIME
+ - SINGAPORESTANDARDTIME
+ - SOUTHAFRICASTANDARDTIME
+ - SOUTHSUDANSTANDARDTIME
+ - SRILANKASTANDARDTIME
+ - SUDANSTANDARDTIME
+ - SYRIASTANDARDTIME
+ - TAIPEISTANDARDTIME
+ - TASMANIASTANDARDTIME
+ - TOCANTINSSTANDARDTIME
+ - TOKYOSTANDARDTIME
+ - TOMSKSTANDARDTIME
+ - TONGASTANDARDTIME
+ - TRANSBAIKALSTANDARDTIME
+ - TURKEYSTANDARDTIME
+ - TURKSANDCAICOSSTANDARDTIME
+ - ULAANBAATARSTANDARDTIME
+ - USEASTERNSTANDARDTIME
+ - USMOUNTAINSTANDARDTIME
+ - UTC
+ - UTC+12
+ - UTC+13
+ - UTC02
+ - UTC08
+ - UTC09
+ - UTC11
+ - VENEZUELASTANDARDTIME
+ - VLADIVOSTOKSTANDARDTIME
+ - VOLGOGRADSTANDARDTIME
+ - WAUSTRALIASTANDARDTIME
+ - WCENTRALAFRICASTANDARDTIME
+ - WESTASIASTANDARDTIME
+ - WESTBANKSTANDARDTIME
+ - WESTPACIFICSTANDARDTIME
+ - WEUROPESTANDARDTIME
+ - WMONGOLIASTANDARDTIME
+ - YAKUTSKSTANDARDTIME
+ - YUKONSTANDARDTIME
+ PaymentTerm:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/organisation/
+ properties:
+ Bills:
+ $ref: '#/components/schemas/Bill'
+ Sales:
+ $ref: '#/components/schemas/Bill'
+ type: object
+ PaymentTermType:
+ type: string
+ enum:
+ - DAYSAFTERBILLDATE
+ - DAYSAFTERBILLMONTH
+ - OFCURRENTMONTH
+ - OFFOLLOWINGMONTH
+ ExternalLink:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/organisation/
+ properties:
+ LinkType:
+ description: See External link types
+ type: string
+ enum:
+ - Facebook
+ - GooglePlus
+ - LinkedIn
+ - Twitter
+ - Website
+ Url:
+ description: URL for service e.g. http://twitter.com/xeroapi
+ type: string
+ Description:
+ type: string
+ type: object
+ Bill:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/organisation/
+ properties:
+ Day:
+ description: Day of Month (0-31)
+ type: integer
+ Type:
+ $ref: '#/components/schemas/PaymentTermType'
+ type: object
+ Overpayments:
+ type: object
+ x-objectArrayKey: overpayments
+ properties:
+ pagination:
+ $ref: '#/components/schemas/Pagination'
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Overpayments:
+ type: array
+ items:
+ $ref: '#/components/schemas/Overpayment'
+ Overpayment:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/overpayments/
+ properties:
+ Type:
+ description: See Overpayment Types
+ type: string
+ enum:
+ - RECEIVE-OVERPAYMENT
+ - SPEND-OVERPAYMENT
+ - AROVERPAYMENT
+ Contact:
+ $ref: '#/components/schemas/Contact'
+ Date:
+ description: The date the overpayment is created YYYY-MM-DD
+ type: string
+ x-is-msdate: true
+ Status:
+ description: See Overpayment Status Codes
+ type: string
+ enum:
+ - AUTHORISED
+ - PAID
+ - VOIDED
+ LineAmountTypes:
+ $ref: '#/components/schemas/LineAmountTypes'
+ type: string
+ LineItems:
+ description: See Overpayment Line Items
+ type: array
+ items:
+ $ref: '#/components/schemas/LineItem'
+ SubTotal:
+ description: The subtotal of the overpayment excluding taxes
+ type: number
+ format: double
+ x-is-money: true
+ TotalTax:
+ description: The total tax on the overpayment
+ type: number
+ format: double
+ x-is-money: true
+ Total:
+ description: The total of the overpayment (subtotal + total tax)
+ type: number
+ format: double
+ x-is-money: true
+ UpdatedDateUTC:
+ description: UTC timestamp of last update to the overpayment
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ CurrencyCode:
+ $ref: '#/components/schemas/CurrencyCode'
+ type: string
+ OverpaymentID:
+ description: Xero generated unique identifier
+ type: string
+ format: uuid
+ CurrencyRate:
+ description: The currency rate for a multicurrency overpayment. If no rate is specified, the XE.com day rate is used
+ type: number
+ format: double
+ x-is-money: true
+ RemainingCredit:
+ description: The remaining credit balance on the overpayment
+ type: number
+ format: double
+ x-is-money: true
+ Allocations:
+ description: See Allocations
+ type: array
+ items:
+ $ref: '#/components/schemas/Allocation'
+ AppliedAmount:
+ description: The amount of applied to an invoice
+ type: number
+ format: double
+ example: 2.00
+ Payments:
+ description: See Payments
+ type: array
+ items:
+ $ref: '#/components/schemas/Payment'
+ HasAttachments:
+ description: boolean to indicate if a overpayment has an attachment
+ readOnly: true
+ type: boolean
+ default: "false"
+ example: "false"
+ Attachments:
+ description: See Attachments
+ type: array
+ items:
+ $ref: '#/components/schemas/Attachment'
+ type: object
+ Payments:
+ type: object
+ x-objectArrayKey: payments
+ properties:
+ pagination:
+ $ref: '#/components/schemas/Pagination'
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Payments:
+ type: array
+ items:
+ $ref: '#/components/schemas/Payment'
+ PaymentDelete:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/payments/
+ properties:
+ Status:
+ description: The status of the payment.
+ type: string
+ default: DELETED
+ required:
+ - Status
+ type: object
+ Payment:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/payments/
+ properties:
+ Invoice:
+ $ref: '#/components/schemas/Invoice'
+ CreditNote:
+ $ref: '#/components/schemas/CreditNote'
+ Prepayment:
+ $ref: '#/components/schemas/Prepayment'
+ Overpayment:
+ $ref: '#/components/schemas/Overpayment'
+ InvoiceNumber:
+ description: Number of invoice or credit note you are applying payment to e.g.INV-4003
+ type: string
+ CreditNoteNumber:
+ description: Number of invoice or credit note you are applying payment to e.g. INV-4003
+ type: string
+ BatchPayment:
+ $ref: '#/components/schemas/BatchPayment'
+ Account:
+ $ref: '#/components/schemas/Account'
+ Code:
+ description: Code of account you are using to make the payment e.g. 001 (note- not all accounts have a code value)
+ type: string
+ Date:
+ description: Date the payment is being made (YYYY-MM-DD) e.g. 2009-09-06
+ type: string
+ x-is-msdate: true
+ CurrencyRate:
+ description: Exchange rate when payment is received. Only used for non base currency invoices and credit notes e.g. 0.7500
+ type: number
+ format: double
+ x-is-money: true
+ 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
+ format: double
+ x-is-money: true
+ BankAmount:
+ description: The amount of the payment in the currency of the bank account.
+ type: number
+ format: double
+ x-is-money: true
+ Reference:
+ description: An optional description for the payment e.g. Direct Debit
+ type: string
+ IsReconciled:
+ description: An optional parameter for the payment. A boolean indicating whether you would like the payment to be created as reconciled when using PUT, or whether a payment has been reconciled when using GET
+ type: boolean
+ Status:
+ description: The status of the payment.
+ type: string
+ enum:
+ - AUTHORISED
+ - DELETED
+ PaymentType:
+ description: See Payment Types.
+ readOnly: true
+ type: string
+ enum:
+ - ACCRECPAYMENT
+ - ACCPAYPAYMENT
+ - ARCREDITPAYMENT
+ - APCREDITPAYMENT
+ - AROVERPAYMENTPAYMENT
+ - ARPREPAYMENTPAYMENT
+ - APPREPAYMENTPAYMENT
+ - APOVERPAYMENTPAYMENT
+ UpdatedDateUTC:
+ description: UTC timestamp of last update to the payment
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ PaymentID:
+ description: The Xero identifier for an Payment e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
+ type: string
+ format: uuid
+ example: 00000000-0000-0000-0000-000000000000
+ BatchPaymentID:
+ description: Present if the payment was created as part of a batch.
+ type: string
+ format: uuid
+ example: 00000000-0000-0000-0000-000000000000
+ BankAccountNumber:
+ description: The suppliers bank account number the payment is being made to
+ type: string
+ Particulars:
+ description: The suppliers bank account number the payment is being made to
+ type: string
+ Details:
+ description: The information to appear on the supplier's bank account
+ type: string
+ HasAccount:
+ description: A boolean to indicate if a contact has an validation errors
+ type: boolean
+ default: "false"
+ example: "false"
+ HasValidationErrors:
+ description: A boolean to indicate if a contact has an validation errors
+ type: boolean
+ default: "false"
+ example: "false"
+ StatusAttributeString:
+ description: A string to indicate if a invoice status
+ type: string
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ type: object
+ Prepayments:
+ type: object
+ x-objectArrayKey: prepayments
+ properties:
+ pagination:
+ $ref: '#/components/schemas/Pagination'
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Prepayments:
+ type: array
+ items:
+ $ref: '#/components/schemas/Prepayment'
+ Prepayment:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/prepayments/
+ properties:
+ Type:
+ description: See Prepayment Types
+ type: string
+ enum:
+ - RECEIVE-PREPAYMENT
+ - SPEND-PREPAYMENT
+ - ARPREPAYMENT
+ - APPREPAYMENT
+ Contact:
+ $ref: '#/components/schemas/Contact'
+ Date:
+ description: The date the prepayment is created YYYY-MM-DD
+ type: string
+ x-is-msdate: true
+ Status:
+ description: See Prepayment Status Codes
+ type: string
+ enum:
+ - AUTHORISED
+ - PAID
+ - VOIDED
+ LineAmountTypes:
+ $ref: '#/components/schemas/LineAmountTypes'
+ type: string
+ LineItems:
+ description: See Prepayment Line Items
+ type: array
+ items:
+ $ref: '#/components/schemas/LineItem'
+ SubTotal:
+ description: The subtotal of the prepayment excluding taxes
+ type: number
+ format: double
+ x-is-money: true
+ TotalTax:
+ description: The total tax on the prepayment
+ type: number
+ format: double
+ x-is-money: true
+ Total:
+ description: The total of the prepayment(subtotal + total tax)
+ type: number
+ format: double
+ x-is-money: true
+ Reference:
+ description: Returns Invoice number field. Reference field isn't available.
+ type: string
+ readOnly: true
+ UpdatedDateUTC:
+ description: UTC timestamp of last update to the prepayment
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ CurrencyCode:
+ $ref: '#/components/schemas/CurrencyCode'
+ type: string
+ PrepaymentID:
+ description: Xero generated unique identifier
+ type: string
+ format: uuid
+ CurrencyRate:
+ description: The currency rate for a multicurrency prepayment. If no rate is specified, the XE.com day rate is used
+ type: number
+ format: double
+ x-is-money: true
+ RemainingCredit:
+ description: The remaining credit balance on the prepayment
+ type: number
+ format: double
+ x-is-money: true
+ Allocations:
+ description: See Allocations
+ type: array
+ items:
+ $ref: '#/components/schemas/Allocation'
+ Payments:
+ description: See Payments
+ type: array
+ items:
+ $ref: '#/components/schemas/Payment'
+ AppliedAmount:
+ description: The amount of applied to an invoice
+ type: number
+ format: double
+ example: 2.00
+ HasAttachments:
+ description: boolean to indicate if a prepayment has an attachment
+ readOnly: true
+ type: boolean
+ default: "false"
+ example: "false"
+ Attachments:
+ description: See Attachments
+ type: array
+ items:
+ $ref: '#/components/schemas/Attachment'
+ type: object
+ PurchaseOrders:
+ type: object
+ x-objectArrayKey: purchase_orders
+ properties:
+ pagination:
+ $ref: '#/components/schemas/Pagination'
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ PurchaseOrders:
+ type: array
+ items:
+ $ref: '#/components/schemas/PurchaseOrder'
+ PurchaseOrder:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/purchase-orders/
+ properties:
+ Contact:
+ $ref: '#/components/schemas/Contact'
+ LineItems:
+ description: See LineItems
+ type: array
+ items:
+ $ref: '#/components/schemas/LineItem'
+ Date:
+ description: Date purchase order was issued – YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation
+ type: string
+ x-is-msdate: true
+ DeliveryDate:
+ description: Date the goods are to be delivered – YYYY-MM-DD
+ type: string
+ x-is-msdate: true
+ LineAmountTypes:
+ $ref: '#/components/schemas/LineAmountTypes'
+ type: string
+ PurchaseOrderNumber:
+ description: Unique alpha numeric code identifying purchase order (when missing will auto-generate from your Organisation Invoice Settings)
+ type: string
+ Reference:
+ description: Additional reference number
+ type: string
+ BrandingThemeID:
+ description: See BrandingThemes
+ type: string
+ format: uuid
+ CurrencyCode:
+ $ref: '#/components/schemas/CurrencyCode'
+ type: string
+ Status:
+ description: See Purchase Order Status Codes
+ type: string
+ enum:
+ - DRAFT
+ - SUBMITTED
+ - AUTHORISED
+ - BILLED
+ - DELETED
+ SentToContact:
+ description: Boolean to set whether the purchase order should be marked as “sent”. This can be set only on purchase orders that have been approved or billed
+ type: boolean
+ DeliveryAddress:
+ description: The address the goods are to be delivered to
+ type: string
+ AttentionTo:
+ description: The person that the delivery is going to
+ type: string
+ Telephone:
+ description: The phone number for the person accepting the delivery
+ type: string
+ DeliveryInstructions:
+ description: A free text feild for instructions (500 characters max)
+ type: string
+ ExpectedArrivalDate:
+ description: The date the goods are expected to arrive.
+ type: string
+ x-is-msdate: true
+ PurchaseOrderID:
+ description: Xero generated unique identifier for purchase order
+ type: string
+ format: uuid
+ CurrencyRate:
+ description: The currency rate for a multicurrency purchase order. If no rate is specified, the XE.com day rate is used.
+ type: number
+ format: double
+ x-is-money: true
+ SubTotal:
+ description: Total of purchase order excluding taxes
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ TotalTax:
+ description: Total tax on purchase order
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ Total:
+ description: Total of Purchase Order tax inclusive (i.e. SubTotal + TotalTax)
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ TotalDiscount:
+ description: Total of discounts applied on the purchase order line items
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ HasAttachments:
+ description: boolean to indicate if a purchase order has an attachment
+ readOnly: true
+ type: boolean
+ default: "false"
+ example: "false"
+ UpdatedDateUTC:
+ description: Last modified date UTC format
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ StatusAttributeString:
+ description: A string to indicate if a invoice status
+ type: string
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Attachments:
+ description: Displays array of attachments from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/Attachment'
+ type: object
+ Pagination:
+ type: object
+ properties:
+ page:
+ type: integer
+ pageSize:
+ type: integer
+ pageCount:
+ type: integer
+ itemCount:
+ type: integer
+ Quotes:
+ type: object
+ x-objectArrayKey: quotes
+ properties:
+ Quotes:
+ type: array
+ items:
+ $ref: '#/components/schemas/Quote'
+ Quote:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/Quotes/
+ properties:
+ QuoteID:
+ description: QuoteID GUID is automatically generated and is returned after create or GET.
+ type: string
+ format: uuid
+ QuoteNumber:
+ description: Unique alpha numeric code identifying a quote (Max Length = 255)
+ maxLength: 255
+ type: string
+ Reference:
+ description: Additional reference number
+ maxLength: 4000
+ type: string
+ Terms:
+ description: Terms of the quote
+ maxLength: 4000
+ type: string
+ Contact:
+ $ref: '#/components/schemas/Contact'
+ type: string
+ LineItems:
+ description: See LineItems
+ type: array
+ items:
+ $ref: '#/components/schemas/LineItem'
+ Date:
+ description: Date quote was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation
+ type: string
+ x-is-msdate: true
+ DateString:
+ description: Date the quote was issued (YYYY-MM-DD)
+ type: string
+ ExpiryDate:
+ description: Date the quote expires – YYYY-MM-DD.
+ type: string
+ x-is-msdate: true
+ ExpiryDateString:
+ description: Date the quote expires – YYYY-MM-DD.
+ type: string
+ Status:
+ $ref: '#/components/schemas/QuoteStatusCodes'
+ type: string
+ CurrencyCode:
+ $ref: '#/components/schemas/CurrencyCode'
+ type: string
+ CurrencyRate:
+ description: The currency rate for a multicurrency quote
+ type: number
+ format: double
+ SubTotal:
+ description: Total of quote excluding taxes.
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ TotalTax:
+ description: Total tax on quote
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ Total:
+ description: Total of Quote tax inclusive (i.e. SubTotal + TotalTax). This will be ignored if it doesn’t equal the sum of the LineAmounts
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ TotalDiscount:
+ description: Total of discounts applied on the quote line items
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ Title:
+ description: Title text for the quote
+ type: string
+ maxLength: 100
+ Summary:
+ description: Summary text for the quote
+ type: string
+ maxLength: 3000
+ BrandingThemeID:
+ description: See BrandingThemes
+ type: string
+ format: uuid
+ UpdatedDateUTC:
+ description: Last modified date UTC format
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ LineAmountTypes:
+ $ref: '#/components/schemas/QuoteLineAmountTypes'
+ type: string
+ description: See Quote Line Amount Types
+ StatusAttributeString:
+ description: A string to indicate if a invoice status
+ type: string
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ type: object
+ QuoteLineAmountTypes:
+ description: Line amounts are exclusive of tax by default if you don’t specify this element. See Line Amount Types
+ type: string
+ enum:
+ - EXCLUSIVE
+ - INCLUSIVE
+ - NOTAX
+ QuoteStatusCodes:
+ description: The status of the quote.
+ type: string
+ enum:
+ - DRAFT
+ - SENT
+ - DECLINED
+ - ACCEPTED
+ - INVOICED
+ - DELETED
+ Receipts:
+ type: object
+ x-objectArrayKey: receipts
+ properties:
+ Receipts:
+ type: array
+ items:
+ $ref: '#/components/schemas/Receipt'
+ Receipt:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/receipts/
+ properties:
+ Date:
+ description: Date of receipt – YYYY-MM-DD
+ type: string
+ x-is-msdate: true
+ Contact:
+ $ref: '#/components/schemas/Contact'
+ LineItems:
+ type: array
+ items:
+ $ref: '#/components/schemas/LineItem'
+ User:
+ $ref: '#/components/schemas/User'
+ Reference:
+ description: Additional reference number
+ type: string
+ LineAmountTypes:
+ $ref: '#/components/schemas/LineAmountTypes'
+ type: string
+ SubTotal:
+ description: Total of receipt excluding taxes
+ type: number
+ format: double
+ x-is-money: true
+ TotalTax:
+ description: Total tax on receipt
+ type: number
+ format: double
+ x-is-money: true
+ Total:
+ description: Total of receipt tax inclusive (i.e. SubTotal + TotalTax)
+ type: number
+ format: double
+ x-is-money: true
+ ReceiptID:
+ description: Xero generated unique identifier for receipt
+ type: string
+ format: uuid
+ Status:
+ description: Current status of receipt – see status types
+ type: string
+ enum:
+ - DRAFT
+ - SUBMITTED
+ - AUTHORISED
+ - DECLINED
+ - VOIDED
+ ReceiptNumber:
+ description: Xero generated sequence number for receipt in current claim for a given user
+ readOnly: true
+ type: string
+ UpdatedDateUTC:
+ description: Last modified date UTC format
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ HasAttachments:
+ description: boolean to indicate if a receipt has an attachment
+ readOnly: true
+ type: boolean
+ default: "false"
+ example: "false"
+ Url:
+ description: URL link to a source document – shown as “Go to [appName]” in the Xero app
+ readOnly: true
+ type: string
+ ValidationErrors:
+ description: Displays array of validation error messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Warnings:
+ description: Displays array of warning messages from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ Attachments:
+ description: Displays array of attachments from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/Attachment'
+ type: object
+ RepeatingInvoices:
+ type: object
+ x-objectArrayKey: repeating_invoices
+ properties:
+ RepeatingInvoices:
+ type: array
+ items:
+ $ref: '#/components/schemas/RepeatingInvoice'
+ RepeatingInvoice:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/repeating-invoices/
+ properties:
+ Type:
+ description: See Invoice Types
+ type: string
+ enum:
+ - ACCPAY
+ - ACCREC
+ Contact:
+ $ref: '#/components/schemas/Contact'
+ Schedule:
+ $ref: '#/components/schemas/Schedule'
+ LineItems:
+ description: See LineItems
+ type: array
+ items:
+ $ref: '#/components/schemas/LineItem'
+ LineAmountTypes:
+ $ref: '#/components/schemas/LineAmountTypes'
+ type: string
+ Reference:
+ description: ACCREC only – additional reference number
+ type: string
+ BrandingThemeID:
+ description: See BrandingThemes
+ type: string
+ format: uuid
+ CurrencyCode:
+ $ref: '#/components/schemas/CurrencyCode'
+ type: string
+ Status:
+ description: One of the following - DRAFT or AUTHORISED – See Invoice Status Codes
+ type: string
+ enum:
+ - DRAFT
+ - AUTHORISED
+ - DELETED
+ SubTotal:
+ description: Total of invoice excluding taxes
+ type: number
+ format: double
+ x-is-money: true
+ TotalTax:
+ description: Total tax on invoice
+ type: number
+ format: double
+ x-is-money: true
+ Total:
+ description: Total of Invoice tax inclusive (i.e. SubTotal + TotalTax)
+ type: number
+ format: double
+ x-is-money: true
+ RepeatingInvoiceID:
+ description: Xero generated unique identifier for repeating invoice template
+ type: string
+ format: uuid
+ ID:
+ description: Xero generated unique identifier for repeating invoice template
+ type: string
+ format: uuid
+ HasAttachments:
+ description: Boolean to indicate if an invoice has an attachment
+ readOnly: true
+ type: boolean
+ default: "false"
+ example: "false"
+ Attachments:
+ description: Displays array of attachments from the API
+ type: array
+ items:
+ $ref: '#/components/schemas/Attachment'
+ ApprovedForSending:
+ description: Boolean to indicate whether the invoice has been approved for sending
+ type: boolean
+ default: "false"
+ example: "false"
+ SendCopy:
+ description: Boolean to indicate whether a copy is sent to sender's email
+ type: boolean
+ default: "false"
+ example: "false"
+ MarkAsSent:
+ description: Boolean to indicate whether the invoice in the Xero app displays as "sent"
+ type: boolean
+ default: "false"
+ example: "false"
+ IncludePDF:
+ description: Boolean to indicate whether to include PDF attachment
+ type: boolean
+ default: "false"
+ example: "false"
+ type: object
+ ReportWithRows:
+ type: object
+ properties:
+ Reports:
+ type: array
+ items:
+ $ref: '#/components/schemas/ReportWithRow'
+ ReportWithRow:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/reports/
+ properties:
+ ReportID:
+ description: ID of the Report
+ type: string
+ ReportName:
+ description: Name of the report
+ type: string
+ ReportTitle:
+ description: Title of the report
+ type: string
+ ReportType:
+ description: The type of report (BalanceSheet,ProfitLoss, etc)
+ type: string
+ ReportTitles:
+ description: Report titles array (3 to 4 strings with the report name, orgnisation name and time frame of report)
+ type: array
+ items:
+ type: string
+ ReportDate:
+ description: Date of report
+ type: string
+ Rows:
+ type: array
+ items:
+ $ref: '#/components/schemas/ReportRows'
+ UpdatedDateUTC:
+ description: Updated Date
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ Fields:
+ type: array
+ items:
+ $ref: '#/components/schemas/ReportFields'
+ ReportRows:
+ type: object
+ properties:
+ RowType:
+ $ref: '#/components/schemas/RowType'
+ Title:
+ type: string
+ Cells:
+ type: array
+ items:
+ $ref: '#/components/schemas/ReportCell'
+ Rows:
+ type: array
+ items:
+ $ref: '#/components/schemas/ReportRow'
+ RowType:
+ type: string
+ enum:
+ - Header
+ - Section
+ - Row
+ - SummaryRow
+ ReportRow:
+ type: object
+ properties:
+ RowType:
+ $ref: '#/components/schemas/RowType'
+ Title:
+ type: string
+ Cells:
+ type: array
+ items:
+ $ref: '#/components/schemas/ReportCell'
+ ReportCell:
+ type: object
+ properties:
+ Value:
+ type: string
+ Attributes:
+ type: array
+ items:
+ $ref: '#/components/schemas/ReportAttribute'
+ ReportAttribute:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/reports/
+ properties:
+ Id:
+ type: string
+ Value:
+ type: string
+ ReportFields:
+ type: object
+ properties:
+ FieldID:
+ type: string
+ Description:
+ type: string
+ Value:
+ type: string
+ Reports:
+ type: object
+ x-objectArrayKey: reports
+ properties:
+ Reports:
+ type: array
+ items:
+ $ref: '#/components/schemas/Report'
+ Report:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/reports/
+ properties:
+ ReportName:
+ description: See Prepayment Types
+ type: string
+ ReportType:
+ description: See Prepayment Types
+ type: string
+ enum:
+ - AgedPayablesByContact
+ ReportTitle:
+ description: See Prepayment Types
+ type: string
+ ReportDate:
+ description: Date of report
+ type: string
+ UpdatedDateUTC:
+ description: Updated Date
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ Contacts:
+ type: array
+ items:
+ $ref: '#/components/schemas/TenNinetyNineContact'
+ TenNinetyNineContact:
+ properties:
+ Box1:
+ description: Box 1 on 1099 Form
+ type: number
+ format: double
+ x-is-money: true
+ Box2:
+ description: Box 2 on 1099 Form
+ type: number
+ format: double
+ x-is-money: true
+ Box3:
+ description: Box 3 on 1099 Form
+ type: number
+ format: double
+ x-is-money: true
+ Box4:
+ description: Box 4 on 1099 Form
+ type: number
+ format: double
+ x-is-money: true
+ Box5:
+ description: Box 5 on 1099 Form
+ type: number
+ format: double
+ x-is-money: true
+ Box6:
+ description: Box 6 on 1099 Form
+ type: number
+ format: double
+ x-is-money: true
+ Box7:
+ description: Box 7 on 1099 Form
+ type: number
+ format: double
+ x-is-money: true
+ Box8:
+ description: Box 8 on 1099 Form
+ type: number
+ format: double
+ x-is-money: true
+ Box9:
+ description: Box 9 on 1099 Form
+ type: number
+ format: double
+ x-is-money: true
+ Box10:
+ description: Box 10 on 1099 Form
+ type: number
+ format: double
+ x-is-money: true
+ Box11:
+ description: Box 11 on 1099 Form
+ type: number
+ format: double
+ x-is-money: true
+ Box13:
+ description: Box 13 on 1099 Form
+ type: number
+ format: double
+ x-is-money: true
+ Box14:
+ description: Box 14 on 1099 Form
+ type: number
+ format: double
+ x-is-money: true
+ Name:
+ description: Contact name on 1099 Form
+ type: string
+ FederalTaxIDType:
+ description: Contact Fed Tax ID type
+ type: string
+ City:
+ description: Contact city on 1099 Form
+ type: string
+ Zip:
+ description: Contact zip on 1099 Form
+ type: string
+ State:
+ description: Contact State on 1099 Form
+ type: string
+ Email:
+ description: Contact email on 1099 Form
+ type: string
+ StreetAddress:
+ description: Contact address on 1099 Form
+ type: string
+ TaxID:
+ description: Contact tax id on 1099 Form
+ type: string
+ ContactId:
+ description: Contact contact id
+ type: string
+ format: uuid
+ LegalName:
+ description: Contact legal name
+ type: string
+ BusinessName:
+ description: Contact business name
+ type: string
+ FederalTaxClassification:
+ description: Contact federal tax classification
+ type: string
+ enum:
+ - SOLE_PROPRIETOR
+ - PARTNERSHIP
+ - TRUST_OR_ESTATE
+ - NONPROFIT
+ - C_CORP
+ - S_CORP
+ - OTHER
+ Schedule:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/repeating-invoices/
+ properties:
+ Period:
+ description: Integer used with the unit e.g. 1 (every 1 week), 2 (every 2 months)
+ type: integer
+ Unit:
+ description: One of the following - WEEKLY or MONTHLY
+ type: string
+ enum:
+ - WEEKLY
+ - MONTHLY
+ DueDate:
+ description: Integer used with due date type e.g 20 (of following month), 31 (of current month)
+ type: integer
+ DueDateType:
+ description: the payment terms
+ type: string
+ enum:
+ - DAYSAFTERBILLDATE
+ - DAYSAFTERBILLMONTH
+ - DAYSAFTERINVOICEDATE
+ - DAYSAFTERINVOICEMONTH
+ - OFCURRENTMONTH
+ - OFFOLLOWINGMONTH
+ StartDate:
+ description: Date the first invoice of the current version of the repeating schedule was generated (changes when repeating invoice is edited)
+ type: string
+ x-is-msdate: true
+ NextScheduledDate:
+ description: The calendar date of the next invoice in the schedule to be generated
+ type: string
+ x-is-msdate: true
+ EndDate:
+ description: Invoice end date – only returned if the template has an end date set
+ type: string
+ x-is-msdate: true
+ type: object
+ TaxRates:
+ type: object
+ x-objectArrayKey: tax_rates
+ properties:
+ TaxRates:
+ type: array
+ items:
+ $ref: '#/components/schemas/TaxRate'
+ TaxType:
+ description: See Tax Types – can only be used on update calls
+ type: string
+ enum:
+ - OUTPUT
+ - INPUT
+ - CAPEXINPUT
+ - EXEMPTEXPORT
+ - EXEMPTEXPENSES
+ - EXEMPTCAPITAL
+ - EXEMPTOUTPUT
+ - INPUTTAXED
+ - BASEXCLUDED
+ - GSTONCAPIMPORTS
+ - GSTONIMPORTS
+ - NONE
+ - INPUT2
+ - ZERORATED
+ - OUTPUT2
+ - CAPEXINPUT2
+ - CAPEXOUTPUT
+ - CAPEXOUTPUT2
+ - CAPEXSRINPUT
+ - CAPEXSROUTPUT
+ - ECACQUISITIONS
+ - ECZRINPUT
+ - ECZROUTPUT
+ - ECZROUTPUTSERVICES
+ - EXEMPTINPUT
+ - REVERSECHARGES
+ - RRINPUT
+ - RROUTPUT
+ - SRINPUT
+ - SROUTPUT
+ - ZERORATEDINPUT
+ - ZERORATEDOUTPUT
+ - BLINPUT
+ - DSOUTPUT
+ - EPINPUT
+ - ES33OUTPUT
+ - ESN33OUTPUT
+ - IGDSINPUT2
+ - IMINPUT2
+ - MEINPUT
+ - NRINPUT
+ - OPINPUT
+ - OSOUTPUT
+ - TXESSINPUT
+ - TXN33INPUT
+ - TXPETINPUT
+ - TXREINPUT
+ - INPUT3
+ - INPUT4
+ - OUTPUT3
+ - OUTPUT4
+ - SROUTPUT2
+ - TXCA
+ - SRCAS
+ - BLINPUT2
+ - DRCHARGESUPPLY20
+ - DRCHARGE20
+ - DRCHARGESUPPLY5
+ - DRCHARGE5
+ - BADDEBTRELIEF
+ - IGDSINPUT3
+ - SROVR
+ - TOURISTREFUND
+ - TXRCN33
+ - TXRCRE
+ - TXRCESS
+ - TXRCTS
+ - OUTPUTY23
+ - DSOUTPUTY23
+ - INPUTY23
+ - IMINPUT2Y23
+ - IGDSINPUT2Y23
+ - TXPETINPUTY23
+ - TXESSINPUTY23
+ - TXN33INPUTY23
+ - TXREINPUTY23
+ - TXCAY23
+ - BADDEBTRELIEFY23
+ - IGDSINPUT3Y23
+ - SROVRRSY23
+ - SROVRLVGY23
+ - SRLVGY23
+ - TXRCN33Y23
+ - TXRCREY23
+ - TXRCESSY23
+ - TXRCTSY23
+ - IM
+ - IMY23
+ - IMESS
+ - IMESSY23
+ - IMN33
+ - IMN33Y23
+ - IMRE
+ - IMREY23
+ - BADDEBTRECOVERY
+ - BADDEBTRECOVERYY23
+ - OUTPUTY24
+ - DSOUTPUTY24
+ - INPUTY24
+ - IGDSINPUT2Y24
+ - TXPETINPUTY24
+ - TXESSINPUTY24
+ - TXN33INPUTY24
+ - TXREINPUTY24
+ - TXCAY24
+ - BADDEBTRELIEFY24
+ - IGDSINPUT3Y24
+ - SROVRRSY24
+ - SROVRLVGY24
+ - SRLVGY24
+ - TXRCTSY24
+ - TXRCESSY24
+ - TXRCN33Y24
+ - TXRCREY24
+ - IMY24
+ - IMESSY24
+ - IMN33Y24
+ - IMREY24
+ - BADDEBTRECOVERYY24
+ - OSOUTPUT2
+ - BLINPUT3
+ - BLINPUT3Y23
+ - BLINPUT3Y24
+ Setup:
+ externalDocs:
+ url: https://developer.xero.com/documentation/api-guides/conversions
+ properties:
+ ConversionDate:
+ $ref: '#/components/schemas/ConversionDate'
+ ConversionBalances:
+ description: Balance supplied for each account that has a value as at the conversion date.
+ type: array
+ items:
+ $ref: '#/components/schemas/ConversionBalances'
+ Accounts:
+ type: array
+ items:
+ $ref: '#/components/schemas/Account'
+ ConversionDate:
+ description: The date when the organisation starts using Xero
+ type: object
+ properties:
+ Month:
+ description: The month the organisation starts using Xero. Value is an integer between 1 and 12
+ type: integer
+ example: 1
+ Year:
+ description: The year the organisation starts using Xero. Value is an integer greater than 2006
+ type: integer
+ example: 2020
+ ConversionBalances:
+ description: Balance supplied for each account that has a value as at the conversion date.
+ properties:
+ AccountCode:
+ description: The account code for a account
+ type: string
+ Balance:
+ description: The opening balances of the account. Debits are positive, credits are negative values
+ type: number
+ format: double
+ BalanceDetails:
+ type: array
+ items:
+ $ref: '#/components/schemas/BalanceDetails'
+ type: object
+ BalanceDetails:
+ description: An array to specify multiple currency balances of an account
+ properties:
+ Balance:
+ description: The opening balances of the account. Debits are positive, credits are negative values
+ type: number
+ format: double
+ CurrencyCode:
+ description: The currency of the balance (Not required for base currency)
+ type: string
+ CurrencyRate:
+ description: (Optional) Exchange rate to base currency when money is spent or received. If not specified, XE rate for the day is applied
+ type: number
+ format: double
+ x-is-money: true
+ type: object
+ ImportSummaryObject:
+ externalDocs:
+ url: https://developer.xero.com/documentation/api-guides/conversions
+ properties:
+ ImportSummary:
+ $ref: '#/components/schemas/ImportSummary'
+ ImportSummary:
+ externalDocs:
+ url: https://developer.xero.com/documentation/api-guides/conversions
+ description: A summary of the import from setup endpoint
+ type: object
+ properties:
+ Accounts:
+ $ref: '#/components/schemas/ImportSummaryAccounts'
+ Organisation:
+ $ref: '#/components/schemas/ImportSummaryOrganisation'
+ ImportSummaryAccounts:
+ description: A summary of the accounts changes
+ type: object
+ properties:
+ Total:
+ description: The total number of accounts in the org
+ type: integer
+ format: int32
+ New:
+ description: The number of new accounts created
+ type: integer
+ format: int32
+ Updated:
+ description: The number of accounts updated
+ type: integer
+ format: int32
+ Deleted:
+ description: The number of accounts deleted
+ type: integer
+ format: int32
+ Locked:
+ description: The number of locked accounts
+ type: integer
+ format: int32
+ System:
+ description: The number of system accounts
+ type: integer
+ format: int32
+ Errored:
+ description: The number of accounts that had an error
+ type: integer
+ format: int32
+ Present:
+ type: boolean
+ NewOrUpdated:
+ description: The number of new or updated accounts
+ type: integer
+ format: int32
+ ImportSummaryOrganisation:
+ type: object
+ properties:
+ Present:
+ type: boolean
+ TaxRate:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/tax-rates/
+ properties:
+ Name:
+ description: Name of tax rate
+ type: string
+ TaxType:
+ description: The tax type
+ type: string
+ TaxComponents:
+ description: See TaxComponents
+ type: array
+ items:
+ $ref: '#/components/schemas/TaxComponent'
+ Status:
+ description: See Status Codes
+ type: string
+ enum:
+ - ACTIVE
+ - DELETED
+ - ARCHIVED
+ - PENDING
+ ReportTaxType:
+ description: See ReportTaxTypes
+ type: string
+ enum:
+ - AVALARA
+ - BASEXCLUDED
+ - CAPITALSALESOUTPUT
+ - CAPITALEXPENSESINPUT
+ - ECOUTPUT
+ - ECOUTPUTSERVICES
+ - ECINPUT
+ - ECACQUISITIONS
+ - EXEMPTEXPENSES
+ - EXEMPTINPUT
+ - EXEMPTOUTPUT
+ - GSTONIMPORTS
+ - INPUT
+ - INPUTTAXED
+ - MOSSSALES
+ - NONE
+ - NONEOUTPUT
+ - OUTPUT
+ - PURCHASESINPUT
+ - SALESOUTPUT
+ - EXEMPTCAPITAL
+ - EXEMPTEXPORT
+ - CAPITALEXINPUT
+ - GSTONCAPIMPORTS
+ - GSTONCAPITALIMPORTS
+ - REVERSECHARGES
+ - PAYMENTS
+ - INVOICE
+ - CASH
+ - ACCRUAL
+ - FLATRATECASH
+ - FLATRATEACCRUAL
+ - ACCRUALS
+ - TXCA
+ - SRCAS
+ - DSOUTPUT
+ - BLINPUT2
+ - EPINPUT
+ - IMINPUT2
+ - MEINPUT
+ - IGDSINPUT2
+ - ESN33OUTPUT
+ - OPINPUT
+ - OSOUTPUT
+ - TXN33INPUT
+ - TXESSINPUT
+ - TXREINPUT
+ - TXPETINPUT
+ - NRINPUT
+ - ES33OUTPUT
+ - ZERORATEDINPUT
+ - ZERORATEDOUTPUT
+ - DRCHARGESUPPLY
+ - DRCHARGE
+ - CAPINPUT
+ - CAPIMPORTS
+ - IMINPUT
+ - INPUT2
+ - CIUINPUT
+ - SRINPUT
+ - OUTPUT2
+ - SROUTPUT
+ - CAPOUTPUT
+ - SROUTPUT2
+ - CIUOUTPUT
+ - ZROUTPUT
+ - ZREXPORT
+ - ACC28PLUS
+ - ACCUPTO28
+ - OTHEROUTPUT
+ - SHOUTPUT
+ - ZRINPUT
+ - BADDEBT
+ - OTHERINPUT
+ - BADDEBTRELIEF
+ - IGDSINPUT3
+ - SROVR
+ - TOURISTREFUND
+ - TXRCN33
+ - TXRCRE
+ - TXRCESS
+ - TXRCTS
+ - CAPEXINPUT
+ - UNDEFINED
+ - CAPEXOUTPUT
+ - ZEROEXPOUTPUT
+ - GOODSIMPORT
+ - NONEINPUT
+ - NOTREPORTED
+ - SROVRRS
+ - SROVRLVG
+ - SRLVG
+ - IM
+ - IMESS
+ - IMN33
+ - IMRE
+ - BADDEBTRECOVERY
+ - USSALESTAX
+ - BLINPUT3
+ CanApplyToAssets:
+ description: Boolean to describe if tax rate can be used for asset accounts i.e. true,false
+ readOnly: true
+ type: boolean
+ CanApplyToEquity:
+ description: Boolean to describe if tax rate can be used for equity accounts i.e true,false
+ readOnly: true
+ type: boolean
+ CanApplyToExpenses:
+ description: Boolean to describe if tax rate can be used for expense accounts i.e. true,false
+ readOnly: true
+ type: boolean
+ CanApplyToLiabilities:
+ description: Boolean to describe if tax rate can be used for liability accounts i.e. true,false
+ readOnly: true
+ type: boolean
+ CanApplyToRevenue:
+ description: Boolean to describe if tax rate can be used for revenue accounts i.e. true,false
+ readOnly: true
+ type: boolean
+ DisplayTaxRate:
+ description: Tax Rate (decimal to 4dp) e.g 12.5000
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ EffectiveRate:
+ description: Effective Tax Rate (decimal to 4dp) e.g 12.5000
+ readOnly: true
+ type: number
+ format: double
+ x-is-money: true
+ type: object
+ TaxComponent:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/tax-rates/
+ properties:
+ Name:
+ description: Name of Tax Component
+ type: string
+ Rate:
+ description: Tax Rate (up to 4dp)
+ type: number
+ format: double
+ x-is-money: true
+ IsCompound:
+ description: Boolean to describe if Tax rate is compounded.
+ type: boolean
+ IsNonRecoverable:
+ description: Boolean to describe if tax rate is non-recoverable. Non-recoverable rates are only applicable to Canadian organisations
+ type: boolean
+ type: object
+ TrackingCategories:
+ type: object
+ x-objectArrayKey: tracking_categories
+ properties:
+ TrackingCategories:
+ type: array
+ items:
+ $ref: '#/components/schemas/TrackingCategory'
+ TrackingCategory:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/tracking-categories/
+ properties:
+ TrackingCategoryID:
+ description: The Xero identifier for a tracking category e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
+ type: string
+ format: uuid
+ TrackingOptionID:
+ description: The Xero identifier for a tracking option e.g. dc54c220-0140-495a-b925-3246adc0075f
+ type: string
+ format: uuid
+ Name:
+ description: The name of the tracking category e.g. Department, Region (max length = 100)
+ maxLength: 100
+ type: string
+ Option:
+ description: The option name of the tracking option e.g. East, West (max length = 100)
+ maxLength: 100
+ type: string
+ Status:
+ description: The status of a tracking category
+ type: string
+ enum:
+ - ACTIVE
+ - ARCHIVED
+ - DELETED
+ Options:
+ description: See Tracking Options
+ type: array
+ items:
+ $ref: '#/components/schemas/TrackingOption'
+ type: object
+ TrackingOptions:
+ type: object
+ x-objectArrayKey: options
+ properties:
+ Options:
+ type: array
+ items:
+ $ref: '#/components/schemas/TrackingOption'
+ TrackingOption:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/tracking-categories/
+ properties:
+ TrackingOptionID:
+ description: The Xero identifier for a tracking option e.g. ae777a87-5ef3-4fa0-a4f0-d10e1f13073a
+ type: string
+ format: uuid
+ Name:
+ description: The name of the tracking option e.g. Marketing, East (max length = 100)
+ maxLength: 100
+ type: string
+ Status:
+ description: The status of a tracking option
+ type: string
+ enum:
+ - ACTIVE
+ - ARCHIVED
+ - DELETED
+ TrackingCategoryID:
+ description: Filter by a tracking category e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
+ type: string
+ format: uuid
+ type: object
+ SalesTrackingCategory:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/tracking-categories/
+ properties:
+ TrackingCategoryName:
+ description: The default sales tracking category name for contacts
+ type: string
+ TrackingOptionName:
+ description: The default purchase tracking category name for contacts
+ type: string
+ type: object
+ Users:
+ type: object
+ x-objectArrayKey: users
+ properties:
+ Users:
+ type: array
+ items:
+ $ref: '#/components/schemas/User'
+ User:
+ externalDocs:
+ url: http://developer.xero.com/documentation/api/users/
+ properties:
+ UserID:
+ description: Xero identifier
+ type: string
+ format: uuid
+ EmailAddress:
+ description: Email address of user
+ type: string
+ FirstName:
+ description: First name of user
+ type: string
+ LastName:
+ description: Last name of user
+ type: string
+ UpdatedDateUTC:
+ description: Timestamp of last change to user
+ type: string
+ x-is-msdate-time: true
+ example: /Date(1573755038314)/
+ readOnly: true
+ IsSubscriber:
+ description: Boolean to indicate if user is the subscriber
+ type: boolean
+ OrganisationRole:
+ description: User role that defines permissions in Xero and via API (READONLY, INVOICEONLY, STANDARD, FINANCIALADVISER, etc)
+ type: string
+ enum:
+ - READONLY
+ - INVOICEONLY
+ - STANDARD
+ - FINANCIALADVISER
+ - MANAGEDCLIENT
+ - CASHBOOKCLIENT
+ - UNKNOWN
+ type: object
+ Error:
+ externalDocs:
+ url: https://developer.xero.com/documentation/api/http-response-codes
+ properties:
+ ErrorNumber:
+ description: Exception number
+ type: integer
+ Type:
+ description: Exception type
+ type: string
+ Message:
+ description: Exception message
+ type: string
+ Elements:
+ description: Array of Elements of validation Errors
+ type: array
+ items:
+ $ref: '#/components/schemas/Element'
+ type: object
+ Element:
+ externalDocs:
+ url: https://developer.xero.com/documentation/api/http-response-codes
+ properties:
+ ValidationErrors:
+ description: Array of Validation Error message
+ type: array
+ items:
+ $ref: '#/components/schemas/ValidationError'
+ BatchPaymentID:
+ description: Unique ID for batch payment object with validation error
+ type: string
+ format: uuid
+ BankTransactionID:
+ type: string
+ format: uuid
+ CreditNoteID:
+ type: string
+ format: uuid
+ ContactID:
+ type: string
+ format: uuid
+ InvoiceID:
+ type: string
+ format: uuid
+ ItemID:
+ type: string
+ format: uuid
+ PurchaseOrderID:
+ type: string
+ format: uuid
+ type: object
+ ValidationError:
+ externalDocs:
+ url: https://developer.xero.com/documentation/api/http-response-codes
+ properties:
+ Message:
+ description: Validation error message
+ type: string
+ type: object
+ InvoiceAddress:
+ properties:
+ InvoiceAddressType:
+ description: Indicates whether the address is defined as origin (FROM) or destination (TO)
+ type: string
+ enum:
+ - FROM
+ - TO
+ AddressLine1:
+ description: First line of a physical address
+ type: string
+ AddressLine2:
+ description: Second line of a physical address
+ type: string
+ AddressLine3:
+ description: Third line of a physical address
+ type: string
+ AddressLine4:
+ description: Fourth line of a physical address
+ type: string
+ City:
+ description: City of a physical address
+ type: string
+ Region:
+ description: Region or state of a physical address
+ type: string
+ PostalCode:
+ description: Postal code of a physical address
+ type: string
+ Country:
+ description: Country of a physical address
+ type: string
+ type: object
+ TaxBreakdownComponent:
+ properties:
+ TaxComponentId:
+ description: The unique ID number of this component
+ type: string
+ format: uuid
+ Type:
+ description: The type of the jurisdiction
+ type: string
+ enum:
+ - SYSGST/USCOUNTRY
+ - SYSGST/USSTATE
+ - SYSGST/USCOUNTY
+ - SYSGST/USCITY
+ - SYSGST/USSPECIAL
+ Name:
+ description: The name of the jurisdiction
+ type: string
+ TaxPercentage:
+ description: The percentage of the tax
+ type: number
+ TaxAmount:
+ description: The amount of the tax
+ type: number
+ TaxableAmount:
+ description: The amount that is taxable
+ type: number
+ NonTaxableAmount:
+ description: The amount that is not taxable
+ type: number
+ ExemptAmount:
+ description: The amount that is exempt
+ type: number
+ StateAssignedNo:
+ description: The state assigned number of the jurisdiction
+ type: string
+ JurisdictionRegion:
+ description: Name identifying the region within the country
+ type: string
+ type: object
diff --git a/xero_assets.yaml b/xero_assets.yaml
index 8de57948..af6d7fde 100644
--- a/xero_assets.yaml
+++ b/xero_assets.yaml
@@ -1,16 +1,16 @@
openapi: 3.0.0
info:
- version: "6.3.0"
+ version: 6.3.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/"
+ termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/
contact:
- name: "Xero Platform Team"
- email: "api@xero.com"
- url: "https://developer.xero.com"
+ name: Xero Platform Team
+ email: api@xero.com
+ url: https://developer.xero.com
license:
- name: MIT
- url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE'
+ name: MIT
+ url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE
servers:
- description: Xero API servers
url: https://api.xero.com/assets.xro/1.0
@@ -20,172 +20,149 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [assets, assets.read]
+ - OAuth2:
+ - assets
+ - assets.read
tags:
- Asset
- summary: searches fixed asset
+ summary: searches fixed asset
operationId: getAssets
- description: By passing in the appropriate options, you can search for
- available fixed asset in the system
- parameters:
+ description: By passing in the appropriate options, you can search for available fixed asset in the system
+ parameters:
- name: status
in: query
description: Required when retrieving a collection of assets. See Asset Status Codes
- schema:
+ schema:
$ref: '#/components/schemas/AssetStatusQueryParam'
required: true
- name: page
in: query
description: Results are paged. This specifies which page of the results to return. The default page is 1.
- schema:
+ schema:
type: integer
example: 1
- name: pageSize
x-snake: page_size
in: query
description: The number of records returned per page. By default the number of records returned is 10.
- schema:
+ schema:
type: integer
example: 5
- name: orderBy
x-snake: order_by
in: query
description: Requests can be ordered by AssetType, AssetName, AssetNumber, PurchaseDate and PurchasePrice. If the asset status is DISPOSED it also allows DisposalDate and DisposalPrice.
- schema:
+ schema:
type: string
- enum:
- - AssetType
- - AssetName
- - AssetNumber
- - PurchaseDate
- - PurchasePrice
- - DisposalDate
- - DisposalPrice
+ enum:
+ - AssetType
+ - AssetName
+ - AssetNumber
+ - PurchaseDate
+ - PurchasePrice
+ - DisposalDate
+ - DisposalPrice
example: AssetName
- name: sortDirection
x-snake: sort_direction
in: query
description: ASC or DESC
- schema:
+ schema:
type: string
- enum:
- - asc
- - desc
+ enum:
+ - asc
+ - desc
example: ASC
- name: filterBy
x-snake: filter_by
in: query
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.
- schema:
+ schema:
type: string
- example: "Company Car"
+ example: Company Car
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Assets'
- example: {
- "pagination":{
- "page":1,
- "pageSize":10,
- "pageCount":2,
- "itemCount":11,
- "links":{
- "first":{
- "href":"http://asset.favorit.xero.com/v1/assets?status=DRAFT&page=1"
- },
- "next":{
- "href":"http://asset.favorit.xero.com/v1/assets?status=DRAFT&page=2"
- },
- "last":{
- "href":"http://asset.favorit.xero.com/v1/assets?status=DRAFT&page=2"
- }
- }
- },
- "items":[
- {
- "assetId":"68f17094-af97-4f1b-b36b-013b45b6ad3c",
- "assetName":"Computer47822",
- "assetNumber":"123478074",
- "purchaseDate":"2020-01-01T00:00:00",
- "purchasePrice":100.0000,
- "disposalPrice":0.0,
- "assetStatus":"Draft",
- "trackingItems":[
- ],
- "bookDepreciationSetting":{
- "depreciableObjectId":"68f17094-af97-4f1b-b36b-013b45b6ad3c",
- "depreciableObjectType":"Asset",
- "bookEffectiveDateOfChangeId":"5da77739-7f22-4109-b0a0-67480fb89af0",
- "depreciationMethod":"StraightLine",
- "averagingMethod":"ActualDays",
- "depreciationRate":0.50,
- "depreciationCalculationMethod":"None"
- },
- "bookDepreciationDetail":{
- "depreciationStartDate":"2020-01-02T00:00:00",
- "priorAccumDepreciationAmount":0.000000,
- "currentAccumDepreciationAmount":0.000000,
- "currentCapitalGain":0.000000,
- "currentGainLoss":0.000000
- },
- "taxDepreciationSettings":[
- ],
- "taxDepreciationDetails":[
- ],
- "canRollback":true,
- "accountingBookValue":100.000000,
- "taxValues":[
- ],
- "isDeleteEnabledForDate":false
- },
- {
- "assetId":"52ea3adf-f04a-4577-8fd2-43c52a256bd5",
- "assetName":"Computer4148",
- "assetNumber":"123466620",
- "purchaseDate":"2020-01-01T00:00:00",
- "purchasePrice":100.0000,
- "disposalPrice":0.0,
- "assetStatus":"Draft",
- "trackingItems":[
-
- ],
- "bookDepreciationSetting":{
- "depreciableObjectId":"52ea3adf-f04a-4577-8fd2-43c52a256bd5",
- "depreciableObjectType":"Asset",
- "bookEffectiveDateOfChangeId":"c0d5280f-28b6-4329-b5b7-36e08c662010",
- "depreciationMethod":"StraightLine",
- "averagingMethod":"ActualDays",
- "depreciationRate":0.50,
- "depreciationCalculationMethod":"None"
- },
- "bookDepreciationDetail":{
- "depreciationStartDate":"2020-01-02T00:00:00",
- "priorAccumDepreciationAmount":0.000000,
- "currentAccumDepreciationAmount":0.000000,
- "currentCapitalGain":0.000000,
- "currentGainLoss":0.000000
- },
- "taxDepreciationSettings":[
- ],
- "taxDepreciationDetails":[
- ],
- "canRollback":true,
- "accountingBookValue":100.000000,
- "taxValues":[
-
- ],
- "isDeleteEnabledForDate":false
- }
- ]
- }
- '400':
+ example:
+ pagination:
+ page: 1
+ pageSize: 10
+ pageCount: 2
+ itemCount: 11
+ links:
+ first:
+ href: http://asset.favorit.xero.com/v1/assets?status=DRAFT&page=1
+ next:
+ href: http://asset.favorit.xero.com/v1/assets?status=DRAFT&page=2
+ last:
+ href: http://asset.favorit.xero.com/v1/assets?status=DRAFT&page=2
+ items:
+ - assetId: 68f17094-af97-4f1b-b36b-013b45b6ad3c
+ assetName: Computer47822
+ assetNumber: "123478074"
+ purchaseDate: 2020-01-01T00:00:00
+ purchasePrice: 100.0000
+ disposalPrice: 0.0
+ assetStatus: Draft
+ trackingItems: []
+ bookDepreciationSetting:
+ depreciableObjectId: 68f17094-af97-4f1b-b36b-013b45b6ad3c
+ depreciableObjectType: Asset
+ bookEffectiveDateOfChangeId: 5da77739-7f22-4109-b0a0-67480fb89af0
+ depreciationMethod: StraightLine
+ averagingMethod: ActualDays
+ depreciationRate: 0.50
+ depreciationCalculationMethod: None
+ bookDepreciationDetail:
+ depreciationStartDate: 2020-01-02T00:00:00
+ priorAccumDepreciationAmount: 0.000000
+ currentAccumDepreciationAmount: 0.000000
+ currentCapitalGain: 0.000000
+ currentGainLoss: 0.000000
+ taxDepreciationSettings: []
+ taxDepreciationDetails: []
+ canRollback: true
+ accountingBookValue: 100.000000
+ taxValues: []
+ isDeleteEnabledForDate: false
+ - assetId: 52ea3adf-f04a-4577-8fd2-43c52a256bd5
+ assetName: Computer4148
+ assetNumber: "123466620"
+ purchaseDate: 2020-01-01T00:00:00
+ purchasePrice: 100.0000
+ disposalPrice: 0.0
+ assetStatus: Draft
+ trackingItems: []
+ bookDepreciationSetting:
+ depreciableObjectId: 52ea3adf-f04a-4577-8fd2-43c52a256bd5
+ depreciableObjectType: Asset
+ bookEffectiveDateOfChangeId: c0d5280f-28b6-4329-b5b7-36e08c662010
+ depreciationMethod: StraightLine
+ averagingMethod: ActualDays
+ depreciationRate: 0.50
+ depreciationCalculationMethod: None
+ bookDepreciationDetail:
+ depreciationStartDate: 2020-01-02T00:00:00
+ priorAccumDepreciationAmount: 0.000000
+ currentAccumDepreciationAmount: 0.000000
+ currentCapitalGain: 0.000000
+ currentGainLoss: 0.000000
+ taxDepreciationSettings: []
+ taxDepreciationDetails: []
+ canRollback: true
+ accountingBookValue: 100.000000
+ taxValues: []
+ isDeleteEnabledForDate: false
+ "400":
description: bad input parameter
post:
security:
- - OAuth2: [assets]
+ - OAuth2:
+ - assets
tags:
- Asset
summary: adds a fixed asset
@@ -195,7 +172,7 @@ paths:
x-hasAssetsValidationError: true
x-example:
- asset:
- is_object: true
+ is_object: true
key: asset
keyPascal: Asset
- assetName:
@@ -203,7 +180,7 @@ paths:
keyPascal: assetName
keySnake: asset_name
csharp: AssetName
- default: "Other Computer"
+ default: Other Computer
object: asset
- assetNumber:
key: assetnumber
@@ -227,180 +204,163 @@ paths:
object: asset
description: Adds an asset to the system
responses:
- '200':
+ "200":
description: return single object - create new asset
content:
application/json:
schema:
$ref: '#/components/schemas/Asset'
- example: {
- "assetId":"2257c64a-77ca-444c-a5ea-fa9a588c7039",
- "assetName":"Computer74863",
- "assetNumber":"123477544",
- "purchaseDate":"2020-01-01T00:00:00",
- "purchasePrice":100.0000,
- "disposalPrice":23.2300,
- "assetStatus":"Draft",
- "trackingItems":[],
- "bookDepreciationSetting":{
- "depreciableObjectId":"2257c64a-77ca-444c-a5ea-fa9a588c7039",
- "depreciableObjectType":"Asset",
- "bookEffectiveDateOfChangeId":"b58a2ace-1213-4681-9f11-2e30f57b5b8c",
- "depreciationMethod":"StraightLine",
- "averagingMethod":"ActualDays",
- "depreciationRate":0.50,
- "depreciationCalculationMethod":"None"
- },
- "bookDepreciationDetail":{
- "depreciationStartDate":"2020-01-02T00:00:00",
- "priorAccumDepreciationAmount":0.000000,
- "currentAccumDepreciationAmount":0.000000,
- "currentCapitalGain":0.000000,
- "currentGainLoss":0.000000
- },
- "taxDepreciationSettings":[
- ],
- "taxDepreciationDetails":[],
- "canRollback":true,
- "accountingBookValue":76.770000,
- "taxValues":[],
- "isDeleteEnabledForDate":true
- }
- '400':
- description: 'invalid input, object invalid'
+ example:
+ assetId: 2257c64a-77ca-444c-a5ea-fa9a588c7039
+ assetName: Computer74863
+ assetNumber: "123477544"
+ purchaseDate: 2020-01-01T00:00:00
+ purchasePrice: 100.0000
+ disposalPrice: 23.2300
+ assetStatus: Draft
+ trackingItems: []
+ bookDepreciationSetting:
+ depreciableObjectId: 2257c64a-77ca-444c-a5ea-fa9a588c7039
+ depreciableObjectType: Asset
+ bookEffectiveDateOfChangeId: b58a2ace-1213-4681-9f11-2e30f57b5b8c
+ depreciationMethod: StraightLine
+ averagingMethod: ActualDays
+ depreciationRate: 0.50
+ depreciationCalculationMethod: None
+ bookDepreciationDetail:
+ depreciationStartDate: 2020-01-02T00:00:00
+ priorAccumDepreciationAmount: 0.000000
+ currentAccumDepreciationAmount: 0.000000
+ currentCapitalGain: 0.000000
+ currentGainLoss: 0.000000
+ taxDepreciationSettings: []
+ taxDepreciationDetails: []
+ canRollback: true
+ accountingBookValue: 76.770000
+ taxValues: []
+ isDeleteEnabledForDate: true
+ "400":
+ description: invalid input, object invalid
content:
application/json:
- example: {
- "resourceValidationErrors":[ ],
- "fieldValidationErrors":[
- {
- "fieldName":"BookDepreciationSetting.DepreciationRate",
- "valueProvided":"",
- "localisedMessage":"Can''t have both Depreciation Rate and Effective Life",
- "type":"http://common.service.xero.com/errors/validation/field",
- "title":"Validation Error",
- "detail":"Can''t have both Depreciation Rate and Effective Life"
- }
- ],
- "type":"http://common.service.xero.com/errors/validation",
- "title":"The resource update failed validation.",
- "detail":"Validation Errors"
- }
+ example:
+ resourceValidationErrors: []
+ fieldValidationErrors:
+ - fieldName: BookDepreciationSetting.DepreciationRate
+ valueProvided: ""
+ localisedMessage: Can''t have both Depreciation Rate and Effective Life
+ type: http://common.service.xero.com/errors/validation/field
+ title: Validation Error
+ detail: Can''t have both Depreciation Rate and Effective Life
+ type: http://common.service.xero.com/errors/validation
+ title: The resource update failed validation.
+ detail: Validation Errors
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Asset'
- example: {
- "assetName":"Computer74863",
- "assetNumber":"123477544",
- "purchaseDate":"2020-01-01",
- "purchasePrice":100.0,
- "disposalPrice":23.23,
- "assetStatus":"Draft",
- "bookDepreciationSetting":{
- "depreciationMethod":"StraightLine",
- "averagingMethod":"ActualDays",
- "depreciationRate":0.5,
- "depreciationCalculationMethod":"None"
- },
- "bookDepreciationDetail":{
- "currentCapitalGain":5.32,
- "currentGainLoss":3.88,
- "depreciationStartDate":"2020-01-02",
- "costLimit":100.0,
- "currentAccumDepreciationAmount":2.25
- },
- "AccountingBookValue":99.5
- }
+ example:
+ assetName: Computer74863
+ assetNumber: "123477544"
+ purchaseDate: "2020-01-01"
+ purchasePrice: 100.0
+ disposalPrice: 23.23
+ assetStatus: Draft
+ bookDepreciationSetting:
+ depreciationMethod: StraightLine
+ averagingMethod: ActualDays
+ depreciationRate: 0.5
+ depreciationCalculationMethod: None
+ bookDepreciationDetail:
+ currentCapitalGain: 5.32
+ currentGainLoss: 3.88
+ depreciationStartDate: "2020-01-02"
+ costLimit: 100.0
+ currentAccumDepreciationAmount: 2.25
+ AccountingBookValue: 99.5
description: Fixed asset you are creating
/Assets/{id}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [assets, assets.read]
+ - OAuth2:
+ - assets
+ - assets.read
tags:
- Asset
- summary: Retrieves fixed asset by id
+ summary: Retrieves fixed asset by id
operationId: getAssetById
description: |
By passing in the appropriate asset id, you can search for
a specific fixed asset in the system
- parameters:
+ parameters:
- name: id
in: path
required: true
description: fixed asset id for single object
- schema:
+ schema:
type: string
format: uuid
- example: "00000000-0000-0000-0000-000000000000"
+ example: 00000000-0000-0000-0000-000000000000
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Asset'
- example: {
- "assetId":"68f17094-af97-4f1b-b36b-013b45b6ad3c",
- "assetName":"Computer47822",
- "assetNumber":"123478074",
- "purchaseDate":"2020-01-01T00:00:00",
- "purchasePrice":100.0000,
- "disposalPrice":23.0000,
- "assetStatus":"Draft",
- "trackingItems":[
-
- ],
- "bookDepreciationSetting":{
- "depreciableObjectId":"68f17094-af97-4f1b-b36b-013b45b6ad3c",
- "depreciableObjectType":"Asset",
- "bookEffectiveDateOfChangeId":"5da77739-7f22-4109-b0a0-67480fb89af0",
- "depreciationMethod":"StraightLine",
- "averagingMethod":"ActualDays",
- "depreciationRate":0.50,
- "depreciationCalculationMethod":"None"
- },
- "bookDepreciationDetail":{
- "depreciationStartDate":"2020-01-02T00:00:00",
- "priorAccumDepreciationAmount":0.000000,
- "currentAccumDepreciationAmount":0.000000,
- "currentCapitalGain":0.000000,
- "currentGainLoss":0.000000
- },
- "taxDepreciationSettings":[
- ],
- "taxDepreciationDetails":[
- ],
- "canRollback":true,
- "metaData":{
- "bookDepreciationDetailsCanChange":true,
- "taxDepreciationDetailsCanChange":true
- },
- "accountingBookValue":77.000000,
- "taxValues":[
- ],
- "isDeleteEnabledForDate":true
- }
- '400':
+ example:
+ assetId: 68f17094-af97-4f1b-b36b-013b45b6ad3c
+ assetName: Computer47822
+ assetNumber: "123478074"
+ purchaseDate: 2020-01-01T00:00:00
+ purchasePrice: 100.0000
+ disposalPrice: 23.0000
+ assetStatus: Draft
+ trackingItems: []
+ bookDepreciationSetting:
+ depreciableObjectId: 68f17094-af97-4f1b-b36b-013b45b6ad3c
+ depreciableObjectType: Asset
+ bookEffectiveDateOfChangeId: 5da77739-7f22-4109-b0a0-67480fb89af0
+ depreciationMethod: StraightLine
+ averagingMethod: ActualDays
+ depreciationRate: 0.50
+ depreciationCalculationMethod: None
+ bookDepreciationDetail:
+ depreciationStartDate: 2020-01-02T00:00:00
+ priorAccumDepreciationAmount: 0.000000
+ currentAccumDepreciationAmount: 0.000000
+ currentCapitalGain: 0.000000
+ currentGainLoss: 0.000000
+ taxDepreciationSettings: []
+ taxDepreciationDetails: []
+ canRollback: true
+ metaData:
+ bookDepreciationDetailsCanChange: true
+ taxDepreciationDetailsCanChange: true
+ accountingBookValue: 77.000000
+ taxValues: []
+ isDeleteEnabledForDate: true
+ "400":
description: bad input parameter
/AssetTypes:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [assets, assets.read]
+ - OAuth2:
+ - assets
+ - assets.read
tags:
- Asset
summary: searches fixed asset types
operationId: getAssetTypes
- description: By passing in the appropriate options, you can search for
- available fixed asset types in the system
+ description: By passing in the appropriate options, you can search for available fixed asset types in the system
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
@@ -408,53 +368,45 @@ paths:
type: array
items:
$ref: '#/components/schemas/AssetType'
- example: [
- {
- "assetTypeId":"710255c6-d2ed-4463-b992-06c8685add5e",
- "assetTypeName":"Computer Equipment",
- "fixedAssetAccountId":"37c35de7-8df0-44bf-8e7c-f1f67cf6a278",
- "depreciationExpenseAccountId":"0fbd1820-9dd0-454a-9515-6ec076a84cf7",
- "accumulatedDepreciationAccountId":"512eac06-6894-47cd-b421-673b4ca2693a",
- "bookDepreciationSetting":{
- "depreciableObjectId":"710255c6-d2ed-4463-b992-06c8685add5e",
- "depreciableObjectType":"AssetType",
- "bookEffectiveDateOfChangeId":"39b9c2e9-62b1-4efc-ab75-fa9152ffaa5f",
- "depreciationMethod":"StraightLine",
- "averagingMethod":"FullMonth",
- "depreciationRate":25.00,
- "depreciationCalculationMethod":"None"
- },
- "taxDepreciationSettings":[
- ],
- "locks":0,
- "lockPrivateUseAccount":false
- },
- {
- "assetTypeId":"1a398a67-9d9d-4783-8689-14a8efce89d9",
- "assetTypeName":"Machinery97704",
- "fixedAssetAccountId":"5c93f577-c48f-44cd-8593-01489e319c2b",
- "depreciationExpenseAccountId":"adc14376-c960-43f0-b7f3-4063e5098039",
- "accumulatedDepreciationAccountId":"9195cadd-8645-41e6-9f67-7bcd421defe8",
- "bookDepreciationSetting":{
- "depreciableObjectId":"1a398a67-9d9d-4783-8689-14a8efce89d9",
- "depreciableObjectType":"AssetType",
- "bookEffectiveDateOfChangeId":"6d09a96d-7768-4f28-95e8-c9ac870fe36e",
- "depreciationMethod":"DiminishingValue100",
- "averagingMethod":"ActualDays",
- "depreciationRate":40.00,
- "depreciationCalculationMethod":"None"
- },
- "taxDepreciationSettings":[
- ],
- "locks":0,
- "lockPrivateUseAccount":false
- }
- ]
- '400':
+ example:
+ - assetTypeId: 710255c6-d2ed-4463-b992-06c8685add5e
+ assetTypeName: Computer Equipment
+ fixedAssetAccountId: 37c35de7-8df0-44bf-8e7c-f1f67cf6a278
+ depreciationExpenseAccountId: 0fbd1820-9dd0-454a-9515-6ec076a84cf7
+ accumulatedDepreciationAccountId: 512eac06-6894-47cd-b421-673b4ca2693a
+ bookDepreciationSetting:
+ depreciableObjectId: 710255c6-d2ed-4463-b992-06c8685add5e
+ depreciableObjectType: AssetType
+ bookEffectiveDateOfChangeId: 39b9c2e9-62b1-4efc-ab75-fa9152ffaa5f
+ depreciationMethod: StraightLine
+ averagingMethod: FullMonth
+ depreciationRate: 25.00
+ depreciationCalculationMethod: None
+ taxDepreciationSettings: []
+ locks: 0
+ lockPrivateUseAccount: false
+ - assetTypeId: 1a398a67-9d9d-4783-8689-14a8efce89d9
+ assetTypeName: Machinery97704
+ fixedAssetAccountId: 5c93f577-c48f-44cd-8593-01489e319c2b
+ depreciationExpenseAccountId: adc14376-c960-43f0-b7f3-4063e5098039
+ accumulatedDepreciationAccountId: 9195cadd-8645-41e6-9f67-7bcd421defe8
+ bookDepreciationSetting:
+ depreciableObjectId: 1a398a67-9d9d-4783-8689-14a8efce89d9
+ depreciableObjectType: AssetType
+ bookEffectiveDateOfChangeId: 6d09a96d-7768-4f28-95e8-c9ac870fe36e
+ depreciationMethod: DiminishingValue100
+ averagingMethod: ActualDays
+ depreciationRate: 40.00
+ depreciationCalculationMethod: None
+ taxDepreciationSettings: []
+ locks: 0
+ lockPrivateUseAccount: false
+ "400":
description: bad input parameter
post:
security:
- - OAuth2: [assets]
+ - OAuth2:
+ - assets
tags:
- Asset
summary: adds a fixed asset type
@@ -491,14 +443,14 @@ paths:
keyPascal: DepreciationCalculationMethod
keySnake: depreciation_calculation_method
object: bookDepreciationSetting
- default: None
- is_last: true
+ default: None
+ is_last: true
- assetType:
key: assetType
keyPascal: AssetType
keySnake: asset_type
x-snake: asset_type
- is_object: true
+ is_object: true
- assetTypeName:
key: assetTypeName
keyPascal: AssetTypeName
@@ -536,63 +488,54 @@ paths:
default: bookDepreciationSetting
python: book_depreciation_setting
ruby: book_depreciation_setting
- object: assetType
+ object: assetType
x-hasAssetsValidationError: true
description: Adds an fixed asset type to the system
responses:
- '200':
+ "200":
description: results single object - created fixed type
content:
application/json:
schema:
$ref: '#/components/schemas/AssetType'
- example: {
- "assetTypeId":"85509b5d-308e-420d-9532-b85105058916",
- "assetTypeName":"Machinery11004",
- "fixedAssetAccountId":"3d8d063a-c148-4bb8-8b3c-a5e2ad3b1e82",
- "depreciationExpenseAccountId":"d1602f69-f900-4616-8d34-90af393fa368",
- "accumulatedDepreciationAccountId":"9195cadd-8645-41e6-9f67-7bcd421defe8",
- "bookDepreciationSetting":{
- "depreciableObjectId":"00000000-0000-0000-0000-000000000000",
- "depreciableObjectType":"None",
- "depreciationMethod":"DiminishingValue100",
- "averagingMethod":"ActualDays",
- "depreciationRate":0.05,
- "depreciationCalculationMethod":"None"
- },
- "locks":0,
- "lockPrivateUseAccount":false
- }
- '400':
- description: 'invalid input, object invalid'
+ example:
+ assetTypeId: 85509b5d-308e-420d-9532-b85105058916
+ assetTypeName: Machinery11004
+ fixedAssetAccountId: 3d8d063a-c148-4bb8-8b3c-a5e2ad3b1e82
+ depreciationExpenseAccountId: d1602f69-f900-4616-8d34-90af393fa368
+ accumulatedDepreciationAccountId: 9195cadd-8645-41e6-9f67-7bcd421defe8
+ bookDepreciationSetting:
+ depreciableObjectId: 00000000-0000-0000-0000-000000000000
+ depreciableObjectType: None
+ depreciationMethod: DiminishingValue100
+ averagingMethod: ActualDays
+ depreciationRate: 0.05
+ depreciationCalculationMethod: None
+ locks: 0
+ lockPrivateUseAccount: false
+ "400":
+ description: invalid input, object invalid
content:
application/json:
- example: {
- "resourceValidationErrors":[
- ],
- "fieldValidationErrors":[
- {
- "fieldName":"FixedAssetAccountId",
- "valueProvided":"",
- "localisedMessage":"Fixed Asset Account Id is invalid",
- "type":"http://common.service.xero.com/errors/validation/field",
- "title":"Validation Error",
- "detail":"Fixed Asset Account Id is invalid"
- },
- {
- "fieldName":"DepreciationExpenseAccountId",
- "valueProvided":"",
- "localisedMessage":"Depreciation Expense Account Id is invalid",
- "type":"http://common.service.xero.com/errors/validation/field",
- "title":"Validation Error",
- "detail":"Depreciation Expense Account Id is invalid"
- }
- ],
- "type":"http://common.service.xero.com/errors/validation",
- "title":"The resource update failed validation.",
- "detail":"Validation Errors"
- }
- '409':
+ example:
+ resourceValidationErrors: []
+ fieldValidationErrors:
+ - fieldName: FixedAssetAccountId
+ valueProvided: ""
+ localisedMessage: Fixed Asset Account Id is invalid
+ type: http://common.service.xero.com/errors/validation/field
+ title: Validation Error
+ detail: Fixed Asset Account Id is invalid
+ - fieldName: DepreciationExpenseAccountId
+ valueProvided: ""
+ localisedMessage: Depreciation Expense Account Id is invalid
+ type: http://common.service.xero.com/errors/validation/field
+ title: Validation Error
+ detail: Depreciation Expense Account Id is invalid
+ type: http://common.service.xero.com/errors/validation
+ title: The resource update failed validation.
+ detail: Validation Errors
+ "409":
description: a type already exists
requestBody:
required: true
@@ -600,55 +543,53 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/AssetType'
- example: {
- "assetTypeName":"Machinery11004",
- "fixedAssetAccountId":"3d8d063a-c148-4bb8-8b3c-a5e2ad3b1e82",
- "depreciationExpenseAccountId":"d1602f69-f900-4616-8d34-90af393fa368",
- "accumulatedDepreciationAccountId":"9195cadd-8645-41e6-9f67-7bcd421defe8",
- "bookDepreciationSetting":{
- "depreciationMethod":"DiminishingValue100",
- "averagingMethod":"ActualDays",
- "depreciationRate":0.05,
- "depreciationCalculationMethod":"None"
- }
- }
+ example:
+ assetTypeName: Machinery11004
+ fixedAssetAccountId: 3d8d063a-c148-4bb8-8b3c-a5e2ad3b1e82
+ depreciationExpenseAccountId: d1602f69-f900-4616-8d34-90af393fa368
+ accumulatedDepreciationAccountId: 9195cadd-8645-41e6-9f67-7bcd421defe8
+ bookDepreciationSetting:
+ depreciationMethod: DiminishingValue100
+ averagingMethod: ActualDays
+ depreciationRate: 0.05
+ depreciationCalculationMethod: None
description: Asset type to add
/Settings:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [assets, assets.read]
+ - OAuth2:
+ - assets
+ - assets.read
tags:
- Asset
summary: searches fixed asset settings
operationId: getAssetSettings
- description: By passing in the appropriate options, you can search for
- available fixed asset types in the system
+ description: By passing in the appropriate options, you can search for available fixed asset types in the system
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Setting'
- example: {
- "assetNumberPrefix":"FA-",
- "assetNumberSequence":"0007",
- "assetStartDate":"2016-01-01T00:00:00",
- "optInForTax":false
- }
- '400':
+ example:
+ assetNumberPrefix: FA-
+ assetNumberSequence: "0007"
+ assetStartDate: 2016-01-01T00:00:00
+ optInForTax: false
+ "400":
description: bad input parameter
components:
securitySchemes:
OAuth2:
type: oauth2
description: For more information
- flows:
+ flows:
authorizationCode:
- authorizationUrl: 'https://login.xero.com/identity/connect/authorize'
- tokenUrl: 'https://identity.xero.com/connect/token'
+ authorizationUrl: https://login.xero.com/identity/connect/authorize
+ tokenUrl: https://identity.xero.com/connect/token
scopes:
email: Grant read-only access to your email
openid: Grant read-only access to your open id
@@ -656,7 +597,7 @@ components:
assets: Grant read-write access to fixed assets
assets.read: Grant read-only access to fixed assets
parameters:
- requiredHeader:
+ requiredHeader:
in: header
name: xero-tenant-id
x-snake: xero_tenant_id
@@ -670,7 +611,7 @@ components:
name: Idempotency-Key
x-snake: idempotency_key
description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
- example: "KEY_VALUE"
+ example: KEY_VALUE
schema:
type: string
schemas:
@@ -705,83 +646,83 @@ components:
assetId:
type: string
format: uuid
- description: "The Xero-generated Id for the asset"
- example: "3b5b3a38-5649-495f-87a1-14a4e5918634"
+ description: The Xero-generated Id for the asset
+ example: 3b5b3a38-5649-495f-87a1-14a4e5918634
assetName:
type: string
- description: "The name of the asset"
- example: "Awesome Truck 3"
+ description: The name of the asset
+ example: Awesome Truck 3
assetTypeId:
type: string
format: uuid
- description: "The Xero-generated Id for the asset type"
- example: "3b5b3a38-5649-495f-87a1-14a4e5918634"
+ description: The Xero-generated Id for the asset type
+ example: 3b5b3a38-5649-495f-87a1-14a4e5918634
assetNumber:
type: string
- description: "Must be unique."
- example: "FA-0013"
+ description: Must be unique.
+ example: FA-0013
purchaseDate:
type: string
format: date
- description: "The date the asset was purchased YYYY-MM-DD"
- example: "2015-07-01T00:00:00"
+ description: The date the asset was purchased YYYY-MM-DD
+ example: 2015-07-01T00:00:00
purchasePrice:
type: number
format: double
x-is-money: true
- description: "The purchase price of the asset"
+ description: The purchase price of the asset
example: "1000.0000"
disposalDate:
type: string
format: date
- description: "The date the asset was disposed"
- example: "2020-07-01T00:00:00"
+ description: The date the asset was disposed
+ example: 2020-07-01T00:00:00
disposalPrice:
type: number
format: double
x-is-money: true
- description: "The price the asset was disposed at"
+ description: The price the asset was disposed at
example: "1.0000"
assetStatus:
$ref: '#/components/schemas/AssetStatus'
warrantyExpiryDate:
type: string
- description: "The date the asset’s warranty expires (if needed) YYYY-MM-DD"
- example: "ca4c6b39-4f4f-43e8-98da-5e1f350a6694"
+ description: The date the asset’s warranty expires (if needed) YYYY-MM-DD
+ example: ca4c6b39-4f4f-43e8-98da-5e1f350a6694
serialNumber:
type: string
- description: "The asset's serial number"
- example: "ca4c6b39-4f4f-43e8-98da-5e1f350a6694"
+ description: The asset's serial number
+ example: ca4c6b39-4f4f-43e8-98da-5e1f350a6694
bookDepreciationSetting:
$ref: '#/components/schemas/BookDepreciationSetting'
bookDepreciationDetail:
$ref: '#/components/schemas/BookDepreciationDetail'
canRollback:
type: boolean
- description: "Boolean to indicate whether depreciation can be rolled back for this asset individually. This is true if it doesn't have 'legacy' journal entries and if there is no lock period that would prevent this asset from rolling back."
+ description: Boolean to indicate whether depreciation can be rolled back for this asset individually. This is true if it doesn't have 'legacy' journal entries and if there is no lock period that would prevent this asset from rolling back.
example: true
accountingBookValue:
type: number
format: double
x-is-money: true
- description: "The accounting value of the asset"
+ description: The accounting value of the asset
example: 0
isDeleteEnabledForDate:
type: boolean
- description: "Boolean to indicate whether delete is enabled"
+ description: Boolean to indicate whether delete is enabled
example: true
AssetStatus:
type: string
- description: "See Asset Status Codes."
- example: "Draft"
+ description: See Asset Status Codes.
+ example: Draft
enum:
- Draft
- Registered
- Disposed
AssetStatusQueryParam:
type: string
- description: "See Asset Status Codes."
- example: "DRAFT"
+ description: See Asset Status Codes.
+ example: DRAFT
enum:
- DRAFT
- REGISTERED
@@ -796,85 +737,85 @@ components:
assetTypeId:
type: string
format: uuid
- example: "5da209c5-5e19-4a43-b925-71b776c49ced"
- description: "Xero generated unique identifier for asset types"
+ example: 5da209c5-5e19-4a43-b925-71b776c49ced
+ description: Xero generated unique identifier for asset types
assetTypeName:
type: string
- example: "Computer Equipment"
- description: "The name of the asset type"
+ example: Computer Equipment
+ description: The name of the asset type
fixedAssetAccountId:
type: string
format: uuid
- example: "24e260f1-bfc4-4766-ad7f-8a8ce01de879"
- description: "The asset account for fixed assets of this type"
+ example: 24e260f1-bfc4-4766-ad7f-8a8ce01de879
+ description: The asset account for fixed assets of this type
depreciationExpenseAccountId:
type: string
format: uuid
- example: "b23fc79b-d66b-44b0-a240-e138e086fcbc"
- description: "The expense account for the depreciation of fixed assets of this type"
+ example: b23fc79b-d66b-44b0-a240-e138e086fcbc
+ description: The expense account for the depreciation of fixed assets of this type
accumulatedDepreciationAccountId:
type: string
format: uuid
- example: "ca4c6b39-4f4f-43e8-98da-5e1f350a6694"
- description: "The account for accumulated depreciation of fixed assets of this type"
+ example: ca4c6b39-4f4f-43e8-98da-5e1f350a6694
+ description: The account for accumulated depreciation of fixed assets of this type
bookDepreciationSetting:
$ref: '#/components/schemas/BookDepreciationSetting'
locks:
type: integer
example: 33
- description: "All asset types that have accumulated depreciation for any assets that use them are deemed ‘locked’ and cannot be removed."
+ description: All asset types that have accumulated depreciation for any assets that use them are deemed ‘locked’ and cannot be removed.
BookDepreciationSetting:
properties:
depreciationMethod:
type: string
- enum:
- - NoDepreciation
- - StraightLine
- - DiminishingValue100
- - DiminishingValue150
- - DiminishingValue200
- - FullDepreciation
- example: "StraightLine"
- description: "The method of depreciation applied to this asset. See Depreciation Methods"
+ enum:
+ - NoDepreciation
+ - StraightLine
+ - DiminishingValue100
+ - DiminishingValue150
+ - DiminishingValue200
+ - FullDepreciation
+ example: StraightLine
+ description: The method of depreciation applied to this asset. See Depreciation Methods
averagingMethod:
type: string
- enum:
- - FullMonth
- - ActualDays
- example: "ActualDays"
- description: "The method of averaging applied to this asset. See Averaging Methods"
+ enum:
+ - FullMonth
+ - ActualDays
+ example: ActualDays
+ description: The method of averaging applied to this asset. See Averaging Methods
depreciationRate:
type: number
format: double
x-is-money: true
example: 0.05
- description: "The rate of depreciation (e.g. 0.05)"
+ description: The rate of depreciation (e.g. 0.05)
effectiveLifeYears:
type: integer
example: 5
- description: "Effective life of the asset in years (e.g. 5)"
+ description: Effective life of the asset in years (e.g. 5)
depreciationCalculationMethod:
type: string
- enum:
- - Rate
- - Life
- - None
- example: "None"
- description: "See Depreciation Calculation Methods"
+ enum:
+ - Rate
+ - Life
+ - None
+ example: None
+ description: See Depreciation Calculation Methods
depreciableObjectId:
type: string
format: uuid
- example: "68f17094-af97-4f1b-b36b-013b45b6ad3c"
- description: "Unique Xero identifier for the depreciable object"
+ example: 68f17094-af97-4f1b-b36b-013b45b6ad3c
+ description: Unique Xero identifier for the depreciable object
depreciableObjectType:
type: string
- example: "Asset"
- description: "The type of asset object"
+ example: Asset
+ description: The type of asset object
bookEffectiveDateOfChangeId:
type: string
format: uuid
- example: "68f17094-af97-4f1b-b36b-013b45b6ad3c"
- description: "Unique Xero identifier for the effective date change"
+ example: 68f17094-af97-4f1b-b36b-013b45b6ad3c
+ description: Unique Xero identifier for the effective date change
BookDepreciationDetail:
properties:
currentCapitalGain:
@@ -882,98 +823,98 @@ components:
format: double
x-is-money: true
example: 5.25
- description: "When an asset is disposed, this will be the sell price minus the purchase price if a profit was made."
+ description: When an asset is disposed, this will be the sell price minus the purchase price if a profit was made.
currentGainLoss:
type: number
format: double
x-is-money: true
example: 10.50
- description: "When an asset is disposed, this will be the lowest one of sell price or purchase price, minus the current book value."
+ description: When an asset is disposed, this will be the lowest one of sell price or purchase price, minus the current book value.
depreciationStartDate:
type: string
format: date
- example: "2015-07-01T00:00:00"
- description: "YYYY-MM-DD"
+ example: 2015-07-01T00:00:00
+ description: YYYY-MM-DD
costLimit:
type: number
format: double
x-is-money: true
example: 9000.0000
- description: "The value of the asset you want to depreciate, if this is less than the cost of the asset."
+ description: The value of the asset you want to depreciate, if this is less than the cost of the asset.
residualValue:
type: number
format: double
x-is-money: true
example: 10000.0000
- description: "The value of the asset remaining when you've fully depreciated it."
+ description: The value of the asset remaining when you've fully depreciated it.
priorAccumDepreciationAmount:
type: number
format: double
x-is-money: true
example: 0.45
- description: "All depreciation prior to the current financial year."
+ description: All depreciation prior to the current financial year.
currentAccumDepreciationAmount:
type: number
format: double
x-is-money: true
example: 5.0000
- description: "All depreciation occurring in the current financial year."
+ description: All depreciation occurring in the current financial year.
Setting:
required:
- - name
+ - name
properties:
assetNumberPrefix:
type: string
- example: "FA-"
- description: "The prefix used for fixed asset numbers (“FA-” by default)"
+ example: FA-
+ description: The prefix used for fixed asset numbers (“FA-” by default)
assetNumberSequence:
type: string
example: "0022"
- description: "The next available sequence number"
+ description: The next available sequence number
assetStartDate:
type: string
format: date
- example: "2015-07-31T00:00:00"
- description: "The date depreciation calculations started on registered fixed assets in Xero"
+ example: 2015-07-31T00:00:00
+ description: The date depreciation calculations started on registered fixed assets in Xero
lastDepreciationDate:
type: string
format: date
- example: "2015-07-01T00:00:00"
- description: "The last depreciation date"
+ example: 2015-07-01T00:00:00
+ description: The last depreciation date
defaultGainOnDisposalAccountId:
type: string
format: uuid
- example: "346ddb97-739a-4274-b43b-66aa3218d17c"
- description: "Default account that gains are posted to"
+ example: 346ddb97-739a-4274-b43b-66aa3218d17c
+ description: Default account that gains are posted to
defaultLossOnDisposalAccountId:
type: string
format: uuid
- example: "1b798541-24e2-4855-9309-c023a0b576f3"
- description: "Default account that losses are posted to"
+ example: 1b798541-24e2-4855-9309-c023a0b576f3
+ description: Default account that losses are posted to
defaultCapitalGainOnDisposalAccountId:
type: string
format: uuid
- example: "6d6a0bdb-e118-45d8-a023-2ad617ec1cb7"
- description: "Default account that capital gains are posted to"
+ example: 6d6a0bdb-e118-45d8-a023-2ad617ec1cb7
+ description: Default account that capital gains are posted to
optInForTax:
type: boolean
- description: "opt in for tax calculation"
+ description: opt in for tax calculation
example: false
type: object
Error:
externalDocs:
- url: "https://developer.xero.com/documentation/api/http-response-codes"
+ url: https://developer.xero.com/documentation/api/http-response-codes
properties:
resourceValidationErrors:
description: Array of elements of resource validation errors
type: array
items:
- $ref: "#/components/schemas/ResourceValidationErrorsElement"
+ $ref: '#/components/schemas/ResourceValidationErrorsElement'
fieldValidationErrors:
description: Array of elements of field validation errors
type: array
items:
- $ref: "#/components/schemas/FieldValidationErrorsElement"
+ $ref: '#/components/schemas/FieldValidationErrorsElement'
type:
description: The internal type of error, not accessible externally
type: string
@@ -986,7 +927,7 @@ components:
type: object
ResourceValidationErrorsElement:
externalDocs:
- url: "https://developer.xero.com/documentation/api/http-response-codes"
+ url: https://developer.xero.com/documentation/api/http-response-codes
properties:
resourceName:
description: The field name of the erroneous field
@@ -1006,7 +947,7 @@ components:
type: object
FieldValidationErrorsElement:
externalDocs:
- url: "https://developer.xero.com/documentation/api/http-response-codes"
+ url: https://developer.xero.com/documentation/api/http-response-codes
properties:
fieldName:
description: The field name of the erroneous field
@@ -1026,4 +967,4 @@ components:
detail:
description: Detail of the field validation error
type: string
- type: object
\ No newline at end of file
+ type: object
diff --git a/xero_bankfeeds.yaml b/xero_bankfeeds.yaml
index 41caad75..8558fd72 100644
--- a/xero_bankfeeds.yaml
+++ b/xero_bankfeeds.yaml
@@ -1,18 +1,16 @@
openapi: 3.0.0
info:
- version: "6.3.0"
+ version: 6.3.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.
- If you're a financial institution who wants to provide bank feeds to your business customers, contact us to become a financial services partner.
- termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
+ 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. If you're a financial institution who wants to provide bank feeds to your business customers, contact us to become a financial services partner.
+ termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/
contact:
- name: "Xero Platform Team"
- email: "api@xero.com"
- url: "https://developer.xero.com"
+ name: Xero Platform Team
+ email: api@xero.com
+ url: https://developer.xero.com
license:
- name: MIT
- url: 'https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE'
+ name: MIT
+ url: https://github.com/XeroAPI/Xero-OpenAPI/blob/master/LICENSE
servers:
- description: Xero Bank Feeds API base url
url: https://api.xero.com/bankfeeds.xro/1.0
@@ -22,68 +20,62 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [bankfeeds]
+ - OAuth2:
+ - bankfeeds
tags:
- BankFeeds
summary: Searches for feed connections
operationId: getFeedConnections
description: By passing in the appropriate options, you can search for available feed connections in the system.
- parameters:
+ parameters:
- name: page
in: query
- description: Page number which specifies the set of records to retrieve. By default the number of the records per set is 10. Example - https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?page=1 to get the second set of the records. When page value is not a number or a negative number, by default, the first set of records is returned.
- schema:
+ description: Page number which specifies the set of records to retrieve. By default the number of the records per set is 10. Example - https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?page=1 to get the second set of the records. When page value is not a number or a negative number, by default, the first set of records is returned.
+ schema:
type: integer
example: 1
- name: pageSize
in: query
- description: Page size which specifies how many records per page will be returned (default 10). Example - https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?pageSize=100 to specify page size of 100.
- schema:
+ description: Page size which specifies how many records per page will be returned (default 10). Example - https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?pageSize=100 to specify page size of 100.
+ schema:
type: integer
example: 100
responses:
- '202':
+ "202":
description: search results matching criteria returned with pagination and items array
content:
application/json:
schema:
$ref: '#/components/schemas/FeedConnections'
- example:
- {
- "pagination":{
- "page":1,
- "pageCount":1,
- "pageSize":87654321,
- "itemCount":39
- },
- "items":[
- {
- "id":"c0eb97b5-4f97-465a-8268-276513c14396",
- "accountToken":"foobar31306",
- "accountType":"BANK",
- "accountNumber":"123496842",
- "accountName":"SDK Bank 95921",
- "accountId":"aefbf6be-4285-4ca5-bf39-0f486c8515c7",
- "currency":"GBP",
- "country":"GB"
- },
- {
- "id":"3b44b539-4e39-4d53-9334-d8ba01674752",
- "accountToken":"foobar74770",
- "accountType":"BANK",
- "accountNumber":"123481122",
- "accountName":"SDK Bank 11272",
- "accountId":"fc2f3cc2-126e-40d7-9fc1-12e52d0a71f1",
- "currency":"GBP",
- "country":"GB"
- }
- ]
- }
- '400':
+ example:
+ pagination:
+ page: 1
+ pageCount: 1
+ pageSize: 87654321
+ itemCount: 39
+ items:
+ - id: c0eb97b5-4f97-465a-8268-276513c14396
+ accountToken: foobar31306
+ accountType: BANK
+ accountNumber: "123496842"
+ accountName: SDK Bank 95921
+ accountId: aefbf6be-4285-4ca5-bf39-0f486c8515c7
+ currency: GBP
+ country: GB
+ - id: 3b44b539-4e39-4d53-9334-d8ba01674752
+ accountToken: foobar74770
+ accountType: BANK
+ accountNumber: "123481122"
+ accountName: SDK Bank 11272
+ accountId: fc2f3cc2-126e-40d7-9fc1-12e52d0a71f1
+ currency: GBP
+ country: GB
+ "400":
description: validation error response
post:
security:
- - OAuth2: [bankfeeds]
+ - OAuth2:
+ - bankfeeds
tags:
- BankFeeds
summary: Create one or more new feed connection
@@ -100,67 +92,52 @@ paths:
schema:
$ref: '#/components/schemas/FeedConnections'
example:
- {
- "items":[
- {
- "accountToken":"foobar71760",
- "accountNumber":"123458637",
- "accountName":"SDK Bank 90861",
- "accountType":"BANK",
- "currency":"GBP"
- }
- ]
- }
+ items:
+ - accountToken: foobar71760
+ accountNumber: "123458637"
+ accountName: SDK Bank 90861
+ accountType: BANK
+ currency: GBP
responses:
- '202':
+ "202":
description: success new feed connection(s)response
content:
application/json:
schema:
$ref: '#/components/schemas/FeedConnections'
- example:
- {
- "items":[
- {
- "id":"2a19d46c-2a92-4e50-9401-dcf2cb895be7",
- "accountToken":"foobar71760",
- "status":"PENDING"
- }
- ]
- }
- '400':
+ example:
+ items:
+ - id: 2a19d46c-2a92-4e50-9401-dcf2cb895be7
+ accountToken: foobar71760
+ status: PENDING
+ "400":
description: failed to create new feed connection(s)response
content:
application/json:
schema:
$ref: '#/components/schemas/FeedConnections'
example:
- {
- "items": [
- {
- "accountToken": "foobar71760",
- "status": "REJECTED",
- "error": {
- "type": "invalid-request",
- "title": "Invalid Request",
- "status": 400,
- "detail": "For the request field 'AccountNumber' exceeded the maximum length of 40."
- }
- }
- ]
- }
+ items:
+ - accountToken: foobar71760
+ status: REJECTED
+ error:
+ type: invalid-request
+ title: Invalid Request
+ status: 400
+ detail: For the request field 'AccountNumber' exceeded the maximum length of 40.
/FeedConnections/{id}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [bankfeeds]
+ - OAuth2:
+ - bankfeeds
tags:
- BankFeeds
summary: Retrieve single feed connection based on a unique id provided
operationId: getFeedConnection
description: By passing in a FeedConnection Id options, you can search for matching feed connections
- parameters:
+ parameters:
- required: true
in: path
name: id
@@ -169,31 +146,30 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: success returns a FeedConnection object matching the id in response
content:
application/json:
schema:
$ref: '#/components/schemas/FeedConnection'
- example:
- {
- "id":"b58b685a-1bee-4904-91f1-fee30bb6ea52",
- "accountToken":"foobar84778",
- "accountType":"BANK",
- "accountNumber":"123434859",
- "accountName":"SDK Bank 5517",
- "accountId":"f4c4d595-da94-493b-999a-19d1ae1f508a",
- "currency":"GBP",
- "country":"GB"
- }
- '400':
+ example:
+ id: b58b685a-1bee-4904-91f1-fee30bb6ea52
+ accountToken: foobar84778
+ accountType: BANK
+ accountNumber: "123434859"
+ accountName: SDK Bank 5517
+ accountId: f4c4d595-da94-493b-999a-19d1ae1f508a
+ currency: GBP
+ country: GB
+ "400":
description: bad input parameter
/FeedConnections/DeleteRequests:
parameters:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [bankfeeds]
+ - OAuth2:
+ - bankfeeds
tags:
- BankFeeds
summary: Delete an existing feed connection
@@ -209,46 +185,34 @@ paths:
schema:
$ref: '#/components/schemas/FeedConnections'
example:
- {
- "items":[
- {
- "id":"b4cc693b-24d9-42ec-a6d4-2943d253ff63"
- }
- ]
- }
+ items:
+ - id: b4cc693b-24d9-42ec-a6d4-2943d253ff63
responses:
- '202':
+ "202":
description: Success response for deleted feed connection
content:
application/json:
schema:
$ref: '#/components/schemas/FeedConnections'
- example:
- {
- "items":[
- {
- "id":"b4cc693b-24d9-42ec-a6d4-2943d253ff63",
- "status":"PENDING"
- },
- {
- "accountToken": "10000125",
- "status": "REJECTED",
- "error": {
- "type": "feed-connected-in-different-organisation",
- "title": "Feed connected in different organisation",
- "detail": "The AccountToken is connected to another Xero Bank Account associated with this bank. This Xero Bank Account belongs to a different Xero Organisation."
- }
- }
- ]
- }
- '400':
+ example:
+ items:
+ - id: b4cc693b-24d9-42ec-a6d4-2943d253ff63
+ status: PENDING
+ - accountToken: "10000125"
+ status: REJECTED
+ error:
+ type: feed-connected-in-different-organisation
+ title: Feed connected in different organisation
+ detail: The AccountToken is connected to another Xero Bank Account associated with this bank. This Xero Bank Account belongs to a different Xero Organisation.
+ "400":
description: bad input parameter
/Statements:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [bankfeeds]
+ - OAuth2:
+ - bankfeeds
tags:
- BankFeeds
summary: Retrieve all statements
@@ -264,7 +228,7 @@ paths:
format: int32
- in: query
name: pageSize
- description: Page size which specifies how many records per page will be returned (default 10). Example - https://api.xero.com/bankfeeds.xro/1.0/Statements?pageSize=100 to specify page size of 100.
+ description: Page size which specifies how many records per page will be returned (default 10). Example - https://api.xero.com/bankfeeds.xro/1.0/Statements?pageSize=100 to specify page size of 100.
required: false
schema:
type: integer
@@ -282,78 +246,63 @@ paths:
type: string
default: 00000000-0000-0000-0000-0000030000000
responses:
- '200':
+ "200":
description: success returns Statements array of objects response
content:
application/json:
schema:
$ref: '#/components/schemas/Statements'
- example:
- {
- "pagination":{
- "page":1,
- "pageCount":210,
- "pageSize":3,
- "itemCount":3
- },
- "items":[
- {
- "id":"9817e4b8-82b3-4526-91f7-040bd278053f",
- "feedConnectionId":"6a4b9ff5-3a5f-4321-936b-4796163550f6",
- "status":"REJECTED",
- "startDate":"2019-08-01",
- "endDate":"2019-08-15",
- "startBalance":{
- "amount":"100.0000",
- "creditDebitIndicator":"CREDIT"
- },
- "endBalance":{
- "amount":"150.0000",
- "creditDebitIndicator":"CREDIT"
- },
- "statementLineCount":"1",
- "errors":[
- {
- "type":"duplicate-statement",
- "title":"Duplicate Statement Received",
- "status":409,
- "detail":"The received statement was marked as a duplicate."
- }
- ]
- },
- {
- "id":"2fc57bac-7aa7-4981-a5cd-8aee83fe698c",
- "feedConnectionId":"6a4b9ff5-3a5f-4321-936b-4796163550f6",
- "status":"DELIVERED",
- "startDate":"2019-08-01",
- "endDate":"2019-08-15",
- "startBalance":{
- "amount":"100.0000",
- "creditDebitIndicator":"CREDIT"
- },
- "endBalance":{
- "amount":"150.0000",
- "creditDebitIndicator":"CREDIT"
- },
- "statementLineCount":"1"
- }
- ]
- }
- '400':
+ example:
+ pagination:
+ page: 1
+ pageCount: 210
+ pageSize: 3
+ itemCount: 3
+ items:
+ - id: 9817e4b8-82b3-4526-91f7-040bd278053f
+ feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6
+ status: REJECTED
+ startDate: "2019-08-01"
+ endDate: "2019-08-15"
+ startBalance:
+ amount: "100.0000"
+ creditDebitIndicator: CREDIT
+ endBalance:
+ amount: "150.0000"
+ creditDebitIndicator: CREDIT
+ statementLineCount: "1"
+ errors:
+ - type: duplicate-statement
+ title: Duplicate Statement Received
+ status: 409
+ detail: The received statement was marked as a duplicate.
+ - id: 2fc57bac-7aa7-4981-a5cd-8aee83fe698c
+ feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6
+ status: DELIVERED
+ startDate: "2019-08-01"
+ endDate: "2019-08-15"
+ startBalance:
+ amount: "100.0000"
+ creditDebitIndicator: CREDIT
+ endBalance:
+ amount: "150.0000"
+ creditDebitIndicator: CREDIT
+ statementLineCount: "1"
+ "400":
description: bad input parameter
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Statements'
- example: {
- "type": "invalid-request",
- "title": "Invalid Request",
- "status": 400,
- "detail": "For the request field missing parameter."
- }
+ example:
+ type: invalid-request
+ title: Invalid Request
+ status: 400
+ detail: For the request field missing parameter.
post:
security:
- - OAuth2: [bankfeeds]
+ - OAuth2:
+ - bankfeeds
tags:
- BankFeeds
summary: Creates one or more new statements
@@ -362,111 +311,91 @@ paths:
operationId: createStatements
x-hasBankFeedsValidationError: true
responses:
- '202':
+ "202":
description: Success returns Statements array of objects in response
content:
application/json:
schema:
$ref: '#/components/schemas/Statements'
- example:
- {
- "items":[
- {
- "id":"d69b02b7-a30c-464a-99cf-ba9770373c61",
- "feedConnectionId":"6a4b9ff5-3a5f-4321-936b-4796163550f6",
- "status":"PENDING"
- },
- {
- "id":"598f255c-015b-4138-93df-2e06c64565b3",
- "feedConnectionId":"2ebe6393-f3bb-48ab-9a0e-b04fa8585a70",
- "status":"PENDING"
- }
- ]
- }
- '400':
+ example:
+ items:
+ - id: d69b02b7-a30c-464a-99cf-ba9770373c61
+ feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6
+ status: PENDING
+ - id: 598f255c-015b-4138-93df-2e06c64565b3
+ feedConnectionId: 2ebe6393-f3bb-48ab-9a0e-b04fa8585a70
+ status: PENDING
+ "400":
description: Statement failed validation
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Statements'
- example: {
- "type": "invalid-request",
- "title": "Invalid Request",
- "status": 400,
- "detail": "For the request field 'StatementLine.ChequeNumber' exceeded the maximum length of 20."
- }
- '403':
+ example:
+ type: invalid-request
+ title: Invalid Request
+ status: 400
+ detail: For the request field 'StatementLine.ChequeNumber' exceeded the maximum length of 20.
+ "403":
description: Invalid application or feed connection
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Error'
- example: {
- "type": "invalid-application",
- "title": "Invalid Application",
- "status": 403,
- "detail": "The application has not been configured to use these API endpoints."
- }
- '409':
+ example:
+ type: invalid-application
+ title: Invalid Application
+ status: 403
+ detail: The application has not been configured to use these API endpoints.
+ "409":
description: Duplicate statement received
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Statements'
- example:
- {
- "items":[
- {
- "id":"29fefeb6-f449-470d-9179-f1d8900930d6",
- "feedConnectionId":"6a4b9ff5-3a5f-4321-936b-4796163550f6",
- "status":"REJECTED",
- "errors":[
- {
- "type":"duplicate-statement",
- "title":"Duplicate Statement Received",
- "status":409,
- "detail":"The received statement was marked as a duplicate."
- }
- ]
- }
- ]
- }
- '413':
+ example:
+ items:
+ - id: 29fefeb6-f449-470d-9179-f1d8900930d6
+ feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6
+ status: REJECTED
+ errors:
+ - type: duplicate-statement
+ title: Duplicate Statement Received
+ status: 409
+ detail: The received statement was marked as a duplicate.
+ "413":
description: Statement exceeds size limit
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Statements'
- example: {
- "type": "invalid-request",
- "title": "Request too large",
- "status": 413,
- "detail": "Request size of 3500000 bytes exceeds the limit of 3000000 bytes."
- }
- '422':
+ example:
+ type: invalid-request
+ title: Request too large
+ status: 413
+ detail: Request size of 3500000 bytes exceeds the limit of 3000000 bytes.
+ "422":
description: Unprocessable Entity
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Statements'
- example: {
- "type": "invalid-end-balance",
- "title": "Invalid End Balance",
- "status": 422,
- "detail": "End balance does not match start balance +/- statement line amounts."
- }
- '500':
+ example:
+ type: invalid-end-balance
+ title: Invalid End Balance
+ status: 422
+ detail: End balance does not match start balance +/- statement line amounts.
+ "500":
description: Intermittent Xero Error
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Statements'
- example: {
- "type": "internal-error",
- "title": "Intermittent Internal Xero Error",
- "status": 500,
- "detail": "The request should be retried. If the error persists, a Xero support issue should be raised."
- }
+ example:
+ type: internal-error
+ title: Intermittent Internal Xero Error
+ status: 500
+ detail: The request should be retried. If the error persists, a Xero support issue should be raised.
requestBody:
description: Statements array of objects in the body
required: true
@@ -475,68 +404,52 @@ paths:
schema:
$ref: '#/components/schemas/Statements'
example:
- {
- "items":[
- {
- "feedConnectionId":"6a4b9ff5-3a5f-4321-936b-4796163550f6",
- "startDate":"2019-08-11",
- "endDate":"2019-08-11",
- "startBalance":{
- "amount":"100",
- "creditDebitIndicator":"CREDIT"
- },
- "endBalance":{
- "amount":"150",
- "creditDebitIndicator":"CREDIT"
- },
- "statementLines":[
- {
- "postedDate":"2019-08-11",
- "description":"My new line",
- "amount":"50",
- "creditDebitIndicator":"CREDIT",
- "transactionId":"123446422",
- "payeeName":"StarLord90315",
- "reference":"Foobar95578",
- "chequeNumber":"12379009",
- "transactionType": "Refund"
- }
- ]
- },
- {
- "feedConnectionId":"2ebe6393-f3bb-48ab-9a0e-b04fa8585a70",
- "startDate":"2019-08-11",
- "endDate":"2019-08-11",
- "startBalance":{
- "amount":"100",
- "creditDebitIndicator":"CREDIT"
- },
- "endBalance":{
- "amount":"150",
- "creditDebitIndicator":"CREDIT"
- },
- "statementLines":[
- {
- "postedDate":"2019-08-11",
- "description":"My new line",
- "amount":"50",
- "creditDebitIndicator":"CREDIT",
- "transactionId":"123449402",
- "payeeName":"StarLord56705",
- "reference":"Foobar67355",
- "chequeNumber":"12379350",
- "transactionType": "Currency Conversion Fee"
- }
- ]
- }
- ]
- }
+ items:
+ - feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6
+ startDate: "2019-08-11"
+ endDate: "2019-08-11"
+ startBalance:
+ amount: "100"
+ creditDebitIndicator: CREDIT
+ endBalance:
+ amount: "150"
+ creditDebitIndicator: CREDIT
+ statementLines:
+ - postedDate: "2019-08-11"
+ description: My new line
+ amount: "50"
+ creditDebitIndicator: CREDIT
+ transactionId: "123446422"
+ payeeName: StarLord90315
+ reference: Foobar95578
+ chequeNumber: "12379009"
+ transactionType: Refund
+ - feedConnectionId: 2ebe6393-f3bb-48ab-9a0e-b04fa8585a70
+ startDate: "2019-08-11"
+ endDate: "2019-08-11"
+ startBalance:
+ amount: "100"
+ creditDebitIndicator: CREDIT
+ endBalance:
+ amount: "150"
+ creditDebitIndicator: CREDIT
+ statementLines:
+ - postedDate: "2019-08-11"
+ description: My new line
+ amount: "50"
+ creditDebitIndicator: CREDIT
+ transactionId: "123449402"
+ payeeName: StarLord56705
+ reference: Foobar67355
+ chequeNumber: "12379350"
+ transactionType: Currency Conversion Fee
/Statements/{statementId}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [bankfeeds]
+ - OAuth2:
+ - bankfeeds
tags:
- BankFeeds
summary: Retrieve single statement based on unique id provided
@@ -551,65 +464,61 @@ paths:
type: string
format: uuid
responses:
- '200':
+ "200":
description: search results matching id for single statement
content:
application/json:
schema:
$ref: '#/components/schemas/Statement'
- example:
- {
- "id":"97aca24a-dd10-4cda-98c7-1084a048257b",
- "feedConnectionId":"6a4b9ff5-3a5f-4321-936b-4796163550f6",
- "status":"DELIVERED",
- "startDate":"2019-08-11",
- "endDate":"2019-10-11",
- "startBalance":{
- "amount":"100.0000",
- "creditDebitIndicator":"CREDIT"
- },
- "endBalance":{
- "amount":"150.0000",
- "creditDebitIndicator":"CREDIT"
- },
- "statementLineCount":"1"
- }
- '404':
+ example:
+ id: 97aca24a-dd10-4cda-98c7-1084a048257b
+ feedConnectionId: 6a4b9ff5-3a5f-4321-936b-4796163550f6
+ status: DELIVERED
+ startDate: "2019-08-11"
+ endDate: "2019-10-11"
+ startBalance:
+ amount: "100.0000"
+ creditDebitIndicator: CREDIT
+ endBalance:
+ amount: "150.0000"
+ creditDebitIndicator: CREDIT
+ statementLineCount: "1"
+ "404":
description: Statement not found
components:
securitySchemes:
OAuth2:
type: oauth2
description: For more information visit https://developer.xero.com/documentation/oauth2/overview
- flows:
+ flows:
authorizationCode:
- authorizationUrl: 'https://login.xero.com/identity/connect/authorize'
- tokenUrl: 'https://identity.xero.com/connect/token'
+ authorizationUrl: https://login.xero.com/identity/connect/authorize
+ tokenUrl: https://identity.xero.com/connect/token
scopes:
email: Grant read-only access to your email
openid: Grant read-only access to your open id
profile: your profile information
bankfeeds: Grant read-write access to bankfeeds
parameters:
- requiredHeader:
+ requiredHeader:
in: header
name: Xero-Tenant-Id
description: Xero identifier for Tenant
schema:
type: string
- required: true
+ required: true
idempotencyKey:
in: header
name: Idempotency-Key
x-snake: idempotency_key
description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
- example: "KEY_VALUE"
+ example: KEY_VALUE
schema:
type: string
schemas:
FeedConnections:
externalDocs:
- url: 'https://developer.xero.com/documentation/bank-feeds-api/feed-connections'
+ url: https://developer.xero.com/documentation/bank-feeds-api/feed-connections
type: object
properties:
pagination:
@@ -620,13 +529,13 @@ components:
$ref: '#/components/schemas/FeedConnection'
FeedConnection:
externalDocs:
- url: 'https://developer.xero.com/documentation/bank-feeds-api/feed-connections'
+ url: https://developer.xero.com/documentation/bank-feeds-api/feed-connections
type: object
properties:
id:
type: string
format: uuid
- example: "0d3cf8d-95dc-4466-8dc0-47e6d1197e28"
+ example: 0d3cf8d-95dc-4466-8dc0-47e6d1197e28
description: GUID used to identify the Account.
accountToken:
type: string
@@ -640,17 +549,19 @@ components:
description: String(40) when AccountType is BANK String(4) when AccountType is CREDITCARD The Account Number is used to match the feed to a Xero Bank Account. The API will create a new Xero Bank Account if a match to an existing Xero Bank Account is not found. Only the last 4 digits must be supplied for Credit Card numbers. Must be included if AccountId is not specified.
accountName:
type: string
- example: "Joe's Savings Account"
+ example: Joe's Savings Account
maximum: 30
description: The Account Name will be used for the creation of a new Xero Bank Account if a matching Xero Bank Account is not found.
accountId:
type: string
format: uuid
- example: "079a88ea-276d-41fb-a1f1-366ef3e22921"
+ example: 079a88ea-276d-41fb-a1f1-366ef3e22921
description: Xero identifier for a bank account in Xero. Must be included if AccountNumber is not specified.
accountType:
- enum: [BANK,CREDITCARD]
- example: "BANK"
+ enum:
+ - BANK
+ - CREDITCARD
+ example: BANK
description: High level bank account type - BANK CREDITCARD BANK encompasses all bank account types other than credit cards.
currency:
$ref: '#/components/schemas/CurrencyCode'
@@ -658,14 +569,16 @@ components:
$ref: '#/components/schemas/CountryCode'
status:
type: string
- enum: [PENDING,REJECTED]
- example: "REJECTED"
+ enum:
+ - PENDING
+ - REJECTED
+ example: REJECTED
description: the current status of the feed connection
error:
$ref: '#/components/schemas/Error'
Statements:
externalDocs:
- url: 'https://developer.xero.com/documentation/bank-feeds-api/statements'
+ url: https://developer.xero.com/documentation/bank-feeds-api/statements
type: object
properties:
pagination:
@@ -699,16 +612,19 @@ components:
id:
type: string
format: uuid
- example: "ba4f3127-5e46-427d-80ea-dea2fcd26afe"
+ example: ba4f3127-5e46-427d-80ea-dea2fcd26afe
description: GUID used to identify the Statement.
feedConnectionId:
type: string
format: uuid
- example: "87cb0dc8-fa32-409c-b622-19f8de8dcc83"
+ example: 87cb0dc8-fa32-409c-b622-19f8de8dcc83
description: The Xero generated feed connection Id that identifies the Xero Bank Account Container into which the statement should be delivered. This is obtained by calling GET FeedConnections.
status:
- enum: ["PENDING","REJECTED","DELIVERED"]
- example: "PENDING"
+ enum:
+ - PENDING
+ - REJECTED
+ - DELIVERED
+ example: PENDING
description: Current status of statements
startDate:
type: string
@@ -725,7 +641,7 @@ components:
endBalance:
$ref: '#/components/schemas/EndBalance'
statementLines:
- $ref: '#/components/schemas/StatementLines'
+ $ref: '#/components/schemas/StatementLines'
errors:
type: array
items:
@@ -769,41 +685,41 @@ components:
format: date
example: "2018-06-10"
description: The date that the transaction was processed or cleared as seen in internet banking ISO-8601 YYYY-MM-DD
- description:
+ description:
type: string
- example: "Description for statement line 2"
+ example: Description for statement line 2
maximum: 2000
description: Transaction description
- amount:
+ amount:
type: number
format: double
x-is-money: true
example: "5.00"
description: Transaction amount
- creditDebitIndicator:
+ creditDebitIndicator:
$ref: '#/components/schemas/CreditDebitIndicator'
- transactionId:
+ transactionId:
type: string
- example: "transaction-id-2"
+ example: transaction-id-2
description: Financial institute's internal transaction identifier. If provided this field is factored into duplicate detection.
- payeeName:
+ payeeName:
type: string
- example: "Payee name for statement line 2"
+ example: Payee name for statement line 2
description: Typically the merchant or payee name
maximum: 255
- reference:
+ reference:
type: string
- example: "Reference for statement line 2"
+ example: Reference for statement line 2
description: Optional field to enhance the Description
maximum: 255
- chequeNumber:
+ chequeNumber:
type: string
example: "021"
description: The cheque/check number
maximum: 20
- transactionType:
+ transactionType:
type: string
- example: "Refund"
+ example: Refund
description: Descriptive transaction type
maximum: 30
Error:
@@ -814,7 +730,7 @@ components:
type: string
maximum: 255
description: Human readable high level error description.
- example: "Invalid Application"
+ example: Invalid Application
status:
type: integer
description: The numeric HTTP Status Code, e.g. 404
@@ -823,33 +739,33 @@ components:
type: string
maximum: 255
description: Human readable detailed error description.
- example: "The application has not been configured to use these API endpoints."
+ example: The application has not been configured to use these API endpoints.
type:
type: string
description: Identifies the type of error.
- enum:
- - "invalid-request"
- - "invalid-application"
- - "invalid-feed-connection"
- - "duplicate-statement"
- - "invalid-end-balance"
- - "invalid-start-and-end-date"
- - "invalid-start-date"
- - "internal-error"
- - "feed-already-connected-in-current-organisation"
- - "invalid-end-date"
- - "statement-not-found"
- - "feed-connected-in-different-organisation"
- - "feed-already-connected-in-different-organisation"
- - "bank-feed-not-found"
- - "invalid-country-specified"
- - "invalid-organisation-bank-feeds"
- - "invalid-organisation-multi-currency"
- - "invalid-feed-connection-for-organisation"
- - "invalid-user-role"
- - "account-not-valid"
- - "feed-not-found-or-already-deleted"
- example: "invalid-application"
+ enum:
+ - invalid-request
+ - invalid-application
+ - invalid-feed-connection
+ - duplicate-statement
+ - invalid-end-balance
+ - invalid-start-and-end-date
+ - invalid-start-date
+ - internal-error
+ - feed-already-connected-in-current-organisation
+ - invalid-end-date
+ - statement-not-found
+ - feed-connected-in-different-organisation
+ - feed-already-connected-in-different-organisation
+ - bank-feed-not-found
+ - invalid-country-specified
+ - invalid-organisation-bank-feeds
+ - invalid-organisation-multi-currency
+ - invalid-feed-connection-for-organisation
+ - invalid-user-role
+ - account-not-valid
+ - feed-not-found-or-already-deleted
+ example: invalid-application
CreditDebitIndicator:
type: string
description: If the statement balances are credit or debit, the CreditDebitIndicator should be specified from the perspective of the Customer.
@@ -858,414 +774,414 @@ components:
- DEBIT
CurrencyCode:
description: 3 letter alpha code for the ISO-4217 currency code, e.g. USD, AUD.
- example: "AUD"
+ example: AUD
type: string
enum:
- - AED
- - AFN
- - ALL
- - AMD
- - ANG
- - AOA
- - ARS
- - AUD
- - AWG
- - AZN
- - BAM
- - BBD
- - BDT
- - BGN
- - BHD
- - BIF
- - BMD
- - BND
- - BOB
- - BRL
- - BSD
- - BTN
- - BWP
- - BYN
- - BZD
- - CAD
- - CDF
- - CHF
- - CLP
- - CNY
- - COP
- - CRC
- - CUC
- - CUP
- - CVE
- - CZK
- - DJF
- - DKK
- - DOP
- - DZD
- - EGP
- - ERN
- - ETB
- - EUR
- - FJD
- - FKP
- - GBP
- - GEL
- - GGP
- - GHS
- - GIP
- - GMD
- - GNF
- - GTQ
- - GYD
- - HKD
- - HNL
- - HRK
- - HTG
- - HUF
- - IDR
- - ILS
- - IMP
- - INR
- - IQD
- - IRR
- - ISK
- - JEP
- - JMD
- - JOD
- - JPY
- - KES
- - KGS
- - KHR
- - KMF
- - KPW
- - KRW
- - KWD
- - KYD
- - KZT
- - LAK
- - LBP
- - LKR
- - LRD
- - LSL
- - LYD
- - MAD
- - MDL
- - MGA
- - MKD
- - MMK
- - MNT
- - MOP
- - MRU
- - MUR
- - MVR
- - MWK
- - MXN
- - MYR
- - MZN
- - NAD
- - NGN
- - NIO
- - NOK
- - NPR
- - NZD
- - OMR
- - PAB
- - PEN
- - PGK
- - PHP
- - PKR
- - PLN
- - PYG
- - QAR
- - RON
- - RSD
- - RUB
- - RWF
- - SAR
- - SBD
- - SCR
- - SDG
- - SEK
- - SGD
- - SHP
- - SLL
- - SOS
- - SPL
- - SRD
- - STN
- - SVC
- - SYP
- - SZL
- - THB
- - TJS
- - TMT
- - TND
- - TOP
- - TRY
- - TTD
- - TVD
- - TWD
- - TZS
- - UAH
- - UGX
- - USD
- - UYU
- - UZS
- - VEF
- - VND
- - VUV
- - WST
- - XAF
- - XCD
- - XDR
- - XOF
- - XPF
- - YER
- - ZAR
- - ZMW
- - ZMK
- - ZWD
+ - AED
+ - AFN
+ - ALL
+ - AMD
+ - ANG
+ - AOA
+ - ARS
+ - AUD
+ - AWG
+ - AZN
+ - BAM
+ - BBD
+ - BDT
+ - BGN
+ - BHD
+ - BIF
+ - BMD
+ - BND
+ - BOB
+ - BRL
+ - BSD
+ - BTN
+ - BWP
+ - BYN
+ - BZD
+ - CAD
+ - CDF
+ - CHF
+ - CLP
+ - CNY
+ - COP
+ - CRC
+ - CUC
+ - CUP
+ - CVE
+ - CZK
+ - DJF
+ - DKK
+ - DOP
+ - DZD
+ - EGP
+ - ERN
+ - ETB
+ - EUR
+ - FJD
+ - FKP
+ - GBP
+ - GEL
+ - GGP
+ - GHS
+ - GIP
+ - GMD
+ - GNF
+ - GTQ
+ - GYD
+ - HKD
+ - HNL
+ - HRK
+ - HTG
+ - HUF
+ - IDR
+ - ILS
+ - IMP
+ - INR
+ - IQD
+ - IRR
+ - ISK
+ - JEP
+ - JMD
+ - JOD
+ - JPY
+ - KES
+ - KGS
+ - KHR
+ - KMF
+ - KPW
+ - KRW
+ - KWD
+ - KYD
+ - KZT
+ - LAK
+ - LBP
+ - LKR
+ - LRD
+ - LSL
+ - LYD
+ - MAD
+ - MDL
+ - MGA
+ - MKD
+ - MMK
+ - MNT
+ - MOP
+ - MRU
+ - MUR
+ - MVR
+ - MWK
+ - MXN
+ - MYR
+ - MZN
+ - NAD
+ - NGN
+ - NIO
+ - NOK
+ - NPR
+ - NZD
+ - OMR
+ - PAB
+ - PEN
+ - PGK
+ - PHP
+ - PKR
+ - PLN
+ - PYG
+ - QAR
+ - RON
+ - RSD
+ - RUB
+ - RWF
+ - SAR
+ - SBD
+ - SCR
+ - SDG
+ - SEK
+ - SGD
+ - SHP
+ - SLL
+ - SOS
+ - SPL
+ - SRD
+ - STN
+ - SVC
+ - SYP
+ - SZL
+ - THB
+ - TJS
+ - TMT
+ - TND
+ - TOP
+ - TRY
+ - TTD
+ - TVD
+ - TWD
+ - TZS
+ - UAH
+ - UGX
+ - USD
+ - UYU
+ - UZS
+ - VEF
+ - VND
+ - VUV
+ - WST
+ - XAF
+ - XCD
+ - XDR
+ - XOF
+ - XPF
+ - YER
+ - ZAR
+ - ZMW
+ - ZMK
+ - ZWD
CountryCode:
type: string
- example: "GB"
+ example: GB
description: ISO-3166 alpha-2 country code, e.g. US, AU This element is required only when the Application supports multi-region. Talk to your Partner Manager to confirm if this is the case.
enum:
- - AD
- - AE
- - AF
- - AG
- - AI
- - AL
- - AM
- - AN
- - AO
- - AQ
- - AR
- - AS
- - AT
- - AU
- - AW
- - AZ
- - BA
- - BB
- - BD
- - BE
- - BF
- - BG
- - BH
- - BI
- - BJ
- - BL
- - BM
- - BN
- - BO
- - BR
- - BS
- - BT
- - BW
- - BY
- - BZ
- - CA
- - CC
- - CD
- - CF
- - CG
- - CH
- - CI
- - CK
- - CL
- - CM
- - CN
- - CO
- - CR
- - CU
- - CV
- - CW
- - CX
- - CY
- - CZ
- - DE
- - DJ
- - DK
- - DM
- - DO
- - DZ
- - EC
- - EE
- - EG
- - EH
- - ER
- - ES
- - ET
- - FI
- - FJ
- - FK
- - FM
- - FO
- - FR
- - GA
- - GB
- - GD
- - GE
- - GG
- - GH
- - GI
- - GL
- - GM
- - GN
- - GQ
- - GR
- - GT
- - GU
- - GW
- - GY
- - HK
- - HN
- - HR
- - HT
- - HU
- - ID
- - IE
- - IL
- - IM
- - IN
- - IO
- - IQ
- - IR
- - IS
- - IT
- - JE
- - JM
- - JO
- - JP
- - KE
- - KG
- - KH
- - KI
- - KM
- - KN
- - KP
- - KR
- - KW
- - KY
- - KZ
- - LA
- - LB
- - LC
- - LI
- - LK
- - LR
- - LS
- - LT
- - LU
- - LV
- - LY
- - MA
- - MC
- - MD
- - ME
- - MF
- - MG
- - MH
- - MK
- - ML
- - MM
- - MN
- - MO
- - MP
- - MR
- - MS
- - MT
- - MU
- - MV
- - MW
- - MX
- - MY
- - MZ
- - NA
- - NC
- - NE
- - NG
- - NI
- - NL
- - NO
- - NP
- - NR
- - NU
- - NZ
- - OM
- - PA
- - PE
- - PF
- - PG
- - PH
- - PK
- - PL
- - PM
- - PN
- - PR
- - PS
- - PT
- - PW
- - PY
- - QA
- - RE
- - RO
- - RS
- - RU
- - RW
- - SA
- - SB
- - SC
- - SD
- - SE
- - SG
- - SH
- - SI
- - SJ
- - SK
- - SL
- - SM
- - SN
- - SO
- - SR
- - SS
- - ST
- - SV
- - SX
- - SY
- - SZ
- - TC
- - TD
- - TG
- - TH
- - TJ
- - TK
- - TL
- - TM
- - TN
- - TO
- - TR
- - TT
- - TV
- - TW
- - TZ
- - UA
- - UG
- - US
- - UY
- - UZ
- - VA
- - VC
- - VE
- - VG
- - VI
- - VN
- - VU
- - WF
- - WS
- - XK
- - YE
- - YT
- - ZA
- - ZM
- - ZW
\ No newline at end of file
+ - AD
+ - AE
+ - AF
+ - AG
+ - AI
+ - AL
+ - AM
+ - AN
+ - AO
+ - AQ
+ - AR
+ - AS
+ - AT
+ - AU
+ - AW
+ - AZ
+ - BA
+ - BB
+ - BD
+ - BE
+ - BF
+ - BG
+ - BH
+ - BI
+ - BJ
+ - BL
+ - BM
+ - BN
+ - BO
+ - BR
+ - BS
+ - BT
+ - BW
+ - BY
+ - BZ
+ - CA
+ - CC
+ - CD
+ - CF
+ - CG
+ - CH
+ - CI
+ - CK
+ - CL
+ - CM
+ - CN
+ - CO
+ - CR
+ - CU
+ - CV
+ - CW
+ - CX
+ - CY
+ - CZ
+ - DE
+ - DJ
+ - DK
+ - DM
+ - DO
+ - DZ
+ - EC
+ - EE
+ - EG
+ - EH
+ - ER
+ - ES
+ - ET
+ - FI
+ - FJ
+ - FK
+ - FM
+ - FO
+ - FR
+ - GA
+ - GB
+ - GD
+ - GE
+ - GG
+ - GH
+ - GI
+ - GL
+ - GM
+ - GN
+ - GQ
+ - GR
+ - GT
+ - GU
+ - GW
+ - GY
+ - HK
+ - HN
+ - HR
+ - HT
+ - HU
+ - ID
+ - IE
+ - IL
+ - IM
+ - IN
+ - IO
+ - IQ
+ - IR
+ - IS
+ - IT
+ - JE
+ - JM
+ - JO
+ - JP
+ - KE
+ - KG
+ - KH
+ - KI
+ - KM
+ - KN
+ - KP
+ - KR
+ - KW
+ - KY
+ - KZ
+ - LA
+ - LB
+ - LC
+ - LI
+ - LK
+ - LR
+ - LS
+ - LT
+ - LU
+ - LV
+ - LY
+ - MA
+ - MC
+ - MD
+ - ME
+ - MF
+ - MG
+ - MH
+ - MK
+ - ML
+ - MM
+ - MN
+ - MO
+ - MP
+ - MR
+ - MS
+ - MT
+ - MU
+ - MV
+ - MW
+ - MX
+ - MY
+ - MZ
+ - NA
+ - NC
+ - NE
+ - NG
+ - NI
+ - NL
+ - NO
+ - NP
+ - NR
+ - NU
+ - NZ
+ - OM
+ - PA
+ - PE
+ - PF
+ - PG
+ - PH
+ - PK
+ - PL
+ - PM
+ - PN
+ - PR
+ - PS
+ - PT
+ - PW
+ - PY
+ - QA
+ - RE
+ - RO
+ - RS
+ - RU
+ - RW
+ - SA
+ - SB
+ - SC
+ - SD
+ - SE
+ - SG
+ - SH
+ - SI
+ - SJ
+ - SK
+ - SL
+ - SM
+ - SN
+ - SO
+ - SR
+ - SS
+ - ST
+ - SV
+ - SX
+ - SY
+ - SZ
+ - TC
+ - TD
+ - TG
+ - TH
+ - TJ
+ - TK
+ - TL
+ - TM
+ - TN
+ - TO
+ - TR
+ - TT
+ - TV
+ - TW
+ - TZ
+ - UA
+ - UG
+ - US
+ - UY
+ - UZ
+ - VA
+ - VC
+ - VE
+ - VG
+ - VI
+ - VN
+ - VU
+ - WF
+ - WS
+ - XK
+ - YE
+ - YT
+ - ZA
+ - ZM
+ - ZW
diff --git a/xero_files.yaml b/xero_files.yaml
index 3a1ac7ca..925e31b3 100644
--- a/xero_files.yaml
+++ b/xero_files.yaml
@@ -4,13 +4,13 @@ servers:
url: https://api.xero.com/files.xro/1.0/
info:
title: Xero Files API
- version: "6.3.0"
- description: "These endpoints are specific to Xero Files API"
- termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
+ version: 6.3.0
+ description: These endpoints are specific to Xero Files API
+ termsOfService: https://developer.xero.com/xero-developer-platform-terms-conditions/
contact:
- name: "Xero Platform Team"
- email: "api@xero.com"
- url: "https://developer.xero.com"
+ name: Xero Platform Team
+ email: api@xero.com
+ url: https://developer.xero.com
tags:
- name: Files
description: Operations available to regular developers
@@ -20,7 +20,9 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [files, files.read]
+ - OAuth2:
+ - files
+ - files.read
tags:
- Files
operationId: getFiles
@@ -45,60 +47,23 @@ paths:
description: values to sort by
schema:
type: string
- enum:
- - Name
- - Size
- - CreatedDateUTC
- example: "CreatedDateUTC DESC"
+ enum:
+ - Name
+ - Size
+ - CreatedDateUTC
+ example: CreatedDateUTC DESC
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Files'
- example: '{
- "TotalCount": 100,
- "Page": 1,
- "PerPage": 2,
- "Items": [
- {
- "Name": "helo-heros.jpg",
- "MimeType": "application/jpg",
- "Size": 2878711,
- "CreatedDateUtc": "2021-02-10T16:02:54.9930000",
- "UpdatedDateUtc": "2021-02-10T16:02:54.9930000",
- "User": {
- "Name": "sid.maestre@xero.com",
- "FirstName": "Sidney",
- "LastName": "Maestre",
- "FullName": "Sidney Maestre",
- "Id": "740add2a-a703-4b8a-a670-1093919c2040"
- },
- "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3",
- "Id": "3d413bfe-f40f-4807-b953-9a42f834ff15"
- },
- {
- "Name": "helo-heros.jpg",
- "MimeType": "application/jpg",
- "Size": 2878711,
- "CreatedDateUtc": "2021-02-09T21:16:00.6130000",
- "UpdatedDateUtc": "2021-02-09T21:16:00.6130000",
- "User": {
- "Name": "sid.maestre@xero.com",
- "FirstName": "Sidney",
- "LastName": "Maestre",
- "FullName": "Sidney Maestre",
- "Id": "740add2a-a703-4b8a-a670-1093919c2040"
- },
- "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3",
- "Id": "22f87409-cdfd-4813-a868-559481bcb052"
- }
- ]
- }'
+ example: '{ "TotalCount": 100, "Page": 1, "PerPage": 2, "Items": [ { "Name": "helo-heros.jpg", "MimeType": "application/jpg", "Size": 2878711, "CreatedDateUtc": "2021-02-10T16:02:54.9930000", "UpdatedDateUtc": "2021-02-10T16:02:54.9930000", "User": { "Name": "sid.maestre@xero.com", "FirstName": "Sidney", "LastName": "Maestre", "FullName": "Sidney Maestre", "Id": "740add2a-a703-4b8a-a670-1093919c2040" }, "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", "Id": "3d413bfe-f40f-4807-b953-9a42f834ff15" }, { "Name": "helo-heros.jpg", "MimeType": "application/jpg", "Size": 2878711, "CreatedDateUtc": "2021-02-09T21:16:00.6130000", "UpdatedDateUtc": "2021-02-09T21:16:00.6130000", "User": { "Name": "sid.maestre@xero.com", "FirstName": "Sidney", "LastName": "Maestre", "FullName": "Sidney Maestre", "Id": "740add2a-a703-4b8a-a670-1093919c2040" }, "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", "Id": "22f87409-cdfd-4813-a868-559481bcb052" } ] }'
post:
security:
- - OAuth2: [files]
+ - OAuth2:
+ - files
tags:
- Files
summary: Uploads a File to the inbox
@@ -106,96 +71,63 @@ paths:
- $ref: '#/components/parameters/idempotencyKey'
operationId: uploadFile
responses:
- '201':
+ "201":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/FileObject'
- example: '{
- "Name": "helo-heros.jpg",
- "MimeType": "application/jpg",
- "Size": 2878711,
- "CreatedDateUtc": "2021-02-10T23:17:50.1930000",
- "UpdatedDateUtc": "2021-02-10T23:17:50.1930000",
- "User": {
- "Name": "sid.maestre@xero.com",
- "FirstName": "Sidney",
- "LastName": "Maestre",
- "FullName": "Sidney Maestre",
- "Id": "740add2a-a703-4b8a-a670-1093919c2040"
- },
- "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3",
- "Id": "22f87409-cdfd-4813-a868-559481bcb052"
- }'
- '400':
+ example: '{ "Name": "helo-heros.jpg", "MimeType": "application/jpg", "Size": 2878711, "CreatedDateUtc": "2021-02-10T23:17:50.1930000", "UpdatedDateUtc": "2021-02-10T23:17:50.1930000", "User": { "Name": "sid.maestre@xero.com", "FirstName": "Sidney", "LastName": "Maestre", "FullName": "Sidney Maestre", "Id": "740add2a-a703-4b8a-a670-1093919c2040" }, "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", "Id": "22f87409-cdfd-4813-a868-559481bcb052" }'
+ "400":
description: invalid input, object invalid
content:
application/json:
- example: '[
- {
- "type":"Validation",
- "title":"Validation failure",
- "detail":"Extension: boo is not a valid File extension."
- }
- ]'
+ example: '[ { "type":"Validation", "title":"Validation failure", "detail":"Extension: boo is not a valid File extension." } ]'
requestBody:
required: true
content:
multipart/form-data:
- schema:
+ schema:
$ref: '#/components/schemas/UploadObject'
/Files/{FileId}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [files, files.read]
+ - OAuth2:
+ - files
+ - files.read
tags:
- Files
summary: Retrieves a file by a unique file ID
operationId: getFile
- parameters:
+ parameters:
- name: FileId
x-snake: file_id
in: path
required: true
description: File id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
- application/json:
+ application/json:
schema:
$ref: '#/components/schemas/FileObject'
- example: '{
- "Name": "helo-heros.jpg",
- "MimeType": "application/jpg",
- "Size": 2878711,
- "CreatedDateUtc": "2021-02-10T23:17:50.1930000",
- "UpdatedDateUtc": "2021-02-10T23:17:50.1930000",
- "User": {
- "Name": "sid.maestre@xero.com",
- "FirstName": "Sidney",
- "LastName": "Maestre",
- "FullName": "Sidney Maestre",
- "Id": "740add2a-a703-4b8a-a670-1093919c2040"
- },
- "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3",
- "Id": "efd77bfc-7018-4da1-b251-7aa2d438382c"
- }'
+ example: '{ "Name": "helo-heros.jpg", "MimeType": "application/jpg", "Size": 2878711, "CreatedDateUtc": "2021-02-10T23:17:50.1930000", "UpdatedDateUtc": "2021-02-10T23:17:50.1930000", "User": { "Name": "sid.maestre@xero.com", "FirstName": "Sidney", "LastName": "Maestre", "FullName": "Sidney Maestre", "Id": "740add2a-a703-4b8a-a670-1093919c2040" }, "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", "Id": "efd77bfc-7018-4da1-b251-7aa2d438382c" }'
put:
security:
- - OAuth2: [files]
+ - OAuth2:
+ - files
tags:
- Files
- summary: Update a file
+ summary: Update a file
operationId: updateFile
- description: Updates file properties of a single file
+ description: Updates file properties of a single file
parameters:
- $ref: '#/components/parameters/idempotencyKey'
- name: FileId
@@ -203,73 +135,51 @@ paths:
in: path
required: true
description: File id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/FileObject'
- example: '{
- "Name": "helo-heros.jpg",
- "MimeType": "application/jpg",
- "Size": 2878711,
- "CreatedDateUtc": "2021-02-10T23:17:50.1930000",
- "UpdatedDateUtc": "2021-02-10T23:58:54.1000000",
- "User": {
- "Name": "sid.maestre@xero.com",
- "FirstName": "Sidney",
- "LastName": "Maestre",
- "FullName": "Sidney Maestre",
- "Id": "740add2a-a703-4b8a-a670-1093919c2040"
- },
- "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3",
- "Id": "efd77bfc-7018-4da1-b251-7aa2d438382c"
- }'
- '400':
- description: invalid input, object invalid
+ example: '{ "Name": "helo-heros.jpg", "MimeType": "application/jpg", "Size": 2878711, "CreatedDateUtc": "2021-02-10T23:17:50.1930000", "UpdatedDateUtc": "2021-02-10T23:58:54.1000000", "User": { "Name": "sid.maestre@xero.com", "FirstName": "Sidney", "LastName": "Maestre", "FullName": "Sidney Maestre", "Id": "740add2a-a703-4b8a-a670-1093919c2040" }, "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", "Id": "efd77bfc-7018-4da1-b251-7aa2d438382c" }'
+ "400":
+ description: invalid input, object invalid
content:
application/json:
- example: '[
- {
- "type":"Rename",
- "title":"Rename failed",
- "detail":"Unable to rename efd77bfc-7018-4da1-b251-7aa2d438382c to FooBar"
- }
- ]'
+ example: '[ { "type":"Rename", "title":"Rename failed", "detail":"Unable to rename efd77bfc-7018-4da1-b251-7aa2d438382c to FooBar" } ]'
requestBody:
required: true
content:
application/json:
- schema:
- $ref: '#/components/schemas/FileObject'
- example: '{
- "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3"
- }'
+ schema:
+ $ref: '#/components/schemas/FileObject'
+ example: '{ "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3" }'
delete:
security:
- - OAuth2: [files]
+ - OAuth2:
+ - files
tags:
- Files
summary: Deletes a specific file
operationId: deleteFile
- description: Delete a specific file
- parameters:
+ description: Delete a specific file
+ parameters:
- name: FileId
x-snake: file_id
in: path
required: true
description: File id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '204':
+ "204":
description: Successful deletion - return response 204 no content
x-isEmpty: true
/Files/{FolderId}:
@@ -277,7 +187,8 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
post:
security:
- - OAuth2: [files]
+ - OAuth2:
+ - files
tags:
- Files
summary: Uploads a File to a specific folder
@@ -294,71 +205,52 @@ paths:
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '201':
+ "201":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/FileObject'
- example: '{
- "Name": "helo-heros.jpg",
- "MimeType": "application/jpg",
- "Size": 2878711,
- "CreatedDateUtc": "2021-02-10T23:17:50.1930000",
- "UpdatedDateUtc": "2021-02-10T23:17:50.1930000",
- "User": {
- "Name": "sid.maestre@xero.com",
- "FirstName": "Sidney",
- "LastName": "Maestre",
- "FullName": "Sidney Maestre",
- "Id": "740add2a-a703-4b8a-a670-1093919c2040"
- },
- "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3",
- "Id": "22f87409-cdfd-4813-a868-559481bcb052"
- }'
- '400':
+ example: '{ "Name": "helo-heros.jpg", "MimeType": "application/jpg", "Size": 2878711, "CreatedDateUtc": "2021-02-10T23:17:50.1930000", "UpdatedDateUtc": "2021-02-10T23:17:50.1930000", "User": { "Name": "sid.maestre@xero.com", "FirstName": "Sidney", "LastName": "Maestre", "FullName": "Sidney Maestre", "Id": "740add2a-a703-4b8a-a670-1093919c2040" }, "FolderId": "bf924975-7097-46f2-a143-1ecfbab3c8c3", "Id": "22f87409-cdfd-4813-a868-559481bcb052" }'
+ "400":
description: invalid input, object invalid
content:
application/json:
- example: '[
- {
- "type":"Validation",
- "title":"Validation failure",
- "detail":"Extension: boo is not a valid File extension."
- }
- ]'
+ example: '[ { "type":"Validation", "title":"Validation failure", "detail":"Extension: boo is not a valid File extension." } ]'
requestBody:
required: true
content:
multipart/form-data:
- schema:
+ schema:
$ref: '#/components/schemas/UploadObject'
/Files/{FileId}/Content:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [files, files.read]
+ - OAuth2:
+ - files
+ - files.read
tags:
- Files
summary: Retrieves the content of a specific file
operationId: getFileContent
- description: By passing in the appropriate options, retrieve data for specific file
- parameters:
+ description: By passing in the appropriate options, retrieve data for specific file
+ parameters:
- name: FileId
x-snake: file_id
in: path
required: true
description: File id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: returns the byte array of the specific file based on id
content:
- application/octet-stream:
+ application/octet-stream:
schema:
type: string
format: binary
@@ -367,25 +259,26 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [files, files.read]
+ - OAuth2:
+ - files
+ - files.read
tags:
- Files
summary: Retrieves a specific file associations
operationId: getFileAssociations
- description: |
- By passing in the appropriate options,
- parameters:
+ description: "By passing in the appropriate options, \n"
+ parameters:
- name: FileId
x-snake: file_id
in: path
required: true
description: File id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
@@ -393,86 +286,66 @@ paths:
type: array
items:
$ref: '#/components/schemas/Association'
- example: '[
- {
- "FileId":"6beccb4a-0d7d-4518-93f3-e0cd1dccb254",
- "ObjectId":"1270bf7c-5d18-473a-9231-1e36c4bd33ed",
- "ObjectType":"Business",
- "ObjectGroup":"Contact"
- }
- ]'
+ example: '[ { "FileId":"6beccb4a-0d7d-4518-93f3-e0cd1dccb254", "ObjectId":"1270bf7c-5d18-473a-9231-1e36c4bd33ed", "ObjectType":"Business", "ObjectGroup":"Contact" } ]'
post:
security:
- - OAuth2: [files]
+ - OAuth2:
+ - files
tags:
- Files
summary: Creates a new file association
operationId: createFileAssociation
description: By passing in the appropriate options, you can create a new folder
parameters:
- - $ref: '#/components/parameters/idempotencyKey'
+ - $ref: '#/components/parameters/idempotencyKey'
- name: FileId
x-snake: file_id
in: path
required: true
description: File id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '201':
+ "201":
description: A successful request
content:
application/json:
schema:
$ref: '#/components/schemas/Association'
- example: '{
- "FileId": "6beccb4a-0d7d-4518-93f3-e0cd1dccb254",
- "ObjectId": "1270bf7c-5d18-473a-9231-1e36c4bd33ed",
- "ObjectType": "Business",
- "ObjectGroup": "Contact"
- }'
- '400':
+ example: '{ "FileId": "6beccb4a-0d7d-4518-93f3-e0cd1dccb254", "ObjectId": "1270bf7c-5d18-473a-9231-1e36c4bd33ed", "ObjectType": "Business", "ObjectGroup": "Contact" }'
+ "400":
description: invalid input, object invalid
content:
application/json:
- example: '[
- {
- "type":"Validation",
- "title":"Validation failure",
- "detail":"Object is not a Account"
- }
- ]'
+ example: '[ { "type":"Validation", "title":"Validation failure", "detail":"Object is not a Account" } ]'
requestBody:
required: true
content:
application/json:
- schema:
- $ref: '#/components/schemas/Association'
- example: '{
- "ObjectId": "1270bf7c-5d18-473a-9231-1e36c4bd33ed",
- "ObjectGroup": "Contact",
- "ObjectType": "Business"
- }'
+ schema:
+ $ref: '#/components/schemas/Association'
+ example: '{ "ObjectId": "1270bf7c-5d18-473a-9231-1e36c4bd33ed", "ObjectGroup": "Contact", "ObjectType": "Business" }'
/Files/{FileId}/Associations/{ObjectId}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
delete:
security:
- - OAuth2: [files]
+ - OAuth2:
+ - files
tags:
- Files
summary: Deletes an existing file association
operationId: deleteFileAssociation
description: By passing in the appropriate options, you can create a new folder
- parameters:
+ parameters:
- name: FileId
x-snake: file_id
in: path
required: true
description: File id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -481,12 +354,12 @@ paths:
in: path
required: true
description: Object id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '204':
+ "204":
description: Successful deletion - return response 204 no content
x-isEmpty: true
/Associations/{ObjectId}:
@@ -494,19 +367,21 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [files, files.read]
+ - OAuth2:
+ - files
+ - files.read
tags:
- Files
summary: Retrieves an association object using a unique object ID
operationId: getAssociationsByObject
description: By passing in the appropriate options, you can retrieve an association
- parameters:
+ parameters:
- name: ObjectId
x-snake: object_id
in: path
required: true
description: Object id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -532,7 +407,7 @@ paths:
enum:
- Name
- CreatedDateUTC
- example: "Associations/{ObjectId}?sort=CreatedDateUtc"
+ example: Associations/{ObjectId}?sort=CreatedDateUtc
- in: query
name: direction
description: direction to sort by
@@ -541,9 +416,9 @@ paths:
enum:
- ASC
- DESC
- example: "Associations/{ObjectId}?sort=CreatedDateUtc&direction=DESC"
+ example: Associations/{ObjectId}?sort=CreatedDateUtc&direction=DESC
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
@@ -551,100 +426,77 @@ paths:
type: array
items:
$ref: '#/components/schemas/Association'
- example: '[
- {
- "SendWithObject":false,
- "Name":"testfile.pdf",
- "Size":12357,
- "FileId":"6beccb4a-0d7d-4518-93f3-e0cd1dccb254",
- "ObjectId":"1270bf7c-5d18-473a-9231-1e36c4bd33ed",
- "ObjectType":"Business",
- "ObjectGroup":"Contact"
- }
- ]'
+ example: '[ { "SendWithObject":false, "Name":"testfile.pdf", "Size":12357, "FileId":"6beccb4a-0d7d-4518-93f3-e0cd1dccb254", "ObjectId":"1270bf7c-5d18-473a-9231-1e36c4bd33ed", "ObjectType":"Business", "ObjectGroup":"Contact" } ]'
/Associations/Count:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [files, files.read]
+ - OAuth2:
+ - files
+ - files.read
tags:
- Files
summary: Retrieves a count of associations for a list of objects.
operationId: getAssociationsCount
description: By passing in the appropriate options, you can retrieve the association count for objects
- parameters:
+ parameters:
- name: ObjectIds
in: query
required: true
description: A comma-separated list of object ids
- schema:
+ schema:
type: array
items:
type: string
format: uuid
example: 1270bf7c-5d18-473a-9231-1e36c4bd33ed
responses:
- '200':
+ "200":
description: A dictionary of the object Ids and associations count
content:
application/json:
schema:
type: object
- example: '{
- "19d4fc59-e799-410f-912b-03d4ab294d73": 2,
- "82195976-5175-45d4-926e-807ff10892e7": 1,
- "a8547af2-2900-4879-98b8-f1a780c78feb": 0}'
+ example: '{ "19d4fc59-e799-410f-912b-03d4ab294d73": 2, "82195976-5175-45d4-926e-807ff10892e7": 1, "a8547af2-2900-4879-98b8-f1a780c78feb": 0}'
/Folders:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [files, files.read]
+ - OAuth2:
+ - files
+ - files.read
tags:
- Files
summary: Retrieves folders
operationId: getFolders
- description: By passing in the appropriate options, you can search for
- available folders
+ description: By passing in the appropriate options, you can search for available folders
parameters:
- in: query
name: sort
description: values to sort by
schema:
type: string
- enum:
- - Name
- - Size
- - CreatedDateUTC
- example: "CreatedDateUTC DESC"
+ enum:
+ - Name
+ - Size
+ - CreatedDateUTC
+ example: CreatedDateUTC DESC
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
type: array
- items:
+ items:
$ref: '#/components/schemas/Folder'
- example: '[
- {
- "Name":"Inbox",
- "FileCount":14,
- "Email":"xero.inbox.jpf4.6oo29retajkhtfus@xerofiles.com",
- "IsInbox":true,
- "Id":"bf924975-7097-46f2-a143-1ecfbab3c8c3"
- },
- {
- "Name":"Contracts",
- "FileCount":7,
- "IsInbox":false,
- "Id":"554ff1ad-4b94-4266-9b45-e29bcb75e6bf"
- }
- ]'
+ example: '[ { "Name":"Inbox", "FileCount":14, "Email":"xero.inbox.jpf4.6oo29retajkhtfus@xerofiles.com", "IsInbox":true, "Id":"bf924975-7097-46f2-a143-1ecfbab3c8c3" }, { "Name":"Contracts", "FileCount":7, "IsInbox":false, "Id":"554ff1ad-4b94-4266-9b45-e29bcb75e6bf" } ]'
post:
security:
- - OAuth2: [files]
+ - OAuth2:
+ - files
tags:
- Files
summary: Creates a new folder
@@ -653,44 +505,33 @@ paths:
operationId: createFolder
description: By passing in the appropriate properties, you can create a new folder
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Folder'
- example: '{
- "Name": "My Docs",
- "FileCount": 0,
- "IsInbox": false,
- "Id": "913970ad-8c8e-4666-8294-35b9cac23206"
- }'
- '400':
+ example: '{ "Name": "My Docs", "FileCount": 0, "IsInbox": false, "Id": "913970ad-8c8e-4666-8294-35b9cac23206" }'
+ "400":
description: invalid input, object invalid
content:
application/json:
- example: '[
- {
- "type":"Validation",
- "title":"Validation failure",
- "detail":"Name contains one or more bad characters"
- }
- ]'
+ example: '[ { "type":"Validation", "title":"Validation failure", "detail":"Name contains one or more bad characters" } ]'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Folder'
- example: '{
- "Name": "My Docs"
- }'
+ example: '{ "Name": "My Docs" }'
/Folders/{FolderId}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [files, files.read]
+ - OAuth2:
+ - files
+ - files.read
tags:
- Files
summary: Retrieves specific folder by using a unique folder ID
@@ -702,26 +543,22 @@ paths:
in: path
required: true
description: Folder id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Folder'
- example: '{
- "Name": "My Docs",
- "FileCount": 0,
- "IsInbox": false,
- "Id": "4c5f3fe4-2516-4863-ac88-3029351773bf"
- }'
+ example: '{ "Name": "My Docs", "FileCount": 0, "IsInbox": false, "Id": "4c5f3fe4-2516-4863-ac88-3029351773bf" }'
put:
security:
- - OAuth2: [files]
+ - OAuth2:
+ - files
tags:
- Files
summary: Updates an existing folder
@@ -734,46 +571,34 @@ paths:
in: path
required: true
description: Folder id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '200':
+ "200":
description: return the updated object
content:
application/json:
schema:
$ref: '#/components/schemas/Folder'
- example: '{
- "Name": "Your Docs",
- "FileCount": 0,
- "IsInbox": false,
- "Id": "4c5f3fe4-2516-4863-ac88-3029351773bf"
- }'
- '400':
+ example: '{ "Name": "Your Docs", "FileCount": 0, "IsInbox": false, "Id": "4c5f3fe4-2516-4863-ac88-3029351773bf" }'
+ "400":
description: invalid input, object invalid
content:
application/json:
- example: '[
- {
- "type":"Validation",
- "title":"Validation failure",
- "detail":"Name contains one or more bad characters"
- }
- ]'
+ example: '[ { "type":"Validation", "title":"Validation failure", "detail":"Name contains one or more bad characters" } ]'
requestBody:
required: true
content:
application/json:
- schema:
- $ref: '#/components/schemas/Folder'
- example: '{
- "Name": "Your Docs"
- }'
+ schema:
+ $ref: '#/components/schemas/Folder'
+ example: '{ "Name": "Your Docs" }'
delete:
security:
- - OAuth2: [files]
+ - OAuth2:
+ - files
tags:
- Files
summary: Deletes a folder
@@ -785,12 +610,12 @@ paths:
in: path
required: true
description: Folder id for single object
- schema:
+ schema:
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
responses:
- '204':
+ "204":
description: Successful deletion - return response 204 no content
x-isEmpty: true
/Inbox:
@@ -798,35 +623,31 @@ paths:
- $ref: '#/components/parameters/requiredHeader'
get:
security:
- - OAuth2: [files, files.read]
+ - OAuth2:
+ - files
+ - files.read
tags:
- Files
- summary: Retrieves inbox folder
+ summary: Retrieves inbox folder
operationId: getInbox
description: Search for the user inbox
responses:
- '200':
+ "200":
description: search results matching criteria
content:
application/json:
schema:
$ref: '#/components/schemas/Folder'
- example: '{
- "Name": "Inbox",
- "FileCount": 14,
- "Email": "xero.inbox.jpf4.6oo29retajkhtfus@xerofiles.com",
- "IsInbox": true,
- "Id": "bf924975-7097-46f2-a143-1ecfbab3c8c3"
- }'
+ example: '{ "Name": "Inbox", "FileCount": 14, "Email": "xero.inbox.jpf4.6oo29retajkhtfus@xerofiles.com", "IsInbox": true, "Id": "bf924975-7097-46f2-a143-1ecfbab3c8c3" }'
components:
securitySchemes:
OAuth2:
type: oauth2
description: For more information
- flows:
+ flows:
authorizationCode:
- authorizationUrl: 'https://login.xero.com/identity/connect/authorize'
- tokenUrl: 'https://identity.xero.com/connect/token'
+ authorizationUrl: https://login.xero.com/identity/connect/authorize
+ tokenUrl: https://identity.xero.com/connect/token
scopes:
email: Grant read-only access to your email
openid: Grant read-only access to your open id
@@ -834,7 +655,7 @@ components:
files: Grant read-write access to files and folders
files.read: Grant read-only access to files and folders
parameters:
- requiredHeader:
+ requiredHeader:
in: header
name: xero-tenant-id
x-snake: xero_tenant_id
@@ -848,7 +669,7 @@ components:
name: Idempotency-Key
x-snake: idempotency_key
description: This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
- example: "KEY_VALUE"
+ example: KEY_VALUE
schema:
type: string
schemas:
@@ -861,7 +682,7 @@ components:
Page:
type: integer
example: 1
- PerPage:
+ PerPage:
type: integer
example: 50
Items:
@@ -883,7 +704,7 @@ components:
MimeType:
description: MimeType of the file (image/png, image/jpeg, application/pdf, etc..)
type: string
- example: image/jpeg
+ example: image/jpeg
Size:
description: Numeric value in bytes
type: integer
@@ -891,11 +712,11 @@ components:
CreatedDateUtc:
description: Created date in UTC
type: string
- example: '2020-12-03T19:04:58.6970000'
+ example: 2020-12-03T19:04:58.6970000
UpdatedDateUtc:
description: Updated date in UTC
type: string
- example: '2020-12-03T19:04:58.6970000'
+ example: 2020-12-03T19:04:58.6970000
User:
$ref: '#/components/schemas/User'
Id:
@@ -914,7 +735,7 @@ components:
- body
- name
- filename
- properties:
+ properties:
body:
type: string
format: byte
@@ -975,11 +796,11 @@ components:
type: string
example: foo@bar.com
IsInbox:
- description: to indicate if the folder is the Inbox. The Inbox cannot be renamed or deleted.
+ description: to indicate if the folder is the Inbox. The Inbox cannot be renamed or deleted.
type: boolean
example: true
Id:
- description: Xero unique identifier for a folder Files
+ description: Xero unique identifier for a folder Files
type: string
format: uuid
example: 4ff1e5cc-9835-40d5-bb18-09fdb118db9c
@@ -987,102 +808,102 @@ components:
type: object
properties:
SendWithObject:
- description: Boolean flag to determines whether the file is sent with the document it is attached to on client facing communications. Note- The SendWithObject element is only returned when using /Associations/{ObjectId} endpoint.
+ description: Boolean flag to determines whether the file is sent with the document it is attached to on client facing communications. Note- The SendWithObject element is only returned when using /Associations/{ObjectId} endpoint.
type: boolean
example: true
Name:
- description: The name of the associated file. Note- The Name element is only returned when using /Associations/{ObjectId} endpoint.
+ description: The name of the associated file. Note- The Name element is only returned when using /Associations/{ObjectId} endpoint.
type: string
example: Test.pdf
Size:
- description: The size of the associated file in bytes. Note- The Size element is only returned when using /Associations/{ObjectId} endpoint.
+ description: The size of the associated file in bytes. Note- The Size element is only returned when using /Associations/{ObjectId} endpoint.
type: integer
example: 12357
FileId:
- description: The unique identifier of the file
+ description: The unique identifier of the file
type: string
format: uuid
- ObjectId:
- description: The identifier of the object that the file is being associated with (e.g. InvoiceID, BankTransactionID, ContactID)
+ ObjectId:
+ description: The identifier of the object that the file is being associated with (e.g. InvoiceID, BankTransactionID, ContactID)
type: string
format: uuid
ObjectGroup:
$ref: '#/components/schemas/ObjectGroup'
ObjectType:
- $ref: '#/components/schemas/ObjectType'
+ $ref: '#/components/schemas/ObjectType'
ObjectGroup:
- description: The Object Group that the object is in. These roughly correlate to the endpoints that can be used to retrieve the object via the core accounting API.
+ description: The Object Group that the object is in. These roughly correlate to the endpoints that can be used to retrieve the object via the core accounting API.
type: string
enum:
- - Account
- - BankTransaction
- - Contact
- - CreditNote
- - Invoice
- - Item
- - ManualJournal
- - Overpayment
- - Payment
- - Prepayment
- - Quote
- - Receipt
+ - Account
+ - BankTransaction
+ - Contact
+ - CreditNote
+ - Invoice
+ - Item
+ - ManualJournal
+ - Overpayment
+ - Payment
+ - Prepayment
+ - Quote
+ - Receipt
ObjectType:
description: The Object Type
type: string
enum:
- - Unknown
- - Accpay
- - AccPayCredit
- - AccPayPayment
- - AccRec
- - AccRecCredit
- - AccRecPayment
- - Adjustment
- - ApCreditPayment
- - ApOverPayment
- - ApOverPaymentPayment
- - ApOverPaymentSourcePayment
- - ApPrepayment
- - ApPrepaymentPayment
- - ApPrepaymentSourcePayment
- - ArCreditPayment
- - ArOverPayment
- - ArOverpaymentPayment
- - ArOverpaymentSourcePayment
- - ArPrepayment
- - ArPrepaymentPayment
- - ArPrepaymentSourcePayment
- - CashPaid
- - CashRec
- - ExpPayment
- - ManJournal
- - PurchaseOrder
- - Receipt
- - Transfer
- - Account
- - Contact
- - Business
- - Employee
- - Person
- - User
- - Org
- - FixedAsset
- - PayRun
- - PriceListItem
- - Bank
- - Current
- - Equity
- - Expense
- - Fixed
- - Liability
- - Prepayment
- - Revenue
- - Sales
- - Overheads
- - Depreciatn
- - OtherIncome
- - DirectCosts
- - Currliab
- - Termliab
- - NonCurrent
- - SalesQuote
\ No newline at end of file
+ - Unknown
+ - Accpay
+ - AccPayCredit
+ - AccPayPayment
+ - AccRec
+ - AccRecCredit
+ - AccRecPayment
+ - Adjustment
+ - ApCreditPayment
+ - ApOverPayment
+ - ApOverPaymentPayment
+ - ApOverPaymentSourcePayment
+ - ApPrepayment
+ - ApPrepaymentPayment
+ - ApPrepaymentSourcePayment
+ - ArCreditPayment
+ - ArOverPayment
+ - ArOverpaymentPayment
+ - ArOverpaymentSourcePayment
+ - ArPrepayment
+ - ArPrepaymentPayment
+ - ArPrepaymentSourcePayment
+ - CashPaid
+ - CashRec
+ - ExpPayment
+ - ManJournal
+ - PurchaseOrder
+ - Receipt
+ - Transfer
+ - Account
+ - Contact
+ - Business
+ - Employee
+ - Person
+ - User
+ - Org
+ - FixedAsset
+ - PayRun
+ - PriceListItem
+ - Bank
+ - Current
+ - Equity
+ - Expense
+ - Fixed
+ - Liability
+ - Prepayment
+ - Revenue
+ - Sales
+ - Overheads
+ - Depreciatn
+ - OtherIncome
+ - DirectCosts
+ - Currliab
+ - Termliab
+ - NonCurrent
+ - SalesQuote