Fetch Entitlements
1 min
GET
https://api.nue.io/entitlements
Query Parameters
- customerIdsstringExample
[ "cust-12345", "cust-67890" ]
Description - entitlementNumberstringExampleDescription
- historybooleanDescription
- includesstringDescriptionAllowedproductpricetagsproduct,pricetags
- statusstringDescriptionAllowedactiveexpiredcanceled
Responses
200
- object
- statusstring<SUCCESS | PARTIAL_SUCCESS | FAILURE>DescriptionAllowedSUCCESSPARTIAL_SUCCESSFAILURE
- dataobject[]Description
- idstringDescription
- entitlementNumberstringDescription
- namestringDescription
- statusstringDescription
- customerIdstringDescription
- productIdstringDescription
- orderProductIdstringDescription
- quantitynumberDescription
- usedQuantitynumberDescription
- startDatestring<date>DescriptionFormatdate
- endDatestring<date>DescriptionFormatdate
- entitlementVersionnumberDescription
- 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
404
- NotFoundErrorDescription
- statusintegerDescription
- errorstringDescription
- messagestringDescription
curl
curl --request GET \
--url https://api.nue.io/entitlements \
--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/entitlements", 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/entitlements")
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/entitlements"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Successfully retrieved entitlements
{
"status": "",
"data": [
{
"id": "",
"entitlementNumber": "",
"name": "",
"status": "",
"customerId": "",
"productId": "",
"orderProductId": "",
"quantity": 0,
"usedQuantity": 0,
"startDate": "",
"endDate": "",
"entitlementVersion": 0,
"billingAccountId": "",
"createdDate": "",
"lastModifiedDate": "",
"product": {
"id": "",
"name": "",
"sku": "",
"description": ""
},
"priceTags": [
{
"id": "",
"name": "",
"code": ""
}
]
}
],
"warnings": [
{
"code": "",
"message": ""
}
]
}GENERATED
// Successfully retrieved entitlements
{
"status": "",
"data": [
{
"id": "",
"entitlementNumber": "",
"name": "",
"status": "",
"customerId": "",
"productId": "",
"orderProductId": "",
"quantity": 0,
"usedQuantity": 0,
"startDate": "",
"endDate": "",
"entitlementVersion": 0,
"billingAccountId": "",
"createdDate": "",
"lastModifiedDate": "",
"product": {
"id": "",
"name": "",
"sku": "",
"description": ""
},
"priceTags": [
{
"id": "",
"name": "",
"code": ""
}
]
}
],
"warnings": [
{
"code": "",
"message": ""
}
]
}singleEntitlementByNumber
// Retrieve a specific entitlement by entitlement number
{
"status": "SUCCESS",
"data": [
{
"id": "ent-12345",
"entitlementNumber": "ENT-001234",
"name": "API Access Entitlement",
"status": "Active",
"customerId": "cust-67890",
"productId": "prod-abcdef",
"orderProductId": "op-123456",
"quantity": 1000,
"usedQuantity": 250,
"startDate": "2024-01-01",
"endDate": "2024-12-31",
"entitlementVersion": 1,
"billingAccountId": "ba-999888",
"createdDate": "2024-01-01T00:00:00Z",
"lastModifiedDate": "2024-01-15T14:30:00Z"
}
],
"warnings": []
}entitlementsByCustomerIds
// Retrieve entitlements for multiple customers
{
"status": "PARTIAL_SUCCESS",
"data": [
{
"id": "ent-12345",
"entitlementNumber": "ENT-001234",
"name": "API Access Entitlement",
"status": "Active",
"customerId": "cust-67890",
"productId": "prod-abcdef",
"quantity": 1000,
"usedQuantity": 250,
"startDate": "2024-01-01",
"endDate": "2024-12-31"
},
{
"id": "ent-67890",
"entitlementNumber": "ENT-001235",
"name": "Storage Entitlement",
"status": "Active",
"customerId": "cust-67890",
"productId": "prod-ghijkl",
"quantity": 500,
"usedQuantity": 120,
"startDate": "2024-02-01",
"endDate": "2025-01-31"
}
],
"warnings": [
{
"code": "NOT_FOUND",
"message": "No entitlements 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 entitlementNumber 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 entitlementNumber parameters cannot be used together."
}401
// Unauthorized - Authentication information is missing or invalid
{
"status": "",
"error": "",
"errorCode": "",
"errorType": "",
"message": ""
}404
// Not Found - The requested resource was not found
{
"status": 0,
"error": "",
"message": ""
}GENERATED
// Not Found - The requested resource was not found
{
"status": 0,
"error": "",
"message": ""
}resourceNotFound
// Resource not found
{
"timestamp": "2024-01-15T14:30:00Z",
"path": "/customers",
"status": 404,
"error": "Not Found",
"requestId": "req-12345"
}