Creates a new unavailability

Request Information

URI Parameters :

None.

Body Parameters :

user_unavailability
NameDescriptionTypeAdditional information
id

Primary Key

globally unique identifier
date_start

Date+Time of the beginning

date

Required

date_end

Date+Time of the end

date

Required

modified_dateutc

Date+Time of the modified

date

Required

description

Description of the unavailability

string

Max length: 255

is_approved

Indicate if this object has been approved using a User Week Approval

boolean
user_id

User owner of this unavailability

globally unique identifier

Optionally required : user_id, user_code or user must be provided

user_code

Embedded entity "user" using ERP PK when adding/updating user_unavailability

string

Optionally required : user_id, user_code or user must be provided

user

Embedded entity "user" using node when adding/updating user_unavailability

user

Optionally required : user_id, user_code or user must be provided

user_unavailability_type_id

Type of the unavailability, cf model user_unavailability_type

globally unique identifier

Required

Optionally required : user_unavailability_type_id, user_unavailability_type_code or user_unavailability_type must be provided

user_unavailability_type_code

Embedded entity "user_unavailability_type" using ERP PK when adding/updating user_unavailability

string

Optionally required : user_unavailability_type_id, user_unavailability_type_code or user_unavailability_type must be provided

user_unavailability_type

Embedded entity "user_unavailability_type" using node when adding/updating user_unavailability

user_unavailability_type

Optionally required : user_unavailability_type_id, user_unavailability_type_code or user_unavailability_type must be provided

Request Formats :

application/json, text/json

Sample:
{
  "id": "e7c28a16-fcef-4015-ada6-d0ef8419bd52",
  "date_start": "2026-04-21T10:05:00.7045425+00:00",
  "date_end": "2026-04-21T10:05:00.7045425+00:00",
  "modified_dateutc": "2026-04-21T10:05:00.7045425+00:00",
  "description": "sample string 5",
  "is_approved": true,
  "user_id": "135d5e6e-cce8-47ae-aaae-fa27f788c549",
  "user_code": "sample string 8",
  "user": {
    "id": "95f0c759-b83d-4052-b018-02ba7165238e",
    "db_language_id": "c0e64a17-cbe3-4997-8285-f07dedd6430d",
    "username": "sample string 3",
    "firstname": "sample string 4",
    "lastname": "sample string 5",
    "code": "sample string 6",
    "archived": true,
    "disabled": true,
    "emergency_contact": "sample string 9",
    "bankaccount": "sample string 10",
    "social_security": "sample string 11",
    "place_of_birth": "sample string 12",
    "nationality": "sample string 13",
    "functions": "sample string 14",
    "birthdate": "2026-04-21T10:05:00.7045425+00:00",
    "skype": "sample string 16",
    "notes": "sample string 17",
    "sales_organization_id": "9c9231c8-f30b-479a-8896-8e49de8a1506",
    "sales_organization": {
      "id": "d6f8dfd2-8044-4efc-a04f-dab620240228",
      "code": "sample string 2",
      "name": "sample string 3",
      "description": "sample string 4",
      "db_country_id": "1d4bebf1-d9fa-4e44-8c29-0ba2b27fd912",
      "db_currency_id": "26941eec-587d-49b3-852f-aea978a7321b",
      "db_language_id": "d467fee4-26d9-4cca-86ff-29406bc5f988",
      "accountancy_code": "sample string 8",
      "archived": true,
      "default_unit_of_measure_system_type": "sample string 10",
      "street": "sample string 11",
      "street2": "sample string 12",
      "street_number": "sample string 13",
      "zip": "sample string 14",
      "city": "sample string 15",
      "email": "sample string 16",
      "phone": "sample string 17",
      "fax": "sample string 18",
      "url": "sample string 19",
      "vat_reg_code": "sample string 20",
      "modified_dateutc": "2026-04-21T10:05:00.7045425+00:00"
    },
    "sales_organization_code": "sample string 19",
    "is_team_leader": true,
    "team_leader_user_id": "ea05afe9-137c-4b8c-9093-cfb83403983c",
    "email": "sample string 22",
    "phone": "sample string 23",
    "fax": "sample string 24",
    "mobile": "sample string 25",
    "private_email": "sample string 26",
    "private_phone": "sample string 27",
    "private_fax": "sample string 28",
    "private_mobile": "sample string 29",
    "private_street": "sample string 30",
    "private_street_number": "sample string 31",
    "private_city": "sample string 32",
    "private_zip": "sample string 33",
    "private_db_country_id": "ab2992ad-3d32-4dc9-9e9d-62c4118caa4c",
    "private_db_country_code": "sample string 35",
    "modified_dateutc": "2026-04-21T10:05:00.7045425+00:00",
    "allow_hero_app": true,
    "allow_sales_app": true,
    "allow_service_app": true,
    "user_group_id": "fc64d61c-569b-40fa-89dd-1cd86dbb6d97"
  },
  "user_unavailability_type_id": "83a05ddf-1099-45ef-90c4-3ddf89a3c944",
  "user_unavailability_type_code": "sample string 10",
  "user_unavailability_type": {
    "id": "3774dae4-a616-4922-8972-a1b41d3dc262",
    "code": "sample string 2",
    "name": "sample string 3",
    "description": "sample string 4",
    "sales_organization_id": "b38a573f-e98f-4bb2-98ba-be5f3a0f1298",
    "sales_organization_code": "sample string 6",
    "sales_organization": {
      "id": "d6f8dfd2-8044-4efc-a04f-dab620240228",
      "code": "sample string 2",
      "name": "sample string 3",
      "description": "sample string 4",
      "db_country_id": "1d4bebf1-d9fa-4e44-8c29-0ba2b27fd912",
      "db_currency_id": "26941eec-587d-49b3-852f-aea978a7321b",
      "db_language_id": "d467fee4-26d9-4cca-86ff-29406bc5f988",
      "accountancy_code": "sample string 8",
      "archived": true,
      "default_unit_of_measure_system_type": "sample string 10",
      "street": "sample string 11",
      "street2": "sample string 12",
      "street_number": "sample string 13",
      "zip": "sample string 14",
      "city": "sample string 15",
      "email": "sample string 16",
      "phone": "sample string 17",
      "fax": "sample string 18",
      "url": "sample string 19",
      "vat_reg_code": "sample string 20",
      "modified_dateutc": "2026-04-21T10:05:00.7045425+00:00"
    },
    "modified_dateutc": "2026-04-21T10:05:00.7045425+00:00"
  }
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.