Get list of companies
get
/PASService/rest/services/companies
Gets a list of latest 100 companies. Also, define expand attributes to expand a company by its sub-resources, such as products and plans
Request
Query Parameters
-
expand(optional): string
products, plans, codes
-
q(optional): string
Search Parameter
Response
Supported Media Types
- application/json
200 Response
successful operation
Nested Schema : items
Type:
object
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 "Accept: application/json" -u username:password "server:port/PASService/rest/services/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products"
Example Response Body
The following shows an example of the response body in JSON format:
"{ "count": 5, "offset": 0, "limit": 100, "companies": [ { "links": [ { "href": "http://server:port/PASService/rest/services/companies/05711222-7DB3-4EBD-A821-57A30A699B88", "rel": "self", "mediaType": "application/json", "method": "GET" }, { "href": "http://server:port/PASService/rest/services/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products", "rel": "products", "mediaType": "application/json", "method": "GET" }, { "href": "http://server:port/PASService/rest/services/companies/05711222-7DB3-4EBD-A821-57A30A699B88/plans", "rel": "plans", "mediaType": "application/json", "method": "GET" }, { "href": "http://server:port/PASService/rest/services/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/companies/05711222-7DB3-4EBD-A821-57A30A699B88/products/3FE40262-1669-413E-ACBA-8615DD7DAA6F", "rel": "self", "mediaType": "application/json", "method": "GET" } ] } ], "plans": [ { "links": [ { "href": "http://server:port/PASService/rest/services/companies/05711222-7DB3-4EBD-A821-57A30A699B88/plans/01616C8F-4430-4F11-9257-B23626C50E99", "rel": "self", "mediaType": "application/json", "method": "GET" } ] }, ], "compnayId": "05711222-7DB3-4EBD-A821-57A30A699B88", "clientId": "65249EE7-DE8F-4798-AD5A-D20E42D99C12", "primaryCompanyId": "7204C2FE-13B1-4A48-8CDA-DE8386C60EF9", "MarketCloseTime": 2400, "MarketOpenTime": 900 } "