getOrders(JSON)
Function: getOrders | |
Description: use filter: Examples: array('status=16','date_purchased >= YYYY-mm-dd HH:MM:SS' | |
Request | |
user | xsd:string |
pass | xsd:string |
filter | tns:arrayOfString |
start | xsd:string |
blocksize | xsd:string |
extNumberRangeCustomerId | xsd:int |
extNumberRangeDeliveryAdr | xsd:int |
indivFieldsList | tns:indivFieldsList |
{ "function":"getOrders", "paras":{ "user":"", "pass":"", "filter":["status=16"], "start":"", "blocksize":"", "extNumberRangeCustomerId":0, "extNumberRangeDeliveryAdr":0, }} | |
Response | |
result | tns:ordersList |
message | xsd:string |
{ "result":[{ "orders_id":0, "customers_id":0, "customers_cid":"", "customers_external_id":"", "customers_vat_id":"", "customers_status":0, "customers_status_show_price_tax":0, "customers_status_add_tax_ot":0, "customers_email_address":"", "delivery_gender":"", "delivery_phone":"", "delivery_fax":"", "delivery_firstname":"", "delivery_lastname":"", "delivery_company":"", "delivery_company_2":"", "delivery_company_3":"", "delivery_street_address":"", "delivery_suburb":"", "delivery_city":"", "delivery_postcode":"", "delivery_zone":"", "delivery_zone_code":"", "delivery_country":"", "delivery_country_code":"", "billing_gender":"", "billing_phone":"", "billing_fax":"", "billing_firstname":"", "billing_lastname":"", "billing_company":"", "billing_company_2":"", "billing_company_3":"", "billing_street_address":"", "billing_suburb":"", "billing_city":"", "billing_postcode":"", "billing_zone":"", "billing_zone_code":"", "billing_country":"", "billing_country_code":"", "payment_code":"", "subpayment_code":"", "shipping_code":"", "currency_code":"", "currency_value":0, "language_code":"", "comments":"", "last_modified":"0001-01-01T00:00:00", "order_date":"0001-01-01T00:00:00", "orders_status":0, "account_type":0, "allow_tax":0, "tax_included":0, "tax_free":0, "customers_ip":"", "shop_id":0, "orders_data":"", "campaign_id":0, "count_items":0, "orders_total":[{ "orders_total_id":0, "orders_total_key":"", "orders_total_model":"", "orders_total_name":"", "orders_total_price":0, "orders_total_tax":0, "orders_total_tax_class":0, "orders_total_quantity":0, "allow_tax":0, "info_code":"" } ], "customer_data":{ "address_id":0, "firstname":"", "dob":"0001-01-01T00:00:00", "name":"", "street":"", "gender":"", "email":"", "city":"", "suburb":"", "password":"", "company":"", "company_2":"", "company_3":"", "country":"", "country_code":"", "phone":"", "zip":"", "customers_cid":"", "vat_id":"", "group":0, "banktransfer_owner":"", "banktransfer_blz":"", "banktransfer_bank_name":"", "banktransfer_number":"", "banktransfer_iban":"", "banktransfer_bic":"", "packstation_post":"", "packstation_nr":"" }, "delivery_data":{ "address_id":0, "firstname":"", "dob":"0001-01-01T00:00:00", "name":"", "street":"", "gender":"", "email":"", "city":"", "suburb":"", "password":"", "company":"", "company_2":"", "company_3":"", "country":"", "country_code":"", "phone":"", "zip":"", "customers_cid":"", "vat_id":"", "group":0, "banktransfer_owner":"", "banktransfer_blz":"", "banktransfer_bank_name":"", "banktransfer_number":"", "banktransfer_iban":"", "banktransfer_bic":"", "packstation_post":"", "packstation_nr":"" }, "payment_data":{ "cost":0, "id":0, "type":"", "tax":0 }, "shipping_data":{ "cost":0, "id":0, "type":"", "tax":0 }, "items":[{ "products_id":0, "products_model":"", "external_id":"", "price_sum":0, "name":"", "item_data":"", "options_full":[{ "option_group_id":0, "option_group_field":"", "option_group_name":"", "option_group_desc":"", "option_value_id":"", "option_value_parent":"", "option_value_image":"", "option_value_field":"", "option_value_default_model":"", "option_value_default_price":"", "option_value_default_p_prefix":"", "option_value_default_weight":"", "option_value_default_w_prefix":"", "option_value_name":"", "option_value_value":"", "option_value_desc":"", "pto_id":"", "option_model":"", "option_price":0, "option_p_prefix":"", "option_weight":0, "option_w_prefix":"", "option_calc_type":"", "option_count":"" } ], "quantity":0, "tax":0, "tax_class":0, "weight":0, "price":0, "price_otax":0, "applied_discount_percent":0, "original_price":0 } ], "total_tax":[{ "value":0, "tax_rate":"", "value_formated":"" } ], "total_price_formated":"", "total_price":0 } ], "message":"" } |
Brutto/Netto Flags
Die Variablen tax_free und allow_tax geben Information über den Typ der Bestellung
Brutto Bestellung B2C Bestellung innerhalb EU (z.b. Firmensitz DE, Privatkunde aus DE)
allow_tax = 1
tax_free = -1
Brutto Bestellung B2B innerhalb EU (z.b. Firmensitz DE, Kunde aus DE mit ausgefülltem Firmennamen)
allow_tax = 1
tax_free = 0
Netto Bestellung B2B innerhalb EU (z.b. Firmensitz DE, Kunde aus AT mit ausgefüllter USt-ID)
allow_tax = 0
tax_free = 1
Netto Bestellung B2B außerhalb EU (z.b. Firmensitz DE, Kunde aus CH)
allow_tax = 1
tax_free = -1
Hinweis: Der Parameter allow_tax gibt eine Information ob die normale Steuerklasse für diese Bestellung ignoriert wird - so ist z.B. für den Fall CH allow_tax = 1 obwohl die Bestellung im normalfall Netto ist, da hier im Shopsystem für NON EU eine Steuerklasse mit 0% definiert ist, da der Shopbetreiber hier je nach Lieferschwelle oder Unternehmenstruktur natürlich auch einen Steuersatz definieren könnte.
Im Beispiel B2B DE→ Firma AT wird allow_tax = 0 gesetzt, damit wird angezeigt das die angelegte Steuerklasse hierfür ignoriert wird und der Beleg ohne USt ist.
Beispiel einer Abfrage mit Filter für 2 Bestellstatus
{ "function": "getOrders", "paras": { "user": "{{api_user}}", "pass": "{{api_password}}", "filter":["orders_status=71","orders_status=70"], "start": 0, "size": 50, "extNumberRange": 0 } }