S-Assist Arena - API Reference

Updated on 27th July, 2024

Base URLs

Development:

Staging

Production:

1. Ping

Description

The reachability of the host can be checked through the Ping API. The API responds with a pong to communicate availability to the requesting client.

Method

GET

URL

/ping

Headers

None

Query

None

Body

None

curl

curl -X GET 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/ping'

Response Type

String

Response

pong

2. Healthchecks

Description

Internal healthchecks are run when the healthchecks API is invoked. This triggers a mechanism for the server to check the health of all connected services, and responds with a successful response if all systems are healthy.

Method

GET

URL

/healthchecks

Headers

None

Query

None

Body

None

curl

curl -X GET 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/healthchecks'

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful"
}

3. Authentication

Description

Users may be authenticated based on different mechanisms. In case of the user app, the API key provided for vendors allows implicit authentication. For internal systems, credentials from DMS are used. Separate email and password is provided for business users.

Method

POST

URL

/auths/login

Headers

Query

None

Body

curl

curl --location --request POST 'https://api.assist.sassist.marutisuzuki.com/stage/auths/login' \
--header 'x-key: d569d0afd7f74393a76851574c822d13a76a21b7a218475ea995c8daf3f8f4d9' \
--header 'x-origin: 5' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--header 'Content-Type: application/json' \
--data '{
    "role_id": 1,
    "phone": "8810474955",
    "first_name": "Nooruz",
    "last_name": "Zaman"
}'

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "user": {
            "id": 91832,
            "role_id": 1,
            "phone": "8810474955",
            "email": null,
            "username": null,
            "cms_admin": 0
        },
        "session": {
            "id": 215499,
            "user_id": 91832,
            "role_id": 1,
            "token": "a07b2a8775ce44a289d29d932a361bcd180ced840c614fd6ab52cac7c92c2208",
            "origin_id": 5,
            "platform_id": 3,
            "app_version": 1,
            "identifier": "test",
            "user_agent": "PostmanRuntime/7.37.3",
            "expiry": "2024-07-24T15:42:42.000Z",
            "active": 1,
            "created_at": "2024-07-24T15:12:42.000Z"
        }
    }
}

4. Deauthentication

Description

Users may be deauthenticated at any time by calling this API. Equivalent to logging out, this forces the current authentication token to be invalidated.

Method

PUT

URL

/auths/logout

Headers

Query

None

Body

None

curl

curl --location --request PUT 'https://api.{{project_name}}.sassist.marutisuzuki.com/stage/auths/login' \
--header 'x-auth: a6ae1442161043ff959607da5e169172982ebbd4383144bbb374cbba083279a6' \
--header 'x-origin: 5' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--data ''

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful"
}

5. Get Models

Description

Provide the model details for both Nexa and Arena .

Method

GET

URL

/models

Headers

Query

Body

None

curl

curl --location --request GET 'https://api.assist.sassist.marutisuzuki.com/stage/models?sales_code=GVR4DL1&sale_date=01-jul-2024' \
--header 'x-auth: a07b2a8775ce44a289d29d932a361bcd180ced840c614fd6ab52cac7c92c2208' \
--header 'x-origin: 5' \
--header 'x-platform: 1' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--data ''

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "models": [
            {
                "id": 24,
                "make_id": 1,
                "make": "Nexa",
                "make_code": "nexa",
                "model": "Grand Vitara",
                "model_code": "grand_vitara",
                "metadata": [
                    {
                        "id": 286,
                        "sales_code": "GVR4DL1",
                        "manual_url": "https://sassist-s3-assist-public-production.s3.ap-south-1.amazonaws.com/owner-manuals/Grand_Vitara-YFG-99011M76T07-74W-CVT_Fluid_Change1.pdf",
                        "signature": "bc3b80211f1d0e3bb36f70eee2453128",
                        "start_date": "1970-01-01T00:00:00.000Z",
                        "end_date": "2099-12-31T00:00:00.000Z",
                        "active": 1
                    }
                ]
            }
        ]
    }
}

6. Update Models

Description

Update the model details.

Method

PUT

URL

/models/model_id

Headers

Query

None

Body

“metadata”: [{
“sales_code”: This field contains the model’s sale code.,
“manual_url”: This field contains the URL pointing to the owner’s manual for the model.
}]

curl

curl --location --request PUT 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/models/1' \
--header 'x-auth: 3b4bd92219594c20b53992b3170b438bbd6cde1f881f444492c339b277a767f4' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--header 'Content-Type: application/json' \
--data '{
    "metadata": [
        {"sales_code": "DR123",
        "manual_url": "http://dummy_url"}
    ]
}'

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "model": {
            "id": 1,
            "make_id": 2,
            "make": "arena",
            "make_code": "arena",
            "model": "alto",
            "model_code": "alto",
            "metadata": [
                {
                    "id": 1,
                    "sales_code": "DR123",
                    "manual_url": "http://dummy_url",
                    "active": 1
                }
            ]
        }
    }
}

7. Create parts

Description

API for creating a master part that would get mapped to specific variants to form a feature.

Method

POST

URL

/parts

Headers

Query

None

Body

curl

curl --location --request POST 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/parts' \
--header 'x-auth: f5edc0f03e714ce59d05bff9d81aa8f437c575572ac74ba895929c3b9a7de314' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--header 'Content-Type: application/json' \
--data '{
    "part": "Demo part",
    "code": "demo_part",
    "verbal": 1,
    "vision": 1,
    "critical": 0
}'

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "part": {
            "id": 4132,
            "part": "Demo part",
            "code": "demo_part",
            "verbal": 1,
            "vision": 1,
            "critical": 0,
            "active": 1,
            "created_at": "2024-03-15T10:43:50.000Z"
        }
    }
}

8. Get parts

Description

Fetches the complete list of parts available in the S-Assist system.

Method

GET

URL

/parts

Headers

Query

Body

None

curl

