From 3d7e88580d047ddb3e19db74fd36f898c1b78b3b Mon Sep 17 00:00:00 2001 From: Kavin Ginige Date: Fri, 31 Jul 2026 10:39:55 +1200 Subject: [PATCH] feat(accounting): Adds spec for invoice backorders and backorder-specific item fields Co-authored-by: Jonathan Hatlee " --- xero_accounting.yaml | 47 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/xero_accounting.yaml b/xero_accounting.yaml index fffdf27fe..14f8a8b0e 100644 --- a/xero_accounting.yaml +++ b/xero_accounting.yaml @@ -7820,6 +7820,7 @@ paths: - $ref: "#/components/parameters/summarizeErrors" - $ref: "#/components/parameters/unitdp" - $ref: "#/components/parameters/idempotencyKey" + - $ref: "#/components/parameters/allowBackorders" responses: "200": description: Success - return response of type Invoices array with newly created Invoice @@ -8133,6 +8134,7 @@ paths: - $ref: "#/components/parameters/summarizeErrors" - $ref: "#/components/parameters/unitdp" - $ref: "#/components/parameters/idempotencyKey" + - $ref: "#/components/parameters/allowBackorders" responses: "200": description: Success - return response of type Invoices array with newly created Invoice @@ -8435,6 +8437,7 @@ paths: - $ref: "#/components/parameters/InvoiceID" - $ref: "#/components/parameters/unitdp" - $ref: "#/components/parameters/idempotencyKey" + - $ref: "#/components/parameters/allowBackorders" responses: "200": description: Success - return response of type Invoices array with updated Invoice @@ -8949,6 +8952,28 @@ paths: IsTrackedAsInventory: false IsSold: true IsPurchased: true + - ItemID: 5a70a272-a481-4bcf-a8ca-efffd923ab48 + Code: fg78Ac + Description: Fender Stratocaster Sunburst + PurchaseDescription: Fender Stratocaster Sunburst + UpdatedDateUTC: /Date(1552331874000+0000)/ + PurchaseDetails: + UnitPrice: 1500.0000 + COGSAccountCode: "500" + TaxType: "" + SalesDetails: + UnitPrice: 5000.0000 + AccountCode: "200" + TaxType: OUTPUT2 + Name: Fender Stratocaster + IsTrackedAsInventory: true + InventoryAssetAccountCode: "140" + TotalCostPool: 0.00 + QuantityOnHand: 0.0000 + QuantityAvailable: 0.0000 + QuantityOnBackOrder: 0.0000 + IsSold: true + IsPurchased: true put: security: - OAuth2: @@ -9196,6 +9221,8 @@ paths: InventoryAssetAccountCode: "630" TotalCostPool: 25000.00 QuantityOnHand: 10.0000 + QuantityAvailable: 10.0000 + QuantityOnBackOrder: 0.0000 IsSold: true IsPurchased: true ValidationErrors: [] @@ -19828,6 +19855,14 @@ components: example: KEY_VALUE schema: type: string + allowBackorders: + in: query + name: allowBackorders + x-snake: allow_backorders + description: Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative + example: true + schema: + type: boolean includeOnline: in: query name: IncludeOnline @@ -22649,10 +22684,20 @@ components: format: double x-is-money: true QuantityOnHand: - description: The quantity of the item on hand + description: The quantity of the item on hand. This will be 0 if `QuantityOnBackOrder` is greater than 0. type: number format: double x-is-money: true + QuantityAvailable: + description: The quantity of the item available. This is equal to `QuantityOnHand` - `QuantityOnBackOrder`. This value will be negative if `QuantityOnBackOrder` is greater than 0. + type: number + format: double + readOnly: true + QuantityOnBackOrder: + description: The quantity of the item on backorder. This will be 0 if `QuantityOnHand` is greater than 0. + type: number + format: double + readOnly: true UpdatedDateUTC: description: Last modified date in UTC format type: string