TripIt icon

TripIt

Interact with TripIt API

Hotel → Attach Document

AI-generated

Overview

This node operation attaches a document to a hotel object in the TripIt system. It is useful for adding supporting documents such as booking confirmations, invoices, or identification documents to a hotel reservation record. For example, a user can attach a PDF invoice or a scanned copy of a hotel voucher to the corresponding hotel booking in TripIt.

Use Case Examples

  1. Attach a PDF invoice to a hotel reservation by providing the hotel's UUID, the document name, the base64 encoded content of the PDF, and the MIME type 'application/pdf'.
  2. Attach a scanned image of a hotel voucher by specifying the document name, base64 encoded image content, and the appropriate MIME type such as 'image/jpeg'.

Properties

Name Meaning
Object UUID The UUID of the hotel object to update or attach the document to.
Document Name The name of the document to attach to the hotel object.
Document Content The content of the document to attach, provided as a base64 encoded string.
Document Type The MIME type of the document to attach, e.g., 'application/pdf'.

Output

JSON

  • documentId - The unique identifier of the attached document returned by the TripIt API.
  • status - The status of the document attachment operation, indicating success or failure.

Dependencies

  • TripIt API key credential for authentication

Troubleshooting

  • Ensure the provided UUID corresponds to an existing hotel object in TripIt; otherwise, the operation will fail.
  • Verify that the document content is correctly base64 encoded to avoid upload errors.
  • Check that the MIME type matches the actual document content to prevent format-related issues.
  • API errors from TripIt will be surfaced with messages from the API response; ensure the API key credentials are valid and have necessary permissions.

Discussion