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.eyJ1c2VyX2lkIjoidWFhLWlkLTIzOCIsImVtYWlsIjoiZW1haWwtMTc5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4NzZ9.i6Wn2PhYjq8n4ex04AB7WbuShPRw60mATRWcttgNbqk
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/service_plan_visibilities

Body

{
  "service_plan_guid": "20e3b2b2-1ccd-46c6-a714-f7379bae4691",
  "organization_guid": "c95212b8-7b27-4eb7-9080-f79cab6f929d"
}

cURL

curl "https://api.[your-domain.com]/v2/service_plan_visibilities" -d '{
  "service_plan_guid": "20e3b2b2-1ccd-46c6-a714-f7379bae4691",
  "organization_guid": "c95212b8-7b27-4eb7-9080-f79cab6f929d"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzOCIsImVtYWlsIjoiZW1haWwtMTc5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4NzZ9.i6Wn2PhYjq8n4ex04AB7WbuShPRw60mATRWcttgNbqk" \
	-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/cffdbbfb-bb93-47b0-b007-b348eca9044d
X-VCAP-Request-ID: d35d4005-2d79-48a8-a885-2ce94f97669d
Content-Length: 533
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "cffdbbfb-bb93-47b0-b007-b348eca9044d",
    "url": "/v2/service_plan_visibilities/cffdbbfb-bb93-47b0-b007-b348eca9044d",
    "created_at": "2015-01-27T19:14:36Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "20e3b2b2-1ccd-46c6-a714-f7379bae4691",
    "organization_guid": "c95212b8-7b27-4eb7-9080-f79cab6f929d",
    "service_plan_url": "/v2/service_plans/20e3b2b2-1ccd-46c6-a714-f7379bae4691",
    "organization_url": "/v2/organizations/c95212b8-7b27-4eb7-9080-f79cab6f929d"
  }
}