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.
Download pitwch/rest-api-wrapper-proffix-php
More information about pitwch/rest-api-wrapper-proffix-php
Files in pitwch/rest-api-wrapper-proffix-php
Package rest-api-wrapper-proffix-php
Short Description PHP Wrapper for PROFFIX REST API
License MIT
Homepage https://www.pitw.ch
Informations about the package rest-api-wrapper-proffix-php
:warning: :construction:
Archiviert
Dieses Repo wurde archiviert und wird nicht mehr weitergeführt :file_folder:. Für produktive Projekte mit der Proffix Rest-API empfehlen sich mittlerweile andere Sprachen oder Technologien. Als erpropte, ausgereifte und aktiv unterhaltene Alternativen empfehlen wird die von uns unterhaltenen Wrappers für die Proffix Rest-API auszuprobieren:
PHP Wrapper für PROFFIX REST-API
Ein effizienter PHP Wrapper für die PROFFIX REST-API
Installation
Der Wrapper kann entweder geklont oder via Composer installiert werden.
Variante 1: Verwendung mit Composer (empfohlen)
Autoload RestAPIWrapperProffix class:
Konfiguration
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 | Names des Benutzers |
apiPassword | b62cce2fe18f7a156a9c...0f0d7bd18d9e8a40be2e663017 | SHA256-Hash des Benutzerpasswortes |
apiModule | ADR,STU | Benötigte Module (mit Komma getrennt) |
options | array('key'=>'112a5a90...59028') | Optionen (Details unter Optionen) |
Beispiel:
Optionen
Optionen sind fakultativ und werden in der Regel nicht benötigt:
Option | Beispiel | Bemerkung |
---|---|---|
key | 112a5a90fe28b...242b10141254b4de59028 | 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
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: array("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:
Folgende unterschiedlichen Methoden sind mit dem Wrapper möglich:
Get / Query
Put / Update
Post / Create
Response / Antwort
Alle Methoden geben die Response als Array bzw. NULL (z.B. bei DELETE)
Bei Fehlern wird HttpClientException
mit Rückmeldung der PROFFIX REST-API ausgegeben.
Zudem lassen sich Zusatzinformationen zur Response wie folgt ausgeben:
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.
Hinweis: Dieser Endpunkt / Abfrage blockiert keine Lizenz
Ausnahmen / Spezialfälle
- Endpunkte welche Leerschläge enthalten können (z.B. LAG/Artikel/PC 7/Bestand) müssen mit rawurlencode() genutzt werden
Weitere Beispiele
Im Ordner /examples finden sich weitere, auskommentierte Beispiele.
All versions of rest-api-wrapper-proffix-php with dependencies
ext-curl Version *
ext-json Version *