2.3.2 - Import Endpoints

wiki.poe.de / poe Standardschnittstelle




POST api/dx/imports erwartet im Body des Requests ein JSON codiertes Array aus Objekten in Nutzdaten-Struktur (siehe oben).


Liefert im Erfolgsfall:

{ “success“: true, “affected_rows“: <number> }


GET api/dx/imports kann zum Überprüfen des Schreibens benutzt werden.

Liefert per default die letzten 100 import2 Einträge absteigend nach ID sortiert in einem JSON Array zurück.

  • Optionale Parameter:
  • Offset: steuert an wieviel Einträge beim lesen übersprungen werden sollen (default: 0)
  • Limit: steuert an wieviel Einträge gelesen werden sollen (default: 100, max: 500)



Beispiel - Daten für Import bereitstellen

In diesem Beispiel importieren wir zwei Warengruppen (WGR Sätze) und einen Rabattgrund (GRD Satz) in TRADEMAN.

POST https://{instanz}.poslive.de/api/dx/imports

Header:
Content-Type: application/json
authorization:Basic XXXXXXXXXXXXXXX

Body:

[
    {"stype":"WGR","ctype":1,"i1":5487,"c1":"Tische","f1":19.0,"c2":"tis","i2":1,"i3":15,"b1":true},
    {"stype":"WGR","ctype":1,"i1":5438,"c1":"Stühle","f1":19.0,"c2":"stu","i2":1,"i3":15,"b1":true},
    {"stype":"GRD","ctype":1,"i1":120,"c1":"Mitarbeiter Rabatt","c2":"P","c3":"Mitar.Rbt.","f1":10.0,"f2":20.0}
]

Antwort:

{
    "success:": true,
    "affected_rows": 3
}

Beispiel - Überprüfen ob Daten korrekt geschrieben wurden

GET https://demo.poslive.de/api/dx/imports

Antwort:

[
    {"id":1,"cdate":"20190523115932","done":false,"stype":"WGR","ctype":1,"target":0,"c1":"Tische","c2":"tis","c3":"","c4":"","c5":"","c6":"","c7":"","c8":"","c9":"","c10":"","c11":"","c12":"","c13":"","c14":"","s1":"","s2":"","s3":"","s4":"","s5":"","s6":"","s7":"","s8":"","s9":"","s10":"","t1":"","b1":true,"b2":false,"b3":false,"b4":false,"b5":false,"b6":false,"i1":5487,"i2":1,"i3":15,"i4":0,"i5":0,"i6":0,"i7":0,"i8":0,"i9":0,"i10":0,"i11":0,"i12":0,"i13":0,"i14":0,"f1":19,"f2":0,"f3":0,"f4":0,"f5":0,"f6":0,"f7":0,"d1":"","d2":"","d3":"","d4":""},
    {"id":2,"cdate":"20190523115932","done":false,"stype":"WGR","ctype":1,"target":0,"c1":"St\u00fchle","c2":"stu","c3":"","c4":"","c5":"","c6":"","c7":"","c8":"","c9":"","c10":"","c11":"","c12":"","c13":"","c14":"","s1":"","s2":"","s3":"","s4":"","s5":"","s6":"","s7":"","s8":"","s9":"","s10":"","t1":"","b1":true,"b2":false,"b3":false,"b4":false,"b5":false,"b6":false,"i1":5438,"i2":1,"i3":15,"i4":0,"i5":0,"i6":0,"i7":0,"i8":0,"i9":0,"i10":0,"i11":0,"i12":0,"i13":0,"i14":0,"f1":19,"f2":0,"f3":0,"f4":0,"f5":0,"f6":0,"f7":0,"d1":"","d2":"","d3":"","d4":""},
    {"id":3,"cdate":"20190523115932","done":false,"stype":"GRD","ctype":1,"target":0,"c1":"Mitarbeiter Rabatt","c2":"P","c3":"Mitar.Rbt.","c4":"","c5":"","c6":"","c7":"","c8":"","c9":"","c10":"","c11":"","c12":"","c13":"","c14":"","s1":"","s2":"","s3":"","s4":"","s5":"","s6":"","s7":"","s8":"","s9":"","s10":"","t1":"","b1":false,"b2":false,"b3":false,"b4":false,"b5":false,"b6":false,"i1":120,"i2":0,"i3":0,"i4":0,"i5":0,"i6":0,"i7":0,"i8":0,"i9":0,"i10":0,"i11":0,"i12":0,"i13":0,"i14":0,"f1":10,"f2":20,"f3":0,"f4":0,"f5":0,"f6":0,"f7":0,"d1":"","d2":"","d3":"","d4":""}
]


Vertraulichkeitshinweis
Dieses Dokument und etwaige Anlagen können vertrauliche sowie der beruflichen Schweigepflicht unterliegende Informationen enthalten. Sollten Sie dieses Dokument irrtümlich erhalten haben, benachrichtigen Sie uns bitte durch eine Antwort-Mail und löschen Sie dieses Dokument nebst Anlagen von Ihrem System. Das unerlaubte Kopieren sowie die Weitergabe sind nicht gestattet. Vielen Dank!

Confidentiality note
This document, including any attachment, may contain confidential and privileged information. If you have received it by mistake, please notify us by reply e-mail and then delete this document and any attachment from your system. Any unauthorized copying, disclosure or distribution of the material in this document is strictly forbidden. Thank you.