Ship Search VD03 returning MSGTYPE NOT ALLOWED
Hi,
The documentation for VD03: https://www.marinetraffic.com/en/ais-api-services/documentation/api-service:vd03/_:c30c006343d3245e91026ab095297cd6 does not metion MSGTYPE as a url parameter, but when i try to call this api method, I get the following response:
<RESPONSE><STATUS><ERROR CODE="1b" DESCRIPTION="MSGTYPE NOT ALLOWED"/></STATUS></RESPONSE>
In the knowledgebase, there is a post about the Most Common Error codes: https://help.marinetraffic.com/hc/en-us/articles/115005561868-API-Most-Common-Response-Error-Codes It suggests here that I should "Try using one of the following values for msgtype: xml/csv/json/jsono"
msgtype is not listed as a parameter to this api method, but I've tried appending /msgtype:xml
/msgtype:xsv
/msgtype:json - which all still return the same error message
appending /msgtype:jsono
here are some example calls I've tried which all return "MSGTYPE NOT ALLOWED":
https://services.marinetraffic.com/api/shipsearch/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/shipname:seashark/
https://services.marinetraffic.com/api/shipsearch/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/msgtype:xml/mmsi:211135000
https://services.marinetraffic.com/api/shipsearch/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/msgtype:xml/imo:9298193
https://services.marinetraffic.com/api/shipsearch/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/msgtype:csv/shipname:seashark/
https://services.marinetraffic.com/api/shipsearch/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/msgtype:xml/shipname:seas/
Please let me know what I need to do to make these calls work.
-
Official comment
Hi,
Thank you for your post.
The parameter /msgtype:{value}/ is not available for VD03.
I believe according to your description that the parameter you are looking for is /protocol:{value}/ which allows you to receive different formats of response (XML, CSV, JSON, JSON objects).Hope that the above solves the issue you are encountering.
Best,
Thanos Zelios
Data Support EngineerComment actions -
Hi Thanos,
Thanks for your reply.
I am aware that msgtype is not available for VD03, as I said in my post above, it is not listed in the documentation.
The problem is that when I call the api method even without msgtype, I receive a response saying "MSGTYPE NOT ALLOWED"
for example - note that I do NOT include msgtype in this call:
https://services.marinetraffic.com/api/shipsearch/xxxxxxxxxxxxxxxx/shipname:seashark/
returns
<RESPONSE><STATUS><ERROR CODE="1b" DESCRIPTION="MSGTYPE NOT ALLOWED"/></STATUS></RESPONSE>
example 2:
https://services.marinetraffic.com/api/shipsearch/_service_key_/shipname:seashark/protocol:json
{
"errors": [
{
"code": "1b",
"detail": "MSGTYPE NOT ALLOWED"
}
]
}regards,
Dawson Brown
Please sign in to leave a comment.
Comments
3 comments