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 post sends with the following URL.

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

URL Parameters

NameTypeRequiredDefaultOptionsNotes
limitintno0Limit the amount of results
pageintno1When limiting the results, specifies page
sortstringnodatedocument_id
date
status
Sorts the list by the available values
sorttypestringnodescasc
desc
Defines the way of sorting


Example: Making a request with 100 Results, getting second page, and sorting by date ascending

        GET https://api.pingen.com/send/list/limit/100/page/2/sorttype/asc/
    

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 Send Objects

Example response:

        {
            "error": false,
            "page": 1,
            "pages": 12,
            "count": 214,
            "items": [
                {
                    "id": 1,
                    "document_type":1,
                    "document_id": 1,
                    "document_title": "Mypdf.pdf",
                    "date": "2012-08-07 22:33:44",
                    "user_id":35,
                    "speed": 1,
                    "color": 1,
                    "address":"ACME GmbH\nBernstrasse 12\n3001 Bern\nSwitzerland",
                    "country":"CH",
                    "pages": 1,
                    "pagetype":[
                        {
                            "number":1,
                            "type":2,
                            "color":1
                        }
                    ],
                    "cost": 1.40,
                    "currency": "CHF",
                    "status": 100
                },
                {
                    "id": 2,
                    "document_type":1,
                    "document_id": 1,
                    "document_title": "Mypdf2.pdf",
                    "date": "2012-08-07 21:33:44",
                    "user_id":35,
                    "speed": 1,
                    "color": 1,
                    "address":"ACME GmbH\nBernstrasse 12\n3001 Bern\nSwitzerland",
                    "country":"CH",
                    "pages": 1,
                    "pagetype":[
                        {
                            "number":1,
                            "type":2,
                            "color":1
                        }
                    ],
                    "cost": 1.40,
                    "currency": "CHF",
                    "status": 101
                }
            ]

        }
        

You can get your post object with the following URL:

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

URL Parameters

NameTypeRequiredDefaultOptionsNotes
idintyesThe Id of the postsending


Example: Making a request for contentending with id 5

                    GET https://api.pingen.com/send/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 Send

Example response:

    {
        "error": false,
        "item": [
            {
                "id": 1,
                "document_type":1,
                "document_id": 1,
                "document_title": "Mypdf.pdf",
                "date": "2012-08-07 22:33:44",
                "user_id":35,
                "speed": 1,
                "color": 1,
                "address":"ACME GmbH\nBernstrasse 12\n3001 Bern\nSwitzerland",
                "country":"CH",
                "pages": 1,
                "pagetype":[
                    {
                        "number":1,
                        "type":2,
                        "color":1
                    }
                ],
                "cost": 1.40,
                "currency": "CHF",
                "status": 100
            }
        ]
    }
    

You can cancel post with the following URL:

                    GET https://api.pingen.com/send/cancel/id/{id}
                

Example response:

    {
        "error": false,
    }
    

You can track your sending with the following URL:

                    GET https://api.pingen.com/send/track/
                

URL Parameters

NameTypeRequiredDefaultOptionsNotes
idintyesThe Id of the postsending


Example: Making a request for contentending with id 5

                    GET https://api.pingen.com/send/track/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 Track

Example response:

    {
        "error":false,
        "item":{
            "tracking_id":"50505783.130416.000022911",
            "product":"A-Post",
            "status":"None",
            "events":[
                {
                    "processor":"Schweizerische Post AG",
                    "date":"2013-04-16 20:59:13",
                    "type": 1,
                    "description":"Sendung sortiert",
                    "zip":8010,
                    "city":"Zürich Briefzentrum",
                    "country":"CH"
                },
                {
                    "processor":"Schweizerische Post AG",
                    "date":"2013-04-17 02:10:15",
                    "type": 1,
                    "description":"Sendung sortiert",
                    "zip":3070,
                    "city":"Ostermundigen Logistikzentrum (LZB)",
                    "country":"CH"
                },
                {
                    "processor":"Pingen GmbH",
                    "date":"2013-04-16 17:00:01",
                    "type": 1,
                    "description":"Übergabe an die Post",
                    "zip":6002,
                    "city":"Luzern",
                    "country":"CH"
                }
            ]
        }
    }
    

Retreive the possible sending speeds for a country or list of countries with the following url:

                    GET https://api.pingen.com/send/speed/
                

URL Parameters

NameTypeRequiredDefaultOptionsNotes
countriesstringyesComma-delimited list of Countries (example: CH or CH,DE)


Example: Making a request for contentending with id 5

                    GET https://api.pingen.com/send/speed/countries/CH,DE
                

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.
itemobjectArray of available speed id and name

Example response:

    {
        "error":false,
        "item":{
            [
                {
                    "id":"1",
                    "name":"Priority"
                },
                {
                    "id":"2",
                    "name":"Economy"
                },
            ]
        }
    }