All URIs are relative to https://tripletex.no/v2
Method | HTTP request | Description |
---|---|---|
get | GET /order/{id} | Get order by ID. |
invoice | PUT /order/{id}/:invoice | Create new invoice from order. |
post | POST /order | Create order. |
put | PUT /order/{id} | Update order. |
search | GET /order | Find orders corresponding with sent data. |
\Tripletex\Model\ResponseWrapperOrder get($id, $fields)
Get order by ID.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\OrderApi(
// 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 | Element ID
$fields = "fields_example"; // string | Fields filter pattern
try {
$result = $apiInstance->get($id, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrderApi->get: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | Element ID | |
fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ResponseWrapperOrder
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperInvoice invoice($id, $invoice_date, $send_to_customer, $payment_type_id, $paid_amount)
Create new invoice from order.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\OrderApi(
// 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 | ID of order to invoice.
$invoice_date = "invoice_date_example"; // string | The invoice date
$send_to_customer = true; // bool | Send invoice to customer
$payment_type_id = 56; // int | Payment type to register prepayment of the invoice. paymentTypeId and paidAmount are optional, but both must be provided if the invoice has already been paid.
$paid_amount = 8.14; // float | Paid amount to register prepayment of the invoice, in invoice currency. paymentTypeId and paidAmount are optional, but both must be provided if the invoice has already been paid.
try {
$result = $apiInstance->invoice($id, $invoice_date, $send_to_customer, $payment_type_id, $paid_amount);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrderApi->invoice: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | ID of order to invoice. | |
invoice_date | string | The invoice date | |
send_to_customer | bool | Send invoice to customer | [optional] [default to true] |
payment_type_id | int | Payment type to register prepayment of the invoice. paymentTypeId and paidAmount are optional, but both must be provided if the invoice has already been paid. | [optional] |
paid_amount | float | Paid amount to register prepayment of the invoice, in invoice currency. paymentTypeId and paidAmount are optional, but both must be provided if the invoice has already been paid. | [optional] |
\Tripletex\Model\ResponseWrapperInvoice
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperOrder post($body)
Create order.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\OrderApi(
// 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 \Tripletex\Model\Order(); // \Tripletex\Model\Order | JSON representing the new object to be created. Should not have ID and version set.
try {
$result = $apiInstance->post($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrderApi->post: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Tripletex\Model\Order | JSON representing the new object to be created. Should not have ID and version set. | [optional] |
\Tripletex\Model\ResponseWrapperOrder
- Content-Type: application/json; charset=utf-8
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperOrder put($id, $body)
Update order.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\OrderApi(
// 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 | Element ID
$body = new \Tripletex\Model\Order(); // \Tripletex\Model\Order | Partial object describing what should be updated
try {
$result = $apiInstance->put($id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrderApi->put: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | Element ID | |
body | \Tripletex\Model\Order | Partial object describing what should be updated | [optional] |
\Tripletex\Model\ResponseWrapperOrder
- Content-Type: application/json; charset=utf-8
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ListResponseOrder search($order_date_from, $order_date_to, $id, $number, $customer_id, $is_closed, $from, $count, $sorting, $fields)
Find orders corresponding with sent data.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\OrderApi(
// 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
);
$order_date_from = "order_date_from_example"; // string | From and including
$order_date_to = "order_date_to_example"; // string | To and excluding
$id = "id_example"; // string | List of IDs
$number = "number_example"; // string | Equals
$customer_id = "customer_id_example"; // string | List of IDs
$is_closed = true; // bool | Equals
$from = 0; // int | From index
$count = 1000; // int | Number of elements to return
$sorting = "sorting_example"; // string | Sorting pattern
$fields = "fields_example"; // string | Fields filter pattern
try {
$result = $apiInstance->search($order_date_from, $order_date_to, $id, $number, $customer_id, $is_closed, $from, $count, $sorting, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrderApi->search: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
order_date_from | string | From and including | |
order_date_to | string | To and excluding | |
id | string | List of IDs | [optional] |
number | string | Equals | [optional] |
customer_id | string | List of IDs | [optional] |
is_closed | bool | Equals | [optional] |
from | int | From index | [optional] [default to 0] |
count | int | Number of elements to return | [optional] [default to 1000] |
sorting | string | Sorting pattern | [optional] |
fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ListResponseOrder
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]