Metadata-Version: 2.4
Name: crisphive
Version: 0.2.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.2.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
*BusinessSkillApi* | [**list_technician_skills**](docs/BusinessSkillApi.md#list_technician_skills) | **GET** /technicians/{id}/skills | List skills for a technician
*BusinessSkillApi* | [**replace_technician_skills**](docs/BusinessSkillApi.md#replace_technician_skills) | **PATCH** /technicians/{id}/skills | Replace a technician&#39;s skills
*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* | [**commit_emergency_reschedule**](docs/JobRequestBusinessApi.md#commit_emergency_reschedule) | **POST** /job-requests/emergency/commit | Commit emergency insert + cascade reschedule
*JobRequestBusinessApi* | [**commit_job_request_move**](docs/JobRequestBusinessApi.md#commit_job_request_move) | **POST** /job-requests/{id}/move/commit | Commit a schedule-board job move
*JobRequestBusinessApi* | [**confirm_job_request**](docs/JobRequestBusinessApi.md#confirm_job_request) | **POST** /job-requests/{id}/confirm | Confirm a booking on behalf of the customer
*JobRequestBusinessApi* | [**create_job_request**](docs/JobRequestBusinessApi.md#create_job_request) | **POST** /job-requests | Create a job request
*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
*JobRequestBusinessApi* | [**get_technician_schedule**](docs/JobRequestBusinessApi.md#get_technician_schedule) | **GET** /technicians/{id}/schedule | One technician&#39;s real schedule (sessions + time off)
*JobRequestBusinessApi* | [**list_crew_candidates**](docs/JobRequestBusinessApi.md#list_crew_candidates) | **GET** /job-requests/{id}/crew-candidates | Matching crew candidates for a job
*JobRequestBusinessApi* | [**list_emergency_candidates**](docs/JobRequestBusinessApi.md#list_emergency_candidates) | **POST** /job-requests/emergency/candidates | Rank technicians for a P0 emergency insert
*JobRequestBusinessApi* | [**list_job_request_booking_windows**](docs/JobRequestBusinessApi.md#list_job_request_booking_windows) | **GET** /job-requests/booking-windows | Booking availability
*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
*JobRequestBusinessApi* | [**list_matching_slots**](docs/JobRequestBusinessApi.md#list_matching_slots) | **GET** /job-requests/{id}/time-segments | Matching time slots for a quoted job
*JobRequestBusinessApi* | [**list_nearby_technicians**](docs/JobRequestBusinessApi.md#list_nearby_technicians) | **GET** /technicians/nearby | Find nearby feasible technicians (job-less location query)
*JobRequestBusinessApi* | [**preview_emergency_reschedule**](docs/JobRequestBusinessApi.md#preview_emergency_reschedule) | **POST** /job-requests/emergency/preview | Preview emergency insert + cascade reschedule
*JobRequestBusinessApi* | [**preview_job_request_move**](docs/JobRequestBusinessApi.md#preview_job_request_move) | **POST** /job-requests/{id}/move/preview | Preview a schedule-board job move
*JobRequestBusinessApi* | [**quote_job_request**](docs/JobRequestBusinessApi.md#quote_job_request) | **POST** /job-requests/{id}/quote | Fire quote (FIXED action — business)
*JobRequestBusinessApi* | [**update_job_priority**](docs/JobRequestBusinessApi.md#update_job_priority) | **PATCH** /job-requests/{id}/priority | Set job priority (scheduling staff)
*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* | [**create_technician**](docs/TechnicianApi.md#create_technician) | **POST** /technicians | Add a technician
*TechnicianApi* | [**delete_technician**](docs/TechnicianApi.md#delete_technician) | **DELETE** /technicians/{id} | Remove a technician
*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
*TechnicianApi* | [**replace_technician_buddies**](docs/TechnicianApi.md#replace_technician_buddies) | **PUT** /technicians/{id}/buddies | Replace a technician&#39;s buddies
*TechnicianApi* | [**replace_technician_leads**](docs/TechnicianApi.md#replace_technician_leads) | **PUT** /technicians/{id}/leads | Replace a buddy&#39;s leaders (buddy side)
*TechnicianApi* | [**replace_technician_service_areas**](docs/TechnicianApi.md#replace_technician_service_areas) | **PUT** /technicians/{id}/service-areas | Replace a technician&#39;s service areas
*TechnicianApi* | [**replace_technician_vehicles**](docs/TechnicianApi.md#replace_technician_vehicles) | **PUT** /technicians/{id}/vehicles | Replace a technician&#39;s vehicles
*TechnicianApi* | [**update_technician**](docs/TechnicianApi.md#update_technician) | **PUT** /technicians/{id} | Update a technician
*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

 - [CommitEmergencyReschedule200Response](docs/CommitEmergencyReschedule200Response.md)
 - [CommitJobRequestMove200Response](docs/CommitJobRequestMove200Response.md)
 - [CreateCustomer200Response](docs/CreateCustomer200Response.md)
 - [CreateJobRequest200Response](docs/CreateJobRequest200Response.md)
 - [CreateTechnician200Response](docs/CreateTechnician200Response.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)
 - [GetTechnicianSchedule200Response](docs/GetTechnicianSchedule200Response.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)
 - [JobRequestAttentionSummary](docs/JobRequestAttentionSummary.md)
 - [JobRequestAvailableVehicle](docs/JobRequestAvailableVehicle.md)
 - [JobRequestBookingWindows](docs/JobRequestBookingWindows.md)
 - [JobRequestBuddySlotCandidates](docs/JobRequestBuddySlotCandidates.md)
 - [JobRequestBusinessTimeRange](docs/JobRequestBusinessTimeRange.md)
 - [JobRequestChanges](docs/JobRequestChanges.md)
 - [JobRequestConfirmRequest](docs/JobRequestConfirmRequest.md)
 - [JobRequestCreateRequest](docs/JobRequestCreateRequest.md)
 - [JobRequestCreateResponse](docs/JobRequestCreateResponse.md)
 - [JobRequestCrewCandidates](docs/JobRequestCrewCandidates.md)
 - [JobRequestCrewChange](docs/JobRequestCrewChange.md)
 - [JobRequestCrewMember](docs/JobRequestCrewMember.md)
 - [JobRequestCrewMemberInput](docs/JobRequestCrewMemberInput.md)
 - [JobRequestCrewRecommendation](docs/JobRequestCrewRecommendation.md)
 - [JobRequestCustomerSummary](docs/JobRequestCustomerSummary.md)
 - [JobRequestDayWindows](docs/JobRequestDayWindows.md)
 - [JobRequestEmergencyCandidate](docs/JobRequestEmergencyCandidate.md)
 - [JobRequestEmergencyCandidates](docs/JobRequestEmergencyCandidates.md)
 - [JobRequestEmergencyCandidatesRequest](docs/JobRequestEmergencyCandidatesRequest.md)
 - [JobRequestEmergencyCommitRequest](docs/JobRequestEmergencyCommitRequest.md)
 - [JobRequestEmergencyPlan](docs/JobRequestEmergencyPlan.md)
 - [JobRequestEmergencyPreviewRequest](docs/JobRequestEmergencyPreviewRequest.md)
 - [JobRequestJobDateBusinessRangeRequest](docs/JobRequestJobDateBusinessRangeRequest.md)
 - [JobRequestJobDatePeriodRequest](docs/JobRequestJobDatePeriodRequest.md)
 - [JobRequestJobDateRequest](docs/JobRequestJobDateRequest.md)
 - [JobRequestLeadCandidate](docs/JobRequestLeadCandidate.md)
 - [JobRequestList](docs/JobRequestList.md)
 - [JobRequestMoveCommitReq](docs/JobRequestMoveCommitReq.md)
 - [JobRequestMoveMember](docs/JobRequestMoveMember.md)
 - [JobRequestMovePlan](docs/JobRequestMovePlan.md)
 - [JobRequestMovePreviewReq](docs/JobRequestMovePreviewReq.md)
 - [JobRequestMoveWarning](docs/JobRequestMoveWarning.md)
 - [JobRequestPeriod](docs/JobRequestPeriod.md)
 - [JobRequestQuoteRequest](docs/JobRequestQuoteRequest.md)
 - [JobRequestQuoteSummary](docs/JobRequestQuoteSummary.md)
 - [JobRequestRatingSummary](docs/JobRequestRatingSummary.md)
 - [JobRequestRescheduleDay](docs/JobRequestRescheduleDay.md)
 - [JobRequestRescheduleMove](docs/JobRequestRescheduleMove.md)
 - [JobRequestRescheduleReassignment](docs/JobRequestRescheduleReassignment.md)
 - [JobRequestSchedule](docs/JobRequestSchedule.md)
 - [JobRequestSession](docs/JobRequestSession.md)
 - [JobRequestSkillSummary](docs/JobRequestSkillSummary.md)
 - [JobRequestStatusSummary](docs/JobRequestStatusSummary.md)
 - [JobRequestTechCandidate](docs/JobRequestTechCandidate.md)
 - [JobRequestTechnicianInfo](docs/JobRequestTechnicianInfo.md)
 - [JobRequestTimeSegments](docs/JobRequestTimeSegments.md)
 - [JobRequestTimeSegmentsBusinessTime](docs/JobRequestTimeSegmentsBusinessTime.md)
 - [JobRequestTimeSegmentsDay](docs/JobRequestTimeSegmentsDay.md)
 - [JobRequestTimeSegmentsSlot](docs/JobRequestTimeSegmentsSlot.md)
 - [JobRequestTimeSegmentsWorker](docs/JobRequestTimeSegmentsWorker.md)
 - [JobRequestTimeline](docs/JobRequestTimeline.md)
 - [JobRequestTimelineAction](docs/JobRequestTimelineAction.md)
 - [JobRequestTimelineEvent](docs/JobRequestTimelineEvent.md)
 - [JobRequestUpdatePriorityRequest](docs/JobRequestUpdatePriorityRequest.md)
 - [JobType](docs/JobType.md)
 - [ListCrewCandidates200Response](docs/ListCrewCandidates200Response.md)
 - [ListCustomers200Response](docs/ListCustomers200Response.md)
 - [ListEmergencyCandidates200Response](docs/ListEmergencyCandidates200Response.md)
 - [ListJobRequestBookingWindows200Response](docs/ListJobRequestBookingWindows200Response.md)
 - [ListJobRequestChanges200Response](docs/ListJobRequestChanges200Response.md)
 - [ListJobRequests200Response](docs/ListJobRequests200Response.md)
 - [ListJobTypes200Response](docs/ListJobTypes200Response.md)
 - [ListMatchingSlots200Response](docs/ListMatchingSlots200Response.md)
 - [ListNearbyTechnicians200Response](docs/ListNearbyTechnicians200Response.md)
 - [ListServiceAreas200Response](docs/ListServiceAreas200Response.md)
 - [ListSkillCategories200Response](docs/ListSkillCategories200Response.md)
 - [ListSkills200Response](docs/ListSkills200Response.md)
 - [ListSkillsByCategory200Response](docs/ListSkillsByCategory200Response.md)
 - [ListTechnicianSkills200Response](docs/ListTechnicianSkills200Response.md)
 - [ListTechnicians200Response](docs/ListTechnicians200Response.md)
 - [ListVehicles200Response](docs/ListVehicles200Response.md)
 - [NearbyTechnician](docs/NearbyTechnician.md)
 - [NearbyTechnicians](docs/NearbyTechnicians.md)
 - [Pagination](docs/Pagination.md)
 - [ReplaceTechnicianServiceAreas200Response](docs/ReplaceTechnicianServiceAreas200Response.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)
 - [TechnicianAddressInput](docs/TechnicianAddressInput.md)
 - [TechnicianBuddiesRequest](docs/TechnicianBuddiesRequest.md)
 - [TechnicianCreateRequest](docs/TechnicianCreateRequest.md)
 - [TechnicianCreateResponse](docs/TechnicianCreateResponse.md)
 - [TechnicianLeadRef](docs/TechnicianLeadRef.md)
 - [TechnicianLeadsRequest](docs/TechnicianLeadsRequest.md)
 - [TechnicianList](docs/TechnicianList.md)
 - [TechnicianSchedule](docs/TechnicianSchedule.md)
 - [TechnicianScheduleBlock](docs/TechnicianScheduleBlock.md)
 - [TechnicianScheduleSession](docs/TechnicianScheduleSession.md)
 - [TechnicianServiceAreaRef](docs/TechnicianServiceAreaRef.md)
 - [TechnicianServiceAreasRequest](docs/TechnicianServiceAreasRequest.md)
 - [TechnicianServiceAreasResponse](docs/TechnicianServiceAreasResponse.md)
 - [TechnicianSkill](docs/TechnicianSkill.md)
 - [TechnicianSkillList](docs/TechnicianSkillList.md)
 - [TechnicianSkillsRequest](docs/TechnicianSkillsRequest.md)
 - [TechnicianStatus](docs/TechnicianStatus.md)
 - [TechnicianUpdateRequest](docs/TechnicianUpdateRequest.md)
 - [TechnicianVehiclesRequest](docs/TechnicianVehiclesRequest.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




