Fetch Assets
1 min
GET
https://api.nue.io/assets
Query Parameters
- customerIdsstringExample
[ "cust-12345", "cust-67890" ]
Description - assetNumberstringExampleDescription
- historybooleanDescription
- includesstringDescriptionAllowedproductpricetagsproduct,pricetags
- statusstringDescriptionAllowedshippedinstalledregisteredobsoletepurchased
Responses
200
- object
- statusstring<SUCCESS | PARTIAL_SUCCESS | FAILURE>DescriptionAllowedSUCCESSPARTIAL_SUCCESSFAILURE
- dataobject[]Description
- idstringDescription
- assetNumberstringDescription
- namestringDescription
- statusstringDescription
- customerIdstringDescription
- productIdstringDescription
- orderProductIdstringDescription
- quantitynumberDescription
- installDatestring<date>DescriptionFormatdate
- purchaseDatestring<date>DescriptionFormatdate
- pricenumberDescription
- assetVersionnumberDescription
- billingAccountIdstringDescription
- createdDatestring<date-time>DescriptionFormatdate-time
- lastModifiedDatestring<date-time>DescriptionFormatdate-time
- productobjectDescription
- idstring
- namestring
- skustring
- descriptionstring
- priceTagsobject[]Description
- idstring
- namestring
- codestring
- warningsobject[]Description
- codestring
- messagestring
207
- ErrorResponse
- statusstring<FAILURE>requiredDescriptionAllowedFAILURE
- errorTypestring<NOT_FOUND | INVALID_PARAMETER | MISSING_PARAMETER | INVALID_ARGUMENT | AUTHENTICATION_ERROR>DescriptionAllowedNOT_FOUNDINVALID_PARAMETERMISSING_PARAMETERINVALID_ARGUMENTAUTHENTICATION_ERROR
- errorCodestring<MISSING_DETAILS_FETCH_PARAMETER | MISSING_FETCH_PARAMETER | INVALID_CUSTOMER_IDS_FORMAT | INVALID_PARAMETER_COMBINATION | ORDER_UNKNOWN_FIELD | CUSTOMER_NOT_FOUND | MISSING_AUTH_METHOD | INSUFFICIENT_PERMISSIONS | INVALID_JSON>DescriptionAllowedMISSING_DETAILS_FETCH_PARAMETERMISSING_FETCH_PARAMETERINVALID_CUSTOMER_IDS_FORMATINVALID_PARAMETER_COMBINATIONORDER_UNKNOWN_FIELDCUSTOMER_NOT_FOUNDMISSING_AUTH_METHODINSUFFICIENT_PERMISSIONSINVALID_JSON
- messagestringrequiredDescription
400
- ErrorResponse
- statusstring<FAILURE>requiredDescriptionAllowedFAILURE
- errorTypestring<NOT_FOUND | INVALID_PARAMETER | MISSING_PARAMETER | INVALID_ARGUMENT | AUTHENTICATION_ERROR>DescriptionAllowedNOT_FOUNDINVALID_PARAMETERMISSING_PARAMETERINVALID_ARGUMENTAUTHENTICATION_ERROR
- errorCodestring<MISSING_DETAILS_FETCH_PARAMETER | MISSING_FETCH_PARAMETER | INVALID_CUSTOMER_IDS_FORMAT | INVALID_PARAMETER_COMBINATION | ORDER_UNKNOWN_FIELD | CUSTOMER_NOT_FOUND | MISSING_AUTH_METHOD | INSUFFICIENT_PERMISSIONS | INVALID_JSON>DescriptionAllowedMISSING_DETAILS_FETCH_PARAMETERMISSING_FETCH_PARAMETERINVALID_CUSTOMER_IDS_FORMATINVALID_PARAMETER_COMBINATIONORDER_UNKNOWN_FIELDCUSTOMER_NOT_FOUNDMISSING_AUTH_METHODINSUFFICIENT_PERMISSIONSINVALID_JSON
- messagestringrequiredDescription
401
- UnauthorizedErrorDescription
- statusDescription
- errorstringDescription
- errorCodestringDescription
- errorTypestringDescription
- messagestringDescription
curl
curl --request GET \
--url https://api.nue.io/assets \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.nue.io/assets", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.nue.io/assets")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.nue.io/assets"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Successfully retrieved assets
{
"status": "",
"data": [
{
"id": "",
"assetNumber": "",
"name": "",
"status": "",
"customerId": "",
"productId": "",
"orderProductId": "",
"quantity": 0,
"installDate": "",
"purchaseDate": "",
"price": 0,
"assetVersion": 0,
"billingAccountId": "",
"createdDate": "",
"lastModifiedDate": "",
"product": {
"id": "",
"name": "",
"sku": "",
"description": ""
},
"priceTags": [
{
"id": "",
"name": "",
"code": ""
}
]
}
],
"warnings": [
{
"code": "",
"message": ""
}
]
}GENERATED
// Successfully retrieved assets
{
"status": "",
"data": [
{
"id": "",
"assetNumber": "",
"name": "",
"status": "",
"customerId": "",
"productId": "",
"orderProductId": "",
"quantity": 0,
"installDate": "",
"purchaseDate": "",
"price": 0,
"assetVersion": 0,
"billingAccountId": "",
"createdDate": "",
"lastModifiedDate": "",
"product": {
"id": "",
"name": "",
"sku": "",
"description": ""
},
"priceTags": [
{
"id": "",
"name": "",
"code": ""
}
]
}
],
"warnings": [
{
"code": "",
"message": ""
}
]
}singleAssetByNumber
// Retrieve a specific asset by asset number
{
"status": "SUCCESS",
"data": [
{
"id": "ast-12345",
"assetNumber": "AST-001234",
"name": "Enterprise Software License",
"status": "Installed",
"customerId": "cust-67890",
"productId": "prod-abcdef",
"orderProductId": "op-123456",
"quantity": 5,
"installDate": "2024-01-15",
"purchaseDate": "2024-01-10",
"price": 2500,
"assetVersion": 1,
"billingAccountId": "ba-999888",
"createdDate": "2024-01-10T10:00:00Z",
"lastModifiedDate": "2024-01-15T14:30:00Z"
}
],
"warnings": []
}assetsByCustomerIds
// Retrieve assets for multiple customers
{
"status": "PARTIAL_SUCCESS",
"data": [
{
"id": "ast-12345",
"assetNumber": "AST-001234",
"name": "Enterprise Software License",
"status": "Installed",
"customerId": "cust-67890",
"productId": "prod-abcdef",
"quantity": 3,
"price": 1500
},
{
"id": "ast-67890",
"assetNumber": "AST-001235",
"name": "Professional Services",
"status": "Shipped",
"customerId": "cust-67890",
"productId": "prod-ghijkl",
"quantity": 1,
"price": 5000
}
],
"warnings": [
{
"code": "NOT_FOUND",
"message": "No assets found for customer ID cust-11111."
}
]
}207
// Partial Success - Some customer IDs found, others not found
{
"status": "",
"errorType": "",
"errorCode": "",
"message": ""
}400
// Bad Request - The request was malformed or contained invalid parameters
{
"status": "",
"errorType": "",
"errorCode": "",
"message": ""
}GENERATED
// Bad Request - The request was malformed or contained invalid parameters
{
"status": "",
"errorType": "",
"errorCode": "",
"message": ""
}missingParameters
// Missing required parameters
{
"status": "FAILURE",
"errorType": "MISSING_PARAMETER",
"errorCode": "MISSING_FETCH_PARAMETER",
"message": "Either customerIds or asset number must be provided."
}invalidCustomerIds
// Invalid customer IDs format
{
"status": "FAILURE",
"errorType": "INVALID_PARAMETER",
"errorCode": "INVALID_CUSTOMER_IDS_FORMAT",
"message": "Parameter customerIds must be a valid JSON array of non-empty strings."
}invalidParameterCombination
// Invalid parameter combination
{
"status": "FAILURE",
"errorType": "INVALID_PARAMETER",
"errorCode": "INVALID_PARAMETER_COMBINATION",
"message": "The customerIds and assetNumber parameters cannot be used together."
}401
// Unauthorized - Authentication failed
{
"status": "",
"error": "",
"errorCode": "",
"errorType": "",
"message": ""
}