Skip to content

Update Connect

  Method: PUT

/api/ps/connects/{ID}

  Headers

  • 'Content-Type': 'application/json'

  Parameters

  • email - email for connect, required
  • locale - EN-en or RU-ru, required
  • isSent - Connect or not, required

Code samples

await fetch('/api/ps/connects/{ID}', {
    method: 'PUT',
    headers: {
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        email: 'keygenqt@gmail.com',
        locale: 'EN-en',
        isSent: true,
    })
}).then(async (response) => {
    console.log(response)
})
  HTTP response status codes
Status code Description
200 OK
400 Bad Request
404 Resource not found
422 Form validate
500 Internal Error

  Status: 200

{
    "id": 1,
    "email": "keygenqt@gmail.com",
    "isSent": false,
    "locale": "RU-ru",
    "createAt": 1662116865969,
    "updateAt": 1662118626855
}

  Status: 400

{
    "code": 400,
    "message": "Bad Request"
}

  Status: 404

{
    "code": 404,
    "message": "Resource not found"
}

  Status: 422

{
    "code": 422,
    "message": "Error creating connect, please check the correctness of data entry",
    "validate": [
        {
            "filed": "email",
            "errors": [
                "Must not be null and not blank"
            ]
        }
    ]
}

  Status: 500

{
    "code": 500,
    "message": "Internal Error"
}