FORMAT: 1A
HOST: http://192.168.0.53:5555

# Group Vectorapi
Group of all vectorapi-related resources.

## Vendor

**Vendor** : It is a label which owns releases.  ' Vendor ' is a label who has privileges to create releases means releases are owned by Vendor. Vendor can have multiple label contacts assigned to it. Releases assigned to a particular Vendor are also visible by all label contacts assigned to that Vendor. Label contacts differs in privileges of actions  e.g. view release, edit release, etc. 
Vendor can be a Distributor too. If it's a Distributor then Vendor may have multiple Subaccount. And label contact are own by subaccount. ' Subaccount ' which belongs to ' Vendor ' can have multiple labels contacts ( i.e ' vend contact ' ) too.

This API resource manages the addition, updation and deletion of vendor resource.

## GET [/vectorapi/vendor{?limit,access_token,id}]

### GET [GET]

+ Parameters

    + limit (optional,number, `5`)
    + access_token (optional,varchar, `some token`)
    + id (required,number, `2050`)


+ Request JSON Message
    
    + Headers

            Accept: application/json

+ Response 200 (application/json)

    + Body
{
  "result": {
    "vendor_id": 2050,
    "name": "Hero Recording Company",
    "company": "Airtype Studio",
    "owner": "odd",
    "priority": 4,
    "status": "signed",
    "country": 1,
    "is_distributor": "N",
    "contact_email": null,
    "VendContact": [
      {
        "id": 3048,
        "master": "Y",
        "active": "Y",
        "Contact": {
          "contact_id": 34084,
          "contact_first_name": "Bryan",
          "contact_email": "airtype@mac.com"
        },
        "VendContactRoles": [
          {
            "id": 78591,
            "role_id": 4
          }
        ]
      }
    ]
  }
}


+ **Required Parameters**
     + id // This is primary key of youtube_channel table.

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

### Post [POST]

+ Parameters

    + data (required,varchar, `{"oa_user_id":"538","Contract_Info":{"orchrep_NAME":"17","chance_to_close":"0.1","ETA_to_close_year":"2011","eta_to_close_quarter":"2","encoding_fees_cap":"9999","encoding_fees_cap_new_release":"9999","Digital_Split":"0.1","distribution_type_ids":[1,2],"payment_interval":"quarter","pay_after":"45","proposed_term":"5","proposed_rollover_period":"5","budgeted_advance":"0"},"label_info":{"Company":"VAPI testlabel 444","owner":"odd","Priority":"1","primary_genre":"2","country":"AUS","label_summary":"test label summary","EST_total_releases":"22","est_total_tracks":"11","checks":"Avnin Music Group"}}`)
    + access_token (optional,varchar, `some token`)


+ Request JSON Message
    
    + Headers

            Accept: application/json

+ Response 200 (application/json)

    + Body
{
  "vendor_id": 23682,
  "vend_contact_id": 36870
}


+ **Required Parameters**
     + is_distributor
     + allow_orchard_credit

+ **Optional Parameters**
     + label name
     + owner
     + Label Priority
     + Genre
     + Country
     + Label Summary
     + Closer
     + Digital Distribution Type
     + Digital Split ( must be > 0 and < 1 )
     + autoClaim
     + Chance to Close ( must be > 0 and < 1 )
     + Estimated Year and Quarter
     + Encoding Fees Cap New Release

## PUT [/vectorapi/vendor{?data,access_token,id}]

### PUT [POST]

+ Parameters

    + data (required,varchar, `{"oa_user_id":"538","Contract_Info":{"orchrep_NAME":"17","chance_to_close":"0.1","ETA_to_close_year":"2011","eta_to_close_quarter":"2","encoding_fees_cap":"9999","encoding_fees_cap_new_release":"9999","Digital_Split":"0.1","distribution_type_ids":[1,2],"payment_interval":"quarter","pay_after":"45","proposed_term":"5","proposed_rollover_period":"5","budgeted_advance":"0"},"label_info":{"Company":"VAPI testlabel 444","owner":"odd","Priority":"1","primary_genre":"2","country":"AUS","label_summary":"test label summary","EST_total_releases":"22","est_total_tracks":"11","checks":"Avnin Music Group"}}`)
    + access_token (optional,varchar, `some token`)
    + id (required, number ,`3048`)


+ Request JSON Message
    
    + Headers

            Accept: application/json

+ Response 200 (application/json)

    + Body
{
  "vendor_id": 23686,
  "vend_contact_id": 36874
}


+ **Required Parameters**
     + is_distributor
     + allow_orchard_credit

+ **Optional Parameters**
     + label name
     + owner
     + Label Priority
     + Genre
     + Country
     + Label Summary
     + Closer
     + Digital Distribution Type
     + Digital Split ( must be > 0 and < 1 )
     + autoClaim
     + Chance to Close ( must be > 0 and < 1 )
     + Estimated Year and Quarter
     + Encoding Fees Cap New Release


## DELETE [/vectorapi/vendor{?access_token,id}]

### DELETE [GET]

+ Parameters

    + access_token (optional,varchar, `some token`)
    + id (required, number ,`23693`)


+ Request JSON Message
    
    + Headers

            Accept: application/json

+ Response 200 (application/json)

    + Body
{
  "result": {
    "vendor_id": 23693,
    "name": "",
    "company": "VAPI testlabel 444",
    "owner": "odd",
    "priority": 1,
    "status": "signed",
    "country": 8,
    "is_distributor": "N",
    "contact_email": null,
    "VendContact": [
      {
        "id": 36881,
        "master": "Y",
        "active": "Y",
        "Contact": {
          "contact_id": 144172,
          "contact_first_name": "",
          "contact_email": null
        },
        "VendContactRoles": [
          {
            "id": 147862,
            "role_id": 4
          }
        ]
      }
    ]
  }
}



+ **Required Parameters**
     + id
