# Bókun

> Search and cancel bookings, add booking notes, check activity availability and manage promo codes in Bókun.

App · 27 actions. Web page: https://docs.lodol.com/docs/integrations/bokun

## Actions

### Add an activity booking note

Add a general, finance or operations note to an activity booking.

**Inputs**

- Activity booking ID (`activity_booking_id`, number, required): The activity booking within a booking: the `id` of one of the booking's product bookings.
- Text (`text`, text, required): The note, up to 255 characters.
- Type (`type`, text): What the note is about. General when empty. One of: `GENERAL`, `FINANCE`, `OPERATIONS`. Default: `GENERAL`.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "id": 1,
    "owner_id": 1,
    "text": "example",
    "type": "GENERAL"
  }
}
```

### Cancel a booking

Cancel a whole booking, with an optional refund and email to the customer.

**Inputs**

- Confirmation code (`confirmation_code`, text, required): The confirmation code of the booking to cancel.
- Cancellation note (`note`, text, required): Why the booking is cancelled. Bókun keeps it with the booking.
- Notify the customer (`notify`, true/false): Whether Bókun emails the customer about the cancellation. Off when empty.
- Refund (`refund`, true/false): Whether Bókun refunds the payment. Off when empty.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "fields": {},
    "message": "example"
  }
}
```

### Cancel an activity booking

Cancel one activity within a booking, with an optional full or partial refund.

**Inputs**

- Activity booking confirmation code (`product_confirmation_code`, text, required): The confirmation code of the activity booking to cancel.
- Cancellation note (`note`, text, required): Why the booking is cancelled. Bókun keeps it with the booking.
- Notify the customer (`notify`, true/false): Whether Bókun emails the customer about the cancellation. Off when empty.
- Refund (`refund`, true/false): Whether Bókun refunds the payment. Off when empty.
- Refund amount (`refund_amount`, number): How much to refund. With refund on, 0 or empty refunds the full amount. At least 0.
- Keep on the invoice (`remain_invoiced`, true/false): Whether the cancelled activity stays on the customer's invoice.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "fields": {},
    "message": "example"
  }
}
```

### Create a promo code

Create a promo code with a percentage or fixed amount off.

**Inputs**

- Code (`code`, text, required): The code customers enter at checkout, up to 32 characters. Bókun stores it in capitals.
- Description (`description`, text): A note about the code for your team, up to 140 characters.
- Discount percentage (`discount_percentage`, number): The percentage off, from 0 to 100. Give this or a discount amount, not both. From 0 to 100.
- Percentage applies to extras (`percentage_applies_to_extras`, true/false): Whether the percentage also comes off extras booked with the activity. Off when empty.
- Percentage applies to pick-up and drop-off (`percentage_applies_to_pickup_and_dropoff`, true/false): Whether the percentage also comes off pick-up and drop-off. Off when empty.
- Discount amount (`discount_amount`, number): A fixed amount off. Give this or a discount percentage, not both. At least 0.
- Discount amount currency (`discount_amount_currency`, text): The currency of the discount amount, as a three-letter code such as `EUR`. Needed with a discount amount.
- Discount amount per person (`discount_amount_per_person`, true/false): Whether the amount comes off once per traveller rather than once per booking. Off when empty.
- Bookable from (`booking_valid_from`, date): The first day bookings can use the code.
- Bookable until (`booking_valid_to`, date): The last day bookings can use the code.
- Travel from (`travel_valid_from`, date): The first day of travel the code applies to.
- Travel until (`travel_valid_to`, date): The last day of travel the code applies to.
- Travel days of the week (`travel_days_of_week`, list): The days of the week the code applies to. Every day when empty. One or more of: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`.
- Travel months (`travel_months`, list): The months the code applies to. Every month when empty. One or more of: `JANUARY`, `FEBRUARY`, `MARCH`, `APRIL`, `MAY`, `JUNE`, `JULY`, `AUGUST`, `SEPTEMBER`, `OCTOBER`, `NOVEMBER`, `DECEMBER`.
- Maximum uses (`max_usages`, number): How many times the code can be used in all. No limit when empty. At least 1.
- Valid for all activities (`valid_for_all_products`, true/false): Whether the code works for every activity. When off, choose the activities it works for.
- Activities (`valid_for_products`, list): The activities the code works for, when it isn't valid for all of them.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "bookingValidFrom": "example",
    "bookingValidTo": "example",
    "code": "example",
    "description": "example",
    "discountAmount": 1.0,
    "discountAmountCurrency": "example",
    "discountAmountPerPerson": false,
    "discountPercentage": 1.0,
    "discountPercentageAppliesToExtras": false,
    "discountPercentageAppliesToPickupAndDropoff": false,
    "id": 1,
    "maxUsages": 1,
    "travelValidDaysOfWeek": [],
    "travelValidFrom": "example",
    "travelValidMonths": [],
    "travelValidTo": "example",
    "validForAllProducts": false,
    "validForProducts": []
  }
}
```

### Delete a promo code

Delete a promo code so customers can no longer use it.

**Inputs**

- Promo code (`promo_code_id`, number, required): The promo code in Bókun.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {}
}
```