curl --location --request GET 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/parts' \
--header 'x-auth: f5edc0f03e714ce59d05bff9d81aa8f437c575572ac74ba895929c3b9a7de314' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--data ''

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "parts": [
            {
                "id": 4132,
                "part": "Demo part",
                "code": "demo_part",
                "verbal": 1,
                "vision": 1,
                "critical": 0,
                "active": 1,
                "created_at": "2024-03-15T10:43:50.000Z"
            },
            {
                "id": 4131,
                "part": "Baleno_new_feature",
                "code": "baleno_new_feature",
                "verbal": 0,
                "vision": 1,
                "critical": 1,
                "active": 1,
                "created_at": "2024-03-07T11:27:02.000Z"
            },
            {
                "id": 4130,
                "part": "Touch_panal_test",
                "code": "touch_panal_test",
                "verbal": 0,
                "vision": 1,
                "critical": 1,
                "active": 1,
                "created_at": "2024-03-07T11:25:00.000Z"
            },
            {
                "id": 4129,
                "part": "TestingCMS",
                "code": "testingcms",
                "verbal": 0,
                "vision": 1,
                "critical": 1,
                "active": 1,
                "created_at": "2024-02-22T05:25:07.000Z"
            },
            {
                "id": 4128,
                "part": "111",
                "code": "111",
                "verbal": 0,
                "vision": 1,
                "critical": 0,
                "active": 1,
                "created_at": "2024-02-19T10:33:39.000Z"
            },
            {
                "id": 4127,
                "part": "Pop_008",
                "code": "pop_008",
                "verbal": 0,
                "vision": 1,
                "critical": 0,
                "active": 1,
                "created_at": "2024-02-19T10:33:24.000Z"
            }
        ]
    }
}

9. Get part

Description

Get details for a part in the S-Assist system.

Method

GET

URL

/parts/:id

Headers

Query

None

Body

None

curl

curl --location --request GET 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/parts/1' \
--header 'x-auth: f5edc0f03e714ce59d05bff9d81aa8f437c575572ac74ba895929c3b9a7de314' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--data ''

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "part": {
            "id": 1,
            "part": "2nd_row_left_side_seat_armrest_1",
            "code": "2nd_row_left_side_seat_armrest_1",
            "verbal": 1,
            "vision": 1,
            "critical": 1,
            "active": 1,
            "created_at": "2024-02-08T07:17:29.000Z"
        }
    }
}

10. Update part details

Description

Update the name or code for a part.

Method

PUT

URL

/parts/:id

Headers

Query

None

Body

curl

curl --location --request PUT 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/parts/1' \
--header 'x-auth: f5edc0f03e714ce59d05bff9d81aa8f437c575572ac74ba895929c3b9a7de314' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--header 'Content-Type: application/json' \
--data '{
    "active": 1,
    "verbal": 1,
    "vision": 1,
    "critical": 0
}'

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "part": {
            "id": 1,
            "part": "2nd_row_left_side_seat_armrest_1",
            "code": "2nd_row_left_side_seat_armrest_1",
            "verbal": 1,
            "vision": 1,
            "critical": 0,
            "active": 1,
            "created_at": "2024-02-08T07:17:29.000Z"
        }
    }
}

11. Create features

Description

A feature in the S-Assist system is a combination of a make, model, variant and a part. This API is used to tie these aspects together to create a unique feature.

Method

POST

URL

/features

Headers

Query

None

Body

curl

curl --location --request POST 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/features' \
--header 'x-auth: f5edc0f03e714ce59d05bff9d81aa8f437c575572ac74ba895929c3b9a7de314' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--header 'Content-Type: application/json' \
--data '{
    "make_id": 1,
    "model_id": 1,
    "part_id": 1
}'

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "feature": {
            "id": 5692,
            "make_id": 1,
            "make": "nexa",
            "make_code": "nexa",
            "model_id": 1,
            "model": "alto",
            "model_code": "alto",
            "part_id": 1,
            "part": "2nd_row_left_side_seat_armrest_1",
            "part_code": "2nd_row_left_side_seat_armrest_1",
            "part_verbal": 1,
            "part_vision": 1,
            "part_critical": 0,
            "active": 1,
            "created_at": "2024-03-15T11:54:53.000Z"
        }
    }
}

12. Get features

Description

Fetch detailed list of features.

Method

GET

URL

/features

Headers

Query

Body

None

curl

curl --location --request GET 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/features' \
--header 'x-auth: f5edc0f03e714ce59d05bff9d81aa8f437c575572ac74ba895929c3b9a7de314' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--data ''

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "features": [
            {
                "id": 1,
                "make_id": 2,
                "make": "arena",
                "make_code": "arena",
                "model_id": 1,
                "model": "alto",
                "model_code": "alto",
                "part_id": 30,
                "part": "accelerator_pedal_1",
                "part_code": "accelerator_pedal_1",
                "part_verbal": 1,
                "part_vision": 1,
                "part_critical": 1,
                "active": 1,
                "created_at": "2024-02-08T07:18:06.000Z"
            },
            {
                "id": 2,
                "make_id": 2,
                "make": "arena",
                "make_code": "arena",
                "model_id": 1,
                "model": "alto",
                "model_code": "alto",
                "part_id": 79,
                "part": "accessory_socket_dash_board_1",
                "part_code": "accessory_socket_dash_board_1",
                "part_verbal": 1,
                "part_vision": 1,
                "part_critical": 1,
                "active": 1,
                "created_at": "2024-02-08T07:18:06.000Z"
            },
            {
                "id": 3,
                "make_id": 2,
                "make": "arena",
                "make_code": "arena",
                "model_id": 1,
                "model": "alto",
                "model_code": "alto",
                "part_id": 136,
                "part": "airbag_label_1",
                "part_code": "airbag_label_1",
                "part_verbal": 1,
                "part_vision": 1,
                "part_critical": 1,
                "active": 1,
                "created_at": "2024-02-08T07:18:06.000Z"
            },
            {
                "id": 4,
                "make_id": 2,
                "make": "arena",
                "make_code": "arena",
                "model_id": 1,
                "model": "alto",
                "model_code": "alto",
                "part_id": 166,
                "part": "airbag_warning_light_1",
                "part_code": "airbag_warning_light_1",
                "part_verbal": 1,
                "part_vision": 1,
                "part_critical": 1,
                "active": 1,
                "created_at": "2024-02-08T07:18:06.000Z"
            }
        ]
    }
}

