Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Add multiple customer inventory in one REST request

edited Feb 26, 2018 12:17PM in Field Service 2 comments

Content

Hi All,

 

I am trying to create multiple customer inventories in one REST request. I know the API can be used to create one inventory at a time, but to create large no of inventory with customer, I want to create multiple inventory in one request.

 I am using the API : Create Resource Inventory  :/rest/ofscCore/v1/resources/{resourceId}/inventories

in the Body I am passing :

[{
        "inventoryType": "PUMP",
        "resourceId": "123"
    },
    {
        "inventoryType": "CABLE",
        "resourceId": "123"
    }
]

 

but it is giving me error: "Invalid request - Got value type: 'array'. Expected value type: 'object'"

 

Has anyone faced this issue earlier and have a solution for this. Please comment.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!