PUT Update Session

Update the details you provided when creating a session belonging to the API-Key by referencing the session_key - if it has not yet been started by the User.

You can only update redirect_url, language while the session has not yet been completed by the User

You can only update the theme when the session has not yet started, and the status is IDLE

You can only update the sms.to when the session has not yet started, and the sms delivery status is an error.

https://openapi.paveapi.com/v1/sessions/:session_key

Replace :session_key with the unique session_key returned from your previous request, and PAVE will update the corresponding session details.

Sample Session Payload

{
            "session": {
                "theme": "LITE",
                "redirect_url": "https://www.url-to-redirect-user-to.com",
                "language": "EN",
                "client_id": "SOUTH234889"
            }
}

Sample Vehicle Payload

{ 
            "vehicle": {
                "vin":"JN1CV6AR9BMXXXXXX",
                "year":"2011",
                "make":"Infiniti",
                "model":"G37",
                "body_type":"Sedan",
                "trim":"Luxury",
                "transmission":"Automatic",
                "ext_col":"Malbec Black",
                "int_col":"Wheat",
                "odom_reading":330477,
                "odom_unit":"KILOMETRES"
            }
}

Sample SMS Payload

{
            "sms": {
                "to": "647-455-XXXX",
                "to_name": "Jane Smith",
                "from": "647-422-XXXX",
                "by": "Steve Test Dealer"
            }
}
{
            "sms": {
                "to": "647-455-XXXX"
            }
}

Sample Response (200: Ok)

Updated successfully retrieved.

{
    "session_key": "XXX-ABCDE12345",
    "theme": "PRO",
    "active": true,
    "status": "IDLE",
    "redirect_url": "https://dev.paveinspect.com/valet/XXX-ABCDE12345/?l=en",
    "inspect_started_at": "",
    "inspect_ended_at": "",
    "created_at": "2021-05-25T11:50:49.000000Z",
    "updated_at": "2021-05-25T11:59:20.000000Z",
    "language": "EN",
    "options": {
        "client_id": "SOUTH234889",
        "sms": {
            "to": "647-455-XXXX",
            "to_name": "Jane Smith",
            "from": "647-422-XXXX",
            "by": "Steve's Test Dealer",
            "delivery_status": "201 Created",
            "delivery_message": ""            
        }
    },
    "vehicle": {
        "vin": "JN1CV6AR9BMXXXXXX"
    }
}

Sample Response (404: Not Found)

Could not find a session matching the session_key.

{
    "message": "Session :session_key cannot be found."
}

Last updated