Boxtech icon indicating copy to clipboard operation
Boxtech copied to clipboard

[Question] Empty 200 response for /container/{containerNumber}

Open tvanhove opened this issue 1 year ago • 2 comments

We have a container number EXFU8211118 which we wanted to retrieve information on and while we get a 200 OK response we do get an empty body ('{}').

image

Question is why this happens? And can we rely on the 200 OK to confirm that this is a valid number even though we get an empty response?

tvanhove avatar Jun 20 '24 10:06 tvanhove

The example above shows a tank container, but this happens with box containers too, for exampe TRHU1534376 which will return the same response.

tvanhove avatar Jul 04 '24 09:07 tvanhove

Any updates on this?

tvanhove avatar Sep 03 '24 15:09 tvanhove

Hi @tvanhove thanks for the question and apologies for the delay in time on the above.

I've pushed some changes to the code to rectify this, we should have been returning 404 for container not found rather than a 200 with empty body. I have updated the API spec to include this response now.

Also to answer your question on confirmation about a valid number:

  • 200 means it was a valid request and that the container number is valid (correct BIC Code, serial and check digit)
  • 400 response means that the container number searched for was invalid
  • 401 is related to permissions like the t&c's not accepted

Updated API spec here https://app.swaggerhub.com/apis/BIC-ORG/Boxtech/2.0.4

Thanks for taking time to report.

cmsdroff avatar Dec 08 '25 13:12 cmsdroff