services/getAll

Get a list of services. The fields listed here will be returned when this method is called.

POST https://api.elvanto.com/v1/services/getAll.{json|xml|php}

Parameters

Name Type Description
page integer The results page to retrieve. Default: 1
page_size integer The number of records to retrieve per results page. Default: 1000
all string Set this to yes if you would like to retrieve past services as well as future services. Defaults to no. This parameter is ignored when either "start" and "end" parameters are included.
start date The date to start retrieving services from. Needs to be a valid date field. E.g: 2016-12-30
end date The date to stop retrieving services. Needs to be a valid date field. E.g: 2016-12-30
status string This can be set to published or draft. Default shows both published and draft services.
service_types string|array The ID of the service types you'd like to include people from. Can be a string or array of ID's.
fields array Optional fields you would like to retrieve for each service. More information on service fields.
Expected request JSON HTTP POST
{
    "page": 1,
    "page_size": 100,
    "all": "yes",
    "status": "published",
    "fields": [
        "series_name",
        "service_times",
        "plans",
        "volunteers",
        "songs",
        "files",
        "notes"
    ]
}
Expected response JSON XML PHP
{
    "generated_in": "0.021",
    "status": "ok",
    "services": {
        "on_this_page": 100,
        "page": 1,
        "per_page": 100,
        "total": 668,
        "service": [
            {
                "id": "b0b0d8d2-48dc-426e-aaba-774936274c99",
                "status": 1,
                "date_added": "2016-02-24 11:56:22",
                "date_modified": "2016-08-27 16:17:57",
                "name": "Sunday Morning",
                "series_name": "The Good Fight Of Faith",
                "date": "2016-08-24 09:30:00",
                "service_type": {
                    "id": "8a631195-8914-4136-858c-f160885ab60d",
                    "name": "Sunday Mornings"
                },
                "location": {
                    "id": "8a631195-8914-4136-858c-f160885ab60d",
                    "name": "Central Campus"
                },
                "service_times": {
                    "service_time": [
                        {
                            "id": "6276c128-1fd9-11e3-8b45-5e1036dfbe18",
                            "date_added": "2016-02-24 11:56:22",
                            "date_modified": "2016-08-27 16:17:57",
                            "name": "First Service",
                            "starts": "2016-08-24 09:30:00",
                            "ends": "2016-08-24 11:00:00"
                        },
                        {
                            "id": "8ba96d3c-2a6c-11e3-92e6-005dd410cfe0",
                            "date_added": "2016-02-24 11:56:22",
                            "date_modified": "2016-08-27 16:17:57",
                            "name": "Second Service",
                            "starts": "2016-08-24 12:00:00",
                            "ends": "2016-08-24 13:30:00"
                        }
                    ]
                },
                "plans": {
                    "plan": [
                        {
                            "time_id": "6276c128-1fd9-11e3-8b45-5e1036dfbe18",
                            "service_length": 5400,
                            "service_length_formatted": "90:00",
                            "total_length": 9000,
                            "total_length_formatted": "150:00",
                            "items": {
                                "item": [
                                    {
                                        "id": "f1d85614-15f2-11e4-acc9-d60ec099bdeb",
                                        "heading": 0,
                                        "duration": "05:00",
                                        "title": "Intro video",
                                        "song": "",
                                        "description": "<p>Play intro video</p>"
                                    },
                                    {
                                        "id": "fae8aede-15f2-11e4-acc9-d60ec099bdeb",
                                        "heading": 1,
                                        "duration": "00:00",
                                        "title": "Praise & Worship",
                                        "song": "",
                                        "description": ""
                                    },
                                    {
                                        "id": "11e4aede-15f2-fae8-acc9-d60ec099bdeb",
                                        "heading": 0,
                                        "duration": "05:00",
                                        "title": "How Great Is Our God",
                                        "song": {
                                            "id": "07327f00-c4f8-11e2-a836-d99a7990664d",
                                            "ccli_number": "1234567",
                                            "title": "How Great Is Our God",
                                            "artist": "Chris Tomlin",
                                            "album": "How Great Is Our God",
                                            "arrangement": {
                                                "id": "0732cbc2-c4f8-11e2-a836-d99a7990664d",
                                                "title": "Default Arrangement",
                                                "bpm": "78",
                                                "duration": "05:00",
                                                "sequence": "",
                                                "key_name": "",
                                                "key": "G"
                                            }
                                        },
                                        "description": ""
                                    }
                                ]
                            }
                        }
                    ]
                },
                "volunteers": {
                    "plan": [
                        {
                            "time_id": "6276c128-1fd9-11e3-8b45-5e1036dfbe18",
                            "positions": {
                                "position": [
                                    {
                                        "department_id": "ceb5ee64-8895-102d-80ee-95364de284f0",
                                        "department_name": "Music",
                                        "sub_department_id": "f00c45c2-8895-102d-80ee-95364de284f0",
                                        "sub_department_name": "Vocals",
                                        "position_id": "f00c68ea-8895-102d-80ee-95364de284f0",
                                        "position_name": "BV1",
                                        "volunteers": {
                                            "volunteer": [
                                                {
                                                    "person": {
                                                        "id": "dc37a11e-8d49-102d-815d-7f9c91035bbf",
                                                        "firstname": "John",
                                                        "preferred_name": "Jonny",
                                                        "lastname": "Smith"
                                                    },
                                                    "status": "Confirmed"
                                                },
                                                {
                                                    "person": {
                                                        "id": "3d3630da-9cfd-102d-bd08-842c500d506d",
                                                        "firstname": "Sandra",
                                                        "preferred_name": "",
                                                        "lastname": "Cook"
                                                    },
                                                    "status": "Unconfirmed"
                                                }
                                            ]
                                        }
                                    }
                                ]
                            }
                        }
                    ]
                },
                "songs": {
                    "song": [
                        {
                            "id": "a3dbaee0-b84b-11e2-bcbc-2c3ca68fd88f",
                            "ccli_number": "12345678",
                            "title": "All I Need Is You",
                            "artist": "",
                            "album": "",
                            "arrangement": {
                                "id": "d88fee0-b84b-11e2-bcbc-2c3ca68fa3dba",
                                "title": "Default Arrangement",
                                "bpm": "5",
                                "duration": "4:56",
                                "sequence": "",
                                "key_id": "",
                                "key_name": "",
                                "key": ""
                            }
                        }
                    ]
                },
                "files": {
                    "file": [
                        {
                            "id": "d2a59ffe-15fc-11e4-acc9-d60ec099bdeb",
                            "title": "Google",
                            "type": "File",
                            "html": 0,
                            "content": "http://www.google.com"
                        }
                    ]
                },
                "notes": {
                    "note": [
                        {
                            "id": "3e88b32a-609d-11e3-9b6b-9ace39b5dd37",
                            "date_added": "2016-12-09 06:43:42",
                            "date_modified": "",
                            "note": "<p>A random note!</p>"
                        }
                    ]
                }
            }
        ]
    }
}
Error responses:

Please see our response status codes documentation for details of potential error responses for any API request.

  • 250: Invalid page number The page number you have provided is invalid.
  • 250: Invalid page size The page size must be between 10 and 1000.
  • 404: Invalid Service Type ID The Service Type ID you provided does not exist.
  • 404: No services match your criteria The system could not find any services based on your criteria.