You can use bulk processing in the Momentus Enterprise API. See below for an example using the Service Order Items subject.
Bulk processing allows you to send multiple requests in one transaction. For example, you can add multiple service order items to a single order.
Error Handling
Validation issues do happen at some point. You can put tracking indexes on the items so when one or many of the items experiences an issue, the response lets you know which items you sent in did not succeed.
You can also make the entire call transactional so if one item fails to save, the entire operation fails. Using the last example, if #9 fails, you can make it so the whole order should not go through, which is very likely the way you want to do it.
What areas of the API have bulk processing available?
The fastest way to tell what is available in your software version is to check under the Bulk section of the API Help page.
What do the response codes mean?
Given its special nature, response http codes of Bulk operations are slightly different than most other API endpoints.
200 (OK) - The bulk operation ran and completed. None, some or even all of the individual entries could have failed to save, but the bulk process itself successfully ran.
400 (BadRequest) - The bulk operation itself has failed. This indicates a problem when calling the bulk process that needs to be corrected.
500 (InternalServerError) - The bulk operation has run into a server error. This is usually either a URL connection issue or a server problem.
Where can I see code?
This is available on our Github example page. Search you software version's repository for Bulk for a snapshot of what is available.
Comments
4 comments
Hi
Could this be used to upload a large number of new resources?
Kris
1 upvotes
Bulk still only supports booking, service order items, accounts and relationships.
The API is perfectly capable of handling volumes through the normal endpoints though (i'm assuming you're probably talking thousands and not millions :)
0 upvotes
Hi Lee yes am talking thousands but surely there has to be an easier way than one by one manually
0 upvotes
Yes, you can use the API which allows you to import thousands "automatically".
You don't need to do each one manually.
I was just confirming that the "bulk" endpoint/functionality can't be used 👍
0 upvotes
Please sign in to leave a comment.