Expected Configuration and Results of Mapping Retrieval

The expected parameters and the mapping formats that are retrieved through the Universal Mapping Assistant depend on the considered mapping type. This article describes these characteristics for the standard mapping types provided by this SuiteApp.

GL Accounts SAF-T 2.0 Retrieval Options

For the GL Accounts SAF-T 2.0 mapping type, there are the following possible retrieval options:

  • Bulk retrieval per subsidiary, which returns all the mappings defined for a given subsidiary.

  • Single retrieval of a mapping value, filtered by subsidiary and GL account.

The format of the request for bulk retrieval is shown below. In the example, subsidiary is the internal ID of the preferred subsidiary.

            {
    mappingTypeId: 'UMA_SAFT_2_0_ACCOUNTS',
    mappingTypeInstanceId: 'NO_SAFT_2_0_ACCOUNTS',
    parameters: {
        subsidiary: 224
    }
} 

          

The result of a bulk retrieval is always a list of values in the format shown below. For groupingCategory and groupingCode, uid is the stable target identity used by the Universal Mapping Assistant. For groupingCode, code remains the business value. If you purposely save an empty mapping, the grouping code and grouping category are both null.

            {
    "success": true,
    "body": [
        {
            "internalId": 2,
            "accountId": 6,
            "groupingCode": {
                "category": "CAT_1_UID",
                "code": "1000",
                "uid": "GROUPING_CODE_1000_UID",
                "name": "Utvikling"
            },
            "groupingCategory": {
                "uid": "CAT_1_UID",
                "name": "balanseverdiForAnleggsmiddel"
            }
        },
        {
            "internalId": 3,
            "accountId": 2,
            "groupingCode": null,
            "groupingCategory": null
        }
    ]
} 

          

The format of the request for single retrieval is shown below. In the example, account is the internal ID of the desired GL account.

            {
    mappingTypeId: 'UMA_SAFT_2_0_ACCOUNTS',
    mappingTypeInstanceId: 'NO_SAFT_2_0_ACCOUNTS',
    parameters: {
        subsidiary: 224,
        account: 14
    }
} 

          

The format of the response is similar to the one shown for the bulk retrieval, but with only a single entry in the list. If a mapping isn't found for the considered subsidiary and GL account, the body property is an empty list.

Methods of Payment Retrieval Options

For the Methods of Payment mapping type, there are the following possible retrieval options:

  • Bulk retrieval which returns all the mappings.

  • Single retrieval of a mapping value filtered by the internal payment method (method of payment coming from the Advanced Localization Features SuiteApp).

The format of the request for bulk retrieval is shown below.

            {
    mappingTypeId: 'UMA_METHODS_OF_PAYMENT',
    mappingTypeInstanceId: [your_mapping_type_instance_id],
    parameters: {}
} 

          

The result of a bulk retrieval is always a list of values in the format shown below. For externalPaymentMethod, uid is the stable target identity used by the Universal Mapping Assistant, and code remains the business value.

            {
    "success": true,
    "body": [
        {
            "internalId": 402,
            "internalPaymentMethodId": 1,
            "externalPaymentMethod": {
                "uid": "PM_1_UID",
                "code": "1x",
                "name": "Instrument not defined",
                "description": "Not defined legally enforceable agreement between two or more parties (expressing a contractual right or a right to the payment of money)."
            }
        },
        {
            "internalId": 403,
            "internalPaymentMethodId": 2,
            "externalPaymentMethod": {
                "uid": "PM_2_UID",
                "code": "2x",
                "name": "Automated clearing house credit",
                "description": "A credit transaction made through the automated clearing house system."
            }
        }
    ]
} 

          

The format of the request for single retrieval is shown below. In the example, internalPaymentMethodId is the internal ID of the desired method of payment coming from the Advanced Localization Features SuiteApp.

            {
    mappingTypeId: 'UMA_METHODS_OF_PAYMENT',
    mappingTypeInstanceId: [your_mapping_type_instance_id],
    parameters: {
        internalPaymentMethodId: 234
    }
} 

          

The format of the response is similar to the one shown for bulk retrieval, but with only a single entry in the list. If a mapping isn't found for the considered method of payment, the body property is an empty list.

General Notices