iVvy Developer API
  • API Documentation
  • Getting Started
    • Obtaining Keys
    • Creating the request
      • Method/URI Header
      • Request Headers
        • Standard Headers
        • Custom Headers
      • Signing the request
      • Query Parameters
    • Test Ping
    • Interpreting the response
      • Collections
      • Pagination
      • Filtering
      • Exceptions
      • Response Headers
      • Dates
    • Batch
      • Run
      • Progress
      • Result
      • Restart
      • Repost
    • Use Cases
      • CRM Systems
      • Financial Accounting Systems
      • Point Of Sale
      • Property Management Systems
  • Contacts & Companies
    • Get Contact List
    • Get Contact
    • Get Contact Note List
    • Add or Update Contact
    • Get Contact Custom Field Definition
    • Get Company Custom Field Definition
    • Get Subscription Group List
    • Add Contacts To Subscription Group
    • Remove Contacts From Subscription Group
    • Get Company List
    • Get Company
    • Get Company Note List
    • Add or Update Company
    • Add or Update Lead
    • Add or Update Contact Note
    • Add or Update Company Note
  • Event
    • Add or Update Event
    • Get Event List
    • Get Event
    • Get Registration
    • Get Registration List
    • Get Attendee
    • Get Attendee List
    • Get Invited Contact List
    • Invite Contacts
    • Get Sponsorship List
    • Get Speaker List
    • Get Session List
    • Create Login Token
  • Venue
    • Venue Setup Data
      • Get Venue
      • Get Venue List
      • Get Venue Room List
      • Get Venue Room Option List
      • Get Venue Rate Plan List
      • Get Venue Rate Plan Rate List
      • Get Venue Rate Plan Room Rate List
      • Get Resource List
      • Get Resource Availability
      • Get Menu List
      • Get Beverage Package List
      • Get Function Space List
      • Get Space Blockout List
      • Get Function Space Category List
      • Get Function Space Availability
      • Get Function Space Hire Plan Rate List
      • Get Function Space Hire Plan Rate
      • Get Cost Center List
      • Get Session Type List
      • Get Revenue Template List
      • Get Tax List
      • Add or Update Function Space
      • Get Event Type List
      • Add or Update Function Space Category
      • Add or Update Guest Room
      • Get Booking Custom Field List
      • Get Space Hire Plans
      • Get Venue Package List
      • Get Venue Package
    • Booking Data
      • Convert Lead To Opportunity
      • Add or Update Opportunity
      • Get Booking
      • Get Booking List
      • Get Booking List For Account
      • Get Booking Notes
      • Get Booking Session List
      • Get Booking Session Menu List
      • Get Booking Changelog List
      • Get Booking Attendee (By Hash)
      • Get Booking Attendee List
      • Get Booking Release Schedule
      • Add or Update Booking
      • Change Booking Status
      • Add Items To Booking
      • Add Payment To Booking
      • Add Refund To Booking
      • Add or Update Booking Attendee
      • Add or Update Booking Note
      • Add or Update Booking Session
      • Add or Update Booking Session Beverage
      • Add or Update Booking Session Menu
      • Add or Update Booking Session Resource
      • Remove Booking Session
      • Remove Booking Session Beverage
      • Remove Booking Session Menu
      • Remove Booking Session Resource
      • Get Space Blockout List
      • Add or Update Blockout Space
      • Remove Blockout Space
      • Get Booking Tax List
      • Add or Update Opportunity Note
      • Add or Update Booking Package
      • Get Booking Document List
      • Get Booking BEO List
      • Get Booking BEO Version List
      • Upload Booking Document
    • Booking Accommodation Data
      • Get Booking Accommodation List
      • Add or Update Booking Accommodation
      • Remove Booking Accommodation
      • Get Booking Room Reservation List
      • Add or Update Booking Room Reservation
      • Update Room Reservation Guest Contact
      • Remove Booking Room Reservation
      • Confirm Booking Room Reservation
      • Cancel Booking Room Reservation
      • Change Status of Booking Room Reservation
      • Add or Update Room Counts
      • Add or Update Room Dynamic Rates
      • Remove Room Dynamic Rates
      • Add or Update Rate Plan Booking Rules
  • Partner
    • Get Venue List
    • Get Venue
  • Invoice
    • Get Invoice List
    • Get Invoice
    • Get Options
    • Add Payment
    • Get Credit Note List
    • Get Credit Note
  • Account
    • Add or Update Cost Center
    • Get Cost Center List
    • Get Email Log List
    • Add Error Report
    • Get Account User List
  • CRM
    • Get Lead List
    • Get Opportunity List
    • Get Opportunity Note List
    • Get Task List
    • Get Activity List
    • Get Lead Stage List
    • Get Lead Type List
    • Get Lead Quality List
    • Get Lead Source List
    • Get Lead Channel List
    • Get Lead Note List
    • Add or Update Activity Purpose
    • Add or Update Activity
    • Add or Update Task
    • Add or Update Lead Quality
    • Add or Update Lead Stage
    • Add or Update Lead Channel
    • Add or Update Lead Type
    • Add or Update Lead Source
    • Add or Update Lead Note
  • Notifications
    • Company Endpoint
    • Contact Endpoint
    • CRM Endpoint
    • Invoice Endpoint
    • Booking Endpoint
    • Event Endpoint
  • Development Reference
    • Calculating md5
    • HMAC-SHA1
    • JSON Encoding
    • Timestamp Format
    • Date Format
    • Time Format
    • Address Format
    • URLEncoding
    • Timezone List
  • Announcements
    • Room Reservation Contact Changes
    • Contact Customfield Changes
    • Booking Accommodation API Changes
