API Doc Form

List API list

GET ALL FORM, METHOD : GET


                            //continuing from above explanations
                            $client->request('GET','form',[
                                'headers'=>$headers
                            ]);
                        

Result (Commentary is explanatory only)


                            //result
                            //please check status code before processing result,
                            //unless it return 200, it was not necessary to parse anything
                            //if status code is 200, please check status value in result content
                            //it it success, there will be returned data, else no data
                            //this is applied to all api
                            {
                                "code": 200,
                                "status": "success",
                                "data":[
                                    {
                                        "id": "1",
                                        "name": "Example",
                                        "url": "Example",
                                        "viewed": "Example",
                                        "submitted": "Example",
                                        "rate": "Example"
                                    },
                                    {
                                        "id": "2",
                                        "name": "Example-2",
                                        "url": "Example-2",
                                        "viewed": "Example-2",
                                        "submitted": "Example-2",
                                        "rate": "Example-2"
                                    },
                                    {
                                        "id": "3",
                                        "name": "Example-3",
                                        "url": "Example-3",
                                        "viewed": "Example-3",
                                        "submitted": "Example-3",
                                        "rate": "Example-3"
                                    },
                                    {
                                        "id": "4",
                                        "name": "Example-4",
                                        "url": "Example-4",
                                        "viewed": "Example-4",
                                        "submitted": "Example-4",
                                        "rate": "Example-4"
                                    }
                                ],
                                //currently shown
                                "count": 4,
                                //total, by default, we only show 100 per request
                                "total": 4,
                                //change offset by adding to header, $headers['Offset'] = 101
                                "offset" : 0,
                                "message": "Get All Form"
                            }
                        

GET BY ID, METHOD : GET


                            //continuing from above explanations
                            $client->request('GET','form/767e1050-57e7-40bb-bb29-1ecd5927877c',[
                                'headers'=>$headers
                            ]);
                        

Result (Commentary is explanatory only)


                            //result
                            //please check status code before processing result,
                            //unless it return 200, it was not necessary to parse anything
                            //if status code is 200, please check status value in result content
                            //it it success, there will be returned data, else no data
                            //this is applied to all api
                            {
                                "code": 200,
                                "status": "success",
                                "data":
                                    {
                                        "id": "1",
                                        "name": "Example",
                                        "url": "Example",
                                        "viewed": "Example",
                                        "submitted": "Example",
                                        "rate": "Example",
                                        "bar-embed": "Example",
                                        "slide-embed": "Example",
                                        "form-hosted": "Example",
                                        "form-javascript": "Example",
                                        "form-html": "Example",
                                        "form-html-nostyle": "Example",
                                        "form-iframe": "Example",
                                    }
                                "count": 1,
                                "message": "Get Form by ID 1"
                            }
                        

ERROR EXAMPLE


                            //Possible error
                            //The code value, in response body is the same with status code in result header
                            {
                                "code": 400,
                                "status": "error",
                                "message": "Malformed request"
                            },
                            {
                                "code": 403,
                                "status": "error",
                                "message": "Forbidden access"
                            },
                            {
                                "code": 500,
                                "status": "error",
                                "message": "Something unexpected happen"
                            }
                            //