https://developers.hp.com/css/api/product-warranty-api#!/queries/post_queries

Hi!

is this released yet? 

Trying your example with powershell, but it don't work with computers 

 

The endDate is not correct 

Powershell

$json = @" [{"sn":"CND3210W9M","pn":"D5H49AV"}] "@ $headers = @{} $uri = "https://test.css.api.hp.com/productWarranty/queries?apikey=jVA1nQmdGot1U7el0LRdEg9mXsuMpF9z"  $ContentType = "application/json" $Result = Invoke-WebRequest  -Method Post -Body $json -Uri $uri  -ContentType $ContentType -Headers $headers 

StatusCode        : 200 StatusDescription : OK

Response: [{"sn":"CND3210W9M","pn":"D5H49AV","product":null,"serviceType":null,"type":"Base Warranty","status":"Expired","startDate":"2013-05-27T00:00:00Z","endDate":"2013-05-27T00:00:00Z","serviceLevel":null}] 

 

 

Best regards

Patric Sten 


If all the production data is there, that's great. However, it sounds like it's not supported nor guaranteed to be up too date yet, so we're taking a risk by trusting the data at this pont, right? Any chance there's a method on the API to check when the data was last refreshed from production?


Hi dfosterh,

I don't believe there is a method on the API to determine last refresh. (I will ask the API owner about that though, as I believe that is an excellent suggestion.)

So yes, you are incurring some risk in this case, but my impression from speaking with the API owner is that the refresh task is a simple automated process not prone to failure.

Best,

HP Developer Program


OK, great. Thanks again for your quick responses and getting us closer to a solution for this.


Hi HP Developer Program,

 

Thank your fpr providing access to the api.

We would like to Access this API through JAVA or .NET. Any idea how to do this? Can you please share more details? 

Thanks

 

 


Hi API Team,

I got the API working from our application. Looks great! Thank you very much.

Couple of question...

1) I am using an "apikey" generated by registering my app. Can you tell me how long this apikey is valid? do I need to regerate the apikey again after certain period?

2) We are going to use this API in our asset management application. Is this good idea? or do we have to wait till this API is available in Production?

3) Is  this API is permanently available for customers? Are it is just temporary?

Thanks

 


Hi babu,

I'm glad you got the API working, but you probably used the endpoint from the documentation which points to a test instance. I'm going to send you some alternative information for your use which is closer to production. With that information will be a different API key and endpoint. 

This API is BETA, not yet in production and I do not have information as to if or when it will be moved to production. You use this API as is, with limited support. I apologize we cannot be more explicit with production availability information.

Sincerely,

HP Developer Program 


Hi HP Developer Program,

I see a discrepancy in the API result when compared to result from UI warranty check

I am checking the warranty for the serial no :CNU413D483 and Product number :B8S43AW using the UI http://h20564.www2.hp.com/hpsc/wc/public/home

and I get

Start date          : Mar 31, 2014

End date           : Apr 6, 2017    

But the API returns

[{

   "sn": "CNU413D483",

   "pn": "B8S43AW",

   "product": null,

   "serviceType": "W",

   "type": "Base Warranty",

   "status": "Active",

   "startDate": "2014-04-01T00:00:00Z",

   "endDate": "2017-05-05T00:00:00Z",

   "serviceLevel": "Std Office Hrs Std Office Days"

}]

Can you please let me know why there is a discrepancy in the API result?

Below is the request to API

[   {     "sn": "CNU413D483",     "pn": "B8S43AW"   } ]

I am using API URL  https://css.api.hp.com/productWarranty/queries

 

Thanks,

Babu

 


Hi Babu,

We will get you an answer to your question as soon as possible, but it appears that next week will be the earliest for that, given this is a holiday week. I apologize for the delay.

Best regards,

HP Developer Program


please provide access to api documentation


For Warranty API Access Requests, please submit the form located here: https://developers.hp.com/css-enroll

Thank you,

