Skip to content

Errands Rows

IMPORTANT: Please note the endpoints defined below are not supported in the Momentum Fastighet API.
UPDATE 2023-06-12: This API will be moved to GraphQL in a future version, do not build new applications towards this API.

Get ErrandsRows

Returns a list of ErrandsRows. This API returns a list of errands rows.

Security

  • This API requires that the signed in user has permission to read errands, please assign the following role to the user:
  • Extern Leverantör
  • The signed in user must be registered as an active employee/actor of an active company in Momentum PM

Request example

Example

GET /v2/errands/{id}
Flags to control what information is returned in the response:
{
    "rows": "true",
    "rowsAccounting": "true",
    "rowsAccountingCoding": "true",
    "rowsAccountingVat": "true",
    "rowsAccountingIncomingInvoice": "true",
    "rowsPrimaryObject": "true",
    "rowsParticipants": "true",
    "rowsEntityPath": "true",
    "basicFields": "true"
}

Parameters

Name Description
id Is the identification used to retrieve all rows for the errand. Example of id is R-2106-5029, IB-2201-10000, c39da420df194c05b9fccfd9781c1990. When an errand is created in PM, the errand has an identification like R-2106-5029 and a GUID. When an errand row is sent to a supplier then an IB number is assigned and another GUID, (this is not the same GUID as the errand GUID). The IB number is unique for the errand/supplier but there can be more than one GUID and it works like this: When an errand row is created and sent to the same supplier, they are assigned the same IB number and GUID but as soon an invoice is received for this row and a new errand row is created after and sent to the same supplier then it is assigned the same IB number but a new GUID. If the errand number or the errand GUID is used as id, then all rows for the errand is returned in the result. If the IB number or it's GUID is used, then only rows with those rows will be returned in the result. Required
rows Is a Boolean flag. Use true to return detail rows for the errand.
rowsAccounting Is a Boolean flag. Use true to return accounting information.
rowsAccountingCoding Is a Boolean flag. Use true to return accounting code information.
rowsAccountingVat Is a Boolean flag. Use true return information about VAT for the object.
rowsAccountingIncomingInvoice Is a Boolean flag. Use true to return incoming invoice information.
rowsPrimaryObject Is a Boolean flag. Use true to return if object is rentable or not.
rowsParticipants Is a Boolean flag. Use true to return participants information for every row.
rowsEntityPath Is a Boolean flag. It's the path to the chosen entity. Most commonly it consists of an object, a space, an equipment and a component. Use true to return entity path information for every row.
basicFields Is a Boolean flag. It's part of the CRM module and is a user defined helptext, textfield or a attachment file. Use true to return basic fields information.

Response example

