crayon / arta-php-sdk
The Arta Public API provides quote generation, transport booking, and tracking capabilities. Additionally the API enables Arta partner organizations to configure email and webhook notifications for their accounts.
Requires
- php: ^7.4 || ^8.0
- 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
The Arta Public API provides quote generation, transport booking, and tracking capabilities. Additionally the API enables Arta partner organizations to configure email and webhook notifications for their accounts.
For more information, please visit https://manual.arta.io/.
Installation & Usage
Requirements
PHP 7.4 and later. Should also work with PHP 8.0.
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: apiKeyAuth $config = Arta\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Arta\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new Arta\Client\Api\ApiKeysApi( // 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 ); $authorization = ARTA_APIKey s0e1t2e3c4a5s6t7r8o9n10o11m12y; // string | Authorize your API calls with an Arta API token $api_keys_create_request = new \Arta\Client\Model\ApiKeysCreateRequest(); // \Arta\Client\Model\ApiKeysCreateRequest try { $result = $apiInstance->apiKeysCreate($authorization, $api_keys_create_request); print_r($result); } catch (Exception $e) { echo 'Exception when calling ApiKeysApi->apiKeysCreate: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://api.arta.io
Class | Method | HTTP request | Description |
---|---|---|---|
ApiKeysApi | apiKeysCreate | POST /api_keys | Create an API Key |
ApiKeysApi | apiKeysDelete | DELETE /api_keys/{api_key_id} | Delete an API Key |
ApiKeysApi | apiKeysGet | GET /api_keys/{api_key_id} | Get an API Key |
ApiKeysApi | apiKeysList | GET /api_keys | List API Keys |
AttachmentsApi | attachmentsCreate | POST /attachments | Create an Attachment |
AttachmentsApi | attachmentsDelete | DELETE /attachments/{attachment_id} | Delete an Attachment |
AttachmentsApi | attachmentsGet | GET /attachments/{attachment_id} | Get an Attachment |
AttachmentsApi | attachmentsList | GET /attachments | List Attachments |
EmailRulesApi | emailRulesCreate | POST /email_rules | Create an Email Rule |
EmailRulesApi | emailRulesDelete | DELETE /email_rules/{email_rule_id} | Delete an Email Rule |
EmailRulesApi | emailRulesGet | GET /email_rules/{email_rule_id} | Get an Email Rule |
EmailRulesApi | emailRulesList | GET /email_rules | List Email Rules |
EmailRulesApi | emailRulesUpdate | PATCH /email_rules/{email_rule_id} | Update an Email Rule |
EmailSubscriptionsApi | emailSubscriptionsCreate | POST /email_subscriptions | Create an Email Subscription |
EmailSubscriptionsApi | emailSubscriptionsDelete | DELETE /email_subscriptions/{email_subscription_id} | Delete an Email Subscription |
EmailSubscriptionsApi | emailSubscriptionsGet | GET /email_subscriptions/{email_subscription_id} | Get an Email Subscription |
EmailSubscriptionsApi | emailSubscriptionsList | GET /email_subscriptions | List Email Subscriptions |
EmailSubscriptionsApi | emailSubscriptionsUpdate | PATCH /email_subscriptions/{email_subscription_id} | Update an Email Subscription |
HostedSessionsApi | hostedSessionsCancel | PATCH /hosted_sessions/{hosted_session_id}/cancel | Cancel a Hosted Session |
HostedSessionsApi | hostedSessionsCreate | POST /hosted_sessions | Create a Hosted Session |
HostedSessionsApi | hostedSessionsGet | GET /hosted_sessions/{hosted_session_id} | Get a Hosted Session |
HostedSessionsApi | hostedSessionsList | GET /hosted_sessions | List Hosted Sessions |
InvoicePaymentsApi | invoicePaymentsGet | GET /invoice_payments/{invoice_payment_id} | Get an Invoice Payment record |
InvoicePaymentsApi | invoicePaymentsList | GET /invoice_payments | List invoice payment records |
InvoicesApi | invoicesGet | GET /invoices/{invoice_id} | Get an Invoice record |
InvoicesApi | invoicesList | GET /invoices | List invoice records |
LogsApi | logsGet | GET /logs/{log_id} | Get a Log record |
LogsApi | logsList | GET /logs | List Log records |
MetadataApi | metadalocationAccessRestrictions | GET /metadata/location_access_restrictions | Location Access Restrictions |
MetadataApi | metadataApiVersions | GET /metadata/api_versions | API Versions |
MetadataApi | metadataCurrencies | GET /metadata/currencies | Currencies |
MetadataApi | metadataEmailNotifications | GET /metadata/email_notifications | Email Notifications |
MetadataApi | metadataInsurances | GET /metadata/insurances | Insurance |
MetadataApi | metadataObjectMaterials | GET /metadata/object_materials | Object Materials |
MetadataApi | metadataObjects | GET /metadata/objects | Object Types |
MetadataApi | metadataPackageStatuses | GET /metadata/package_statuses | Package Statuses |
MetadataApi | metadataPackings | GET /metadata/packings | Packing Types |
MetadataApi | metadataParcelTransportServices | GET /metadata/parcel_transport_services | Parcel Transport Services |
MetadataApi | metadataPaymentProcessTypes | GET /metadata/payment_process_types | Payment Process types |
MetadataApi | metadataQuotes | GET /metadata/quotes | Quote Types |
MetadataApi | metadataRequestStatuses | GET /metadata/request_statuses | Quote Request Statuses |
MetadataApi | metadataServices | GET /metadata/services | Services |
MetadataApi | metadataShipmentExceptionTypes | GET /metadata/shipment_exception_types | Shipment Exception Types |
MetadataApi | metadataShipmentStatuses | GET /metadata/shipment_statuses | Shipment Statuses |
OrganizationApi | organizationGet | GET /organization | Get an Organization |
OrganizationApi | organizationPatch | PATCH /organization | Update an Organization |
PaymentsApi | paymentsGet | GET /payments/{payment_id} | Get an Payment record |
PaymentsApi | paymentsList | GET /payments | List payment records |
RequestsApi | requestsCancel | PATCH /requests/{request_id}/cancel | Cancel a Quote Request |
RequestsApi | requestsCreate | POST /requests | Create a Quote Request |
RequestsApi | requestsCustom | PATCH /requests/{request_id}/custom | Request custom quotes |
RequestsApi | requestsGet | GET /requests/{request_id} | Get a Quote Request |
RequestsApi | requestsList | GET /requests | List Request records |
RequestsApi | requestsUpdateContacts | PATCH /requests/{request_id}/contacts | Update the contacts for a Quote Request |
ShipmentExceptionsApi | shipmentExceptionsCreate | POST /shipment_exceptions | Create Shipment Exception |
ShipmentExceptionsApi | shipmentExceptionsGet | GET /shipment_exceptions/{shipment_exception_id} | Get a Shipment Exception |
ShipmentExceptionsApi | shipmentExceptionsList | GET /shipment_exceptions | List Shipment Exceptions |
ShipmentExceptionsApi | shipmentExceptionsUpdate | PATCH /shipment_exceptions/{shipment_exception_id} | Update a Shipment Exception |
ShipmentsApi | shipmentsCreate | POST /shipments | Create a Shipment |
ShipmentsApi | shipmentsGet | GET /shipments/{shipment_id} | Get a Shipment record |
ShipmentsApi | shipmentsList | GET /shipments | List Shipment records |
TrackingApi | trackingsGet | GET /trackings/{tracking_number} | Get Tracking Details |
UploadsApi | uploadsCreate | POST /uploads | Create an Upload |
UploadsApi | uploadsDelete | DELETE /uploads/{upload_id} | Delete an Upload |
UploadsApi | uploadsGet | GET /uploads/{upload_id} | Get an Upload |
UploadsApi | uploadsList | GET /uploads | List Uploads |
WebhookDeliveriesApi | webhookDeliveriesGet | GET /webhook_deliveries/{webhook_delivery_id} | Get a Webhook Delivery |
WebhookDeliveriesApi | webhookDeliveriesList | GET /webhook_deliveries | List Webhook Deliveries |
WebhooksApi | webhooksCreate | POST /webhooks | Create a Webhook |
WebhooksApi | webhooksDelete | DELETE /webhooks/{webhook_id} | Delete a Webhook |
WebhooksApi | webhooksGet | GET /webhooks/{webhook_id} | Get a Webhook |
WebhooksApi | webhooksList | GET /webhooks | List Webhooks |
WebhooksApi | webhooksPatch | PATCH /webhooks/{webhook_id} | Update a Webhook |
WebhooksApi | webhooksPost | POST /webhooks/{webhook_id}/ping | Ping a Webhook |
WebhooksApi | webhooksSecretTokenGet | GET /webhooks/{webhook_id}/secret_token | Get a Webhook Secret Token |
WebhooksApi | webhooksSecretTokenResetPatch | PATCH /webhooks/{webhook_id}/secret_token/reset | Reset a Webhook Secret Token |
Models
- ApiKey
- ApiKeyList
- ApiKeysCreateRequest
- ApiKeysCreateRequestApiKey
- Attachment
- AttachmentList
- AttachmentsCreateRequest
- AttachmentsCreateRequestAttachment
- BasicError
- BasicErrorErrors
- EmailRule
- EmailRuleList
- EmailRulesCreateRequest
- EmailRulesCreateRequestEmailRule
- EmailRulesUpdateRequest
- EmailRulesUpdateRequestEmailRule
- EmailSubscription
- EmailSubscriptionList
- EmailSubscriptionsCreateRequest
- EmailSubscriptionsCreateRequestEmailSubscription
- EmailSubscriptionsUpdateRequest
- EmailSubscriptionsUpdateRequestEmailSubscription
- HostedSession
- HostedSessionList
- Invoice
- InvoiceList
- InvoicePayment
- InvoicePaymentList
- Location
- LocationContactsInner
- Log
- LogList
- MetadalocationAccessRestrictions200ResponseInner
- MetadataApiVersions200ResponseInner
- MetadataCurrencies200ResponseInner
- MetadataEmailNotifications200ResponseInner
- MetadataInsurances200ResponseInner
- MetadataObjectMaterials200ResponseInner
- MetadataObjects200ResponseInner
- MetadataObjects200ResponseInnerSubtypesInner
- MetadataPackageStatuses200ResponseInner
- MetadataPackings200ResponseInner
- MetadataPackings200ResponseInnerSubtypesInner
- MetadataParcelTransportServices200ResponseInner
- MetadataPaymentProcessTypes200ResponseInner
- MetadataQuotes200ResponseInner
- MetadataRequestStatuses200ResponseInner
- MetadataServices200ResponseInner
- MetadataServices200ResponseInnerSubtypesInner
- MetadataServices200ResponseInnerSubtypesInnerSubSubtypesInner
- MetadataShipmentExceptionTypes200ResponseInner
- MetadataShipmentStatuses200ResponseInner
- NullableLocation
- NullableLocationContactsInner
- Organization
- OrganizationPatchRequest
- OrganizationPatchRequestOrganization
- PaginationMetadata
- Payment
- PaymentList
- Request
- RequestBookable
- RequestDisqualificationsInner
- RequestList
- RequestListItemsInner
- RequestListItemsInnerBookable
- RequestListItemsInnerDestination
- RequestListItemsInnerOrigin
- RequestObjectsInner
- RequestObjectsInnerDetails
- RequestQuotesInner
- RequestQuotesInnerIncludedInsurancePolicy
- RequestQuotesInnerIncludedServicesInner
- RequestQuotesInnerIncludedServicesInnerIncludedServicesInner
- RequestQuotesInnerOptionalServicesInner
- RequestsCreateRequest
- RequestsCreateRequestRequest
- RequestsCreateRequestRequestDestination
- RequestsCreateRequestRequestDestinationContactsInner
- RequestsCreateRequestRequestObjectsInner
- RequestsCreateRequestRequestObjectsInnerDetails
- RequestsCreateRequestRequestOrigin
- RequestsCreateRequestRequestOriginContactsInner
- RequestsCustomRequest
- RequestsUpdateContactsRequest
- RequestsUpdateContactsRequestDestination
- RequestsUpdateContactsRequestDestinationContactsInner
- RequestsUpdateContactsRequestOrigin
- RequestsUpdateContactsRequestOriginContactsInner
- Shipment
- ShipmentExceptionsCreate201Response
- ShipmentExceptionsCreateRequest
- ShipmentExceptionsCreateRequestShipmentException
- ShipmentExceptionsGet200Response
- ShipmentExceptionsInner
- ShipmentExceptionsList200Response
- ShipmentExceptionsList200ResponseItemsInner
- ShipmentExceptionsList200ResponseMetadata
- ShipmentExceptionsUpdate200Response
- ShipmentExceptionsUpdateRequest
- ShipmentExceptionsUpdateRequestShipmentException
- ShipmentInsurancePolicy
- ShipmentList
- ShipmentListItemsInner
- ShipmentListItemsInnerDestination
- ShipmentListItemsInnerOrigin
- ShipmentPackagesInner
- ShipmentPackagesInnerObjectsInner
- ShipmentPackagesInnerObjectsInnerDetails
- ShipmentSchedule
- ShipmentServicesInner
- ShipmentTrackingInner
- ShipmentsCreateRequest
- ShipmentsCreateRequestShipment
- Tracking
- TrackingCarrier
- Upload
- UploadList
- UploadWithPresignedUrl
- UploadsCreateRequest
- UploadsCreateRequestUpload
- Webhook
- WebhookDelivery
- WebhookDeliveryList
- WebhookDeliveryListItem
- WebhookList
- WebhooksCreateRequest
- WebhooksCreateRequestWebhook
- WebhooksPatchRequest
- WebhooksPatchRequestWebhook
- WebhooksSecretTokenGet200Response
- WebhooksSecretTokenResetPatch200Response
Authorization
Authentication schemes defined for the API:
apiKeyAuth
- Type: API key
- API key parameter name: Authorization
- 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:
2021-01-01
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen