FORMAT: 1A

# Group Vectorapi
Group of all vectorapi-related resources.

## Pricing scheme

Pricing scheme relates with customer. Every customer has its ‘pricing scheme’. In this, pricing scheme for  particular customer is same as the name of customer.   

It handles different types of products ( like Audio release, video release or  Movie) for different customer  i.e. music stores.  

This API resource manages the addition, updation and deletion of pricing schemes for different products.

## Index [/vectorapi/pricingscheme/index{?limit,access_token}]

### Index [GET]

+ Parameters

    + limit  (number, `2`)
    + 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": "pricingscheme/index?params=vectorapi&pricingscheme&index&json&2&<some_token>",
    "response": {
      "pricingScheme": [
        {
          "pricingSchemeId": 1,
          "customerMasterMasterId": 1,
          "pricingScheme": "iTunes Music",
          "productTypeId": 1,
          "defaultPricingTier": 2,
          "schemeLevel": "release",
          "pricingSchemeTerritory": [
            {
              "id": 1,
              "country": {
                "id": 6,
                "name": "France",
                "abbrivation": "FR",
                "continent": "Europe",
                "latitude": "46.227638",
                "longitude": "2.213749",
                "iso3166a3": "FRA"
              }
            },
            {
              "id": 2,
              "country": {
                "id": 1,
                "name": "USA",
                "abbrivation": "US",
                "continent": "North America",
                "latitude": "37.090240",
                "longitude": "-95.712891",
                "iso3166a3": "USA"
              }
            }
          ]
        }
      ]
    }
  }
}

+ **Other Optional Parameters**

    + Optional Parameters : limit, offset, pageNumber, totalRecords
    + Sort Options : columnName, orderBy
    + Parameter options (filter): schemeLevel , productTypeId

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

+ Parameters

    + id (required,number, `2`) ... An unique identifier of the genre.
    + 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": "pricingscheme/get?params=vectorapi&pricingscheme&get&json&2&<some_token>",
    "response": {
      "pricingScheme": {
        "pricingSchemeId": 2,
        "customerMasterMasterId": 7,
        "pricingScheme": "eMusic",
        "productTypeId": 1,
        "defaultPricingTier": 97,
        "schemeLevel": "release",
        "pricingSchemeTerritory": [
          {
            "id": 24,
            "country": {
              "id": 1,
              "name": "USA",
              "abbrivation": "US",
              "continent": "North America"
            }
          }
        ]
      }
    }
  }
}

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

### Post [POST]

+ Parameters

    + data (varchar, `{"customerMasterMasterId":1,"pricingScheme":"pricing test","defaultPricingTier":1,"productTypeId":3,"schemeLevel":"release" ,"countryIds":[4,5]}`)
    + 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": "pricingscheme/post?params=vectorapi&pricingscheme&post&json&{\"customerMasterMasterId\":1,\"pricingScheme\":\"New Pricing Scheme22\",\"defaultPricingTier\":1,\"productTypeId\":3,\"schemeLevel\":\"release\" ,\"countryIds\":[4,5]}&<some_token>",
    "response": {
      "pricingSchemeId": 40
    }
  }
}


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

### Put [POST]

+ Parameters

    + data (varchar, `{"id":40,"customerMasterMasterId":1,"pricingScheme":"New  Pricing","productTypeId":3,"schemeLevel":"release","countryIds":[1,2]}`)
    + 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": "pricingscheme/put?params=vectorapi&pricingscheme&put&json&{\"id\":48,\"customerMasterMasterId\":1,\"pricingScheme\":\"New Pricing\",\"productTypeId\":3,\"schemeLevel\":\"release\" , \"countryIds\":[1,2]}&<some_token>",
    "response": {
      "pricingScheme": {
        "pricingSchemeId": 48,
        "customerMasterMasterId": 1,
        "pricingScheme": "New  Pricing",
        "productTypeId": 3,
        "defaultPricingTier": 1,
        "schemeLevel": "release",
        "pricingSchemeTerritory": [
          {
            "id": 1650,
            "country": {
              "id": 1,
              "name": "USA",
              "abbrivation": "US",
              "continent": "North America"
            }
          },
          {
            "id": 1651,
            "country": {
              "id": 2,
              "name": "Canada",
              "abbrivation": "CA",
              "continent": "North America"
            }
          }
        ]
      }
    }
  }
}

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

### Delete [GET]

+ Parameters

    + id (required, number, `39`)
    + 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": "pricingscheme/delete?params=vectorapi&pricingscheme&delete&json&49&<some_token>",
    "response": {
      "pricingScheme": true
    }
  }
}
