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.

0.2 2024-01-03 18:08 UTC

This package is auto-updated.

Last update: 2024-04-03 18:41:36 UTC


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

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

hello@arta.io

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