{
    "id": "9de1b47376dc479fa7261a8497055f58",
    "number": "R-2201-5000",
    "rows": [
        {
            "id": "960ce59193114d3f8e0ce076f23fe8f4",
            "number": "1",
            "primaryObject": {
                "id": "07be44eca3c64e7ba5b25e62e95fccad",
                "type": {
                    "id": "rentalObject",
                    "displayName": "Hyresobjekt"
                }
            },
            "participants": [
                {
                    "type": {
                        "id": "manager",
                        "displayName": "Handläggare"
                    },
                    "actor": {
                        "id": "fa364fc841db48588dc4dc835e59e27e",
                        "displayName": "Kaj "
                    }
                },
                {
                    "type": {
                        "id": "supplier",
                        "displayName": "Leverantör"
                    },
                    "actor": {
                        "id": "ac5730e71b394fb88d7e56e18313db58",
                        "displayName": "Lars Persson"
                    }
                },
                {
                    "type": {
                        "id": "orderer",
                        "displayName": "Beställare"
                    },
                    "actor": {
                        "id": "53cf9d514a3d460f999800a4109c9dcb",
                        "displayName": "Momentum Jensen (default)"
                    }
                },
                {
                    "type": {
                        "id": "contact",
                        "displayName": "Kontaktperson"
                    },
                    "actor": {
                        "id": "6238cb1e170b4f8ba657ac24596872f2",
                        "displayName": "Man Två"
                    }
                }
            ],
            "accounting": {
                "estimatedCost": 500.0000,
                "vat": {
                    "registered": false
                },
                "coding": [
                    {
                        "rows": [
                            {
                                "debit": true,
                                "parts": [
                                    {
                                        "typeDisplayName": "Ansvar",
                                        "dimension": "23"
                                    },
                                    {
                                        "typeDisplayName": "Fastighet",
                                        "dimension": "25"
                                    },
                                    {
                                        "typeDisplayName": "Konto",
                                        "value": "4657"
                                    },
                                    {
                                        "typeDisplayName": "Kostnadsslag",
                                        "dimension": "24"
                                    },
                                    {
                                        "typeDisplayName": "Projekt",
                                        "dimension": "26"
                                    },
                                    {
                                        "typeDisplayName": "Verksamhet",
                                        "dimension": "22",
                                        "value": "252"
                                    }
                                ]
                            }
                        ]
                    }
                ],
                "incomingReference": {
                    "reference": "IB-2201-10000",
                    "referenceGuid": "ed45ee3a3ddb4d3b960d984f37fdf297",
                    "invoice": []
                }
            }
        },
        {
            "id": "126448ac03fa47e696acec23f7bc6b65",
            "number": "2",
            "primaryObject": {
                "id": "07be44eca3c64e7ba5b25e62e95fccad",
                "type": {
                    "id": "rentalObject",
                    "displayName": "Hyresobjekt"
                }
            },
            "participants": [
                {
                    "type": {
                        "id": "manager",
                        "displayName": "Handläggare"
                    },
                    "actor": {
                        "id": "fa364fc841db48588dc4dc835e59e27e",
                        "displayName": "Kaj "
                    }
                },
                {
                    "type": {
                        "id": "supplier",
                        "displayName": "Leverantör"
                    },
                    "actor": {
                        "id": "ac5730e71b394fb88d7e56e18313db58",
                        "displayName": "Lars Persson"
                    }
                },
                {
                    "type": {
                        "id": "orderer",
                        "displayName": "Beställare"
                    },
                    "actor": {
                        "id": "53cf9d514a3d460f999800a4109c9dcb",
                        "displayName": "Momentum Jensen (default)"
                    }
                },
                {
                    "type": {
                        "id": "contact",
                        "displayName": "Kontaktperson"
                    },
                    "actor": {
                        "id": "6238cb1e170b4f8ba657ac24596872f2",
                        "displayName": "Man Två"
                    }
                }
            ],
            "accounting": {
                "estimatedCost": 50.0000,
                "vat": {
                    "registered": false
                },
                "coding": [
                    {
                        "rows": [
                            {
                                "debit": true,
                                "parts": [
                                    {
                                        "typeDisplayName": "Ansvar",
                                        "dimension": "23"
                                    },
                                    {
                                        "typeDisplayName": "Fastighet",
                                        "dimension": "25"
                                    },
                                    {
                                        "typeDisplayName": "Konto",
                                        "value": "4657"
                                    },
                                    {
                                        "typeDisplayName": "Kostnadsslag",
                                        "dimension": "24"
                                    },
                                    {
                                        "typeDisplayName": "Projekt",
                                        "dimension": "26"
                                    },
                                    {
                                        "typeDisplayName": "Verksamhet",
                                        "dimension": "22",
                                        "value": "252"
                                    }
                                ]
                            }
                        ]
                    }
                ],
                "incomingReference": {
                    "reference": "IB-2201-10000",
                    "referenceGuid": "ed45ee3a3ddb4d3b960d984f37fdf297",
                    "invoice": []
                }
            }
        },
        {
            "id": "a51dc347fb8743a7acae7591e2fd3866",
            "number": "3",
            "primaryObject": {
                "id": "07be44eca3c64e7ba5b25e62e95fccad",
                "type": {
                    "id": "rentalObject",
                    "displayName": "Hyresobjekt"
                }
            },
            "participants": [
                {
                    "type": {
                        "id": "manager",
                        "displayName": "Handläggare"
                    },
                    "actor": {
                        "id": "fa364fc841db48588dc4dc835e59e27e",
                        "displayName": "Kaj "
                    }
                },
                {
                    "type": {
                        "id": "supplier",
                        "displayName": "Leverantör"
                    },
                    "actor": {
                        "id": "ba29ec55eb224e2b92aabe49c4c1f617",
                        "displayName": "Per Persson"
                    }
                },
                {
                    "type": {
                        "id": "orderer",
                        "displayName": "Beställare"
                    },
                    "actor": {
                        "id": "53cf9d514a3d460f999800a4109c9dcb",
                        "displayName": "Momentum Jensen (default)"
                    }
                },
                {
                    "type": {
                        "id": "contact",
                        "displayName": "Kontaktperson"
                    },
                    "actor": {
                        "id": "6238cb1e170b4f8ba657ac24596872f2",
                        "displayName": "Man Två"
                    }
                }
            ],
            "accounting": {
                "estimatedCost": 346.0000,
                "vat": {
                    "registered": false
                },
                "coding": [
                    {
                        "rows": [
                            {
                                "debit": true,
                                "parts": [
                                    {
                                        "typeDisplayName": "Ansvar",
                                        "dimension": "23"
                                    },
                                    {
                                        "typeDisplayName": "Ansvar",
                                        "dimension": "23"
                                    },
                                    {
                                        "typeDisplayName": "Fastighet",
                                        "dimension": "25"
                                    },
                                    {
                                        "typeDisplayName": "Fastighet",
                                        "dimension": "25"
                                    },
                                    {
                                        "typeDisplayName": "Konto",
                                        "value": "4657"
                                    },
                                    {
                                        "typeDisplayName": "Konto",
                                        "value": "4657"
                                    },
                                    {
                                        "typeDisplayName": "Kostnadsslag",
                                        "dimension": "24"
                                    },
                                    {
                                        "typeDisplayName": "Kostnadsslag",
                                        "dimension": "24"
                                    },
                                    {
                                        "typeDisplayName": "Projekt",
                                        "dimension": "26"
                                    },
                                    {
                                        "typeDisplayName": "Projekt",
                                        "dimension": "26"
                                    },
                                    {
                                        "typeDisplayName": "Verksamhet",
                                        "dimension": "22",
                                        "value": "252"
                                    },
                                    {
                                        "typeDisplayName": "Verksamhet",
                                        "dimension": "22",
                                        "value": "252"
                                    }
                                ]
                            }
                        ]
                    }
                ],
                "incomingReference": {
                    "reference": "IB-2201-10001",
                    "referenceGuid": "99402ab8388c42f790bc9ff199204256",
                    "invoice": [
                        {
                            "id": "631c447ccebb4d2aa5e1524489e05259",
                            "number": "INV1a001"
                        }
                    ]
                }
            }
        }
    ]
}
Name Description
id Identifier of the errand. Id is a GUID. See guid.md for the requirements the API has on GUID's.
number The errand number. Identifies the errand. Used in PM. e.g. R-2201-5015
rows List of errand rows.
displayName The name of the errand. e.g. Felanmälan
type The type of errand.
presentation The presentation type of the errand.
status Information about status for the errand.

