API Quick Start
Signing Up
Self-service registration is now open. You can register for free using your email address and then log in. After successfully logging in, you will automatically receive a self-registration package. You can debug interfaces and browse API documentation in the "My API" menu.
API Credentials
Once you get the API package usage, log in the system and go to the Personal Center Page. Your API credentials are a Client ID and a Client Secret.
The packages and package usages are on the same page. You can find how many API calls can be made and have been made.
Bearer Authentication
1. Generate Authorization based on Base64 encoding rules through Client ID and Client Secret;
2. Carry Authorization as the request header to request a token;
3. Note: The token is valid for 30 minutes.
2. Carry Authorization as the request header to request a token;
3. Note: The token is valid for 30 minutes.
Client ID is b4562e4188asd4cb486a19c6971515c66(example).
Client Secret is N1eOgd8sOk4z1vaWQfB18P4AbSk70lGs(example).
You can form the POST command as below to get the Bearer.
For example:
curl -X "POST" "https://connect.patsnap.com/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded " \
-u b4562e4188asd4cb486a19c6971515c66:N1eOgd8sOk4z1vaWQfB18P4AbSk70lGs \
-d "grant_type=client_credentials"
Copy
The content returned is as follows.
{
"token": "token_example",
"token_type": "BearerToken",
"expires_in": 1799,
"status": "approved",
"issued_at":"1692347672874"
}
Copy
Business APIs
After you get the Bearer, you can use it to access the business APIs according to your package.
For Example if you want to get the patent information by patent number. You can GET With apikey, and Header Authorization, the apikey is the client id, the Authorization is Bearer [Bearer]
Here is how the command organized. (Please note the space between "Bearer" and "token_example")
Response Code
error_code | description |
67200000 | Server Internal Error! |
67200001 | API call exceeds the total limit set by the platform! |
67200002 | The current call rate is too fast, exceeding the current configuration limit QPS! |
67200003 | The key and secret parameters for applying for the token are incorrect or the client has been disabled! |
67200004 | The requested api does not have permission. Please contact our support personnel! |
67200005 | Insufficient account balance/number of calls! |
67200006 | The client has exceeded the activation validity period! |
67200007 | The current call exceeds the configured usage limit of the day! |
67200008 | Please check if the required apikey in the query parameter has been transmitted! |
67200009 | The apikey does not match the passed bearerToken. Please check if a valid token is being used! |
67200012 | The request is illegal! |
67200100 | The current server status is busy, request response timeout! |
67200101 | The API requested currently does not exist. Please check the request path! |
68300004 | Invalid parameter! |
68300005 | Search api failure! |
68300006 | Analytic basic access error! |
68300007 | Bad request! |
68300008 | Service error, please try again later! |
68300010 | The file does not comply with upload specifications! |