ShipEngine React Api

The shipengine/react-api library provides React bindings for the shipengine/js-api client, with the addition of data sharing and cache management via React Query (hereon "RQ").

The client interface is exposed via hooks[^1] sharing a single RQ client instance; this allows multiple components to access data from the same ShipEngine API endpoint with a single network request.

For instance, if ComponentAComponentB and ComponentC separately invoke the useListShipments hook on a single render, the API requests will be deduped to a single GET /v1/shipments, with all three components sharing the data / loading / error / etc states from the RQ cache. Revalidating the request in one component similarly updates the others.

Basic usage

import { ShipEngine, useListShipments } from "@shipengine/react-api";

const MyComponent = () => {
const { data, isLoading, error } = useListShipments();

if (isLoading) return <div>Loading...</div>;
if (error) return <div>{error.message}</div>;

console.log(data);
// > an object matching the response schema of https://shipengine.github.io/shipengine-openapi/#operation/list_shipments

return <div>Retrieved {data.shipments.length} shipments</div>;
};

const MyApp = () => {
return (
<ShipEngine getToken={() => "your-platform-token"}>
<MyComponent />
<MyComponent />
<MyComponent />
{/* All three components will share the same data and only 1 request will be made */}
</ShipEngine>
);
};

Index

Namespaces

Enumerations - Entities

Enumerations - Other

Classes

Interfaces - Entities

Interfaces - Entities Auctane Pay Session can return a lot of metadata, but will always returns the same 5 keys.

Interfaces - Other

Type Aliases - Entities

Type Aliases - Entities Allowed Payment Method for AuctanePay

Type Aliases - Entities Generic object type to be used in any useMutation hook

Type Aliases - Entities Generic object type to be used in any useQuery hook

Type Aliases - Entities Note: This is similar to but distinct from the TransactionCategory in funding-sources

Type Aliases - Entities Used for creating new funding source without Auctane Pay. As well for receiving existing funding source and subscription billing information.

Type Aliases - Other

AccountBillingPlan AccountBillingPlanResponse AccountImage AccountImageResponse AccountImagesResponse AccountSettingsTaxIdentifier AddressResidentialIndicator AddressValidationOptions ApiError BatchableQuery BillToParties CalculateRatesData CarrierProviderService CarrierServiceStatus CarrierServicesListResponse CarrierZone ConnectCarrierAccount ConnectCarrierAccountData ConnectCarrierAccountResponse ConnectionsCarrierName ConnectionsCarrierSettingsData ConnectionsCarrierSettingsResponse CreateLabelByRateIdData CreateLabelByShipmentIdData CreateLabelData CreateSalesOrderShipmentData CreateSellerApiKeyParams CreateShipmentData CreateShipmentResult CreateWarehouseData CreationRangeQuery Customs CustomsContents CustomsNonDeliveryOptions CustomsTermsOfTradeCode DHLExpressSettings DangerousGoodsPackagingGroup DangerousGoodsPackagingInstructionSection DangerousGoodsRegulationLevel DangerousGoodsTransportMean DayOfOperation DeleteSellerApiKeyParams DeleteWarehouseData ExportLabelsParams ExportShipmentsParams FedexSettings GenericObject GetCarrierConnectionFormParams GetCarrierConnectionFormResponse GetConnectionsCarrierSettingsParams GetServicePointParams GetShipmentRatesOptions HereTokenResponse ISOString InsuranceProvider Label LabelChargeEvent LabelColumns LabelDisplayScheme LabelFormat LabelLayout LabelStatus LabelTrackingStatus ListCarrierConnectionsParams ListCarrierConnectionsResponse ListLabelsParams ListLabelsResult ListSalesOrderShipmentBody ListSalesOrderShipmentsParams ListSalesOrderShipmentsResult ListSandboxSellersParams ListSellerApiKeysParams ListServicePointsOptionAddress ListServicePointsOptionAddressQuery ListServicePointsOptionCoordinates ListServicePointsOptions ListShipmentOptions ListShipmentResult ListWebhookOptions LocaleBasedQuery ModificationRangeQuery NotifySalesOrderShippedData OperatingHours OrderSourceEditParams OriginTypes PageableQuery PageableResult PaperlessDownload ParseAddressData PartnerTheme PartnerThemeCarrierHomeCountry PartnerThemeCarriers PartnerThemeLogo PartnerThemeOnboarding PaymentTypes RateDetail RateDetailAttributes RateDetailBillingSource RateDetailType RateType RateValidationStatus RatesEstimateData RatesEstimateResponse RequestStampsAccountUrlParams SandboxMethodParams SandboxableMutation SandboxableQuery SellerApiKey ServicePoint ServicePointAddress ServicePointCustomError ServicePointFeature ServicePointProvider ServicePointsListResponse ServicesListSupportedCountries ShipEngineAPIHeaders ShipEngineProps ShipmentColumns ShipmentPackage ShipmentRateResponse ShipmentStatus ShippingRule SortableQuery StampsAccountUrlTypes TaggableQuery TaxType TaxableEntityType TaxableIdentifierType TransactionHistoryCsvLink UPSSettings UPSUpdateSettings UpdateAccountBillingPlanRequestBody UpdateAccountBillingPlanResponse UpdateAccountImage UpdateConnectionsCarrierParams UpdateFundingSourceData UpdateSalesOrderShipmentData UpdateWarehouseData UploadRateCardData User UserListOptions UserListResponse UserStatus VoidRequest WalletTransaction WalletTransactionHistory WalletTransactionType WindsorFrameworkDetails