.rows

Name Description
id Identifier of the errand row. Id is a GUID. See guid.md for the requirements the API has on GUID'S.
number Row number of the row in the errand. (e.g. 1 or 2 or 3 etc.)
primaryObject Information about the primary object for the errand row.
status Information about status for the errand row. e.g. date for created and closed.
entityPath A list of the parts in the path to what the errand row refers to.
description A description of what fault or other the errand row refers to.
participants Information about the participants for the errand row.
accounting Information about the accounting. Estimated cost, accounting code, VAT and incoming invoice information for the errand row.

.primaryObject

Name Description
id Unique identifier of the primary object. See guid.md for the requirements the API has on GUID'S.
type Type of object. If it is rentable or not.
displayName The name of the primary object. e.g. Nobelvägen 121 F Lgh 1001
address The address of the primary object.

.type

Name Description
id Identifies a rentable object. e.g. rentalObject
displayName Header for the type. e.g. Hyresobjekt
typeClassDisplayName Specification of the header. e.g. Lägenhet, Parkeringsplats

.address

Name Description
address
postcode
city

.status

Name Description
created The date and time when the errand row was created.
closed The date and time when the errand row was closed.
displayName Indicates where the errand row is in it's process. e.g. Utkast, Hos handläggare

.entityPath

Name Description
displayName The denotation of a single part of the entity path. e.g. Badkar

.description

Name Description
text A fault description.
specification A mostly more detailed description of the fault and/or what needs to be done.

.participants

Name Description
type Type of participant.
actor Information about the participant.

.type

Name Description
id Identifies a type of participant. e.g. manager
typeDisplayName Header for the type. e.g. Handläggare

.actor

Name Description
id Unique identifier of the actor. See guid.md for the requirements the API has on GUID'S.
id Local identifier for actor (participant), i.e. databaseid.
typeDisplayName Name of the participant.

.accounting

Name Description
estimatedCost An estimated cost for this errand row.
vat Indicates if the primary object requires VAT.
coding Accounting code.
incomingReference Incoming invoice information. This is information about invoices created on the errand row.

.vat

Name Description
registered Boolean flag. True if primary object is registered for VAT.

.coding

Name Description
rows List of accounting codes.

.incomingReference

Name Description
reference Code to mark outgoing invoice from supplier sent to Momentum Fastighet.
referenceGuid Identifier for this group. Manny errand rows sent to the same supplier can be identified with this GUID. All rows created and sent before any invoices where created have the same GUID. But if new errand rows were created for the same errand after an invoices was created then the will have another GUID. If the accounting code differ from the previous rows then there will be a new IB-Number and a new GUID for those new rows.
invoice
.invoice
Name Description
id Code to mark outgoing invoice from supplier sent to Momentum Fastighet.
number The external invoice number. e.g. INV000001

.rows

Name Description
debit Indicates if row is a debit or credit row. debit = 1 credit = 0
parts List of coding parts (dimensions)

.parts

Name Description
typeDisplayName Header for the accounting dimension. ex. "Konto",
dimension The parts dimension value. ex. 22
value Value of the part. ex. 2264