Get all merge fields
Code Block |
---|
|
curl 'http://api.linkmobility.dk/v2/mergefields.json?apikey=[apikey]' -X GET
curl 'http://api.linkmobility.dk/v2/mergefields.xml?apikey=[apikey]' -X GET
|
...
Code Block |
---|
|
{
"field": [
{
"id": "1",
"name": "Fornavn",
"key": "felt1"
},
{
"id": "5",
"name": "Efternavn",
"key": "felt5"
}
],
"status": 200
}
|
POST /mergefield.{format}
Create new merge field
Code Block |
---|
|
curl 'http://api.linkmobility.dk/v2/mergefield.json?apikey=[apikey]' -X POST -H "Content-Type: application/json" -d @file.json
curl 'http://api.linkmobility.dk/v2/mergefield.xml?apikey=[apikey]' -X POST -H "Content-Type: text/xml" -d @file.xml
|
payload
file.json
Code Block |
---|
|
{
"field":{
"name":"Test"
}
}
|
response
Code Block |
---|
|
{
"field": {
"id": "77",
"name": "Test",
"key": "felt77"
},
"status": 201
}
|
Update existing merge field
Code Block |
---|
|
curl 'http://api.linkmobility.dk/v2/mergefield/{id}.json?apikey=[apikey]' -X PUT -H "Content-Type: application/json" -d @file.json
curl 'http://api.linkmobility.dk/v2/mergefield/{id}.xml?apikey=[apikey]' -X PUT -H "Content-Type: text/xml" -d @file.xml
|
payload
file.json
Code Block |
---|
|
{
"field":{
"name":"Test changed"
}
}
|
response
Code Block |
---|
|
{
"field": {
"id": "73",
"name": "Test changed",
"key": "felt73"
},
"status": 200
}
|
Delete a specific contact by id
...