Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Q&A about the HungryHub Full API Integration Documentation (HH x KK Day)

Question: "transaction_id": What should be placed here?

Answer:

  • Field Name: transaction_id => String (required)
  • Description: The transaction_id field is used to uniquely identify a payment transaction associated with a reservation. This identifier is utilized within the vendor_payment section of the request body when utilizing the Create New Reservation API.
  • Usage: 1. When to Include: This field should be included in the request body if the vendor (third party) is responsible for handling the payment associated with the reservation. If the vendor is not involved in payment processing, the vendor_payment field can be omitted. 2. Format: The transaction_id should be a string value representing the identifier assigned to the payment transaction by the vendor. It is essential that this identifier accurately corresponds to the payment transaction within the vendor's system. 3. Location: The transaction_id field resides within the vendor_payment section of the request body for the Create New Reservation API. 4. Example:
{
    "vendor_payment": {
        "transaction_id": "VENDOR1234567890",
        // Other vendor_payment fields...
    },
    // Other reservation details...
}

Question: Is "amount_cents" the cost price or the selling price?

Answer: Field Name: amount_cents => Integer (required) Description: The amount_cents field represents the total payment amount in Thai Baht cents associated with the reservation. This value is utilized within the vendor_payment section of the request body, indicating the total payment made by the vendor. Usage:

  1. When to Include: This field should always be included in the request body when utilizing the Create New Reservation API, specifically within the vendor_payment section. It is required to ensure accurate tracking of the payment amount.
  2. Format: The amount_cents field should be an integer value representing the total payment amount in Thai Baht.
  3. Currency Conversion: If the vendor handles the payment using a currency other than Thai Baht, it is the vendor's responsibility to convert the payment amount to Thai Baht before providing the value for amount_cents. This ensures consistency in currency across systems.
  4. Example:
{
    "vendor_payment": {
        "amount_cents": 5000, // Represents 5,000 Thai Baht
        // Other vendor_payment fields...
    },
    // Other reservation details...
}

Question: For "paid_at" timestamp, is it in the Thailand timezone?

Answer: Field Name: paid_at => Timestamp (required) Description: The paid_at field represents the timestamp indicating the time when the payment for the reservation was made by the user on the vendor's side. This timestamp should be in the Thailand timezone (GMT+7). Usage:

  1. When to Include: This field should be included in the request body within the vendor_payment section when utilizing the Create New Reservation API. It is used to specify the exact time of payment.
  2. Format: The paid_at field should be a timestamp in string format following the pattern: "YYYY-MM-DD HH:MM:SS". The timestamp should reflect the local time in the Thailand timezone (GMT+7).
  3. Timezone: It is important to ensure that the paid_at timestamp is provided in the Thailand timezone (GMT+7). This ensures accurate recording of the payment time.
  4. Example:
{
    "vendor_payment": {
        "paid_at": "2024-05-07 12:00:00",
        // Other vendor_payment fields...
    },
    // Other reservation details...
}

Question: What shoud we put in "source" and "special_request"?

Answer: Field Name: source => String (required) Description: The source field indicates the origin or source of the reservation. For vendor-initiated reservations, the value for this field is always "vendor_app". Usage:

  1. When to Include: This field should be included in the request body when utilizing the Create New Reservation API. It is required to specify the source of the reservation.
  2. Format: The source field should be a string value representing the origin of the reservation. For vendor-initiated reservations, the value should always be "vendor_app".
  3. Example:
{
    "source": "vendor_app",
    // Other reservation details...
}

Field Name: special_request => String (optional) => The value can be anything Description: The special_request field allows customers to provide any special requests or notes related to their reservation. These requests could include special events, allergies, or any other specific requirements. Usage:

  1. When to Include: This field should be included in the request body when utilizing the Create New Reservation API. It is optional and should only be included if the customer has provided any special requests.
  2. Format: The special_request field should be a string value containing any notes or special requests from the customer.
  3. Example:
{
    "special_request": "Please prepare a birthday cake for the reservation.",
    // Other reservation details...
}

Question: Can "menu_sections" be left empty?

Answer: Yes, it can be empty (we will update the reason later)