### Delete an activity booking note

Delete a note from an activity booking.

**Inputs**

- Activity booking ID (`activity_booking_id`, number, required): The activity booking within a booking: the `id` of one of the booking's product bookings.
- Note ID (`note_id`, number, required): The note on the activity booking.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {}
}
```

### Get a booking

Get a booking with its customer, payments, invoice and activity bookings.

**Inputs**

- Confirmation code (`confirmation_code`, text, required): The booking's confirmation code, such as `ABC-T12345`, or its booking ID.
- Currency (`currency`, text): The currency to show prices in, as a three-letter code such as `USD` or `EUR`. Bókun uses ISK when this is empty.
- Language (`language`, text): The language to show the content in, as a two-letter code such as `EN` or `DE`. Bókun uses its default when this is empty.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "accommodationBookings": [],
    "activityBookings": [],
    "affiliate": {
      "externalId": "example",
      "flags": [],
      "id": 1,
      "idNumber": "example",
      "title": "example",
      "trackingCode": "example"
    },
    "agent": {
      "id": 1,
      "idNumber": "example",
      "linkedExternalCustomers": [],
      "referenceCode": "example",
      "title": "example"
    },
    "agentInvoice": {
      "currency": "example",
      "excludedAppliedTaxes": [],
      "id": 1,
      "includedAppliedTaxes": [],
      "issueDate": 1,
      "issuer": {},
      "lineItems": [],
      "recipient": {}
    },
    "bookingChannel": {
      "backend": false,
      "externalId": "example",
      "flags": [],
      "id": 1,
      "overrideVoucherHeader": false,
      "title": "example",
      "uuid": "example",
      "voucherEmailAddress": "example",
      "voucherLogo": {},
      "voucherLogoStyle": "example",
      "voucherName": "example",
      "voucherPhoneNumber": "example",
      "voucherWebsite": "example"
    },
    "bookingFields": [],
    "bookingId": 1,
    "cancellationDate": 1,
    "carRentalBookings": [],
    "confirmationCode": "example",
    "creationDate": 1,
    "currency": "example",
    "customer": {
      "address": "example",
      "contactDetailsHidden": false,
      "contactDetailsHiddenUntil": 1,
      "country": "example",
      "created": 1,
      "credentials": {},
      "dateOfBirth": 1,
      "email": "example",
      "firstName": "example",
      "id": 1,
      "language": "example",
      "lastName": "example",
      "nationality": "example",
      "organization": "example",
      "passportExpMonth": "example",
      "passportExpYear": "example",
      "passportId": "example",
      "phoneNumber": "example",
      "phoneNumberCountryCode": "example",
      "place": "example",
      "postCode": "example",
      "sex": "example",
      "state": "example",
      "uuid": "example"
    },
    "customerPayments": [],
    "externalBookingEntityCode": "example",
    "externalBookingEntityName": "example",
    "externalBookingReference": "example",
    "extranetUser": {
      "agent": {},
      "creationDate": 1,
      "firstName": "example",
      "fullNameShort": "example",
      "id": 1,
      "lastLoginDate": 1,
      "lastName": "example",
      "password": "example",
      "role": "VENDOR",
      "termsOfServiceAgreedDate": 1,
      "username": "example",
      "vendorRoles": []
    },
    "harbour": {
      "flags": [],
      "id": 1,
      "pickupPlace": {},
      "productListId": 1,
      "title": "example"
    },
    "invoice": {
      "currency": "example",
      "customLineItems": [],
      "excludedAppliedTaxes": [],
      "excludedTaxes": false,
      "free": false,
      "id": 1,
      "includedAppliedTaxes": [],
      "includedTaxes": false,
      "invoiceNumber": "example",
      "issueDate": 1,
      "issuer": {},
      "issuerName": "example",
      "lodgingTaxes": [],
      "paidAmountAsMoney": {},
      "paidAmountAsText": "example",
      "payments": [],
      "productInvoices": [],
      "recipient": {},
      "recipientName": "example",
      "remainingAmountAsMoney": {},
      "remainingAmountAsText": "example",
      "totalAsMoney": {},
      "totalAsText": "example",
      "totalDiscountAsMoney": {},
      "totalDiscountedAsMoney": {},
      "totalDiscountedAsText": "example",
      "totalDueAsMoney": {},
      "totalDueAsText": "example",
      "totalExcludedTaxAsMoney": {},
      "totalExcludedTaxAsText": "example",
      "totalIncludedTaxAsMoney": {},
      "totalIncludedTaxAsText": "example",
      "totalTaxAsMoney": {},
      "totalTaxAsText": "example"
    },
    "language": "example",
    "paymentProviderDetails": {
      "parameters": [],
      "supportedMethods": [],
      "url": "example"
    },
    "paymentType": "PAID_IN_FULL",
    "routeBookings": [],
    "seller": {
      "companyEmailIsDefault": false,
      "currencyCode": "example",
      "id": 1,
      "showAgentDetailsOnTicket": false,
      "showInvoiceIdOnTicket": false,
      "showPaymentsOnInvoice": false,
      "title": "example"
    },
    "status": "CART",
    "systemConfig": {
      "id": 1,
      "systemType": "example",
      "title": "example"
    },
    "totalDue": 1.0,
    "totalPaid": 1.0,
    "totalPrice": 1.0,
    "totalPriceConverted": 1.0,
    "vessel": {
      "affiliate": {},
      "flags": [],
      "id": 1,
      "stopovers": [],
      "title": "example"
    }
  }
}
```