Type Aliases - Responses

Variables

Functions - Other

Functions - ShipEngine API Hooks

useAddFunds useAddInsuranceFunds useCalculateRates useCancelShipment useCarrierConnectionsServicesList useConnectCarrier useConnectCarrierAccount useCreateAccountImage useCreateAuctanePaySession useCreateLabel useCreateLabelByRateId useCreateLabelByShipmentId useCreateRateCard useCreateSalesOrderShipment useCreateShipment useCreateShippingRule useCreateWarehouse useCreateWebhook useDeactivateOrderSource useDeleteAccountImage useDeleteCarrier useDeleteRateCard useDeleteShippingRule useDeleteWarehouse useDeleteWebhook useDownloadRateCard useEditShippingRule useExportLabels useExportShipments useGetAccountBilling useGetAccountImages useGetAccountSettings useGetAuctanePayConfig useGetAutoFundingConfiguration useGetCarrierById useGetCarrierConnectionForm useGetConnectionsCarrierSettings useGetCountriesByCarrier useGetCurrenciesByCarrier useGetInsuranceAccount useGetLabel useGetPackageRatingGroupByCarrier useGetRateCardById useGetSalesOrder useGetSalesOrderByExternalOrderId useGetSalesOrderShipment useGetServicePoint useGetServicesByCarrier useGetShipment useGetShipmentByExternalId useGetShipmentRates useGetShippingRuleById useGetShippingRuleConditionsOptions useGetThemeById useGetZonesByCarrier useListCarrierConnections useListCarriers useListCustomPackageTypes useListLabels useListLabelsInfinite useListOrderSources useListRateCards useListSalesOrderShipments useListSalesOrderShipmentsByExternalOrderId useListSalesOrders useListServicePoints useListShipments useListShippingRules useListUsers useListWarehouses useListWebhooks useNotifySalesOrderShipped useParseAddress usePublishRateCard useRatesEstimate useRefreshOrderSource useRefreshOrderSourceAsync useRequestStampsAccountUrls useUpdateAccountBillingPlan useUpdateAccountImage useUpdateAccountSettings useUpdateAutoFunding useUpdateConnectionsCarrierSettings useUpdateOrderSource useUpdateRateCard useUpdateSalesOrderShipment useUpdateWarehouse useUpdateWebhook useUploadRateCard useUpsertAccountBilling useValidateAddresses useVoidLabel

Functions - ShipEngine API Hooks No documentation available for this endpoint

Functions - ShipEngine API Hooks Returns an OAuth access token that can be used to authenticate with the HERE Maps API

Functions - Utilities

Generated using TypeDoc