contacts
Creates, updates, deletes, gets or lists a contacts resource.
Overview​
| Name | contacts |
| Type | Resource |
| Id | ovh.me.contacts |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | integer | Contact Identifier |
first_name | string | First name (wire: firstName) |
last_name | string | Last name (wire: lastName) |
organisation_name | string | Organisation name (wire: organisationName) |
address | object | Address for this contact |
birth_city | string | Birth city (wire: birthCity) |
birth_country | string | Birth Country (AC, AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DG, DJ, DK, DM, DO, DZ, EA, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HN, HR, HT, HU, IC, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TA, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, UNKNOWN, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW) (wire: birthCountry) |
birth_day | string (date) | Birth date (wire: birthDay) |
birth_zip | string | Birth Zipcode (wire: birthZip) |
cell_phone | string (phone-number) | Cellphone number (wire: cellPhone) |
company_national_identification_number | string | National identification number of your company (wire: companyNationalIdentificationNumber) |
email | string | Email address |
fax | string (phone-number) | Fax number |
gender | string | Gender (female, male) |
language | string | Language (cs_CZ, de_DE, en_AU, en_CA, en_GB, en_IE, en_US, es_ES, fi_FI, fr_CA, fr_FR, fr_MA, fr_SN, fr_TN, it_IT, lt_LT, nl_NL, pl_PL, pt_PT) |
legal_form | string | Legal form of the contact (administration, association, corporation, individual, other, personalcorporation) (wire: legalForm) |
national_identification_number | string | National identification number of the contact (wire: nationalIdentificationNumber) |
nationality | string | Nationality (AC, AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DG, DJ, DK, DM, DO, DZ, EA, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HN, HR, HT, HU, IC, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TA, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, UNKNOWN, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW) |
organisation_type | string | Organisation type (wire: organisationType) |
phone | string (phone-number) | Telephone number |
spare_email | string | Spare email address (wire: spareEmail) |
vat | string | VAT number |
Contact definition
| Name | Datatype | Description |
|---|---|---|
id | integer | Contact Identifier |
first_name | string | First name (wire: firstName) |
last_name | string | Last name (wire: lastName) |
organisation_name | string | Organisation name (wire: organisationName) |
address | object | Address for this contact |
birth_city | string | Birth city (wire: birthCity) |
birth_country | string | Birth Country (AC, AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DG, DJ, DK, DM, DO, DZ, EA, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HN, HR, HT, HU, IC, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TA, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, UNKNOWN, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW) (wire: birthCountry) |
birth_day | string (date) | Birth date (wire: birthDay) |
birth_zip | string | Birth Zipcode (wire: birthZip) |
cell_phone | string (phone-number) | Cellphone number (wire: cellPhone) |
company_national_identification_number | string | National identification number of your company (wire: companyNationalIdentificationNumber) |
email | string | Email address |
fax | string (phone-number) | Fax number |
gender | string | Gender (female, male) |
language | string | Language (cs_CZ, de_DE, en_AU, en_CA, en_GB, en_IE, en_US, es_ES, fi_FI, fr_CA, fr_FR, fr_MA, fr_SN, fr_TN, it_IT, lt_LT, nl_NL, pl_PL, pt_PT) |
legal_form | string | Legal form of the contact (administration, association, corporation, individual, other, personalcorporation) (wire: legalForm) |
national_identification_number | string | National identification number of the contact (wire: nationalIdentificationNumber) |
nationality | string | Nationality (AC, AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DG, DJ, DK, DM, DO, DZ, EA, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HN, HR, HT, HU, IC, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TA, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, UNKNOWN, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW) |
organisation_type | string | Organisation type (wire: organisationType) |
phone | string (phone-number) | Telephone number |
spare_email | string | Spare email address (wire: spareEmail) |
vat | string | VAT number |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | contact_id | Retrieve information about a contact | |
list | select | x_pagination_mode | Retrieve every contact your created | |
create | insert | Create a new contact | ||
update | update | contact_id | Update an existing contact |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
contact_id | integer | Contact ID (wire: contactId) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Retrieve information about a contact
SELECT
id,
first_name,
last_name,
organisation_name,
address,
birth_city,
birth_country,
birth_day,
birth_zip,
cell_phone,
company_national_identification_number,
email,
fax,
gender,
language,
legal_form,
national_identification_number,
nationality,
organisation_type,
phone,
spare_email,
vat
FROM ovh.me.contacts
WHERE contact_id = '{{ contact_id }}' -- required
;
Retrieve every contact your created
SELECT
id,
first_name,
last_name,
organisation_name,
address,
birth_city,
birth_country,
birth_day,
birth_zip,
cell_phone,
company_national_identification_number,
email,
fax,
gender,
language,
legal_form,
national_identification_number,
nationality,
organisation_type,
phone,
spare_email,
vat
FROM ovh.me.contacts
WHERE x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a new contact
INSERT INTO ovh.me.contacts (
address,
birth_city,
birth_country,
birth_day,
birth_zip,
cell_phone,
company_national_identification_number,
email,
fax,
first_name,
gender,
language,
last_name,
legal_form,
national_identification_number,
nationality,
organisation_name,
organisation_type,
phone,
spare_email,
vat
)
SELECT
'{{ address }}',
'{{ birth_city }}',
'{{ birth_country }}',
'{{ birth_day }}',
'{{ birth_zip }}',
'{{ cell_phone }}',
'{{ company_national_identification_number }}',
'{{ email }}',
'{{ fax }}',
'{{ first_name }}',
'{{ gender }}',
'{{ language }}',
'{{ last_name }}',
'{{ legal_form }}',
'{{ national_identification_number }}',
'{{ nationality }}',
'{{ organisation_name }}',
'{{ organisation_type }}',
'{{ phone }}',
'{{ spare_email }}',
'{{ vat }}'
RETURNING
id,
first_name,
last_name,
organisation_name,
address,
birth_city,
birth_country,
birth_day,
birth_zip,
cell_phone,
company_national_identification_number,
email,
fax,
gender,
language,
legal_form,
national_identification_number,
nationality,
organisation_type,
phone,
spare_email,
vat
;
# Description fields are for documentation purposes
- name: contacts
props:
- name: address
description: |
Address for this contact
value:
city: "{{ city }}"
country: "{{ country }}"
line1: "{{ line1 }}"
line2: "{{ line2 }}"
line3: "{{ line3 }}"
otherDetails: "{{ otherDetails }}"
province: "{{ province }}"
zip: "{{ zip }}"
- name: birth_city
value: "{{ birth_city }}"
description: |
Birth city
- name: birth_country
value: "{{ birth_country }}"
description: |
Birth Country
valid_values: ['AC', 'AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DG', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EA', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HN', 'HR', 'HT', 'HU', 'IC', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TA', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'UNKNOWN', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'XK', 'YE', 'YT', 'ZA', 'ZM', 'ZW']
- name: birth_day
value: "{{ birth_day }}"
description: |
Birth date
- name: birth_zip
value: "{{ birth_zip }}"
description: |
Birth Zipcode
- name: cell_phone
value: "{{ cell_phone }}"
description: |
Cellphone number
- name: company_national_identification_number
value: "{{ company_national_identification_number }}"
description: |
National identification number of your company
- name: email
value: "{{ email }}"
description: |
Email address
- name: fax
value: "{{ fax }}"
description: |
Fax number
- name: first_name
value: "{{ first_name }}"
description: |
First name
- name: gender
value: "{{ gender }}"
description: |
Gender
valid_values: ['female', 'male']
- name: language
value: "{{ language }}"
description: |
Language
valid_values: ['cs_CZ', 'de_DE', 'en_AU', 'en_CA', 'en_GB', 'en_IE', 'en_US', 'es_ES', 'fi_FI', 'fr_CA', 'fr_FR', 'fr_MA', 'fr_SN', 'fr_TN', 'it_IT', 'lt_LT', 'nl_NL', 'pl_PL', 'pt_PT']
- name: last_name
value: "{{ last_name }}"
description: |
Last name
- name: legal_form
value: "{{ legal_form }}"
description: |
Legal form of the contact
valid_values: ['administration', 'association', 'corporation', 'individual', 'other', 'personalcorporation']
- name: national_identification_number
value: "{{ national_identification_number }}"
description: |
National identification number of the contact
- name: nationality
value: "{{ nationality }}"
description: |
Nationality
valid_values: ['AC', 'AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DG', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EA', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HN', 'HR', 'HT', 'HU', 'IC', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TA', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'UNKNOWN', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'XK', 'YE', 'YT', 'ZA', 'ZM', 'ZW']
- name: organisation_name
value: "{{ organisation_name }}"
description: |
Organisation name
- name: organisation_type
value: "{{ organisation_type }}"
description: |
Organisation type
- name: phone
value: "{{ phone }}"
description: |
Telephone number
- name: spare_email
value: "{{ spare_email }}"
description: |
Spare email address
- name: vat
value: "{{ vat }}"
description: |
VAT number
UPDATE examples​
- update
Update an existing contact
UPDATE ovh.me.contacts
SET
address = '{{ address }}',
birth_city = '{{ birth_city }}',
birth_country = '{{ birth_country }}',
birth_day = '{{ birth_day }}',
birth_zip = '{{ birth_zip }}',
cell_phone = '{{ cell_phone }}',
company_national_identification_number = '{{ company_national_identification_number }}',
email = '{{ email }}',
fax = '{{ fax }}',
first_name = '{{ first_name }}',
gender = '{{ gender }}',
language = '{{ language }}',
last_name = '{{ last_name }}',
legal_form = '{{ legal_form }}',
national_identification_number = '{{ national_identification_number }}',
nationality = '{{ nationality }}',
organisation_name = '{{ organisation_name }}',
organisation_type = '{{ organisation_type }}',
phone = '{{ phone }}',
spare_email = '{{ spare_email }}',
vat = '{{ vat }}'
WHERE
contact_id = '{{ contact_id }}' --required
RETURNING
id,
first_name,
last_name,
organisation_name,
address,
birth_city,
birth_country,
birth_day,
birth_zip,
cell_phone,
company_national_identification_number,
email,
fax,
gender,
language,
legal_form,
national_identification_number,
nationality,
organisation_type,
phone,
spare_email,
vat;