### Get a customer

Get a customer's name, contact details and address.

**Inputs**

- Customer ID (`customer_id`, number, required): The customer in Bókun: the `customer.id` of a booking.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "address": "example",
    "city": "example",
    "country": "example",
    "dateOfBirth": "example",
    "email": "example",
    "firstName": "example",
    "id": 1,
    "language": "example",
    "lastName": "example",
    "nationality": "example",
    "organization": "example",
    "passportId": "example",
    "phoneNumber": "example",
    "postCode": "example",
    "sex": "example",
    "state": "example",
    "title": "example"
  }
}
```

### Get a promo code

Get a promo code with its discount and the dates and activities it's valid for.

**Inputs**

- Promo code (`promo_code_id`, number, required): The promo code in Bókun.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "bookingValidFrom": "example",
    "bookingValidTo": "example",
    "code": "example",
    "description": "example",
    "discountAmount": 1.0,
    "discountAmountCurrency": "example",
    "discountAmountPerPerson": false,
    "discountPercentage": 1.0,
    "discountPercentageAppliesToExtras": false,
    "discountPercentageAppliesToPickupAndDropoff": false,
    "id": 1,
    "maxUsages": 1,
    "travelValidDaysOfWeek": [],
    "travelValidFrom": "example",
    "travelValidMonths": [],
    "travelValidTo": "example",
    "validForAllProducts": false,
    "validForProducts": []
  }
}
```

### Get a vendor

Get a supplier or reseller you have a marketplace contract with. Needs the marketplace contract view permission.

**Inputs**

- Vendor ID (`vendor_id`, number, required): The vendor in Bókun, such as the `vendor.id` of an activity booking.

**Outputs**

- `data` (object): a lightweight representation of a vendor object, designed to be used for marketplace purposes. Contains details such as company address, code, VAT - things you'd need for issuing invoices.

**Example output**

```json
{
  "data": {
    "company": {
      "billingAddress": {
        "addressLine1": "example",
        "addressLine2": "example",
        "addressLine3": "example",
        "city": "example",
        "countryCode": "example",
        "googlePlaceId": "example",
        "id": 1,
        "latitude": 1.0,
        "longitude": 1.0,
        "postalCode": "example",
        "state": "example"
      },
      "id": 1,
      "name": "example",
      "registrationAddress": {
        "addressLine1": "example",
        "addressLine2": "example",
        "addressLine3": "example",
        "city": "example",
        "countryCode": "example",
        "googlePlaceId": "example",
        "id": 1,
        "latitude": 1.0,
        "longitude": 1.0,
        "postalCode": "example",
        "state": "example"
      },
      "registrationNumber": "example",
      "vatNumber": "example"
    },
    "description": "example",
    "facebookUrl": "example",
    "id": 1,
    "instagramUrl": "example",
    "linkedinUrl": "example",
    "timeZone": "example",
    "title": "example",
    "tripadvisorUrl": "example",
    "trustpilotUrl": "example",
    "twitterUrl": "example",
    "websiteUrl": "example"
  }
}
```

