Skip to content

Latest commit

 

History

History
1212 lines (894 loc) · 43.2 KB

DocumentApi.md

File metadata and controls

1212 lines (894 loc) · 43.2 KB

Swagger\Client\DocumentApi

All URIs are relative to https://api.billingo.hu/v3

Method HTTP request Description
archiveDocument PUT /documents/{id}/archive Archive a proforma document.
cancelDocument POST /documents/{id}/cancel Cancel a document
createDocument POST /documents Create a document
createDocumentFromDraft PUT /documents/{id} Converts a draft to an invoice.
createDocumentFromProforma POST /documents/{id}/create-from-proforma Create a document from proforma.
createModificationDocument POST /documents/{id}/create-modification-document Create a modification document.
createReceipt POST /documents/receipt Create a receipt
createReceiptFromDraft PUT /documents/receipt/{id} Converts a draft to a receipt.
deleteDocument DELETE /documents/{id} Delete a draft.
deletePayment DELETE /documents/{id}/payments Delete all payment history on document
documentCopy POST /documents/{id}/copy Copy a document
downloadDocument GET /documents/{id}/download Download a document in PDF format.
getDocument GET /documents/{id} Retrieve a document
getDocumentByVendorId GET /documents/vendor/{vendor_id} Retrieve a document by vendor id
getOnlineSzamlaStatus GET /documents/{id}/online-szamla Retrieve a document Online Számla status
getPayment GET /documents/{id}/payments Retrieve a payment histroy
getPublicUrl GET /documents/{id}/public-url Retrieve a document download public url.
listDocument GET /documents List all documents
posPrint GET /documents/{id}/print/pos Returns a printable POS PDF
sendDocument POST /documents/{id}/send Send invoice to given email adresses.
updatePayment PUT /documents/{id}/payments Update payment history

archiveDocument

archiveDocument($id)

Archive a proforma document.

