Bulk Asset Import API (Custom Attributes)

Hello,

Following this documentation, here is the payload that I am sending to the /assets/import endpoint:

{

    "Items": [

        {

            "SerialNumber": "ABCDE",

            "ExternalID": 1234,

            "MyAttribute": "My value",

            "PurchaseCost": 150.00

        }

    ],

    "Settings": {

        "Mappings": [

            {

                "FieldIdentifier": "SerialNumber",

                "CustomAttributeID": 0,

                "DefaultValue": null,

                "ClearOnNull": false

            },

            {

                "FieldIdentifier": "ExternalID",

                "CustomAttributeID": 0,

                "DefaultValue": null,

                "ClearOnNull": false

            },

            {

                "FieldIdentifier": "MyAttribute",

                "CustomAttributeID": 123456,

                "DefaultValue": null,

                "ClearOnNull": false

            },

            {

                "FieldIdentifier": "PurchaseCost",

                "CustomAttributeID": 0,

                "DefaultValue": null,

                "ClearOnNull": false

            }

        ]

        ,

        "UpdateItems": true

    }

}

All fields are updated except for the custom attribute (which is a text field). I have quadruple checked that the attribute ID is correct. I have tried with a different attribute. Are custom attributes supported? Thank you.

Tags API asset asset-import bulk
Asked by Daniel Hammond on Wed 7/13/22 11:53 AM
Sign In to leave feedback or contribute an answer

Answer (1)

This answer has been marked as the accepted answer
Mark Sayers Wed 7/20/22 10:56 AM

Hello Daniel,

We can see that your mappings are completed, but it seems like those fieldidentifiers are wrong potentially. You might try CustomAttribute-<attribute ID> like in the docs: https://solutions.teamdynamix.com/TDClient/1965/Portal/Shared/FileOpen?AttachmentID=de3e43e5-d2ec-485a-a8dd-92c8ef5c99a2&ItemID=4056&ItemComponent=26&IsInline=-1

In general though, that endpoint is really only *meant* to be called by our asset import utility tool. It *can* be used in a manual call, but it is a pretty difficult endpoint to call manually.

Sincerely,
Mark Sayers
Sr Support Consultant, CS

No feedback