### Get an activity

Get an activity with its description, prices, start times, pick-up and booking settings.

**Inputs**

- Activity (`activity_id`, number, required): The activity (experience) in Bókun.
- Currency (`currency`, text): The currency to show prices in, as a three-letter code such as `USD` or `EUR`. Bókun uses ISK when this is empty.
- Language (`language`, text): The language to show the content in, as a two-letter code such as `EN` or `DE`. Bókun uses its default when this is empty.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "activityAttributes": [],
    "activityCategories": [],
    "activityType": "DAY_TOUR_OR_ACTIVITY",
    "actualId": 1,
    "actualVendor": {},
    "agendaItems": [],
    "allowCustomizedBookings": false,
    "attention": "example",
    "barcodeType": "QR_CODE",
    "baseLanguage": "example",
    "bookableExtras": [],
    "bookingCutoff": 1,
    "bookingCutoffDays": 1,
    "bookingCutoffHours": 1,
    "bookingCutoffMinutes": 1,
    "bookingCutoffWeeks": 1,
    "bookingQuestions": [],
    "bookingType": "PASS",
    "box": false,
    "boxedActivityId": 1,
    "boxedVendor": {},
    "cancellationPolicy": {},
    "capacityType": "FREE_SALE",
    "categories": [],
    "comboActivity": false,
    "comboParts": [],
    "creationDate": "example",
    "customDropoffAllowed": false,
    "customFields": [],
    "customPickupAllowed": false,
    "dayBasedAvailability": false,
    "dayOptions": [],
    "defaultOpeningHours": {},
    "defaultRateId": 1,
    "description": "example",
    "difficultyLevel": "VERY_EASY",
    "displaySettings": {},
    "dressCode": false,
    "dropoffFlags": [],
    "dropoffPlaceGroups": {},
    "dropoffService": false,
    "duration": 1,
    "durationDays": 1,
    "durationHours": 1,
    "durationMinutes": 1,
    "durationText": "example",
    "durationType": "MINUTES",
    "durationWeeks": 1,
    "excerpt": "example",
    "excluded": "example",
    "exclusions": [],
    "externalId": "example",
    "fixedPassExpiryDate": [],
    "flags": [],
    "googlePlace": {},
    "guidanceTypes": [],
    "hasBoxes": false,
    "hasOpeningHours": false,
    "id": 1,
    "included": "example",
    "inclusions": [],
    "inventoryLocal": false,
    "inventorySupportsAvailability": false,
    "inventorySupportsPricing": false,
    "keyPhoto": {},
    "keywords": [],
    "knowBeforeYouGoItems": [],
    "languages": [],
    "lastModified": "example",
    "lastPublished": "example",
    "locationCode": {},
    "mainContactFields": [],
    "meetingType": "MEET_ON_LOCATION",
    "minAge": 1,
    "nextDefaultPrice": 1.0,
    "nextDefaultPriceAsText": "example",
    "nextDefaultPriceMoney": {},
    "noPickupMsg": "example",
    "overrideBarcodeFormat": false,
    "passCapacity": 1,
    "passExpiryType": "NEVER",
    "passValidForDays": 1,
    "passengerFields": [],
    "passesAvailable": 1,
    "passportRequired": false,
    "paymentCurrencies": [],
    "photos": [],
    "pickupActivityId": 1,
    "pickupAllotment": false,
    "pickupAllotmentType": "NO_ALLOTMENT",
    "pickupFlags": [],
    "pickupMinutesBefore": 1,
    "pickupPlaceGroups": {},
    "pickupService": false,
    "pickupTimeByLocations": [],
    "pickupTimeLocationBased": false,
    "pluginId": "example",
    "pricingCategories": [],
    "privateActivity": false,
    "productCategory": "ACCOMMODATION",
    "productGroupId": 1,
    "published": false,
    "rates": [],
    "requestDeadline": 1,
    "requestDeadlineDays": 1,
    "requestDeadlineHours": 1,
    "requestDeadlineMinutes": 1,
    "requestDeadlineWeeks": 1,
    "requiredCustomerFields": [],
    "requirements": "example",
    "resourceSlots": [],
    "reviewCount": 1,
    "reviewRating": 1.0,
    "route": {},
    "scheduleType": "FIXED",
    "seasonalOpeningHours": [],
    "selectFromDayOptions": false,
    "showGlobalPickupMsg": false,
    "showNoPickupMsg": false,
    "slug": "example",
    "startPoints": [],
    "startTimes": [],
    "storedExternally": false,
    "supportedAccessibilityTypes": [],
    "tagGroups": [],
    "ticketComboComponents": [],
    "ticketMsg": "example",
    "ticketPerComboComponent": false,
    "ticketPerPerson": false,
    "timeZone": "example",
    "title": "example",
    "useComponentPickupAllotments": false,
    "useSameAsPickUpPlaces": false,
    "vendor": {},
    "videos": []
  }
}
```

### Get an activity booking

Get one activity booking: the activity, date, start time, travellers, pick-up and extras.

**Inputs**

- Activity booking (`activity_booking`, text, required): The activity booking's ID or its own confirmation code, such as `ABC-12345`.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "activity": {},
    "affiliateCommission": 1.0,
    "agent": {},
    "agentCommission": 1.0,
    "answers": [],
    "barcode": {},
    "bookedDropoffPricingType": "FREE",
    "bookedPickupPricingType": "FREE",
    "bookedPricingCategories": [],
    "bookingFields": [],
    "boxBooking": false,
    "boxProduct": {},
    "cancelNote": "example",
    "cancellationDate": 1,
    "cancelledBy": "example",
    "comboChildBookings": [],
    "comboParentBooking": {},
    "confirmationCode": "example",
    "customized": false,
    "date": 1,
    "discountAmount": 1.0,
    "discountPercentage": 1.0,
    "dropoff": false,
    "dropoffPlace": {},
    "dropoffPlaceDescription": "example",
    "extras": [],
    "flexible": false,
    "id": 1,
    "includedOnCustomerInvoice": false,
    "invoice": {},
    "linksToExternalProducts": [],
    "notes": [],
    "paidType": "PAID_IN_FULL",
    "parentBooking": {},
    "parentBookingId": 1,
    "pickup": false,
    "pickupPlace": {},
    "pickupPlaceDescription": "example",
    "pickupPlaceRoomNumber": "example",
    "pickupTime": "example",
    "priceWithDiscount": 1.0,
    "pricingCategoryBookings": [],
    "product": {},
    "productConfirmationCode": "example",
    "quantityByPricingCategory": {},
    "savedAmount": 1.0,
    "selectedFlexDayOption": "example",
    "seller": {},
    "sellerCommission": 1.0,
    "sellerContractFlags": [],
    "startTime": "example",
    "startTimeId": 1,
    "status": "CART",
    "supplier": {},
    "supplierContractFlags": [],
    "totalParticipants": 1,
    "totalPrice": 1.0
  }
}
```

