FORMAT: 1A

# Group Vectorapi
Group of all vectorapi-related resources.

## Artist Custom Events
 
This resource is responsible to create/read/update/delete artist custom events.


## Index [/vectorapi/artistcustomevents/index{?access_token,vendor_id,artist_ids,from_date,to_date,scope}]

### Index [GET]

+ Parameters

    + access_token (required, varchar, `some token`)
    + vendor_id  (required, number, `15063`)
    + artist_ids (optional, varchar, `19464,119554`)
    + from_date (optional, date, `2012-11-06`)
    + to_date (optional, date, `2014-04-21`)
    + scope (optional, varchar, `week`)
    
  
+ Request JSON Message
    
    + Headers

            Accept: application/json

+ Response 200 (application/json)

    + Body
{
    "envelope": {
        "header": {
            "apiVersion": "1.0",
            "baseUrl": "vapi.alpha.devorch.com",
            "httpStatusCode": 200
        },
        "request": "artistcustomevents/index?params=artistcustomevents&index&vectorapi&json&<some_token>&19464,119554",
        "response": {
            "artist_custom_events": [
                {
                    "event_id": "1509",
                    "artist_id": "119554",
                    "event_name": "test 11",
                    "event_date": "2014-03-07",
                    "name": "Lil Jon & The East Side Boyz",
                    "address_city": null
                },
                {
                    "event_id": "1515",
                    "artist_id": "119554",
                    "event_name": "event 11",
                    "event_date": "2013-12-12",
                    "name": "Lil Jon & The East Side Boyz",
                    "address_city": null
                }
            ]
        }
    }

}

## GET [/vectorapi/artistcustomevents/get{?id,access_token}]

+ Parameters

    + id (required,number, `1509`) ... An unique identifier of the artist_custom_events
    + access_token (required,varchar, `some token`)


### Get [GET]

+ Request JSON Message
    
    + Headers

            Accept: application/json

+ Response 200 (application/json)
    + Body
{
    "envelope": {
        "header": {
            "apiVersion": "1.0",
            "baseUrl": "vapi.alpha.devorch.com",
            "httpStatusCode": 200
        },
        "request": "artistcustomevents/get?params=artistcustomevents&get&vectorapi&json&<some_token>&1509",
        "response": {
            "artist_custom_event": {
                "event_id": 1509,
                "event_name": "test 11",
                "event_date": "2014-03-07",
                "date_created": "2014-04-21 06:35:46",
                "category": {
                    "category_id": 4,
                    "category_name": "Email Marketing",
                    "date_created": "2012-06-20 16:52:41"
                },
                "artist": {
                    "artist_id": 119554,
                    "artist_name": "Lil Jon & The East Side Boyz",
                    "vendor_id": 15063
                }
            }
        }
    }

}

## POST [/vectorapi/artistcustomevents/post{?data,access_token}]

### Post [POST]

+ Parameters

    + data (varchar, `{"event_name":"test custom event", "event_date":"2014-04-14","artist_id":"117742","event_category":"1"}`)
    + access_token (varchar, `some token`)
    

+ Request JSON Message
    
    + Headers

            Accept: application/json

+ Response 200 (application/json)

    + Body
{
	"envelope": {
		"header": {
			"apiVersion": "1.0",
			"baseUrl": "vapi.alpha.devorch.com",
			"httpStatusCode": 200
		},
		"request": "artistcustomevents\/post?params=artistcustomevents&post&vectorapi&json&{\"event_name\":\"test custom event\",\"event_date\":\"2014-04-14\",\"artist_id\":\"117742\",\"event_category\":\"1\"}&<some_token>",
		"response": {
			"event_id": 1531
		}
	}
}

+ **Other Parameters**

    + Required Parameters : artist_id,event_category
    + Optional Parameters : event_name, event_date

## PUT [/vectorapi/artistcustomevents/put{?data,access_token}]

### Put [POST]

+ Parameters

    + data (varchar, `{"event_id":"1531","event_name":"test custom event updated","event_category":"1","event_date":"2014-04-15","artist_id":"117772"}`)
    + access_token (varchar, `some token`)

+ Request JSON Message
    
    + Headers

            Accept: application/json

+ Response 200 (application/json)

    + Body
{
	"envelope": {
		"header": {
			"apiVersion": "1.0",
			"baseUrl": "vapi.alpha.devorch.com",
			"httpStatusCode": 200
		},
		"request": "artistcustomevents\/put?params=artistcustomevents&put&vectorapi&json&{\"event_id\":\"1531\",\"event_name\":\"test custom event updated\",\"event_category\":\"1\",\"event_date\":\"2014-04-15\",\"artist_id\":\"117772\"}&<some_token>",
		"response": {
			"event_id": 1531
		}
	}
}

+ **Required Parameters**

    + Required Parameters : event_id

+ **Optional Parameters**

    + Parameters : event_name, event_date, event_category, artist_id 


## Delete [/vectorapi/artistcustomevents/delete{?id,access_token}]

### Delete [GET]

+ Parameters

    + id (required, varchar, `1531`)
    + access_token (required ,varchar, `some token`)

+ Request JSON Message
    
    + Headers

            Accept: application/json

+ Response 200 (application/json)

    + Body
{

    "envelope": {
        "header": {
            "apiVersion": "1.0",
            "baseUrl": "vapi.alpha.devorch.com",
            "httpStatusCode": 200
        },
        "request": "artistcustomevents/delete?params=artistcustomevents&delete&vectorapi&json&<some_token>&1531",
        "response": {
            "event_id": "1531"
        }
    }

}