Powered by GitBook
On this page
  • Upload Booking Document
  • Booking Document
  • Example Request
  • Returns
  • Throws
  • Booking Document Type
  • Booking Document Status
  1. Venue
  2. Booking Data

Upload Booking Document

Upload Booking Document

POST [PlatformAddress]/api/1.0/venue?action=uploadBookingDocument

Uploads a venue booking document.

Booking Document

Property
Type
Required
Description

venueId

integer

required

The id of the venue to which the booking note belongs

bookingId

integer

required

The id of the booking to which the booking note will be assigned.

fileId

string

required

The path of the file to be uploaded

type

integer

required

status

integer

required

canBeDeleted

integer

optional

Indicates whether the document can be deleted. Use 1 for deletable and 0 for non-deletable. By default, the document is not deletable (0) means not

Example Request

#!/usr/bin/env bash

# Configuration variables
API_KEY="apikey"
API_SECRET="apkisecret"
API_VERSION="1.0"
URI_PATH="/api/1.0/venue?action=uploadBookingDocument"
API_URL="[PlatformAddress]${URI_PATH}"

# Get the current date in the required format (UTC timezone)
DATE=$(date -u +"%Y-%m-%d %H:%M:%S")

# Create request data (JSON format)
REQUEST_DATA="{\"venueId\":\"1\",\"bookingId\":\"29836\",\"type\":\"3\",\"status\":\"3\",\"canBeDeleted\":\"1\"}"
PATH_TO_FILE="/path/to/document.pdf"

# Compute the MD5 hash of the request data
BODY_MD5=$(echo -n "$REQUEST_DATA" | md5sum | awk '{print $1}')

# Compute the md5 checksum of the file
FILE_MD5=$(md5sum "$PATH_TO_FILE" | awk '{print $1}')

# Set the content-type including the boundary
CONTENT_TYPE="multipart/form-data"

# Prepare the string to sign
STRING_TO_SIGN="POST${BODY_MD5}${FILE_MD5}${CONTENT_TYPE}${URI_PATH}${API_VERSION}ivvydate=${DATE}"
# Convert to lower case
STRING_TO_SIGN="${STRING_TO_SIGN,,}"

# Generate the HMAC signature using the secret key
SIGNATURE=$(echo -n "$STRING_TO_SIGN" | openssl dgst -sha1 -hmac "$API_SECRET" | awk '{print $2}')

# Perform the API call using curl
curl --location "$API_URL" \
  --header "Content-Type: ${CONTENT_TYPE}" \
  --header "X-Api-Authorization: IWS ${API_KEY}:${SIGNATURE}" \
  --header "Content-MD5: ${FILE_MD5}" \
  --header "IVVY-Date: ${DATE}" \
  --header "X-Api-Version: ${API_VERSION}" \
  --form "fileId=@${PATH_TO_FILE}" \
  --form "venueId=1" \
  --form "bookingId=29836" \
  --form "type=3" \
  --form "status=3" \
  --form "canBeDeleted=1" \

Returns

Property
Description

success

Whether or not the booking document was uploaded

id

The unique id of the booking document that was uploaded

Throws

Code
Description

Specific Code: 24464

The request contains bad data

Specific Code: 24465

The request contains invalid data

Booking Document Type

Type
Description

3

Quote

4

Contract

5

Other

Booking Document Status

Type
Description

3

Draft

4

Created

5

Sent

8

Completed

PreviousGet Booking BEO Version ListNextBooking Accommodation Data

Last updated 15 days ago

The of the booking note.

The of the booking note.

type
type