HP Developer Program


Hello , the result is empty for G2 and G3 models, but works for G1. Can you explain and fix it please ? 

Same results on test.css.api.hp.com and css.api.hp.com : 

- Result for G1 OK : [{"sn":"CZC452385K","pn":"C8N26AV","product":null,"serviceType":"W","type":"Base Warranty","status":"Active","startDate":"2015-01-01T00:00:00Z","endDate":"2018-01-30T00:00:00Z","serviceLevel":"Std Office Hrs Std Office Days"}]

- Result for G2 KO: [{"sn":"CZC55033CT","pn":"T4J83EAABF","product":null,"serviceType":null,"type":null,"status":"Expired","startDate":"0001-01-01T00:00:00","endDate":"0001-01-01T00:00:00","serviceLevel":null}]

- Result for G3 KO: [{"sn":"5CG6266KND","pn":"L3C65AV","product":null,"serviceType":null,"type":null,"status":"Expired","startDate":"0001-01-01T00:00:00","endDate":"0001-01-01T00:00:00","serviceLevel":null}]

We really need a way to retrieve our 1000+ HP warranty information. It's really important for my customer. 

Thank you .  

Gaëtan 


Hello Gaetan,

It may be that the base warranty is expired. The API does not provide extended warranty information at present. This API is in a BETA phase at present and does not cover all products.

Thank you,

HP Developer Program


using the API key through the generator produces 401 error. Only his major works. I've spent hours on the phone trying to track down who is responsible for this service and have gotten no where. 


Can we get an update on this API? I could really use this to be a working thing.


We need to have a possibility to make more than 100 calls to API. How could we get it?

Thank you


Can anyone confirm that this API still works. I hve been trying for days and I get a general error message "An error has occurred" after oauth step when you actually query for the Warranty details.

 

 


Hi garthmj, 

The api is working perfectly. Hope you are missing serial number and product number in the body section. That is the reason you are getting "An error occurred" message.

 

 

 


Dear  HP Developer Program,

I have requested for access through https://developers.hp.com/css-enroll

waiting for approval. 

 

I hope it will work as right now when im trying to use Api Key generated for application the response doesnt bring appropriate Scope so i assume the oauth token is incorrectly generated thats why i'm recaiving invalid token response when querring the API

 

Thanks


Dears

As far as i were able to check the api is not working correctly.

Im able to post the list of Devices (2 rows) 

and then when trying to get back the information it responses with 

"message":"An error has occurred." 

or the gateway timeout. 

Any advices ? 


We have the same issue here ! It would be really nice to get some feedback HP.

I know this API is still beta but it is now down for several days.


Hello fabianre, We are working with the API owner to obtain more information on its status and will let you know what is determined. Thank you for your patience. HP Developer Program


Thanks for taking care, API is back online and I can retrieve results :-)


Hi,

Can you please send me the complete documentatiion of HP Product Warranty API? I trying to integrate using REST webservice passing the serial number.

Most importantly I need the authorization URL for HP Api, Looks like without the auth URL I cannot proceed forward.

 

Thanks in Advance,

Abilash 


The API works for getting a token, creating a job, and for the query portion of this api.  However, check job status and get job info, it gives a general error.  My script has been working fine until a couple of days ago.  I have tried the test on the warranty API page, but still gives the error.  

Is this service still available?  


This continues to fail with Invalid Access token (even on the demo website using the access code returned from the demo api /oauth/v1/token request). The scheme name "Bearer" is being included in front of the access token as required.

Any ideas?

 


And give me the apikey and secret you are using ..


Can you post the instructional document for all to see and use? I'm wanting to add a check warrant button in my in-house application. This will be used by our techs.


Well, I am experiencing some issues with the API. To retrieve the token I can use the follwing CURL action.

curl -X POST "https://css.api.hp.com/oauth/v1/token" -H "accept: application/json" -H "content-type: application/x-www-form-urlencoded" -d "apiKey=xxx&apiSecret=xxx&grantType=client_credentials&scope=warranty"

