FORMAT: 1A
HOST: http://orchardapi.theorchard.com/

# Group Vectorapi
Group of all vectorapi-related resources.

## Release Pricing

Each release may have tier assigned to it. Release related tier may assign to different territories. User can select those territories from the bunch of territories. A bunch of territories are territories which are already assigned to pricing scheme of that pricing tier.

This resource maintains release related pricing tier information for different territories assigned to it.

## Index [/vectorapi/releasepricing/index{?limit}]

### Index [GET]

+ Parameters

    + limit  (optional, number, `2`)
  
+ Request JSON Message
    
    + Headers
 
            Accept: application/json
            access_token : (access_token as per user type)

+ Response 200 (application/json)

    + Body
{
  "envelope": {
    "header": {
      "apiVersion": "1.0",
      "baseUrl": "orchardapi.theorchard.com",
      "httpStatusCode": 200
    },
    "request": "/vectorapi/releasepricing/index?limit=2",
    "response": {
      "releasePricing": [
        {
          "id": 1,
          "upc": "889176063480",
          "active": "Y",
          "releaseId": 1501292,
          "addedByUserId": 1,
          "addedByUserType": "oa",
          "releaseCustomPricing": [],
          "releasePricingTierCountry": [
            {
              "id": 1,
              "country": {
                "id": 1,
                "name": "USA",
                "abbrivation": "US",
                "continent": "North America"
              }
            },
            {
              "id": 2,
              "country": {
                "id": 3,
                "name": "United Kingdom",
                "abbrivation": "GB",
                "continent": "Europe"
              }
            }
          ],
          "pricingTierId": 2
        }
      ]
    }
  }
}

+ **Other Optional Parameters**

    + Optional Parameters : limit, offset
    + Sort Options : sortBy, sortOrder
    + Parameter options (filter): releaseId

## GET [/vectorapi/releasepricing/get{?id}]

+ Parameters

    + id (required,number, `587`) ...


### Get [GET]

+ Request JSON Message
    
    + Headers

            Accept: application/json
            access_token : (access_token as per user type)

+ Response 200 (application/json)
    + Body
{
  "envelope": {
    "header": {
      "apiVersion": "1.0",
      "baseUrl": "orchardapi.theorchard.com",
      "httpStatusCode": 200
    },
    "request": "/vectorapi/releasepricing/get?id=587",
    "response": {
      "releasePricing": {
        "id": 587,
        "upc": "669910724125",
        "active": "Y",
        "releaseId": 23175,
        "addedByUserId": 1,
        "addedByUserType": "oa",
        "releasePricingTierCountry": [
          {
            "id": 56110,
            "releasePricingTier": {},
            "country": {
              "__isInitialized__": true,
              "id": 1,
              "name": "USA",
              "abbrivation": "US",
              "continent": "North America",
              "latitude": "37.090240",
              "longitude": "-95.712891",
              "iso3166a3": "USA",
              "CountryLanguage": {},
              "CountryRatingAdvisorySystem": {}
            }
          },
          {
            "id": 56111,
            "releasePricingTier": {},
            "country": {
              "__isInitialized__": true,
              "id": 2,
              "name": "Canada",
              "abbrivation": "CA",
              "continent": "North America",
              "latitude": "56.130366",
              "longitude": "-106.346771",
              "iso3166a3": "CAN",
              "CountryLanguage": {},
              "CountryRatingAdvisorySystem": {}
            }
          },
          {
            "id": 56112,
            "releasePricingTier": {},
            "country": {
              "__isInitialized__": true,
              "id": 3,
              "name": "United Kingdom",
              "abbrivation": "GB",
              "continent": "Europe",
              "latitude": "55.378051",
              "longitude": "-3.435973",
              "iso3166a3": "GBR",
              "CountryLanguage": {},
              "CountryRatingAdvisorySystem": {}
            }
          }
        ],
        "releaseCustomPricing": [
          {
            "id": 49,
            "customPrice": "30.00",
            "currencyCode": "ABC",
            "releasePricingTier": {}
          }
        ],
        "pricingTierId": 93
      }
    }
  }
}

## POST [/vectorapi/releasepricing/post{?data}]

### Post [POST]

+ Parameters

    + data (varchar, `{"releaseId":1403364,"pricingTierId":93,"countryIds":[1,2,3],"releaseCustomPricing":{"price":"30.00","currencyCode":"ABC"}}`)

