### Get All Deals Source: https://github.com/sugester/api/blob/master/README.md Retrieves a list of all deals associated with the account. Requires an API token for authentication. The response will contain detailed information for each deal. ```shell curl http://YOUR-PREFIX.sugester.pl/app/deals.json?api_token=YOUR_API_TOKEN ``` -------------------------------- ### Get All Tasks via Sugester API Source: https://github.com/sugester/api/blob/master/README.md Retrieves a list of all tasks from the Sugester system, including those from the helpdesk. The API token is used for authentication as a query parameter. ```shell curl http://YOUR-PREFIX.sugester.pl/app.json?api_token=YOUR_API_TOKEN ``` -------------------------------- ### Get All Clients via Sugester API Source: https://github.com/sugester/api/blob/master/README.md Retrieves a list of all clients from the Sugester system via the API. Authentication is done by appending the API token as a query parameter. ```shell curl http://YOUR-PREFIX.sugester.pl/app/clients.json?api_token=YOUR_API_TOKEN ``` -------------------------------- ### Get Deal Source: https://github.com/sugester/api/blob/master/README.md Retrieves the details of a specific deal using its ID. An API token is required for authentication. The response includes all information pertaining to the requested deal. ```shell curl http://YOUR-PREFIX.sugester.pl/app/deals/1234.json?api_token=YOUR_API_TOKEN ``` -------------------------------- ### Get Single Client via Sugester API Source: https://github.com/sugester/api/blob/master/README.md Fetches details for a specific client from the Sugester system using the API. The client's ID is included in the URL, and authentication is handled via the API token query parameter. ```shell curl http://YOUR-PREFIX.sugester.pl/app/clients/1234.json?api_token=YOUR_API_TOKEN ``` -------------------------------- ### Get Contact Source: https://github.com/sugester/api/blob/master/README.md Retrieves the details of a specific contact using its ID. Authentication is performed using an API token. The response provides comprehensive information about the contact. ```shell curl http://YOUR-PREFIX.sugester.pl/app/contacts/1234.json?api_token=YOUR_API_TOKEN ``` -------------------------------- ### Get Single Task via Sugester API Source: https://github.com/sugester/api/blob/master/README.md Fetches details for a specific task (post) from the Sugester system using its ID. The API token is required for authentication via the query parameter. ```shell curl http://YOUR-PREFIX.sugester.pl/app/posts/1234.json?api_token=YOUR_API_TOKEN ``` -------------------------------- ### Get Contact List Source: https://github.com/sugester/api/blob/master/README.md Retrieves the details of a specific contact list by its ID. An API token is required for authentication. This allows viewing the contacts within a particular list. ```shell curl https://YOUR_PREFIX.sugester.pl/app/contact_lists/10.json?api_token=YOUR_API_TOKEN ``` -------------------------------- ### Create Client Source: https://github.com/sugester/api/blob/master/README.md Adds a new client to Sugester, often used for integrations. Requires an API token and a JSON payload with client details, including name, email, and optional external IDs for linking with other systems. ```shell curl https://YOUR_PREFIX.sugester.pl/app/clients.json \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d \ '{ "api_token": "YOUR_API_TOKEN", "client": { "name": "client 2 from External APP via API", "email": "c2@emailexample.net", "note": "note ext 2", "external_ids": { "myapp_client_id": "17" } } }' ``` -------------------------------- ### Create Account Source: https://github.com/sugester/api/blob/master/README.md Creates a new account within Sugester. This endpoint requires an API token and a JSON payload containing account details like prefix and initial module, along with user credentials for the new account. ```shell curl http://YOUR-PREFIX.sugester.pl/app/account.json \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d \ '{ "api_token": "YOUR_API_TOKEN", "account": { "prefix":"sugester2", "initial_module": "crm", "from_partner": "partner1" }, "user": { "login": "login1", "email": "email1@sugester-email.pl", "password": "password1" } }' ``` -------------------------------- ### Create Deal for Integration Source: https://github.com/sugester/api/blob/master/README.md Creates a new deal, potentially as part of an integration process. Requires an API token and a JSON payload including deal details, price, and associated client information. External IDs can be provided for tracking. ```shell curl https://YOUR_PREFIX.sugester.pl/app/deals.json \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d \ '{ "api_token": "YOUR_API_TOKEN", "deal": { "name": "deal 2 from External APP via API", "description": "desc 2", "price": 117, "client": { "name": "client 2 from External APP via API", "email": "c2@emailexample.net", "external_ids": { "myapp_client_id": "17" } }, "external_ids": { "myapp_invoice_id": "21" } } }' ``` -------------------------------- ### Add Client via Sugester API Source: https://github.com/sugester/api/blob/master/README.md Adds a new client to the Sugester system using the API. Requires an API token for authentication and client details such as name and email in JSON format. ```shell curl http://YOUR-PREFIX.sugester.pl/app/clients.json\ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d ' { "api_token": "YOUR_API_TOKEN", "client": { "name":"client 1 from API", "email": "client1@emailexample1.net", "note": "note 1" } }' ``` -------------------------------- ### Add Deal via Sugester API Source: https://github.com/sugester/api/blob/master/README.md Creates a new deal in the Sugester system through the API. This operation requires the deal's name and description, along with the API token for authentication. ```shell curl http://YOUR-PREFIX.sugester.pl/app/deals.json\ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d ' { "api_token": "YOUR_API_TOKEN", "deal": { "name":"deal 1 from API", "description": "desc 1", "client_id": null } }' ``` -------------------------------- ### Create Contact List Source: https://github.com/sugester/api/blob/master/README.md Creates a new contact list in Sugester. Requires an API token and a JSON payload specifying the list's name. This is useful for organizing contacts for marketing campaigns or other purposes. ```shell curl https://YOUR_PREFIX.sugester.pl/app/contact_lists.json \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d \ '{ "api_token": "YOUR_API_KEY", "contact_list": { "name": "New contact list" } }' ``` -------------------------------- ### Add Task via Sugester API Source: https://github.com/sugester/api/blob/master/README.md Creates a new task (or post) in the Sugester system via the API. This includes details like title, content, task type, and the responsible user ID. Authentication is performed using an API token. ```shell curl http://YOUR-PREFIX.sugester.pl/app/posts.json \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d ' { "api_token": "YOUR_API_TOKEN", "post": { "title":"task title 1 from API", "content": "task content 1", "task_kind": "task", "client_id": null, "responsible_id": 1234 } }' ``` -------------------------------- ### Create Post (Error Type) Source: https://github.com/sugester/api/blob/master/README.md Creates a new post in Sugester with a specified type, such as 'error'. Requires an API token and a JSON payload including the post's title, content, and kind. ```shell curl http://your-prefix.sugester.pl/app/posts.json \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d \ '{ "api_token": "API_TOKEN", "post": { "title":"post title2", "content": "post content 2", "kind": "error" } }' ``` -------------------------------- ### Update Client via Sugester API Source: https://github.com/sugester/api/blob/master/README.md Updates the details of an existing client in the Sugester system via the API. Requires the client's ID in the URL and the updated information in JSON format, along with the API token for authentication. ```shell curl http://YOUR-PREFIX.sugester.pl/app/clients/1234.json\ -X PUT \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d ' { "api_token": "YOUR_API_TOKEN", "client": { "note": "note from API" } }' ``` -------------------------------- ### Create Contact Source: https://github.com/sugester/api/blob/master/README.md Adds a new contact to Sugester. This endpoint requires an API token and a JSON payload containing contact details such as name, email, and responsible ID. Custom fields can also be included. ```shell curl http://YOUR_PREFIX.sugester.pl/app/contacts.json\ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d \ '{ "api_token": "YOUR_API_TOKEN", "contact": { "name":"contact 1 from API", "description": "new contact from API", "first_name": "John", "last_name": "Doe", "responsible_id": 1, "email": "contact@example.com", "phone": "123456789" } }' ``` -------------------------------- ### Update Deal Source: https://github.com/sugester/api/blob/master/README.md Updates an existing deal in Sugester. Requires the deal ID and an API token. The request body should contain the updated deal information, such as a new description. ```shell curl http://YOUR_PREFIX.sugester.pl/app/deals/1234.json\ -X PUT \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d \ '{ "api_token": "YOUR_API_TOKEN", "deal": { "description": "new description from API" } }' ``` -------------------------------- ### Post Object Fields Source: https://github.com/sugester/api/blob/master/README.md Details the fields for a 'Post' object, which can represent tasks, suggestions, reports, or emails within the Sugester API. It includes content, user information, status, and metadata. ```shell { "id": id posta "title": tytuł "content": treść "kind": rodzaj sugestii ('suggestion', 'error', 'question', 'praise', 'private'), "user_id": id usera "points": liczba punktów "nick": nick usera "votes_cache": ilość oddanych głosów "comments_cache": ilość oddanych komentarzy "forum_id": id forum "category_id": id category "created_at": czas utworzenia "updated_at": czas ostatniej modyfikacji "ip": ip z którego oddano post "agent": info o przeglądarce "response": odpowiedź główna "response_user_id": id osoby która odpowiedziała "referrer":refferer "responsible_id": id przypisanej osoby "last_action_status": status ("created"), "email": email nadawcy "uid": token użytkownika, "spam_kind": rodzaj spamu, "answer": odpowiedz, "answered": czy jest odpowiedz, "duplicate_from_id": id duplikatu, "abstract": abstrakt, "status_id": id status, "view_count": ilość wyświetleń, "tags": tagi, "facebook_likes": ilość like facebokoowych, "min_votes_to_start": ilość głosów do rozpoczęcia prac, "use_html": czy html, "email_to": adres email do, "email_cc": adres email cc, "email_bcc": adres email bcc, "spam_score": scoring spamowy, "spam_report": info o spamie, "closed": czy zamkniete (true/false), "scheduled_at": przypisana data wykonania, "task_kind": rodzaj zadania ('feedback', 'email', 'task', 'help', 'chat', 'phone', 'lead', 'error', 'idea'), "priority": priorytet, "title_note": null, "user_spam_report": zgłoszenie spamu, "client_id": id klienta, "project_id": id projektu, "help_link": klucz linka pomocy, "help_content": treść pomocy, "post_id": id postu nadrzędnego, "www": strona www dodajacego post, "private": czy prywatny (true/false), "unread": czy nie przeczytany (true/false), "email_recipient": do kogo jest dany post (uzywane w helpdesk/mail), "email_reply_to": reply to (uzywane w helpdesk/mail) } ``` -------------------------------- ### Klient Object Fields Source: https://github.com/sugester/api/blob/master/README.md Defines the structure and fields for a 'Klient' (Client) object within the Sugester API. This includes identification, contact information, financial details, and custom fields. ```shell { "id": id klienta "name": nazwa klienta "tax_no": numer nip "post_code": kod pocztowy "city": miejscowosc "street": ulica "first_name": imię "country": kraj "email": e-mail "phone": telefon "www": strona www "fax": fax "created_at": utworzenie "updated_at": aktualizcja "street_no": ulica "kind": rodza ('buyer/seller') "bank": nazwa banku "bank_account": konto bankowe "bank_account_id": "shortcut": skrót nazwy klienta "note": notatka "last_name": nazwisko "discount": zniżka "payment_to_kind": domyślny cza płatności faktury "use_delivery_address": adres korespondencyjny aktywny "delivery_address": adres korespondencyjny "mobile_phone": telefon komórkowy "company": czy firma "register_number": numer regon "description": opis "project_id": id projektu "contact_id": id kontaktu głównego "appendixes_count": ilość załączników "posts_count": ilość emaili/zadań "contacts_count": ilość kontaktów "last_activity": ostatnia aktywność "string1..10": pola dodatkowe "integer1..10": pola dodatkowe "decimal1..10": pola dodatkowe "checkbox1..10": pola dodatkowe "date1..10": pola dodatkowe "text1..10": pola dodatkowe "datetime1..10": pola dodatkowe "avatar_file_name": avatar "avatar_content_type" "avatar_file_size" "avatar_updated_at" "status_id": id statusu "category_id": id kategorii "department_id": id departamentu "position": pozycja "creator_id": id osoby ktora dodala "updater_id": id osoby ktora ostatnio aktualizowala "responsible_id": id osoby odpowiedzialnej "province": wojewodztwo "sensitive_data": czy dane ukryte "external_id": ID klienta "token": token klienta "paid_from": od kiedy płatny "paid_to": do kiedy płatny "paid_total": suma płatności od klienta } ``` -------------------------------- ### Update Contact Source: https://github.com/sugester/api/blob/master/README.md Updates an existing contact's information in Sugester. This requires the contact ID and an API token. The request body should contain the fields to be updated, such as the description. ```shell curl http://YOUR_PREFIX.sugester.pl/app/contacts/1234.json\ -X PUT \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d \ '{ "api_token": "YOUR_API_TOKEN", "contact": { "description": "new description from API" } }' ``` -------------------------------- ### Delete Deal Source: https://github.com/sugester/api/blob/master/README.md Deletes a specific deal from Sugester using its ID. This operation requires an API token for authorization. Ensure the correct deal ID is provided to avoid unintended data loss. ```shell curl -X DELETE http://YOUR-PREFIX.sugester.pl/app/deals/12345.json?api_token=YOUR_API_TOKEN ``` -------------------------------- ### Add Comment to Task via Sugester API Source: https://github.com/sugester/api/blob/master/README.md Adds a comment to an existing task in the Sugester system via the API. The task's ID (`post_id`) must be provided, along with the comment content and other relevant details. Authentication uses an API token. ```shell curl http://YOUR-PREFIX.sugester.pl/app/posts.json \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d ' { "api_token": "YOUR_API_TOKEN", "post": { "post_id": 123, "title":"comment for task 123", "content": "comment content 1", "task_kind": "comment", "client_id": null, "responsible_id": 1234 } }' ``` -------------------------------- ### Delete Client via Sugester API Source: https://github.com/sugester/api/blob/master/README.md Removes a client from the Sugester system using the API. The client's ID is specified in the URL, and the request uses the DELETE HTTP method with API token authentication. ```shell curl -X DELETE http://YOUR-PREFIX.sugester.pl/app/clients/12345.json?api_token=YOUR_API_TOKEN ``` -------------------------------- ### Update Contact List Source: https://github.com/sugester/api/blob/master/README.md Updates an existing contact list in Sugester. Requires the list ID and an API token. The request body allows modification of the list's properties, such as its name. ```shell curl https://YOUR_PREFIX.sugester.pl/app/contact_lists/10.json \ -X PUT \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d \ '{ "api_token": "YOUR_API_TOKEN", "contact_list": { "name": "New contact list updated" } }' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.