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": "1cca16cb-5b0f-4e48-97b9-b1af65cb3a88",
  "organization_guid": "c7d1bdd1-0588-41a4-a0a4-00af59ff369b"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwNyIsImVtYWlsIjoiZW1haWwtNzJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0ODAzODk0OH0.IeDGSli_5kEe-ZodURf1creLbi-g4PX3Q91ylSjXxiw
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": "1cca16cb-5b0f-4e48-97b9-b1af65cb3a88",
  "organization_guid": "c7d1bdd1-0588-41a4-a0a4-00af59ff369b"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwNyIsImVtYWlsIjoiZW1haWwtNzJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0ODAzODk0OH0.IeDGSli_5kEe-ZodURf1creLbi-g4PX3Q91ylSjXxiw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "f75441bd-8cb0-4e0f-8911-8b41d698c292",
    "url": "/v2/service_plan_visibilities/f75441bd-8cb0-4e0f-8911-8b41d698c292",
    "created_at": "2015-11-13T17:02:28Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "1cca16cb-5b0f-4e48-97b9-b1af65cb3a88",
    "organization_guid": "c7d1bdd1-0588-41a4-a0a4-00af59ff369b",
    "service_plan_url": "/v2/service_plans/1cca16cb-5b0f-4e48-97b9-b1af65cb3a88",
    "organization_url": "/v2/organizations/c7d1bdd1-0588-41a4-a0a4-00af59ff369b"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/f75441bd-8cb0-4e0f-8911-8b41d698c292
X-VCAP-Request-ID: 
Content-Length: 533
X-Content-Type-Options: nosniff