This returns a token, which I can use for the follwing CURL action:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Bearer XXXXXXXXXXXXXXXXXXX' -d '[{"sn": " 5CB3513T08"}]' 'https://css.api.hp.com/productWarranty/v1/queries' 

This returns: {"message":"An error has occurred."}. Am I doing something wrong?


I'm getting the same problem as garthmj, using a script method and using the online test page.

Error code 400 - which is undocumented, and "message":"An error has occurred."

How do we query for our warranty information if this API isn't working?

 


The API has been working great the past month, but stopped working this past Thursday. We get the same 400 now on every request. Last time this happend rtbui02 (I believe) checked in to it and got it working again. 


It seems I am not the only one with problems, who can we contact to solve this situation?


Same problem, and no help for a week now


The API has been restarted and should be functional once again. Reminder: Status is still BETA. Thanks for your patience. - HP Developer Program


Still gettings 400 errors while running a query unfortunately. Is there still something wrong?


Thanks Owen, I no longer get a 400 HTTP error code - but when I query for a machine using its SN and PN which I know has a warranty. I get this data back :

"status":"Expired","startDate":"0001-01-01T00:00:00","endDate":"0001-01-01T00:00:00","serviceLevel":null

I've tried with about 4 or 5 different machines, all come back with start and end dates of 0.

 

 


What types of warranties are you querying for? Basic? Extended? Thanks.


Hello Owen, is it possible to query extended warranty? The only thing I receive now is the 'warranty' scope. 


Extended warranties are not currently supported by this API. That may change in the future, but for now they are not supported.


Hi,

I am using the API right now, but the API is giving different days than the warranty page gives

https://support.hp.com/us-en/checkwarranty

I use the following CURL command:

curl -X POST "https://css.api.hp.com/productWarranty/v1/queries" -H "accept: application/json" -H "Authorization: Bearer DHc6zhXcYYczNkTnafhGx89hqs4A" -H "content-type: application/json" -d "[ { \"sn\": \"5CG6053W39\", \"pn\": \"D9R53AV\" }]"

The result:

[
  {
    "sn": "5CG6053W39",
    "pn": "D9R53AV",
    "product": null,
    "serviceType": "W",
    "type": "Base Warranty",
    "status": "Expired",
    "startDate": "2016-02-05T00:00:00Z",
    "endDate": "2017-03-11T00:00:00Z",
    "serviceLevel": "Std Office Hrs Std Office Days"
  }
]

The warranty page said something different. How can I solve this?


How can I request access to the api?


Hi apound,

Please submit the following form to request access: https://developers.hp.com/css-enroll

Best,

HP Developer Program


I get Invalid Access Token using the website and the Postman Templates when doing a query.  Im getting the token from the thetoken call and it seems to work


Please give your full request, and try the same with swagger ui.


I am not able to access api documentation. Please provide me access..


Hi devbilal,

Please request access here: https://developers.hp.com/css-enroll

Best regards,

HP Developer Program


In this I want API and which parameter I have to pass (In which format) so as a response I can get the warranty detail of product. I have tried above API which mentioned in comments but nothing work. If any working API is there please reply.


I also want to know API for warranty details for HP laptop.

how we can get warranty details for HP products.

please reply


Hello vbisgr8, you may request access to the warranty API by submitting the following form: https://developers.hp.com/css-enroll


I have register app in HP for getting the warranty details.

But when I go for the query (/productWarranty/v1/queries) as the response I got StartDate and EndDate is coming '0001-01-01T00:00:00' My laptop base warranty is expired extended warranty is still present I want to know how I can check the extended warranty using API.


Hello Vinayak,

Extended warranties are not currently supported in the BETA API. However, I'm pleased to announce that a new revision is being developed which will provide this support. I'm not sure of the timeframe for release yet, but will post more information here.

Best regards,

HP Developer Program