### Get booking invoices

Get the invoices of a booking that your role in it lets you see.

**Inputs**

- Booking ID (`booking_id`, number, required): The booking's number in Bókun (its `id`, not its confirmation code). A booking search returns it.
- Invoice type (`invoice_type`, text): Which invoices to return. All of them when empty. One of: `ALL`, `AGENT`, `AFFILIATE`, `CUSTOMER`, `SELLER`. Default: `ALL`.
- Include earlier invoices (`include_historic`, true/false): Whether to include invoices replaced when the booking was changed or cancelled.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "activeAffiliateInvoice": {
      "currency": "example",
      "id": 1,
      "issued": 1,
      "issuerAffiliateId": 1,
      "issuerAgentId": 1,
      "issuerTimeZone": "example",
      "issuerVendorId": 1,
      "lineItems": [],
      "recipientTimeZone": "example",
      "recipientVendorId": 1,
      "total": "example"
    },
    "activeAgentInvoice": {
      "currency": "example",
      "id": 1,
      "issued": 1,
      "issuerTimeZone": "example",
      "issuerVendorId": 1,
      "lineItems": [],
      "recipientAgentId": 1,
      "recipientTimeZone": "example",
      "total": "example"
    },
    "activeCustomerInvoice": {
      "currency": "example",
      "customerId": 1,
      "fees": [],
      "id": 1,
      "issued": 1,
      "issuerTimeZone": "example",
      "issuerVendorId": 1,
      "lineItems": [],
      "promoCodeId": 1,
      "recipientTimeZone": "example",
      "total": "example"
    },
    "bookingId": 1,
    "historicAffiliateInvoices": [],
    "historicAgentInvoices": [],
    "historicCustomerInvoices": [],
    "sellerInvoices": {}
  }
}
```

### Get my company

Get your own company as Bókun lists it: its name, time zone, address and VAT details.

**Inputs**: None.

**Outputs**

- `data` (object): a lightweight representation of a vendor object, designed to be used for marketplace purposes. Contains details such as company address, code, VAT - things you'd need for issuing invoices.

**Example output**

```json
{
  "data": {
    "company": {
      "billingAddress": {
        "addressLine1": "example",
        "addressLine2": "example",
        "addressLine3": "example",
        "city": "example",
        "countryCode": "example",
        "googlePlaceId": "example",
        "id": 1,
        "latitude": 1.0,
        "longitude": 1.0,
        "postalCode": "example",
        "state": "example"
      },
      "id": 1,
      "name": "example",
      "registrationAddress": {
        "addressLine1": "example",
        "addressLine2": "example",
        "addressLine3": "example",
        "city": "example",
        "countryCode": "example",
        "googlePlaceId": "example",
        "id": 1,
        "latitude": 1.0,
        "longitude": 1.0,
        "postalCode": "example",
        "state": "example"
      },
      "registrationNumber": "example",
      "vatNumber": "example"
    },
    "description": "example",
    "facebookUrl": "example",
    "id": 1,
    "instagramUrl": "example",
    "linkedinUrl": "example",
    "timeZone": "example",
    "title": "example",
    "tripadvisorUrl": "example",
    "trustpilotUrl": "example",
    "twitterUrl": "example",
    "websiteUrl": "example"
  }
}
```

### List activity availability

List the departures of an activity between two dates, with open seats and prices.

**Inputs**

- Activity (`activity_id`, number, required): The activity (experience) in Bókun.
- Start date (`start_date`, date, required): The first day to check.
- End date (`end_date`, date, required): The last day to check.
- Include sold out (`include_sold_out`, true/false): Whether to include departures with no seats left.
- Currency (`currency`, text): The currency to show prices in, as a three-letter code such as `USD` or `EUR`. Bókun uses ISK when this is empty.
- Language (`language`, text): The language to show the content in, as a two-letter code such as `EN` or `DE`. Bókun uses its default when this is empty.

**Outputs**

- `data` (list): The response from Bókun.

**Example output**

```json
{
  "data": []
}
```

### List activity booking notes

List the notes on an activity booking.

**Inputs**

- Activity booking ID (`activity_booking_id`, number, required): The activity booking within a booking: the `id` of one of the booking's product bookings.

**Outputs**

- `data` (list): The response from Bókun.

**Example output**

```json
{
  "data": []
}
```

### List activity pick-up places

List the places an activity picks customers up from and drops them off at.

**Inputs**

- Activity (`activity_id`, number, required): The activity (experience) in Bókun.
- Currency (`currency`, text): The currency to show prices in, as a three-letter code such as `USD` or `EUR`. Bókun uses ISK when this is empty.
- Language (`language`, text): The language to show the content in, as a two-letter code such as `EN` or `DE`. Bókun uses its default when this is empty.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "dropoffPlaces": [],
    "pickupPlaces": []
  }
}
```

