Home
Version 3
Service Plan Visibilities API

Service Plan Visibilities API

Creating a Service Plan Visibility

POST /v2/service_plan_visibilities

Request

Route

POST /v2/service_plan_visibilities

Body

Name Description Default Valid Values Example Values
service_plan_guid The guid of the plan that will be made visible
organization_guid The guid of the organization the plan will be visible to
{
  "service_plan_guid": "1076df5f-c3d8-4ce4-bf00-1dff754d5dd0",
  "organization_guid": "b4a11b63-2b59-404c-807f-f70eaf297055"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwMiIsImVtYWlsIjoiZW1haWwtMzAwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzIzMTM2Mjh9.VEmdBXKEF3o3hNh_XWdQxnxyZPARbH_tWtG1oI1qBdQ
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/service_plan_visibilities" -d '{
  "service_plan_guid": "1076df5f-c3d8-4ce4-bf00-1dff754d5dd0",
  "organization_guid": "b4a11b63-2b59-404c-807f-f70eaf297055"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwMiIsImVtYWlsIjoiZW1haWwtMzAwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzIzMTM2Mjh9.VEmdBXKEF3o3hNh_XWdQxnxyZPARbH_tWtG1oI1qBdQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "d5507446-7b49-44c1-bd46-8abb10f42892",
    "url": "/v2/service_plan_visibilities/d5507446-7b49-44c1-bd46-8abb10f42892",
    "created_at": "2015-05-15T16:53:48Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "1076df5f-c3d8-4ce4-bf00-1dff754d5dd0",
    "organization_guid": "b4a11b63-2b59-404c-807f-f70eaf297055",
    "service_plan_url": "/v2/service_plans/1076df5f-c3d8-4ce4-bf00-1dff754d5dd0",
    "organization_url": "/v2/organizations/b4a11b63-2b59-404c-807f-f70eaf297055"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/d5507446-7b49-44c1-bd46-8abb10f42892
X-VCAP-Request-ID: 9389b5b1-c075-454d-a807-20e7d074c3b0
Content-Length: 533
X-Content-Type-Options: nosniff