Zak API to manage customers

These APIs allow you to manage customers of a Zak property
On each examples wb_yyyyyyyyyyy is used as api-key which is sent as user.

Fetch Customer by id

This method provides customers data.
Url: https://kapi.wubook.net/kp/customers/fetch_one

Usage example

At least only the customer id is required:

Field name

Description

Mandatory

id

customer id

yes

$ curl --location --request POST 'https://kapi.wubook.net/kp/customers/fetch_one' \
    --header 'x-api-key: wb_yyyyyyyyyyy' \
    --data-urlencode 'id=277'

Response Example

A data structure containing customer info:

Field name

Description

name

Customer name

surname

Customer surname

country

Country

city

City

address

Address

zipcode

Zipcode

cf

Tax ID code

creation

Date of customer creation

gender

Gender

birth_country

Birth Country

birth_city

Birth City

birthday

Birthday

phone

phone number

email

email

bill_address

Billing info Address

bill_city

Billing info City

bill_zip

Billing info ZIP

bill_country

Billing info Country

bill_name

Billing info Name

vat_number

Billing info vat number

$ "data":{
      "main_info":{
          "name":"Mario",
          "surname":"Giuseppe",
          "country":"PM",
          "city":"Petit Barachois",
          "zipcode":"96271",
          "cf":null,
          "creation":"29/09/2020",
          "address":null
      },
      "anagraphical":{
          "gender":"m",
          "birth_country":"PM",
          "birth_city":"Alabama",
          "birthday":"10/10/1952"
      },
      "contacts":{
          "email":"therealemail@gmail.com",
          "phone":null
      },
      "billing_info":{
          "address":null,
          "city":null,
          "zip":null,
          "country":null,
          "name":null,
          "vat_number":null
      },
      "doc_data":[
          {
              "doc_type":"it_TESDI",
              "doc_country":"PM",
              "doc_number":"1",
              "doc_issuer":null,
              "doc_issue":"27/11/1989",
              "doc_expiry":"21/06/2027",
              "doc_medium":null
          },
          {
              "doc_type":"p",
              "doc_country":"IT",
              "doc_number":"123ABC456",
              "doc_issuer":null,
              "doc_issue":"01/01/2010",
              "doc_expiry":"01/01/2030",
              "doc_medium":null
          }
      ]
  }

Upload customer document

This method allows you to upload a document to an existing customer
Url: https://kapi.wubook.net/kp/customers/upload_docdata

Usage example

The customer id is mandatory

Field name

Description

Mandatory

id

customer id

yes

docdata

json object containing document data

yes

A docdata is

Field name

Description

Mandatory

doc_type

str (see doc types in syms)

yes

doc_country

str (‘italy’, ‘spain’ …)

yes

doc_number

str

yes

doc_issue

str

yes

doc_expiry

str

yes

doc_issuer

str

no

doc_medium

str

no

$ curl --location --request POST 'https://kapi.wubook.net/kp/customers/upload_docdata' \
   --header 'x-api-key: wb_yyyyyyyyyyy' \
   --data-urlencode 'id=277' \
   --data-urlencode 'docdata={"doc_type": "p", "doc_country": "Italy", "doc_number": "123ABC456", "doc_issue": "01/01/2010", "doc_expiry": "01/01/2030"}'

Response example

Return the customer id

${"data": 277}

Add one customer

This method allows you to add new customer
Url: https://kapi.wubook.net/kp/customers/add_one

Usage example

The customer name and surname are mandatory

Field name

Description

Mandatory

name

str

yes

surname

str

yes

country

str (‘IT’, ‘GB’, ‘ES’..)

no

birth_contry

str (‘IT’, ‘GB’, ‘ES’..)

no

residence_country

str (‘IT’, ‘GB’, ‘ES’..)

no

birthday

str ( ‘10/01/1993’ )

no

phone

str

no

zipcode

str

no

address

str

no

city

str

no

birth_city

str

no

email

str

no

gender

str (‘m’, ‘f’, ‘x’)

no

$ curl --location --request POST 'https://kapi.wubook.net/kp/customers/add_one' \
   --header 'x-api-key: wb_yyyyyyyyyyy' \
   --data-urlencode 'custdata={"name": "Mario", "surname": "Rossi", "email":"therealemail@gmail.com", "gender": "m"}'

Response example

Return the customer id

${"data": 2237}

Update customer info

This method allows you to update an existing customer
Url: https://kapi.wubook.net/kp/customers/update_custdata

Usage example

The customer id is mandatory

Field name

Description

Mandatory

id

customer id (you can see from the reservation results)

yes

custdata | json object containing document to add

yes (at least 1)

A customer data is

Field name

Description

Mandatory

name

str

no

surname

str

no

country

str (‘IT’, ‘GB’, ‘ES’..)

no

birth_contry

str (‘IT’, ‘GB’, ‘ES’..)

no

residence_country

str (‘IT’, ‘GB’, ‘ES’..)

no

birthday

str ( ‘10/01/1993’ )

no

phone

str

no

zipcode

str

no

address

str

no

city

str

no

birth_city

str

no

email

str

no

gender

str (‘m’, ‘f’, ‘x’)

no

$ curl --location --request POST 'https://kapi.wubook.net/kp/customers/update_custdata' \
   --header 'x-api-key: wb_yyyyyyyyyyy' \
   --data-urlencode 'id=277' \
   --data-urlencode 'custdata={"name": "Mario", "email":"therealemail@gmail.com", "gender": "m"}'

Response example

Return the customer id

${"data": 277}