{ "operationId": "createReceipt", "method": "PUT", "path": "/Receipts", "summary": "Xero Creates draft expense claim receipts for any user", "requestExamples": [ { "contentType": "application/json", "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" } ] } } ], "responseExamples": [ { "status": "200", "contentType": "application/json", "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.0, "TaxType": "NONE", "TaxAmount": 0.0, "LineAmount": 40.0, "AccountCode": "400", "Tracking": [], "Quantity": 2.0 } ], "SubTotal": 40.0, "TotalTax": 0.0, "Total": 40.0, "ID": "a44fd147-af4e-4fe8-a09a-55332df74162", "HasAttachments": false, "ValidationErrors": [ { "Message": "A valid user should be identified using the UserID." } ] } ] } } ] }