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

Route

POST /v2/service_plan_visibilities

Body

{
  "service_plan_guid": "86b495f1-ca43-4534-93d0-515688519e3f",
  "organization_guid": "79376d90-938d-4194-ba3c-34da37316b37"
}

cURL

curl "https://api.[your-domain.com]/v2/service_plan_visibilities" -d '{
  "service_plan_guid": "86b495f1-ca43-4534-93d0-515688519e3f",
  "organization_guid": "79376d90-938d-4194-ba3c-34da37316b37"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2NCIsImVtYWlsIjoiZW1haWwtMjY2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE3MDh9.oppooy7lmOboQry8VDHQClqA5yHfcjvTQHOT1xq63Iw" \
	-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/0672bbee-ab6a-47ec-8dc0-5879b5a9d186
X-VCAP-Request-ID: 71553894-34b7-4672-a06b-02769aa341fc
Content-Length: 533
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "0672bbee-ab6a-47ec-8dc0-5879b5a9d186",
    "url": "/v2/service_plan_visibilities/0672bbee-ab6a-47ec-8dc0-5879b5a9d186",
    "created_at": "2015-02-13T22:35:08Z",
    "updated_at": null
  },
  "entity": {
    "service_plan_guid": "86b495f1-ca43-4534-93d0-515688519e3f",
    "organization_guid": "79376d90-938d-4194-ba3c-34da37316b37",
    "service_plan_url": "/v2/service_plans/86b495f1-ca43-4534-93d0-515688519e3f",
    "organization_url": "/v2/organizations/79376d90-938d-4194-ba3c-34da37316b37"
  }
}