ecrocombe/syncromsp_phpclient

dev-main 2022-12-14 09:07 UTC

This package is auto-updated.

Last update: 2024-05-14 12:06:55 UTC


README

Welcome to the official Syncro API Docs. To use these docs, you will need an active Syncro account. You can sign up for one here: Syncro If you already have an active account, fill in your subdomain below and then click "Authorize" and fill in your api-key. The key is specific to your user account so it is found on the your user profile page. Please review the API License Agreement before using our API. By accessing our API, you are agreeing to the API License Agreement. Please note there is a rate limit of 180 requests per minute per IP address on API Usage.

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: v1
  • Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen For more information, please visit https://help.syncromsp.com/

Requirements

PHP 5.5 and later

Installation & Usage

Composer

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

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/ecrocombe/syncroMSP_PHPclient.git"
    }
  ],
  "require": {
    "ecrocombe/syncromsp_phpclient": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

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

// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\AppointmentApi(
    // 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
);
$date_from = new \DateTime("2013-10-20"); // \DateTime | Returns Appointments that start after the date. Example \"2019-01-25\"
$date_to = new \DateTime("2013-10-20"); // \DateTime | Returns Appointments that start before the date. Example \"2019-12-31\"
$mine = true; // bool | Return only current user's appointments
$page = 56; // int | Returns provided page of results, each 'page' contains 25 results

try {
    $apiInstance->appointmentsGet($date_from, $date_to, $mine, $page);
} catch (Exception $e) {
    echo 'Exception when calling AppointmentApi->appointmentsGet: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\AppointmentApi(
    // 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
);
$id = 56; // int | 

try {
    $apiInstance->appointmentsIdDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling AppointmentApi->appointmentsIdDelete: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\AppointmentApi(
    // 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
);
$id = 56; // int | 

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

// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\AppointmentApi(
    // 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
);
$id = 56; // int | 
$body = new \VereTech\SyncroMSP_PHPclient\Client\Model\AppointmentsIdBody(); // \VereTech\SyncroMSP_PHPclient\Client\Model\AppointmentsIdBody | Appointment object that needs to be added