13. Get feature

Description

Fetch detailed of a feature.

Method

GET

URL

/features/:id

Headers

Query

None

Body

None

curl

curl --location --request GET 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/features/1' \
--header 'x-auth: f5edc0f03e714ce59d05bff9d81aa8f437c575572ac74ba895929c3b9a7de314' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--data ''

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "feature": {
            "id": 1,
            "make_id": 2,
            "make": "arena",
            "make_code": "arena",
            "model_id": 1,
            "model": "alto",
            "model_code": "alto",
            "part_id": 30,
            "part": "accelerator_pedal_1",
            "part_code": "accelerator_pedal_1",
            "part_verbal": 1,
            "part_vision": 1,
            "part_critical": 1,
            "active": 1,
            "created_at": "2024-02-08T07:18:06.000Z"
        }
    }
}

14. Update feature details

Description

API for updating an existing feature. This can only delete/undo delete or change source feature list for mapped features.

Method

PUT

URL

/feature/:id

Headers

Query

None

Body

curl

curl --location --request PUT 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/features/5692' \
--header 'x-auth: f5edc0f03e714ce59d05bff9d81aa8f437c575572ac74ba895929c3b9a7de314' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--header 'Content-Type: application/json' \
--data '{
    "active": 1
}'

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "feature": {
            "id": 5692,
            "make_id": 1,
            "make": "nexa",
            "make_code": "nexa",
            "model_id": 1,
            "model": "alto",
            "model_code": "alto",
            "part_id": 1,
            "part": "2nd_row_left_side_seat_armrest_1",
            "part_code": "2nd_row_left_side_seat_armrest_1",
            "part_verbal": 1,
            "part_vision": 1,
            "part_critical": 0,
            "active": 1,
            "created_at": "2024-03-15T11:54:53.000Z"
        }
    }
}

15. Create document

Description

Documents are synonymous with the content that is served for each feature. This API is used by business users to create a new version of a document.

Method

POST

URL

/documents

Headers

Query

None

Body

curl

curl --location --request POST 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/documents' \
--header 'x-auth: f5edc0f03e714ce59d05bff9d81aa8f437c575572ac74ba895929c3b9a7de314' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--header 'Content-Type: application/json' \
--data '{
    "feature_id": 125,
    "name": "nooruz",
    "description": "Test",
    "content": {
        "blurb": "",
        "files": [
            ""
        ],
        "title": "test",
        "videos": [],
        "caution": "",
        "chapter": "",
        "warning": "",
        "approved": 0,
        "icon_url": "",
        "description": {
            "top": "",
            "bottom": "",
            "middle": ""
        },
        "illustrations": {
            "top": [],
            "bottom": [],
            "middle": []
        },
        "related_feature_ids": []
    }
}'

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "document": {
            "id": 61,
            "name": "nooruz",
            "description": "Test",
            "feature_id": 125,
            "make": "nexa",
            "model": "baleno",
            "part": "2_wheel_drive_cvt_1",
            "verbal": 1,
            "vision": 0,
            "critical": 1,
            "content": {
                "blurb": "",
                "files": [
                    ""
                ],
                "title": "test",
                "videos": [],
                "caution": "",
                "chapter": "",
                "warning": "",
                "approved": 0,
                "icon_url": "",
                "description": {
                    "top": "",
                    "bottom": "",
                    "middle": ""
                },
                "illustrations": {
                    "top": [],
                    "bottom": [],
                    "middle": []
                },
                "related_features": []
            },
            "version": 1,
            "approved": 0,
            "editor_user_id": 2,
            "editor_user_first_name": null,
            "approver_user_first_name": null,
            "approver_user_id": null,
            "active": 1,
            "created_at": "2024-03-18T07:29:15.000Z",
            "metadata": []
        }
    }
}

16. Get documents

Description

Business users can fetch documents that have been previously created. For ease, this does not result document fields by default, but is recommended to be fetched in the document details (see document details API for reference).

Method

GET

URL

/documents

Headers

Query

Body

None

curl

