A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: core/MY_Controller.php

Line Number: 258

Backtrace:

File: /home/lourenss/www/pingen_www/application/core/MY_Controller.php
Line: 258
Function: _error_handler

File: /home/lourenss/www/pingen_www/application/core/MY_Controller.php
Line: 54
Function: get_browser_language

File: /home/lourenss/www/pingen_www/application/controllers/Api.php
Line: 7
Function: __construct

File: /home/lourenss/www/pingen_www/index.php
Line: 316
Function: require_once

Pingen | Send Letters Online for Private, Business and Software Developers

You can list your available contacts with the following URL.

        GET https://api.pingen.com/contact/list
    

URL Parameters

NameTypeRequiredDefaultOptionsNotes
limitintno0Limit the amount of results
pageintno1When limiting the results, specifies page
sortstringnonamename
company
Sorts the list by the available values
sorttypestringnoascasc
desc
Defines the way of sorting


Example: Making a request with 100 Results, getting second page, and sorting by company descending

        GET https://api.pingen.com/contact/list/limit/100/page/2/sort/company/sorttype/desc
    

Response

NameTypeNotes
errorbooleanIs true if an error occured
errorcodeintCode of the error. Only returned if error is true.
errormessagestringInformational message about the error. Only returned if error is true.
pageintCurrent page that was passed in on the request
pagesintTotal number of pages available
countintTotal number of objects available
itemscollectionCollection of Contact Objects

Example response:

    {
        "error":false,
        "page":1,
        "pages":1,
        "count":2,
        "items":[
            {
                "id":1,
                "name":"Rian Smith",
                "company":"ACME GmbH",
                "addresses":[
                    {
                        "id":2,
                        "primary":true,
                        "address":"Mainstreet 10\n8000 Zürich\nSwitzerland"
                    }
                ]
            },
            {
                "id":2,
                "name":"Daren Laureen",
                "company":"",
                "addresses":[
                    {
                        "id":"4",
                        "primary":true,
                        "address":"Privatestreet 10\n3000 Berne\nSwitzerland"
                    }
                ]
            }
        ]
    }
    

You can get your contact with the following URL:

                    GET https://api.pingen.com/contact/get/
                

URL Parameters

NameTypeRequiredDefaultOptionsNotes
idintyesThe Id of the contact


Example: Making a request for contact with id 5

                    GET https://api.pingen.com/contact/get/id/5
                

Response

NameTypeNotes
errorbooleanIs true if an error occured
errorcodeintCode of the error. Only returned if error is true.
errormessagestringInformational message about the error. Only returned if error is true.
itemobjectObject of Contact

Example response:

    {
        "error":false,
        "item":{
            "id":1,
            "name":"Rian Smith",
            "company":"ACME GmbH",
            "addresses":[
                {
                    "id":2,
                    "primary":true,
                    "address":"Mainstreet 10\n8000 Zürich\nSwitzerland"
                }
            ]
        }
    }
    

You can add new contact with the following URL:

                    POST https://api.pingen.com/contact/add
                

Body parameters

NameTypeRequiredDefaultNotes
namestringif company is empty yesFull name of the contact
companystringif name is empty yesCompany name of the contact
addressescollectionyesList of Address Objects, first on the list will be taken as primary one


Example: Creating a contact called Rian

                    POST https://api.pingen.com/contact/add/
                

Example content of data variable
        {
            "name":"Rian Smith",
            "company":"ACME GmbH",
            "addresses":[
                {
                    "address":"Mainstreet 10\n8000 Zürich\nSwitzerland"
                }
            ]
        }
     

Response

NameTypeNotes
errorbooleanIs true if an error occured
errorcodeintCode of the error. Only returned if error is true.
errormessagestringInformational message about the error. Only returned if error is true.
idintThe Id of the Contact Object that was created

Example response:

    {
        "error":false,
        "id": 43
    }
    

You can add new contact with the following URL:

                    POST https://api.pingen.com/contact/edit/
                

URL Parameters

NameTypeRequiredDefaultOptionsNotes
idintyesThe Id of the contact

Body parameters

NameTypeRequiredDefaultNotes
namestringif company is empty yesFull name of the contact
companystringif name is empty yesCompany name of the contact
addressescollectionnoList of Address Objects, first on the list will be taken as primary one.
Important: If you pass addresses, all existing addresses will be removed.


Example: Editing contact with id 5

                    POST https://api.pingen.com/contact/edit/id/5/
                

Example content of data variable
        {
            "name":"Rian Smith",
            "company":"ACME GmbH",
            "addresses":[
                {
                    "address":"Mainstreet 10\n8000 Zürich\nSwitzerland"
                }
            ]
        }
    

Response

NameTypeNotes
errorbooleanIs true if an error occured
errorcodeintCode of the error. Only returned if error is true.
errormessagestringInformational message about the error. Only returned if error is true.

Example response:

    {
        "error":false
    }
    

You can delete a contact with the following URL:

                    POST https://api.pingen.com/contact/delete/
                

URL Parameters

NameTypeRequiredDefaultOptionsNotes
idintyesThe Id of the contact


Example: Making a request for deleting document with id 5

                    POST https://api.pingen.com/contact/delete/id/5
                

Response

NameTypeNotes
errorbooleanIs true if an error occured
errorcodeintCode of the error. Only returned if error is true.
errormessagestringInformational message about the error. Only returned if error is true.

Example response:

    {
        "error":false
    }