Previous Next JavaScript must be enabled to correctly display this content

## Get list of plans for a product by product Id

get

/PASService/rest/services/v1/products/{productId}/plans

Gets a list of latest 100 plans for a product based on the specified product Id.

### Request

Path Parameters

- productId(required): string(guid)
  Product Id

Query Parameters

- expand: string
  When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "the name of the child resource". More than one child can be specified using comma as a separator. Example:?expand=Employees,Localizations. Nested children can also be provided following the format "Child.NestedChild" (Example: ?expand=Employees.Managers). If a nested child is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?expand=Employees.Managers" is the same as "?expand=Employees,Employees.Managers" (which will expand Employees and Managers). More than one child can be specified using comma as a separator. For example: "?expand=Employees,Localizations". Nested children can also be provided following the format: "Child.NestedChild" For example:"?expand=Employees.Managers" If a nested child is provided (Example:Employees.Managers), the missing children will be processed implicitly i.e.,"?expand=Employees.Managers" is the same as "?expand=Employees,Employees.Managers", which will expand both Employees and Managers.
- limit: integer(int32)
  This parameter restricts the number of resources returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resources.
- offset: integer(int32)
  Used to define the starting position of the resource collection. If offset exceeds the resource count then no resources are returned. Default value is 0.
- q: string
  This query parameter defines the where clause. The resource collection will be queried using the provided expressions. The value of this query parameter is one or more expressions. Example: ?q=Deptno>=10 and <= 30;loc!="NY.

There's no request body for this operation.

Back to Top

### Response

#### 200 Response

This operation fetches list of plans for a product by product Id successfully.
Back to Top

### Examples

This example describes how to get a list of latest 100 plans for a product based on the specified product Id.

Example cURL Command

Use the following cURL command to submit a request on the REST resource:

    curl \
        -X GET \
        -H "Content-Type: application/json" \
        -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
        -L "http://server:port/PASService/rest/services/v1/products/48C12B7F-BB92-47AE-8723-22085BF9FC91/plans"

Example Response Body

The following shows an example of the response body in JSON format:

    {
        "count": 1,
        "offset": 0,
        "limit": 100,
        "plans": [
            {
                "links": [
                    {
                        "href": "http://server:port/PASService/rest/services/v1/products/06B2036D-6CBD-45C6-9997-58D6E17D395C/plans/78EB7DD1-329F-4143-9EFE-E42496103B0A",
                        "rel": "self",
                        "mediaType": "application/json",
                        "method": "GET"
                    },
                    {
                        "href": "http://server:port/PASService/rest/services/v1/codes?codeName=PlanAllocationMethod&codeValue=01",
                        "rel": "codes/planAllocationMethodCode",
                        "mediaType": "application/json",
                        "method": "GET"
                    }
                ],
                "effectiveFrom": "2014-12-23T00:00:00Z",
                "effectiveTo": "2015-12-23T00:00:00Z",
                "planName": "RegPlan5",
                "systemCode": "00",
                "defaultCurrencyCode": "USD",
                "pointInTimeValuation": "Y",
                "mixedValuation": null,
                "planAllocationMethodCode": "01",
                "updatedGmt": "2014-12-24T04:38:32Z",
                "activeGmt": "2014-12-24T04:38:32Z",
                "recordStatusCode": "ACTIVE",
                "updatedBy": "install",
                "businessStatusCode": null,
                "planSliceId": "4281AE71-639B-4526-A488-2A814BE3DA33",
                "planId": "78EB7DD1-329F-4143-9EFE-E42496103B0A",
                "companyId": "80798FC2-FEB9-4998-A575-513FF89698B1",
                "marketMakerId": "22FBC7C1-D8E0-4741-9D22-DF929A2890B5",
                "productId": "06B2036D-6CBD-45C6-9997-58D6E17D395C"
            }
        ]
    }

Back to Top