Allows you to create one or more items

PUT {{baseUrl}}/Items?summarizeErrors=false&unitdp=<integer>

Request Params

KeyDatatypeRequiredDescription
summarizeErrorsbooleanIf false return 200 OK and mix of successfully created objects and any with validation errors
unitdpstringe.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts

Request Body

{"Items"=>[{"Code"=>"<string>", "InventoryAssetAccountCode"=>"<string>", "Name"=>"<string>", "IsSold"=>"<boolean>", "IsPurchased"=>"<boolean>", "Description"=>"<string>", "PurchaseDescription"=>"<string>", "PurchaseDetails"=>{"UnitPrice"=>"<double>", "AccountCode"=>"<string>", "COGSAccountCode"=>"<string>", "TaxType"=>"<string>"}, "SalesDetails"=>{"UnitPrice"=>"<double>", "AccountCode"=>"<string>", "COGSAccountCode"=>"<string>", "TaxType"=>"<string>"}, "IsTrackedAsInventory"=>"<boolean>", "TotalCostPool"=>"<double>", "QuantityOnHand"=>"<double>", "ItemID"=>"<uuid>", "StatusAttributeString"=>"<string>", "ValidationErrors"=>[{"Message"=>"<string>"}, {"Message"=>"<string>"}]}, {"Code"=>"<string>", "InventoryAssetAccountCode"=>"<string>", "Name"=>"<string>", "IsSold"=>"<boolean>", "IsPurchased"=>"<boolean>", "Description"=>"<string>", "PurchaseDescription"=>"<string>", "PurchaseDetails"=>{"UnitPrice"=>"<double>", "AccountCode"=>"<string>", "COGSAccountCode"=>"<string>", "TaxType"=>"<string>"}, "SalesDetails"=>{"UnitPrice"=>"<double>", "AccountCode"=>"<string>", "COGSAccountCode"=>"<string>", "TaxType"=>"<string>"}, "IsTrackedAsInventory"=>"<boolean>", "TotalCostPool"=>"<double>", "QuantityOnHand"=>"<double>", "ItemID"=>"<uuid>", "StatusAttributeString"=>"<string>", "ValidationErrors"=>[{"Message"=>"<string>"}, {"Message"=>"<string>"}]}]}

HEADERS

KeyDatatypeRequiredDescription
xero-tenant-idstring(Required) Xero identifier for Tenant
Content-Typestring

RESPONSES

status: OK

{&quot;Id&quot;:&quot;ae7ef7c8-9024-4d42-8d59-5f26ed3f508b&quot;,&quot;Status&quot;:&quot;OK&quot;,&quot;ProviderName&quot;:&quot;Provider Name Example&quot;,&quot;DateTimeUTC&quot;:&quot;/Date(1552331871904)/&quot;,&quot;Items&quot;:[{&quot;ItemID&quot;:&quot;a4544d51-48f6-441f-a623-99ecbced6ab7&quot;,&quot;Code&quot;:&quot;abc65591&quot;,&quot;Description&quot;:&quot;foobar&quot;,&quot;UpdatedDateUTC&quot;:&quot;/Date(1552331871707)/&quot;,&quot;PurchaseDetails&quot;:{},&quot;SalesDetails&quot;:{},&quot;Name&quot;:&quot;Hello11350&quot;,&quot;IsTrackedAsInventory&quot;:false,&quot;IsSold&quot;:true,&quot;IsPurchased&quot;:true,&quot;ValidationErrors&quot;:[{&quot;Message&quot;:&quot;Price List Item with Code &#39;abc&#39; already exists&quot;}]}]}