Parsing: best practices

This topic applies to the parsing dataset.

Attachments

Parsing messages can contain attachments. They are downloaded with the Attachments service. The field Message.hasAttachment indicates whether a message has attachments.

The MessageDetail entity describes the attachments. To get a MessageDetail record, inline it in a Quote or Message request:

  • https://api-qa.ihsmarkit.com/parsing/Quote/latest?inline=MessageDetail
  • https://api-qa.ihsmarkit.com/parsing/Message/latest?inline=MessageDetail

Note: MessageDetail cannot be requested directly. It can only be requested by inlining it in a Quote or Message. See inline.

MessageDetail.attachments is an array that holds, for each attachment, the attachmentFileName, the attachmentId and the quoteCount, the number of quotes in the attachment.

With the Message.id and the attachmentId you can download the attachment:

https://api-qa.ihsmarkit.com/parsing/Message/MESSAGE_ID/messageDetail/attachments/attachmentId/ATTACHMENT_ID

Send your credentials in the Authorization header, as for any request.

Filtering the latest service

The Quote collection is very large. To get fast responses when you filter the latest service with filters:

  • Add sortBy=auto so that the service selects the most suitable index. This applies to API version 1; in version 2 the selection is automatic.
  • sortBy changes the format of the after value, so also set envelope=true. The envelope contains the after value for the next page.

https://api-qa.ihsmarkit.com/parsing/Quote/latest?...&sortBy=auto&envelope=true