{"__v":3,"_id":"57dfb45e5927cb0e002bce39","category":{"project":"571f5e8cd8667f0e00a3c498","version":"571f5e8cd8667f0e00a3c49b","_id":"571f7d2720695f3400f38797","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-04-26T14:37:27.487Z","from_sync":false,"order":3,"slug":"session-api","title":"Session-API"},"parentDoc":null,"project":"571f5e8cd8667f0e00a3c498","user":"5720c075db52d01700f5d1e4","version":{"__v":12,"_id":"571f5e8cd8667f0e00a3c49b","hasDoc":true,"hasReference":true,"project":"571f5e8cd8667f0e00a3c498","createdAt":"2016-04-26T12:26:52.312Z","releaseDate":"2016-04-26T12:26:52.312Z","categories":["571f5e8cd8667f0e00a3c49c","571f73cfcb4baa0e00d13a80","571f7451cb4baa0e00d13a88","571f7d2720695f3400f38797","571f7fb0ac2a080e0014c661","571f884be54f2d0e003ebb0a","572200c9ecb38d0e00d80ebd","572c301e7c8eff0e00aaa174","57df91b2c6348d0e0020c452","57e104db9ff1e21900a721ab","57fd04caeaa77f19008b8202","5899c7113514ce0f0014da84"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-09-19T09:48:14.225Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"php","code":"<?php \n$curl = curl_init(\"https://secure.fundraisingbox.com/app/updateSession\");\n \ncurl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__).'/cacert.pem');\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($curl, CURLOPT_POST, true);\n \n// set values\n$data = array(\n  \"hash\" => \"{your_form_hash}\",\n  \"fbSessionHash\" => \"{your_session_hash}\",\n  \"payment\" => array(\n\t\t\"first_name\" => \"Max\",\n    \"last_name\" => \"Mustermann\",\n\t\t\"amount\" => \"20\"\n  )\n);\ncurl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));\n \n// receive session\n$result = json_decode(curl_exec($curl), true);\n$status = $result[\"status\"];\n$session = $result[\"session\"];\n \n// TODO error handling\n$curl_error = curl_error($curl);\n$http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n$curl_error_no = curl_errno($curl);\nif($curl_error)\n{\n   // do something\n}\n \ncurl_close($curl);\n\n// ..."}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"status\": \"success\",\n  \"session\": {\n    // see Session JSON\n\t\t\"hash\": \"0ds1mku0o018wqtkscqcm2kt75l6gjtf57dfb8c04a238\",\n    \"status\": \"incomplete\",\n    \"errors\": {...},\n  \t\"values\": {...},\n    ...\n\t}\n}","name":""},{"code":"{\n  \"status\": \"error\",\n  \"error\": \"...\"\n}","language":"json","status":400}]},"settings":"","auth":"never","params":[{"_id":"57dfbb664d55c022002811df","ref":"","in":"query","required":false,"desc":"required: hash of the form","default":"","type":"string","name":"hash"},{"_id":"57e0e5d3082ddd190062266c","ref":"","in":"query","required":false,"desc":"required: hash of an exisiting session to update or read the session","default":"","type":"string","name":"fbSessionHash"},{"_id":"571f9219e54f2d0e003ebb38","ref":"","in":"query","required":false,"desc":"optional","default":"","type":"array_mixed","name":"payment"}],"url":"/app/updateSession"},"isReference":true,"order":5,"body":"With this method you can update or read an existing session. The sent data is immediately validated as good as possible, so you can easily show errors in a multi-step-form.\nSee [Session JSON](doc:session-json) for details.\n\n**Update payment session**\nUse the session hash you got from create and send additional data or override data in your session.\n\n**Read payment session**\nUse the session hash without sending payment-data to read the session.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"The session must not be processed.\"\n}\n[/block]","excerpt":"","slug":"appupdatesession","type":"post","title":"app/updateSession"}

postapp/updateSession


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

hash:
string
required: hash of the form
fbSessionHash:
string
required: hash of an exisiting session to update or read the session
payment:
array of mixed
optional

Examples


Result Format


Documentation

With this method you can update or read an existing session. The sent data is immediately validated as good as possible, so you can easily show errors in a multi-step-form. See [Session JSON](doc:session-json) for details. **Update payment session** Use the session hash you got from create and send additional data or override data in your session. **Read payment session** Use the session hash without sending payment-data to read the session. [block:callout] { "type": "warning", "title": "The session must not be processed." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}