NextGen APIs

GET /integration/work-orders/r1/attachments

Http Verb

GET

Url

/integration/work-orders/r1/attachments

Permissions required

Core Additional Parameters: Edit (fsm.core.additionalparameter.edit)

WorkOrder: View (fsm.core.workorder.view)

or

WorkOrder: Edit (fsm.core.workorder.edit)

Last Modified Version

r1

Tech Tags

MULTILANGUAGE-FIELDS PAGINATION ORDERING-SERVER-SIDE

Available Async

No

BPMN Diagram

diagram (24).svg


Business Logic

This Integration API provides the list of attachments of a Work Order.

One of code or externalCode must be present. If code is provided it has the precedence among the other fields.

System verifies Permission Required and starts the elaboration that is organized in steps.

STEP 1 - External System Validation

System takes Input fields and checks their existence in internal configuration.

API Verb: GET

Resource: External Systems

Input: externalSystemCode, active=true

Output: externalSystemId

If System can obtain the Output fields → continue to next step.

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

STEP 2 - Work Order Retrieve

System takes Input fields and checks their existence.

API Verb: GET

Resource: Work Orders

Input: {code} OR {externalSystemId, externalCode}

Output: workOrderId

If System can obtain the Output fields → continue to next step.

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

STEP 3 - Work Order Documents Retrieve

System takes Input fields and checks their existence.

API Verb: GET

Resource: {workOrderId}/attachments

Input: workOrderId, description, insertDate

Output: list of [attachmentId, description, insertDate, insertDateCentral, documentCategoryId, uuid]

If System can obtain the Output fields → continue to next step.

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

  • Others - see link in Resource

STEP 4 - File Details Retrieve

System takes Input fields and checks their existence.

API Verb: GET

Resource: Files

Input: list of [uuid]

Output: list of [active, draft, deleted, byteDimension, name, fileExtension]

If System can obtain the Output fields → continue to next step.

If System can’t obtain the Output fields → responds with error. Elaboration is stopped.

Error Type:

STEP 5 - Document Category Transcode

System takes Input fields and gets the resource.

API Verb: GET

Resource: Document Categories

Input: documentCategoryId

Output: description

If System can obtain the Output fields → elaboration is stopped. See Response payload fields

If System can’t obtain the Output fields → responds with error. See Response payload fields

Error Type:

  • Others - see link in Resource

Path Parameters

As their name suggests, they are included in the URL path of the endpoint.

Not applicable.

Query String Parameters

Start with a ? and includes parameters listed one after the another separated by &.

Filter

Field

Description

Mandatory

Constraint

1

_language

Language option for the response. It supports the following values: - ALL: Request the server to return every possible translation of the response data. - USER

N

Null or Not Blank

2

_exclude

Allows to specify a subset of data that need to be excluded from the response

N

Null or Not Blank

3

_fields

Allows to specify a subset of data that need to be returned

N

Null or Not Blank

4

externalSystemCode

External System Code

N

Null or Not Blank

5

code

Work Order Code

N

Null or Not Blank

6

externalCode

Work Order Code in External System

N

Null or Not Blank

7

description

Attachment Name

N


8

insertDate

Insert Date

N


Fields

The parameter _fields allows to choose output fields. More info here How to use APIs: Output fields selection.

Header Parameters

Parameters included in the request headers. Generally, request headers are used to keep authorization parameters.

Default.

Request Example

{baseUrl}/integration/work-orders/r1/attachments?externalSystemCode=SAP&externalCode=N008965

Response documentation

Response payload fields

Field

Field Type

Description

1

id


File id

2

workOrderCode


Work Order Code

3

description

 

File Description

4

insertDate

 

File Insert Date

5

insertDateCentral

 

File Central Insert Date

6

documentCategory

 documentCategoryObject


7

uuid

 

File uuid

8

byteDimension


File Dimension in byte

9

active


Flag Active

10

deleted


Flag Deleted

11

draft


Flag Draft

12

name


File Name

13

fileExtension


Extension of the file

documentCategoryObject

Field

Description

1

description

Description


Compliant with RFC Standard https://www.rfc-editor.org/rfc/rfc9457.html.

Extension fields:

Field

Description

Note

code

Extension member of a Problem Details Object that contains the error code

Only for ERROR

Response example

{
  "content": [
    {
      "id": 3681,
      "workOrderCode": "N008965",
      "description": "Photo.jpg",
      "insertDate": "2025-05-07T10:16:34.196Z",
      "insertDateCentral": "2025-05-07T10:16:34.196Z",
      "uuid": "a1d5d85e-cf05-495b-8acb-8b82e9da7499",
      "byteDimension": "834",
      "active": true,
      "deleted": false,
      "draft": false,
      "documentCategory": {
        "description": [
          {
            "lang": "en",
            "value": "Metro OC"
          }
        ]
      },
      "extension": {
      }
    }
  ]
}

Error example

{
  "type": "about:blank",
  "title": "Not Found",
  "status": 404,
  "detail": "External system string does not exist",
  "instance": "/integration/timesheets/r1/resources-calendars",
  "code": "IA001_001"
}

Response error codes