Address actions
Address (List)
Example url:
$ curl https://SystemId:APIKey@r3.minicrm.hu/Api/R3/AddressList/1234
Get all addresses of a given Contact (ContactId).
In the response, the addresses are received in one array. The number of the addresses can be found on its Count key. Under the Results key, you can see the address details, their keys are the Ids of addresses.
Example output:
{
"Count":2,
"Results":[
{
"123":"Home address (5555 Walrand 66 Chrissundra Street)",
"456":"Office address (4444 Lap 197 Mazen Street)"
}
]
}
If you are using the API in XML format, the former request does not return the addresses’ Ids. In this case, a structured request has to be carried out, that is possible by a Structured parameter.
Example url:
$ curl https://SystemId:APIKey@r3.minicrm.hu/Api/R3/AddressList/1234?Structured=1
Get the address of a selected contact.
In the response, the addresses are received in one array. The number of the addresses can be found on its Count key. Under the Results key, you can see the address details, their keys are the Ids of addresses.
Example output:
{
"Results": {
"123": {
"Id": 123,
"Address": "Home address (5555 1 Chandler Dye Street)",
"Url": "https://r3.minicrm.hu/Api/R3/Address/123"
},
"456": {
"Id": 456,
"Address": "Office address (4444 Tigard 14 Godfrey Street)",
"Url": "https://r3.minicrm.hu/Api/R3/Address/465"
}
},
"Count": 2
}
Address (GET)
Example url:
$ curl https://SystemId:APIKey@r3.minicrm.hu/Api/R3/Address/123
Get the details of a selected address.
In the response, the address is received in an array, in which you can see the details of the address.
Example output:
{
"Id":123,
"ContactId":1234,
"Type":"HQ",
"Name":"MiniCRM Ag.",
"CountryId":"Hungary",
"PostalCode":5555,
"City":"Budapest",
"Address":"Well Known street 1.",
"Default":1
}
Address (PUT)
Modifying or creating an address. It is recommended to resend the modified data so the programs will run more efficiently and you can avoid modified data from restoring to the value downloaded previously. Example url:
$ curl -XPUT https://SystemId:APIKey@r3.minicrm.hu/Api/R3/Address/123 -d '{
"Address":"Well Known street 2.",
}'
Example output:
{
"Id":123
}
The service's URL is the same as the URL of the download of the address. The download of addresses can be initiated by GET request, data modification can be initiated by PUT request. Adding a new address is possible by omitting the Id (123 at the end of the example URL). It is important the in case of a new address, it is mandatory to send the ContactId field, in case of an existing address, the ContactId field cannot be edited.
The data structure expected by input is the same as the structure received by the download of the task. Input format JSON serialized array.