Skip to content

Latest commit

 

History

History
617 lines (449 loc) · 20.8 KB

EstimateApi.md

File metadata and controls

617 lines (449 loc) · 20.8 KB

VereTech\SyncroMSP_PHPclient\Client\EstimateApi

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

Method HTTP request Description
estimatesGet GET /estimates Returns a paginated list of Estimates
estimatesIdConvertToInvoicePost POST /estimates/{id}/convert_to_invoice Convert an Estimate to an Invoice
estimatesIdDelete DELETE /estimates/{id} Deletes an Estimate by ID
estimatesIdEmailPost POST /estimates/{id}/email Sends an Estimate to a Customer
estimatesIdGet GET /estimates/{id} Retrieves an Estimate by ID or number
estimatesIdLineItemsLineItemIdDelete DELETE /estimates/{id}/line_items/{line_item_id} Deletes a Line Item
estimatesIdLineItemsLineItemIdPut PUT /estimates/{id}/line_items/{line_item_id} Updates a Line Item
estimatesIdLineItemsPost POST /estimates/{id}/line_items Adds a Line Item to an Estimate
estimatesIdPrintPost POST /estimates/{id}/print Queues a print job for an Estimate
estimatesIdPut PUT /estimates/{id} Updates an existing Estimate by ID
estimatesPost POST /estimates Creates an Estimate

estimatesGet

estimatesGet($mine, $status, $page)

Returns a paginated list of Estimates

Required permission: Estimates - List/Search

Example

<?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\EstimateApi(
    // 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
);
$mine = true; // bool | Returns estimates that belong to the current user
$status = "status_example"; // string | Returns estimates with a given status. Possible values are 'approved' and 'declined'.
$page = 56; // int | Returns provided page of results, each 'page' contains 50 results

try {
    $apiInstance->estimatesGet($mine, $status, $page);
} catch (Exception $e) {
    echo 'Exception when calling EstimateApi->estimatesGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
mine bool Returns estimates that belong to the current user [optional]
status string Returns estimates with a given status. Possible values are 'approved' and 'declined'. [optional]
page int Returns provided page of results, each 'page' contains 50 results [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

estimatesIdConvertToInvoicePost

estimatesIdConvertToInvoicePost($id)

Convert an Estimate to an Invoice

Required permissions: "Estimates - View Details" and "Invoices - Create"

Example

<?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\EstimateApi(
    // 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->estimatesIdConvertToInvoicePost($id);
} catch (Exception $e) {
    echo 'Exception when calling EstimateApi->estimatesIdConvertToInvoicePost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

estimatesIdDelete

estimatesIdDelete($id)

Deletes an Estimate by ID

Required permission: Estimates - Delete

Example

<?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\EstimateApi(
    // 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->estimatesIdDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling EstimateApi->estimatesIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

estimatesIdEmailPost

estimatesIdEmailPost($id)

Sends an Estimate to a Customer

Required permission: Estimates - View Details

Example

<?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\EstimateApi(
    // 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->estimatesIdEmailPost($id);
} catch (Exception $e) {
    echo 'Exception when calling EstimateApi->estimatesIdEmailPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

estimatesIdGet

estimatesIdGet($id, $number)

Retrieves an Estimate by ID or number

Required permission: Estimates - View Details

Example

<?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\EstimateApi(
    // 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 | Estimate ID
$number = "number_example"; // string | Estimate number is used when the server cannot find an Estimate by ID

try {
    $apiInstance->estimatesIdGet($id, $number);
} catch (Exception $e) {
    echo 'Exception when calling EstimateApi->estimatesIdGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int Estimate ID
number string Estimate number is used when the server cannot find an Estimate by ID [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

estimatesIdLineItemsLineItemIdDelete

estimatesIdLineItemsLineItemIdDelete($id, $line_item_id)

Deletes a Line Item

Required permission: Estimates - Edit

Example

<?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\EstimateApi(
    // 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 | 
$line_item_id = 56; // int | 

try {
    $apiInstance->estimatesIdLineItemsLineItemIdDelete($id, $line_item_id);
} catch (Exception $e) {
    echo 'Exception when calling EstimateApi->estimatesIdLineItemsLineItemIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int
line_item_id int

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

estimatesIdLineItemsLineItemIdPut

estimatesIdLineItemsLineItemIdPut($id, $line_item_id, $body)

Updates a Line Item

Required permission: Estimates - Edit

Example

<?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\EstimateApi(
    // 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 | 
$line_item_id = 56; // int | 
$body = new \stdClass; // object | 

try {
    $apiInstance->estimatesIdLineItemsLineItemIdPut($id, $line_item_id, $body);
} catch (Exception $e) {
    echo 'Exception when calling EstimateApi->estimatesIdLineItemsLineItemIdPut: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int
line_item_id int
body object [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

estimatesIdLineItemsPost

estimatesIdLineItemsPost($id, $body)

Adds a Line Item to an Estimate

Required permission: Estimates - Edit

Example

<?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\EstimateApi(
    // 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 \stdClass; // object | 

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

Parameters

Name Type Description Notes
id int
body object [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

estimatesIdPrintPost

estimatesIdPrintPost($id)

Queues a print job for an Estimate

Required permission: Estimates - View Details

Example

<?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\EstimateApi(
    // 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->estimatesIdPrintPost($id);
} catch (Exception $e) {
    echo 'Exception when calling EstimateApi->estimatesIdPrintPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

estimatesIdPut

estimatesIdPut($id, $body)

Updates an existing Estimate by ID

Required permission: Estimates - Edit

Example

<?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\EstimateApi(
    // 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\EstimatesIdBody(); // \VereTech\SyncroMSP_PHPclient\Client\Model\EstimatesIdBody | 

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

Parameters

Name Type Description Notes
id int
body \VereTech\SyncroMSP_PHPclient\Client\Model\EstimatesIdBody [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

estimatesPost

estimatesPost($body)

Creates an Estimate

Required permission: Estimates - Create

Example

<?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\EstimateApi(
    // 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\EstimatesBody(); // \VereTech\SyncroMSP_PHPclient\Client\Model\EstimatesBody | 

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

Parameters

Name Type Description Notes
body \VereTech\SyncroMSP_PHPclient\Client\Model\EstimatesBody [optional]

Return type

void (empty response body)

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]