All URIs are relative to http://localhost, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
deletePurchaseInvoice() | DELETE /api/v1/{partyId}/purchaseInvoice/{documentId} | Delete purchase invoice. |
downloadPurchaseInvoice() | GET /api/v1/{partyId}/purchaseInvoice/{documentId}/download | Download purchase invoice. |
getPurchaseInvoiceStatuses() | GET /api/v1/{partyId}/purchaseInvoice/{documentId}/status | Get purchase invoice statuses. |
queryRecipientPartyForInvoiceResponse() | POST /api/v1/{partyId}/purchaseInvoice/queryRecipientParty | Lookup the recipient party (seller/supplier) for possible delivery. |
recognizePurchaseInvoice() | POST /api/v1/{partyId}/purchaseInvoice/recognize | Recognize purchase invoice. |
sendInvoiceResponse() | POST /api/v1/{partyId}/purchaseInvoice/{documentId}/response | Send invoice response to let the seller know the status of the received invoice. |
deletePurchaseInvoice($party_id, $document_id)
Delete purchase invoice.
Use this method if you don't want wait for the auto deletion.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Subscription-Key
$config = EConnect\Psb\Configuration::getDefaultConfiguration()->setApiKey('Subscription-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = EConnect\Psb\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Subscription-Key', 'Bearer');
// Configure OAuth2 access token for authorization: Bearer
$config = EConnect\Psb\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new EConnect\Psb\Api\PurchaseInvoiceApi(
// 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
);
$party_id = 'party_id_example'; // string | The recipient partyId
$document_id = 'document_id_example'; // string | The service bus documentId
try {
$apiInstance->deletePurchaseInvoice($party_id, $document_id);
} catch (Exception $e) {
echo 'Exception when calling PurchaseInvoiceApi->deletePurchaseInvoice: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
party_id | string | The recipient partyId | |
document_id | string | The service bus documentId |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
downloadPurchaseInvoice($party_id, $document_id, $target_format): \SplFileObject
Download purchase invoice.
Download the xml contents of the purchase invoice.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Subscription-Key
$config = EConnect\Psb\Configuration::getDefaultConfiguration()->setApiKey('Subscription-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = EConnect\Psb\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Subscription-Key', 'Bearer');
// Configure OAuth2 access token for authorization: Bearer
$config = EConnect\Psb\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new EConnect\Psb\Api\PurchaseInvoiceApi(
// 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
);
$party_id = 'party_id_example'; // string | The recipient partyId.
$document_id = 'document_id_example'; // string | The service bus documentId.
$target_format = 'target_format_example'; // string | The target format.
try {
$result = $apiInstance->downloadPurchaseInvoice($party_id, $document_id, $target_format);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseInvoiceApi->downloadPurchaseInvoice: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
party_id | string | The recipient partyId. | |
document_id | string | The service bus documentId. | |
target_format | string | The target format. | [optional] |
\SplFileObject
- Content-Type: Not defined
- Accept:
application/xml
,application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getPurchaseInvoiceStatuses($party_id, $document_id): \EConnect\Psb\Model\DocumentStatus[]
Get purchase invoice statuses.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Subscription-Key
$config = EConnect\Psb\Configuration::getDefaultConfiguration()->setApiKey('Subscription-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = EConnect\Psb\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Subscription-Key', 'Bearer');
// Configure OAuth2 access token for authorization: Bearer
$config = EConnect\Psb\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new EConnect\Psb\Api\PurchaseInvoiceApi(
// 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
);
$party_id = 'party_id_example'; // string | The recipient partyId.
$document_id = 'document_id_example'; // string | The service bus documentId.
try {
$result = $apiInstance->getPurchaseInvoiceStatuses($party_id, $document_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseInvoiceApi->getPurchaseInvoiceStatuses: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
party_id | string | The recipient partyId. | |
document_id | string | The service bus documentId. |
\EConnect\Psb\Model\DocumentStatus[]
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
queryRecipientPartyForInvoiceResponse($party_id, $request_body, $preferred_document_type_id): \EConnect\Psb\Model\LookupParty
Lookup the recipient party (seller/supplier) for possible delivery.
The returned recipient partyId should be used as endpointId in the invoice response.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Subscription-Key
$config = EConnect\Psb\Configuration::getDefaultConfiguration()->setApiKey('Subscription-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = EConnect\Psb\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Subscription-Key', 'Bearer');
// Configure OAuth2 access token for authorization: Bearer
$config = EConnect\Psb\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new EConnect\Psb\Api\PurchaseInvoiceApi(
// 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
);
$party_id = 'party_id_example'; // string | The sender (buyer/customer) partyId.
$request_body = array('request_body_example'); // string[] | All possible partyIds of the recipient party.
$preferred_document_type_id = 'preferred_document_type_id_example'; // string | The source or preferred documentTypeId to match with and to determine the partyId format.
try {
$result = $apiInstance->queryRecipientPartyForInvoiceResponse($party_id, $request_body, $preferred_document_type_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseInvoiceApi->queryRecipientPartyForInvoiceResponse: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
party_id | string | The sender (buyer/customer) partyId. | |
request_body | string[] | All possible partyIds of the recipient party. | |
preferred_document_type_id | string | The source or preferred documentTypeId to match with and to determine the partyId format. | [optional] |
\EConnect\Psb\Model\LookupParty
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
recognizePurchaseInvoice($party_id, $file, $channel): \EConnect\Psb\Model\Document
Recognize purchase invoice.
Add file to purchase invoices queue for recognizing. The returned id is the documentId/traceId that will be used in status updates.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Subscription-Key
$config = EConnect\Psb\Configuration::getDefaultConfiguration()->setApiKey('Subscription-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = EConnect\Psb\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Subscription-Key', 'Bearer');
// Configure OAuth2 access token for authorization: Bearer
$config = EConnect\Psb\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new EConnect\Psb\Api\PurchaseInvoiceApi(
// 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
);
$party_id = 'party_id_example'; // string | The recipient partyId
$file = '/path/to/file.txt'; // \SplFileObject | The service bus documentId
$channel = 'channel_example'; // string | An optional parameter to enforce the use of a delivery channel.
try {
$result = $apiInstance->recognizePurchaseInvoice($party_id, $file, $channel);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseInvoiceApi->recognizePurchaseInvoice: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
party_id | string | The recipient partyId | |
file | \SplFileObject**\SplFileObject** | The service bus documentId | |
channel | string | An optional parameter to enforce the use of a delivery channel. | [optional] |
- Content-Type:
multipart/form-data
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
sendInvoiceResponse($party_id, $document_id, $invoice_response): \EConnect\Psb\Model\Document
Send invoice response to let the seller know the status of the received invoice.
Send invoice response message.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Subscription-Key
$config = EConnect\Psb\Configuration::getDefaultConfiguration()->setApiKey('Subscription-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = EConnect\Psb\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Subscription-Key', 'Bearer');
// Configure OAuth2 access token for authorization: Bearer
$config = EConnect\Psb\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new EConnect\Psb\Api\PurchaseInvoiceApi(
// 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
);
$party_id = 'party_id_example'; // string | Your partyId (buyer).
$document_id = 'document_id_example'; // string | DocumentId that the response is about.
$invoice_response = new \EConnect\Psb\Model\InvoiceResponse(); // \EConnect\Psb\Model\InvoiceResponse | Invoice response message.
try {
$result = $apiInstance->sendInvoiceResponse($party_id, $document_id, $invoice_response);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PurchaseInvoiceApi->sendInvoiceResponse: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
party_id | string | Your partyId (buyer). | |
document_id | string | DocumentId that the response is about. | |
invoice_response | \EConnect\Psb\Model\InvoiceResponse | Invoice response message. |
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]