kruegge82 / cargoboard
<h4>Authentication.</h4> <p>Authentication is done with X-API-KEY. You can request a key via mail to api@cargoboard.com.
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
README
<h4>Authentication.</h4> <p>Authentication is done with X-API-KEY. You can request a key via mail to api@cargoboard.com.
For more information, please visit https://cargoboard.com/.
Installation & Usage
Requirements
PHP 8.1 and later.
Composer
To install the bindings via Composer, add the following to composer.json
:
{ "repositories": [ { "type": "vcs", "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" } ], "require": { "GIT_USER_ID/GIT_REPO_ID": "*@dev" } }
Then run composer install
Manual Installation
Download the files and include autoload.php
:
<?php require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: X-API-KEY $config = kruegge82\cargoboard\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = kruegge82\cargoboard\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer'); $apiInstance = new kruegge82\cargoboard\Api\InvoicesApi( // 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 ); $take = 50; // int | Quantity of Easybill invoices to take $cursor = 3.4; // float | Cursor for next page of Easybill invoices $order_by = array('order_by_example'); // string[] | Order results by properties $filter = array('filter_example'); // string[] | Filter results by properties For example, postCodeFrom=\"33100\" $total = false; // bool | Get total quantity of easybill invoices try { $result = $apiInstance->getInvoices($take, $cursor, $order_by, $filter, $total); print_r($result); } catch (Exception $e) { echo 'Exception when calling InvoicesApi->getInvoices: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://api-sandbox.cargoboard.com
Class | Method | HTTP request | Description |
---|---|---|---|
InvoicesApi | getInvoices | GET /v1/invoices | Get invoices |
InvoicesApi | printsInvoicePdfDocument | GET /v1/invoices/{id}/pdf | Prints invoice pdf document |
OrdersApi | cancelAnOrder | POST /v1/orders/{id}/cancel | Cancel an Order |
OrdersApi | getAnOrder | GET /v1/orders/{id} | Get an Order |
OrdersApi | getOrders | GET /v1/orders | Get orders |
OrdersApi | getTrackingInformationForAnOrder | GET /v1/orders/{id}/tracking | Get tracking information for an Order |
OrdersApi | placeAnOrder | POST /v1/orders | Place an Order |
OrdersApi | printConfirmationForAnOrder | GET /v1/orders/{id}/print-confirmation | Print confirmation for an Order |
OrdersApi | printShipmentLabelForAnOrder | GET /v1/orders/{id}/print-shipment-labels | Print shipment label for an Order |
QuotationsApi | bookAnOrderBasedOnAQuotation | POST /v1/quotations/{id}/book | Book an Order Based on a Quotation |
QuotationsApi | getAQuotation | GET /v1/quotations/{id} | Get a Quotation |
QuotationsApi | getQuotations | GET /v1/quotations | Get quotations |
QuotationsApi | placeAQuotation | POST /v1/quotations | Place a Quotation |
Models
- AdditionalInformation
- AddressOrder
- AddressQuotation
- Barcode
- BarcodeLevel
- BarcodeLevelError
- CO2Emission
- CancelOrder
- ConsigneeOrder
- ConsigneeQuotation
- ConsignmentLevel
- ConsignmentLevelError
- ConsignmentLevelEvent
- ConsignmentLevelEventValue
- ContactPerson
- CostItemOrder
- CostItemOrderForCustomer
- CostItemProduct
- CostItemQuotation
- CreateLineOrder
- CreateOrder
- CreateQuotation
- CustomerId
- DangerousGoodOrder
- DangerousGoodQuotation
- Delivery
- EasybillInvoice
- FindManyEasybillInvoicesResponse
- FindManyTrackingEventsResponse
- GeoPosition
- HateoasLink
- LineOrder
- LineQuotation
- NeutralData
- Order
- OrderForCustomer
- OrderId
- OrderProduct
- Price
- Quotation
- QuotationProduct
- ResponseCancelOrder
- ResponseCreateOrder
- ResponseCreateQuotation
- ResponseGetOrder
- ResponseGetOrders
- ResponseGetOrdersForCustomer
- ResponseGetQuotation
- ResponseGetQuotations
- ResponseGetTrackingAndOrderData
- ResponseGetTrackingData
- Runtime
- ScanPoint
- ShipperOrder
- ShipperQuotation
- StatusEvent
- TrackingStatus
- TrackingStep
- UpdateOrder
- WorkflowInformation
Authorization
Authentication schemes defined for the API:
X-API-KEY
- Type: API key
- API key parameter name: X-API-KEY
- Location: HTTP header
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
1.0.5
- Generator version:
7.13.0-SNAPSHOT
- Generator version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen