inpostapi / inpost-vonhalsky-api-sdk-php
PHP SDK for the InPost von Halsky API: organizations, categories, offers, offer attachments, orders, returns, claims, price program, events.
Package info
github.com/InPost-VonHalsky/InPost-vonHalsky-api-sdk-php
pkg:composer/inpostapi/inpost-vonhalsky-api-sdk-php
Requires
- php: ^7.3 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^5.3 || ^7.3
- guzzlehttp/psr7: ^1.0 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-11-09 21:28:48 UTC
README
Welcome to the Inpost VonHalsky API documentation. This API serves as a powerful intermediary between merchants and Inpost VonHalsky shopping platform, enabling seamless integration and management of e-commerce operations.
API is specifically designed to be used by integration platforms, which are next used by sellers. Within API you will be able to create Offer and publish it on Inpost VonHalsky Platform.
Authentication
Access to API operations is restricted only for known integrators. For gathering access token please refer to agreement policy manager.
Language support
API by default provides messages and content in English (en) language.
You can manipulate this behavior by providing Accept-Language HTTP Header.
For incoming data which are lang-specific there are mostly defined separate lang-related fields, which needs to be used for pass valid request.
Key features
Category Management
- List all available Categories within platform.
- Retrieve detailed information about specific Category and its Attributes.
Offer Management
- Create (match) product Offers to showcase within platform.
- Update existing Offers to reflect changes in pricing or stock availability.
- Close or reopen Offers that are no longer available or relevant.
Order Management
- List all Orders received through platform.
- Retrieve detailed information about individual Order.
- Pass invoices or shipments information to Offer.
References
Please also read our Integration Guidelines which is separate document, it describes common scenarios using this API.
This library is built based on the API documentation available at https://inpsa-api-portal.inpost-group.com/.
Support
In case of any problems or questions regarding this SDK or the API, please contact us at apiportal@inpost.pl.
Related projects
The InPost von Halsky e-commerce modules use this SDK for communication with the API:
- Magento 2: https://github.com/InPost-VonHalsky/InPost-vonHalsky-Magento (uses SDK
^1.0) - PrestaShop 8: https://github.com/InPost-VonHalsky/InPost-vonHalsky-PrestaShop (uses SDK
^2.0)
Versioning and maintenance policy
Each API operation (endpoint) is versioned with specific /v<version> path prefix,
for e.g.: /v1/categories, which increases only on breaking changes.
To familiarize yourself with the maintenance policy and details of the versioning rules, go to the API Portal, Versioning and Maintenance section.
For more information, please visit https://inpsa-api-portal.inpost-group.com/.
Installation & Usage
Requirements
PHP 8.1 and later.
Composer
Install the bindings via Composer:
composer require inpostapi/inpost-vonhalsky-api-sdk-php:^2.0
Version 2.0 contains breaking changes compared to 1.x, see CHANGELOG.md. Release 1.0.0 stays available for existing integrations.
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 Bearer (JWT) authorization: bearerAuth $config = InpostApi\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new InpostApi\Api\CategoriesApi( // 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 ); $category_id = d8ec11ce-12ba-4fb7-be9a-249e679f4e67; // string | Category ID identifier as path param. $accept_language = en; // string | A two-letter code of the user's preferred language compliant with ISO 639. try { $result = $apiInstance->getCategoriesAttributesByCategoryIdV1($category_id, $accept_language); print_r($result); } catch (Exception $e) { echo 'Exception when calling CategoriesApi->getCategoriesAttributesByCategoryIdV1: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://stage-api.inpost-group.com/inpsa
| Class | Method | HTTP request | Description |
|---|---|---|---|
| CategoriesApi | getCategoriesAttributesByCategoryIdV1 | GET /v1/categories/{categoryId}/attributes | Get Category Attributes |
| CategoriesApi | getCategoriesByIdV1 | GET /v1/categories/{categoryId} | Get Category details |
| CategoriesApi | getCategoriesV1 | GET /v1/categories | Browse Category tree |
| OfferAttachmentsApi | deleteOffersAttachmentsByOfferIdAndAttachmentIdV1 | DELETE /v1/organizations/{organizationId}/offers/{offerId}/attachments/{attachmentId} | Delete Offer Attachment |
| OfferAttachmentsApi | getOffersAttachmentsByOfferIdAndAttachmentIdV1 | GET /v1/organizations/{organizationId}/offers/{offerId}/attachments/{attachmentId} | Download Offer Attachment |
| OfferAttachmentsApi | getOffersAttachmentsByOfferIdV1 | GET /v1/organizations/{organizationId}/offers/{offerId}/attachments | Get Offer Attachments |
| OfferAttachmentsApi | postOffersAttachmentsByOfferIdV1 | POST /v1/organizations/{organizationId}/offers/{offerId}/attachments | Create Attachment for Offer |
| OfferAttachmentsApi | putAttachmentsPriorityByOfferIdV1 | PUT /v1/organizations/{organizationId}/offers/{offerId}/attachments/priority | Change display order of offer attachments. |
| OffersApi | getOffersByIdV1 | GET /v1/organizations/{organizationId}/offers/{offerId} | Get Offer details |
| OffersApi | getOffersCommandsByIdV1 | GET /v1/organizations/{organizationId}/offers/commands/{commandId} | Offers Command Status |
| OffersApi | getOffersDepositTypesV1 | GET /v1/offers/deposit-types | List Deposit Types |
| OffersApi | getOffersEventsV1 | GET /v1/organizations/{organizationId}/offers/events | Lists Offers Events |
| OffersApi | getOffersHintV1 | GET /v1/organizations/{organizationId}/offers/hint | Hint product info, gpsr info and category |
| OffersApi | getOffersV1 | GET /v1/organizations/{organizationId}/offers | Lists Offers |
| OffersApi | patchOfferAttributesByIdV1 | PATCH /v1/organizations/{organizationId}/offers/{offerId}/attributes | Patch Offer attributes |
| OffersApi | patchOffersByIdV1 | PATCH /v1/organizations/{organizationId}/offers/{offerId} | Partially update Offer |
| OffersApi | patchUpdateOfferPricesBatchV1 | PATCH /v1/organizations/{organizationId}/offers/prices | Batch Update Offer Price |
| OffersApi | patchUpdateOfferStocksBatchV1 | PATCH /v1/organizations/{organizationId}/offers/stocks | Batch Update Offer Stock |
| OffersApi | postBatchOffersV1 | POST /v1/organizations/{organizationId}/offers/batch | Batch Offer creation |
| OffersApi | postOffersCloseByOfferIdV1 | POST /v1/organizations/{organizationId}/offers/{offerId}/close | Close Offer |
| OffersApi | postOffersReopenByOfferIdV1 | POST /v1/organizations/{organizationId}/offers/{offerId}/reopen | Reopen Offer |
| OffersApi | postOffersV1 | POST /v1/organizations/{organizationId}/offers | Create new Offer |
| OrdersApi | acceptReturnV1 | POST /v1/organizations/{organizationId}/returns/{returnId}/accept | Accept Return |
| OrdersApi | getClaimByIdV1 | GET /v1/organizations/{organizationId}/orders/{orderId}/claims/{claimId} | Get single claim details |
| OrdersApi | getClaimsForOrganizationV1 | GET /v1/organizations/{organizationId}/claims | Get list of organization claims |
| OrdersApi | getOrdersByIdV1 | GET /v1/organizations/{organizationId}/orders/{orderId} | Get Order details |
| OrdersApi | getOrdersClaimTypesDictionaryV1 | GET /v1/orders/claim-types | Get claim types dictionary |
| OrdersApi | getOrdersCommandsByIdV1 | GET /v1/organizations/{organizationId}/orders/commands/{commandId} | Orders Command Status |
| OrdersApi | getOrdersDeliveryMethodsV1 | GET /v1/orders/delivery-methods | List Delivery Methods |
| OrdersApi | getOrdersDeliveryMethodsV2 | GET /v2/orders/delivery-methods | List Delivery Methods |
| OrdersApi | getOrdersEventsV1 | GET /v1/organizations/{organizationId}/orders/events | Lists Orders Events |
| OrdersApi | getOrdersV1 | GET /v1/organizations/{organizationId}/orders | Lists Orders |
| OrdersApi | getReturnByIdV1 | GET /v1/organizations/{organizationId}/returns/{returnId} | Get single return details |
| OrdersApi | getReturnsByOrderIdV1 | GET /v1/organizations/{organizationId}/orders/{orderId}/returns | Get returns for specific order |
| OrdersApi | getReturnsForOrganizationV1 | GET /v1/organizations/{organizationId}/returns | Get all returns for organization |
| OrdersApi | partialRefundClaimV1 | POST /v1/organizations/{organizationId}/orders/{orderId}/claims/{claimId}/partial-refund | Resolve claim with partial refund |
| OrdersApi | postOrdersAcceptByIdV1 | POST /v1/organizations/{organizationId}/orders/{orderId}/accept | Accept Order |
| OrdersApi | postOrdersRefundByOrderIdV1 | POST /v1/organizations/{organizationId}/orders/{orderId}/refund | Refund Order payment |
| OrdersApi | postOrdersRefuseByIdV1 | POST /v1/organizations/{organizationId}/orders/{orderId}/refuse | Refuse Order |
| OrdersApi | refundClaimV1 | POST /v1/organizations/{organizationId}/orders/{orderId}/claims/{claimId}/refund | Resolve claim with full refund |
| OrdersApi | rejectClaimV1 | POST /v1/organizations/{organizationId}/orders/{orderId}/claims/{claimId}/reject | Reject claim |
| OrdersApi | rejectReturnV1 | POST /v1/organizations/{organizationId}/returns/{returnId}/reject | Reject Return |
| OrganizationsApi | getOrganizationsV1 | GET /v1/organizations | Browse Organizations |
| PriceProgramApi | getCampaignDeclarationsV1 | GET /v1/organizations/{organizationId}/campaigns/declarations | Lists current Offer declarations of an Organization |
| PriceProgramApi | getCampaignsCommandsByIdV1 | GET /v1/organizations/{organizationId}/campaigns/commands/{commandId} | Price Program Declaration Command Status |
| PriceProgramApi | getOfferCampaignDeclarationsV1 | GET /v1/organizations/{organizationId}/offers/{offerId}/campaigns/declarations | Returns the current declarations for an Offer |
| PriceProgramApi | postCampaignDeclarationsV1 | POST /v1/organizations/{organizationId}/campaigns/declarations | Sets price program declarations for a batch of Offers |
Models
- Address
- Attachment
- AttachmentInfo
- AttachmentPriority
- AttachmentType
- Attachments
- AttributeDefinition
- AttributeDictionary
- AttributeDictionaryOption
- AttributeExpectedValueType
- AttributeRemoveOperation
- AttributeType
- AttributeUnitOfMeasureDetails
- AttributeUpsertOperation
- AttributeValue
- CampaignDeclarationCommandDetails
- CampaignDeclarationCommandStatusDetails
- Category
- CategoryDetailed
- CategoryRelationTuple
- CategoryRelationType
- ClaimListResponse
- ClaimOrderDetails
- ClaimResolution
- ClaimResponse
- ClaimSort
- ClaimSpecification
- ClaimSpecificationSummary
- ClaimState
- ClaimSummaryResponse
- ClaimType
- ClaimTypes
- Claimant
- ClaimantSummary
- ClaimsAttachmentType
- Client
- CommandDetails
- CommandError
- CommandStatus
- ComplaintPolicy
- Customer
- DeclaredParticipationMode
- Delivery
- DeliveryMethod
- DeliveryMethodType
- DepositLabel
- DepositPosition
- DepositType
- Dimension
- ErrorDetail
- ErrorResponse
- Features
- GpsrInfo
- Hint
- Hints
- Image
- InvoiceDetails
- LineItem
- Manual
- Manufacturer
- ModelReturn
- Money
- Offer
- OfferAttributesPatch
- OfferAttributesPatchOperationsInner
- OfferCampaignDeclarationProposal
- OfferCampaignDeclarations
- OfferCampaignDeclarationsList
- OfferCommandDetails
- OfferCommandStatusDetails
- OfferCreated
- OfferDetails
- OfferEvent
- OfferEventData
- OfferEventType
- OfferInfo
- OfferMetadata
- OfferParticipationDeclaration
- OfferPatch
- OfferPricePatchItem
- OfferPriceTag
- OfferProposal
- OfferSort
- OfferStatus
- OfferStockPatchItem
- Offers
- OffersDepositTypes
- OffersEvents
- Order
- OrderEvent
- OrderEventData
- OrderEventType
- OrderLineItem
- OrderOfferInfo
- OrderOfferInfoProgramPrice
- OrderPaymentStatus
- OrderProduct
- OrderSort
- OrderStatus
- Orders
- OrdersEvents
- Organization
- OrganizationParent
- PackageStatus
- Page
- Parcel
- Payment
- PaymentDetails
- PaymentType
- PostSale
- PriceProgram
- PriceTag
- Product
- ProductHint
- ProductInfo
- ProductInfoPatch
- ProductInfoProposal
- Promotion
- PromotionMode
- PromotionStatus
- RefundRequest
- RefundResponse
- RefundStatus
- RejectionReason
- RequestedClaimState
- RequestedResolution
- ResolutionDescription
- ResolutionQuery
- ResponsiblePerson
- ReturnList
- ReturnPolicy
- ReturnReason
- ReturnStatus
- SchemasDeclaredParticipationMode
- ShippingTime
- Stock
- StockUnit
- SuccessResponse
- ValidationError
Authorization
Authentication schemes defined for the API:
bearerAuth
- Type: Bearer authentication (JWT)
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:
1.7.1 - Package version:
2.0.0 - Generator version:
7.14.0 - Build package:
org.openapitools.codegen.languages.PhpClientCodegen