try {
    $apiInstance->appointmentsIdPut($id, $body);
} catch (Exception $e) {
    echo 'Exception when calling AppointmentApi->appointmentsIdPut: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: bearerAuth
$config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = VereTech\SyncroMSP_PHPclient\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new VereTech\SyncroMSP_PHPclient\Client\Api\AppointmentApi(
    // 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
);
$body = new \VereTech\SyncroMSP_PHPclient\Client\Model\AppointmentsBody(); // \VereTech\SyncroMSP_PHPclient\Client\Model\AppointmentsBody | Appointment object that needs to be added

try {
    $apiInstance->appointmentsPost($body);
} catch (Exception $e) {
    echo 'Exception when calling AppointmentApi->appointmentsPost: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

All URIs are relative to https://{subdomain}.syncromsp.com/api/v1

Class Method HTTP request Description
AppointmentApi appointmentsGet GET /appointments Returns a paginated list of Appointments
AppointmentApi appointmentsIdDelete DELETE /appointments/{id} Deletes an Appointment by ID
AppointmentApi appointmentsIdGet GET /appointments/{id} Retrieves an Appointment by ID
AppointmentApi appointmentsIdPut PUT /appointments/{id} Updates an existing Appointment by ID
AppointmentApi appointmentsPost POST /appointments Creates an Appointment
AppointmentTypeApi appointmentTypesGet GET /appointment_types Returns a paginated list of Appointment Types
AppointmentTypeApi appointmentTypesIdDelete DELETE /appointment_types/{id} Deletes an Appointment Type by ID
AppointmentTypeApi appointmentTypesIdGet GET /appointment_types/{id} Retrieves an Appointment Type by ID
AppointmentTypeApi appointmentTypesIdPut PUT /appointment_types/{id} Updates an existing Appointment Type by ID
AppointmentTypeApi appointmentTypesPost POST /appointment_types Creates an Appointment Type
AssetApi customerAssetsGet GET /customer_assets Returns a paginated list of Assets
AssetApi customerAssetsIdGet GET /customer_assets/{id} Retrieves an Asset by ID
AssetApi customerAssetsIdPut PUT /customer_assets/{id} Updates an existing Asset by ID
AssetApi customerAssetsPost POST /customer_assets Creates an Asset
CallApi calleridGet GET /callerid Get Caller ID
ContactApi contactsGet GET /contacts Returns a paginated list of Contacts
ContactApi contactsIdDelete DELETE /contacts/{id} Deletes a Contact
ContactApi contactsIdGet GET /contacts/{id} Retrieves a Contact by ID
ContactApi contactsIdPut PUT /contacts/{id} Updates an existing Contact
ContactApi contactsPost POST /contacts Creates a Contact
ContractApi contractsGet GET /contracts Returns a paginated list of Contracts
ContractApi contractsIdDelete DELETE /contracts/{id} Deletes a Contract by ID
ContractApi contractsIdGet GET /contracts/{id} Retrieves a Contract by ID
ContractApi contractsIdPut PUT /contracts/{id} Updates an existing Contract by ID
ContractApi contractsPost POST /contracts Creates a Contract
CustomerApi customersAutocompleteGet GET /customers/autocomplete Returns a paginated list of customers for autocomplete query
CustomerApi customersGet GET /customers Returns a paginated list of customers
CustomerApi customersIdDelete DELETE /customers/{id} Deletes a Customer by ID
CustomerApi customersIdGet GET /customers/{id} Retrieves a Customer by ID
CustomerApi customersIdPut PUT /customers/{id} Updates an existing Customer by ID
CustomerApi customersLatestGet GET /customers/latest Returns latest Customer
CustomerApi customersPost POST /customers Creates a Customer
EstimateApi estimatesGet GET /estimates Returns a paginated list of Estimates
EstimateApi estimatesIdConvertToInvoicePost POST /estimates/{id}/convert_to_invoice Convert an Estimate to an Invoice
EstimateApi estimatesIdDelete DELETE /estimates/{id} Deletes an Estimate by ID
EstimateApi estimatesIdEmailPost POST /estimates/{id}/email Sends an Estimate to a Customer
EstimateApi estimatesIdGet GET /estimates/{id} Retrieves an Estimate by ID or number
EstimateApi estimatesIdLineItemsLineItemIdDelete DELETE /estimates/{id}/line_items/{line_item_id} Deletes a Line Item
EstimateApi estimatesIdLineItemsLineItemIdPut PUT /estimates/{id}/line_items/{line_item_id} Updates a Line Item
EstimateApi estimatesIdLineItemsPost POST /estimates/{id}/line_items Adds a Line Item to an Estimate
EstimateApi estimatesIdPrintPost POST /estimates/{id}/print Queues a print job for an Estimate
EstimateApi estimatesIdPut PUT /estimates/{id} Updates an existing Estimate by ID
EstimateApi estimatesPost POST /estimates Creates an Estimate
InvoiceApi invoicesGet GET /invoices Returns a paginated list of Invoices
InvoiceApi invoicesIdDelete DELETE /invoices/{id} Deletes an invoice by ID
InvoiceApi invoicesIdEmailPost POST /invoices/{id}/email Sends invoice to customer
InvoiceApi invoicesIdGet GET /invoices/{id} Retrieves an Invoice by ID or Number
InvoiceApi invoicesIdPrintPost POST /invoices/{id}/print Queues a print job for an invoice
InvoiceApi invoicesIdPut PUT /invoices/{id} Updates an existing invoice by ID
InvoiceApi invoicesIdTicketGet GET /invoices/{id}/ticket Returns the associated ticket for an invoice
InvoiceApi invoicesPost POST /invoices Creates an Invoice
InvoiceLineItemApi invoicesIdLineItemsLineItemIdDelete DELETE /invoices/{id}/line_items/{line_item_id} Deletes an a line item of an invoice by ID
InvoiceLineItemApi invoicesIdLineItemsLineItemIdPut PUT /invoices/{id}/line_items/{line_item_id} Updates an a line item of an invoice by ID
InvoiceLineItemApi invoicesIdLineItemsPost POST /invoices/{id}/line_items Creates a new line item
ItemApi itemsGet GET /items Returns a paginated list of Part Orders
LeadApi leadsGet GET /leads Returns a paginated list of Leads
LeadApi leadsIdGet GET /leads/{id} Retrieves a Lead by ID
LeadApi leadsIdPut PUT /leads/{id} Updates an existing Lead by ID
LeadApi leadsPost POST /leads Creates a Lead
LineItemApi lineItemsGet GET /line_items Returns a paginated list of Line Items
NewTicketFormApi newTicketFormsGet GET /new_ticket_forms Returns a paginated list of Ticket Forms
NewTicketFormApi newTicketFormsIdGet GET /new_ticket_forms/{id} Retrieves a Ticket Form
NewTicketFormApi newTicketFormsIdProcessFormPost POST /new_ticket_forms/{id}/process_form Creates a new Ticket for a Ticket Form
PaymentApi paymentsGet GET /payments Returns a paginated list of Payments
PaymentApi paymentsIdGet GET /payments/{id} Retrieves a Payment by ID
PaymentApi paymentsPost POST /payments Creates a Payment
PaymentMethodApi paymentMethodsGet GET /payment_methods Returns a paginated list of Payment Methods
PaymentProfileApi customersCustomerIdPaymentProfilesGet GET /customers/{customer_id}/payment_profiles Returns a paginated list of Payment Profiles
PaymentProfileApi customersCustomerIdPaymentProfilesIdDelete DELETE /customers/{customer_id}/payment_profiles/{id} Deletes a Payment Profile
PaymentProfileApi customersCustomerIdPaymentProfilesIdGet GET /customers/{customer_id}/payment_profiles/{id} Retrieves a Payment Profile by ID
PaymentProfileApi customersCustomerIdPaymentProfilesIdPut PUT /customers/{customer_id}/payment_profiles/{id} Updates a Payment Profile
PaymentProfileApi customersCustomerIdPaymentProfilesPost POST /customers/{customer_id}/payment_profiles Creates a Payment Profile
PhoneApi customersCustomerIdPhonesGet GET /customers/{customer_id}/phones Returns a paginated list of Phones
PhoneApi customersCustomerIdPhonesIdDelete DELETE /customers/{customer_id}/phones/{id} Deletes a Phone by ID
PhoneApi customersCustomerIdPhonesIdPut PUT /customers/{customer_id}/phones/{id} Updates an existing Phone by ID
PhoneApi customersCustomerIdPhonesPost POST /customers/{customer_id}/phones Creates a Phone
PortalUserApi portalUsersCreateInvitationPost POST /portal_users/create_invitation Creates an Invitation for a Portal User
PortalUserApi portalUsersGet GET /portal_users Returns a paginated list of Portal Users
PortalUserApi portalUsersIdDelete DELETE /portal_users/{id} Deletes a Portal User by ID
PortalUserApi portalUsersIdPut PUT /portal_users/{id} Updates an existing Portal User by ID
PortalUserApi portalUsersPost POST /portal_users Creates a Portal User
ProductApi productsBarcodeGet GET /products/barcode Returns a Product by Barcode
ProductApi productsCategoriesGet GET /products/categories Returns a paginated list of Product Categories
ProductApi productsGet GET /products Returns a paginated list of Products
ProductApi productsIdAddImagesPost POST /products/{id}/add_images Creates a Product Image
ProductApi productsIdDeleteImageDelete DELETE /products/{id}/delete_image Deletes a Product Image
ProductApi productsIdGet GET /products/{id} Retrieves a Product by ID
ProductApi productsIdLocationQuantitiesPut PUT /products/{id}/location_quantities Updates a Location Quantity
ProductApi productsIdPut PUT /products/{id} Updates an existing Product by ID
ProductApi productsPost POST /products Creates a Product
ProductSerialApi productsProductIdProductSerialsAttachToLineItemPost POST /products/{product_id}/product_serials/attach_to_line_item Adds Product Serials to a Line Item
ProductSerialApi productsProductIdProductSerialsGet GET /products/{product_id}/product_serials Returns a paginated list of Product_serials
ProductSerialApi productsProductIdProductSerialsIdPut PUT /products/{product_id}/product_serials/{id} Updates an existing Product Serial by ID
ProductSerialApi productsProductIdProductSerialsPost POST /products/{product_id}/product_serials Creates a Product Serial
PurchaseOrderApi purchaseOrdersGet GET /purchase_orders Returns a paginated list of Purchase Orders
PurchaseOrderApi purchaseOrdersIdCreatePoLineItemPost POST /purchase_orders/{id}/create_po_line_item Adds a Product to a Purchase Order
PurchaseOrderApi purchaseOrdersIdGet GET /purchase_orders/{id} Retrieves a Purchase Order by ID
PurchaseOrderApi purchaseOrdersIdReceivePost POST /purchase_orders/{id}/receive receive purchase_order
PurchaseOrderApi purchaseOrdersPost POST /purchase_orders Creates a Purchase Order
RMMAlertApi rmmAlertsGet GET /rmm_alerts Returns a paginated list of RMM Alerts
RMMAlertApi rmmAlertsIdDelete DELETE /rmm_alerts/{id} Deletes/Clears an RMM Alert by ID
RMMAlertApi rmmAlertsIdGet GET /rmm_alerts/{id} Retrieves an RMM Alert by ID
RMMAlertApi rmmAlertsIdMutePost POST /rmm_alerts/{id}/mute Mutes an RMM Alert by ID
RMMAlertApi rmmAlertsPost POST /rmm_alerts Creates an RMM Alert
ScheduleApi schedulesGet GET /schedules Returns a paginated list of Invoice Schedules
ScheduleApi schedulesIdAddLineItemPost POST /schedules/{id}/add_line_item Adds a Line Item to an Invoice Schedule
ScheduleApi schedulesIdDelete DELETE /schedules/{id} Deletes a Schedule by ID
ScheduleApi schedulesIdGet GET /schedules/{id} Retrieves a Schedule by ID
ScheduleApi schedulesIdLineItemsScheduleLineItemIdPut PUT /schedules/{id}/line_items/{schedule_line_item_id} Updates a Line Item
ScheduleApi schedulesIdPut PUT /schedules/{id} Updates an existing Invoice Schedule by ID
ScheduleApi schedulesIdRemoveLineItemPost POST /schedules/{id}/remove_line_item Removes a Line Item from an Invoice Schedule
ScheduleApi schedulesPost POST /schedules Creates an Invoice Schedule
SearchApi searchGet GET /search Search all the things
SettingApi settingsGet GET /settings Returns a list of Account Settings
SettingApi settingsPrintingGet GET /settings/printing Returns Printing Settings
SettingApi settingsTabsGet GET /settings/tabs Returns Tabs Settings
TicketApi ticketsGet GET /tickets Returns a paginated list of Tickets
TicketApi ticketsIdAddLineItemPost POST /tickets/{id}/add_line_item Creates a Ticket Line Item
TicketApi ticketsIdAttachFileUrlPost POST /tickets/{id}/attach_file_url Attach a file to a Ticket
TicketApi ticketsIdChargeTimerEntryPost POST /tickets/{id}/charge_timer_entry Charges a Ticket Timer
TicketApi ticketsIdCommentPost POST /tickets/{id}/comment Adds a Comment to a Ticket
TicketApi ticketsIdDelete DELETE /tickets/{id} Deletes a Ticket by ID
TicketApi ticketsIdDeleteAttachmentPost POST /tickets/{id}/delete_attachment Deletes a Ticket Attachment
TicketApi ticketsIdDeleteTimerEntryPost POST /tickets/{id}/delete_timer_entry Deletes a Ticket Timer
TicketApi ticketsIdGet GET /tickets/{id} Retrieves a Ticket by ID
TicketApi ticketsIdPrintPost POST /tickets/{id}/print Prints a Ticket by ID
TicketApi ticketsIdPut PUT /tickets/{id} Updates an existing Ticket by ID
TicketApi ticketsIdRemoveLineItemPost POST /tickets/{id}/remove_line_item Deletes a Ticket Line Item
TicketApi ticketsIdTimerEntryPost POST /tickets/{id}/timer_entry Create a Ticket Timer for a Ticket
TicketApi ticketsIdUpdateLineItemPut PUT /tickets/{id}/update_line_item Updates an existing Ticket Line Item
TicketApi ticketsIdUpdateTimerEntryPut PUT /tickets/{id}/update_timer_entry Updates an existing Ticket Timer
TicketApi ticketsPost POST /tickets Creates a Ticket
TicketApi ticketsSettingsGet GET /tickets/settings Returns Tickets Settings
TicketTimerApi ticketTimersGet GET /ticket_timers Returns a paginated list of Ticket Timers
TimelogApi timelogsGet GET /timelogs Returns a paginated list of Timelogs
TimelogApi timelogsLastGet GET /timelogs/last Returns last Timelog
TimelogApi timelogsPut PUT /timelogs Updates a Timelog
UserApi meGet GET /me Returns the current user
UserApi otpLoginPost POST /otp_login Authorize a User with One Time Password
UserApi usersGet GET /users Returns a paginated list of Users
UserApi usersIdGet GET /users/{id} Retrieves an existing User by ID
UserDeviceApi userDevicesIdGet GET /user_devices/{id} Retrieves an existing User Device by UUID
UserDeviceApi userDevicesIdPut PUT /user_devices/{id} Updates an existing User Device by UUID
UserDeviceApi userDevicesPost POST /user_devices Creates a User Device
VendorApi vendorsGet GET /vendors Returns a paginated list of Vendors
VendorApi vendorsIdGet GET /vendors/{id} Retrieves a Vendor Page
VendorApi vendorsIdPut PUT /vendors/{id} Updates an existing Vendor page by ID
VendorApi vendorsPost POST /vendors Creates a Vendor
WikiPageApi wikiPagesGet GET /wiki_pages Returns a paginated list of Wiki Pages
WikiPageApi wikiPagesIdDelete DELETE /wiki_pages/{id} Deletes a Wiki Page by ID
WikiPageApi wikiPagesIdGet GET /wiki_pages/{id} Retrieves a Wiki Page
WikiPageApi wikiPagesIdPut PUT /wiki_pages/{id} Updates an existing Wiki Page by ID
WikiPageApi wikiPagesPost POST /wiki_pages Creates a Wiki Page
WorksheetResultApi ticketsTicketIdWorksheetResultsGet GET /tickets/{ticket_id}/worksheet_results Returns a paginated list of Worksheet Results
WorksheetResultApi ticketsTicketIdWorksheetResultsIdDelete DELETE /tickets/{ticket_id}/worksheet_results/{id} Deletes a Worksheet Result
WorksheetResultApi ticketsTicketIdWorksheetResultsIdGet GET /tickets/{ticket_id}/worksheet_results/{id} Retrieves a Worksheet Result by ID
WorksheetResultApi ticketsTicketIdWorksheetResultsIdPut PUT /tickets/{ticket_id}/worksheet_results/{id} Updates a Worksheet Result
WorksheetResultApi ticketsTicketIdWorksheetResultsPost POST /tickets/{ticket_id}/worksheet_results Creates Worksheet Result

Documentation For Models

Documentation For Authorization

bearerAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

help@syncromsp.com