Get list of companies
get
/PASService/rest/services/v1/companies
Gets a list of the latest 100 companies and also, define expand attributes to expand a company by its sub-resources, such as products and plans.
Request
Query Parameters
-
expand(required): 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(required): 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(required): 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(required): 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 TopResponse
200 Response
This operation fetches list of companies successfully.
Examples
This example describes how to get a list of latest 100 companies. Also, define expand attributes to expand a company by its sub-resources, such as products and plans.
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/companies"
Example Response Body
The following shows an example of the response body in JSON format:
{ "count": 3, "offset": 0, "limit": 100, "companies": [ { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88", "rel": "self", "mediaType": "application/json", "method": "GET" }, { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products", "rel": "products", "mediaType": "application/json", "method": "GET" }, { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/plans", "rel": "plans", "mediaType": "application/json", "method": "GET" }, { "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Calendar&codeValue=01", "rel": "codes/calendarCode", "mediaType": "application/json", "method": "GET" } ], "effectiveDate": "2000-01-01T00:00:00Z", "companyName": "Prototype Individual Child Company", "defaultCurrencyCode": "USD", "calendarCode": "01", "roleCode": "09", "products": [ { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products/0E332D9E-E64B-408E-A827-1C9B567BBF2E", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products/1117EE7E-BEB8-4DA7-BC31-5997B767F4E6", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products/1B8EBC08-33FD-484E-BD60-831B03421ADA", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products/22B64DD7-E933-4FD6-A2EC-1A8D2A2394F4", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products/2CB7ED70-B22C-460B-A9A0-15DDB40E1FE2", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products/3FE40262-1669-413E-ACBA-8615DD7DAA6F", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products/40C9F9AF-229A-48E4-AC5B-25074A9F61B2", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products/6ABD3734-73CF-4DF2-AD81-31201CF54FEC", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products/9738F003-B805-4B7E-92B2-E2B4F3451A3B", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products/9B79777A-C984-4ADB-9DEB-11EF15B1F19F", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products/B29A11E8-A787-48EE-9D4E-8435298763EE", "rel": "self", "mediaType": "application/json", "method": "GET" } ] } ], "plans": [ { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/plans/01616C8F-4430-4F11-9257-B23626C50E99", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/plans/389E1379-69CD-48DC-BEAE-38758156B469", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/plans/3904A440-E035-40A1-9905-D544F7A6C093", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/plans/3CD8F7B3-0928-43F9-8483-0AF739B4F36C", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/plans/51673985-8606-4ABF-9EEE-85328BE03DA5", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/plans/575F5902-AE18-4279-9A3B-73679CFE769E", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/plans/74C46F3A-7816-471A-BAC8-AECCD18E985C", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/plans/8528EFFA-F207-49F2-942A-447167744E86", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/plans/8CAD77E4-8F72-401C-AA28-F7562756BDA3", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/05711222-7DB3-4EBD-A821-57A30A699B88/plans/C5EE0DA4-3003-42C1-9468-D91DA546B79F", "rel": "self", "mediaType": "application/json", "method": "GET" } ] } ], "companyId": "05711222-7DB3-4EBD-A821-57A30A699B88", "clientId": "65249EE7-DE8F-4798-AD5A-D20E42D99C12", "marketMakerId": null, "primaryCompanyId": "7204C2FE-13B1-4A48-8CDA-DE8386C60EF9", "MarketCloseTime": 2400, "MarketOpenTime": 900 }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/7204C2FE-13B1-4A48-8CDA-DE8386C60EF9", "rel": "self", "mediaType": "application/json", "method": "GET" }, { "href": "http://server:port/PASService/rest/services/v1/companies/7204C2FE-13B1-4A48-8CDA-DE8386C60EF9/products", "rel": "products", "mediaType": "application/json", "method": "GET" }, { "href": "http://server:port/PASService/rest/services/v1/companies/7204C2FE-13B1-4A48-8CDA-DE8386C60EF9/plans", "rel": "plans", "mediaType": "application/json", "method": "GET" }, { "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Calendar&codeValue=01", "rel": "codes/calendarCode", "mediaType": "application/json", "method": "GET" } ], "effectiveDate": "2000-01-01T00:00:00Z", "companyName": "Prototype", "defaultCurrencyCode": "USD", "calendarCode": "01", "roleCode": null, "products": null, "plans": [ { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/7204C2FE-13B1-4A48-8CDA-DE8386C60EF9/plans/22E15986-7A2E-4D26-B727-5ADB86AF6D90", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/7204C2FE-13B1-4A48-8CDA-DE8386C60EF9/plans/2E22F22A-1714-4CD1-8619-385A00CED1D4", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/7204C2FE-13B1-4A48-8CDA-DE8386C60EF9/plans/4F8750C3-8E2F-482E-B37D-B222178A16CA", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/7204C2FE-13B1-4A48-8CDA-DE8386C60EF9/plans/A6584DF9-1331-4FF2-BFE6-94F14AF8B4AE", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/7204C2FE-13B1-4A48-8CDA-DE8386C60EF9/plans/C987E7BD-8F98-4F01-9330-05C9C7799E56", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/7204C2FE-13B1-4A48-8CDA-DE8386C60EF9/plans/D1059379-1436-4F7E-8C1A-408D9010DCA1", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/7204C2FE-13B1-4A48-8CDA-DE8386C60EF9/plans/D5C118E4-73C7-4D6D-808A-C9CF18C631FA", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/7204C2FE-13B1-4A48-8CDA-DE8386C60EF9/plans/DE7CB128-68A1-41E2-A870-32528CD3C55A", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/7204C2FE-13B1-4A48-8CDA-DE8386C60EF9/plans/EADD841F-E552-41CE-BFF5-E5F7A01E109E", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/7204C2FE-13B1-4A48-8CDA-DE8386C60EF9/plans/FCF9BB3E-4935-4C0C-8A2F-C98643E7247B", "rel": "self", "mediaType": "application/json", "method": "GET" } ] } ], "companyId": "7204C2FE-13B1-4A48-8CDA-DE8386C60EF9", "clientId": "D15D650D-987B-4EB2-BF64-3F60DF61C190", "marketMakerId": null, "primaryCompanyId": null }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1", "rel": "self", "mediaType": "application/json", "method": "GET" }, { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/products", "rel": "products", "mediaType": "application/json", "method": "GET" }, { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/plans", "rel": "plans", "mediaType": "application/json", "method": "GET" }, { "href": "http://server:port/PASService/rest/services/v1/codes?codeName=Calendar&codeValue=01", "rel": "codes/calendarCode", "mediaType": "application/json", "method": "GET" } ], "effectiveDate": "1980-01-01T00:00:00Z", "companyName": "Prototype Group Child Company", "defaultCurrencyCode": "USD", "calendarCode": "01", "roleCode": "09", "products": [ { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/products/0689ACFC-F2B0-4BA9-8987-DE6C1AD83AC1", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/products/06B2036D-6CBD-45C6-9997-58D6E17D395C", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/products/41C2C5EF-E385-423B-AE30-5B9856AB7BB0", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/products/4848C86E-9582-42A5-9CB0-7DA0261557E6", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/products/9C7D3B95-D690-4DDF-A113-A0B0243C1E65", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/products/9DBECC11-FC96-4260-8BD5-CDD8B7263446", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/products/AF346954-C02C-4091-BEB0-FED8CFBC2B38", "rel": "self", "mediaType": "application/json", "method": "GET" } ] } ], "plans": [ { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/plans/3496675B-C87C-40E0-986A-B518DA2B5144", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/plans/388E9D8A-FFC5-4697-9CE3-FF49EAD9A4D3", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/plans/78EB7DD1-329F-4143-9EFE-E42496103B0A", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/plans/947B47BD-230A-4BA8-8FC6-7CBE85844C9A", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/plans/98F05107-233B-45D8-9EE0-CDD515B2B888", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/plans/9F5507A5-B7EC-4637-BD86-5168A1864408", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/plans/C3B5382C-4A05-49A9-A69A-BFD3D55C94FD", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/plans/E5124A0D-15A6-4435-9EED-5A14FBE902FA", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/plans/FC48B30A-5CEF-49D3-8B8B-F50DB6F7823C", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, { "links": [ { "href": "http://server:port/PASService/rest/services/v1/companies/80798FC2-FEB9-4998-A575-513FF89698B1/plans/FF04A024-51D1-4DD8-BD48-F86901F29A84", "rel": "self", "mediaType": "application/json", "method": "GET" } ] } ], "companyId": "80798FC2-FEB9-4998-A575-513FF89698B1", "clientId": "23706747-021C-465F-BD2C-15CC18DCDA4D", "marketMakerId": null, "primaryCompanyId": "7204C2FE-13B1-4A48-8CDA-DE8386C60EF9" } ] }