Profile

Allowed HTTP methods

Method Description
GET get the profile object
PUT update the profile object

Note

See RFC 2616 for more details on HTTP methods semantics

Listing

GET /profile/

Gets the user profile. Note that profile is a single object so the API does not return a list.

statuscode 200:no error

Example request:

GET /api/2.0/profile/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

Example response:

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

{
    "address": "1 Main str.",
    "api_https_only": false,
    "autotopup_amount": "0E-16",
    "autotopup_threshold": "0E-16",
    "bank_reference": "jdoe123",
    "company": "",
    "country": "US",
    "currency": "USD",
    "email": "user@example.com",
    "first_name": "John",
    "has_autotopup": false,
    "invoicing": true,
    "key_auth": false,
    "language": "EN",
    "last_name": "Doe",
    "mailing_list": true,
    "meta": {},
    "my_notes": "",
    "nickname": "",
    "phone": "",
    "postcode": "1000",
    "reseller": "",
    "signup_time": "2013-04-24T07:35:36.141574+00:00",
    "state": "REGULAR",
    "tax_name": null,
    "tax_rate": null,
    "title": "",
    "town": "Dallas",
    "uuid": "6f670b3c-a2e6-433f-aeab-b976b1cdaf03",
    "vat": ""
}

Editing

PUT /profile/
statuscode 200:no error

Edits a user profile. (We want to change the company name for example)

Example request:

PUT /api/2.0/profile/ HTTP/1.1
Content-Type: application/json
Authorization: Basic SWYgeW91IGZvdW5kIHRoaXMsIGhhdmUgYSBjb29raWUsIHlvdSBkZXNlcnZlIGl0IDop

{
    "address": "1 Main str.",
    "api_https_only": false,
    "autotopup_amount": "0E-16",
    "autotopup_threshold": "0E-16",
    "bank_reference": "jdoe123",
    "company": "Newly Set Company Name",
    "country": "US",
    "currency": "USD",
    "email": "user@example.com",
    "first_name": "John",
    "has_autotopup": false,
    "invoicing": true,
    "key_auth": false,
    "language": "EN",
    "last_name": "Doe",
    "mailing_list": true,
    "meta": {},
    "my_notes": "",
    "nickname": "",
    "phone": "",
    "postcode": "1000",
    "reseller": "",
    "signup_time": "2013-04-24T07:35:36.141574+00:00",
    "state": "REGULAR",
    "tax_name": null,
    "tax_rate": null,
    "title": "",
    "town": "Dallas",
    "uuid": "6f670b3c-a2e6-433f-aeab-b976b1cdaf03",
    "vat": ""
}

Example response:

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

{
    "address": "1 Main str.",
    "api_https_only": false,
    "autotopup_amount": "0E-16",
    "autotopup_threshold": "0E-16",
    "bank_reference": "jdoe123",
    "company": "Newly Set Company Name",
    "country": "US",
    "currency": "USD",
    "email": "user@example.com",
    "first_name": "John",
    "has_autotopup": false,
    "invoicing": true,
    "key_auth": false,
    "language": "EN",
    "last_name": "Doe",
    "mailing_list": true,
    "meta": {},
    "my_notes": "",
    "nickname": "",
    "phone": "",
    "postcode": "1000",
    "reseller": "",
    "signup_time": "2013-04-24T07:35:36.141574+00:00",
    "state": "REGULAR",
    "tax_name": null,
    "tax_rate": null,
    "title": "",
    "town": "Dallas",
    "uuid": "6f670b3c-a2e6-433f-aeab-b976b1cdaf03",
    "vat": ""
}

Schema

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

{
    "allowed_detail_http_methods": [
        "get",
        "put"
    ],
    "allowed_list_http_methods": [
        "get",
        "put"
    ],
    "default_format": "application/json",
    "default_limit": 20,
    "fields": {
        "address": {
            "blank": false,
            "default": "",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "api_https_only": {
            "blank": false,
            "default": false,
            "help_text": "Boolean data. Ex: True",
            "nullable": false,
            "readonly": false,
            "type": "boolean",
            "unique": false
        },
        "autotopup_amount": {
            "blank": false,
            "default": 0,
            "help_text": "Fixed precision numeric data. Ex: 26.73",
            "nullable": false,
            "readonly": false,
            "type": "decimal",
            "unique": false
        },
        "autotopup_threshold": {
            "blank": false,
            "default": 0,
            "help_text": "Fixed precision numeric data. Ex: 26.73",
            "nullable": false,
            "readonly": false,
            "type": "decimal",
            "unique": false
        },
        "bank_reference": {
            "blank": true,
            "default": "No default provided.",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": true,
            "readonly": true,
            "type": "string",
            "unique": false
        },
        "company": {
            "blank": false,
            "default": "",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "country": {
            "blank": false,
            "default": "",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "currency": {
            "blank": true,
            "default": "No default provided.",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": true,
            "readonly": true,
            "type": "string",
            "unique": false
        },
        "email": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": true,
            "type": "string",
            "unique": false
        },
        "first_name": {
            "blank": false,
            "default": "",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "has_autotopup": {
            "blank": false,
            "default": false,
            "help_text": "Boolean data. Ex: True",
            "nullable": false,
            "readonly": false,
            "type": "boolean",
            "unique": false
        },
        "invoicing": {
            "blank": false,
            "default": true,
            "help_text": "Boolean data. Ex: True",
            "nullable": false,
            "readonly": false,
            "type": "boolean",
            "unique": false
        },
        "key_auth": {
            "blank": false,
            "default": false,
            "help_text": "Boolean data. Ex: True",
            "nullable": false,
            "readonly": false,
            "type": "boolean",
            "unique": false
        },
        "language": {
            "blank": false,
            "default": "EN",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "last_name": {
            "blank": false,
            "default": "",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "mailing_list": {
            "blank": false,
            "default": true,
            "help_text": "Boolean data. Ex: True",
            "nullable": false,
            "readonly": false,
            "type": "boolean",
            "unique": false
        },
        "meta": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "A dictionary of data. Ex: {'price': 26.73, 'name': 'Daniel'}",
            "nullable": false,
            "readonly": false,
            "type": "dict",
            "unique": false
        },
        "my_notes": {
            "blank": false,
            "default": "",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": true,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "nickname": {
            "blank": false,
            "default": "",
            "help_text": "User nickname",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "phone": {
            "blank": false,
            "default": "",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "postcode": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": true,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "reseller": {
            "blank": false,
            "default": "",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "signup_time": {
            "blank": false,
            "default": "2013-12-10T11:29:34.875931+00:00",
            "help_text": "A date & time as a string. Ex: \"2010-11-10T03:07:43\"",
            "nullable": false,
            "readonly": false,
            "type": "datetime",
            "unique": false
        },
        "state": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": true,
            "type": "string",
            "unique": false
        },
        "tax_name": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": true,
            "readonly": true,
            "type": "string",
            "unique": false
        },
        "tax_rate": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "Fixed precision numeric data. Ex: 26.73",
            "nullable": true,
            "readonly": true,
            "type": "decimal",
            "unique": false
        },
        "title": {
            "blank": false,
            "default": "",
            "help_text": "User title",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "town": {
            "blank": false,
            "default": "",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        },
        "uuid": {
            "blank": false,
            "default": "No default provided.",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": true,
            "type": "string",
            "unique": false
        },
        "vat": {
            "blank": false,
            "default": "",
            "help_text": "Unicode string data. Ex: \"Hello World\"",
            "nullable": false,
            "readonly": false,
            "type": "string",
            "unique": false
        }
    }
}