### List booking history

List the audit trail of a booking: who did what to it and when, newest first.

**Inputs**

- Booking ID (`booking_id`, number, required): The booking's number in Bókun (its `id`, not its confirmation code). A booking search returns it.

**Outputs**

- `data` (list): The response from Bókun.

**Example output**

```json
{
  "data": []
}
```

### List booking payments

List the customer payments and refunds made on a booking.

**Inputs**

- Booking ID (`booking_id`, number, required): The booking's number in Bókun (its `id`, not its confirmation code). A booking search returns it.

**Outputs**

- `data` (list): The response from Bókun.

**Example output**

```json
{
  "data": []
}
```

### List changed activities

List the activities changed between two times, with when each changed.

**Inputs**

- From (`from_time`, date and time, required): The start of the period to check.
- To (`to_time`, date and time): The end of the period. Now when empty.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "updatedProducts": []
  }
}
```

### List promo codes

List your promo codes, oldest first. Returns one page.

**Inputs**

- Page (`page_no`, number): The page to return, starting at 0. The first page when empty. At least 0.
- Page size (`page_size`, number): How many codes to return on each page, up to 100. 50 when empty. From 1 to 100.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "items": [],
    "pageNo": 1,
    "pageSize": 1,
    "totalCount": 1,
    "totalPageCount": 1
  }
}
```

### Mark arrival of an activity booking

Record that the customer of an activity booking arrived or didn't show up.

**Inputs**

