> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.duve.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.duve.com/_mcp/server.

# Reservation

POST https://sandbox.duve.com/api/v1/hooks/reservation/connect
Content-Type: application/json

Create or update an reservation in Duve

Reference: https://developers.duve.com/api-references/pms-api/pms/reservation/connect-reservation

## Request

### Body (application/json)

This endpoint expects an object.

- `accountId` (string, required) — The source id that you recieved in Your Duve account.
- `event` (enum, required)
  - Allowed values: `create`, `update`
- `entity` (enum, required)
  - Allowed values: `reservation`
- `resource` (ApiV1HooksReservationConnectPostRequestBodyContentApplicationJsonSchemaResource, required) — The entity payload body

## Response

### 200

Webhook received and processed successfully.

- `newReservations` (integer, optional) — Number of new reservations synced.
- `updatedReservations` (integer, optional) — Number of updated reservations synced.
- `skippedReservations` (integer, optional) — Number of reservations skipped during the sync.
- `summary` (string, optional) — Summary of the sync process.
- `reservationIds` (list of string, optional) — List of reservation IDs processed in the sync.

## Errors

### 400 Bad Request Error

Bad request or invalid webhook payload.

- `string`

### 401 Unauthorized Error

Unauthorized - invalid or missing authorization token.

- `string`

### 403 Forbidden Error

Forbidden - request is not allowed.

- `string`

### 500 Internal Server Error

Internal server error.

- `string`

## Types

### ApiV1HooksReservationConnectPostRequestBodyContentApplicationJsonSchemaResource

The entity payload body

- `id` (string, required) — your reservation system id
- `status` (string, required) — Can be any status string but must be CANCELLED for cancelled reservations
- `createdAt` (string, required) — The created date of the reservation in your system
- `primaryGuest` (ApiV1HooksReservationConnectPostRequestBodyContentApplicationJsonSchemaResourcePrimaryGuest, required) — The details of the primary guest of the reservation
- `unitReservations` (list of ApiV1HooksReservationConnectPostRequestBodyContentApplicationJsonSchemaResourceUnitReservationsItems, required) — Array of booked accommodation units
- `channelReservationId` (string, optional) — The channel reservation id of the OTA
- `channelName` (string, optional) — The name of the channel for the reservation
- `channelId` (integer, optional) — The id of the channel. for the full list please check OTA codes list under the appendix
- `channelId2` (integer, optional) — The 2nd id of the channel
- `marketSegment` (string, optional) — The name of the market segment
- `agent` (string, optional) — Name of the agent
- `membership` (string, optional) — Membership name
- `ratePlan` (string, optional) — The rate plan code name
- `cancellationPolicyCode` (string, optional) — Code for the cancellation policy
- `id2` (string, optional) — your second reservation system id
- `bookedAt` (string, optional) — The booking date of the reservation
- `updatedAt` (string, optional) — The last update date of the reservation

### ApiV1HooksReservationConnectPostRequestBodyContentApplicationJsonSchemaResourcePrimaryGuest

The details of the primary guest of the reservation

- `firstName` (string, required) — Guest first name
- `lastName` (string, optional) — Guest last name
- `email` (string, optional) — Guest email
- `phone` (string, optional) — Guest phone
- `language` (string, optional) — Guest preffered language
- `country` (string, optional) — Country code two digits ISO code

### ApiV1HooksReservationConnectPostRequestBodyContentApplicationJsonSchemaResourceUnitReservationsItems

- `id` (string, required) — your sub reservation system id
- `adults` (integer, required) — The number of adult guests
- `checkin` (string, required) — Check-in date in format of YYYY-MM-DD
- `checkout` (string, required) — Check-out date in format of YYYY-MM-DD
- `unitId` (string, required) — The reserved unit id in the reservation system
- `unitName` (string, required) — The assigned unit name
- `children` (integer, optional) — The number of children guests
- `babies` (integer, optional) — The number of babies guests
- `estimatedCheckInTime` (string, optional) — The guest estimated arrival time needs to be in format of HH:00 or HH:30 cannot be specific minutes
- `estimatedCheckOutTime` (string, optional) — The guest estimated departure time needs to be in format of HH:00 or HH:30 cannot be specific minutes
- `unitRoomTypeId` (string, optional) — The assigned unit room type id
- `unitRoomTypeCode` (string, optional) — The assigned unit room type code
- `unitRoomTypeName` (string, optional) — The assigned unit room type name
- `price` (double, optional) — The price of the unit reservation
- `paidAmount` (double, optional) — The amount already paid for the reservation
- `status` (string, optional) — The status of the unit reservation
- `currency` (string, optional) — Currency code of the price in ISO 4217
- `doorCode` (string, optional) — The door / keybox access code or instructions supports Markdown
- `buildingCode` (string, optional) — The building entrance access code or instructions supports Markdown
- `codeReleased` (boolean, optional) — true / false wheter to release the access code section in the guest app
- `comments` (string, optional) — General comment for the reservation
- `guestComments` (string, optional) — Guest comment from the OTA / PMS
- `checkInOutComments` (string, optional) — check in check out comments for the host
- `additionalFields` (list of ApiV1HooksReservationConnectPostRequestBodyContentApplicationJsonSchemaResourceUnitReservationsItemsAdditionalFieldsItems, optional) — Additional fields for the property (Rental)
- `guests` (list of ApiV1HooksReservationConnectPostRequestBodyContentApplicationJsonSchemaResourceUnitReservationsItemsGuestsItems, optional) — Array of guests for this unit reservation
- `additionalCharges` (list of ApiV1HooksReservationConnectPostRequestBodyContentApplicationJsonSchemaResourceUnitReservationsItemsAdditionalChargesItems, optional) — Array of additional charges information (title, amount, amountPerDay)

