Apply Referral
POST
/v1/referral/apply
const url = 'https://api.cloud.agentums.ru/v1/referral/apply';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.cloud.agentums.ru/v1/referral/apply \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "code": "example" }'Применить код реферера (один раз, не свой). Возвращает, зачтён ли реферал.
Authorizations
Заголовок раздела «Authorizations»Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Media typeapplication/json
ReferralApply
object
code
required
Code
string
Examplegenerated
{ "code": "example"}Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
ReferralApplyOut
object
applied
required
Applied
boolean
Examplegenerated
{ "applied": true}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}