- Activity booking confirmation code (`product_confirmation_code`, text, required): The confirmation code of the activity booking.
- Status (`status`, text, required): Whether the customer arrived or didn't show up. One of: `ARRIVED`, `NO_SHOW` (No show).

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "activity": {},
    "affiliateCommission": 1.0,
    "agent": {},
    "agentCommission": 1.0,
    "answers": [],
    "barcode": {},
    "bookedDropoffPricingType": "FREE",
    "bookedPickupPricingType": "FREE",
    "bookedPricingCategories": [],
    "bookingFields": [],
    "boxBooking": false,
    "boxProduct": {},
    "cancelNote": "example",
    "cancellationDate": 1,
    "cancelledBy": "example",
    "comboChildBookings": [],
    "comboParentBooking": {},
    "confirmationCode": "example",
    "customized": false,
    "date": 1,
    "discountAmount": 1.0,
    "discountPercentage": 1.0,
    "dropoff": false,
    "dropoffPlace": {},
    "dropoffPlaceDescription": "example",
    "extras": [],
    "flexible": false,
    "id": 1,
    "includedOnCustomerInvoice": false,
    "invoice": {},
    "linksToExternalProducts": [],
    "notes": [],
    "paidType": "PAID_IN_FULL",
    "parentBooking": {},
    "parentBookingId": 1,
    "pickup": false,
    "pickupPlace": {},
    "pickupPlaceDescription": "example",
    "pickupPlaceRoomNumber": "example",
    "pickupTime": "example",
    "priceWithDiscount": 1.0,
    "pricingCategoryBookings": [],
    "product": {},
    "productConfirmationCode": "example",
    "quantityByPricingCategory": {},
    "savedAmount": 1.0,
    "selectedFlexDayOption": "example",
    "seller": {},
    "sellerCommission": 1.0,
    "sellerContractFlags": [],
    "startTime": "example",
    "startTimeId": 1,
    "status": "CART",
    "supplier": {},
    "supplierContractFlags": [],
    "totalParticipants": 1,
    "totalPrice": 1.0
  }
}
```

### Search activities

Find the activities your booking channel sells, by text. Returns one page.

**Inputs**

- Text (`text`, text): Words to search for in the activity's title and description.
- Vendor ID (`vendor_id`, number): Only activities of this supplier.
- Currency (`currency`, text): The currency to show prices in, as a three-letter code such as `USD` or `EUR`. Bókun uses ISK when this is empty.
- Language (`language`, text): The language to show the content in, as a two-letter code such as `EN` or `DE`. Bókun uses its default when this is empty.
- Page (`page`, number): The page of results to return, starting at 1. At least 1.
- Page size (`page_size`, number): How many results to return on each page. Bókun returns 50 when this is empty. At least 1.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "items": [],
    "tookInMillis": 1,
    "totalHits": 1
  }
}
```

### Search activity bookings

Find the activity bookings within bookings, by activity, status, text or the dates they were made or start. Returns one page.

**Inputs**

- Text (`text`, text): Words to search for, such as a customer's name.
- Confirmation code (`confirmation_code`, text): A booking's confirmation code.
- Activities (`activity_ids`, list): Only bookings of these activities.
- Booking statuses (`booking_statuses`, list): Only activity bookings in these statuses. One or more of: `CART`, `REQUESTED`, `RESERVED`, `CONFIRMED`, `TIMEOUT`, `ABORTED`, `CANCELLED`, `ERROR`, `ARRIVED`, `NO_SHOW` (No show), `REJECTED`.
- Your role (`booking_role`, text): Only bookings where you are the supplier, or only those where you sold another company's activity. One of: `SUPPLIER`, `SELLER`.
- Created from (`created_from`, date and time): Only bookings made on or after this date and time.
- Created to (`created_to`, date and time): Only bookings made on or before this date and time.
- Starts from (`start_from`, date and time): Only bookings that start on or after this date and time.
- Starts to (`start_to`, date and time): Only bookings that start on or before this date and time.
- Page (`page`, number): The page of results to return, starting at 1. At least 1.
- Page size (`page_size`, number): How many results to return on each page. Bókun returns 50 when this is empty. At least 1.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "results": [],
    "tookInMillis": 1,
    "totalHits": 1
  }
}
```

### Search bookings

Find bookings by text, confirmation code, status or the dates they were made, changed, cancelled or start. Returns one page.

**Inputs**

- Text (`text`, text): Words to search for, such as a customer's name or email address.
- Confirmation code (`confirmation_code`, text): The booking's confirmation code, such as `ABC-T12345`.
- Booking statuses (`booking_statuses`, list): Only bookings in these statuses. One or more of: `CART`, `REQUESTED`, `RESERVED`, `CONFIRMED`, `TIMEOUT`, `ABORTED`, `CANCELLED`, `ERROR`, `ARRIVED`, `NO_SHOW` (No show), `REJECTED`.
- Created from (`created_from`, date and time): Only bookings made on or after this date and time.
- Created to (`created_to`, date and time): Only bookings made on or before this date and time.
- Starts from (`start_from`, date and time): Only bookings that start on or after this date and time.
- Starts to (`start_to`, date and time): Only bookings that start on or before this date and time.
- Changed from (`modified_from`, date and time): Only bookings last changed on or after this date and time.
- Changed to (`modified_to`, date and time): Only bookings last changed on or before this date and time.
- Cancelled from (`cancelled_from`, date and time): Only bookings cancelled on or after this date and time.
- Cancelled to (`cancelled_to`, date and time): Only bookings cancelled on or before this date and time.
- Changed after it was made (`modified_after_creation`, true/false): Only bookings that someone changed after they were made.
- Page (`page`, number): The page of results to return, starting at 1. At least 1.
- Page size (`page_size`, number): How many results to return on each page. Bókun returns 50 when this is empty. At least 1.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "items": [],
    "tookInMillis": 1,
    "totalHits": 1
  }
}
```

