Search by

servicem8 / servicem8-php

benford-servicem8

Move your app forward with the ServiceM8 API ## Limits and Throttling To ensure continuous quality of service, API usage can be subject to throttling. The throttle will be applied once an API consumer reaches a certain threshold in terms of a maximum number of requests per minute. Most clients w

Package info

github.com/servicem8/servicem8-php

Homepage

pkg:composer/servicem8/servicem8-php

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2023-02-02 02:22 UTC

This package is auto-updated.

Last update: 2026-10-01 01:52:34 UTC


README

Move your app forward with the ServiceM8 API

Limits and Throttling

To ensure continuous quality of service, API usage can be subject to throttling. The throttle will be applied once an API consumer reaches a certain threshold in terms of a maximum number of requests per minute. Most clients will never hit this threshold, but those that do, will get met by a HTTP 429 Too Many Requests response code.

There is a limit of 180 requests per minute, if you reach this you will receive a HTTP 429 with a text body of "Number of allowed API requests per minute exceeded". There is a limit of 20000 requests per day, if you reach this you will receive a HTTP 429 with a text body of "Number of allowed API requests per day exceeded".

We encourage all API developers to anticipate this error, and take appropriate measures like e.g. using a cached value from a previous call, or passing on a message to the end user that gets subjected to this behaviour (if any).

