Download the PHP package mallgroup/mpapi-client without Composer
On this page you can find all versions of the php package mallgroup/mpapi-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mallgroup/mpapi-client
More information about mallgroup/mpapi-client
Files in mallgroup/mpapi-client
Package mpapi-client
Short Description PHP Client for Mall marketplace API
License Apache-2.0
Informations about the package mpapi-client
Mall Marketplace API Client
Description
MPAPI client is a tool created to help Internet Mall, a. s. partners easily manage article catalogue, deliveries, orders etc. using Mall Marketplace API.
Requirements
64bit
version ofPHP 7.4
orPHP 8
- Guzzle 7
Installation
To install the client using Composer run following command in your repository
Implementation
Info
Client consists of one main client and multiple, separate, domain clients.
The main client groups all domain clients under one object, for easier implementation, but every domain client can be initialized and used by itself.
Every client provides an interface that SHOULD be used as parameter types in code, instead of client classes themselves (i.e., use MpApiClientInterface $client
or BrandsClientInterface $client
instead of MpApiClient $client
or BrandsClient $client
).
When initializing the client, you MUST provide
- an authenticator implementing AuthMiddlewareInterface
- currently, only ClientIdAuthenticator, which accepts
my-client-id
, is provided - in the future, new authenticators will be released (i.e., OAuth)
- currently, only ClientIdAuthenticator, which accepts
- name of the app using the API
- it is sent with every request to Mall API for easier request identification and debugging of reported issues
- please provide a simple, yet meaningful name, i.e.,
MyAppName CRM
orMyAppName Order sync
instead of a random string
Examples
There are 2 main ways to initialize the client
1. Using MpApiClient with default config
2. Using MpApiClient (or any other domain client) with custom http client
- every domain client can be initialized this way as a standalone client
- when initializing a custom http client,
handler
stack withAuthMiddlewareInterface
MUST be provided!
Examples for all client domains
- Article
- Brand
- Category
- Checks
- Financial
- Label
- Order
- Shop
- SupplyDelay
List of custom Exceptions thrown in this client can be found here
⚠ Warning
- client does not include support for deprecated endpoints that will be changed, replaced or removed in the future (i.e.,
/v1/deliveries
or/v1/gifts
)
ℹ Known missing or incomplete features
- [ ] Support for
/v2/transports
endpoints