curl --location --request GET 'https://api.assist.sassist.marutisuzuki.com/stage/documents?model_id=20&feature_id=13165' \
--header 'x-auth: b1bc8925579544cf8ac1f3541d85967c2f5bd8ed06164b16bd35b4187ca48afd' \
--header 'x-origin: 5' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--data ''

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "documents": [
            {
                "id": 12813,
                "name": "Version 1",
                "description": "Version 1",
                "feature_id": 13165,
                "make": "Arena",
                "model": "Tour V",
                "part": "seat_belt_inspection_1",
                "verbal": 1,
                "vision": 0,
                "critical": 0,
                "content": {
                    "icon": "https://sassist-s3-assist-data-production.s3.ap-south-1.amazonaws.com/cms/arena/wagonr/seat_belt_inspection_1/icon/dd30942fe63d418b9c8094b5deda610e.png",
                    "blurb": "",
                    "files": [
                        "https://s3.ap-south-1.amazonaws.com/sassist-s3-assist-public-production/owner-manuals/split/TOUR-V-99011M78L63-74E_14-SEP-2023_LPPL_Revised_E20_&_BC23/28.pdf"
                    ],
                    "title": "Seat belt inspection",
                    "images": {
                        "top": [],
                        "bottom": [],
                        "middle": [
                            "https://sassist-s3-assist-data-production.s3.ap-south-1.amazonaws.com/cms/arena/eeco/seat_belt_inspection_1/illustration/middle/9398ae71b8434a28aff28617c1bd8f5c.png"
                        ]
                    },
                    "videos": [],
                    "caution": "",
                    "chapter": "",
                    "warning": "• Be sure to inspect all seat belt assemblies after any collision. Any seat belt assembly which was in use during a collision (other than a very minor one) should be replaced, even if damage to the assembly which was not in use during a collision should be replaced if it does not function properly or is damaged in any way.\n• If frays, scratches, cuts are found on the seat belt, replace it with a new one.\n• If the buckle does not work properly, ask Maruti Suzuki authorized workshop for inspection.\n• If strong force was applied to the seat belt in a collision, the seat belt function may be damaged, even though its appearance is normal.\nReplace the seat belt with a new one.\n• As the seat belt may not provide the best performance and it may result in severe injury in case of emergency, observe the following points.\n– When foreign material enters into the buckle or you spill a drink, the seat belt may not work properly. In this case, ask Maruti Suzuki authorized workshop for inspection.\n– As the seat belt may be damaged, be careful not to get the seat belt caught in the door. Before closing the door, check that the seat belt is retracted without any slack.\n– Do not modify or remove the seat belt.",
                    "description": {
                        "top": "Periodically check if the seat belts work properly and are not damaged. Check the webbing, buckles, latch plates, retractors, anchorages and guide loops. Replace any seat belts which do not work properly or are damaged.",
                        "bottom": "",
                        "middle": ""
                    },
                    "related_feature_ids": [
                        13062
                    ],
                    "related_features": [
                        {
                            "id": 13062,
                            "part": "seat_belt_buckle_3",
                            "content": {
                                "title": "Lap-shoulder belt",
                                "icon": "https://s3.ap-south-1.amazonaws.com/sassist-s3-assist-data-production/cms/arena/tour_v/seat_belt_buckle_3/icon/13c29d95357043578303afafece7e238.jpg"
                            }
                        }
                    ]
                },
                "version": 2,
                "approved": 1,
                "editor_user_id": 37827,
                "editor_user_first_name": "Shilpa",
                "approver_user_first_name": "Sahil",
                "approver_user_id": 245,
                "active": 1,
                "created_at": "2024-03-07T10:00:04.000Z",
                "metadata": [
                    {
                        "id": 364038,
                        "active": 1,
                        "model_metadata_id": 487,
                        "model_metadata_active": 1,
                        "sales_code": "VRTPGHS",
                        "start_date": "1970-01-01T00:00:00.000Z",
                        "end_date": "2099-12-31T00:00:00.000Z",
                        "manual_url": "https://s3.ap-south-1.amazonaws.com/sassist-s3-assist-public-production/owner-manuals/TOUR-V-99011M78L63-74E_Revised+E20+&+BC23.pdf"
                    },
                    {
                        "id": 364037,
                        "active": 1,
                        "model_metadata_id": 486,
                        "model_metadata_active": 1,
                        "sales_code": "VRTCGAF",
                        "start_date": "1970-01-01T00:00:00.000Z",
                        "end_date": "2099-12-31T00:00:00.000Z",
                        "manual_url": "https://s3.ap-south-1.amazonaws.com/sassist-s3-assist-public-production/owner-manuals/TOUR-V-99011M78L63-74E_Revised+E20+&+BC23.pdf"
                    },
                    {
                        "id": 364036,
                        "active": 1,
                        "model_metadata_id": 485,
                        "model_metadata_active": 1,
                        "sales_code": "VRTPGAF",
                        "start_date": "1970-01-01T00:00:00.000Z",
                        "end_date": "2099-12-31T00:00:00.000Z",
                        "manual_url": "https://s3.ap-south-1.amazonaws.com/sassist-s3-assist-public-production/owner-manuals/TOUR-V-99011M78L63-74E_Revised+E20+&+BC23.pdf"
                    },
                    {
                        "id": 364035,
                        "active": 1,
                        "model_metadata_id": 484,
                        "model_metadata_active": 1,
                        "sales_code": "VRTPGHF",
                        "start_date": "1970-01-01T00:00:00.000Z",
                        "end_date": "2099-12-31T00:00:00.000Z",
                        "manual_url": "https://s3.ap-south-1.amazonaws.com/sassist-s3-assist-public-production/owner-manuals/TOUR-V-99011M78L63-74E_Revised+E20+&+BC23.pdf"
                    }
                ]
            }
        ]
    }
}

17. Get document details

Description

Details for a document can be fetched using an id.

Method

GET

URL

/documents/:id

Headers

Query

None

Body

None

curl

curl --location --request GET 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/documents/9' \
--header 'x-auth: f5edc0f03e714ce59d05bff9d81aa8f437c575572ac74ba895929c3b9a7de314' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--data ''

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "document": {
            "id": 9,
            "name": "Alpha",
            "description": null,
            "feature_id": 125,
            "make": "nexa",
            "model": "baleno",
            "part": "2_wheel_drive_cvt_1",
            "verbal": 1,
            "vision": 0,
            "critical": 1,
            "content": {
                "blurb": "",
                "files": [],
                "title": "Steering wheel",
                "videos": [],
                "caution": "",
                "chapter": "",
                "warning": "",
                "icon_url": "https://sassist-s3-assist-data-development.s3.ap-south-1.amazonaws.com/cms/nexa/baleno/2_wheel_drive_cvt_1/icon/41558ffa06ee4ae08ac96c6bb36d2053.png",
                "description": {
                    "top": "",
                    "bottom": "",
                    "middle": "new"
                },
                "illustrations": {
                    "top": [
                        "https://sassist-s3-assist-data-development.s3.ap-south-1.amazonaws.com/cms/nexa/baleno/2_wheel_drive_cvt_1/illustration/top/d25c47f479c5465f9bef7b96426d2488.png"
                    ],
                    "bottom": [],
                    "middle": []
                },
                "related_features": [
                    {
                        "id": 125,
                        "part": "2_wheel_drive_cvt_1"
                    }
                ]
            },
            "version": 6,
            "approved": 0,
            "editor_user_id": 2,
            "editor_user_first_name": null,
            "approver_user_first_name": null,
            "approver_user_id": 2,
            "active": 0,
            "created_at": "2024-02-09T07:04:41.000Z",
            "metadata": []
        }
    }
}

