GET Account Addresses - TextKing/textking-api GitHub Wiki

GET /account/addresses

Request: GET /account/addresses

Returns the list of billing addresses of the authorized customer.

Query parameters

Parameter Description
per_page An integer value defining how many entries should be returned. Only values between 1 and 100 (both inclusive) are allowed. If not given, this defaults to 100.
page Return search results starting at a given page. Used for paging through more than one page of results.

Request headers

Header Description
Authorization oAuth 2 authentication header
Accept application/json or application/xml

Response status codes

HTTP status Description
200 Ok Successful request.

Example

Load all billing addresses for the authorized customer:

GET /v1/account/addresses HTTP/1.1
Host: api.textking.com
Accept: application/json
Authorization: Bearer youraccesstoken

Response:

HTTP/1.1 200 Ok
Content-Type: application/json; charset=utf-8

{
    "page": 1,
    "per_page": 100,
    "total": 1,
    "items": [
        {
            "id": "9c6f23b6-167d-4b01-977f-4de799e3abf3",
            "company": "TEXTKING Deutschland GmbH",
            "vat_number": "DE280599152",
            "street": "Storkowerstr. 115",
            "zip": "10407",
            "city": "Berlin",
            "country": "DE",
            "firstname": "Jann-Martin",
            "lastname": "Mauer",
            "gender": "male",
            "is_default": true,
            "links": [
                {
                    "rel": "self",
                    "href": "https://api.textking.com/v1/account/address/9c6f23b6-167d-4b01-977f-4de799e3abf3"
                }
            ]
        },
        {
            "id": "F908A6AB-E91D-4DF2-AE3B-32E983E67E95",
            "company": "TEXTKING AG",
            "vat_number": "DE280599152",
            "street": "Hauptstrasse 17",
            "zip": "8598",
            "city": "Bottighofen",
            "country": "CH",
            "firstname": "Philipp",
            "lastname": "Wolfer",
            "gender": "male",
            "is_default": false,
            "links": [
                {
                    "rel": "self",
                    "href": "https://api.textking.com/v1/account/address/F908A6AB-E91D-4DF2-AE3B-32E983E67E95"
                }
            ]
        }
    ],
    "links": [
        {
            "rel": "self",
            "href": "https://api.textking.dev/v1/account/addresses?page=1&per_page=100"
        }
    ]
}
⚠️ **GitHub.com Fallback** ⚠️