Create Booking

Creates a new booking in the system.

Endpoint

POST /bookings

Authentication

Required: Authorization header with valid token

Request Body

{
  "startDate": "2024-01-01T08:00:00Z",
  "endDate": "2024-01-10T17:00:00Z",
  "entityId": "uuid",
  "productId": "uuid",
  "status": "RESERVED",
  "changePrice": true,
  "normalUsage": 10,
  "normalPrice": 100.00,
  "exceptionalUsagePrice": 150.00,
  "periodType": "CALENDAR_DAYS",
  "normalUsageType": "DAY",
  "externalId": "external-booking-123",
  "contractId": "uuid",
  "pickUpAddress": "123 Warehouse St, City",
  "deliveryAddress": "456 Construction Site, City",
  "selfPickUp": false,
  "quantity": 5.5,
  "attachedProducts": [
    {
      "productId": "uuid",
      "periodType": "CALENDAR_DAYS",
      "quantity": 2.0,
      "price": 50.00,
      "changePrice": true
    }
  ]
}

Required Fields

  • startDate - Booking start date (ISO 8601 format)
  • endDate - Booking end date (ISO 8601 format)
  • entityId - Unique identifier for the entity (Equipment or Person)
  • productId - Unique identifier for the product
  • contractId - UUID of the associated contract

Fields descriptions see here

Response

BookingEntity Schema

Error

Error Schema

Example Usage

Create booking

curl -X POST "https://integration-api.ram.syniotec.com/master-data/v1/booking-management/bookings" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "startDate": "2024-01-01T08:00:00Z",
    "endDate": "2024-01-10T17:00:00Z",
    "entityId": "70d7f2cc-bea8-4e6d-85ec-c2c14295690f",
    "productId" "5e9b44f7-b960-4ce2-b493-f666fe606b79",
    "status": "RESERVRD",
    "normalUsage": 10,
    "normalPrice": 100.00,
    "exceptionalUsagePrice": 150.00,
    "periodType": "WORKING_DAYS",
    "normalUsageType": "DAY",
    "contractId": "123e4567-e89b-12d3-a456-426614174000",
    "pickUpAddres": "123 Warehouse St, City",
    "deliveryAddress": "456 Construction Site, City",
    "selfPickUp": false
  }'