Special note:

Document fields can be consolidated generically by collating sequence and key-value pairs. Sample code below for reference.

let result = {};
for (let i = 0; i < documentFields.length; i++) {
    let documentFieldsKey = Object.keys(documentFields[i]).find(key => key !== 'template_sequence' && key !== 'document_field_sequence');
    if (!result.hasOwnProperty(documentFieldsKey)) {
        result[documentFieldsKey] = documentFields[i][documentFieldsKey];
    } else {
      if(!Array.isArray(result[documentFieldsKey])) {
        result[documentFieldsKey] = [result[documentFieldsKey]];
        result[documentFieldsKey].push(documentFields[i][documentFieldsKey]);
      } else {
        result[documentFieldsKey] = [...result[documentFieldsKey], documentFields[i][documentFieldsKey]];
      }
    }
}

18. Update documents

Description

Documents can be updated by business users through the update documents API.

Method

PUT

URL

/documents/:id

Headers

Query

None

Body

curl

curl --location --request PUT 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/documents/14' \
--header 'x-auth: f5edc0f03e714ce59d05bff9d81aa8f437c575572ac74ba895929c3b9a7de314' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--header 'Content-Type: application/json' \
--data '{
    "active": 0
}'

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "document": {
            "id": 14,
            "name": "test",
            "description": null,
            "feature_id": 125,
            "make": "nexa",
            "model": "baleno",
            "part": "2_wheel_drive_cvt_1",
            "verbal": 1,
            "vision": 0,
            "critical": 1,
            "content": {
                "blurb": "",
                "files": [
                    ""
                ],
                "title": "test",
                "videos": [],
                "caution": "",
                "chapter": "",
                "warning": "",
                "approved": 0,
                "icon_url": "",
                "description": {
                    "top": "",
                    "bottom": "",
                    "middle": ""
                },
                "illustrations": {
                    "top": [],
                    "bottom": [],
                    "middle": []
                },
                "related_features": []
            },
            "version": 3,
            "approved": 0,
            "editor_user_id": 2,
            "editor_user_first_name": null,
            "approver_user_first_name": null,
            "approver_user_id": null,
            "active": 0,
            "created_at": "2024-02-12T12:39:19.000Z",
            "metadata": []
        }
    }
}

19. Create training data

Description

Availability of labelled data is crucial for training and testing machine learning models. Through this API, field agents can send text, image_url content for training.

Method

POST

URL

/trainings

Headers

Query

None

Body

curl

curl --location --request POST 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/trainings' \
--header 'x-auth: 1a444aadf2374bc78302b667d5fb15e518104adcc4f648c9806d9e1fe3fb5a82' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--header 'Content-Type: application/json' \
--data '{
    "part_id": 12,
    "text": "test",
    "image_url": "https://dummy_url",
    "latitude": 12.45,
    "longitude": 45.123
}'

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "training": {
            "id": 914,
            "active": 1,
            "created_at": "2024-03-18T08:02:57.000Z",
            "user": {
                "id": 1
            },
            "content_type": {
                "id": 1,
                "content_type": "text"
            },
            "content": {
                "text": "test",
                "image_url": "https://dummy_url"
            },
            "product": {
                "part": {
                    "id": 12,
                    "code": "3rd_row_head_restraints_rear_left_side_1"
                }
            },
            "metadata": {
                "location": {
                    "latitude": 12.45,
                    "longitude": 45.123
                }
            }
        }
    }
}

20. Get trainings

Description

Gets a list of trainings done by the user in the past.

Method

GET

URL

/trainings

Headers

Query

Body

None

curl

curl --location --request GET 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/trainings' \
--header 'x-auth: 1a444aadf2374bc78302b667d5fb15e518104adcc4f648c9806d9e1fe3fb5a82' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--data ''

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "trainings": [
            {
                "id": 914,
                "active": 1,
                "created_at": "2024-03-18T08:02:57.000Z",
                "user": {
                    "id": 1
                },
                "content_type": {
                    "id": 1,
                    "content_type": "text"
                },
                "content": {
                    "text": "test",
                    "image_url": "https://dummy_url"
                },
                "product": {
                    "part": {
                        "id": 12,
                        "code": "3rd_row_head_restraints_rear_left_side_1"
                    }
                },
                "metadata": {
                    "location": {
                        "latitude": 12.45,
                        "longitude": 45.123
                    }
                }
            },
            {
                "id": 913,
                "active": 1,
                "created_at": "2024-03-18T08:02:19.000Z",
                "user": {
                    "id": 1
                },
                "content_type": {
                    "id": 1,
                    "content_type": "text"
                },
                "content": {
                    "text": "test",
                    "image_url": "https://dummy_url"
                },
                "product": {
                    "part": {
                        "id": 12,
                        "code": "3rd_row_head_restraints_rear_left_side_1"
                    }
                },
                "metadata": {
                    "location": {
                        "latitude": null,
                        "longitude": null
                    }
                }
            },
            {
                "id": 912,
                "active": 1,
                "created_at": "2024-03-18T08:01:18.000Z",
                "user": {
                    "id": 1
                },
                "content_type": {
                    "id": 1,
                    "content_type": "text"
                },
                "content": {
                    "text": "test",
                    "image_url": "https://dummy_url"
                },
                "product": {
                    "part": {
                        "id": 12,
                        "code": "3rd_row_head_restraints_rear_left_side_1"
                    }
                },
                "metadata": {
                    "location": {
                        "latitude": null,
                        "longitude": null
                    }
                }
            }
        ]
    }
}

