{"_id":"579fa0a906206b170008859a","user":"5795d43eb9ee2d0e00df357a","version":{"_id":"56e29a8dd3b68d0e00b48ffd","hasReference":true,"project":"56e29a8dd3b68d0e00b48ffa","__v":15,"hasDoc":true,"createdAt":"2016-03-11T10:14:37.460Z","releaseDate":"2016-03-11T10:14:37.460Z","categories":["56e29a8ed3b68d0e00b48ffe","56eb917a2e58011700afdfcc","56eb92252109011700f3ba5e","5704d4af849f721900f27835","57052a31473f900e004d5d54","5715222811537f19006aab2d","5715b57b810df00e00cc7832","5715baa9810df00e00cc7837","57180ed83a17770e009a7322","571810273a17770e009a7325","579b22d3f4ad7b190094b60e","584538ecba4f1c0f0096925e","586bb88e5602870f00ae7177","5a70407fb0a01400369583c5","5ace359e40606a0003eac1de"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"category":{"_id":"579b22d3f4ad7b190094b60e","project":"56e29a8dd3b68d0e00b48ffa","__v":0,"version":"56e29a8dd3b68d0e00b48ffd","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-07-29T09:33:07.078Z","from_sync":false,"order":1,"slug":"accounts","title":"Accounts"},"__v":3,"githubsync":"","parentDoc":null,"project":"56e29a8dd3b68d0e00b48ffa","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-08-01T19:19:05.672Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"name":"","code":"{\n    \"Id\": 4817517,\n    \"Email\": \"test:::at:::example.com\",\n    \"Packages\": {\n        \"Account\": [\n            \"8v32JuRR06wVV9YPc7gssWMGCRdmq1DElQLNDVZwWBijURhzAAFURbDIFb3aq16K\",\n          ]\n    }\n    \"FirstName\": 'Updated Test',\n    \"LastName\": 'Updated Example',\n    \"Company\": 'Updated Example.com',\n    \"Phone\": '+44-7500-000-000',\n    \"Address\": '123 Test Street, London, UK',\n    \"SIREN\": null,\n    \"Roles\": \"User\",\n    \"Active\": true\n}","language":"json"},{"language":"json","status":400,"name":"","code":"{ 'Message' : 'This email exists already.' }"},{"code":"{ 'Message' : 'Bad authentication information error.' }","language":"json","status":401}]},"settings":"","examples":{"codes":[{"language":"php","code":"<?php\n// Example assumes Composer is in use with GuzzleHttp as the API library.\nrequire_once(\"vendor/autoload.php\");\nuse GuzzleHttp\\Client;\n\n// Production environment endpoint\n// $api_base_uri = 'https://api.single-invoice.co/v2.0';\n\n// Sandbox environment endpoint\n$api_base_uri = 'https://api-demo.single-invoice.co/v2.0';\n\n// Create a client and provide a base URL\n$client = new Client([ \n\t'timeout' \t=> 4.0,\n\t'verify'\t=> true,\n\t'debug'\t\t=> true\n]);\n\ntry\n{\n  // PUT the account creation request with the required parameters\n  $response = $client->request('PUT', $api_base_uri.\"/Account\", [\n    'header' => [ 'apikey' => '4hVoCZbHptjhz1NaWvekZeXltKPOL2EzZf6DxuAd1BTiHAbx1DYCogPaZGj0CS5a\n  ' ],\n    'json' \t=> \t[ \n            'email' => 'test@example.com',\n            'password' => 'examplePassword123!',\n            'Phone' => '+44-7500-000-000'\n          ] \n  ]);\n\n  // Check the status code returned by the call\n  $statusCode = $response->getStatusCode();\n\n  // Get the data\n  $data = json_decode($response->getBody(), true);\n}\ncatch (GuzzleHttp\\Exception\\ClientException $e) \n{\n\t$response = $e->getResponse();\n\t$responseBodyAsString = $response->getBody()->getContents();\n}"},{"name":"Node.JS","code":"// Example assumes the packages request and request-promise have been installed (npm install request request-promise)\nvar rp = require('request-promise');\n\nvar apiBaseUri = 'https://api.armadill.io/v2.0';\nvar apikey = 'l5497gqJ5FaKGxIm0uQOYkVYn2HiAxr7strDNxpz8GIT8G7tgnN5n4JKsqFBmmXx';\n\nrp({\n  method: 'PUT',\n  uri: apiBaseUri + '/Account',\n  headers: {\n    apikey: apikey\n  },\n  body: {\n    FirstName: 'Bob',\n    LastName: 'Smith',\n    Phone: '+44-7500-000-000',\n    Company: 'Bob Corporation',\n    Address: 'Grand Boulevard, 7th, Great-town',\n    SIREN: '123456789'\n  },\n  json: true\n})\n  .then(function (res) {\n    // request succeeded, the result is available in the res object\n  })\n  .catch(function (err) {\n    // request failed, the error is available in the err object\n  })\n;\n\n","language":"javascript"}]},"method":"put","auth":"required","params":[{"_id":"579b24968a700d290067cb68","ref":"","in":"body","required":true,"desc":"The email address for the acccount.","default":"","type":"string","name":"email"},{"_id":"579fa0a906206b170008859b","ref":"","in":"header","required":true,"desc":"Your Account Management API Key, in the HTTP request headers.","default":"","type":"string","name":"apikey"},{"_id":"579b24968a700d290067cb67","ref":"","in":"body","required":true,"desc":"Password for the account.","default":"","type":"string","name":"password"},{"_id":"579b2a118a700d290067cb70","ref":"","in":"body","required":false,"desc":"The name for the account holder.","default":"","type":"string","name":"firstname"},{"_id":"57a04fcec6b7670e00db27f8","ref":"","in":"body","required":false,"desc":"The surname for the account holder.","default":"","type":"string","name":"lastname"},{"_id":"579b2a118a700d290067cb6f","ref":"","in":"body","required":false,"desc":"The name of the company registering the account.","default":"","type":"string","name":"company"},{"_id":"579b2a118a700d290067cb6d","ref":"","in":"body","required":false,"desc":"Contact phone number.","default":"","type":"string","name":"phone"},{"_id":"579b2a118a700d290067cb6c","ref":"","in":"body","required":false,"desc":"Physical address for correspondence.","default":"","type":"string","name":"address"}],"url":"/account"},"isReference":true,"order":1,"body":"This method allows users to update their Single-Invoice.co user account record. Only the fields that you want to update need to be submitted. \n\nIf the update is successful, the full record will be returned as a JSON response, including the updates.","excerpt":"Update the details of an Single-Invoice.co account.","slug":"update-account","type":"endpoint","title":"Update Account"}

putUpdate Account

Update the details of an Single-Invoice.co account.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

email:
required
string
The email address for the acccount.
password:
required
string
Password for the account.
firstname:
string
The name for the account holder.
lastname:
string
The surname for the account holder.
company:
string
The name of the company registering the account.
phone:
string
Contact phone number.
address:
string
Physical address for correspondence.

Headers

apikey:
required
string
Your Account Management API Key, in the HTTP request headers.

Examples


Result Format


Documentation

This method allows users to update their Single-Invoice.co user account record. Only the fields that you want to update need to be submitted. If the update is successful, the full record will be returned as a JSON response, including the updates.