Wiki

Clone wiki

OCAPI / testplan / nl_testplan_order_ophalen

Ophalen orders

OCAPI controller

orderController

Interne componenten dge

  • Proc: gp30OCWebshopGetOrders(), gp30WebshopSetOrderStatus()
  • DB: webshopbestelling, webshopbestellingregels

Testprocedure

Webshop

  • Maak een nieuwe order aan in de webshop.

dgeDetailhandel/dgeGroothandel

  • Activeer met de sneltoets CTRL-ALT-D de OCAPI log. Zie Testplan.
  • Kies voor de menu-optie "Backorder" - "Backorder"
  • Klik rechts bovenaan op de knop "Elektronische orders inlezen"

dge_order_ophalen.png

Communicatie

orderoverzicht

GET

URL: /order.xml?start=<start>&limit=<limit>&nocache=<timestamp>

GET https://odemo.dgewebshopsystem.nl/ocapi/order.xml?start=0&limit=100&nocache=2016090814260385
Log: /logs/ocapi/*OCAPI_orders_request_*.log

RESPONS HTTP STATUSCODE 200

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <order>
    <order_id>17</order_id>
    <payment_method>Overschrijving</payment_method>
    <payment_code>bank_transfer</payment_code>
    <customer>Pietje Puk</customer>
    <order_status_id>17</order_status_id>
    <total>7.3500</total>
    <currency_code>EUR</currency_code>
    <currency_value>1.00000000</currency_value>
    <date_added>2016-09-08 14:25:53</date_added>
    <date_modified>2016-09-08 14:25:54</date_modified>
    <status>paid</status>
  </order>
</response>

Log: /logs/ocapi/*OCAPI_orders_request_response_*.log

RESPONS HTTP STATUSCODE 404

Een HTTP statuscode 404 geeft aan dat er geen gegevens zijn voor de gevraagde selectie.

Log: /logs/ocapi/*OCAPI_orders_request_response_*.log

orderdetails

GET

URL: /order/<id>.xml

GET https://odemo.dgewebshopsystem.nl/ocapi/order/17.xml
Log: /logs/ocapi/*OCAPI_order_request_*.log

RESPONS HTTP STATUSCODE 200

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <order>
    <order_id>17</order_id>
    <invoice_no>0</invoice_no>
    <invoice_prefix>INV-2013-00</invoice_prefix>
    <store_id>0</store_id>
    <store_name>Demo webshop</store_name>
    <store_url>http://odemo.dgewebshopsystem.nl/</store_url>
    <customer_id>0</customer_id>
    <customer></customer>
    <customer_group_id>4</customer_group_id>
    <firstname>Pietje</firstname>
    <lastname>Puk</lastname>
    <email>pietje11@puk.nl</email>
    <telephone>0111-418000</telephone>
    <fax></fax>
    <custom_field/>
    <payment_firstname>Pietje</payment_firstname>
    <payment_lastname>Puk</payment_lastname>
    <payment_company>data group europe bv</payment_company>
    <payment_address_1>De Weel 12</payment_address_1>
    <payment_address_2></payment_address_2>
    <payment_postcode>4306 NW</payment_postcode>
    <payment_city>Nieuwerkerk</payment_city>
    <payment_zone_id>2339</payment_zone_id>
    <payment_zone>Zeeland</payment_zone>
    <payment_zone_code>ZE</payment_zone_code>
    <payment_country_id>150</payment_country_id>
    <payment_country>Netherlands</payment_country>
    <payment_iso_code_2>NL</payment_iso_code_2>
    <payment_iso_code_3>NLD</payment_iso_code_3>
    <payment_address_format></payment_address_format>
    <payment_custom_field/>
    <payment_method>Overschrijving</payment_method>
    <payment_code>bank_transfer</payment_code>
    <shipping_firstname>Pietje</shipping_firstname>
    <shipping_lastname>Puk</shipping_lastname>
    <shipping_company>data group europe bv</shipping_company>
    <shipping_address_1>De Weel 12</shipping_address_1>
    <shipping_address_2></shipping_address_2>
    <shipping_postcode>4306 NW</shipping_postcode>
    <shipping_city>Nieuwerkerk</shipping_city>
    <shipping_zone_id>2339</shipping_zone_id>
    <shipping_zone>Zeeland</shipping_zone>
    <shipping_zone_code>ZE</shipping_zone_code>
    <shipping_country_id>150</shipping_country_id>
    <shipping_country>Netherlands</shipping_country>
    <shipping_iso_code_2>NL</shipping_iso_code_2>
    <shipping_iso_code_3>NLD</shipping_iso_code_3>
    <shipping_address_format></shipping_address_format>
    <shipping_custom_field/>
    <shipping_method>Afhalen in de winkel</shipping_method>
    <shipping_code>pickup.pickup</shipping_code>
    <comment></comment>
    <total>7.3500</total>
    <reward>0</reward>
    <order_status_id>17</order_status_id>
    <affiliate_id>0</affiliate_id>
    <affiliate_firstname></affiliate_firstname>
    <affiliate_lastname></affiliate_lastname>
    <commission>0.0000</commission>
    <language_id>2</language_id>
    <language_code>nl</language_code>
    <language_directory>dutch</language_directory>
    <currency_id>3</currency_id>
    <currency_code>EUR</currency_code>
    <currency_value>1.00000000</currency_value>
    <ip>82.176.103.161</ip>
    <forwarded_ip></forwarded_ip>
    <user_agent>Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.117 Safari/537.36 Vivaldi/1.3.551.38</user_agent>
    <accept_language>nl-NL,nl;q=0.8,en-US;q=0.6,en;q=0.4</accept_language>
    <date_added>2016-09-08 14:25:53</date_added>
    <date_modified>2016-09-08 14:25:54</date_modified>
    <order_products>
      <order_product_id>20</order_product_id>
      <order_id>17</order_id>
      <product_id>9811</product_id>
      <name>Schimmelvreter 500ml foam &amp; spray bison vochtvreter</name>
      <model>937662</model>
      <quantity>1</quantity>
      <price>6.0744</price>
      <total>6.0744</total>
      <tax>1.2756</tax>
      <reward>0</reward>
      <order_options/>
    </order_products>
    <order_vouchers/>
    <order_totals>
      <order_total_id>65</order_total_id>
      <order_id>17</order_id>
      <code>sub_total</code>
      <title>Subtotaal</title>
      <value>6.0744</value>
      <sort_order>1</sort_order>
    </order_totals>
    <order_totals>
      <order_total_id>66</order_total_id>
      <order_id>17</order_id>
      <code>shipping</code>
      <title>Afhalen in de winkel</title>
      <value>0.0000</value>
      <sort_order>3</sort_order>
    </order_totals>
    <order_totals>
      <order_total_id>67</order_total_id>
      <order_id>17</order_id>
      <code>tax</code>
      <title>BTW hoog</title>
      <value>1.2756</value>
      <sort_order>5</sort_order>
    </order_totals>
    <order_totals>
      <order_total_id>68</order_total_id>
      <order_id>17</order_id>
      <code>total</code>
      <title>Totaal</title>
      <value>7.3500</value>
      <sort_order>9</sort_order>
    </order_totals>
    <order_histories>
      <date_added>2016-09-08 14:25:54</date_added>
      <status>Betaald</status>
      <comment>Instructies tbv. betaling via Overschrijving.U krijgt na het plaatsen van de bestelling geen factuur. Deze wordt achteraf als verzamelfactuur thuis gestuurd. Deze betaalmethode kan alleen gebruikt worden als u als rekening klant in ons systeem staat. Neem voor vragen contact met ons op.Uw bestelling wordt pas verzonden nadat uw betaling door ons ontvangen is.</comment>
      <notify>1</notify>
    </order_histories>
    <status>paid</status>
  </order>
</response>

Log: /logs/ocapi/*OCAPI_order_request_response_*.log

terugkoppelen orderstatus

POST

URL: /order/status/<id>.xml

POST https://odemo.dgewebshopsystem.nl/ocapi/order/status/17.xml

<?xml version="1.0" encoding="UTF-8"?>
<order>
  <order_status>processing</order_status>
  <notify>0</notify>
  <comment>Ingelezen in dge</comment>
</order>
Log: /logs/ocapi/*OCAPI_order_upsert_*.log

RESPONS HTTP STATUSCODE 200

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <order/>
</response>

Log: /logs/ocapi/*OCAPI_order_upsert_response_*.log

index

Updated