Home
Version 3
Service Plan Visibilities API

Service Plan Visibilities API

Creating a Service Plan Visibility

POST /v2/service_plan_visibilities

Fields

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

Request

Headers

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

Route

POST /v2/service_plan_visibilities

Body

{
  "service_plan_guid": "c600b9fb-27d9-46ec-923d-946ae1564368",
  "organization_guid": "5bfa84a5-b501-45bb-92d0-cc3230208005"
}

cURL

curl "https://api.[your-domain.com]/v2/service_plan_visibilities" -d '{
  "service_plan_guid": "c600b9fb-27d9-46ec-923d-946ae1564368",
  "organization_guid": "5bfa84a5-b501-45bb-92d0-cc3230208005"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NyIsImVtYWlsIjoiZW1haWwtMTcyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTU3NTQxNDN9.cXB8mwzNakHjcdBfl44CwYHoUSmUNwjWLXBxdeia3S0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/service_plan_visibilities/7450ccea-369b-4aff-95bf-d608b606a388
X-VCAP-Request-ID: b4b4eb66-6b29-4f74-8311-637c0c48d20a
Content-Length: 538
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "7450ccea-369b-4aff-95bf-d608b606a388",
    "url": "/v2/service_plan_visibilities/7450ccea-369b-4aff-95bf-d608b606a388",
    "created_at": "2014-11-05T01:02:23+00:00",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "c600b9fb-27d9-46ec-923d-946ae1564368",
    "organization_guid": "5bfa84a5-b501-45bb-92d0-cc3230208005",
    "service_plan_url": "/v2/service_plans/c600b9fb-27d9-46ec-923d-946ae1564368",
    "organization_url": "/v2/organizations/5bfa84a5-b501-45bb-92d0-cc3230208005"
  }
}