21. Get training details

Description

Details for a particular training can be fetched using an id

Method

GET

URL

/trainings/:id

Headers

Query

None

Body

None

curl

curl --location --request GET 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/trainings/912' \
--header 'x-auth: 1a444aadf2374bc78302b667d5fb15e518104adcc4f648c9806d9e1fe3fb5a82' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--data ''

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "training": {
            "id": 912,
            "active": 1,
            "created_at": "2024-03-18T08:01:18.000Z",
            "user": {
                "id": 1
            },
            "content_type": {
                "id": 1,
                "content_type": "text"
            },
            "content": {
                "text": "test",
                "image_url": "https://dummy_url"
            },
            "product": {
                "part": {
                    "id": 12,
                    "code": "3rd_row_head_restraints_rear_left_side_1"
                }
            },
            "metadata": {
                "location": {
                    "latitude": null,
                    "longitude": null
                }
            }
        }
    }
}

22. Update trainings

Description

Trainings can be updated by the update trainings API.

Method

PUT

URL

/trainings/:id

Headers

Query

None

Body

curl

curl --location --request PUT 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/trainings/912' \
--header 'x-auth: 1a444aadf2374bc78302b667d5fb15e518104adcc4f648c9806d9e1fe3fb5a82' \
--header 'x-origin: 3' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--header 'Content-Type: application/json' \
--data '{
    "active": 0
}'

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "training": {
            "id": 912,
            "active": 0,
            "created_at": "2024-03-18T08:01:18.000Z",
            "user": {
                "id": 1
            },
            "content_type": {
                "id": 1,
                "content_type": "text"
            },
            "content": {
                "text": "test",
                "image_url": "https://dummy_url"
            },
            "product": {
                "part": {
                    "id": 12,
                    "code": "3rd_row_head_restraints_rear_left_side_1"
                }
            },
            "metadata": {
                "location": {
                    "latitude": null,
                    "longitude": null
                }
            }
        }
    }
}

23. Create interaction

Description

API for interacting with Xane’s AI. Understands text or image suggests related actions and content. Currently, it can return up to 3 limits.

Method

POST

URL

/interactions

Headers

Query

None

Body

curl

curl --location --request POST 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/interactions' \
--header 'x-auth: u.test' \
--header 'x-origin: 5' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--header 'Content-Type: application/json' \
--data '{
    "sales_code": "DR123",
    "text": "steering",
    "latitude": 12.45,
    "longitude": 45.123
}'

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "interaction": {
            "id": 1,
            "reference": "1f77c35a4a1b4408b4edc9021fa97db128bfb07d968f4d659190dce360c2be27",
            "created_at": "2021-02-24T18:12:10.000Z",
            "feedback": null,
            "feedback_comment": null,
            "user": {
                "id": 6,
                "phone": "9876543210"
            },
            "product": {
                "make": {
                    "id": 1,
                    "make": "Nexa"
                },
                "model": {
                    "id": 4,
                    "model": "S-Cross"
                },
                "variant": {
                    "id": 21,
                    "variant": "S-Cross Sigma",
                    "alias": "",
                    "fuel": "petrol",
                    "transmission": "manual",
                    "technology": "regular",
                    "code": "s_cross_sigma"
                }
            },
            "query": {
                "content_type": {
                    "id": 2,
                    "content_type": "image"
                },
                "content": {
                    "text": null,
                    "image_url": "https://msil-s3-assist-development.s3.ap-south-1.amazonaws.com/nexa/s_cross/s_cross_sigma/user_queries/images/3bf0b0af4cf449ea8925caa4e0018966.jpg",
                    "video_url": null
                }
            },
            "predictions": [{
                "intent": {
                    "intent": "windshield_wipers_and_washers",
                    "confidence": "0.2935711145401001",
                    "part": {
                        "id": 286,
                        "part": "Windshield Wipers and Washers",
                        "code": "windshield_wipers_and_washers"
                    },
                    "feature": {
                        "id": 4008,
                        "verbal": 1,
                        "vision": 1,
                        "critical": 0,
                        "content": [{
                            "template_sequence": 1,
                            "document_field_sequence": 1,
                            "icon_url": "https://s3.ap-south-1.amazonaws.com/msil-s3-tdc-vision-development/feature_icons/nexa/s_cross/s_cross_master/windshield_wipers_and_washers.png"
                        }, {
                            "template_sequence": 2,
                            "document_field_sequence": 1,
                            "title": "Windshield wiper and washer lever"
                        }, {
                            "template_sequence": 5,
                            "document_field_sequence": 1,
                            "warning_top": "To avoid possible injury, do not operate controls by reaching through the steering wheel."
                        }, {
                            "template_sequence": 13,
                            "document_field_sequence": 1,
                            "file_url": "https://msil-s3-assist-public.s3.ap-south-1.amazonaws.com/owner_manuals/S-Cross.pdf"
                        }, {
                            "template_sequence": 15,
                            "document_field_sequence": 1,
                            "related_features": [{
                                "id": 1283,
                                "part": "Brake Pedal (MT)",
                                "title": "Brake Pedal",
                                "icon_url": "https://dummy.url/icon1.png"
                            }, {
                                "id": 1291,
                                "part": "Clutch Pedal (MT)",
                                "title": "Clutch Pedal",
                                "icon_url": "https://dummy.url/icon2.png"
                            }]
                        }]
                    }
                }
            }, {
                "intent": {
                    "intent": "windshield_wiper",
                    "confidence": "0.14592014253139496",
                    "part": {
                        "id": 285,
                        "part": "Windshield Wiper",
                        "code": "windshield_wiper"
                    },
                    "feature": {
                        "id": 4007,
                        "verbal": 1,
                        "vision": 1,
                        "critical": 0,
                        "content": [{
                            "template_sequence": 1,
                            "document_field_sequence": 1,
                            "icon_url": "https://s3.ap-south-1.amazonaws.com/msil-s3-tdc-vision-development/feature_icons/nexa/s_cross/s_cross_master/windshield_wiper.png"
                        }, {
                            "template_sequence": 2,
                            "document_field_sequence": 1,
                            "title": "Windshield wipers"
                        }, {
                            "template_sequence": 8,
                            "document_field_sequence": 1,
                            "description_top": "To turn the windshield wipers ON, move the lever down to one of the three operating positions. In “INT” position, the wipers operate intermittently. The “INT” position is very convenient for driving in mist or light rain. In “LO” position, the wipers operate at a steady low speed. In “HI” position, the wipers operate at a steady high speed. To turn off the wipers, move the lever back to “OFF” position.\nMove the lever up and hold it to “MIST” position, the windshield wipers will turn on continuously at low speed."
                        }, {
                            "template_sequence": 10,
                            "document_field_sequence": 1,
                            "description_middle": "If the lever is equipped with the “INT TIME” control, turn the control forward or rearward to adjust the intermittent wiper operation to the desired interval."
                        }, {
                            "template_sequence": 13,
                            "document_field_sequence": 1,
                            "file_url": "https://msil-s3-assist-public.s3.ap-south-1.amazonaws.com/owner_manuals/S-Cross.pdf"
                        }]
                    }
                }
            }],
            "metadata": {
                "device": {
                    "id": 25,
                    "identifier": "3d6e977c2d924f9b926a0438cf44fa14",
                    "app_version": 1,
                    "user_agent": "curl/7.64.1",
                    "battery_percentage": null,
                    "wifi": null
                },
                "origin": {
                    "id": 1,
                    "origin": "end-user"
                },
                "platform": {
                    "id": 3,
                    "platform": "Android"
                },
                "location": {
                    "latitude": 28.5,
                    "longitude": 77.1
                }
            }
        }
    }
}

