LogoРТА Технологии
OpenAPIRegistrationcodes

Update Registration Code

POST
/api/registration_codes/{code}

Authorization

OAuth2PasswordBearer
AuthorizationBearer <token>

In: header

Path Parameters

code*string

Request Body

application/json

max_registrations?integer

Maximum number of registrations. Set -1 to disable limit.

Default-1
Range-1 <= value
expiring_at?string

Expiring date. After this date code will be deleted

Formatdate-time
available_seconds*integer

For newly created users set available seconds to this field.

Range0 < value

Response Body

application/json

application/json

curl -X POST "https://app.otascribe.ru/api/api/registration_codes/string" \  -H "Content-Type: application/json" \  -d '{    "available_seconds": 0  }'
{
  "max_registrations": -1,
  "expiring_at": "2019-08-24T14:15:22Z",
  "available_seconds": 0,
  "code": "string",
  "owner_login": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}