### ApiV1HooksReservationConnectPostRequestBodyContentApplicationJsonSchemaResourceUnitReservationsItemsAdditionalFieldsItems

- `fieldName` (string, required)
- `content` (string, required)

### ApiV1HooksReservationConnectPostRequestBodyContentApplicationJsonSchemaResourceUnitReservationsItemsGuestsItems

- `firstName` (string, required) — Guest first name
- `lastName` (string, optional, nullable) — Guest last name
- `country` (string, optional) — Country code two digits ISO code
- `language` (string, optional, nullable) — Guest language
- `email` (string, optional) — Guest email
- `phone` (string, optional) — Guest phone

### ApiV1HooksReservationConnectPostRequestBodyContentApplicationJsonSchemaResourceUnitReservationsItemsAdditionalChargesItems

- `title` (string, required) — The title of additional charge
- `amount` (double, required) — The amount of the additional charge (can be positive and negative)
- `amountPerDay` (boolean, optional) — A flag to know if the additional charge should be multiplied by the number of nights of the reservation

## Examples

**Request**

```json
{
  "accountId": "{{accountId}}",
  "event": "create",
  "entity": "reservation",
  "resource": {
    "id": "yourSystemReservationId",
    "status": "NEW",
    "createdAt": "2019-03-17T13:49:36Z",
    "primaryGuest": {
      "firstName": "string",
      "lastName": "Alex",
      "email": "alex@airbnb.com",
      "phone": "+33 3434343434",
      "language": "fr",
      "country": "FR"
    },
    "unitReservations": [
      {
        "id": "1154464678",
        "adults": 2,
        "checkin": "2019-05-10",
        "checkout": "2019-05-11",
        "unitId": "1212324232",
        "unitName": "Beautiful large - Two bed rooms - Kind",
        "children": 2,
        "babies": 0,
        "estimatedCheckInTime": "12:00",
        "estimatedCheckOutTime": "17:00",
        "unitRoomTypeId": "12345",
        "unitRoomTypeCode": "stg",
        "unitRoomTypeName": "Standard room",
        "price": 150,
        "paidAmount": 0,
        "status": "MODIFIED",
        "currency": "EUR",
        "doorCode": "",
        "buildingCode": "",
        "codeReleased": false,
        "comments": "This is a comment",
        "guestComments": "This is a guest comment",
        "checkInOutComments": "This is a check in check out comment",
        "additionalFields": [
          {
            "fieldName": "NEW FIELD",
            "content": "Today is Sunday, September 03"
          }
        ],
        "guests": [
          {
            "firstName": "Alex",
            "country": "FR",
            "email": "alex@airbnb.com",
            "phone": "+33 2323232323"
          },
          {
            "firstName": "Richard",
            "lastName": "Bom",
            "country": "US",
            "language": "en",
            "email": "richard@airbnb.com",
            "phone": {}
          }
        ]
      },
      {
        "id": "115555565",
        "adults": 2,
        "checkin": "2018-05-09",
        "checkout": "2018-05-11",
        "unitId": "123456",
        "unitName": "One double bed room - with sofa",
        "children": 1,
        "babies": 0,
        "unitRoomTypeId": "123456",
        "unitRoomTypeCode": "stg2",
        "unitRoomTypeName": "Standard room2",
        "price": 120,
        "paidAmount": 100,
        "status": "OPEN",
        "currency": "EUR",
        "guests": [
          {
            "firstName": "Jenny",
            "country": "PT",
            "email": "luara@duve.co",
            "phone": {}
          }
        ],
        "additionalCharges": [
          {
            "title": "Tax",
            "amount": 25,
            "amountPerDay": true
          },
          {
            "title": "Drinks",
            "amount": 40
          }
        ]
      },
      {
        "id": "1153333678",
        "adults": 0,
        "checkin": "2018-05-09",
        "checkout": "2018-05-11",
        "unitId": "123333",
        "unitName": "One double bed room - with sofa",
        "children": 0,
        "babies": 0,
        "price": 120,
        "status": "CANCELED",
        "currency": "EUR",
        "guests": []
      }
    ],
    "channelReservationId": "HTK9085122",
    "channelName": "bookingcom",
    "channelId": 7,
    "channelId2": 8,
    "marketSegment": "INT",
    "agent": "AgentName",
    "membership": "membershipName",
    "ratePlan": "ratePlanName",
    "id2": "yourSecondSystemReservationId",
    "bookedAt": "2019-03-17T13:49:36Z",
    "updatedAt": "2018-04-17T13:50:29Z"
  }
}
```

**Response**

```json
{
  "newReservations": 1,
  "updatedReservations": 0,
  "skippedReservations": 0,
  "summary": "WishboxConnect reservations sync completed, synced 0 skipped 0",
  "reservationIds": [
    "yourSystemReservationId-1154464678",
    "yourSystemReservationId-115555565",
    "yourSystemReservationId-1153333678"
  ]
}
```

**SDK Code**