24. Get interactions history

Description

A history of interactions done by a user can be fetched through this API.

Method

GET

URL

/interactions

Headers

Query

Body

None

curl

curl --location --request GET 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/interactions' \
--header 'x-auth: u.test' \
--header 'x-origin: 5' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--data ''

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "interactions": [
            {
                "id": 14,
                "created_at": "2024-03-21T10:08:10.000Z",
                "feedback": null,
                "feedback_comment": null,
                "user": {
                    "id": 3,
                    "phone": "9899097933"
                },
                "product": {
                    "make": {
                        "id": 2,
                        "make": "arena",
                        "code": "arena"
                    },
                    "model": {
                        "id": 1,
                        "model": "alto",
                        "code": "alto",
                        "sales_code": "DR123"
                    }
                },
                "query": {
                    "content_type": {
                        "id": 1,
                        "content_type": "text"
                    },
                    "content": {
                        "text": "hello",
                        "image_url": null
                    }
                },
                "predictions": [],
                "metadata": {
                    "device": {
                        "id": 3,
                        "identifier": "test",
                        "app_version": 1,
                        "user_agent": "PostmanRuntime/7.37.0",
                        "battery_percentage": null,
                        "wifi": null
                    },
                    "origin": {
                        "id": 5,
                        "origin": "assist"
                    },
                    "platform": {
                        "id": 3,
                        "platform": "Android"
                    },
                    "location": {
                        "latitude": 12.45,
                        "longitude": 45.123
                    }
                }
            },
            {
                "id": 13,
                "created_at": "2024-03-21T10:03:28.000Z",
                "feedback": null,
                "feedback_comment": null,
                "user": {
                    "id": 3,
                    "phone": "9899097933"
                },
                "product": {
                    "make": {
                        "id": 2,
                        "make": "arena",
                        "code": "arena"
                    },
                    "model": {
                        "id": 1,
                        "model": "alto",
                        "code": "alto",
                        "sales_code": "DR123"
                    }
                },
                "query": {
                    "content_type": {
                        "id": 1,
                        "content_type": "text"
                    },
                    "content": {
                        "text": "steering",
                        "image_url": null
                    }
                },
                "predictions": [],
                "metadata": {
                    "device": {
                        "id": 3,
                        "identifier": "test",
                        "app_version": 1,
                        "user_agent": "PostmanRuntime/7.37.0",
                        "battery_percentage": null,
                        "wifi": null
                    },
                    "origin": {
                        "id": 5,
                        "origin": "assist"
                    },
                    "platform": {
                        "id": 3,
                        "platform": "Android"
                    },
                    "location": {
                        "latitude": 12.45,
                        "longitude": 45.123
                    }
                }
            },
            {
                "id": 12,
                "created_at": "2024-03-21T10:02:32.000Z",
                "feedback": null,
                "feedback_comment": null,
                "user": {
                    "id": 3,
                    "phone": "9899097933"
                },
                "product": {
                    "make": {
                        "id": 2,
                        "make": "arena",
                        "code": "arena"
                    },
                    "model": {
                        "id": 1,
                        "model": "alto",
                        "code": "alto",
                        "sales_code": "DR123"
                    }
                },
                "query": {
                    "content_type": {
                        "id": 1,
                        "content_type": "text"
                    },
                    "content": {
                        "text": "steering",
                        "image_url": null
                    }
                },
                "predictions": [
                    {
                        "feature_id": null,
                        "part": null,
                        "confidence": 0.219691,
                        "content": null
                    },
                    {
                        "feature_id": null,
                        "part": null,
                        "confidence": 0.121128,
                        "content": null
                    },
                    {
                        "feature_id": null,
                        "part": null,
                        "confidence": 0.118884,
                        "content": null
                    }
                ],
                "metadata": {
                    "device": {
                        "id": 3,
                        "identifier": "test",
                        "app_version": 1,
                        "user_agent": "PostmanRuntime/7.37.0",
                        "battery_percentage": null,
                        "wifi": null
                    },
                    "origin": {
                        "id": 5,
                        "origin": "assist"
                    },
                    "platform": {
                        "id": 3,
                        "platform": "Android"
                    },
                    "location": {
                        "latitude": 12.45,
                        "longitude": 45.123
                    }
                }
            },
            {
                "id": 11,
                "created_at": "2024-03-21T10:01:46.000Z",
                "feedback": null,
                "feedback_comment": null,
                "user": {
                    "id": 3,
                    "phone": "9899097933"
                },
                "product": {
                    "make": {
                        "id": 2,
                        "make": "arena",
                        "code": "arena"
                    },
                    "model": {
                        "id": 1,
                        "model": "alto",
                        "code": "alto",
                        "sales_code": "DR123"
                    }
                },
                "query": {
                    "content_type": {
                        "id": 1,
                        "content_type": "text"
                    },
                    "content": {
                        "text": "steering",
                        "image_url": null
                    }
                },
                "predictions": [
                    {
                        "feature_id": null,
                        "part": null,
                        "confidence": 0.219691,
                        "content": null
                    },
                    {
                        "feature_id": null,
                        "part": null,
                        "confidence": 0.121128,
                        "content": null
                    },
                    {
                        "feature_id": null,
                        "part": null,
                        "confidence": 0.118884,
                        "content": null
                    }
                ],
                "metadata": {
                    "device": {
                        "id": 3,
                        "identifier": "test",
                        "app_version": 1,
                        "user_agent": "PostmanRuntime/7.37.0",
                        "battery_percentage": null,
                        "wifi": null
                    },
                    "origin": {
                        "id": 5,
                        "origin": "assist"
                    },
                    "platform": {
                        "id": 3,
                        "platform": "Android"
                    },
                    "location": {
                        "latitude": 12.45,
                        "longitude": 45.123
                    }
                }
            }
        ]
    }
}

