Customer

The Customer service allows you to add a new customer to your user account and retrieve all customers that are linked to your user account. You need to have at least one customer linked to your account to be able to work with the other APIs.

POST /customer

The POST on customer allows you to add a new customer to your account. This requires a two-factor authentication. The customer first needs to enable the Clientapi registration in their account under https://www.traum-ferienwohnungen.de/vermieterbereich/meine_daten.htm .

Fields

Field Type Description Required
customer_id The ID of the customer whose Listings you want to work with. The customer can tell you this ID. YES

Request

Headers

Header Value
Accept
application/vnd.account.v2+json
application/hal+json
application/json
Content-Type
application/vnd.account.v2+json
application/json
Authorization HTTP Basic, HTTP Digest, or OAuth2 Bearer token (check API provider for details)

Body

{
   "customer_id": "The ID of the customer whose Listings you want to work with. The customer can tell you this ID."
}

Response

Status Codes

  • 406: Not Acceptable
  • 415: Unsupported Media Type
  • 201: Created
  • 400: Client Error
  • 422: Unprocessable Entity
  • 401: Unauthorized
  • 403: Forbidden

Headers

Header Value
Content-Type
application/vnd.account.v2+json
application/hal+json
application/json
Allow Comma-separated list of all HTTP methods allowed

Body

{
   "_links": {
       "self": {
           "href": "/customer[/:customer_id]"
       }
   }
   "customer_id": "The ID of the customer whose Listings you want to work with. The customer can tell you this ID."
}

GET /customer

The GET on customer allows you to retrieve all customers currently linked to your user account.

Fields

Field Type Description Required
customer_id The ID of the customer whose Listings you want to work with. The customer can tell you this ID. YES

Request

Headers

Header Value
Accept
application/vnd.account.v2+json
application/hal+json
application/json
Authorization HTTP Basic, HTTP Digest, or OAuth2 Bearer token (check API provider for details)

Response

Status Codes

  • 406: Not Acceptable
  • 415: Unsupported Media Type
  • 200: OK
  • 401: Unauthorized
  • 403: Forbidden

Headers

Header Value
Content-Type
application/vnd.account.v2+json
application/hal+json
application/json
Allow Comma-separated list of all HTTP methods allowed

Body

{
   "_links": {
       "self": {
           "href": "/customer"
       },
       "first": {
           "href": "/customer?page={page}"
       },
       "prev": {
           "href": "/customer?page={page}"
       },
       "next": {
           "href": "/customer?page={page}"
       },
       "last": {
           "href": "/customer?page={page}"
       }
   }
   "_embedded": {
       "customer": [
           {
               "_links": {
                   "self": {
                       "href": "/customer[/:customer_id]"
                   }
               }
              "customer_id": "The ID of the customer whose Listings you want to work with. The customer can tell you this ID."
           }
       ]
   }
}

DELETE /customer[/:customer_id]

Fields

Field Type Description Required
customer_id The ID of the customer whose Listings you want to work with. The customer can tell you this ID. YES

Request

Headers

Header Value
Accept
application/vnd.account.v2+json
application/hal+json
application/json

Response

Status Codes

  • 406: Not Acceptable
  • 415: Unsupported Media Type
  • 204: No Content
  • 404: Not Found

Headers

Header Value
Content-Type
application/vnd.account.v2+json
application/hal+json
application/json
Allow Comma-separated list of all HTTP methods allowed

Details

The Details service allows you to retrieve or update your user account details. Because every acount has only one set of details it is not possible to send DELETE/POST requests, also there are no collection methods. You can only PATCH and GET the resource entity.

GET /details

The Details GET Entity allows the retrieving of your account details. Which consist of name, company, email and salutation.

Fields

Field Type Description Required
first_name Expected data type: string | Description: Your first name NO
last_name Expected data type: string | Description: Your last name NO
company Expected data type: string | Description: The name of your company NO
salutation_id Expected data type: integer | Description: The salutation of the contact person | Allowed values: 2 => Mr., 3 => Ms., 4 => family, 8 => company NO
password Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long. NO

Request

Headers

Header Value
Accept
application/vnd.account.v2+json
application/hal+json
application/json

Response

