NetView API Documentation ## Sections • [Authorization](https://developers.hbssystems.com/overview/authorization.md): API Key Authentication When starting to use either the bulk API's of webhook event system you will need to use an API token to authenticate yourself with the NetView servers. HBS Systems should provide you with both an API bearer token as well as a secret key used to recreate signature's provided in some of the API's (namely webhook events). Your API bearer token should be sent as a header in ALL requests noted in this document in the form Authorization: Bearer <API Token> . Failure to do so will result in a 403 HTTP status being returned. For OAuth support see OAuth section here . • [NetView Architecture and Base URL's](https://developers.hbssystems.com/overview/netview-architecture-and-base-url-s.md): HBS Systems deploys the NetView product as a distributed server architecture. This means that in production, EVERY organization will have its own URL which you will need to use in your requests separate from one another. Note this does not mean each physical dealership location will have a separate URL, but the organization themselves. For example consider an organization ABC Org. They purchase and operate 4 physical location stores throughout the state of Texas - ABC Equipment, DEF Equipment, GHI Equipment, and JKL Equipment. In this case their base URL for all this locations could be https://abcorg.netviewcloud.com . To access the individual locations within this organization you will need to specify the “location” parameter in the request. This takes the form of loc<id> . So in our example you would have access to ABC Equipment as loc1 , DEF Equipment as loc2 , GHI Equipment as loc3 , and JKL Equipment as loc4 . NetView also has the notion of consolidated locations. These are locations that aggregate information from all linked locations together. These locations are not physical locations in the real world, but more of a virtual location that is used to have a higher level view as an organization. Most of the time this will be loc0 if the organization is setup in the system, but it can vary depending on organization. For testing a single server is provided as the sandbox URL via https://hbsapi.netviewcloud.com . This server has its own set of API keys and secrets that will be separate from your production set, so please make sure to use the correct ones. • [API Organization](https://developers.hbssystems.com/overview/api-organization.md): The API's are organized into separate groups based on module within the NetView system. These are: Customers, Dealership, ECOM, Parts, Rental, Service, User, and Wholegoods. • [Locations](https://developers.hbssystems.com/locations.md): The Locations API's are interfaces to reading and interacting with locations within the NetView system. In NetView a location is an entity that is used to track company information and as a container to group data into. An entity may be a child of another, in what is referred to as a Consolidated Setup. This occurs when the id and parent_id fields differ in value. If the id and parent_id field are identical then that means the location is a standalone and is not a child of another. • [Retrieve all locations](https://developers.hbssystems.com/locations/retrieve-all-locations.md): This endpoints retrieves all locations and their information from the NetView system. Note that the path in this endpoint specification starts with netview unlike other apis in this document. • [Customer](https://developers.hbssystems.com/customers.md): The Customer API's are interfaces to reading and interacting with customers within the NetView system. In NetView a customer is an entity that is used to track information, purchases, and account balances. A customer can be a single person, a business, or government entity. • [Retrieve customer](https://developers.hbssystems.com/customers/retrieve-customer.md): This endpoints retrieves a specified customer's information by their customer number from the NetView system. • [Retrieve all customers](https://developers.hbssystems.com/customers/retrieve-all-customers.md): This endpoint retrieves customer information in bulk from the NetView system. By default the endpoint will return ALL customers. There are two optional parameters that allow you to paginate the response. This is recommended, especially for larger organizations where ten's of thousands customers could potentially be returned. Each response will contain totalResultCount which lets you know how many total customers exist. • [Search customers](https://developers.hbssystems.com/customers/search-customers.md): This endpoint retrieves customer information in bulk based on a search query from the NetView system. The search query parameter will default to searching the record's number, name, or alpha sort fields. This search field is case-insensitive. If you wish to search for customer's by their phone numbers you can. This will search both their telephone and cell phone numbers. To search for a customers use the follow search query format: T {phone_number} . Note the space after the T as it is required. So for example if you wished to search for customer's with a phone number of ‘214-234-4444’ you would use the search query of search=T%202142344444 . • [Wholegoods](https://developers.hbssystems.com/wholegoods.md): The Wholegoods API's are interfaces to reading and interacting with pieces of equipment within the NetView system. In NetView a wholegood is an entity that is used to track information about a piece of (usually) serialized equipment. This means that the item has a serial number assigned. Wholegoods are uniquely identified by their field stock_number . This field is the NetView number used to track a piece of equipment throughout other modules as well. • [Retrieve wholegood](https://developers.hbssystems.com/wholegoods/retrieve-wholegood.md): This endpoint retrieves a specified piece of equipment's information by their stock number from the NetView system. • [Retrieve all wholegoods](https://developers.hbssystems.com/wholegoods/retrieve-all-wholegoods.md): This endpoints retrieves equipment/wholegood information in bulk from the NetView system. By default the endpoint will return ALL wholegood items. There are two optional parameters that allow you to paginate the response. This is HIGHLY recommended, especially for larger organizations where ten's of thousands customers could potentially be returned. Each response will contain totalResultCount which lets you know how many total wholegood items exist. The 'statuses' parameter can contain any of the following: 'H' (historical), 'N' (new), 'O' (ordered), 'R' (rental), 'S' (sold), 'T' (transferred), and 'U' (used) If the 'statuses' parameter is not provided, only new and used wholegoods are returned. • [Partial wholegood search](https://developers.hbssystems.com/wholegoods/partial-wholegood-search.md): This endpoint returns an array of equipment/wholegood objects that begin with a given partial stock number. • [Autocomplete search](https://developers.hbssystems.com/wholegoods/autocomplete-search.md): This endpoint returns any wholegoods whose stock number or serial number matches the search value, in the form of key/value pairs of matching field/stock number. • [Service](https://developers.hbssystems.com/service.md): The Service API's are interfaces to reading and interacting with service information within the NetView system. • [Retrieve all repair order numbers](https://developers.hbssystems.com/service/retrieve-all-repair-order-numbers-copy-1.md): This endpoint retrieves all repair order numbers from the NetView system. These numbers can be used to retrieve details about the repair orders in a separate call. By default the endpoint will return ALL repair order numbers. There is an optional timestamp parameter (ISO 8601 standard format), which will limit the response to repair orders that have been created or edited after that time. • [Retrieve single repair order details](https://developers.hbssystems.com/service/retrieve-multiple-repair-order-details-copy-1.md): This endpoint retrieves repair order details for a single given repair order number. • [Retrieve multiple repair order details](https://developers.hbssystems.com/service/retrieve-customer-copy-1.md): This endpoint retrieves repair order details for a given list of repair order numbers. • [OAuth](https://developers.hbssystems.com/authentication/oauth-1.md): This section provides the necessary details for usingthe OAuth API to authenticate users and access system resources securely. Follow the steps outlined to integrate your application with our authentication system. Refresh tokens are currently not used, but planned to be an option in a future additon. Unless otherwise noted, all access tokens are valid for 1 hour upon generation. Token Generation See API Reference here . Using the Access Token Once you have obtained the access token, include it in the `Authorization` header for all API requests to access protected resources. Example of Using the Token Headers: Authorization: Bearer <access_token> Sample Request : Plain text GET /api/resource HTTP/1.1 Host: api.example.com Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... Content-Type: application/json Usage Guidelines 1 . Authentication Flow : Call the POST /oauth/token endpoint to obtain an access token. Include the token in the `Authorization` header of subsequent requests. 2. Token Security : Keep the access token secure and avoid exposing it in URLs or logs. Security Recommendations Use HTTPS : Ensure all API requests are made over secure HTTPS connections. Secure Access Tokens : Never expose access tokens in URLs or logs. Token Expiry : Implement logic to refresh tokens when they are near expiry. • [API Reference](https://developers.hbssystems.com/authentication/oauth-1/api-reference.md): API Reference for OAuth Token Generation