Limits are per Addon per account.

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/servicem8/servicem8-php.git"
    }
  ],
  "require": {
    "servicem8/servicem8-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure HTTP basic authorization: basicAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');

// Configure OAuth2 access token for authorization: oauth2
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\AllocationWindowsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$uuid = 'uuid_example'; // string | UUID of the Allocation Window

try {
    $result = $apiInstance->deleteAllocationWindowSingle($uuid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AllocationWindowsApi->deleteAllocationWindowSingle: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.servicem8.com/api_1.0

Class Method HTTP request Description
AllocationWindowsApi deleteAllocationWindowSingle DELETE /allocationwindow/{uuid}.json Delete an Allocation Window
AllocationWindowsApi getAllocationWindowAll GET /allocationwindow.json List all Allocation Windows
AllocationWindowsApi getAllocationWindowSingle GET /allocationwindow/{uuid}.json Retrieve an Allocation Window
AllocationWindowsApi postAllocationWindowCreate POST /allocationwindow.json Create a new Allocation Window
AllocationWindowsApi postAllocationWindowSingle POST /allocationwindow/{uuid}.json Update an Allocation Window
AssetTypeFieldsApi deleteAssetTypeFieldSingle DELETE /assettypefield/{uuid}.json Delete an Asset Type Field
AssetTypeFieldsApi getAssetTypeFieldAll GET /assettypefield.json List all Asset Type Fields
AssetTypeFieldsApi getAssetTypeFieldSingle GET /assettypefield/{uuid}.json Retrieve an Asset Type Field
AssetTypeFieldsApi postAssetTypeFieldCreate POST /assettypefield.json Create a new Asset Type Field
AssetTypeFieldsApi postAssetTypeFieldSingle POST /assettypefield/{uuid}.json Update an Asset Type Field
AssetTypesApi deleteAssetTypeSingle DELETE /assettype/{uuid}.json Delete an Asset Type
AssetTypesApi getAssetTypeAll GET /assettype.json List all Asset Types
AssetTypesApi getAssetTypeSingle GET /assettype/{uuid}.json Retrieve an Asset Type
AssetTypesApi postAssetTypeCreate POST /assettype.json Create a new Asset Type
AssetTypesApi postAssetTypeSingle POST /assettype/{uuid}.json Update an Asset Type
AssetsApi deleteAssetSingle DELETE /asset/{uuid}.json Delete an Asset
AssetsApi getAssetAll GET /asset.json List all Assets
AssetsApi getAssetSingle GET /asset/{uuid}.json Retrieve an Asset
AssetsApi postAssetSingle POST /asset/{uuid}.json Update an Asset
AttachmentsApi deleteAttachmentSingle DELETE /attachment/{uuid}.json Delete an Attachment
AttachmentsApi getAttachmentAll GET /attachment.json List all Attachments
AttachmentsApi getAttachmentSingle GET /attachment/{uuid}.json Retrieve an Attachment
AttachmentsApi postAttachmentCreate POST /attachment.json Create a new Attachment
AttachmentsApi postAttachmentSingle POST /attachment/{uuid}.json Update an Attachment
BadgesApi deleteBadgeSingle DELETE /badge/{uuid}.json Delete a Badge
BadgesApi getBadgeAll GET /badge.json List all Badges
BadgesApi getBadgeSingle GET /badge/{uuid}.json Retrieve a Badge
BadgesApi postBadgeCreate POST /badge.json Create a new Badge
BadgesApi postBadgeSingle POST /badge/{uuid}.json Update a Badge
BundlesApi deleteMaterialBundleSingle DELETE /materialbundle/{uuid}.json Delete a Bundle
BundlesApi getMaterialBundleAll GET /materialbundle.json List all Bundles
BundlesApi getMaterialBundleSingle GET /materialbundle/{uuid}.json Retrieve a Bundle
BundlesApi postMaterialBundleCreate POST /materialbundle.json Create a new Bundle
BundlesApi postMaterialBundleSingle POST /materialbundle/{uuid}.json Update a Bundle
CategoriesApi deleteCategorySingle DELETE /category/{uuid}.json Delete a Category
CategoriesApi getCategoryAll GET /category.json List all Categories
CategoriesApi getCategorySingle GET /category/{uuid}.json Retrieve a Category
CategoriesApi postCategoryCreate POST /category.json Create a new Category
CategoriesApi postCategorySingle POST /category/{uuid}.json Update a Category
ClientsApi deleteCompanySingle DELETE /company/{uuid}.json Delete a Client
ClientsApi getCompanyAll GET /company.json List all Clients
ClientsApi getCompanySingle GET /company/{uuid}.json Retrieve a Client
ClientsApi postCompanyCreate POST /company.json Create a new Client
ClientsApi postCompanySingle POST /company/{uuid}.json Update a Client
CompanyContactsApi deleteCompanyContactSingle DELETE /companycontact/{uuid}.json Delete a Company Contact
CompanyContactsApi getCompanyContactAll GET /companycontact.json List all Company Contacts
CompanyContactsApi getCompanyContactSingle GET /companycontact/{uuid}.json Retrieve a Company Contact
CompanyContactsApi postCompanyContactCreate POST /companycontact.json Create a new Company Contact
CompanyContactsApi postCompanyContactSingle POST /companycontact/{uuid}.json Update a Company Contact
EmailTemplatesApi deleteEmailTemplateSingle DELETE /emailtemplate/{uuid}.json Delete an Email Template
EmailTemplatesApi getEmailTemplateAll GET /emailtemplate.json List all Email Templates
EmailTemplatesApi getEmailTemplateSingle GET /emailtemplate/{uuid}.json Retrieve an Email Template
EmailTemplatesApi postEmailTemplateCreate POST /emailtemplate.json Create a new Email Template
EmailTemplatesApi postEmailTemplateSingle POST /emailtemplate/{uuid}.json Update an Email Template
FeedbackApi deleteFeedbackSingle DELETE /feedback/{uuid}.json Delete a Feedback
FeedbackApi getFeedbackAll GET /feedback.json List all Feedback
FeedbackApi getFeedbackSingle GET /feedback/{uuid}.json Retrieve a Feedback
FeedbackApi postFeedbackCreate POST /feedback.json Create a new Feedback
FeedbackApi postFeedbackSingle POST /feedback/{uuid}.json Update a Feedback
FormFieldsApi deleteFormFieldSingle DELETE /formfield/{uuid}.json Delete a Form Field
FormFieldsApi getFormFieldAll GET /formfield.json List all Form Fields
FormFieldsApi getFormFieldSingle GET /formfield/{uuid}.json Retrieve a Form Field
FormFieldsApi postFormFieldCreate POST /formfield.json Create a new Form Field
FormFieldsApi postFormFieldSingle POST /formfield/{uuid}.json Update a Form Field
FormResponsesApi deleteFormResponseSingle DELETE /formresponse/{uuid}.json Delete a Form Response
FormResponsesApi getFormResponseAll GET /formresponse.json List all Form Responses
FormResponsesApi getFormResponseSingle GET /formresponse/{uuid}.json Retrieve a Form Response
FormResponsesApi postFormResponseCreate POST /formresponse.json Create a new Form Response
FormResponsesApi postFormResponseSingle POST /formresponse/{uuid}.json Update a Form Response
FormsApi deleteFormSingle DELETE /form/{uuid}.json Delete a Form
FormsApi getFormAll GET /form.json List all Forms
FormsApi getFormSingle GET /form/{uuid}.json Retrieve a Form
FormsApi postFormCreate POST /form.json Create a new Form
FormsApi postFormSingle POST /form/{uuid}.json Update a Form
JobActivitiesApi deleteJobActivitySingle DELETE /jobactivity/{uuid}.json Delete a Job Activity
JobActivitiesApi getJobActivityAll GET /jobactivity.json List all Job Activities
JobActivitiesApi getJobActivitySingle GET /jobactivity/{uuid}.json Retrieve a Job Activity
JobActivitiesApi postJobActivityCreate POST /jobactivity.json Create a new Job Activity
JobActivitiesApi postJobActivitySingle POST /jobactivity/{uuid}.json Update a Job Activity
JobAllocationsApi deleteJobAllocationSingle DELETE /joballocation/{uuid}.json Delete a Job Allocation
JobAllocationsApi getJobAllocationAll GET /joballocation.json List all Job Allocations
JobAllocationsApi getJobAllocationSingle GET /joballocation/{uuid}.json Retrieve a Job Allocation
JobAllocationsApi postJobAllocationCreate POST /joballocation.json Create a new Job Allocation
JobAllocationsApi postJobAllocationSingle POST /joballocation/{uuid}.json Update a Job Allocation
JobContactsApi deleteJobContactSingle DELETE /jobcontact/{uuid}.json Delete a Job Contact
JobContactsApi getJobContactAll GET /jobcontact.json List all Job Contacts
JobContactsApi getJobContactSingle GET /jobcontact/{uuid}.json Retrieve a Job Contact
JobContactsApi postJobContactCreate POST /jobcontact.json Create a new Job Contact
JobContactsApi postJobContactSingle POST /jobcontact/{uuid}.json Update a Job Contact
JobMaterialBundlesApi deleteJobMaterialBundleSingle DELETE /jobmaterialbundle/{uuid}.json Delete a JobMaterialBundle
JobMaterialBundlesApi getJobMaterialBundleAll GET /jobmaterialbundle.json List all JobMaterialBundles
JobMaterialBundlesApi getJobMaterialBundleSingle GET /jobmaterialbundle/{uuid}.json Retrieve a JobMaterialBundle
JobMaterialBundlesApi postJobMaterialBundleCreate POST /jobmaterialbundle.json Create a new JobMaterialBundle
JobMaterialBundlesApi postJobMaterialBundleSingle POST /jobmaterialbundle/{uuid}.json Update a JobMaterialBundle
JobMaterialsApi deleteJobMaterialSingle DELETE /jobmaterial/{uuid}.json Delete a Job Material
JobMaterialsApi getJobMaterialAll GET /jobmaterial.json List all Job Materials
JobMaterialsApi getJobMaterialSingle GET /jobmaterial/{uuid}.json Retrieve a Job Material
JobMaterialsApi postJobMaterialCreate POST /jobmaterial.json Create a new Job Material
JobMaterialsApi postJobMaterialSingle POST /jobmaterial/{uuid}.json Update a Job Material
JobPaymentsApi deleteJobPaymentSingle DELETE /jobpayment/{uuid}.json Delete a Job Payment
JobPaymentsApi getJobPaymentAll GET /jobpayment.json List all Job Payments
JobPaymentsApi getJobPaymentSingle GET /jobpayment/{uuid}.json Retrieve a Job Payment
JobPaymentsApi postJobPaymentCreate POST /jobpayment.json Create a new Job Payment
JobPaymentsApi postJobPaymentSingle POST /jobpayment/{uuid}.json Update a Job Payment
JobQueuesApi deleteQueueSingle DELETE /queue/{uuid}.json Delete a Job Queue
JobQueuesApi getQueueAll GET /queue.json List all Job Queues
JobQueuesApi getQueueSingle GET /queue/{uuid}.json Retrieve a Job Queue
JobQueuesApi postQueueCreate POST /queue.json Create a new Job Queue
JobQueuesApi postQueueSingle POST /queue/{uuid}.json Update a Job Queue
JobsApi deleteJobSingle DELETE /job/{uuid}.json Delete a Job
JobsApi getJobAll GET /job.json List all Jobs
JobsApi getJobSingle GET /job/{uuid}.json Retrieve a Job
JobsApi postJobCreate POST /job.json Create a new Job
JobsApi postJobSingle POST /job/{uuid}.json Update a Job
KnowledgeArticlesApi deleteKnowledgeArticleSingle DELETE /knowledgearticle/{uuid}.json Delete a Knowledge Article
KnowledgeArticlesApi getKnowledgeArticleAll GET /knowledgearticle.json List all Knowledge Articles
KnowledgeArticlesApi getKnowledgeArticleSingle GET /knowledgearticle/{uuid}.json Retrieve a Knowledge Article
KnowledgeArticlesApi postKnowledgeArticleCreate POST /knowledgearticle.json Create a new Knowledge Article
KnowledgeArticlesApi postKnowledgeArticleSingle POST /knowledgearticle/{uuid}.json Update a Knowledge Article
LocationsApi deleteLocationSingle DELETE /location/{uuid}.json Delete a Location
LocationsApi getLocationAll GET /location.json List all Locations
LocationsApi getLocationSingle GET /location/{uuid}.json Retrieve a Location
LocationsApi postLocationCreate POST /location.json Create a new Location
LocationsApi postLocationSingle POST /location/{uuid}.json Update a Location
MaterialsApi deleteMaterialSingle DELETE /material/{uuid}.json Delete a Material
MaterialsApi getMaterialAll GET /material.json List all Materials
MaterialsApi getMaterialSingle GET /material/{uuid}.json Retrieve a Material
MaterialsApi postMaterialCreate POST /material.json Create a new Material
MaterialsApi postMaterialSingle POST /material/{uuid}.json Update a Material
NotesApi deleteNoteSingle DELETE /note/{uuid}.json Delete a Note
NotesApi getNoteAll GET /note.json List all Notes
NotesApi getNoteSingle GET /note/{uuid}.json Retrieve a Note
NotesApi postNoteCreate POST /note.json Create a new Note
NotesApi postNoteSingle POST /note/{uuid}.json Update a Note
SMSTemplatesApi deleteSmsTemplateSingle DELETE /smstemplate/{uuid}.json Delete a SMS Template
SMSTemplatesApi getSmsTemplateAll GET /smstemplate.json List all SMS Templates
SMSTemplatesApi getSmsTemplateSingle GET /smstemplate/{uuid}.json Retrieve a SMS Template
SMSTemplatesApi postSmsTemplateCreate POST /smstemplate.json Create a new SMS Template
SMSTemplatesApi postSmsTemplateSingle POST /smstemplate/{uuid}.json Update a SMS Template
SecurityRolesApi deleteSecurityRoleSingle DELETE /securityrole/{uuid}.json Delete a Security Role
SecurityRolesApi getSecurityRoleAll GET /securityrole.json List all Security Roles
SecurityRolesApi getSecurityRoleSingle GET /securityrole/{uuid}.json Retrieve a Security Role
SecurityRolesApi postSecurityRoleCreate POST /securityrole.json Create a new Security Role
SecurityRolesApi postSecurityRoleSingle POST /securityrole/{uuid}.json Update a Security Role
StaffMembersApi deleteStaffSingle DELETE /staff/{uuid}.json Delete a Staff Member
StaffMembersApi getStaffAll GET /staff.json List all Staff Members
StaffMembersApi getStaffSingle GET /staff/{uuid}.json Retrieve a Staff Member
StaffMembersApi postStaffCreate POST /staff.json Create a new Staff Member
StaffMembersApi postStaffSingle POST /staff/{uuid}.json Update a Staff Member
StaffMessagesApi deleteStaffMessageSingle DELETE /staffmessage/{uuid}.json Delete a Staff Message
StaffMessagesApi getStaffMessageAll GET /staffmessage.json List all Staff Messages
StaffMessagesApi getStaffMessageSingle GET /staffmessage/{uuid}.json Retrieve a Staff Message
StaffMessagesApi postStaffMessageCreate POST /staffmessage.json Create a new Staff Message
StaffMessagesApi postStaffMessageSingle POST /staffmessage/{uuid}.json Update a Staff Message
TasksApi deleteTaskSingle DELETE /task/{uuid}.json Delete a Task
TasksApi getTaskAll GET /task.json List all Tasks
TasksApi getTaskSingle GET /task/{uuid}.json Retrieve a Task
TasksApi postTaskCreate POST /task.json Create a new Task
TasksApi postTaskSingle POST /task/{uuid}.json Update a Task
TaxRatesApi deleteTaxRateSingle DELETE /taxrate/{uuid}.json Delete a Tax Rate
TaxRatesApi getTaxRateAll GET /taxrate.json List all Tax Rates
TaxRatesApi getTaxRateSingle GET /taxrate/{uuid}.json Retrieve a Tax Rate
TaxRatesApi postTaxRateCreate POST /taxrate.json Create a new Tax Rate
TaxRatesApi postTaxRateSingle POST /taxrate/{uuid}.json Update a Tax Rate
VendorsApi getVendorAll GET /vendor.json List all Vendors
VendorsApi getVendorSingle GET /vendor/{uuid}.json Retrieve a Vendor
VendorsApi postVendorSingle POST /vendor/{uuid}.json Update a Vendor

Models

Authorization

basicAuth

  • Type: HTTP basic authentication

oauth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://api.servicem8.com/oauth/authorize
  • Scopes:
    • staff_locations: Access to real-time GPS information about staff
    • staff_activity: Access to clock on, lunch break and clock off information about staff
    • publish_sms: Access to send SMS messages to customers and/or staff on your behalf. Note sending SMS messages will incur account charges.
    • publish_email: Access to send Email messages to customers and/or staff on your behalf
    • vendor: Access to basic account information
    • vendor_logo: Access to account logo
    • vendor_email: Access to account holder email address
    • read_locations: Read-only access to Location Endpoint
    • manage_locations: Full access to Location Endpoint
    • read_staff: Read-only access to Staff Endpoint
    • manage_staff: Full access to Staff Endpoint
    • read_customers: Read-only access to Company Endpoint
    • manage_customers: Full access to Company Endpoint
    • read_customer_contacts: Read-only access to CompanyContact Endpoint
    • manage_customer_contacts: Full access to CompanyContact Endpoint
    • read_jobs: Read-only access to Job Endpoint
    • manage_jobs: Full access to Job Endpoint
    • create_jobs: Ability to create jobs on behalf of account. Note creating jobs may incur account charges.
    • read_job_contacts: Read-only access to JobContact Endpoint
    • manage_job_contacts: Full access to JobContact Endpoint
    • read_job_materials: Read-only access to JobMaterials Endpoint
    • manage_job_materials: Full access to JobMaterials Endpoint
    • read_job_categories: Read-only access to Categories Endpoint
    • manage_job_categories: Full access to Categories Endpoint
    • read_job_queues: Read-only access to Job Queues Endpoint
    • manage_job_queues: Full access to Job Queues Endpoint
    • read_tasks: Read-only access to Tasks Endpoint
    • manage_tasks: Full access to Tasks Endpoint
    • read_schedule: Read-only access to JobActivity Endpoint
    • manage_schedule: Full access to JobActivity Endpoint
    • read_inventory: Read-only access to Materials Endpoint
    • manage_inventory: Full access to Materials Endpoint
    • read_job_notes: Read-only access to job notes
    • publish_job_notes: Ability to add new job notes
    • read_job_photos: Read-only access to job photos
    • publish_job_photos: Ability to add new job photos
    • read_attachments: Read-only access to Attachments Endpoint
    • manage_attachments: Full access to Attachments Endpoint
    • read_inbox: Read-only access to inbox messages
    • read_messages: Read-only access to staff messages
    • manage_notifications: Ability to read notifications and mark as read
    • manage_templates: Full-access to email, sms and document templates
    • manage_badges: Full-access to create/modify job badges

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen