All URIs are relative to https://my.sevdesk.de/api/v1
Method | HTTP request | Description |
---|---|---|
bookInvoice | PUT /Invoice/{invoiceId}/bookAmount | Book an invoice |
cancelInvoice | POST /Invoice/{invoiceId}/cancelInvoice | Cancel an invoice / Create cancellation invoice |
createInvoiceByFactory | POST /Invoice/Factory/saveInvoice | Create a new invoice |
createInvoiceFromOrder | POST /Invoice/Factory/createInvoiceFromOrder | Create invoice from order |
createInvoiceReminder | POST /Invoice/Factory/createInvoiceReminder | Create invoice reminder |
getInvoiceById | GET /Invoice/{invoiceId} | Find invoice by ID |
getInvoicePositionsById | GET /Invoice/{invoiceId}/getPositions | Find invoice positions |
getInvoices | GET /Invoice | Retrieve invoices |
getIsInvoicePartiallyPaid | GET /Invoice/{invoiceId}/getIsPartiallyPaid | Check if an invoice is already partially paid |
invoiceGetPdf | GET /Invoice/{invoiceId}/getPdf | Retrieve pdf document of an invoice |
invoiceRender | POST /Invoice/{invoiceId}/render | Render the pdf document of an invoice |
invoiceSendBy | PUT /Invoice/{invoiceId}/sendBy | Mark invoice as sent |
sendInvoiceViaEMail | POST /Invoice/{invoiceId}/sendViaEmail | Send invoice via email |
\Swagger\Client\Model\InlineResponse2008 bookInvoice($invoice_id, $body)
Book an invoice
Booking the invoice with a transaction is probably the most important part in the bookkeeping process.
There are several ways on correctly booking an invoice, all by using the same endpoint.
for more information look here.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\InvoiceApi(
// 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
);
$invoice_id = 56; // int | ID of invoice to book
$body = new \Swagger\Client\Model\InvoiceIdBookAmountBody(); // \Swagger\Client\Model\InvoiceIdBookAmountBody | Booking data
try {
$result = $apiInstance->bookInvoice($invoice_id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InvoiceApi->bookInvoice: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | int | ID of invoice to book | |
body | \Swagger\Client\Model\InvoiceIdBookAmountBody | Booking data | [optional] |
\Swagger\Client\Model\InlineResponse2008
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\InlineResponse20012 cancelInvoice($invoice_id)
Cancel an invoice / Create cancellation invoice
This endpoint will cancel the specified invoice therefor creating a cancellation invoice.
The cancellation invoice will be automatically paid and the source invoices status will change to 'cancelled'.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\InvoiceApi(
// 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
);
$invoice_id = 56; // int | ID of invoice to be cancelled
try {
$result = $apiInstance->cancelInvoice($invoice_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InvoiceApi->cancelInvoice: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | int | ID of invoice to be cancelled |
\Swagger\Client\Model\InlineResponse20012
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\SaveInvoiceResponse createInvoiceByFactory($body)
Create a new invoice
This endpoint offers you the following functionality.
- Create invoices together with positions and discounts
- Delete positions while adding new ones
- Delete or add discounts, or both at the same time
- Automatically fill the address of the supplied contact into the invoice address
The list of parameters starts with the invoice array.
This array contains all required attributes for a complete invoice.
Most of the attributes are covered in the invoice attribute list, there are only two parameters standing out, namely mapAll and objectName.
These are just needed for our system and you always need to provide them.
The list of parameters then continues with the invoice position array.
With this array you have the possibility to add multiple positions at once.
In the example it only contains one position, again together with the parameters mapAll and objectName, however, you can add more invoice positions by extending the array.
So if you wanted to add another position, you would add the same list of parameters with an incremented array index of "1" instead of "0".
The list ends with the four parameters invoicePosDelete, discountSave, discountDelete and takeDefaultAddress.
They only play a minor role if you only want to create an invoice but we will shortly explain what they can do.
With invoicePosDelete you have to option to delete invoice positions as this request can also be used to update invoices.
With discountSave you can add discounts to your invoice.
With discountDelete you can delete discounts from your invoice.
With takeDefaultAddress you can specify that the first address of the contact you are using for the invoice is taken for the invoice address attribute automatically, so you don't need to provide the address yourself.
If you want to know more about these parameters, for example if you want to use this request to update invoices, feel free to contact our support.
Finally, after covering all parameters, they only important information left, is that the order of the last four attributes always needs to be kept.
You will also always need to provide all of them, as otherwise the request won't work properly.
Warning":" You can not create a regular invoice with the deliveryDate being later than the invoiceDate.
To do that you will need to create a so called Abschlagsrechnung by setting the invoiceType parameter to AR.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\InvoiceApi(
// 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\SaveInvoice(); // \Swagger\Client\Model\SaveInvoice | Creation data. Please be aware, that you need to provide at least all required parameter
of the invoice model!
try {
$result = $apiInstance->createInvoiceByFactory($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InvoiceApi->createInvoiceByFactory: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\SaveInvoice | Creation data. Please be aware, that you need to provide at least all required parameter |
of the invoice model! | [optional]
\Swagger\Client\Model\SaveInvoiceResponse
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\InlineResponse20012 createInvoiceFromOrder($invoice_id, $invoice_object_name, $body)
Create invoice from order
Create an invoice from an order
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\InvoiceApi(
// 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
);
$invoice_id = 56; // int | the id of the invoice
$invoice_object_name = "invoice_object_name_example"; // string | Model name, which is 'Invoice'
$body = new \Swagger\Client\Model\ModelCreateInvoiceFromOrder(); // \Swagger\Client\Model\ModelCreateInvoiceFromOrder | Create invoice
try {
$result = $apiInstance->createInvoiceFromOrder($invoice_id, $invoice_object_name, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InvoiceApi->createInvoiceFromOrder: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | int | the id of the invoice | |
invoice_object_name | string | Model name, which is 'Invoice' | |
body | \Swagger\Client\Model\ModelCreateInvoiceFromOrder | Create invoice | [optional] |
\Swagger\Client\Model\InlineResponse20012
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\InlineResponse20012 createInvoiceReminder($invoice_id, $invoice_object_name, $body)
Create invoice reminder
Create an reminder from an invoice
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\InvoiceApi(
// 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
);
$invoice_id = 56; // int | the id of the invoice
$invoice_object_name = "invoice_object_name_example"; // string | Model name, which is 'Invoice'
$body = new \Swagger\Client\Model\FactoryCreateInvoiceReminderBody(); // \Swagger\Client\Model\FactoryCreateInvoiceReminderBody | Create invoice
try {
$result = $apiInstance->createInvoiceReminder($invoice_id, $invoice_object_name, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InvoiceApi->createInvoiceReminder: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | int | the id of the invoice | |
invoice_object_name | string | Model name, which is 'Invoice' | |
body | \Swagger\Client\Model\FactoryCreateInvoiceReminderBody | Create invoice | [optional] |
\Swagger\Client\Model\InlineResponse20012
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\InlineResponse20012 getInvoiceById($invoice_id)
Find invoice by ID
Returns a single invoice
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\InvoiceApi(
// 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
);
$invoice_id = 56; // int | ID of invoice to return
try {
$result = $apiInstance->getInvoiceById($invoice_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InvoiceApi->getInvoiceById: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | int | ID of invoice to return |
\Swagger\Client\Model\InlineResponse20012
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\InlineResponse20022 getInvoicePositionsById($invoice_id, $limit, $offset, $embed)
Find invoice positions
Returns all positions of an invoice
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\InvoiceApi(
// 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
);
$invoice_id = 56; // int | ID of invoice to return the positions
$limit = 56; // int | limits the number of entries returned
$offset = 56; // int | set the index where the returned entries start
$embed = array("embed_example"); // string[] | Get some additional information. Embed can handle multiple values, they must be separated by comma.
try {
$result = $apiInstance->getInvoicePositionsById($invoice_id, $limit, $offset, $embed);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InvoiceApi->getInvoicePositionsById: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | int | ID of invoice to return the positions | |
limit | int | limits the number of entries returned | [optional] |
offset | int | set the index where the returned entries start | [optional] |
embed | string[] | Get some additional information. Embed can handle multiple values, they must be separated by comma. | [optional] |
\Swagger\Client\Model\InlineResponse20022
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\InlineResponse20012 getInvoices($status, $invoice_number, $start_date, $end_date, $contact_id, $contact_object_name)
Retrieve invoices
There are a multitude of parameter which can be used to filter. A few of them are attached but for a complete list please check out this list
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\InvoiceApi(
// 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
);
$status = 1.2; // float | Status of the invoices
$invoice_number = "invoice_number_example"; // string | Retrieve all invoices with this invoice number
$start_date = 56; // int | Retrieve all invoices with a date equal or higher
$end_date = 56; // int | Retrieve all invoices with a date equal or lower
$contact_id = 56; // int | Retrieve all invoices with this contact. Must be provided with contact[objectName]
$contact_object_name = "contact_object_name_example"; // string | Only required if contact[id] was provided. 'Contact' should be used as value.
try {
$result = $apiInstance->getInvoices($status, $invoice_number, $start_date, $end_date, $contact_id, $contact_object_name);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InvoiceApi->getInvoices: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
status | float | Status of the invoices | [optional] |
invoice_number | string | Retrieve all invoices with this invoice number | [optional] |
start_date | int | Retrieve all invoices with a date equal or higher | [optional] |
end_date | int | Retrieve all invoices with a date equal or lower | [optional] |
contact_id | int | Retrieve all invoices with this contact. Must be provided with contact[objectName] | [optional] |
contact_object_name | string | Only required if contact[id] was provided. 'Contact' should be used as value. | [optional] |
\Swagger\Client\Model\InlineResponse20012
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\InlineResponse20011 getIsInvoicePartiallyPaid($invoice_id)
Check if an invoice is already partially paid
Returns 'true' if the given invoice is partially paid - 'false' if it is not. Invoices which are completely paid are regarded as not partially paid.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\InvoiceApi(
// 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
);
$invoice_id = 56; // int | ID of invoice to return
try {
$result = $apiInstance->getIsInvoicePartiallyPaid($invoice_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InvoiceApi->getIsInvoicePartiallyPaid: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | int | ID of invoice to return |
\Swagger\Client\Model\InlineResponse20011
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\InlineResponse2001 invoiceGetPdf($invoice_id, $download, $prevent_send_by)
Retrieve pdf document of an invoice
Retrieves the pdf document of an invoice with additional metadata.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\InvoiceApi(
// 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
);
$invoice_id = 56; // int | ID of invoice from which you want the pdf
$download = true; // bool | If u want to download the pdf of the invoice.
$prevent_send_by = true; // bool | Defines if u want to send the invoice.
try {
$result = $apiInstance->invoiceGetPdf($invoice_id, $download, $prevent_send_by);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InvoiceApi->invoiceGetPdf: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | int | ID of invoice from which you want the pdf | |
download | bool | If u want to download the pdf of the invoice. | [optional] |
prevent_send_by | bool | Defines if u want to send the invoice. | [optional] |
\Swagger\Client\Model\InlineResponse2001
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\InlineResponse2011 invoiceRender($invoice_id, $body)
Render the pdf document of an invoice
Using this endpoint you can render the pdf document of an invoice.
Use cases for this are the retrieval of the pdf location or the forceful re-render of a already sent invoice.
Please be aware that changing an invoice after it has been sent to a customer is not an allowed bookkeeping process.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\InvoiceApi(
// 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
);
$invoice_id = 56; // int | ID of invoice to render
$body = new \Swagger\Client\Model\InvoiceIdRenderBody(); // \Swagger\Client\Model\InvoiceIdRenderBody | Define if the document should be forcefully re-rendered.
try {
$result = $apiInstance->invoiceRender($invoice_id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InvoiceApi->invoiceRender: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | int | ID of invoice to render | |
body | \Swagger\Client\Model\InvoiceIdRenderBody | Define if the document should be forcefully re-rendered. | [optional] |
\Swagger\Client\Model\InlineResponse2011
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\InlineResponse20029 invoiceSendBy($invoice_id, $body)
Mark invoice as sent
Marks an invoice as sent by a chosen send type.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\InvoiceApi(
// 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
);
$invoice_id = 56; // int | ID of invoice to mark as sent
$body = new \Swagger\Client\Model\InvoiceIdSendByBody(); // \Swagger\Client\Model\InvoiceIdSendByBody | Specify the send type
try {
$result = $apiInstance->invoiceSendBy($invoice_id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InvoiceApi->invoiceSendBy: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | int | ID of invoice to mark as sent | |
body | \Swagger\Client\Model\InvoiceIdSendByBody | Specify the send type | [optional] |
\Swagger\Client\Model\InlineResponse20029
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\InlineResponse201 sendInvoiceViaEMail($invoice_id, $body)
Send invoice via email
This endpoint sends the specified invoice to a customer via email.
This will automatically mark the invoice as sent.
Please note, that in production an invoice is not allowed to be changed after this happened!
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\InvoiceApi(
// 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
);
$invoice_id = 56; // int | ID of invoice to be sent via email
$body = new \Swagger\Client\Model\InvoiceIdSendViaEmailBody(); // \Swagger\Client\Model\InvoiceIdSendViaEmailBody | Mail data
try {
$result = $apiInstance->sendInvoiceViaEMail($invoice_id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InvoiceApi->sendInvoiceViaEMail: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | int | ID of invoice to be sent via email | |
body | \Swagger\Client\Model\InvoiceIdSendViaEmailBody | Mail data | [optional] |
\Swagger\Client\Model\InlineResponse201
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]