Saltar al contenido principal
POST
/
v1
/
maintenance
/
workOrders
Create a new work order
curl --request POST \
  --url https://api.bold-factory.com/v1/maintenance/workOrders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "assetReference": "<string>",
  "causeReference": "<string>",
  "auxiliaryCauseReferences": [
    "<string>"
  ],
  "mainEmployeeReference": "<string>",
  "notes": "<string>",
  "externalReference": "<string>",
  "code": "<string>"
}
'
{
  "id": "<string>",
  "externalReference": "<string>",
  "code": "<string>",
  "notes": "<string>",
  "causeId": "<string>",
  "cause": {
    "id": "<string>",
    "externalReference": "<string>",
    "name": "<string>",
    "deletedAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "createdBy": "<string>",
    "lastModifiedAt": "2023-11-07T05:31:56Z",
    "lastModifiedBy": "<string>"
  },
  "auxiliaryCauses": [
    {
      "id": "<string>",
      "externalReference": "<string>",
      "name": "<string>",
      "deletedAt": "2023-11-07T05:31:56Z",
      "createdAt": "2023-11-07T05:31:56Z",
      "createdBy": "<string>",
      "lastModifiedAt": "2023-11-07T05:31:56Z",
      "lastModifiedBy": "<string>"
    }
  ],
  "assetId": "<string>",
  "asset": {
    "type": "Space",
    "deletedAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "createdBy": "<string>",
    "lastModifiedAt": "2023-11-07T05:31:56Z",
    "lastModifiedBy": "<string>",
    "id": "<string>",
    "externalReference": "<string>",
    "relatedId": "<string>",
    "code": "<string>",
    "name": "<string>",
    "parent": {
      "id": "<string>",
      "externalReference": "<string>",
      "code": "<string>",
      "name": "<string>"
    }
  },
  "mainEmployeeId": "<string>",
  "mainEmployee": {
    "id": "<string>",
    "externalReference": "<string>",
    "active": true,
    "fullName": "<string>",
    "code": "<string>"
  },
  "preventiveScheduleId": "<string>",
  "scheduledOccurrenceAt": "2023-11-07T05:31:56Z",
  "totalMinutes": 123,
  "theoreticalMinutes": 123,
  "efficiencyPercent": 123,
  "createdAt": "2023-11-07T05:31:56Z",
  "createdBy": "<string>",
  "lastModifiedAt": "2023-11-07T05:31:56Z",
  "lastModifiedBy": "<string>"
}

Autorizaciones

Authorization
string
header
requerido

Use a valid JWT token in the Authorization header with the format 'Bearer {token}'

Cuerpo

application/json
assetReference
string
requerido
type
enum<string>
requerido
Opciones disponibles:
Corrective,
Preventive
causeReference
string
requerido
auxiliaryCauseReferences
string[]
requerido
mainEmployeeReference
null | string
notes
null | string
externalReference
null | string
code
null | string

Respuesta

Created

id
string
requerido
externalReference
null | string
requerido
code
string
requerido
notes
string
requerido
causeId
string
requerido
cause
object
requerido
auxiliaryCauses
object[]
requerido
assetId
string
requerido
asset
object
requerido
mainEmployeeId
null | string
requerido
mainEmployee
object
requerido
status
enum<string>
requerido
Opciones disponibles:
Cancelled,
Pending,
Paused,
InProgress,
Completed
type
enum<string>
requerido
Opciones disponibles:
Corrective,
Preventive
preventiveScheduleId
null | string
requerido
scheduledOccurrenceAt
null | string<date-time>
requerido
totalMinutes
number<double>
requerido
theoreticalMinutes
number<double>
requerido
efficiencyPercent
null | number<double>
requerido
createdAt
string<date-time>
requerido
createdBy
string
requerido
lastModifiedAt
string<date-time>
requerido
lastModifiedBy
string
requerido