```python
import requests

url = "https://sandbox.duve.com/api/v1/hooks/reservation/connect"

payload = {
    "accountId": "{{accountId}}",
    "event": "create",
    "entity": "reservation",
    "resource": {
        "id": "yourSystemReservationId",
        "status": "NEW",
        "createdAt": "2019-03-17T13:49:36Z",
        "primaryGuest": {
            "firstName": "string",
            "lastName": "Alex",
            "email": "alex@airbnb.com",
            "phone": "+33 3434343434",
            "language": "fr",
            "country": "FR"
        },
        "unitReservations": [
            {
                "id": "1154464678",
                "adults": 2,
                "checkin": "2019-05-10",
                "checkout": "2019-05-11",
                "unitId": "1212324232",
                "unitName": "Beautiful large - Two bed rooms - Kind",
                "children": 2,
                "babies": 0,
                "estimatedCheckInTime": "12:00",
                "estimatedCheckOutTime": "17:00",
                "unitRoomTypeId": "12345",
                "unitRoomTypeCode": "stg",
                "unitRoomTypeName": "Standard room",
                "price": 150,
                "paidAmount": 0,
                "status": "MODIFIED",
                "currency": "EUR",
                "doorCode": "",
                "buildingCode": "",
                "codeReleased": False,
                "comments": "This is a comment",
                "guestComments": "This is a guest comment",
                "checkInOutComments": "This is a check in check out comment",
                "additionalFields": [
                    {
                        "fieldName": "NEW FIELD",
                        "content": "Today is Sunday, September 03"
                    }
                ],
                "guests": [
                    {
                        "firstName": "Alex",
                        "country": "FR",
                        "email": "alex@airbnb.com",
                        "phone": "+33 2323232323"
                    },
                    {
                        "firstName": "Richard",
                        "lastName": "Bom",
                        "country": "US",
                        "language": "en",
                        "email": "richard@airbnb.com",
                        "phone": {}
                    }
                ]
            },
            {
                "id": "115555565",
                "adults": 2,
                "checkin": "2018-05-09",
                "checkout": "2018-05-11",
                "unitId": "123456",
                "unitName": "One double bed room - with sofa",
                "children": 1,
                "babies": 0,
                "unitRoomTypeId": "123456",
                "unitRoomTypeCode": "stg2",
                "unitRoomTypeName": "Standard room2",
                "price": 120,
                "paidAmount": 100,
                "status": "OPEN",
                "currency": "EUR",
                "guests": [
                    {
                        "firstName": "Jenny",
                        "country": "PT",
                        "email": "luara@duve.co",
                        "phone": {}
                    }
                ],
                "additionalCharges": [
                    {
                        "title": "Tax",
                        "amount": 25,
                        "amountPerDay": True
                    },
                    {
                        "title": "Drinks",
                        "amount": 40
                    }
                ]
            },
            {
                "id": "1153333678",
                "adults": 0,
                "checkin": "2018-05-09",
                "checkout": "2018-05-11",
                "unitId": "123333",
                "unitName": "One double bed room - with sofa",
                "children": 0,
                "babies": 0,
                "price": 120,
                "status": "CANCELED",
                "currency": "EUR",
                "guests": []
            }
        ],
        "channelReservationId": "HTK9085122",
        "channelName": "bookingcom",
        "channelId": 7,
        "channelId2": 8,
        "marketSegment": "INT",
        "agent": "AgentName",
        "membership": "membershipName",
        "ratePlan": "ratePlanName",
        "id2": "yourSecondSystemReservationId",
        "bookedAt": "2019-03-17T13:49:36Z",
        "updatedAt": "2018-04-17T13:50:29Z"
    }
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://sandbox.duve.com/api/v1/hooks/reservation/connect';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"accountId":"{{accountId}}","event":"create","entity":"reservation","resource":{"id":"yourSystemReservationId","status":"NEW","createdAt":"2019-03-17T13:49:36Z","primaryGuest":{"firstName":"string","lastName":"Alex","email":"alex@airbnb.com","phone":"+33 3434343434","language":"fr","country":"FR"},"unitReservations":[{"id":"1154464678","adults":2,"checkin":"2019-05-10","checkout":"2019-05-11","unitId":"1212324232","unitName":"Beautiful large - Two bed rooms - Kind","children":2,"babies":0,"estimatedCheckInTime":"12:00","estimatedCheckOutTime":"17:00","unitRoomTypeId":"12345","unitRoomTypeCode":"stg","unitRoomTypeName":"Standard room","price":150,"paidAmount":0,"status":"MODIFIED","currency":"EUR","doorCode":"","buildingCode":"","codeReleased":false,"comments":"This is a comment","guestComments":"This is a guest comment","checkInOutComments":"This is a check in check out comment","additionalFields":[{"fieldName":"NEW FIELD","content":"Today is Sunday, September 03"}],"guests":[{"firstName":"Alex","country":"FR","email":"alex@airbnb.com","phone":"+33 2323232323"},{"firstName":"Richard","lastName":"Bom","country":"US","language":"en","email":"richard@airbnb.com","phone":{}}]},{"id":"115555565","adults":2,"checkin":"2018-05-09","checkout":"2018-05-11","unitId":"123456","unitName":"One double bed room - with sofa","children":1,"babies":0,"unitRoomTypeId":"123456","unitRoomTypeCode":"stg2","unitRoomTypeName":"Standard room2","price":120,"paidAmount":100,"status":"OPEN","currency":"EUR","guests":[{"firstName":"Jenny","country":"PT","email":"luara@duve.co","phone":{}}],"additionalCharges":[{"title":"Tax","amount":25,"amountPerDay":true},{"title":"Drinks","amount":40}]},{"id":"1153333678","adults":0,"checkin":"2018-05-09","checkout":"2018-05-11","unitId":"123333","unitName":"One double bed room - with sofa","children":0,"babies":0,"price":120,"status":"CANCELED","currency":"EUR","guests":[]}],"channelReservationId":"HTK9085122","channelName":"bookingcom","channelId":7,"channelId2":8,"marketSegment":"INT","agent":"AgentName","membership":"membershipName","ratePlan":"ratePlanName","id2":"yourSecondSystemReservationId","bookedAt":"2019-03-17T13:49:36Z","updatedAt":"2018-04-17T13:50:29Z"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox.duve.com/api/v1/hooks/reservation/connect"

	payload := strings.NewReader("{\n  \"accountId\": \"{{accountId}}\",\n  \"event\": \"create\",\n  \"entity\": \"reservation\",\n  \"resource\": {\n    \"id\": \"yourSystemReservationId\",\n    \"status\": \"NEW\",\n    \"createdAt\": \"2019-03-17T13:49:36Z\",\n    \"primaryGuest\": {\n      \"firstName\": \"string\",\n      \"lastName\": \"Alex\",\n      \"email\": \"alex@airbnb.com\",\n      \"phone\": \"+33 3434343434\",\n      \"language\": \"fr\",\n      \"country\": \"FR\"\n    },\n    \"unitReservations\": [\n      {\n        \"id\": \"1154464678\",\n        \"adults\": 2,\n        \"checkin\": \"2019-05-10\",\n        \"checkout\": \"2019-05-11\",\n        \"unitId\": \"1212324232\",\n        \"unitName\": \"Beautiful large - Two bed rooms - Kind\",\n        \"children\": 2,\n        \"babies\": 0,\n        \"estimatedCheckInTime\": \"12:00\",\n        \"estimatedCheckOutTime\": \"17:00\",\n        \"unitRoomTypeId\": \"12345\",\n        \"unitRoomTypeCode\": \"stg\",\n        \"unitRoomTypeName\": \"Standard room\",\n        \"price\": 150,\n        \"paidAmount\": 0,\n        \"status\": \"MODIFIED\",\n        \"currency\": \"EUR\",\n        \"doorCode\": \"\",\n        \"buildingCode\": \"\",\n        \"codeReleased\": false,\n        \"comments\": \"This is a comment\",\n        \"guestComments\": \"This is a guest comment\",\n        \"checkInOutComments\": \"This is a check in check out comment\",\n        \"additionalFields\": [\n          {\n            \"fieldName\": \"NEW FIELD\",\n            \"content\": \"Today is Sunday, September 03\"\n          }\n        ],\n        \"guests\": [\n          {\n            \"firstName\": \"Alex\",\n            \"country\": \"FR\",\n            \"email\": \"alex@airbnb.com\",\n            \"phone\": \"+33 2323232323\"\n          },\n          {\n            \"firstName\": \"Richard\",\n            \"lastName\": \"Bom\",\n            \"country\": \"US\",\n            \"language\": \"en\",\n            \"email\": \"richard@airbnb.com\",\n            \"phone\": {}\n          }\n        ]\n      },\n      {\n        \"id\": \"115555565\",\n        \"adults\": 2,\n        \"checkin\": \"2018-05-09\",\n        \"checkout\": \"2018-05-11\",\n        \"unitId\": \"123456\",\n        \"unitName\": \"One double bed room - with sofa\",\n        \"children\": 1,\n        \"babies\": 0,\n        \"unitRoomTypeId\": \"123456\",\n        \"unitRoomTypeCode\": \"stg2\",\n        \"unitRoomTypeName\": \"Standard room2\",\n        \"price\": 120,\n        \"paidAmount\": 100,\n        \"status\": \"OPEN\",\n        \"currency\": \"EUR\",\n        \"guests\": [\n          {\n            \"firstName\": \"Jenny\",\n            \"country\": \"PT\",\n            \"email\": \"luara@duve.co\",\n            \"phone\": {}\n          }\n        ],\n        \"additionalCharges\": [\n          {\n            \"title\": \"Tax\",\n            \"amount\": 25,\n            \"amountPerDay\": true\n          },\n          {\n            \"title\": \"Drinks\",\n            \"amount\": 40\n          }\n        ]\n      },\n      {\n        \"id\": \"1153333678\",\n        \"adults\": 0,\n        \"checkin\": \"2018-05-09\",\n        \"checkout\": \"2018-05-11\",\n        \"unitId\": \"123333\",\n        \"unitName\": \"One double bed room - with sofa\",\n        \"children\": 0,\n        \"babies\": 0,\n        \"price\": 120,\n        \"status\": \"CANCELED\",\n        \"currency\": \"EUR\",\n        \"guests\": []\n      }\n    ],\n    \"channelReservationId\": \"HTK9085122\",\n    \"channelName\": \"bookingcom\",\n    \"channelId\": 7,\n    \"channelId2\": 8,\n    \"marketSegment\": \"INT\",\n    \"agent\": \"AgentName\",\n    \"membership\": \"membershipName\",\n    \"ratePlan\": \"ratePlanName\",\n    \"id2\": \"yourSecondSystemReservationId\",\n    \"bookedAt\": \"2019-03-17T13:49:36Z\",\n    \"updatedAt\": \"2018-04-17T13:50:29Z\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://sandbox.duve.com/api/v1/hooks/reservation/connect")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"accountId\": \"{{accountId}}\",\n  \"event\": \"create\",\n  \"entity\": \"reservation\",\n  \"resource\": {\n    \"id\": \"yourSystemReservationId\",\n    \"status\": \"NEW\",\n    \"createdAt\": \"2019-03-17T13:49:36Z\",\n    \"primaryGuest\": {\n      \"firstName\": \"string\",\n      \"lastName\": \"Alex\",\n      \"email\": \"alex@airbnb.com\",\n      \"phone\": \"+33 3434343434\",\n      \"language\": \"fr\",\n      \"country\": \"FR\"\n    },\n    \"unitReservations\": [\n      {\n        \"id\": \"1154464678\",\n        \"adults\": 2,\n        \"checkin\": \"2019-05-10\",\n        \"checkout\": \"2019-05-11\",\n        \"unitId\": \"1212324232\",\n        \"unitName\": \"Beautiful large - Two bed rooms - Kind\",\n        \"children\": 2,\n        \"babies\": 0,\n        \"estimatedCheckInTime\": \"12:00\",\n        \"estimatedCheckOutTime\": \"17:00\",\n        \"unitRoomTypeId\": \"12345\",\n        \"unitRoomTypeCode\": \"stg\",\n        \"unitRoomTypeName\": \"Standard room\",\n        \"price\": 150,\n        \"paidAmount\": 0,\n        \"status\": \"MODIFIED\",\n        \"currency\": \"EUR\",\n        \"doorCode\": \"\",\n        \"buildingCode\": \"\",\n        \"codeReleased\": false,\n        \"comments\": \"This is a comment\",\n        \"guestComments\": \"This is a guest comment\",\n        \"checkInOutComments\": \"This is a check in check out comment\",\n        \"additionalFields\": [\n          {\n            \"fieldName\": \"NEW FIELD\",\n            \"content\": \"Today is Sunday, September 03\"\n          }\n        ],\n        \"guests\": [\n          {\n            \"firstName\": \"Alex\",\n            \"country\": \"FR\",\n            \"email\": \"alex@airbnb.com\",\n            \"phone\": \"+33 2323232323\"\n          },\n          {\n            \"firstName\": \"Richard\",\n            \"lastName\": \"Bom\",\n            \"country\": \"US\",\n            \"language\": \"en\",\n            \"email\": \"richard@airbnb.com\",\n            \"phone\": {}\n          }\n        ]\n      },\n      {\n        \"id\": \"115555565\",\n        \"adults\": 2,\n        \"checkin\": \"2018-05-09\",\n        \"checkout\": \"2018-05-11\",\n        \"unitId\": \"123456\",\n        \"unitName\": \"One double bed room - with sofa\",\n        \"children\": 1,\n        \"babies\": 0,\n        \"unitRoomTypeId\": \"123456\",\n        \"unitRoomTypeCode\": \"stg2\",\n        \"unitRoomTypeName\": \"Standard room2\",\n        \"price\": 120,\n        \"paidAmount\": 100,\n        \"status\": \"OPEN\",\n        \"currency\": \"EUR\",\n        \"guests\": [\n          {\n            \"firstName\": \"Jenny\",\n            \"country\": \"PT\",\n            \"email\": \"luara@duve.co\",\n            \"phone\": {}\n          }\n        ],\n        \"additionalCharges\": [\n          {\n            \"title\": \"Tax\",\n            \"amount\": 25,\n            \"amountPerDay\": true\n          },\n          {\n            \"title\": \"Drinks\",\n            \"amount\": 40\n          }\n        ]\n      },\n      {\n        \"id\": \"1153333678\",\n        \"adults\": 0,\n        \"checkin\": \"2018-05-09\",\n        \"checkout\": \"2018-05-11\",\n        \"unitId\": \"123333\",\n        \"unitName\": \"One double bed room - with sofa\",\n        \"children\": 0,\n        \"babies\": 0,\n        \"price\": 120,\n        \"status\": \"CANCELED\",\n        \"currency\": \"EUR\",\n        \"guests\": []\n      }\n    ],\n    \"channelReservationId\": \"HTK9085122\",\n    \"channelName\": \"bookingcom\",\n    \"channelId\": 7,\n    \"channelId2\": 8,\n    \"marketSegment\": \"INT\",\n    \"agent\": \"AgentName\",\n    \"membership\": \"membershipName\",\n    \"ratePlan\": \"ratePlanName\",\n    \"id2\": \"yourSecondSystemReservationId\",\n    \"bookedAt\": \"2019-03-17T13:49:36Z\",\n    \"updatedAt\": \"2018-04-17T13:50:29Z\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://sandbox.duve.com/api/v1/hooks/reservation/connect")
  .header("Content-Type", "application/json")
  .body("{\n  \"accountId\": \"{{accountId}}\",\n  \"event\": \"create\",\n  \"entity\": \"reservation\",\n  \"resource\": {\n    \"id\": \"yourSystemReservationId\",\n    \"status\": \"NEW\",\n    \"createdAt\": \"2019-03-17T13:49:36Z\",\n    \"primaryGuest\": {\n      \"firstName\": \"string\",\n      \"lastName\": \"Alex\",\n      \"email\": \"alex@airbnb.com\",\n      \"phone\": \"+33 3434343434\",\n      \"language\": \"fr\",\n      \"country\": \"FR\"\n    },\n    \"unitReservations\": [\n      {\n        \"id\": \"1154464678\",\n        \"adults\": 2,\n        \"checkin\": \"2019-05-10\",\n        \"checkout\": \"2019-05-11\",\n        \"unitId\": \"1212324232\",\n        \"unitName\": \"Beautiful large - Two bed rooms - Kind\",\n        \"children\": 2,\n        \"babies\": 0,\n        \"estimatedCheckInTime\": \"12:00\",\n        \"estimatedCheckOutTime\": \"17:00\",\n        \"unitRoomTypeId\": \"12345\",\n        \"unitRoomTypeCode\": \"stg\",\n        \"unitRoomTypeName\": \"Standard room\",\n        \"price\": 150,\n        \"paidAmount\": 0,\n        \"status\": \"MODIFIED\",\n        \"currency\": \"EUR\",\n        \"doorCode\": \"\",\n        \"buildingCode\": \"\",\n        \"codeReleased\": false,\n        \"comments\": \"This is a comment\",\n        \"guestComments\": \"This is a guest comment\",\n        \"checkInOutComments\": \"This is a check in check out comment\",\n        \"additionalFields\": [\n          {\n            \"fieldName\": \"NEW FIELD\",\n            \"content\": \"Today is Sunday, September 03\"\n          }\n        ],\n        \"guests\": [\n          {\n            \"firstName\": \"Alex\",\n            \"country\": \"FR\",\n            \"email\": \"alex@airbnb.com\",\n            \"phone\": \"+33 2323232323\"\n          },\n          {\n            \"firstName\": \"Richard\",\n            \"lastName\": \"Bom\",\n            \"country\": \"US\",\n            \"language\": \"en\",\n            \"email\": \"richard@airbnb.com\",\n            \"phone\": {}\n          }\n        ]\n      },\n      {\n        \"id\": \"115555565\",\n        \"adults\": 2,\n        \"checkin\": \"2018-05-09\",\n        \"checkout\": \"2018-05-11\",\n        \"unitId\": \"123456\",\n        \"unitName\": \"One double bed room - with sofa\",\n        \"children\": 1,\n        \"babies\": 0,\n        \"unitRoomTypeId\": \"123456\",\n        \"unitRoomTypeCode\": \"stg2\",\n        \"unitRoomTypeName\": \"Standard room2\",\n        \"price\": 120,\n        \"paidAmount\": 100,\n        \"status\": \"OPEN\",\n        \"currency\": \"EUR\",\n        \"guests\": [\n          {\n            \"firstName\": \"Jenny\",\n            \"country\": \"PT\",\n            \"email\": \"luara@duve.co\",\n            \"phone\": {}\n          }\n        ],\n        \"additionalCharges\": [\n          {\n            \"title\": \"Tax\",\n            \"amount\": 25,\n            \"amountPerDay\": true\n          },\n          {\n            \"title\": \"Drinks\",\n            \"amount\": 40\n          }\n        ]\n      },\n      {\n        \"id\": \"1153333678\",\n        \"adults\": 0,\n        \"checkin\": \"2018-05-09\",\n        \"checkout\": \"2018-05-11\",\n        \"unitId\": \"123333\",\n        \"unitName\": \"One double bed room - with sofa\",\n        \"children\": 0,\n        \"babies\": 0,\n        \"price\": 120,\n        \"status\": \"CANCELED\",\n        \"currency\": \"EUR\",\n        \"guests\": []\n      }\n    ],\n    \"channelReservationId\": \"HTK9085122\",\n    \"channelName\": \"bookingcom\",\n    \"channelId\": 7,\n    \"channelId2\": 8,\n    \"marketSegment\": \"INT\",\n    \"agent\": \"AgentName\",\n    \"membership\": \"membershipName\",\n    \"ratePlan\": \"ratePlanName\",\n    \"id2\": \"yourSecondSystemReservationId\",\n    \"bookedAt\": \"2019-03-17T13:49:36Z\",\n    \"updatedAt\": \"2018-04-17T13:50:29Z\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox.duve.com/api/v1/hooks/reservation/connect', [
  'body' => '{
  "accountId": "{{accountId}}",
  "event": "create",
  "entity": "reservation",
  "resource": {
    "id": "yourSystemReservationId",
    "status": "NEW",
    "createdAt": "2019-03-17T13:49:36Z",
    "primaryGuest": {
      "firstName": "string",
      "lastName": "Alex",
      "email": "alex@airbnb.com",
      "phone": "+33 3434343434",
      "language": "fr",
      "country": "FR"
    },
    "unitReservations": [
      {
        "id": "1154464678",
        "adults": 2,
        "checkin": "2019-05-10",
        "checkout": "2019-05-11",
        "unitId": "1212324232",
        "unitName": "Beautiful large - Two bed rooms - Kind",
        "children": 2,
        "babies": 0,
        "estimatedCheckInTime": "12:00",
        "estimatedCheckOutTime": "17:00",
        "unitRoomTypeId": "12345",
        "unitRoomTypeCode": "stg",
        "unitRoomTypeName": "Standard room",
        "price": 150,
        "paidAmount": 0,
        "status": "MODIFIED",
        "currency": "EUR",
        "doorCode": "",
        "buildingCode": "",
        "codeReleased": false,
        "comments": "This is a comment",
        "guestComments": "This is a guest comment",
        "checkInOutComments": "This is a check in check out comment",
        "additionalFields": [
          {
            "fieldName": "NEW FIELD",
            "content": "Today is Sunday, September 03"
          }
        ],
        "guests": [
          {
            "firstName": "Alex",
            "country": "FR",
            "email": "alex@airbnb.com",
            "phone": "+33 2323232323"
          },
          {
            "firstName": "Richard",
            "lastName": "Bom",
            "country": "US",
            "language": "en",
            "email": "richard@airbnb.com",
            "phone": {}
          }
        ]
      },
      {
        "id": "115555565",
        "adults": 2,
        "checkin": "2018-05-09",
        "checkout": "2018-05-11",
        "unitId": "123456",
        "unitName": "One double bed room - with sofa",
        "children": 1,
        "babies": 0,
        "unitRoomTypeId": "123456",
        "unitRoomTypeCode": "stg2",
        "unitRoomTypeName": "Standard room2",
        "price": 120,
        "paidAmount": 100,
        "status": "OPEN",
        "currency": "EUR",
        "guests": [
          {
            "firstName": "Jenny",
            "country": "PT",
            "email": "luara@duve.co",
            "phone": {}
          }
        ],
        "additionalCharges": [
          {
            "title": "Tax",
            "amount": 25,
            "amountPerDay": true
          },
          {
            "title": "Drinks",
            "amount": 40
          }
        ]
      },
      {
        "id": "1153333678",
        "adults": 0,
        "checkin": "2018-05-09",
        "checkout": "2018-05-11",
        "unitId": "123333",
        "unitName": "One double bed room - with sofa",
        "children": 0,
        "babies": 0,
        "price": 120,
        "status": "CANCELED",
        "currency": "EUR",
        "guests": []
      }
    ],
    "channelReservationId": "HTK9085122",
    "channelName": "bookingcom",
    "channelId": 7,
    "channelId2": 8,
    "marketSegment": "INT",
    "agent": "AgentName",
    "membership": "membershipName",
    "ratePlan": "ratePlanName",
    "id2": "yourSecondSystemReservationId",
    "bookedAt": "2019-03-17T13:49:36Z",
    "updatedAt": "2018-04-17T13:50:29Z"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://sandbox.duve.com/api/v1/hooks/reservation/connect");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"accountId\": \"{{accountId}}\",\n  \"event\": \"create\",\n  \"entity\": \"reservation\",\n  \"resource\": {\n    \"id\": \"yourSystemReservationId\",\n    \"status\": \"NEW\",\n    \"createdAt\": \"2019-03-17T13:49:36Z\",\n    \"primaryGuest\": {\n      \"firstName\": \"string\",\n      \"lastName\": \"Alex\",\n      \"email\": \"alex@airbnb.com\",\n      \"phone\": \"+33 3434343434\",\n      \"language\": \"fr\",\n      \"country\": \"FR\"\n    },\n    \"unitReservations\": [\n      {\n        \"id\": \"1154464678\",\n        \"adults\": 2,\n        \"checkin\": \"2019-05-10\",\n        \"checkout\": \"2019-05-11\",\n        \"unitId\": \"1212324232\",\n        \"unitName\": \"Beautiful large - Two bed rooms - Kind\",\n        \"children\": 2,\n        \"babies\": 0,\n        \"estimatedCheckInTime\": \"12:00\",\n        \"estimatedCheckOutTime\": \"17:00\",\n        \"unitRoomTypeId\": \"12345\",\n        \"unitRoomTypeCode\": \"stg\",\n        \"unitRoomTypeName\": \"Standard room\",\n        \"price\": 150,\n        \"paidAmount\": 0,\n        \"status\": \"MODIFIED\",\n        \"currency\": \"EUR\",\n        \"doorCode\": \"\",\n        \"buildingCode\": \"\",\n        \"codeReleased\": false,\n        \"comments\": \"This is a comment\",\n        \"guestComments\": \"This is a guest comment\",\n        \"checkInOutComments\": \"This is a check in check out comment\",\n        \"additionalFields\": [\n          {\n            \"fieldName\": \"NEW FIELD\",\n            \"content\": \"Today is Sunday, September 03\"\n          }\n        ],\n        \"guests\": [\n          {\n            \"firstName\": \"Alex\",\n            \"country\": \"FR\",\n            \"email\": \"alex@airbnb.com\",\n            \"phone\": \"+33 2323232323\"\n          },\n          {\n            \"firstName\": \"Richard\",\n            \"lastName\": \"Bom\",\n            \"country\": \"US\",\n            \"language\": \"en\",\n            \"email\": \"richard@airbnb.com\",\n            \"phone\": {}\n          }\n        ]\n      },\n      {\n        \"id\": \"115555565\",\n        \"adults\": 2,\n        \"checkin\": \"2018-05-09\",\n        \"checkout\": \"2018-05-11\",\n        \"unitId\": \"123456\",\n        \"unitName\": \"One double bed room - with sofa\",\n        \"children\": 1,\n        \"babies\": 0,\n        \"unitRoomTypeId\": \"123456\",\n        \"unitRoomTypeCode\": \"stg2\",\n        \"unitRoomTypeName\": \"Standard room2\",\n        \"price\": 120,\n        \"paidAmount\": 100,\n        \"status\": \"OPEN\",\n        \"currency\": \"EUR\",\n        \"guests\": [\n          {\n            \"firstName\": \"Jenny\",\n            \"country\": \"PT\",\n            \"email\": \"luara@duve.co\",\n            \"phone\": {}\n          }\n        ],\n        \"additionalCharges\": [\n          {\n            \"title\": \"Tax\",\n            \"amount\": 25,\n            \"amountPerDay\": true\n          },\n          {\n            \"title\": \"Drinks\",\n            \"amount\": 40\n          }\n        ]\n      },\n      {\n        \"id\": \"1153333678\",\n        \"adults\": 0,\n        \"checkin\": \"2018-05-09\",\n        \"checkout\": \"2018-05-11\",\n        \"unitId\": \"123333\",\n        \"unitName\": \"One double bed room - with sofa\",\n        \"children\": 0,\n        \"babies\": 0,\n        \"price\": 120,\n        \"status\": \"CANCELED\",\n        \"currency\": \"EUR\",\n        \"guests\": []\n      }\n    ],\n    \"channelReservationId\": \"HTK9085122\",\n    \"channelName\": \"bookingcom\",\n    \"channelId\": 7,\n    \"channelId2\": 8,\n    \"marketSegment\": \"INT\",\n    \"agent\": \"AgentName\",\n    \"membership\": \"membershipName\",\n    \"ratePlan\": \"ratePlanName\",\n    \"id2\": \"yourSecondSystemReservationId\",\n    \"bookedAt\": \"2019-03-17T13:49:36Z\",\n    \"updatedAt\": \"2018-04-17T13:50:29Z\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "accountId": "{{accountId}}",
  "event": "create",
  "entity": "reservation",
  "resource": [
    "id": "yourSystemReservationId",
    "status": "NEW",
    "createdAt": "2019-03-17T13:49:36Z",
    "primaryGuest": [
      "firstName": "string",
      "lastName": "Alex",
      "email": "alex@airbnb.com",
      "phone": "+33 3434343434",
      "language": "fr",
      "country": "FR"
    ],
    "unitReservations": [
      [
        "id": "1154464678",
        "adults": 2,
        "checkin": "2019-05-10",
        "checkout": "2019-05-11",
        "unitId": "1212324232",
        "unitName": "Beautiful large - Two bed rooms - Kind",
        "children": 2,
        "babies": 0,
        "estimatedCheckInTime": "12:00",
        "estimatedCheckOutTime": "17:00",
        "unitRoomTypeId": "12345",
        "unitRoomTypeCode": "stg",
        "unitRoomTypeName": "Standard room",
        "price": 150,
        "paidAmount": 0,
        "status": "MODIFIED",
        "currency": "EUR",
        "doorCode": "",
        "buildingCode": "",
        "codeReleased": false,
        "comments": "This is a comment",
        "guestComments": "This is a guest comment",
        "checkInOutComments": "This is a check in check out comment",
        "additionalFields": [
          [
            "fieldName": "NEW FIELD",
            "content": "Today is Sunday, September 03"
          ]
        ],
        "guests": [
          [
            "firstName": "Alex",
            "country": "FR",
            "email": "alex@airbnb.com",
            "phone": "+33 2323232323"
          ],
          [
            "firstName": "Richard",
            "lastName": "Bom",
            "country": "US",
            "language": "en",
            "email": "richard@airbnb.com",
            "phone": []
          ]
        ]
      ],
      [
        "id": "115555565",
        "adults": 2,
        "checkin": "2018-05-09",
        "checkout": "2018-05-11",
        "unitId": "123456",
        "unitName": "One double bed room - with sofa",
        "children": 1,
        "babies": 0,
        "unitRoomTypeId": "123456",
        "unitRoomTypeCode": "stg2",
        "unitRoomTypeName": "Standard room2",
        "price": 120,
        "paidAmount": 100,
        "status": "OPEN",
        "currency": "EUR",
        "guests": [
          [
            "firstName": "Jenny",
            "country": "PT",
            "email": "luara@duve.co",
            "phone": []
          ]
        ],
        "additionalCharges": [
          [
            "title": "Tax",
            "amount": 25,
            "amountPerDay": true
          ],
          [
            "title": "Drinks",
            "amount": 40
          ]
        ]
      ],
      [
        "id": "1153333678",
        "adults": 0,
        "checkin": "2018-05-09",
        "checkout": "2018-05-11",
        "unitId": "123333",
        "unitName": "One double bed room - with sofa",
        "children": 0,
        "babies": 0,
        "price": 120,
        "status": "CANCELED",
        "currency": "EUR",
        "guests": []
      ]
    ],
    "channelReservationId": "HTK9085122",
    "channelName": "bookingcom",
    "channelId": 7,
    "channelId2": 8,
    "marketSegment": "INT",
    "agent": "AgentName",
    "membership": "membershipName",
    "ratePlan": "ratePlanName",
    "id2": "yourSecondSystemReservationId",
    "bookedAt": "2019-03-17T13:49:36Z",
    "updatedAt": "2018-04-17T13:50:29Z"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox.duve.com/api/v1/hooks/reservation/connect")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```