Allows you to create one or more items
PUT {{baseUrl}}/Items?summarizeErrors=false&unitdp=<integer>
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
summarizeErrors | boolean | If false return 200 OK and mix of successfully created objects and any with validation errors | |
unitdp | string | e.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
Key | Datatype | Required | Description |
---|---|---|---|
xero-tenant-id | string | (Required) Xero identifier for Tenant | |
Content-Type | string |
RESPONSES
status: OK
{"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"}]}]}