25. Get interaction details

Description

Details for a particular training can be fetched using an id.

Method

GET

URL

/interactions/:id

Headers

Query

None

Body

None

curl

curl --location --request GET 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/interactions/12' \
--header 'x-auth: u.test' \
--header 'x-origin: 5' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--data ''

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "interaction": {
            "id": 12,
            "created_at": "2024-03-21T10:02:32.000Z",
            "feedback": null,
            "feedback_comment": null,
            "user": {
                "id": 3,
                "phone": "9899097933"
            },
            "product": {
                "make": {
                    "id": 2,
                    "make": "arena",
                    "code": "arena"
                },
                "model": {
                    "id": 1,
                    "model": "alto",
                    "code": "alto",
                    "sales_code": "DR123"
                }
            },
            "query": {
                "content_type": {
                    "id": 1,
                    "content_type": "text"
                },
                "content": {
                    "text": "steering",
                    "image_url": null
                }
            },
            "predictions": [
                {
                    "feature_id": null,
                    "part": null,
                    "confidence": 0.219691,
                    "content": null
                },
                {
                    "feature_id": null,
                    "part": null,
                    "confidence": 0.121128,
                    "content": null
                },
                {
                    "feature_id": null,
                    "part": null,
                    "confidence": 0.118884,
                    "content": null
                }
            ],
            "metadata": {
                "device": {
                    "id": 3,
                    "identifier": "test",
                    "app_version": 1,
                    "user_agent": "PostmanRuntime/7.37.0",
                    "battery_percentage": null,
                    "wifi": null
                },
                "origin": {
                    "id": 5,
                    "origin": "assist"
                },
                "platform": {
                    "id": 3,
                    "platform": "Android"
                },
                "location": {
                    "latitude": 12.45,
                    "longitude": 45.123
                }
            }
        }
    }
}

26. Update interaction

Description

Limited updates are allowed on an interaction. A user is allowed to provide feedback for an interaction that has returned a prediction.

Method

PUT

URL

/interactions/:id

Headers

Query

None

Body

curl

curl --location --request PUT 'https://api.{{project_name}}.sassist.marutisuzuki.com/dev/interactions/12' \
--header 'x-auth: u.test' \
--header 'x-origin: 5' \
--header 'x-platform: 3' \
--header 'x-version: 1' \
--header 'x-identifier: test' \
--header 'Content-Type: application/json' \
--data '{
    "feedback": 1,
    "feedback_comment": "Accurate"
}'

Response Type

JSON

Response

{
    "code": "success",
    "error": false,
    "message": "Successful",
    "data": {
        "interaction": {
            "id": 12,
            "created_at": "2024-03-21T10:02:32.000Z",
            "feedback": 1,
            "feedback_comment": "Accurate",
            "user": {
                "id": 3,
                "phone": "9899097933"
            },
            "product": {
                "make": {
                    "id": 2,
                    "make": "arena",
                    "code": "arena"
                },
                "model": {
                    "id": 1,
                    "model": "alto",
                    "code": "alto",
                    "sales_code": "DR123"
                }
            },
            "query": {
                "content_type": {
                    "id": 1,
                    "content_type": "text"
                },
                "content": {
                    "text": "steering",
                    "image_url": null
                }
            },
            "predictions": [
                {
                    "feature_id": null,
                    "part": null,
                    "confidence": 0.219691,
                    "content": null
                },
                {
                    "feature_id": null,
                    "part": null,
                    "confidence": 0.121128,
                    "content": null
                },
                {
                    "feature_id": null,
                    "part": null,
                    "confidence": 0.118884,
                    "content": null
                }
            ],
            "metadata": {
                "device": {
                    "id": 3,
                    "identifier": "test",
                    "app_version": 1,
                    "user_agent": "PostmanRuntime/7.37.0",
                    "battery_percentage": null,
                    "wifi": null
                },
                "origin": {
                    "id": 5,
                    "origin": "assist"
                },
                "platform": {
                    "id": 3,
                    "platform": "Android"
                },
                "location": {
                    "latitude": 12.45,
                    "longitude": 45.123
                }
            }
        }
    }
}