
pr_get_contact
Description
Returns a list of contact detail structures. Each detail structure contains:
- id
- last name
- first name
- phone
- number
- type
- default
- postal address line 1
- postal address line 2
- postal address line 3
- postal address city
- postal address code
- postal address country name
- postal address country code
- physical address line 1
- physical address line 2
- physical address line 3
- physical address city
- physical address code
- physical address country name
- physical address country code
- agent role
- charge (nett or gross)
- commission
- account
- payment plan
- rates
- {structure as per ac_get_rate}
- guest role
- primary yn
- profile
- field id
- field type id
- field type name
- field sort sequence
- type
- label
- id
- value
- code
- tripsheet
- property id
- property
- field id
- field type id
- field type name
- field sort sequence
- label
- id
- value
- visits
Version
Available from 6.18.0.
Access
Read-only, master access not required, user must have read access to the “Contacts” function and an internal staff relationship link.
Parameters
| Number | Name | O/R | Usage |
|---|---|---|---|
| 1 | Auth | Required | Authentication structure.* |
| 2 | Filters | Optional | Search for specific contacts using various criteria. The parameter must be populated with a structure where the key is the field to search and the value is the search criteria. The search criteria may use * or % as wildcard characters. For the fields available – see the table below. Multiple fields may be used. This will require that the contacts returned match all given criteria. |
| 3 | Fields | Optional | For future use. |
| 4 | Agent Role | Optional | If set to 1, then agent role information will be included in the results. |
| 5 | Agent Filter | Optional | If set to 1, only contacts with an agent role will be returned. |
| 6 | User Role | Optional | For future use. |
| 7 | User Filter | Optional | If set to 1, only contacts with a user role will be returned. |
| 8 | Guest Role | Optional | If set to 1, then basic guest role information will be included in the results. If set to a structure additional guest information may be returned. Each item in the structure must have a key to determine the guest role section and a value to determine which information to include in the results. For the available sections – see the table below. |
| 9 | Guest Filter | Optional | If set to 1, only contacts with a guest role will be returned. If set to a structure then additional filtering may be applied. The key determines the section to filter with the value containing a further structure with the filters for that section. For available sections and date filter types – see the tables below |
*See call structure explanation.
2. Filter fields:
| Field | Description |
|---|---|
| id | ID of the contact |
| last_name | Last name of the contact |
| first_name | First name of the contact |
| Email address of the contact |
8. Guest role sections:
| Key | Section | Information |
|---|---|---|
| profile | Guest profile | An array with one or more of the following: basic: Include basic guest profile fields |
| tripsheet | Guest tripsheet | If set to 1, then tripsheet information will be included in the results. |
| calculate | Calculated fields | If set to “visits”, then the number of visits will be included in the results. |
9. Guest filter sections:
| Key | Section | Filters | ||
|---|---|---|---|---|
| Name | Description | Value | ||
| tripsheet | Filter by guest tripsheet | accommodation_type | Filter by tripsheet itineraries accommodation type | An array or comma-delimited list of accommodation type ids. |
| date | Filter by tripsheet itineraries travel dates | A structure with keys/value pairs for: – type | ||
|
filter_output | Whether to filter tripsheet output or not. By default only the contact list is filtered with all tripsheet details retained. Applying this will tripsheet details will also be filtered | Enabled when set to “1” or true. | ||
| Filter by tripsheet itineraries property | Filter by tripsheet itineraries property | An array or comma-delimited list of property ids. |
9. Guest date filter types:
| Date filter type | Description |
|---|---|
| arrive | Itinerary arrival date falls between the start and end dates. |
| depart | Itinerary departure date falls between the start and end dates. |
| travel | Itinerary travel dates overlap with the start to end date range. |
| inhouse | Itinerary travel dates, excluding departure date, overlap with the start to end date range. |
Example
Requests
{
"method": "pr_get_contact",
"params": [
{
"bridge_username": "username",
"bridge_password": "password",
"link_id": 1
},
{
"last_name": "Solo"
},
"",
"",
"",
"",
"",
{
"profile":"all",
"tripsheet": "1",
"calculate": "visits"
}
],
"id": 1
}
Response
{
"id": 1,
"error": null,
"result": [
{
"id": "PA7502",
"last_name": "van Rooyen",
"first_name": "Dylan",
"title": "Mr",
"title_id": "RS1",
"suffix": "",
"suffix_id": "",
"email": "[email protected]",
"post_addr_line1": "",
"post_addr_line2": "",
"post_addr_line3": "",
"post_city": "",
"post_post_code": "",
"post_country_id": "RS191",
"post_country_code": "ZA",
"post_country_name": "South Africa",
"phys_addr_line1": "",
"phys_addr_line2": "",
"phys_addr_line3": "",
"phys_city": "",
"phys_post_code": "",
"phys_country_id": "RS191",
"phys_country_code": "ZA",
"phys_country_name": "South Africa",
"phone": [
{
"id": "PA294",
"number": "123 000 1234",
"type": "Business",
"default": "1"
}
],
"agent": [],
"user": [],
"guest": {
"primary_yn": "1",
"profile": [
{
"type": "custom",
"label": "Nickname",
"id": "",
"value": "",
"code": "",
"field_id": "PA40",
"field_type_id": "1",
"field_type_name": "Textfield",
"field_sort_sequence": "1"
},
{
"type": "custom",
"label": "Email communication",
"id": [],
"value": [],
"code": "",
"field_id": "PA52",
"field_type_id": "4",
"field_type_name": "Checkbox",
"field_sort_sequence": "2"
},
{
"type": "custom",
"label": "Country of Residence",
"id": "",
"value": "",
"code": "",
"field_id": "PA24",
"field_type_id": "2",
"field_type_name": "Textarea",
"field_sort_sequence": "4"
},
{
"type": "basic",
"label": "Gender",
"id": "RS1",
"value": "Male",
"code": "",
"field_id": "RS5",
"field_type_id": "5",
"field_type_name": "Drop down",
"field_sort_sequence": "6"
},
{
"type": "custom",
"label": "",
"id": "",
"value": "",
"code": "",
"field_id": "PA2",
"field_type_id": "3",
"field_type_name": "Radio button",
"field_sort_sequence": "7"
},
{
"type": "custom",
"label": "Occupation",
"id": "",
"value": "",
"code": "",
"field_id": "PA6",
"field_type_id": "2",
"field_type_name": "Textarea",
"field_sort_sequence": "8"
},
{
"type": "custom",
"label": "Children / Family / Pets",
"id": "",
"value": "",
"code": "",
"field_id": "PA14",
"field_type_id": "2",
"field_type_name": "Textarea",
"field_sort_sequence": "10"
},
{
"type": "custom",
"label": "Dietary Requirements",
"id": "",
"value": "seafood",
"code": "",
"field_id": "PA6",
"field_type_id": "2",
"field_type_name": "Textarea",
"field_sort_sequence": "11"
},
{
"type": "custom",
"label": "Allergies/Medical",
"id": "",
"value": "None",
"code": "",
"field_id": "PA9",
"field_type_id": "2",
"field_type_name": "Textarea",
"field_sort_sequence": "12"
},
{
"type": "custom",
"label": "General Comments",
"id": "",
"value": "This is a test.",
"code": "",
"field_id": "PA54",
"field_type_id": "2",
"field_type_name": "Textarea",
"field_sort_sequence": "13"
},
{
"type": "custom",
"label": "Loyalty member",
"id": [],
"value": [],
"code": "",
"field_id": "PA53",
"field_type_id": "4",
"field_type_name": "Checkbox",
"field_sort_sequence": "17"
},
{
"type": "custom",
"label": "Type*",
"id": [],
"value": [],
"code": "",
"field_id": "PA48",
"field_type_id": "4",
"field_type_name": "Checkbox",
"field_sort_sequence": "18"
},
{
"type": "custom",
"label": "Type detail",
"id": "",
"value": "",
"code": "",
"field_id": "PA19",
"field_type_id": "2",
"field_type_name": "Textarea",
"field_sort_sequence": "19"
},
{
"type": "basic",
"label": "Nationality",
"id": "RS451",
"value": "South Africa",
"code": "ZA",
"field_id": "RS63",
"field_type_id": "8",
"field_type_name": "Country lookup",
"field_sort_sequence": "20"
},
{
"type": "basic",
"label": "Passport/ID",
"id": "",
"value": "",
"code": "",
"field_id": "RS46",
"field_type_id": "1",
"field_type_name": "Textfield",
"field_sort_sequence": "21"
},
{
"type": "basic",
"label": "Birthdate",
"id": "",
"value": "0000-00-00",
"code": "",
"field_id": "RS55",
"field_type_id": "7",
"field_type_name": "Date",
"field_sort_sequence": "22"
},
{
"type": "basic",
"label": "Anniversary",
"id": "",
"value": "0000-00-00",
"code": "",
"field_id": "RS68",
"field_type_id": "7",
"field_type_name": "Date",
"field_sort_sequence": "23"
},
{
"type": "basic",
"label": "Type",
"id": "",
"value": false,
"code": false,
"field_id": "RS92",
"field_type_id": "5",
"field_type_name": "Drop down",
"field_sort_sequence": "24"
},
{
"type": "basic",
"label": "Notes",
"id": "",
"value": "",
"code": "",
"field_id": "RS77",
"field_type_id": "2",
"field_type_name": "Textarea",
"field_sort_sequence": "25"
},
{
"type": "basic",
"label": "Memos",
"id": "",
"value": "",
"code": "",
"field_id": "RS86",
"field_type_id": "2",
"field_type_name": "Textarea",
"field_sort_sequence": "26"
}
],
"tripsheets": [
{
"reservation_id": "RS6794",
"reservation_name": "van Rooyen x 1",
"status_id": "30",
"status": "Confirmed",
"itineraries": [
{
"id": "RS14768",
"property_id": "RS11",
"property": "Ian D'sa's Camp",
"accommodation_id": "RS55",
"accommodation": "Afraid of Heights",
"arrive_date": "2016-7-29",
"depart_date": "2016-7-30",
"units": "1",
"adults": "1",
"children": "0"
}
],
"tripsheet": [
{
"property_id": "",
"property": "",
"label": "Room Number",
"id": "",
"value": "Room 10",
"field_id": "PA66",
"field_type_id": "1",
"field_type_name": "Textfield",
"field_sort_sequence": "1"
},
{
"property_id": "",
"property": "",
"label": "Camp Manager's Name",
"id": [],
"value": [],
"field_id": "PA44",
"field_type_id": "4",
"field_type_name": "Checkbox",
"field_sort_sequence": "2"
},
{
"property_id": "",
"property": "",
"label": "General Comments",
"id": "",
"value": "",
"field_id": "PA26",
"field_type_id": "2",
"field_type_name": "Textarea",
"field_sort_sequence": "26"
},
{
"property_id": "",
"property": "",
"label": "Guest Feedback",
"id": "",
"value": "",
"field_id": "WB65",
"field_type_id": "2",
"field_type_name": "Textarea",
"field_sort_sequence": "27"
}
]
}
],
"visits": "1"
}
}
]
}Keep up to date with us
Menu
Visit our website
ResRequest Modules
- Business Intelligence
- Central Reservations
- Channel Management
- Customer Relationship Management
- Developer
- Email Series 2022
- Email Series 2023
- Financial Management
- Marketing tools
- Payment Gateways
- Point of sale
- Product
- Professional Services
- Property Management
- ResConnect
- ResInsite
- ResNova
- System Setup
- Technical Alerts
- Technical Tips
- Telephone Management
- Webinars Index