Archive an existing proforma document.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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->archiveDocument($id);
} catch (Exception $e) {
    echo 'Exception when calling DocumentApi->archiveDocument: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

api_key

HTTP request headers

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

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

cancelDocument

\Swagger\Client\Model\Document cancelDocument($id, $body)

Cancel a document

Cancel a document. Returns a cancellation document object if the cancellation is succeded.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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 \Swagger\Client\Model\DocumentCancellation(); // \Swagger\Client\Model\DocumentCancellation | Comment and notifiable email addresses - comma separated for multiple email addresses

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

Parameters

Name Type Description Notes
id int
body \Swagger\Client\Model\DocumentCancellation Comment and notifiable email addresses - comma separated for multiple email addresses [optional]

Return type

\Swagger\Client\Model\Document

Authorization

api_key

HTTP request headers

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

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

createDocument

\Swagger\Client\Model\Document createDocument($body)

Create a document

Create a new document. Returns a document object if the create is succeded.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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 \Swagger\Client\Model\DocumentInsert(); // \Swagger\Client\Model\DocumentInsert | DocumentInsert object that you would like to store.

try {
    $result = $apiInstance->createDocument($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentApi->createDocument: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Swagger\Client\Model\DocumentInsert DocumentInsert object that you would like to store.

Return type

\Swagger\Client\Model\Document

Authorization

api_key

HTTP request headers

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

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

createDocumentFromDraft

\Swagger\Client\Model\Document createDocumentFromDraft($body, $id)

Converts a draft to an invoice.

Converts a draft to an invoice. Returns the invoice object if the convert is succeded.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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 \Swagger\Client\Model\DocumentInsert(); // \Swagger\Client\Model\DocumentInsert | DocumentInsert object that you would like to store.
$id = 56; // int | 

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

Parameters

Name Type Description Notes
body \Swagger\Client\Model\DocumentInsert DocumentInsert object that you would like to store.
id int

Return type

\Swagger\Client\Model\Document

Authorization

api_key

HTTP request headers

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

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

createDocumentFromProforma

\Swagger\Client\Model\Document createDocumentFromProforma($id, $body)

Create a document from proforma.

Create a new document from proforma. Returns a document object if the create is succeded.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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 \Swagger\Client\Model\InvoiceSettings(); // \Swagger\Client\Model\InvoiceSettings | InvoiceSettings object.

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

Parameters

Name Type Description Notes
id int
body \Swagger\Client\Model\InvoiceSettings InvoiceSettings object. [optional]

Return type

\Swagger\Client\Model\Document

Authorization

api_key

HTTP request headers

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

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

createModificationDocument

\Swagger\Client\Model\Document createModificationDocument($body, $id)

Create a modification document.

Create a modification document for the given document. Returns a new document object if the create is successful.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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 \Swagger\Client\Model\ModificationDocumentInsert(); // \Swagger\Client\Model\ModificationDocumentInsert | ModificationDocumentInsert object that you would like to store.
$id = 56; // int | 

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

Parameters

Name Type Description Notes
body \Swagger\Client\Model\ModificationDocumentInsert ModificationDocumentInsert object that you would like to store.
id int

Return type

\Swagger\Client\Model\Document

Authorization

api_key

HTTP request headers

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

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

createReceipt

\Swagger\Client\Model\Document createReceipt($body)

Create a receipt

Create a new receipt. Returns a document object if the create is succeded.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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 \Swagger\Client\Model\ReceiptInsert(); // \Swagger\Client\Model\ReceiptInsert | ReceiptInsert object that you would like to store.

try {
    $result = $apiInstance->createReceipt($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentApi->createReceipt: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Swagger\Client\Model\ReceiptInsert ReceiptInsert object that you would like to store.

Return type

\Swagger\Client\Model\Document

Authorization

api_key

HTTP request headers

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

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

createReceiptFromDraft

\Swagger\Client\Model\Document createReceiptFromDraft($body, $id)

Converts a draft to a receipt.

Converts a draft to a receipt. Returns the receipt object if the convert is succeded.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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 \Swagger\Client\Model\ReceiptInsert(); // \Swagger\Client\Model\ReceiptInsert | ReceiptInsert object that you would like to store.
$id = 56; // int | 

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

Parameters

Name Type Description Notes
body \Swagger\Client\Model\ReceiptInsert ReceiptInsert object that you would like to store.
id int

Return type

\Swagger\Client\Model\Document

Authorization

api_key

HTTP request headers

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

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

deleteDocument

deleteDocument($id)

Delete a draft.

Delete an existing draft.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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->deleteDocument($id);
} catch (Exception $e) {
    echo 'Exception when calling DocumentApi->deleteDocument: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

api_key

HTTP request headers

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

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

deletePayment

\Swagger\Client\Model\PaymentHistory[] deletePayment($id)

Delete all payment history on document

Delete all exist payment history on document.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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->deletePayment($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentApi->deletePayment: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

\Swagger\Client\Model\PaymentHistory[]

Authorization

api_key

HTTP request headers

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

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

documentCopy

\Swagger\Client\Model\Document documentCopy($id)

Copy a document

Copy a document. Returns the new document if the copy was succeded.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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->documentCopy($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentApi->documentCopy: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

\Swagger\Client\Model\Document

Authorization

api_key

HTTP request headers

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

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

downloadDocument

string downloadDocument($id)

Download a document in PDF format.

Download a document. Returns a document in PDF format.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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->downloadDocument($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentApi->downloadDocument: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

string

Authorization

api_key

HTTP request headers

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

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

getDocument

\Swagger\Client\Model\Document getDocument($id)

Retrieve a document

Retrieves the details of an existing document.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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->getDocument($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentApi->getDocument: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

\Swagger\Client\Model\Document

Authorization

api_key

HTTP request headers

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

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

getDocumentByVendorId

\Swagger\Client\Model\Document getDocumentByVendorId($vendor_id)

Retrieve a document by vendor id

Retrieves the details of an existing document by vendor id.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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
);
$vendor_id = "vendor_id_example"; // string | 

try {
    $result = $apiInstance->getDocumentByVendorId($vendor_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentApi->getDocumentByVendorId: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
vendor_id string

Return type

\Swagger\Client\Model\Document

Authorization

api_key

HTTP request headers

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

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

getOnlineSzamlaStatus

\Swagger\Client\Model\OnlineSzamlaStatus getOnlineSzamlaStatus($id)

Retrieve a document Online Számla status

Retrieves the details of an existing document status.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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->getOnlineSzamlaStatus($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentApi->getOnlineSzamlaStatus: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

\Swagger\Client\Model\OnlineSzamlaStatus

Authorization

api_key

HTTP request headers

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

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

getPayment

\Swagger\Client\Model\PaymentHistory[] getPayment($id)

Retrieve a payment histroy

Retrieves the details of payment history an existing document.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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->getPayment($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentApi->getPayment: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

\Swagger\Client\Model\PaymentHistory[]

Authorization

api_key

HTTP request headers

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

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

getPublicUrl

\Swagger\Client\Model\DocumentPublicUrl getPublicUrl($id)

Retrieve a document download public url.

Retrieves public url to download an existing document.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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->getPublicUrl($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentApi->getPublicUrl: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int

Return type

\Swagger\Client\Model\DocumentPublicUrl

Authorization

api_key

HTTP request headers

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

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

listDocument

\Swagger\Client\Model\DocumentList listDocument($page, $per_page, $block_id, $partner_id, $payment_method, $payment_status, $start_date, $end_date, $start_number, $end_number, $start_year, $end_year, $type, $query, $paid_start_date, $paid_end_date, $fulfillment_start_date, $fulfillment_end_date, $last_modified_date)

List all documents

Returns a list of your documents. The documents are returned sorted by creation date, with the most recent documents appearing first.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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 | 
$per_page = 25; // int | 
$block_id = 56; // int | Filter documents by the identifier of your DocumentBlock.
$partner_id = 56; // int | Filter documents by the identifier of your Partner.
$payment_method = new \Swagger\Client\Model\PaymentMethod(); // \Swagger\Client\Model\PaymentMethod | Filter documents by PaymentMethod value.
$payment_status = new \Swagger\Client\Model\PaymentStatus(); // \Swagger\Client\Model\PaymentStatus | Filter documents by PaymentStatus value.
$start_date = new \DateTime("2013-10-20"); // \DateTime | Filter documents by their invoice date.
$end_date = new \DateTime("2013-10-20"); // \DateTime | Filter documents by their invoice date.
$start_number = 56; // int | Starting number of the document, should not contain year or any other formatting. Required if `start_year` given
$end_number = 56; // int | Ending number of the document, should not contain year or any other formatting. Required if `end_year` given
$start_year = 56; // int | Year for `start_number` parameter. Required if `start_number` given.
$end_year = 56; // int | Year for `end_number` parameter. Required if `end_number` given.
$type = new \Swagger\Client\Model\DocumentType(); // \Swagger\Client\Model\DocumentType | Filter documents by type
$query = "query_example"; // string | Filter documents by the given text
$paid_start_date = new \DateTime("2013-10-20"); // \DateTime | Filter documents by their payment date.
$paid_end_date = new \DateTime("2013-10-20"); // \DateTime | Filter documents by their payment date.
$fulfillment_start_date = new \DateTime("2013-10-20"); // \DateTime | Filter documents by their fulfillment date.
$fulfillment_end_date = new \DateTime("2013-10-20"); // \DateTime | Filter documents by their fulfillment date.
$last_modified_date = "last_modified_date_example"; // string | Filter documents by their last modified date.

try {
    $result = $apiInstance->listDocument($page, $per_page, $block_id, $partner_id, $payment_method, $payment_status, $start_date, $end_date, $start_number, $end_number, $start_year, $end_year, $type, $query, $paid_start_date, $paid_end_date, $fulfillment_start_date, $fulfillment_end_date, $last_modified_date);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DocumentApi->listDocument: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
page int [optional]
per_page int [optional] [default to 25]
block_id int Filter documents by the identifier of your DocumentBlock. [optional]
partner_id int Filter documents by the identifier of your Partner. [optional]
payment_method \Swagger\Client\Model\PaymentMethod Filter documents by PaymentMethod value. [optional]
payment_status \Swagger\Client\Model\PaymentStatus Filter documents by PaymentStatus value. [optional]
start_date \DateTime Filter documents by their invoice date. [optional]
end_date \DateTime Filter documents by their invoice date. [optional]
start_number int Starting number of the document, should not contain year or any other formatting. Required if `start_year` given [optional]
end_number int Ending number of the document, should not contain year or any other formatting. Required if `end_year` given [optional]
start_year int Year for `start_number` parameter. Required if `start_number` given. [optional]
end_year int Year for `end_number` parameter. Required if `end_number` given. [optional]
type \Swagger\Client\Model\DocumentType Filter documents by type [optional]
query string Filter documents by the given text [optional]
paid_start_date \DateTime Filter documents by their payment date. [optional]
paid_end_date \DateTime Filter documents by their payment date. [optional]
fulfillment_start_date \DateTime Filter documents by their fulfillment date. [optional]
fulfillment_end_date \DateTime Filter documents by their fulfillment date. [optional]
last_modified_date string Filter documents by their last modified date. [optional]

Return type

\Swagger\Client\Model\DocumentList

Authorization

api_key

HTTP request headers

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

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

posPrint

string posPrint($id, $size)

Returns a printable POS PDF

Returns a printable POS PDF file of a particular document.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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 | 
$size = 3.4; // float | In which size the POS PDF should be rendered.

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

Parameters

Name Type Description Notes
id int
size float In which size the POS PDF should be rendered.

Return type

string

Authorization

api_key

HTTP request headers

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

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

sendDocument

\Swagger\Client\Model\SendDocument sendDocument($id, $body)

Send invoice to given email adresses.

Returns a list of emails, where the invoice is sent.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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 \Swagger\Client\Model\SendDocument(); // \Swagger\Client\Model\SendDocument | List of email-s where you want to send the invoice.

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

Parameters

Name Type Description Notes
id int
body \Swagger\Client\Model\SendDocument List of email-s where you want to send the invoice. [optional]

Return type

\Swagger\Client\Model\SendDocument

Authorization

api_key

HTTP request headers

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

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

updatePayment

\Swagger\Client\Model\PaymentHistory[] updatePayment($body, $id)

Update payment history

Update payment history an existing document. Returns a payment history object if the update is succeded.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');

$apiInstance = new Swagger\Client\Api\DocumentApi(
    // 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 = array(new \Swagger\Client\Model\PaymentHistory()); // \Swagger\Client\Model\PaymentHistory[] | Payment history object that you would like to update.
$id = 56; // int | 

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

Parameters

Name Type Description Notes
body \Swagger\Client\Model\PaymentHistory[] Payment history object that you would like to update.
id int

Return type

\Swagger\Client\Model\PaymentHistory[]

Authorization

api_key

HTTP request headers

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

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