Contacts can be accessed via the url GET http://<server name>:<odata port>/<service tier name>/api/BEterna/Export/v2.0/companies(<company system id>)/contacts?$expand=contactsShipTo
. The part of page exports contact ship-to adresses based on a contact no. The filter on the Contact no. is mandatory. The response is a JSON with all contacts.
{
"@odata.etag": "W/\"JzQ0O0NoVDNlN1dZcFJmRE9DMlNicWRLOThDVXVGVzg2dS8vazV3MUpKaFlnYnc9MTswMDsn\"",
"systemId": "c1f6aec4-b100-ed11-82ec-000d3aaa1ebe",
"no": "CT000001",
"name": "Adatum Corporation",
"name2": "",
"address": "Station Road, 21",
"address2": "",
"postCode": "CB1 2FB",
"city": "Cambridge",
"county": "",
"country": "GB",
"phoneNo": "",
"email": "adatum.corporation@contoso.com",
"firstName": "",
"surname": "",
"salutationCode": "COMPANY",
"companyName": "Adatum Corporation",
"contactsShipTo": [
{
"@odata.etag": "W/\"JzQ0OzgvdUZKRUlTTDlBbTZLbk5wM3VGQjRKcDg2cGJoMSs3RkhqTTZlWU9UUDQ9MTswMDsn\"",
"systemId": "5ff7aec4-b100-ed11-82ec-000d3aaa1ebe",
"shipToCode": "CHELTENHAM",
"shipToName": "Adatum Corporation",
"shipToName2": "",
"shipToAddress": "Montpellier House",
"shipToAddress2": "Montpellier Drive",
"shipToCity": "Cheltenham",
"shipToPhone": "",
"shipToTelex": "",
"shipToCountryRegion": "",
"shipToPostCode": "GL50 1TY",
"shipToCounty": "",
"shipToEmail": "",
"shipToHomepage": ""
},
{
"@odata.etag": "W/\"JzQ0O0lUSkNDR2dBbUd0NVE5VDZZU0FKb000R1R5eWFqM2pVYkxZS3ZuN3NPMlE9MTswMDsn\"",
"systemId": "60f7aec4-b100-ed11-82ec-000d3aaa1ebe",
"shipToCode": "LONDON",
"shipToName": "Adatum Corporation",
"shipToName2": "",
"shipToAddress": "Kingdom Street, 2",
"shipToAddress2": "Paddington",
"shipToCity": "London",
"shipToPhone": "",
"shipToTelex": "",
"shipToCountryRegion": "",
"shipToPostCode": "W2 6BD",
"shipToCounty": "",
"shipToEmail": "",
"shipToHomepage": ""
}
]
},
{
"@odata.etag": "W/\"JzQ0O2M4ZnlyRXZlajJRUEdiejdkYkJsUnoyODUwUFgraG85cXJ4ZHlDUkN4dU09MTswMDsn\"",
"systemId": "c3f6aec4-b100-ed11-82ec-000d3aaa1ebe",
"no": "CT000002",
"name": "Robert Townes",
"name2": "",
"address": "Station Road, 21",
"address2": "",
"postCode": "CB1 2FB",
"city": "Cambridge",
"county": "",
"country": "GB",
"phoneNo": "",
"email": "robert.townes@contoso.com",
"firstName": "Robert",
"surname": "Townes",
"salutationCode": "M",
"companyName": "Adatum Corporation",
"contactsShipTo": [
{
"@odata.etag": "W/\"JzQ0OzgvdUZKRUlTTDlBbTZLbk5wM3VGQjRKcDg2cGJoMSs3RkhqTTZlWU9UUDQ9MTswMDsn\"",
"systemId": "5ff7aec4-b100-ed11-82ec-000d3aaa1ebe",
"shipToCode": "CHELTENHAM",
"shipToName": "Adatum Corporation",
"shipToName2": "",
"shipToAddress": "Montpellier House",
"shipToAddress2": "Montpellier Drive",
"shipToCity": "Cheltenham",
"shipToPhone": "",
"shipToTelex": "",
"shipToCountryRegion": "",
"shipToPostCode": "GL50 1TY",
"shipToCounty": "",
"shipToEmail": "",
"shipToHomepage": ""
},
{
"@odata.etag": "W/\"JzQ0O0lUSkNDR2dBbUd0NVE5VDZZU0FKb000R1R5eWFqM2pVYkxZS3ZuN3NPMlE9MTswMDsn\"",
"systemId": "60f7aec4-b100-ed11-82ec-000d3aaa1ebe",
"shipToCode": "LONDON",
"shipToName": "Adatum Corporation",
"shipToName2": "",
"shipToAddress": "Kingdom Street, 2",
"shipToAddress2": "Paddington",
"shipToCity": "London",
"shipToPhone": "",
"shipToTelex": "",
"shipToCountryRegion": "",
"shipToPostCode": "W2 6BD",
"shipToCounty": "",
"shipToEmail": "",
"shipToHomepage": ""
}
]
}
The fields of the contact are documented in the following table.
field | data type | content |
---|---|---|
systemId |
GUID | the system id of the contact record |
no |
Code[20] | the contact no. |
name |
Text[100] | the name of the contact |
name2 |
Text[50] | the second name of the contact |
address |
Text[100] | the address of the contact |
address2 |
Text[50] | the second address |
postCode |
Code[20] | postCode of the contact |
city |
Text[30] | the city of the contact |
county |
Text[30] | the county of the contact |
country |
Code[10] | Contry/Region code of the contact |
phoneNo |
Text[30] | the phone number of contact |
email |
Text[80] | the e-mail of contact |
firstName |
Text[30] | the first name of the contact |
surname |
Text[30] | the surname of the contact |
salutationCode |
Code[10] | the salutation of the contact |
companyName |
Text[100] | Company name of the contact |
There can be one or more Contacts Ship-to Address. They are transferred using a JSON array. The following fields can be defined for a single Contact Ship-To Address:
field | data type | content |
---|---|---|
systemId |
GUID | the system id of the ship-to address record |
shipToCode |
Code[10] | ship to address Code |
shipToName |
Text[100] | the ship to address Name |
shipToName2 |
Text[50] | the second name ship to address |
shipToAddress |
Text[100] | address to ship |
contactAddress2 |
Text[50] | second address to ship |
shipToCity |
Text[30] | ship to address city |
shipToPhone |
Text[30] | the phone number |
shipToTelex |
Text[30] | the telex number |
shipToCountryRegion |
Code[10] | ship to Country Code |
shipToPostCode |
Code[20] | ship to address PostCode |
shipToCounty |
Text[30] | ship to address County |
shipToEmail |
Text[80] | ship to address Email |
shipToHomepage |
Text[80] | ship to address Home page |