@@ -11074,6 +11074,157 @@ contact: {}, date:"2020-01-01", user:{} } ] } ] }'
1107411074 schema:
1107511075 $ref: '#/components/schemas/PurchaseOrders'
1107611076 example: '{ purchaseOrders:[ { attentionTo:"Peter Parker",lineItems: [],contact: {} } ] }'
11077+ '/PurchaseOrders/{PurchaseOrderNumber}':
11078+ parameters:
11079+ - $ref: '#/components/parameters/requiredHeader'
11080+ x-related-model: PurchaseOrder
11081+ get:
11082+ security:
11083+ - OAuth2: [accounting.transactions.read]
11084+ tags:
11085+ - Accounting
11086+ operationId: getPurchaseOrderByNumber
11087+ summary: Allows you to retrieve a specified purchase orders
11088+ parameters:
11089+ - required: true
11090+ in: path
11091+ name: PurchaseOrderNumber
11092+ description: Unique identifier for a PurchaseOrder
11093+ example: "PO1234"
11094+ schema:
11095+ type: string
11096+ responses:
11097+ '200':
11098+ description: Success - return response of type PurchaseOrder array for specified PurchaseOrder
11099+ content:
11100+ application/json:
11101+ schema:
11102+ $ref: '#/components/schemas/PurchaseOrders'
11103+ example: '{
11104+ "Id": "53a8c7a5-92e8-475b-a037-acf7c55c3afd",
11105+ "Status": "OK",
11106+ "ProviderName": "Java Partner Example",
11107+ "DateTimeUTC": "\/Date(1553626110950)\/",
11108+ "PurchaseOrders": [
11109+ {
11110+ "PurchaseOrderID": "15369a9f-17b6-4235-83c4-0029256d1c37",
11111+ "PurchaseOrderNumber": "PO-0006",
11112+ "DateString": "2019-03-26T00:00:00",
11113+ "Date": "\/Date(1553558400000+0000)\/",
11114+ "DeliveryDateString": "2019-03-28T00:00:00",
11115+ "DeliveryDate": "\/Date(1553731200000+0000)\/",
11116+ "DeliveryAddress": "101 Grafton Road\nRoseneath\nWellington\n6011\nNew Zealand",
11117+ "AttentionTo": "CEO",
11118+ "Telephone": "64 123-2222",
11119+ "DeliveryInstructions": "Drop off at front door",
11120+ "HasErrors": false,
11121+ "IsDiscounted": true,
11122+ "TotalDiscount": 250.00,
11123+ "SentToContact": false,
11124+ "Reference": "foobar",
11125+ "Type": "PURCHASEORDER",
11126+ "CurrencyRate": 1.000000,
11127+ "CurrencyCode": "NZD",
11128+ "Contact": {
11129+ "ContactID": "430fa14a-f945-44d3-9f97-5df5e28441b8",
11130+ "ContactStatus": "ACTIVE",
11131+ "Name": "Liam Gallagher",
11132+ "FirstName": "Liam",
11133+ "LastName": "Gallagher",
11134+ "EmailAddress": "
[email protected] ",
11135+ "BankAccountDetails": "",
11136+ "Addresses": [
11137+ null,
11138+ {
11139+ "AddressType": "POBOX",
11140+ "City": "Anytown",
11141+ "Region": "NY",
11142+ "PostalCode": "10101",
11143+ "Country": "USA",
11144+ "AttentionTo": ""
11145+ }
11146+ ],
11147+ "Phones": [
11148+ {
11149+ "PhoneType": "DEFAULT",
11150+ "PhoneNumber": "222-2222",
11151+ "PhoneAreaCode": "212",
11152+ "PhoneCountryCode": ""
11153+ },
11154+ null,
11155+ {
11156+ "PhoneType": "FAX",
11157+ "PhoneNumber": "333-2233",
11158+ "PhoneAreaCode": "212",
11159+ "PhoneCountryCode": ""
11160+ },
11161+ {
11162+ "PhoneType": "MOBILE",
11163+ "PhoneNumber": "444-3433",
11164+ "PhoneAreaCode": "212",
11165+ "PhoneCountryCode": ""
11166+ }
11167+ ],
11168+ "UpdatedDateUTC": "\/Date(1553672800957+0000)\/",
11169+ "ContactGroups": [
11170+ {
11171+ "ContactGroupID": "17b44ed7-4389-4162-91cb-3dd5766e4e22",
11172+ "Name": "Oasis",
11173+ "Status": "ACTIVE",
11174+ "Contacts": [],
11175+ "HasValidationErrors": false
11176+ }
11177+ ],
11178+ "IsSupplier": true,
11179+ "IsCustomer": true,
11180+ "DefaultCurrency": "NZD",
11181+ "SalesTrackingCategories": [],
11182+ "PurchasesTrackingCategories": [],
11183+ "ContactPersons": [],
11184+ "HasValidationErrors": false
11185+ },
11186+ "BrandingThemeID": "414d4a87-46d6-4cfc-ab42-4e29d22e5076",
11187+ "Status": "DRAFT",
11188+ "LineAmountTypes": "Exclusive",
11189+ "LineItems": [
11190+ {
11191+ "ItemCode": "123",
11192+ "Description": "Brand new Fender Strats",
11193+ "UnitAmount": 2500.0000,
11194+ "TaxType": "INPUT2",
11195+ "TaxAmount": 337.50,
11196+ "LineAmount": 2250.00,
11197+ "AccountCode": "630",
11198+ "Tracking": [
11199+ {
11200+ "Name": "Simpsons",
11201+ "Option": "Homer",
11202+ "TrackingCategoryID": "6a68adde-f210-4465-b0a9-0d8cc6f50762",
11203+ "TrackingOptionID": "94faf12f-f65c-4331-8004-b0b7c5a2da23"
11204+ }
11205+ ],
11206+ "Quantity": 1.0000,
11207+ "DiscountRate": 10.00,
11208+ "LineItemID": "8a9d3eca-e052-43bc-9b87-221d0648c045"
11209+ }
11210+ ],
11211+ "SubTotal": 2250.00,
11212+ "TotalTax": 337.50,
11213+ "Total": 2587.50,
11214+ "UpdatedDateUTC": "\/Date(1553626029823+0000)\/",
11215+ "HasAttachments": true,
11216+ "Attachments": [
11217+ {
11218+ "AttachmentID": "7d94ccdc-ef7b-4806-87ac-8442f25e593b",
11219+ "FileName": "HelloWorld.png",
11220+ "Url": "https://api.xero.com/api.xro/2.0/PurchaseOrders/15369a9f-17b6-4235-83c4-0029256d1c37/Attachments/HelloWorld.png",
11221+ "MimeType": "image/png",
11222+ "ContentLength": 76091
11223+ }
11224+ ]
11225+ }
11226+ ]
11227+ }'
1107711228 '/PurchaseOrders/{PurchaseOrderID}/History':
1107811229 parameters:
1107911230 - $ref: '#/components/parameters/requiredHeader'
@@ -18813,6 +18964,11 @@ components:
1881318964 type: array
1881418965 items:
1881518966 $ref: '#/components/schemas/Allocation'
18967+ AppliedAmount:
18968+ description: The amount of applied to an invoice
18969+ type: number
18970+ format: double
18971+ example: 2.00
1881618972 Payments:
1881718973 description: See Payments
1881818974 type: array
@@ -20509,6 +20665,11 @@ components:
2050920665 type: array
2051020666 items:
2051120667 $ref: '#/components/schemas/Allocation'
20668+ AppliedAmount:
20669+ description: The amount of applied to an invoice
20670+ type: number
20671+ format: double
20672+ example: 2.00
2051220673 Payments:
2051320674 description: See Payments
2051420675 type: array
@@ -20567,6 +20728,11 @@ components:
2056720728 outstanding amount owing on the invoice e.g. 200.00
2056820729 type: number
2056920730 format: double
20731+ AppliedAmount:
20732+ description: The amount of applied to an invoice
20733+ type: number
20734+ format: double
20735+ example: 2.00
2057020736 Reference:
2057120737 description: An optional description for the payment e.g. Direct Debit
2057220738 type: string
@@ -20704,6 +20870,11 @@ components:
2070420870 type: array
2070520871 items:
2070620872 $ref: '#/components/schemas/Allocation'
20873+ AppliedAmount:
20874+ description: The amount of applied to an invoice
20875+ type: number
20876+ format: double
20877+ example: 2.00
2070720878 HasAttachments:
2070820879 description: boolean to indicate if a prepayment has an attachment
2070920880 type: boolean
0 commit comments