Skip to content

Latest commit

 

History

History
281 lines (203 loc) · 9.89 KB

PurchaseOrderApi.md

File metadata and controls

281 lines (203 loc) · 9.89 KB

VereTech\SyncroMSP_PHPclient\Client\PurchaseOrderApi

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

Method HTTP request Description
purchaseOrdersGet GET /purchase_orders Returns a paginated list of Purchase Orders
purchaseOrdersIdCreatePoLineItemPost POST /purchase_orders/{id}/create_po_line_item Adds a Product to a Purchase Order
purchaseOrdersIdGet GET /purchase_orders/{id} Retrieves a Purchase Order by ID
purchaseOrdersIdReceivePost POST /purchase_orders/{id}/receive receive purchase_order
purchaseOrdersPost POST /purchase_orders Creates a Purchase Order

purchaseOrdersGet

purchaseOrdersGet($page)

Returns a paginated list of Purchase Orders

Required permission: Purchase Orders - 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\PurchaseOrderApi(
    // 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
);
$page = 56; // int | Returns provided page of results, each 'page' contains 20 results

try {
    $apiInstance->purchaseOrdersGet($page);
} catch (Exception $e) {
    echo 'Exception when calling PurchaseOrderApi->purchaseOrdersGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
page int Returns provided page of results, each 'page' contains 20 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]

purchaseOrdersIdCreatePoLineItemPost

purchaseOrdersIdCreatePoLineItemPost($id, $body)

Adds a Product to a Purchase Order

Required permission: Purchase Orders - 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\PurchaseOrderApi(
    // 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\IdCreatePoLineItemBody(); // \VereTech\SyncroMSP_PHPclient\Client\Model\IdCreatePoLineItemBody | 

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

Parameters

Name Type Description Notes
id int
body \VereTech\SyncroMSP_PHPclient\Client\Model\IdCreatePoLineItemBody [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]

purchaseOrdersIdGet

purchaseOrdersIdGet($id)

Retrieves a Purchase Order by ID

Required permission: Purchase Orders - 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\PurchaseOrderApi(
    // 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->purchaseOrdersIdGet($id);
} catch (Exception $e) {
    echo 'Exception when calling PurchaseOrderApi->purchaseOrdersIdGet: ', $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]

purchaseOrdersIdReceivePost

purchaseOrdersIdReceivePost($id, $body)

receive purchase_order

Required permission: Purchase Orders - 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\PurchaseOrderApi(
    // 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\IdReceiveBody(); // \VereTech\SyncroMSP_PHPclient\Client\Model\IdReceiveBody | 

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

Parameters

Name Type Description Notes
id int
body \VereTech\SyncroMSP_PHPclient\Client\Model\IdReceiveBody [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]

purchaseOrdersPost

purchaseOrdersPost($body)

Creates a Purchase Order

Required permission: Purchase Orders - 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\PurchaseOrderApi(
    // 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\PurchaseOrdersBody(); // \VereTech\SyncroMSP_PHPclient\Client\Model\PurchaseOrdersBody | 

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

Parameters

Name Type Description Notes
body \VereTech\SyncroMSP_PHPclient\Client\Model\PurchaseOrdersBody [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]