+ Request JSON Message
    
    + Headers

            Accept: application/json
            access_token : (access_token as per user type)

+ Response 200 (application/json)

    + Body
{
  "envelope": {
    "header": {
      "apiVersion": "1.0",
      "baseUrl": "orchardapi.theorchard.com",
      "httpStatusCode": 200
    },
    "request": "/vectorapi/releasepricing/post?data=%7B%22releaseId%22%3A1403364%2C%22pricingTierId%22%3A93%2C%22countryIds%22%3A%5B1%2C2%2C3%5D%2C%22releaseCustomPricing%22%3A%7B%22price%22%3A%2230.00%22%2C%22currencyCode%22%3A%22ABC%22%7D%7D",
    "response": {
      "id": 595
    }
  }
}


+ **Other Parameters**

    + Required Parameters : releaseId,pricingTierId
    + Optional Parameters : upc,countryIds,releaseCustomPricing

## PUT [/vectorapi/releasepricing/put{?data}]

### Put [POST]

+ Parameters

    + data (varchar, `{"id":588,"releaseId":1403364,"pricingTierId":94,"countryIds":[1,2,3],"releaseCustomPricing":{"price":"40.00","currencyCode":"ABC"}}`)

+ Request JSON Message
    
    + Headers

            Accept: application/json
            access_token : (access_token as per user type)

+ Response 200 (application/json)

    + Body
{
  "envelope": {
    "header": {
      "apiVersion": "1.0",
      "baseUrl": "orchardapi.theorchard.com",
      "httpStatusCode": 200
    },
    "request": "/vectorapi/releasepricing/put?data=%7B%22id%22%3A588%2C%22releaseId%22%3A1403364%2C%22pricingTierId%22%3A94%2C%22countryIds%22%3A%5B1%2C2%2C3%5D%2C%22releaseCustomPricing%22%3A%7B%22price%22%3A%2240.00%22%2C%22currencyCode%22%3A%22ABC%22%7D%7D",
    "response": {
      "releasePricing": {
        "id": 588,
        "upc": "888831511816",
        "active": "Y",
        "releaseId": 1403364,
        "addedByUserId": "5",
        "addedByUserType": "oa",
        "releasePricingTierCountry": [
          {
            "id": 56113,
            "releasePricingTier": {},
            "country": {
              "__isInitialized__": true,
              "id": 1,
              "name": "USA",
              "abbrivation": "US",
              "continent": "North America",
              "latitude": "37.090240",
              "longitude": "-95.712891",
              "iso3166a3": "USA",
              "CountryLanguage": {},
              "CountryRatingAdvisorySystem": {}
            }
          },
          {
            "id": 56114,
            "releasePricingTier": {},
            "country": {
              "__isInitialized__": true,
              "id": 2,
              "name": "Canada",
              "abbrivation": "CA",
              "continent": "North America",
              "latitude": "56.130366",
              "longitude": "-106.346771",
              "iso3166a3": "CAN",
              "CountryLanguage": {},
              "CountryRatingAdvisorySystem": {}
            }
          },
          {
            "id": 56115,
            "releasePricingTier": {},
            "country": {
              "__isInitialized__": true,
              "id": 3,
              "name": "United Kingdom",
              "abbrivation": "GB",
              "continent": "Europe",
              "latitude": "55.378051",
              "longitude": "-3.435973",
              "iso3166a3": "GBR",
              "CountryLanguage": {},
              "CountryRatingAdvisorySystem": {}
            }
          }
        ],
        "releaseCustomPricing": [
          {
            "id": 51,
            "customPrice": "A",
            "currencyCode": "A",
            "releasePricingTier": {}
          },
          {
            "id": 54,
            "customPrice": "4.00",
            "currencyCode": "4",
            "releasePricingTier": {}
          }
        ],
        "pricingTierId": 94
      }
    }
  }
}

## Delete [/vectorapi/releasepricing/delete{?id}]

### Delete [GET]

+ Parameters

    + id (required, varchar, `575`)

+ Request JSON Message
    
    + Headers

            Accept: application/json
            access_token : (access_token as per user type)

+ Response 200 (application/json)

    + Body
{
  "envelope": {
    "header": {
      "apiVersion": "1.0",
      "baseUrl": "orchardapi.theorchard.com",
      "httpStatusCode": 200
    },
    "request": "/vectorapi/releasepricing/delete?id=575",
    "response": {
      "releasePricing": true
    }
  }
}