Download the PHP package pitwch/rest-api-wrapper-proffix-php without Composer

On this page you can find all versions of the php package pitwch/rest-api-wrapper-proffix-php. 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 rest-api-wrapper-proffix-php

PHP Wrapper für PROFFIX REST-API

Ein effizienter PHP Wrapper für die PROFFIX REST-API.

alt text

Installation

Der Wrapper kann via Composer installiert werden.

Konfiguration

Initialisierung

Autoload der RestAPIWrapperProffix Klasse:

Die Konfiguration wird dem Client mitgegeben:

Konfiguration Beispiel Bemerkung
url https://myserver.ch:999 URL der REST-API ohne pxapi/v2/
apiDatabase DEMO Name der Datenbank
apiUser USR Name des Benutzers
apiPassword b62cce2fe18f7a156a9c... SHA256-Hash des Benutzerpasswortes
apiModule ADR,STU Benötigte Module (mit Komma getrennt)
options array('key'=>'112a5a90...') Optionen (Details unter Optionen)

Beispiel für die Initialisierung

Optionen

Optionen sind fakultativ und werden in der Regel nicht benötigt:

Option Beispiel Bemerkung
key 112a5a90fe28b... API-Key als SHA256 - Hash (kann auch direkt mitgegeben werden)
version v2 API-Version; Standard = v2
api_prefix /pxapi/ Prefix für die API; Standard = /pxapi/
login_endpoint PRO/Login Endpunkt für Login; Standard = PRO/Login
user_agent php-wrapper-proffix-restapi User Agent; Standard = php-wrapper-proffix-restapi
timeout 15 Timeout für Curl in Sekunden; Standard = 15
follow_redirects true Weiterleitungen der API folgen; Standard = false

Methoden

Allgemeine Methoden (get, put, post, delete)

Parameter Typ Bemerkung
endpoint string Endpunkt der PROFFIX REST-API; z.B. ADR/Adresse, STU/Rapporte...
data array Daten (werden automatisch in JSON konvertiert); z.B: ["Name"=>"Demo AG",...]
parameters array Parameter gemäss PROFFIX REST API Docs

Sonderzeichen in den Parametern müssen gegebenfalls mit Escape-Zeichen verwendet werden, z.B:

Get / Query

Put / Update

Post / Create

Delete

Spezifische Methoden

getList(int $listenr, array $body = [])

Generiert eine PROFFIX-Liste (z.B. ein PDF) und gibt das Ergebnis als Response-Objekt zurück, welches den rohen Dateiinhalt enthält.

Parameter Typ Bemerkung
$listenr int Die ListeNr der Liste, die generiert werden soll.
$body array (Optional) Ein assoziatives Array mit Parametern für die Listengenerierung. Wichtig: Es muss mindestens ein leeres JSON-Objekt ({}) gesendet werden.

Beispiel:

Spezielle Endpunkte

Info

Ruft Infos vom Endpunkt PRO/Info ab.

Hinweis: Dieser Endpunkt / Abfrage blockiert keine Lizenz.

Datenbank

Ruft Infos vom Endpunkt PRO/Datenbank ab.

Response / Antwort

Alle Methoden geben die Response als Array bzw. NULL (z.B. bei DELETE) zurück. Bei Fehlern wird eine HttpClientException mit der Rückmeldung der PROFFIX REST-API geworfen.

Zudem lassen sich Zusatzinformationen zur letzten Response wie folgt ausgeben:

Letzter Request

Letzte Response

Ausnahmen / Spezialfälle

Weitere Beispiele

Im Ordner /examples finden sich weitere auskommentierte Beispiele.

Weitere Wrapper für die Proffix Rest-API


All versions of rest-api-wrapper-proffix-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
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 pitwch/rest-api-wrapper-proffix-php contains the following files

Loading the files please wait ....