Search invoice API Version 5.1
: Date: 2010-12-06 Sida 2 av 20 Revision history Version Date Comments 5.1 2010-12-06 Added information regarding e-service authentication including link to application form. 5.0 2008-03-14 New response values are returned when searching invoice, pallet balance and debit. Chapter 3.2, 4.2 and 5.2. 4.0 2007-07-09 Links and examples updated. 3.0 2007-04-20 Updated with new functionality for viewing and requesting pallet balance. Chapter 5 and 8. 2.0 2005-08-30 New mandatory variables when requesting debit. 1.0 2003-03-06 created.
: Date: 2010-12-06 Sida 3 av 20 TABLE OF CONTENTS REVISION HISTORY... 2 1 SEARCH INVOICE... 4 2 GENERAL VARIABLES... 5 2.1 Request... 5 2.2 Response... 5 2.3 System... 5 3 MESSAGE SEARCH INVOICE... 7 3.1 Request... 7 3.2 Response... 9 4 MESSAGE SEARCH DEBIT... 11 4.1 Request... 11 4.2 Response... 12 5 MESSAGE SEARCH PALLET BALANCE... 14 5.1 Request... 14 5.2 Response... 15 6 MESSAGE GET INVOICE IN PDF FORMAT... 17 6.1 Request... 17 6.2 Response... 17 7 MESSAGE GET DEBIT IN PDF FORMAT... 18 7.1 Request... 18 7.2 Response... 19 8 MESSAGE GET PALLET BALANCE IN PDF FORMAT... 20 8.1 Request... 20 8.2 Response... 20
: Date: 2010-12-06 Sida 4 av 20 1 Search invoice The service gives external customers the possibility to connect to Schenker s systems and always get accurate information. The interface supports six methods: Search invoice, search debit, search pallet balance, get invoice in pdf format, get debit in pdf format and get pallet balance in pdf format. The service can be invoked by httprequest using HQF (http Query at) and can be returned in two formats: XML and HQF. Examples of requests and responses can be found in this document. Figure 1 Flow chart of the service For further information of how Schenker s online services are built and should be invoked we recommend reading our separate introduction. URL to use: http://was.webtrp.com/invoice_docweb/webaron?
: Date: 2010-12-06 Sida 5 av 20 2 General variables The general variables are for administrating communication are mutual for all communication. The variables are: request, response and system. The variable data_list is an array with the message information which is specific per method. The title M symbolizes mandatory field. 2.1 Request Contains information to the service. The request can be done in six ways and the value of service.method determines what is returned. Add prefix request. to variables. service.action M String WDR Value select service.method M String WDR Value search_invoice, search_debit, search_pallet_balance, pdf_invoice, pdf_debit and pdf_pallet_balance user.password M String WDR User password user.login_name M String WDR User ID Admin.e_mail String WDR User e-mail address format.mime M String WDR Response format. Value text/xml or text/plain 2.2 Response Contains information from the service. Is found after prefix response. if using HQF or under <xml><response> if using XML. service.name M String WDR Name of the service service.version M String WDR Version number (5.0) data_list_count M Int WDR Number of items in the data_list 2.3 System Contains error code generated from the system. For HQF system.error.id=0 means OK. For XML <system><error><id>0</id></error></system> means OK. Also contains statistic variables to the system. Add prefix system.. error.id M Int WDR Errorcode error.message String WDR Error message statistics.remote.country_code M String WDR Countrycode for client, ex. se or us
: Date: 2010-12-06 Sida 6 av 20 statistics.remote.send_data_format M String WDR Clients way of sending the request, xml or hqf (Http Query at) statistics.remote.access_type M String WDR Clients request type, A (browser) statistics.remote.application_name M String WDR Clients page or module which sends the request statistics.user.return_mime_format M String WDR at of the answer to the client, text/plain, text/html eller text/xml statistics.user.organization_id M String WDR Clients VAT number or Organisation number. statistics.user.language_code M String WDR Language code for client, ex. sv_se
: Date: 2010-12-06 Sida 7 av 20 3 Message search invoice service.method = search_invoice Invoice can be requested in three ways: Invoice number (reference_type=iv) Waybill number (reference_type=sm) Date interval (reference_type=date) Depending on reference_type = iv or sm, reference_number should be invoice number or waybill number. If using reference_type = date, the variables start_date and end_date should be used. 3.1 Request Information being sent to the service. Add prefix data_list.0. to variable. reference_type M String RFF Value iv, sm och date iv = Invoice number (commercial_invoice_number) sm = Waybill number (shipment_reference_number) date = Date interval reference_number M String RFF See Reference type Mandatory if reference_type = iv or sm start_date M String DTM 2005-194 end_date M String DTM 2005-206 Period start date Mandatory if reference_type = date = Date/time/period format code, code 4 = CCYYMMDD, example: 20080731 Period end date Mandatory if reference_type = date = Date/time/period format code, code 4 = CCYYMMDD, example: 20080731 Example of requesting invoice via invoice number. Change the following to accurate values: <Client_VAT_number> <User_ID>
: Date: 2010-12-06 Sida 8 av 20 <User_password> <e_mail_address> <Invoice_number> http://was.webtrp.com/invoice_docweb/webaron?system.statistics.remote.country_code=se&sys tem.statistics.remote.send_data_format=hqf&system.statistics.remote.access_type=a&system.sta tistics.remote.application_name=test&system.statistics.user.organization_id=<client_vat_numb er>&system.statistics.user.language_code=sv&system.statistics.user.return_mime_format=xml&r equest.format.mime=text/xml&request.user.login_name=<user_id>&request.user.password=<us er_password>&request.admin.e_mail=<e_mail_address>&request.service.action=select&request. service.method=search_invoice&data_list.0.reference_type=iv&data_list.0.reference_number=<in voice_number> Example of requesting invoice via waybill number. Change the following to accurate values: <Client_VAT_number> <User_ID> <User_password> <e_mail_address> <Waybill_number> http://was.webtrp.com/invoice_docweb/webaron?system.statistics.remote.country_code=se&sys tem.statistics.remote.send_data_format=hqf&system.statistics.remote.access_type=a&system.sta tistics.remote.application_name=test&system.statistics.user.organization_id=<client_vat_numb er>&system.statistics.user.language_code=sv&system.statistics.user.return_mime_format=xml&r equest.format.mime=text/xml&request.user.login_name=<user_id>&request.user.password=<us er_password>&request.admin.e_mail=<e_mail_address>&request.service.action=select&request. service.method=search_invoice&data_list.0.reference_type=sm&data_list.0.reference_number=< Waybill_number> Example of requesting invoice via date interval. Change the following to accurate values: <Client_VAT_number> <User_ID> <User_password> <e_mail_address> <Customer_number> http://was.webtrp.com/invoice_docweb/webaron?system.statistics.remote.country_code=se&sys tem.statistics.remote.send_data_format=hqf&system.statistics.remote.access_type=a&system.sta tistics.remote.application_name=test&system.statistics.user.organization_id=<client _VAT_number>&system.statistics.user.language_code=sv&system.statistics.user.return_mime_fo rmat=xml&request.format.mime=text/xml&request.user.login_name=<user_id>&request.user.pas
: Date: 2010-12-06 Sida 9 av 20 sword=<user_password>&request.admin.e_mail=<e_mail_address>&request.service.action=sele ct&request.service.method=search_invoice&data_list.0.reference_type=date&data_list.0.start_dat e=2007-06-23&data_list.0.end_date=2007-06- 30&data_list.0.customer_number=<Customer_number> 3.2 Response Information returned from the service. Add prefix data_list.n. to variables, where n is an index starting at 0. invoice_total_monetary_amount String MOA 5025-86 commercial_invoice_number String RFF DE 5004 1153-IV DE 1154 invoice_date Date DTM 2005-2 customer_number String NAD DE 3039 office_number String NAD DE 3039 office_name String NAD DE 3036 Invoice amount Invoice number Date when invoice was issued Customer number Office number Office name invoice_product_number String RFF Product number 10=DKS 11=Adena Picko 13=DKS 16=DKS 30=Gods 32=Pall 33=Coldsped 34=Företagsbil 36=Parcel 39=Tankdata 40=Consulting 42=Logistics 900=Pallkreditering
: Date: 2010-12-06 Sida 10 av 20 Example of response in XML format: <?xml version="1.0" encoding="iso-8859-1"?> - <xml> - <response> <data_list_count>1</data_list_count> - <service> <name>invoicedoc</name> <version>1.0</version> </service> </response> - <system> - <error> <message>your request was successfully processed.</message> <id>0</id> </error> </system> - <data_list> - <data index="0"> <commercial_invoice_number>111111111</commercial_invoice_number> <invoice_total_monetary_amount>800.00</invoice_total_monetary_amount> <office_number>356</office_number> <customer_number>12345678</customer_number> <office_name>linköping</office_name> <invoice_date>2007-03-23</invoice_date> <invoice_product_number>30</invoice_product_number> </data> </data_list> </xml>
: Date: 2010-12-06 Sida 11 av 20 4 Message search debit service.method = search_debit Debit can be requested in two ways: Date intervall (reference_type=date) Invoice number (reference_type=iv). If using reference_type = date, the variables start_date and end_date should be used. If reference_type = iv, the variable reference_number should be used to specify invoice number. 4.1 Request Information being sent to the service. Add prefix data_list.0. to variable. reference_type M String RFF Value iv och date iv = Invoice number (commercial_invoice_number) date = Date interval reference_number M String RFF See Reference type Mandatory if reference_type = iv start_date M String DTM 2005-194 end_date M String DTM 2005-206 Period start date = Date/time/period format code, code 4 = CCYYMMDD, example: 20080731 Period end date = Date/time/period format code, code 4 = CCYYMMDD, example: 20080731 Example of requesting debit via date interval. Change the following to accurate values: <Client_VAT_number> <User_ID> <User_password> <e_mail_address> <Customer_number>
: Date: 2010-12-06 Sida 12 av 20 http://was.webtrp.com/invoice_docweb/webaron?system.statistics.remote.country_code=se&sys tem.statistics.remote.send_data_format=hqf&system.statistics.remote.access_type=a&system.sta tistics.remote.application_name=test&system.statistics.user.organization_id=<client_vat_numb er>&system.statistics.user.language_code=sv&system.statistics.user.return_mime_format=xml&r equest.format.mime=text/xml&request.user.login_name=<user_id>&request.user.password=<us er_password>&request.admin.e_mail=<e_mail_address>&request.service.action=select&request. service.method=search_debit&data_list.0.reference_type=date&data_list.0.start_date=2007-06- 23&data_list.0.end_date=2007-06-30&data_list.0.customer_number=<Customer_number> Example of requesting debit via invoice number. Change the following to accurate values: <Client_VAT_number> <User_ID> <User_password> <e_mail_address> <Invoice_number> http://was.webtrp.com/invoice_docweb/webaron?system.statistics.remote.country_code=se&sys tem.statistics.remote.send_data_format=hqf&system.statistics.remote.access_type=a&system.sta tistics.remote.application_name=test&system.statistics.user.organization_id=<client_vat_numb er>&system.statistics.user.language_code=sv&system.statistics.user.return_mime_format=xml&r equest.format.mime=text/xml&request.user.login_name=<user_id>&request.user.password=<us er_password>&request.admin.e_mail=<e_mail_address>&request.service.action=select&request. service.method=search_debit&data_list.0.reference_type=iv&data_list.0.reference_number=<invo ice_number> 4.2 Response Information returned from the service. Add prefix data_list.n. to variables, where n is an index starting at 0. customer_number String NAD DE 3039 office_number String NAD DE 3039 office_name String NAD commercial_invoice_number String RFF DE 3036 1153-IV DE 1154 accounting_period_start_date M String DTM 2005-155 Customer number Office number Office name Invoice number Accounting period start date = Date/time/period format code, code 4 = CCYYMMDD,
: Date: 2010-12-06 Sida 13 av 20 charge_amount String TCC 5025-23 DE 5004 debit_date Date DTM debit_id String 2005-137 example: 20080731 Charge amount Date when debit was issued. Example of response in XML format: <?xml version="1.0" encoding="iso-8859-1"?> - <xml> - <system> - <error> <id>0</id> <message>your request was successfully processed.</message> </error> </system> - <response> <data_list_count>2</data_list_count> - <service> <version>1.0</version> <name>invoicedoc</name> </service> </response> - <data_list> - <data index="1"> <charge_amount>883</charge_amount> <office_name>örebro</office_name> <debit_date>070322</debit_date> <office_number>422</office_number> <debit_id>428447</debit_id> <commercial_invoice_number>111111111</commercial_invoice_number> <customer_number>12345678</customer_number> <accounting_period_start_date>070323</accounting_period_start_date> </data> - <data index="0"> <charge_amount>495</charge_amount> <debit_id>427103</debit_id> <debit_date>070320</debit_date> <office_number>422</office_number> <accounting_period_start_date>070323</accounting_period_start_date> <customer_number>12345678</customer_number> <commercial_invoice_number>111111111</commercial_invoice_number> <office_name>örebro</office_name> </data> </data_list> </xml>
: Date: 2010-12-06 Sida 14 av 20 5 Message search pallet balance service.method = search_pallet_balance Pallet balance can be requested in two ways: Date interval (reference_type=date) Invoice number (reference_type=iv). If using reference_type = date, the variables start_date and end_date should be used. If reference_type = iv, the variable reference_number should be used to specify invoice number. 5.1 Request Information being sent to the service. Add prefix data_list.0. to variable. reference_type M String RFF Value iv och date iv = Invoice number (commercial_invoice_number) date = Date interval reference_number M String RFF See Reference type Mandatory if reference_type = iv start_date M String DTM 2005-194 end_date M String DTM 2005-206 Period start date = Date/time/period format code, code 4 = CCYYMMDD, example: 20080731 Period end date = Date/time/period format code, code 4 = CCYYMMDD, example: 20080731 Example of requesting pallet balance via date interval. Change the following to accurate values: <Client_VAT_number> <User_ID> <User_password> <e_mail_address> <Customer_number>
: Date: 2010-12-06 Sida 15 av 20 http://was.webtrp.com/invoice_docweb/webaron?system.statistics.remote.country_code=se&sys tem.statistics.remote.send_data_format=hqf&system.statistics.remote.access_type=a&system.sta tistics.remote.application_name=test&system.statistics.user.organization_id=<client_vat_numb er>&system.statistics.user.language_code=sv&system.statistics.user.return_mime_format=xml&r equest.format.mime=text/xml&request.user.login_name=<user_id>&request.user.password=<us er_password>&request.admin.e_mail=<e_mail_address>&request.service.action=select&request. service.method=search_pallet_balance&data_list.0.reference_type=date&data_list.0.start_date=2 007-06-23&data_list.0.end_date=2007-06- 30&data_list.0.customer_number=<Customer_number> Example of requesting pallet balance via invoice number. Change the following to accurate values: <Client_VAT_number> <User_ID> <User_password> <e_mail_address> <Invoice_number> http://was.webtrp.com/invoice_docweb/webaron?system.statistics.remote.country_code=se&sys tem.statistics.remote.send_data_format=hqf&system.statistics.remote.access_type=a&system.sta tistics.remote.application_name=test&system.statistics.user.organization_id=<client_vat_numb er>&system.statistics.user.language_code=sv&system.statistics.user.return_mime_format=xml&r equest.format.mime=text/xml&request.user.login_name=<user_id>&request.user.password=<us er_password>&request.admin.e_mail=<e_mail_address>&request.service.action=select&request. service.method=search_pallet_balance&data_list.0.reference_type=iv&data_list.0.reference_num ber=<invoice_number> 5.2 Response Information returned from the service. Add prefix data_list.n. to variables, where n is an index starting at 0. customer_number String NAD DE 3039 office_name String NAD commercial_invoice_number String RFF DE 3036 1153-IV DE 1154 pallet_balance_date String DTM 2005-137 Customer number Office number Invoice number Date when pallet balance is issued. pallet_balance_identification String FTX Pallet balance number pallet_balance_count CMT Balance (pallet count)
: Date: 2010-12-06 Sida 16 av 20 Example of response in XML format: <?xml version="1.0" encoding="iso-8859-1"?> - <xml> - <response> <data_list_count>2</data_list_count> - <service> <name>invoicedoc</name> <version>1.0</version> </service> </response> - <system> - <error> <message>your request was successfully processed.</message> <id>0</id> </error> </system> - <data_list> - <data index="1"> <pallet_balance>oss tillgodo 264</pallet_balance> <commercial_invoice_number>123456789</commercial_invoice_number> <office_name>stockholm</office_name> <pallet_balance_date>2007-03-31</pallet_balance_date> <customer_number>12345678</customer_number> <pallet_balance_identification>1234567</pallet_balance_identification> </data> - <data index="0"> <commercial_invoice_number>123456789</commercial_invoice_number> <pallet_balance_date>2007-03-15</pallet_balance_date> <pallet_balance>oss tillgodo 210</pallet_balance> <customer_number>12345678</customer_number> <office_name>stockholm</office_name> <pallet_balance_identification>1234567</pallet_balance_identification> </data> </data_list> </xml>
: Date: 2010-12-06 Sida 17 av 20 6 Message get invoice in pdf format service.method = pdf_invoice 6.1 Request Information being sent to the service. Add prefix data_list.0. to variable. customer_number M String NAD commercial_invoice_number M String RFF DE 3039 1153-IV DE 1154 invoice_date M String DTM 2005-2 Customer number Invoice number Date when invoice is issued Example of requesting pdf-invoice. Change the following to accurate values: <Client_VAT_number> <User_ID> <User_password> <e_mail_address> <Invoice_number> <Customer_number> http://was.webtrp.com/invoice_docweb/webaron?system.statistics.remote.country_code=se&sys tem.statistics.remote.send_data_format=hqf&system.statistics.remote.access_type=a&system.sta tistics.remote.application_name=test&system.statistics.user.organization_id=<client_vat_numb er>&system.statistics.user.language_code=sv&system.statistics.user.return_mime_format=xml&r equest.format.mime=text/xml&request.user.login_name=<user_id>&request.user.password=<us er_password>&request.service.method=pdf_invoice&request.service.action=select&request.admi n.e_mail=<e_mail_address>&data_list.0.commercial_invoice_number=<invoice_number>&data_li st.0.invoice_date=2007-06-23&data_list.0.customer_number=<customer_number> 6.2 Response A pdf is returned if the search is successful. If not, the general variables will be returned instead.
: Date: 2010-12-06 Sida 18 av 20 7 Message get debit in pdf format service.method = pdf_debit 7.1 Request Information being sent to the service. Add prefix data_list.0. to variable. customer_number M String NAD DE 3039 office_name M String NAD DE 3036 accounting_period_start_date M String DTM 2005-155 debit_date M Date DTM 2005-137 invoice_total_monetary_amount M String MOA 5025-86 DE 5004 Customer number Office name Accounting period start date = Date/time/period format code, code 4 = CCYYMMDD, example: 20080731 Date when debit is issued. Balance amount Example of requesting pdf-debit. Change the following to accurate values: <Client_VAT_number> <User_ID> <User_password> <e_mail_address> <Customer_number> http://was.webtrp.com/invoice_docweb/webaron?system.statistics.remote.country_code=se&sys tem.statistics.remote.send_data_format=hqf&system.statistics.remote.access_type=a&system.sta tistics.remote.application_name=test&system.statistics.user.organization_id=<client_vat_numb er>&system.statistics.user.language_code=sv&system.statistics.user.return_mime_format=xml&r equest.format.mime=text/xml&request.user.login_name=<user_id>&request.user.password=<us er_password>&request.service.method=pdf_debit&request.service.action=select&request.admin. e_mail=<e_mail_address>&data_list.0.debit_date=2007-06- 23&data_list.0.accounting_period_start_date=2007-06- 23&data_list.0.office_name=NYBRO&data_list.0.invoice_total_monetary_amount=12.816&data_li st.0.customer_number=<customer_number>
: Date: 2010-12-06 Sida 19 av 20 7.2 Response A pdf is returned if the search is successful. If not, the general variables will be returned instead.
: Date: 2010-12-06 Sida 20 av 20 8 Message get pallet balance in pdf format service.method = pdf_pallet_balance 8.1 Request Information being sent to the service. Add prefix data_list.0. to variable. customer_number String NAD DE 3039 pallet_balance_date String DTM 2005-137 Customer number Date when pallet balance is issued. pallet_balance_identification String FTX Pallet balance number Example of requesting pdf-pallet-balance. Change the following to accurate values: <Client_VAT_number> <User_ID> <User_password> <e_mail_address> <Pallet_balance_number> <Customer_number> http://was.webtrp.com/invoice_docweb/webaron?system.statistics.remote.country_code=se&sys tem.statistics.remote.send_data_format=hqf&system.statistics.remote.access_type=a&system.sta tistics.remote.application_name=test&system.statistics.user.organization_id=<client_vat_numb er>&system.statistics.user.language_code=sv&system.statistics.user.return_mime_format=xml&r equest.format.mime=text/xml&request.user.login_name=<user_id>&request.user.password=<us er_password>&request.service.method=pdf_pallet_balance&request.service.action=select&reque st.admin.e_mail=<e_mail_address>&data_list.0.pallet_balance_identification=<pallet_balance_nu mber>&data_list.0.pallet_balance_date=2007-03- 31&data_list.0.customer_number=<Customer_number> 8.2 Response A pdf is returned if the search is successful. If not, the general variables will be returned instead.