Use this API to integrate with the Shippo service
For more information, please visit https://goshippo.com/contact/.
PHP 7.4 and later. Should also work with PHP 8.0.
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
Download the files and include autoload.php
:
<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
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;
}
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 |
- Address
- AddressAllOfLatitude
- AddressAllOfLongitude
- AddressBase
- AddressCompleteCreateRequest
- AddressCreateRequest
- AddressFrom
- AddressFromCreateRequest
- AddressImporter
- AddressImporterResponse
- AddressPaginatedList
- AddressPickupCompleteCreateRequest
- AddressReturn
- AddressTo
- AddressToCreateRequest
- AddressValidationResults
- AddressValidationResultsMessage
- AddressValidationResultsMessageCodeEnum
- AddressValidationResultsMessageSourceEnum
- Alcohol
- AmountAndCurrencyCharged
- AmountAndCurrencyInvoiced
- Batch
- BatchAllOfObjectResults
- BatchBase
- BatchCreateRequest
- BatchShipment
- BatchShipmentBase
- BatchShipmentCreateRequest
- BatchShipmentPaginatedList
- Billing
- COD
- CarrierAccount
- CarrierAccountBase
- CarrierAccountCanadaPostCreateParameters
- CarrierAccountCanadaPostCreateRequest
- CarrierAccountChronopostCreateRequest
- CarrierAccountColissimoCreateRequest
- CarrierAccountCorreosCreateRequest
- CarrierAccountDHLExpressCreateRequest
- CarrierAccountDHLExpressCreateRequestParameters
- CarrierAccountDPDUKCreateRequest
- CarrierAccountDeutschePostCreateRequest
- CarrierAccountDpdDeCreateRequest
- CarrierAccountFedExCreateRequest
- CarrierAccountHermesUKCreateRequest
- CarrierAccountMondialRelayCreateRequest
- CarrierAccountPaginatedList
- CarrierAccountPosteItalianeCreateRequest
- CarrierAccountRegistrationStatus
- CarrierAccountSendleCreateRequest
- CarrierAccountServiceLevel
- CarrierAccountUPSCreateRequest
- CarrierAccountUPSCreateRequestParameters
- CarrierAccountUSPSCreateRequest
- CarrierAccountUpdateRequest
- CarrierAccountWithExtraInfo
- CarrierAccountWithExtraInfoAllOfObjectInfo
- CarrierAccountWithExtraInfoAllOfObjectInfoAuthentication
- CarrierParcelTemplate
- CarrierParcelTemplateList
- CarriersEnum
- ConnectExistingOwnAccountRequest
- ConnectExistingOwnAccountRequestParameters
- ConversionAmount
- CoreRate
- CreateNewOwnUPSAccountRequest
- CreateParcelRequest
- CreateTransactionRequest
- CustomerReference
- CustomsDeclaration
- CustomsDeclarationB13AFilingOptionEnum
- CustomsDeclarationBase
- CustomsDeclarationBaseDutiesPayor
- CustomsDeclarationBaseDutiesPayorAddress
- CustomsDeclarationContentsTypeEnum
- CustomsDeclarationCreateRequest
- CustomsDeclarationEelPfcEnum
- CustomsDeclarationIncotermEnum
- CustomsDeclarationNonDeliveryOptionEnum
- CustomsDeclarationPaginatedList
- CustomsExporterIdentification
- CustomsInvoicedCharges
- CustomsItem
- CustomsItemBase
- CustomsItemCreateRequest
- CustomsItemPaginatedList
- CustomsTaxIdentification
- DangerousGoodsBiologicalMaterial
- DangerousGoodsLithiumBatteries
- DangerousGoodsObject
- DefaultParcelTemplate
- DefaultParcelTemplateUpdateRequest
- DepartmentNumber
- DistanceUnitEnum
- DryIce
- FedExConnectExistingOwnAccountParameters
- InitiateOauth2Signin400Response
- InitiateOauth2Signin401Response
- InitiateOauth2Signin404Response
- InstantTransactionCreateRequest
- Insurance
- Invoice
- InvoiceItem
- InvoiceItemPaginatedList
- InvoiceItemTypesEnum
- InvoiceNumber
- InvoicePaginatedList
- InvoiceStatusEnum
- LabelFileTypeEnum
- LineItem
- LineItemBase
- LineItemCreateRequest
- LiveRate
- LiveRateCreateRequest
- LiveRateCreateRequestAddressFrom
- LiveRateCreateRequestAddressTo
- LiveRateCreateRequestParcel
- LiveRatePaginatedList
- Location
- Manifest
- ManifestBase
- ManifestCreateRequest
- ManifestCreateRequestAllOfAddressFrom
- ManifestErrors
- ManifestPaginatedList
- ObjectStateEnum
- Order
- OrderBase
- OrderCreateRequest
- OrderPaginatedList
- OrderShopAppEnum
- OrderStatusEnum
- PaginatedList
- Parcel
- ParcelBase
- ParcelCreateFromTemplateRequest
- ParcelCreateRequest
- ParcelDimensions
- ParcelExtra
- ParcelInsurance
- ParcelPaginatedList
- ParcelTemplateAramexAustraliaEnum
- ParcelTemplateCouriersPleaseEnum
- ParcelTemplateDHLeCommerceEnum
- ParcelTemplateDPDUKEnum
- ParcelTemplateEnumSet
- ParcelTemplateFedExEnum
- ParcelTemplateUPSEnum
- ParcelTemplateUSPSEnum
- Pickup
- PickupBase
- PickupCreateRequest
- PoNumber
- Rate
- RateAmountAndCurrency
- RatePaginatedList
- Refund
- RefundPaginatedList
- RefundRequestBody
- RegisterCarrierAccountRequest
- ResponseMessage
- RmaNumber
- ServiceGroup
- ServiceGroupAccountAndServiceLevel
- ServiceGroupBase
- ServiceGroupCreateRequest
- ServiceGroupTypeEnum
- ServiceGroupUpdateRequest
- ServiceLevel
- ServiceLevelAPCPostalEnum
- ServiceLevelAPGEnum
- ServiceLevelAirterraEnum
- ServiceLevelAramexAustraliaEnum
- ServiceLevelAsendiaEnum
- ServiceLevelAustraliaPostEnum
- ServiceLevelBetterTrucksEnum
- ServiceLevelCDLEnum
- ServiceLevelCanadaPostEnum
- ServiceLevelChronopostEnum
- ServiceLevelColissimoEnum
- ServiceLevelCorreosEspanaEnum
- ServiceLevelCouriersPleaseEnum
- ServiceLevelDHLExpressEnum
- ServiceLevelDHLGermanyEnum
- ServiceLevelDHLeCommerceEnum
- ServiceLevelDPDDEEnum
- ServiceLevelDPDUKEnum
- ServiceLevelDeutschePostEnum
- ServiceLevelEnumSet
- ServiceLevelEvriUKEnum
- ServiceLevelFedExEnum
- ServiceLevelGLSUSEnum
- ServiceLevelGlobegisticsEnum
- ServiceLevelJitsuEnum
- ServiceLevelLSOEnum
- ServiceLevelLasershipEnum
- ServiceLevelMondialRelayEnum
- ServiceLevelOnTracEnum
- ServiceLevelParcelforceEnum
- ServiceLevelPostItalianeEnum
- ServiceLevelPurolatorEnum
- ServiceLevelRoyalMailEnum
- ServiceLevelSendleEnum
- ServiceLevelSwyftEnum
- ServiceLevelUDSEnum
- ServiceLevelUPSEnum
- ServiceLevelUSPSEnum
- ServiceLevelVehoEnum
- ServiceLevelWithParent
- ServiceLevelWithParentAllOfParentServicelevel
- ServiceLevelePostGlobalEnum
- Shipment
- ShipmentBase
- ShipmentCreateRequest
- ShipmentCreateRequestAllOfAddressFrom
- ShipmentCreateRequestAllOfAddressReturn
- ShipmentCreateRequestAllOfAddressTo
- ShipmentCreateRequestAllOfCustomsDeclaration
- ShipmentCreateRequestAllOfParcels
- ShipmentExtra
- ShipmentExtraLasershipAttributesEnum
- ShipmentExtraReturnServiceType
- ShipmentExtraReturnServiceTypeLasershipEnum
- ShipmentExtraReturnServiceTypeUPSEnum
- ShipmentPaginatedList
- ShippoAccount
- ShippoAccountBase
- ShippoAccountPaginatedList
- ShippoAccountUpdateRequest
- Track
- TrackingStatus
- TrackingStatusEnum
- TrackingStatusFromLocation
- TrackingStatusLocation
- TrackingStatusLocationBase
- TrackingStatusSubstatus
- TrackingStatusToLocation
- TracksRequest
- Transaction
- TransactionCreateRequest
- TransactionCreatedBy
- TransactionPaginatedList
- TransactionRate
- TransactionStatusEnum
- UPSConnectExistingOwnAccountParameters
- UPSCreateNewOwnAccountParameters
- UPSReferenceFields
- UserParcelTemplate
- UserParcelTemplateBase
- UserParcelTemplateCreateRequest
- UserParcelTemplateList
- UserParcelTemplateUpdateRequest
- UserParcelTemplateWithCarrierTemplateCreateRequest
- UserParcelTemplateWithoutCarrierTemplateCreateRequest
- Webhook
- WebhookBase
- WebhookEventTypeEnum
- WebhookPaginatedList
- WebhookPayload
- WebhookPayloadBase
- WebhookPayloadBatch
- WebhookPayloadTrack
- WebhookPayloadTransaction
- WebhookUpdateRequest
- WeightUnitEnum
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
To run the tests, use:
composer install
vendor/bin/phpunit
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
2018-02-08
- Generator version:
7.8.0
- Generator version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen