Authentication
To access the API, it is necessary to authenticate each request using a Bearer token in the request header. This ensures that only authorized users can interact with the endpoints.
The authentication service is based on the OAuth 2.0 standard:
- clientId: unique client identifier
- clientSecret: secret key for authentication
The n1co team will provide the necessary credentials for authentication.
📌 Get Token
- Base URL:
https://api-sandbox.n1co.shop - Method:
POST - Endpoint:
/api/v3/Token - Description: Creates a new token for API access.
- Required Headers:
Content-Type: application/json- Example:
- Request
- Response
{
"clientId": "c8573b9a-88ea-65b6-aef4-6817440f2cc1", // Unique client identifier
"clientSecret": "kt68Q-e6FS1FNgveRVsWftjU5hO6u7lE65LNlamF" // Secret key for authentication
}
{
"tokenType": "Bearer", // Token type
"accessToken": "some-access-token", // Access token
"expiresIn": 3598 // Expiration time in seconds
}
🛡️ Handling Authentication Errors
If the token is invalid or not present, the API will respond with an HTTP status code of 401 Unauthorized.