3

I've tried booking references from a dozen providers (which I don't want to post for privacy reasons) and every time the API returns 'Unable to parse' but with no additional diagnostic information.

As a self-service API they don't offer support through any channel other than Stack Overflow, but I'm hoping someone has successfully used the endpoint.

I'm mostly using GMail to access sample flight booking emails, then selecting "View Original" to download the original MIME format email

This is what I use to read the .eml file into code:

function base64_encode(file) {
    // read binary data
    var bitmap = fs.readFileSync(file);
    // convert binary data to base64 encoded string
    return new Buffer(bitmap).toString('base64');
}

However every single email I submit to the endpoint eventually returns:

  data:
   { data:
      { type: 'trip-parser-job',
        id: 'REDACTED',
        self: [Object],
        status: 'ERROR',
        detail: 'Unable to parse' } } } 

and at this point, I'm starting to think that either the API is broken, or they haven't correctly documented what data should be submitted as content. I've decoded the sample document they provide and can't see any major difference between that and my inputs.

Does someone have either some working samples that the API was able to process, or some NodeJS code which seems to reliably get a result from the API?

Dan G
  • 33
  • 2

0 Answers0