Skip to content

Skvare/com.skvare.shippo

Repository files navigation

OpenAPIClient-php

Use this API to integrate with the Shippo service

For more information, please visit https://goshippo.com/contact/.

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: APIKeyHeader
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\AddressesApi(
    // 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
);
$address_create_request = new \OpenAPI\Client\Model\AddressCreateRequest(); // \OpenAPI\Client\Model\AddressCreateRequest | Address details.
$shippo_api_version = 2018-02-08; // string | String used to pick a non-default API version to use

try {
    $result = $apiInstance->createAddress($address_create_request, $shippo_api_version);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AddressesApi->createAddress: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.goshippo.com

Class Method HTTP request Description
AddressesApi createAddress POST /addresses Create a new address
AddressesApi getAddress GET /addresses/{AddressId} Retrieve an address
AddressesApi listAddresses GET /addresses List all addresses
AddressesApi validateAddress GET /addresses/{AddressId}/validate Validate an address
BatchesApi addShipmentsToBatch POST /batches/{BatchId}/add_shipments Add shipments to a batch
BatchesApi createBatch POST /batches Create a batch
BatchesApi getBatch GET /batches/{BatchId} Retrieve a batch
BatchesApi purchaseBatch POST /batches/{BatchId}/purchase Purchase a batch
BatchesApi removeShipmentsFromBatch POST /batches/{BatchId}/remove_shipments Remove shipments from a batch
CarrierAccountsApi createCarrierAccount POST /carrier_accounts Create a new carrier account
CarrierAccountsApi getCarrierAccount GET /carrier_accounts/{CarrierAccountId} Retrieve a carrier account
CarrierAccountsApi getCarrierRegistrationStatus GET /carrier_accounts/reg-status Get Carrier Registration status
CarrierAccountsApi initiateOauth2Signin GET /carrier_accounts/{CarrierAccountObjectId}/signin/initiate Connect an existing carrier account using OAuth 2.0
CarrierAccountsApi listCarrierAccounts GET /carrier_accounts List all carrier accounts
CarrierAccountsApi registerCarrierAccount POST /carrier_accounts/register/new Add a Shippo carrier account
CarrierAccountsApi updateCarrierAccount PUT /carrier_accounts/{CarrierAccountId} Update a carrier account
CarrierParcelTemplatesApi getCarrierParcelTemplate GET /parcel-templates/{CarrierParcelTemplateToken} Retrieve a carrier parcel templates
CarrierParcelTemplatesApi listCarrierParcelTemplates GET /parcel-templates List all carrier parcel templates
CustomsDeclarationsApi createCustomsDeclaration POST /customs/declarations Create a new customs declaration
CustomsDeclarationsApi getCustomsDeclaration GET /customs/declarations/{CustomsDeclarationId} Retrieve a customs declaration
CustomsDeclarationsApi listCustomsDeclarations GET /customs/declarations List all customs declarations
CustomsItemsApi createCustomsItem POST /customs/items Create a new customs item
CustomsItemsApi getCustomsItem GET /customs/items/{CustomsItemId} Retrieve a customs item
CustomsItemsApi listCustomsItems GET /customs/items List all customs items
ManifestsApi createManifest POST /manifests Create a new manifest
ManifestsApi getManifest GET /manifests/{ManifestId} Retrieve a manifest
ManifestsApi listManifests GET /manifests List all manifests
OrdersApi createOrder POST /orders Create a new order
OrdersApi getOrder GET /orders/{OrderId} Retrieve an order
OrdersApi listOrders GET /orders List all orders
ParcelsApi createParcel POST /parcels Create a new parcel
ParcelsApi getParcel GET /parcels/{ParcelId} Retrieve an existing parcel
ParcelsApi listParcels GET /parcels List all parcels
PickupsApi createPickup POST /pickups Create a pickup
RatesApi getRate GET /rates/{RateId} Retrieve a rate
RatesApi listShipmentRates GET /shipments/{ShipmentId}/rates Retrieve shipment rates
RatesApi listShipmentRatesByCurrencyCode GET /shipments/{ShipmentId}/rates/{CurrencyCode} Retrieve shipment rates in currency
RatesAtCheckoutApi createLiveRate POST /live-rates Generate a live rates request
RatesAtCheckoutApi deleteDefaultParcelTemplate DELETE /live-rates/settings/parcel-template Clear current default parcel template
RatesAtCheckoutApi getDefaultParcelTemplate GET /live-rates/settings/parcel-template Show current default parcel template
RatesAtCheckoutApi updateDefaultParcelTemplate PUT /live-rates/settings/parcel-template Update default parcel template
RefundsApi createRefund POST /refunds Create a refund
RefundsApi getRefund GET /refunds/{RefundId} Retrieve a refund
RefundsApi listRefunds GET /refunds/ List all refunds
ServiceGroupsApi createServiceGroup POST /service-groups Create a new service group
ServiceGroupsApi deleteServiceGroup DELETE /service-groups/{ServiceGroupId} Delete a service group
ServiceGroupsApi listServiceGroups GET /service-groups List all service groups
ServiceGroupsApi updateServiceGroup PUT /service-groups Update an existing service group
ShipmentsApi createShipment POST /shipments Create a new shipment
ShipmentsApi getShipment GET /shipments/{ShipmentId} Retrieve a shipment
ShipmentsApi listShipments GET /shipments List all shipments
ShippoAccountsApi createShippoAccount POST /shippo-accounts Create a Shippo Account
ShippoAccountsApi getShippoAccount GET /shippo-accounts/{ShippoAccountId} Retrieve a Shippo Account
ShippoAccountsApi listShippoAccounts GET /shippo-accounts List all Shippo Accounts
ShippoAccountsApi updateShippoAccount PUT /shippo-accounts/{ShippoAccountId} Update a Shippo Account
TrackingStatusApi createTrack POST /tracks Register a tracking webhook
TrackingStatusApi getTrack GET /tracks/{Carrier}/{TrackingNumber} Get a tracking status
TransactionsApi createTransaction POST /transactions Create a shipping label
TransactionsApi getTransaction GET /transactions/{TransactionId} Retrieve a shipping label
TransactionsApi listTransactions GET /transactions List all shipping labels
UserParcelTemplatesApi createUserParcelTemplate POST /user-parcel-templates Create a new user parcel template
UserParcelTemplatesApi deleteUserParcelTemplate DELETE /user-parcel-templates/{UserParcelTemplateObjectId} Delete a user parcel template
UserParcelTemplatesApi getUserParcelTemplate GET /user-parcel-templates/{UserParcelTemplateObjectId} Retrieves a user parcel template
UserParcelTemplatesApi listUserParcelTemplates GET /user-parcel-templates List all user parcel templates
UserParcelTemplatesApi updateUserParcelTemplate PUT /user-parcel-templates/{UserParcelTemplateObjectId} Update an existing user parcel template
WebhooksApi createWebhook POST /webhooks Create a new webhook
WebhooksApi deleteWebhook DELETE /webhooks/{webhookId} Delete a specific webhook
WebhooksApi getWebhook GET /webhooks/{webhookId} Retrieve a specific webhook
WebhooksApi listWebhooks GET /webhooks List all webhooks
WebhooksApi updateWebhook PUT /webhooks/{webhookId} Update an existing webhook

Models

Authorization

Authentication schemes defined for the API:

APIKeyHeader

  • 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: 2018-02-08
    • Generator version: 7.8.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

Releases

No releases published

Packages

No packages published

Languages