Discussions

Ask a Question
Back to All

API Error when updating specific jobs

We have noticed a new error occurring when we try to update certain Job Records in ServiceM8 via the API

The error is ‘PUT on 'material' returned status 400. 400 Bad Request. Bad Request. Item Number must be unique. ServiceM8/1.0.’

But the error message is misleading.

It only affects specific jobs.

As well as updating the Quote with line items we also try to send PDFs to the job diary – this fails for these jobs as well with the error ‘No JSON object could be decoded’. But only for these jobs.

All their other jobs work fine, as do all the other transactions we perform (hundreds a day)

After a week or so, a couple of these jobs no longer had the problem and the failed transactions were able to be processed via the API without error.

It seems to me that something in ServiceM8 is locking the specific Job record and not allowing us to update them.

Can you offer any insight?