Download the PHP package picqer/api-client without Composer

On this page you can find all versions of the php package picqer/api-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package api-client

Picqer PHP API Client

This project is a PHP Library to use the Picqer API from your PHP application.

Full documentation for the API can be found on picqer.com/en/api

Installation

This project can easily be installed through Composer.

Example: Get orders

Example: Results generator

If you want to loop trough all your products or orders, you can use the results generator. This will give you the results in a loop as soon as the API returns them. This will also help with memory usage.

More examples

Review the examples in the examples/ folder.

Helpful methods

setUseragent()

It is helpful for us if you set the user agent with the name of the application or developer that build the application. Then we can contact you if we see weird behaviour.

sendRequest()

This is the main method of the client that sends the API request. If there are new API endpoints that are not yet implemented in this client with dedicated methods, you can create the request yourself with sendRequest().

getResultGenerator()

This is a generator for all listing methods like getOrders and getProducts. This will help reduce the memory usage of your application when looping through a lot of orders or products.

enableDebugmode()

This flag gives you a lot of debug information about the request that the client send and the raw response it got as a result.

Rate limits

Please keep in mind the rate limit of the Picqer API. In the result array you get a 'rate-limit-remaining' key with the remaining requests you can do in this minute. Try not to make any more requests if this is 0 if you can.

When you try another request, the request will fail. This client will throw you a RateLimitException. You can catch those and try your request again later.

We also have an option $apiClient->enableRetryOnRateLimitHit() you can use to enable retry's of requests when you hit a rate limit. When the client hits the rate limit, it will sleep for 20 seconds and try the same request again.

Webhooks helper

This client also contains a helper for receiving webhooks, including a signature checker. This is included in the PicqerWebhook class.

To receive a webhook, you only need the following:

We recommend using signature validation to be sure the webhook was sent by Picqer. Create a hook with a secret, then check the signature of the webhook with that secret as follows:

This will throw an WebhookSignatureMismatchException if the secret or signatures do not match.

Support

Need support implementing the Picqer API? Feel free to contact us


All versions of api-client with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-curl Version *
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package picqer/api-client contains the following files

Loading the files please wait ....