Add new contact person to existing client.
URL: /contact_people/add/api:1
HTTP method: POST
data='{
"ContactPerson":{
"client_id":1,
"name":"John",
"email":"[email protected]"
}
}';
curl -X POST \
-d "data=$data" \
-H 'Authorization: SFAPI email=api%40example.com&apikey=c0a4cdcdfe98ca660942d60cf7896de6&company_id=' \
https://moja.superfaktura.sk/contact_people/add/api:1
name | type | description | default value |
---|---|---|---|
client_id | int | ID of client, whom will be added contact person | |
string | contact person's email | ||
name | string | contact person's name |
name | type | description | default value |
---|---|---|---|
phone | string | contact person's phone |
{
"data": {
"ContactPerson": {
"client_id": 1,
"created": "2050-01-01 23:59:59",
"email": "[email protected]",
"id": "2",
"modified": "2050-01-01 23:59:59",
"name": "John",
"user_id": "1",
"user_profile_id": "1"
}
},
"state": "SUCCESS"
}
{
"error": 1,
"message": "Klient sa nenašiel. Prosím skontrolujte kľúč client_id.",
"state": "ERROR"
}
HTTP status 403
{
"error": 1,
"error_message": "Nemôžete pridať kontaktnú osobu",
"message": "Nemôžete pridať kontaktnú osobu"
}
Get list of contact persons for client.
URL: /contact_people/getContactPeople/{ID}
HTTP method: GET
curl -X GET \
-H 'Authorization: SFAPI email=api%40example.com&apikey=c0a4cdcdfe98ca660942d60cf7896de6&company_id=' \
https://moja.superfaktura.sk/contact_people/getContactPeople/3
URL parameters:
name | type | description | default value |
---|---|---|---|
id | int | client ID |
none
[
{
"ContactPerson": {
"client_id": "3",
"created": "2050-01-01 23:59:59",
"email": "[email protected]",
"id": "1",
"modified": "2050-01-01 23:59:59",
"name": "Janko Hrasko",
"phone": null,
"user_id": "1",
"user_profile_id": "1"
}
},
{
"ContactPerson": {
"account": null,
"address": "Pri Suchom mlyne 6",
"bank_account": "",
"bank_account_id": "0",
"bank_account_prefix": null,
"bank_code": "",
"city": "Bratislava - mestská časť Staré Mesto",
"client": true,
"comment": "",
"country": "Slovensko",
"country_id": "191",
"created": "2050-01-01 23:59:59",
"currency": null,
"default_variable": "",
"delivery_address": "",
"delivery_city": "",
"delivery_country": "Slovensko",
"delivery_country_id": "191",
"delivery_name": "",
"delivery_phone": "",
"delivery_state": "",
"delivery_zip": "",
"dic": "2023513470",
"discount": null,
"distance": null,
"dont_travel": null,
"due_date": null,
"email": "",
"fax": "",
"iban": "",
"ic_dph": "SK2023513470",
"ico": "46655034",
"id": "3",
"modified": "2050-01-01 23:59:59",
"name": "SuperFaktura, s.r.o.",
"notices": true,
"phone": "",
"state": "",
"swift": "",
"tags": null,
"user_id": "1",
"user_profile_id": "1",
"uuid": null,
"zip": "811 04"
}
}
]
[
{
"ContactPerson": {
"client": true
}
}
]
Deletes contact person from client.
URL: /contact_people/delete/{ID}
HTTP method: GET
curl -X GET \
-H 'Authorization: SFAPI email=api%40example.com&apikey=c0a4cdcdfe98ca660942d60cf7896de6&company_id=' \
https://moja.superfaktura.sk/contact_people/delete/1
URL parameters:
name | type | description | default value |
---|---|---|---|
id | int | contact ID |
none
{
"error": 0
}
{
"error": 1
}
HTTP status 403
{
"error": 1,
"error_message": "Nemôžete vymazať kontaktnú osobu",
"message": "Nemôžete vymazať kontaktnú osobu"
}