Metadata-Version: 2.4
Name: crisphive
Version: 0.1.0
Summary: Official Python SDK for the CrispHive API.
Home-page: https://github.com/crisphive/crisphive-python
Author: CrispHive
Author-email: developer@crisphive.com
License: MIT
Keywords: crisphive,api,sdk
Description-Content-Type: text/markdown
Requires-Dist: urllib3<3.0.0,>=1.25.3
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pydantic>=2
Requires-Dist: typing-extensions>=4.7.1
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: requires-dist
Dynamic: summary

# crisphive
Public REST API for integrating CrispHive from your own backend. Authenticate every request with a secret API key as a Bearer token (`Authorization: Bearer chsk_live_…`). The key prefix selects the data environment: `chsk_live_…` → production (live), `chsk_test_…` → sandbox (isolated test).

**Key scopes (restricted keys).** A key is either *full-access* (can call every endpoint below) or *restricted* to a set of permission codes chosen at creation — the same codes as the dashboard permission grid (e.g. `customers_view`, `job_create`, `team_manage`). A restricted key calling an endpoint outside its scope gets `403`. The full code list is the permission catalog (`GET /permission/modules` on the dashboard API). Create, scope, and revoke keys from the business dashboard.

Every response is wrapped in the envelope `{ \"error_code\": 0, \"message\": \"Success\", \"data\": <payload> }`.

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0
- Package version: 0.1.0
- Generator version: 7.11.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.8+

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/crisphive/crisphive-python.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/crisphive/crisphive-python.git`)

Then import the package:
```python
import crisphive
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import crisphive
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import crisphive
from crisphive.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.crisphive.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = crisphive.Configuration(
    host = "https://api.crisphive.com/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (CrispHive secret key): ApiKeyAuth
configuration = crisphive.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with crisphive.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = crisphive.BusinessSkillApi(api_client)
    page = 56 # int | Page number (default: 1) (optional)
    limit = 56 # int | Page size (default: 15, max: 1000) (optional)

    try:
        # List skill categories
        api_response = api_instance.list_skill_categories(page=page, limit=limit)
        print("The response of BusinessSkillApi->list_skill_categories:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling BusinessSkillApi->list_skill_categories: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *https://api.crisphive.com/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BusinessSkillApi* | [**list_skill_categories**](docs/BusinessSkillApi.md#list_skill_categories) | **GET** /skill-categories | List skill categories
*BusinessSkillApi* | [**list_skills**](docs/BusinessSkillApi.md#list_skills) | **GET** /skills | List all skills
*BusinessSkillApi* | [**list_skills_by_category**](docs/BusinessSkillApi.md#list_skills_by_category) | **GET** /skill-categories/{id}/skills | List skills in a category
*CustomerApi* | [**create_customer**](docs/CustomerApi.md#create_customer) | **POST** /customers | Create a customer
*CustomerApi* | [**delete_customer**](docs/CustomerApi.md#delete_customer) | **DELETE** /customers/{id} | Delete a customer
*CustomerApi* | [**get_customer**](docs/CustomerApi.md#get_customer) | **GET** /customers/{id} | Get a customer
*CustomerApi* | [**list_customers**](docs/CustomerApi.md#list_customers) | **GET** /customers | List customers
*CustomerApi* | [**update_customer**](docs/CustomerApi.md#update_customer) | **PUT** /customers/{id} | Update a customer
*JobRequestBusinessApi* | [**create_job_request**](docs/JobRequestBusinessApi.md#create_job_request) | **POST** /job-requests | Create a job request (business actor)
*JobRequestBusinessApi* | [**get_job_request**](docs/JobRequestBusinessApi.md#get_job_request) | **GET** /job-requests/{id} | Get a job request
*JobRequestBusinessApi* | [**get_job_request_timeline**](docs/JobRequestBusinessApi.md#get_job_request_timeline) | **GET** /job-requests/{id}/timeline | Job timeline (business surface — also serves tech via BusinessAuth)
*JobRequestBusinessApi* | [**list_job_request_booking_windows**](docs/JobRequestBusinessApi.md#list_job_request_booking_windows) | **GET** /job-requests/booking-windows | Booking availability (business actor)
*JobRequestBusinessApi* | [**list_job_request_changes**](docs/JobRequestBusinessApi.md#list_job_request_changes) | **GET** /job-requests/changes | Poll for new &amp; changed job requests (sync feed)
*JobRequestBusinessApi* | [**list_job_requests**](docs/JobRequestBusinessApi.md#list_job_requests) | **GET** /job-requests | List job requests
*JobTypesApi* | [**get_job_type**](docs/JobTypesApi.md#get_job_type) | **GET** /job-types/{id} | Get a job type
*JobTypesApi* | [**list_job_types**](docs/JobTypesApi.md#list_job_types) | **GET** /job-types | List job types
*ServiceAreaApi* | [**get_service_area**](docs/ServiceAreaApi.md#get_service_area) | **GET** /service-areas/{id} | Get a service area
*ServiceAreaApi* | [**list_service_areas**](docs/ServiceAreaApi.md#list_service_areas) | **GET** /service-areas | List service areas
*TechnicianApi* | [**get_technician**](docs/TechnicianApi.md#get_technician) | **GET** /technicians/{id} | Get a technician
*TechnicianApi* | [**list_technicians**](docs/TechnicianApi.md#list_technicians) | **GET** /technicians | List technicians
*VehicleApi* | [**get_vehicle**](docs/VehicleApi.md#get_vehicle) | **GET** /vehicles/{id} | Get a vehicle
*VehicleApi* | [**list_vehicles**](docs/VehicleApi.md#list_vehicles) | **GET** /vehicles | List vehicles


## Documentation For Models

 - [CreateCustomer200Response](docs/CreateCustomer200Response.md)
 - [CreateJobRequest200Response](docs/CreateJobRequest200Response.md)
 - [Customer](docs/Customer.md)
 - [CustomerAddress](docs/CustomerAddress.md)
 - [CustomerAddressRequest](docs/CustomerAddressRequest.md)
 - [CustomerContact](docs/CustomerContact.md)
 - [CustomerCreateRequest](docs/CustomerCreateRequest.md)
 - [CustomerCreateResponse](docs/CustomerCreateResponse.md)
 - [CustomerList](docs/CustomerList.md)
 - [CustomerListItem](docs/CustomerListItem.md)
 - [CustomerProfile](docs/CustomerProfile.md)
 - [CustomerSpending](docs/CustomerSpending.md)
 - [CustomerTierProgress](docs/CustomerTierProgress.md)
 - [CustomerUpdateRequest](docs/CustomerUpdateRequest.md)
 - [GetCustomer200Response](docs/GetCustomer200Response.md)
 - [GetJobRequest200Response](docs/GetJobRequest200Response.md)
 - [GetJobRequestTimeline200Response](docs/GetJobRequestTimeline200Response.md)
 - [GetJobType200Response](docs/GetJobType200Response.md)
 - [GetServiceArea200Response](docs/GetServiceArea200Response.md)
 - [GetTechnician200Response](docs/GetTechnician200Response.md)
 - [GetVehicle200Response](docs/GetVehicle200Response.md)
 - [JobDate](docs/JobDate.md)
 - [JobDateBusinessRange](docs/JobDateBusinessRange.md)
 - [JobDatePeriod](docs/JobDatePeriod.md)
 - [JobDatePeriodEntry](docs/JobDatePeriodEntry.md)
 - [JobRequest](docs/JobRequest.md)
 - [JobRequestActionAuditBy](docs/JobRequestActionAuditBy.md)
 - [JobRequestActionAuditEntry](docs/JobRequestActionAuditEntry.md)
 - [JobRequestActionSummary](docs/JobRequestActionSummary.md)
 - [JobRequestAddressSummary](docs/JobRequestAddressSummary.md)
 - [JobRequestArchiveSummary](docs/JobRequestArchiveSummary.md)
 - [JobRequestArrivalWindow](docs/JobRequestArrivalWindow.md)
 - [JobRequestAssignedVehicle](docs/JobRequestAssignedVehicle.md)
 - [JobRequestAssignmentSummary](docs/JobRequestAssignmentSummary.md)
 - [JobRequestBookingWindows](docs/JobRequestBookingWindows.md)
 - [JobRequestBusinessTimeRange](docs/JobRequestBusinessTimeRange.md)
 - [JobRequestChanges](docs/JobRequestChanges.md)
 - [JobRequestCreateRequest](docs/JobRequestCreateRequest.md)
 - [JobRequestCreateResponse](docs/JobRequestCreateResponse.md)
 - [JobRequestCrewMember](docs/JobRequestCrewMember.md)
 - [JobRequestCustomerSummary](docs/JobRequestCustomerSummary.md)
 - [JobRequestDayWindows](docs/JobRequestDayWindows.md)
 - [JobRequestJobDateBusinessRangeRequest](docs/JobRequestJobDateBusinessRangeRequest.md)
 - [JobRequestJobDatePeriodRequest](docs/JobRequestJobDatePeriodRequest.md)
 - [JobRequestJobDateRequest](docs/JobRequestJobDateRequest.md)
 - [JobRequestList](docs/JobRequestList.md)
 - [JobRequestPeriod](docs/JobRequestPeriod.md)
 - [JobRequestQuoteSummary](docs/JobRequestQuoteSummary.md)
 - [JobRequestRatingSummary](docs/JobRequestRatingSummary.md)
 - [JobRequestSchedule](docs/JobRequestSchedule.md)
 - [JobRequestSession](docs/JobRequestSession.md)
 - [JobRequestSkillSummary](docs/JobRequestSkillSummary.md)
 - [JobRequestStatusSummary](docs/JobRequestStatusSummary.md)
 - [JobRequestTechnicianInfo](docs/JobRequestTechnicianInfo.md)
 - [JobRequestTimeline](docs/JobRequestTimeline.md)
 - [JobRequestTimelineAction](docs/JobRequestTimelineAction.md)
 - [JobRequestTimelineEvent](docs/JobRequestTimelineEvent.md)
 - [JobType](docs/JobType.md)
 - [ListCustomers200Response](docs/ListCustomers200Response.md)
 - [ListJobRequestBookingWindows200Response](docs/ListJobRequestBookingWindows200Response.md)
 - [ListJobRequestChanges200Response](docs/ListJobRequestChanges200Response.md)
 - [ListJobRequests200Response](docs/ListJobRequests200Response.md)
 - [ListJobTypes200Response](docs/ListJobTypes200Response.md)
 - [ListServiceAreas200Response](docs/ListServiceAreas200Response.md)
 - [ListSkillCategories200Response](docs/ListSkillCategories200Response.md)
 - [ListSkills200Response](docs/ListSkills200Response.md)
 - [ListSkillsByCategory200Response](docs/ListSkillsByCategory200Response.md)
 - [ListTechnicians200Response](docs/ListTechnicians200Response.md)
 - [ListVehicles200Response](docs/ListVehicles200Response.md)
 - [Pagination](docs/Pagination.md)
 - [ResponseEnvelope](docs/ResponseEnvelope.md)
 - [ServiceArea](docs/ServiceArea.md)
 - [ServiceAreaList](docs/ServiceAreaList.md)
 - [Skill](docs/Skill.md)
 - [SkillByCategoryList](docs/SkillByCategoryList.md)
 - [SkillCategory](docs/SkillCategory.md)
 - [SkillCategoryList](docs/SkillCategoryList.md)
 - [SkillList](docs/SkillList.md)
 - [SkillSummary](docs/SkillSummary.md)
 - [Technician](docs/Technician.md)
 - [TechnicianAddress](docs/TechnicianAddress.md)
 - [TechnicianLeadRef](docs/TechnicianLeadRef.md)
 - [TechnicianList](docs/TechnicianList.md)
 - [TechnicianServiceAreaRef](docs/TechnicianServiceAreaRef.md)
 - [TechnicianStatus](docs/TechnicianStatus.md)
 - [Vehicle](docs/Vehicle.md)
 - [VehicleList](docs/VehicleList.md)
 - [VehicleOwner](docs/VehicleOwner.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization


Authentication schemes defined for the API:
<a id="ApiKeyAuth"></a>
### ApiKeyAuth

- **Type**: Bearer authentication (CrispHive secret key)


## Author