### Update a promo code

Change a promo code. Fields left empty keep their current values.

**Inputs**

- Promo code (`promo_code_id`, number, required): The promo code in Bókun.
- Code (`code`, text): The code customers enter at checkout, up to 32 characters. Bókun stores it in capitals.
- Description (`description`, text): A note about the code for your team, up to 140 characters.
- Discount percentage (`discount_percentage`, number): The percentage off, from 0 to 100. Give this or a discount amount, not both. From 0 to 100.
- Percentage applies to extras (`percentage_applies_to_extras`, true/false): Whether the percentage also comes off extras booked with the activity. Off when empty.
- Percentage applies to pick-up and drop-off (`percentage_applies_to_pickup_and_dropoff`, true/false): Whether the percentage also comes off pick-up and drop-off. Off when empty.
- Discount amount (`discount_amount`, number): A fixed amount off. Give this or a discount percentage, not both. At least 0.
- Discount amount currency (`discount_amount_currency`, text): The currency of the discount amount, as a three-letter code such as `EUR`. Needed with a discount amount.
- Discount amount per person (`discount_amount_per_person`, true/false): Whether the amount comes off once per traveller rather than once per booking. Off when empty.
- Bookable from (`booking_valid_from`, date): The first day bookings can use the code.
- Bookable until (`booking_valid_to`, date): The last day bookings can use the code.
- Travel from (`travel_valid_from`, date): The first day of travel the code applies to.
- Travel until (`travel_valid_to`, date): The last day of travel the code applies to.
- Travel days of the week (`travel_days_of_week`, list): The days of the week the code applies to. Every day when empty. One or more of: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`.
- Travel months (`travel_months`, list): The months the code applies to. Every month when empty. One or more of: `JANUARY`, `FEBRUARY`, `MARCH`, `APRIL`, `MAY`, `JUNE`, `JULY`, `AUGUST`, `SEPTEMBER`, `OCTOBER`, `NOVEMBER`, `DECEMBER`.
- Maximum uses (`max_usages`, number): How many times the code can be used in all. No limit when empty. At least 1.
- Valid for all activities (`valid_for_all_products`, true/false): Whether the code works for every activity. When off, choose the activities it works for.
- Activities (`valid_for_products`, list): The activities the code works for, when it isn't valid for all of them.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "bookingValidFrom": "example",
    "bookingValidTo": "example",
    "code": "example",
    "description": "example",
    "discountAmount": 1.0,
    "discountAmountCurrency": "example",
    "discountAmountPerPerson": false,
    "discountPercentage": 1.0,
    "discountPercentageAppliesToExtras": false,
    "discountPercentageAppliesToPickupAndDropoff": false,
    "id": 1,
    "maxUsages": 1,
    "travelValidDaysOfWeek": [],
    "travelValidFrom": "example",
    "travelValidMonths": [],
    "travelValidTo": "example",
    "validForAllProducts": false,
    "validForProducts": []
  }
}
```

### Update an activity booking note

Change the text of a note on an activity booking.

**Inputs**

- Activity booking ID (`activity_booking_id`, number, required): The activity booking within a booking: the `id` of one of the booking's product bookings.
- Note ID (`note_id`, number, required): The note on the activity booking.
- Text (`text`, text, required): The note, up to 255 characters.

**Outputs**

- `data` (object): The response from Bókun.

**Example output**

```json
{
  "data": {
    "id": 1,
    "owner_id": 1,
    "text": "example",
    "type": "GENERAL"
  }
}
```
