xero-python icon indicating copy to clipboard operation
xero-python copied to clipboard

Missing Asset Serial Number and Warranty Expiry Date in get_assets API Response

Open Jarred-VIPER opened this issue 2 years ago • 3 comments

Issue Description: When using the get_assets API endpoint in the Xero API to retrieve asset information, the response is missing the serial_number and warranty_expiry_date fields. However, when using the get_asset API with a specific asset_id, these fields are present in the response.

Steps to Reproduce:

Make a call to the get_assets endpoint with the required parameters (e.g., xero_tenant_id, xero_status, page, page_size). Inspect the response for the presence of the serial_number and warranty_expiry_date fields. Expected Behavior: The get_assets API response should include the serial_number and warranty_expiry_date fields for each asset, providing comprehensive information about the assets.

Actual Behavior: The serial_number and warranty_expiry_date fields are missing from the get_assets API response, making it necessary to use the get_asset API with a specific asset_id to retrieve this information.

API Call: xero_assets = asset_api.get_assets(xero_tenant_id, xero_status, page, page_size,)

Sample Output: { 'asset_id': 'fec39a7b-198f-4ada-abbd-175429eac520', 'asset_name': 'Dozer', 'asset_number': 'DZ003', 'serial_number': None, 'warranty_expiry_date': None, }

Screenshot: Screenshot from 2023-10-27 18-40-32

Jarred-VIPER avatar Oct 27 '23 10:10 Jarred-VIPER

PETOSS-358

github-actions[bot] avatar Oct 27 '23 10:10 github-actions[bot]

Thanks for raising an issue, a ticket has been created to track your request

github-actions[bot] avatar Oct 27 '23 10:10 github-actions[bot]

This is by design, a GET all call gives a summary response, the GET asset by id gives more details.

The example responses for the different calls are listed here https://developer.xero.com/documentation/api/assets/assets

Sallyhornet avatar Oct 27 '23 11:10 Sallyhornet