Skip to main content
caution

This section refers to the old versions of the MonkJs SDK (version 3.X.X and below). For the v4 docs, please refer to this page.

Damage

npm latest package

yarn add @monkvision/corejs
import monk from '@monkvision/corejs'

const { createOne, deleteOne } = monk.entity.damage;

createOne

POST /inspections/${inspectionId}/damages

Add damage to an inspection.

await monk.entity.damage.createOne(inspectionId, data);

Try it on api.monk.ai documentation

nametypedefault
inspectionIdstring
dataCreateDamage
- data.damageTypeDamageType
- data.partTypePartType
{
"axiosResponse": {},
"entities": {
"damages": {
"3fa85f64-5717-4562-b3fc-2c963f66afa6": {
"damageType": "body_crack",
"partType": "ignore",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"parts": []
}
}
},
"result": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

deleteOne

DELETE /inspections/${inspectionId}/damages/${id}

Remove damage from an inspection.

await monk.entity.damage.deleteOne(id, inspectionId);

Try it on api.monk.ai documentation

nametypedefault
inspectionIdstring
idstring
{
"axiosResponse": {},
"entities": {
"damages": {
"3fa85f64-5717-4562-b3fc-2c963f66afa6": {
"deleted": true,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"parts": []
}
}
},
"result": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

Enums

DamageType

string

enum DamageType {
BODY_CRACK = 'body_crack',
BROKEN_GLASS = 'broken_glass',
BROKEN_LIGHT = 'broken_light',
DENT = 'dent',
DIRT = 'dirt',
HUBCAP_SCRATCH = 'hubcap_scratch',
MISSHAPE = 'misshape',
MISSING_HUBCAP = 'missing_hubcap',
MISSING_PIECE = 'missing_piece',
PAINT_PEELING = 'paint_peeling',
RUSTINESS = 'rustiness',
SCATTERED_SCRATCHES = 'scattered_scratches',
SCRATCH = 'scratch',
SMASH = 'smash',
LIGHT_REFLECTION = 'light_reflection',
SHADOW = 'shadow',
CAR_CURVE = 'car_curve',
}