To access the API, use OAuth 2.0 authorization.

Getting an OAuth token

To complete authorization and obtain a token, please make a request

POST https://auth-delivery.ucs.ru/connect/token
CODE

with the following parameters (Content-Type: application/x-www-form-urlencoded)

parametermeaning
client_Idissued for connection via API
client_secretissued for API connection
grant_typeclient_credentials
scopesorders

The response will contain a JWT access token and information about the token's validity period.

In HTTP Headers add a header for requests

An OAuth token need to be used in all requests.

Authorization: Bearer <access_token>
CODE

Example

Authorization: Bearer eyJhbGciOiJSUzI....aXHgrHV-I
CODE

If the token is expired, repeat the "Get OAuth token" operation.

General rules for API requests

In requests that contain JSON in the request body, you must specify the HTTP header:

Content-Type: application/json
CODE