Skip to main content

contacts

Creates, updates, deletes, gets or lists a contacts resource.

Overview​

Namecontacts
TypeResource
Idovh.me.contacts

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idintegerContact Identifier
first_namestringFirst name (wire: firstName)
last_namestringLast name (wire: lastName)
organisation_namestringOrganisation name (wire: organisationName)
addressobjectAddress for this contact
birth_citystringBirth city (wire: birthCity)
birth_countrystringBirth 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_daystring (date)Birth date (wire: birthDay)
birth_zipstringBirth Zipcode (wire: birthZip)
cell_phonestring (phone-number)Cellphone number (wire: cellPhone)
company_national_identification_numberstringNational identification number of your company (wire: companyNationalIdentificationNumber)
emailstringEmail address
faxstring (phone-number)Fax number
genderstringGender (female, male)
languagestringLanguage (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_formstringLegal form of the contact (administration, association, corporation, individual, other, personalcorporation) (wire: legalForm)
national_identification_numberstringNational identification number of the contact (wire: nationalIdentificationNumber)
nationalitystringNationality (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_typestringOrganisation type (wire: organisationType)
phonestring (phone-number)Telephone number
spare_emailstringSpare email address (wire: spareEmail)
vatstringVAT number

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcontact_idRetrieve information about a contact
listselectx_pagination_modeRetrieve every contact your created
createinsertCreate a new contact
updateupdatecontact_idUpdate 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.

NameDatatypeDescription
api_hoststringThe 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_idintegerContact ID (wire: contactId)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

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
;

INSERT examples​

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
;

UPDATE examples​

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;