Status Codes

  • 406: Not Acceptable
  • 415: Unsupported Media Type
  • 200: OK

Headers

Header Value
Content-Type
application/vnd.account.v2+json
application/hal+json
application/json
Allow Comma-separated list of all HTTP methods allowed

Body

{
   "_links": {
       "self": {
           "href": "/details"
       }
   }
   "username": "Expected data type: string | Description: Your username",
   "first_name": "Expected data type: string | Description: Your first name",
   "last_name": "Expected data type: string | Description: Your last name",
   "company": "Expected data type: string | Description: The name of your company",
   "salutation_id": "Expected data type: integer | Description: The salutation of the contact person | Allowed values: 2 => Mr., 3 => Ms., 4 => family, 8 => company",
   "password": "Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long."
}

PATCH /details

The Details PATCH Collection allows the update of your account details. You can update name, company, salutation and password. Please be aware: When you change your password it takes effect immediately. This means that you have to provide the new credentials in the authentication otherwise you will get the response "401 - Unauthorized". Please keep in mind that a collection has [] around its JSON content.

Fields

Field Type Description Required
first_name Expected data type: string | Description: Your first name NO
last_name Expected data type: string | Description: Your last name NO
company Expected data type: string | Description: The name of your company NO
salutation_id Expected data type: integer | Description: The salutation of the contact person | Allowed values: 2 => Mr., 3 => Ms., 4 => family, 8 => company NO
password Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long. NO

Request

Headers

Header Value
Accept
application/vnd.account.v2+json
application/hal+json
application/json
Content-Type
application/vnd.account.v2+json
application/json

Body

{
   "first_name": "Expected data type: string | Description: Your first name",
   "last_name": "Expected data type: string | Description: Your last name",
   "company": "Expected data type: string | Description: The name of your company",
   "salutation_id": "Expected data type: integer | Description: The salutation of the contact person | Allowed values: 2 => Mr., 3 => Ms., 4 => family, 8 => company",
   "password": "Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long."
}

Response

Status Codes

  • 406: Not Acceptable
  • 415: Unsupported Media Type
  • 200: OK
  • 400: Client Error
  • 422: Unprocessable Entity

Headers

Header Value
Content-Type
application/vnd.account.v2+json
application/hal+json
application/json
Allow Comma-separated list of all HTTP methods allowed

Body

{
   "_links": {
       "self": {
           "href": "/details"
       }
   }
   "username": "Expected data type: string | Description: Your username",
   "first_name": "Expected data type: string | Description: Your first name",
   "last_name": "Expected data type: string | Description: Your last name",
   "company": "Expected data type: string | Description: The name of your company",
   "salutation_id": "Expected data type: integer | Description: The salutation of the contact person | Allowed values: 2 => Mr., 3 => Ms., 4 => family, 8 => company",
   "password": "Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long."
}

PATCH /details[/:username]

The Details PATCH Entity allows the update of your account details. You can update name, company, salutation and password. Please be aware: When you change your password it takes effect immediately. This means that you have to provide the new credentials in the authentication otherwise you will get the response "401 - Unauthorized".

Fields

Field Type Description Required
first_name Expected data type: string | Description: Your first name NO
last_name Expected data type: string | Description: Your last name NO
company Expected data type: string | Description: The name of your company NO
salutation_id Expected data type: integer | Description: The salutation of the contact person | Allowed values: 2 => Mr., 3 => Ms., 4 => family, 8 => company NO
password Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long. NO

Request

Headers

Header Value
Accept
application/vnd.account.v2+json
application/hal+json
application/json
Content-Type
application/vnd.account.v2+json
application/json

Body

{
   "first_name": "Expected data type: string | Description: Your first name",
   "last_name": "Expected data type: string | Description: Your last name",
   "company": "Expected data type: string | Description: The name of your company",
   "salutation_id": "Expected data type: integer | Description: The salutation of the contact person | Allowed values: 2 => Mr., 3 => Ms., 4 => family, 8 => company",
   "password": "Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long."
}

Response

Status Codes

  • 406: Not Acceptable
  • 415: Unsupported Media Type
  • 200: OK
  • 404: Not Found
  • 400: Client Error
  • 422: Unprocessable Entity

Headers

