Crisphive 0.2.0
dotnet add package Crisphive --version 0.2.0
NuGet\Install-Package Crisphive -Version 0.2.0
<PackageReference Include="Crisphive" Version="0.2.0" />
<PackageVersion Include="Crisphive" Version="0.2.0" />
<PackageReference Include="Crisphive" />
paket add Crisphive --version 0.2.0
#r "nuget: Crisphive, 0.2.0"
#:package Crisphive@0.2.0
#addin nuget:?package=Crisphive&version=0.2.0
#tool nuget:?package=Crisphive&version=0.2.0
Crisphive - the C# library for the Crisphive Developer API
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 C# SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0
- SDK version: 0.2.0
- Generator version: 7.11.0
- Build package: org.openapitools.codegen.languages.CSharpClientCodegen
<a id="frameworks-supported"></a>
Frameworks supported
<a id="dependencies"></a>
Dependencies
- Json.NET - 13.0.2 or later
- JsonSubTypes - 1.8.0 or later
- System.ComponentModel.Annotations - 5.0.0 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations
<a id="installation"></a>
Installation
Run the following command to generate the DLL
- [Mac/Linux]
/bin/sh build.sh - [Windows]
build.bat
Then include the DLL (under the bin folder) in the C# project, and use the namespaces:
using Crisphive.Api;
using Crisphive.Client;
using Crisphive.Model;
<a id="packaging"></a>
Packaging
A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.
This .nuspec uses placeholders from the .csproj, so build the .csproj directly:
nuget pack -Build -OutputDirectory out Crisphive.csproj
Then, publish to a local feed or other host and consume the new package via Nuget as usual.
<a id="usage"></a>
Usage
To use the API client with a HTTP proxy, setup a System.Net.WebProxy
Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;
Connections
Each ApiClass (properly the ApiClient inside it) will create an instance of HttpClient. It will use that for the entire lifecycle and dispose it when called the Dispose method.
To better manager the connections it's a common practice to reuse the HttpClient and HttpClientHandler (see here for details). To use your own HttpClient instance just pass it to the ApiClass constructor.
HttpClientHandler yourHandler = new HttpClientHandler();
HttpClient yourHttpClient = new HttpClient(yourHandler);
var api = new YourApiClass(yourHttpClient, yourHandler);
If you want to use an HttpClient and don't have access to the handler, for example in a DI context in Asp.net Core when using IHttpClientFactory.
HttpClient yourHttpClient = new HttpClient();
var api = new YourApiClass(yourHttpClient);
You'll loose some configuration settings, the features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. You need to either manually handle those in your setup of the HttpClient or they won't be available.
Here an example of DI setup in a sample web project:
services.AddHttpClient<YourApiClass>(httpClient =>
new PetApi(httpClient));
<a id="getting-started"></a>
Getting Started
using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Crisphive.Api;
using Crisphive.Client;
using Crisphive.Model;
namespace Example
{
public class Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.crisphive.com/v1";
// Configure Bearer token for authorization: ApiKeyAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
HttpClient httpClient = new HttpClient();
HttpClientHandler httpClientHandler = new HttpClientHandler();
var apiInstance = new BusinessSkillApi(httpClient, config, httpClientHandler);
var page = 56; // int? | Page number (default: 1) (optional)
var limit = 56; // int? | Page size (default: 15, max: 1000) (optional)
try
{
// List skill categories
ListSkillCategories200Response result = apiInstance.ListSkillCategories(page, limit);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BusinessSkillApi.ListSkillCategories: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
<a id="documentation-for-api-endpoints"></a>
Documentation for API Endpoints
All URIs are relative to https://api.crisphive.com/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| BusinessSkillApi | ListSkillCategories | GET /skill-categories | List skill categories |
| BusinessSkillApi | ListSkills | GET /skills | List all skills |
| BusinessSkillApi | ListSkillsByCategory | GET /skill-categories/{id}/skills | List skills in a category |
| BusinessSkillApi | ListTechnicianSkills | GET /technicians/{id}/skills | List skills for a technician |
| BusinessSkillApi | ReplaceTechnicianSkills | PATCH /technicians/{id}/skills | Replace a technician's skills |
| CustomerApi | CreateCustomer | POST /customers | Create a customer |
| CustomerApi | DeleteCustomer | DELETE /customers/{id} | Delete a customer |
| CustomerApi | GetCustomer | GET /customers/{id} | Get a customer |
| CustomerApi | ListCustomers | GET /customers | List customers |
| CustomerApi | UpdateCustomer | PUT /customers/{id} | Update a customer |
| JobRequestBusinessApi | CommitEmergencyReschedule | POST /job-requests/emergency/commit | Commit emergency insert + cascade reschedule |
| JobRequestBusinessApi | CommitJobRequestMove | POST /job-requests/{id}/move/commit | Commit a schedule-board job move |
| JobRequestBusinessApi | ConfirmJobRequest | POST /job-requests/{id}/confirm | Confirm a booking on behalf of the customer |
| JobRequestBusinessApi | CreateJobRequest | POST /job-requests | Create a job request |
| JobRequestBusinessApi | GetJobRequest | GET /job-requests/{id} | Get a job request |
| JobRequestBusinessApi | GetJobRequestTimeline | GET /job-requests/{id}/timeline | Job timeline |
| JobRequestBusinessApi | GetTechnicianSchedule | GET /technicians/{id}/schedule | One technician's real schedule (sessions + time off) |
| JobRequestBusinessApi | ListCrewCandidates | GET /job-requests/{id}/crew-candidates | Matching crew candidates for a job |
| JobRequestBusinessApi | ListEmergencyCandidates | POST /job-requests/emergency/candidates | Rank technicians for a P0 emergency insert |
| JobRequestBusinessApi | ListJobRequestBookingWindows | GET /job-requests/booking-windows | Booking availability |
| JobRequestBusinessApi | ListJobRequestChanges | GET /job-requests/changes | Poll for new & changed job requests (sync feed) |
| JobRequestBusinessApi | ListJobRequests | GET /job-requests | List job requests |
| JobRequestBusinessApi | ListMatchingSlots | GET /job-requests/{id}/time-segments | Matching time slots for a quoted job |
| JobRequestBusinessApi | ListNearbyTechnicians | GET /technicians/nearby | Find nearby feasible technicians (job-less location query) |
| JobRequestBusinessApi | PreviewEmergencyReschedule | POST /job-requests/emergency/preview | Preview emergency insert + cascade reschedule |
| JobRequestBusinessApi | PreviewJobRequestMove | POST /job-requests/{id}/move/preview | Preview a schedule-board job move |
| JobRequestBusinessApi | QuoteJobRequest | POST /job-requests/{id}/quote | Fire quote (FIXED action — business) |
| JobRequestBusinessApi | UpdateJobPriority | PATCH /job-requests/{id}/priority | Set job priority (scheduling staff) |
| JobTypesApi | GetJobType | GET /job-types/{id} | Get a job type |
| JobTypesApi | ListJobTypes | GET /job-types | List job types |
| ServiceAreaApi | GetServiceArea | GET /service-areas/{id} | Get a service area |
| ServiceAreaApi | ListServiceAreas | GET /service-areas | List service areas |
| TechnicianApi | CreateTechnician | POST /technicians | Add a technician |
| TechnicianApi | DeleteTechnician | DELETE /technicians/{id} | Remove a technician |
| TechnicianApi | GetTechnician | GET /technicians/{id} | Get a technician |
| TechnicianApi | ListTechnicians | GET /technicians | List technicians |
| TechnicianApi | ReplaceTechnicianBuddies | PUT /technicians/{id}/buddies | Replace a technician's buddies |
| TechnicianApi | ReplaceTechnicianLeads | PUT /technicians/{id}/leads | Replace a buddy's leaders (buddy side) |
| TechnicianApi | ReplaceTechnicianServiceAreas | PUT /technicians/{id}/service-areas | Replace a technician's service areas |
| TechnicianApi | ReplaceTechnicianVehicles | PUT /technicians/{id}/vehicles | Replace a technician's vehicles |
| TechnicianApi | UpdateTechnician | PUT /technicians/{id} | Update a technician |
| VehicleApi | GetVehicle | GET /vehicles/{id} | Get a vehicle |
| VehicleApi | ListVehicles | GET /vehicles | List vehicles |
<a id="documentation-for-models"></a>
Documentation for Models
- Model.CommitEmergencyReschedule200Response
- Model.CommitJobRequestMove200Response
- Model.CreateCustomer200Response
- Model.CreateJobRequest200Response
- Model.CreateTechnician200Response
- Model.Customer
- Model.CustomerAddress
- Model.CustomerAddressRequest
- Model.CustomerContact
- Model.CustomerCreateRequest
- Model.CustomerCreateResponse
- Model.CustomerList
- Model.CustomerListItem
- Model.CustomerProfile
- Model.CustomerSpending
- Model.CustomerTierProgress
- Model.CustomerUpdateRequest
- Model.GetCustomer200Response
- Model.GetJobRequest200Response
- Model.GetJobRequestTimeline200Response
- Model.GetJobType200Response
- Model.GetServiceArea200Response
- Model.GetTechnician200Response
- Model.GetTechnicianSchedule200Response
- Model.GetVehicle200Response
- Model.JobDate
- Model.JobDateBusinessRange
- Model.JobDatePeriod
- Model.JobDatePeriodEntry
- Model.JobRequest
- Model.JobRequestActionAuditBy
- Model.JobRequestActionAuditEntry
- Model.JobRequestActionSummary
- Model.JobRequestAddressSummary
- Model.JobRequestArchiveSummary
- Model.JobRequestArrivalWindow
- Model.JobRequestAssignedVehicle
- Model.JobRequestAssignmentSummary
- Model.JobRequestAttentionSummary
- Model.JobRequestAvailableVehicle
- Model.JobRequestBookingWindows
- Model.JobRequestBuddySlotCandidates
- Model.JobRequestBusinessTimeRange
- Model.JobRequestChanges
- Model.JobRequestConfirmRequest
- Model.JobRequestCreateRequest
- Model.JobRequestCreateResponse
- Model.JobRequestCrewCandidates
- Model.JobRequestCrewChange
- Model.JobRequestCrewMember
- Model.JobRequestCrewMemberInput
- Model.JobRequestCrewRecommendation
- Model.JobRequestCustomerSummary
- Model.JobRequestDayWindows
- Model.JobRequestEmergencyCandidate
- Model.JobRequestEmergencyCandidates
- Model.JobRequestEmergencyCandidatesRequest
- Model.JobRequestEmergencyCommitRequest
- Model.JobRequestEmergencyPlan
- Model.JobRequestEmergencyPreviewRequest
- Model.JobRequestJobDateBusinessRangeRequest
- Model.JobRequestJobDatePeriodRequest
- Model.JobRequestJobDateRequest
- Model.JobRequestLeadCandidate
- Model.JobRequestList
- Model.JobRequestMoveCommitReq
- Model.JobRequestMoveMember
- Model.JobRequestMovePlan
- Model.JobRequestMovePreviewReq
- Model.JobRequestMoveWarning
- Model.JobRequestPeriod
- Model.JobRequestQuoteRequest
- Model.JobRequestQuoteSummary
- Model.JobRequestRatingSummary
- Model.JobRequestRescheduleDay
- Model.JobRequestRescheduleMove
- Model.JobRequestRescheduleReassignment
- Model.JobRequestSchedule
- Model.JobRequestSession
- Model.JobRequestSkillSummary
- Model.JobRequestStatusSummary
- Model.JobRequestTechCandidate
- Model.JobRequestTechnicianInfo
- Model.JobRequestTimeSegments
- Model.JobRequestTimeSegmentsBusinessTime
- Model.JobRequestTimeSegmentsDay
- Model.JobRequestTimeSegmentsSlot
- Model.JobRequestTimeSegmentsWorker
- Model.JobRequestTimeline
- Model.JobRequestTimelineAction
- Model.JobRequestTimelineEvent
- Model.JobRequestUpdatePriorityRequest
- Model.JobType
- Model.ListCrewCandidates200Response
- Model.ListCustomers200Response
- Model.ListEmergencyCandidates200Response
- Model.ListJobRequestBookingWindows200Response
- Model.ListJobRequestChanges200Response
- Model.ListJobRequests200Response
- Model.ListJobTypes200Response
- Model.ListMatchingSlots200Response
- Model.ListNearbyTechnicians200Response
- Model.ListServiceAreas200Response
- Model.ListSkillCategories200Response
- Model.ListSkills200Response
- Model.ListSkillsByCategory200Response
- Model.ListTechnicianSkills200Response
- Model.ListTechnicians200Response
- Model.ListVehicles200Response
- Model.NearbyTechnician
- Model.NearbyTechnicians
- Model.Pagination
- Model.ReplaceTechnicianServiceAreas200Response
- Model.ResponseEnvelope
- Model.ServiceArea
- Model.ServiceAreaList
- Model.Skill
- Model.SkillByCategoryList
- Model.SkillCategory
- Model.SkillCategoryList
- Model.SkillList
- Model.SkillSummary
- Model.Technician
- Model.TechnicianAddress
- Model.TechnicianAddressInput
- Model.TechnicianBuddiesRequest
- Model.TechnicianCreateRequest
- Model.TechnicianCreateResponse
- Model.TechnicianLeadRef
- Model.TechnicianLeadsRequest
- Model.TechnicianList
- Model.TechnicianSchedule
- Model.TechnicianScheduleBlock
- Model.TechnicianScheduleSession
- Model.TechnicianServiceAreaRef
- Model.TechnicianServiceAreasRequest
- Model.TechnicianServiceAreasResponse
- Model.TechnicianSkill
- Model.TechnicianSkillList
- Model.TechnicianSkillsRequest
- Model.TechnicianStatus
- Model.TechnicianUpdateRequest
- Model.TechnicianVehiclesRequest
- Model.Vehicle
- Model.VehicleList
- Model.VehicleOwner
<a id="documentation-for-authorization"></a>
Documentation for Authorization
Authentication schemes defined for the API: <a id="ApiKeyAuth"></a>
ApiKeyAuth
- Type: Bearer Authentication
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- JsonSubTypes (>= 2.0.1)
- Newtonsoft.Json (>= 13.0.3)
- Polly (>= 8.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.