Use OAuth 2.0 authorization to get access to API.
How to get an OAuth token
POST https://auth-delivery.ucs.ru/connect/token
CODE
with the following parameters (form-data)
| parameter | value |
|---|
| client_ID | given for connection via API |
| client_secret | given for connection via API |
| grant_type | client_credentials |
| scopes | orders |
In response, you'll get a JWT access token and information about token expiration time.
It is necessary to use the OAuth token for all the requests.
Authorization: Bearer <access_token>
CODE
Example
Authorization: Bearer eyJhbGciOiJSUzI....aXHgrHV-I
CODE
If the token has expired, repeat the abovementioned actions.
General rules for requests to API
All the requests, containing JSON in their body, should have the following HTTP header:
Content-Type: application/json
CODE