Header Value
Content-Type
application/vnd.account.v2+json
application/hal+json
application/json
Allow Comma-separated list of all HTTP methods allowed

Body

{
   "_links": {
       "self": {
           "href": "/details"
       }
   }
   "username": "Expected data type: string | Description: Your username",
   "first_name": "Expected data type: string | Description: Your first name",
   "last_name": "Expected data type: string | Description: Your last name",
   "company": "Expected data type: string | Description: The name of your company",
   "salutation_id": "Expected data type: integer | Description: The salutation of the contact person | Allowed values: 2 => Mr., 3 => Ms., 4 => family, 8 => company",
   "password": "Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long."
}

GET /details[/:username]

The Details GET Entity allows the retrieving of your account details. Which consist of name, company, email and salutation.

Fields

Field Type Description Required
first_name Expected data type: string | Description: Your first name NO
last_name Expected data type: string | Description: Your last name NO
company Expected data type: string | Description: The name of your company NO
salutation_id Expected data type: integer | Description: The salutation of the contact person | Allowed values: 2 => Mr., 3 => Ms., 4 => family, 8 => company NO
password Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long. NO

Request

Headers

Header Value
Accept
application/vnd.account.v2+json
application/hal+json
application/json

Response

Status Codes

  • 406: Not Acceptable
  • 415: Unsupported Media Type
  • 200: OK
  • 404: Not Found

Headers

Header Value
Content-Type
application/vnd.account.v2+json
application/hal+json
application/json
Allow Comma-separated list of all HTTP methods allowed

Body

{
   "_links": {
       "self": {
           "href": "/details"
       }
   }
   "username": "Expected data type: string | Description: Your username",
   "first_name": "Expected data type: string | Description: Your first name",
   "last_name": "Expected data type: string | Description: Your last name",
   "company": "Expected data type: string | Description: The name of your company",
   "salutation_id": "Expected data type: integer | Description: The salutation of the contact person | Allowed values: 2 => Mr., 3 => Ms., 4 => family, 8 => company",
   "password": "Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long."
}

ResetPassword

The ResetPassword service allows you to reset your user account password. If you send a GET request you will receive a reset token to your eMail address. This token is valid for 24 hours and needed to reset your password via the PUT endpoint. Your old password stays valid until the password was actually rested.

GET /reset-password[/:username]

The ResetPassword GET Entity allows you to request a token that enables you to reset your password. This token will be send to your eMail address and is valid for 24 hours.

Fields

Field Type Description Required
reset_token Expected data type: string | Description: Your reset token YES
password Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long. YES

Request

Headers

Header Value
Accept
application/vnd.account.v2+json
application/hal+json
application/json

Response

Status Codes

  • 406: Not Acceptable
  • 415: Unsupported Media Type
  • 200: OK
  • 404: Not Found

Headers

Header Value
Content-Type
application/vnd.account.v2+json
application/hal+json
application/json
Allow Comma-separated list of all HTTP methods allowed

Body

{
   "_links": {
       "self": {
           "href": "/reset-password[/:username]"
       }
   }
   "reset_token": "Expected data type: string | Description: Your reset token",
   "password": "Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long."
}

PUT /reset-password[/:username]

The ResetPassword PUT Entity allows you to reset your password with the token you got using the GET request.

Fields

Field Type Description Required
reset_token Expected data type: string | Description: Your reset token YES
password Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long. YES

Request

Headers

Header Value
Accept
application/vnd.account.v2+json
application/hal+json
application/json
Content-Type
application/vnd.account.v2+json
application/json

Body

{
   "reset_token": "Expected data type: string | Description: Your reset token",
   "password": "Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long."
}

Response

Status Codes

  • 406: Not Acceptable
  • 415: Unsupported Media Type
  • 200: OK
  • 404: Not Found
  • 400: Client Error
  • 422: Unprocessable Entity

Headers

Header Value
Content-Type
application/vnd.account.v2+json
application/hal+json
application/json
Allow Comma-separated list of all HTTP methods allowed

Body

{
   "_links": {
       "self": {
           "href": "/reset-password[/:username]"
       }
   }
   "reset_token": "Expected data type: string | Description: Your reset token",
   "password": "Expected data type: string | Description: A password of your choice. The password has to be at least 10 characters long."
}