Académique Documents
Professionnel Documents
Culture Documents
ApplicationProgrammingInterface
version21.05.2013
Changelog
Authentication
ApiReference
Manufacturers
GetAll
GetInfo
ProductCategories
GetAll
GetInfo
Products
GetAll
GetInfo
GetStock
Fullproductfeed
Addresses
GetAll
GetInfo
Addaddress
Updateaddress
Deleteaddress
Orders
Orderstatuses
GetAll
GetInfo
Add
Update
Delete
Invoices
GetUnpaidInvoices
GetInfo
Exchangerates
PaymentOptions
GetAll
GetInfo
Payments
GetAll
GetInfo
TransportOptions
GetAll
GetInfo
DiscountRules
GetAll
Changelog
21.05.2013Addedproductwarrantyfield
18.04.2013Addeddiscountrulesmethods
16.04.2013Addedfilterbystatusforthemethodthatgetsallorders
26.02.2013Addedtotal_price_rontotheordersmethods
25.01.2013Addedproduct_category_nametotheproductsmethods
22.01.2013Addedinfoabouttransportmethod
Authentication
InordertousetheAPIyouneedantheAPIyouneedanAPIUSERandanAPIKEY
EachresourcecanhandleoneormoreofthefollowingHTTPmethods:GET,PUT,
DELETE,POST.
ThereareseveralrequiredHTTPheaders:
Dateforexample:Wed,01Feb200812:00:00+0000
XNodWSUserforexample:zitec
XNodWSAcceptitcantake2values:xmlorjson
XNodWSAuthforexample:90a6d325e982f764f86a7e248edf6a660d4ee833
ThevalueofXVWSAuthheaderisusedforauthenticationoftherequest.Seebelow
thewaythisheaderisconstructed:
step1:signature_string=concatenatestrings(HTTPverb,QueryString,XNodWSUser
headervalue,Dateheadervalue)
step2:XNodWSAuthheadervalue=HMACSHA1(APIKEY,signature_string)
TheHMACSHA1algorithmisexplainedindetailherehttp://en.wikipedia.org/wiki/
HMAC#Implementation
Possibleauthenticationerrors
AuthHeaderMissingthismeansthattheXVWSAuthheaderwasnotdetected
inyourrequest
AuthTimeDifferencethismeansthatthetimedifferencebetweentherequest
timeandourservertimeisgreaterthanallowedtime.Pleasereadtheimportant
notebelow.
ClientHeaderMissingthismeansthattheXVWSClientheaderwasnot
detectedinyourrequest
DateHeaderMissingthismeansthattheXVWSDateheaderwasnotdetected
inyourrequest
InvalidClientthesuppliedAPIUSERisnotregisteredwithoursystem
InvalidSignaturethesuppliedsignatureinXVWSAuthheaderiswrong.Possible
reasonsare:thesignature_stringwasnotproperlycomputed,theHMACalgorithmwas
notproperlycalculated,theAPIKEYiswrongornotvalid
Important:becausethesignaturestringreliesonatimestampitisveryimportanttohaveyour
server/systemtimesynchronizedwithaNTPserver.
Thewebserviceallows60secondstimedifferencesbetweentherequestdateand
serverdate
ApiReference
Thefollowingterminologywillbeusedalongthedocumentation:
SampleRequestindicatesasampleHTTPrequestsenttowebservice
SampleResponseindicatesasampleHTTPresponsereturnedbythewebservice
Exceptionthepossibleerrorsthatthespecificmethodcanreturn
CurrentlythewebservicesuportsXMLandJSON.
Manufacturers
GetAll
Notes:
returnsalistofmanufacturers
methodsignatureGET/manufacturers/
Parameters:
?order_by={order_column}[optional]sortresultsbycolumndefaultisaddeddatedesc
?order_direction=asc|desc[optional]defaultvalueisasc
Samplerequest
GET/manufacturers/?order_by=name&order_direction=descHTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<manufacturers>
...
<manufacturer>
<id>6a81681a7af700c6385d36577ebec359</id>
<name>Printronix</name>
<added>2012020610:37:12.127</added>
</manufacturer>
<manufacturer>
<id>f50a6c02a3fc5a3a5d4d9391f05f3efc</id>
<name>MaxCube</name>
<added>2012020610:37:12.127</added>
</manufacturer>
...
</manufacturers>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
GetInfo
Notes:
returnsmanufacturerbyid
methodsignatureGET/manufacturers/{manufacturer_id}
Samplerequest
GET/manufacturers/f50a6c02a3fc5a3a5d4d9391f05f3efcHTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<manufacturer>
<id>f50a6c02a3fc5a3a5d4d9391f05f3efc</id>
<name>MaxCube</name>
<added>2012020610:37:12.127</added>
</manufacturer>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
404NotFoundManufactureridnotfound
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
ProductCategories
GetAll
Notes:
returnsalistofproductcategories
methodsignatureGET/productcategories/
Parameters:
?order_by={order_column}[optional]sortresultsbycolumndefaultisaddeddatedesc
?order_direction=asc|desc[optional]defaultvalueisasc
Samplerequest
GET/productcategories/HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<product_categories>
<product_category>
<id>218a0aefd1d1a4be65601cc6ddc1520e</id>
<name>ExtensieGarantie</name>
<added>2012020610:37:12.127</added>
</product_category>
<product_category>
<id>26337353b7962f533d78c762373b3318</id>
<name>Office</name>
<added>2012020610:37:12.127</added>
</product_category>
</product_categories>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
GetInfo
Notes:
returnsproductcategoryinfobyid
methodsignatureGET/product_categories/{category_id}
Samplerequest
GET/productcategories/218a0aefd1d1a4be65601cc6ddc1520eHTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<product_category>
<id>218a0aefd1d1a4be65601cc6ddc1520e</id>
<name>ExtensieGarantie</name>
<added>2012020610:37:12.127</added>
</product_category>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
404NotFoundCategoryidnotfound
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
Products
GetAll
Notes:
returnsalistofproducts
themethoditspaginated,so25itemsarereturnedperpage
methodsignatureGET/products/
Parameters:
?search={searchterm}[optional]willsearchbyproductnameandproductcode
?product_category={productcategoryid}[optional]willfiltertheproductsbycategory
?manufacturer={manufacturerid}[optional]willfiltertheproductsbymanufacturer
?only_available=1|0[optional]willreturnonlyproductswithstock_valuegreaterthan0whenset
to1
?order_by={order_column}sortresultsbythiscolumndefaultisaddeddatedesc
?order_direction=asc|desc[optional]defaultvalueisasc
?page=2thiscanapplyforalloftheabove
thefilterscanbecombined
Samplerequest
GET/products/?product_category=123&page=2HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<result>
<current_page>2</current_page>
<total_pages>10</total_pages>
<records_per_page>25</records_per_page>
<products>
...
<product>
<id>ae586136fed585b47ccc2bc26537230e</id>
<name>WNDWindDUO2300</name>
<code>205003</code>
<description/>
<warranty>12</warranty>
<product_category>248e844336797ec98478f85e7626de4a</product_category>
<product_category_name>SOFTWARE</product_category_name>
<manufacturer_id>2451041557a22145b3701b0184109cab</manufacturer_id>
<manufacturer_name>WND
</manufacturer_name>
<stock_value>10</stock_value>
<suplier_stock_value>5</suplier_stock_value>
<supplier_stock_delivery_date>20120430</supplier_stock_delivery_dat
e>
<reserved_stock_value>5</reserved_stock_value>
<availability_days/>
<price>7336.54</price>
<catalog_price>7336.54</catalog_price>
<green_stamp_value>20.00</green_stamp_value>
<currency>LEI</currency>
</product>
...
</products>
</result>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
GetInfo
Notes:
returnsproductinfobyid
methodsignatureGET/products/{product_id}
Samplerequest
GET/products/123HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<product>
<id>ae586136fed585b47ccc2bc26537230e</id>
<name>WNDWindDUO2300</name>
<code>205003</code>
<description/>
<warranty>12</warranty>
<product_category>248e844336797ec98478f85e7626de4a</product_category>
<product_category_name>SOFTWARE</product_category_name>
<manufacturer_id>2451041557a22145b3701b0184109cab</manufacturer_id>
<manufacturer_name>WND</manufacturer_name>
<stock_value>10</stock_value>
<suplier_stock_value>5</suplier_stock_value>
<supplier_stock_delivery_date>20120430</supplier_stock_delivery_dat
e>
<reserved_stock_value>5</reserved_stock_value>
<availability_days/>
<price>7336.54</price>
<catalog_price>7336.54</catalog_price>
<green_stamp_value>20.00</green_stamp_value>
<currency>LEI</currency>
</product>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
404NotFoundProductidnotfound
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
GetStock
Notes:
returnsproductstockbyid
methodsignatureGET/products/{product_id}/stock
returnsthestockinrealtime
Samplerequest
GET/products/123/stockHTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<product>
<id>ae586136fed585b47ccc2bc26537230e</id>
<stock_value>10</stock_value>
<suplier_stock_value>5</suplier_stock_value>
<supplier_stock_delivery_date>20120430</supplier_stock_delivery_dat
e>
<reserved_stock_value>5</reserved_stock_value>
<availability_days/>
</product>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
404NotFoundProductidnotfound
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
Fullproductfeed
Notes:
returnsalltheproductsforasinglereseller
youcanpassaGETparamcalledformatthatcantakeanyofthesevalues:xml,csvor
json.Defaultstojson.
methodsignatureGET/products/fullfeed/
Samplerequest
GET/products/fullfeedHTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:31035
Connection:close
ContentType:text/xml
<?xmlversion="1.0"encoding="UTF8"?>
<products>
<product>
<id>0502eb6095c03f62de8f5c62267be5b8</id>
<name>CAMERAFOTOCANONPSHOTA3200SILVERP/N:
AJ5039B002AA</name>
<code>AJ5039B002AA</code>
<description/>
<product_category>f976854e33532913dc598a1b3bba33e2</produc
t_category>
<product_category_name>FOTOVIDEO</product_category_name>
<manufacturer_id>54c90b077ccfc2a2b91f1334febdbe37</manufac
turer_id>
<manufacturer_name>CANON</manufacturer_name>
<stock_value>11</stock_value>
<supplier_stock_value/>
<supplier_stock_delivery_date/>
<reserved_stock_value/>
<availability_days/>
<price>70.48</price>
<catalog_price>74.00</catalog_price>
<green_stamp_value>.84</green_stamp_value>
<currency>EUR</currency>
<discount>5.00</discount>
<added>2012082709:11:53.670</added>
<last_updated>2012112912:36:45.170</last_updated>
</product>
...
</products>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
404NotFoundthefeedisnotavailableintherequestedformat
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
Addresses
GetAll
Notes:
returnsalistofaddresses
methodsignatureGET/addresses/
Samplerequest
GET/addresses/HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<addresses>
<address>
<id>1</id>
<country>Romania</country>
<county>Sector3</county>
<locality>Bucharest</locality>
<street>IntrareaBinelui</street>
<number>9</number>
<building/>
<building_entance/>
<floor/>
<appartment/>
<address_type>SHIPPING</address_type>
<added>2012030210:57:18.027</added>
</address>
<address>
<id>7</id>
<country>Romania</country>
<county>Sector3</county>
<locality>Bucuresti</locality>
<street>Textilistilor</street>
<number>1</number>
<building/><building_entance/><floor/><appartment/>
<address_type>SHIPPING</address_type>
<added>2012030210:57:18.027</added>
</address>
</addresses>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
GetInfo
Notes:
returnsaddressdetails
methodsignatureGET/addresses/{reseller_address_id}
Samplerequest
GET/addresses/1HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<address>
<id>1</id>
<country>Romania</country>
<county>Sector3</county>
<locality>Bucharest</locality>
<street>IntrareaBinelui</street>
<number>9</number>
<building/>
<building_entance/>
<floor/>
<appartment/>
<address_type>SHIPPING</address_type>
<added>2012030210:57:18.027</added>
</address>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
404NotFoundAddressIdnotfound
Addaddress
Notes:
addsanewaddress
methodsignaturePOST/addresses/
requiredfields:country,county,locality,street,number,address_type
address_typecanhavethefollowingvalues:OFFICE,
,SHIPPING
onsuccesstheapiwillreturntheidofthecreatedentity
Samplerequest
POST/addresses/HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
country=Romania&county=Sector3&locality=Bucharest&street=1Decembrie
1918&number=2&address_type=SHIPPING
Sampleresponse:
HTTP/1.1201Created
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
Connection:close
<id>5e982f764f86a7e248edf6a66</id>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
400BadRequestInvalidormissingfiels
Updateaddress
Notes:
updatesanaddress
methodsignaturePOST/addresses/{reseller_address_id}
Samplerequest
POST/addresses/1HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
country=Romania&county=Sector4
Sampleresponse:
HTTP/1.1204NoContent
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
Connection:close
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
400BadRequestInvalidoremptyfield
404NotFoundAddressIdnotfound
Deleteaddress
Notes:
deletesanaddress
methodsignatureDELETE/addresses/{reseller_address_id}
Samplerequest
DELET/addresses/1HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1204NoContent
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
Connection:close
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
Orders
Orderstatuses
NOT_ACCEPTEDtheorderwasrejected.
Theordercanbedeletedbyaclientapplication.
STOCK_RESERVATIONtheorderwassenttoOptimusbycreatingaproforma
invoicewithaclearmarkingthatthisisnotafinalorder,justastockreservation.From
thisstate,anordersstatuscanbechangedtoPROCESSINGorBILLED.
Aclientapplication(likeWebshop)canrequesttheordersstatustobechanged
toPROCESSINGorBILLED.
IftheproformasDetaliifieldissettoanemptyvalueinOptimus,theorders
statusischangedtoPROCESSING.
IfaninvoiceisassignedtotheorderinOptimus,theordersstatusis
automaticallychangedtoBILLED.
Theordercanbedeletedbyaclientapplication.
PROCESSINGtheorderwasrecordedandaproformainvoicewascreatedinOptimus
forit.Fromthisstate,anordersstatuscanbechangedtoBILLED.
Aclientapplication(likeWebshop)canrequesttheordersstatustobechanged
toBILLED.
IfaninvoiceisassignedtotheorderinOptimus,theordersstatusis
automaticallychangedtoBILLED.
Theordercanbedeletedbyaclientapplication.
BILLEDtheorderhasatleastoneinvoiceassignedtoitinOptimus.Fromthisstate,an
ordersstatuscanbechangedtoeitherPROCESSINGorDELIVERED.
IftheinvoiceisdeletedfromOptimus,theordersstatusisrevertedto
PROCESSING.
Anorderinthisstatecannotbedeleted.
DELIVEREDtheorderwasfulfilled,withalltheitemsdelivered.
Anorderinthisstatecannotbedeleted.
StatediagramfortheSTOCKRESERVATIONstatus
(savetheimagetoyourcomputerforalegiblerepresentation)
GetAll
Notes:
returnsorderhistory
methodsignatureGET/orders/
Parameters:
?date_start={datestart}&date_end={dateend}dateformat:yyyyMMdd
?page={current_page}
?status={status_name}
?order_by={order_column}sortresultsbythiscolumndefaultisaddeddatedesc
?order_direction=asc|desc[optional]
Samplerequest
GET/orders/HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<result>
<current_page>1</current_page>
<total_pages>10</total_pages>
<records_per_page>50</records_per_page>
<orders>
...
<order>
<id>fec920c89ea2e69b01d2388f5ce07a04</id>
<status>BILLED</status>
<order_number>26</order_number>
<added>2012061912:04:15.360</added>
<total_value>64.26</total_value>
<vat_value>15.42</vat_value>
<total_value_with_vat>79.69</total_value_with_vat>
<delivery_addresses>
<delivery_address>
<id>9b39ed04ca62a600d864087a90ca2bfa</id>
</delivery_address>
</delivery_addresses>
<billing_addresses>
<billing_address>
<id>605b9ce228612998caac4bc8fe9770af</id>
</billing_address>
</billing_addresses>
<payment_option>
<id>7643392b6b569135294d7f3686f79e59</id>
<code>CASH</code>
</payment_option>
<transport_option>
<id>4739a1b3a11bd7eaee3f5cd295eebe12</id>
<code>COURIER</code>
</transport_option>
<products>
<product>
<id>4c303be02ee98122c122dd542b1b1241</id>
<code>M198</code>
<name>CARCASAATX450WM198MINISILVER/BLACK</name>
<quantity>1</quantity>
<unit_price>18.00</unit_price>
<currency>USD</currency>
<total_price>18.00</total_price>
<total_price_ron>57.6</total_price_ron>
<green_stamp_value>.00</green_stamp_value>
<total_green_stamp_value>.00</total_green_stamp_value
>
</product>
</products>
<invoices>
<invoice>
<id>80e4d8ca0dceb1708a1da3f4d721c6f1</id>
<invoice_series>TEMP</invoice_series>
<invoice_number>650</invoice_number>
<date_created>20120619</date_created>
<due_date>20120619</due_date>
<value>64.26</value>
<value_vat_included>79.68</value_vat_included>
</invoice>
</invoices>
</order>
...
</orders>
</result>
Sampleerrorresponse:
<error>
<code>dateFalseFormat</code>
<message>
date_start'201202131'doesnotfitthedateformat
'yyyyMMdd'
</message>
</error>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
400BadRequestInvalidparameters
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
GetInfo
Notes:
returnsorderdetailsbyid
methodsignatureGET/orders/{order_id}
Samplerequest
GET/orders/0aa1ea9a5a04b78d4581dd6d17742627HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<order>
<id>fec920c89ea2e69b01d2388f5ce07a04</id>
<status>BILLED</status>
<order_number>26</order_number>
<added>2012061912:04:15.360</added>
<total_value>64.26</total_value>
<vat_value>15.42</vat_value>
<total_value_with_vat>79.69</total_value_with_vat>
<delivery_addresses>
<delivery_address>
<id>9b39ed04ca62a600d864087a90ca2bfa</id>
</delivery_address>
</delivery_addresses>
<billing_addresses>
<billing_address>
<id>605b9ce228612998caac4bc8fe9770af</id>
</billing_address>
</billing_addresses>
<payment_option>
<id>7643392b6b569135294d7f3686f79e59</id>
<code>CASH</code>
</payment_option>
<transport_option>
<id>4739a1b3a11bd7eaee3f5cd295eebe12</id>
<code>COURIER</code>
</transport_option>
<products>
<product>
<id>4c303be02ee98122c122dd542b1b1241</id>
<code>M198</code>
<name>CARCASAATX450WM198MINISILVER/BLACK</name>
<quantity>1</quantity>
<unit_price>18.00</unit_price>
<currency>USD</currency>
<total_price>18.00</total_price>
<total_price_ron>57.6</total_price_ron>
<green_stamp_value>.00</green_stamp_value>
<total_green_stamp_value>.00</total_green_stamp_value>
</product>
</products>
<invoices>
<invoice>
<id>80e4d8ca0dceb1708a1da3f4d721c6f1</id>
<invoice_series>TEMP</invoice_series>
<invoice_number>650</invoice_number>
<date_created>20120619</date_created>
<due_date>20120619</due_date>
<value>64.26</value>
<value_vat_included>79.68</value_vat_included>
</invoice>
</invoices>
</order>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
404NotFoundOrdernotfound
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
Add
Notes:
addsaneworder
methodsignaturePOST/orders/
Parameters
delivery_address[required]validdeliveryaddressid
payment_option[requred]validpaymentoptionid
transport_option[required]validtransportoptionid
all_or_noneoptional,default0,saveorderifallitemsarevalid
only_stock_reservationoptional,default0.Whenonly_stock_reservation=1theorderis
savedwithPROCESSINGstatusandthestockisreserved.Invoicesarenotgenerated.
emailsoptionalAlistofemailstosendnotifications.Fieldisignoredwhendefault
addressisselectedonConfigurations>Emailalertspage
items[required]alistofitemstobeadded
Samplerequest
POST/orders/HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
delivery_address=9bcd55817e1a27782f9c0aefdd7bfb84&payment_option=7a9d
68aa0460d4798e0ebe7b42f92e88&transport_option=4739a1b3a11bd7eaee3f5cd
295eebe12&items[0][id]=0004d0b59e19461ff126e3a08a814c33&items[0][quan
tity]=3&items[1][id]=00053f5e11d1fe4e49a221165b39abc9&items[1][quanti
ty]=2&emails[0]=test@example.com&emails[1]=test2@example.com
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<result>
<id>42f646bc86a12863e8e09c253f69c8c7</id>
<items/>
</result>
Sampleerrorresponses
Noitems
<error>
<code>noItems</code>
<message>Orderhasnoitems</message>
</error>
Invaliditems
all_or_none=1
400BadRequeststatusreturned
<result>
<items>
<item>
<data>
<id>12312</id>
<quantity>12z</quantity>
</data>
<errors>
<id>
<NonExistentProduct>Nonexistentproduct
requestedfororder</NonExistentProduct>
</id>
<quantity>
<notInt>'12z'doesnotappeartobean
integer</notInt>
</quantity>
</errors>
</item>
</items>
</result>
all_or_none=0
201Createdstatusisreturned
orderiscreatedandinvaliditemsreturned
<result>
<id>4815d268674a7896bcd1453df9ce8c8e</id>
<items>
<item>
<data>
<id>005cbfa3ec6690c005d1de9182683241</id>
<quantity>2</quantity>
</data>
<errors>
<id>
<ProductOutOfStock>Productisnotin
stock</ProductOutOfStock>
</id>
</errors>
</item>
</items>
</result>
Insufficientstock
400BadRequeststatusreturned
Theavailablestockvalueisincludedinresponse
<result>
<items>
<item>
<data>
<id>b26a22db89e714840918031f9621a212</id>
<quantity>100</quantity>
</data>
<errors>
<id>
<ProductOutOfStock>Productisnotin
stock</ProductOutOfStock>
<StockValue>11</StockValue>
</id>
</errors>
</item>
</items>
</result>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
400BadRequestinvaliditems
201Createdordercreated
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
Update
Notes:
updatesanorder
methodsignaturePOST/orders/{order_id}
ifaproductsquantityissetto0,theproductisremovedfromorder
atleasoneproductmustremainonanorder
maximumquantityforaproductiscurrentquantityonorderplustheavailablerealtime
stockvalue
Params
delivery_address[optional]validdeliveryaddressid
payment_option[optional]validpaymentoptionid
transport_option[optional]validtransportoptionid
billing_address[optional]validbillingaddressid
items[optional]alistofitemstobeupdated
Samplerequest
POST/orders/0aa1ea9a5a04b78d4581dd6d17742627HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
delivery_address=ee623497b63a2107fad54c6d7f27520a&payment_option=7a9d
68aa0460d4798e0ebe7b42f92e88&transport_option=4739a1b3a11bd7eaee3f5cd
295eebe12&billing_address=ee623497b63a2107fad54c6d7f27520a&items[0][i
d]=0004d0b59e19461ff126e3a08a814c33&items[0][quantity]=3&items[1][id]
=00053f5e11d1fe4e49a221165b39abc9&items[1][quantity]=2
Sampleresponse:
HTTP/1.1204NoContent
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
Connection:close
Sampleerrorresponses
Emptyrequest
400BadRequeststatusreturned
<error>
<code>BadRequest</code>
<message>Novalidfieldsweresubmitted</message>
</error>
Item(s)notonorder
400BadRequeststatusreturned
<result>
<items>
<item>
<data>
<id>b85a6273cfea48740351687f296e49eb</id>
<quantity>2</quantity>
</data>
<errors>
<id>
<NonOrderExistentProduct>Productisnoton
order</NonOrderExistentProduct>
<StockValue>11</StockValue>
</id>
</errors>
</item>
</items>
</result>
Insufficientstock
400BadRequeststatusreturned
Theavailablestockvalueisincludedinresponse
<result>
<items>
<item>
<data>
<id>b26a22db89e714840918031f9621a212</id>
<quantity>100</quantity>
</data>
<errors>
<id>
<ProductOutOfStock>Productisnotin
stock</ProductOutOfStock>
<StockValue>11</StockValue>
</id>
</errors>
</item>
</items>
</result>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
400BadRequestInvalidparameters
404NotFoundOrderIdnotfownd
Delete
Notes:
deletesanorder
methodsignatureDELETE/orders/{order_id}
onlyorderswithstatusNOT_ACCEPTED,PROCESSINGcanbedeleted
Samplerequest
DELETE/orders/ee623497b63a2107fad54c6d7f27520aHTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1204NoContent
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
Connection:close
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
404NotFoundOrderIdnotfound
Invoices
GetUnpaidInvoices
Notes:
returnsalistofinvoices
themethodispaginated,so50itemsarereturnedperpage
Therearetwomethodsforretrievinginvoices:
GET/invoices/?soldreturnsunpaidinvoices
GET/invoices/?sold_due_date_exceededreturnsunpaidinvoiceswithduedateexceeded
Parameters:
?date_created_start[optional]willfiltertheinvoicescreatedafteracertaindate
?date_created_end[optional]willfiltertheinvoicescreatedbeforeacertaindate
?due_date_start[optional]willfiltertheinvoicesthathaveaduedateafteracertaindate
?due_date_end[optional]willfiltertheinvoicesthathaveaduedatebeforeacertaindate
?invoice_series[optional]searchesforinvoiceswithacertainseries
?invoice_number[optional]searchesforinvoiceswithacertainnumber
?order_by={order_column}sortresultsbythiscolumndefaultisaddeddatedesc
?order_direction=asc|desc[optional]defaultvalueisasc
?page=2thiscanapplyforalloftheabove
thefilterscanbecombined
Samplerequest
GET/invoices/?sold&series=TEMP&number=542&page=1HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<result>
<current_page>1</current_page>
<total_pages>1</total_pages>
<records_per_page>50</records_per_page>
<invoices>
<invoice>
<id>d65e5c870d52a2dfc6fe798b5e298e9d</id>
<invoice_series>TEMP</invoice_series>
<invoice_number>542</invoice_number>
<date_created>20120425</date_created>
<due_date>20120425</due_date>
<value>100.00</value>
<value_vat_included>124.00</value_vat_included>
<sold>23.87</sold>
<days_due_date_exceeded>1</days_due_date_exceeded>
</invoice>
</invoices>
</result>
PossibleErrors
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
GetInfo
Notes:
returnsinvoiceinfobyid
methodsignatureGET/invoices/{invoice_id}
Samplerequest
GET/invoices/123HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<invoice>
<id>6d8cf7bd36e478297f20602a0dc2c8e8</id>
<invoice_series>TEMP</invoice_series>
<invoice_number>13</invoice_number>
<date_created>20130424</date_created>
<due_date>20130524</due_date>
<value>190.82</value>
<vat>45.8</vat>
<value_vat_included>236.62</value_vat_included>
<products>
<product>
<id>092fb1ccfac077be52131944beabac1a</id>
<name>MEDIUSTOCARETIPTAPEHP1.6TBC7974A</name>
<code>C7974A</code>
<quantity>1</quantity>
<price_without_vat>99.57</price_without_vat>
<vat_quota>24</vat_quota>
<value>100</value>
<vat_value>24</vat_value>
</product>
<product>
<id>fb72843939dea91459bd5a343f859c50</id>
<name>DATACARTRIDGEHP800GBC7973A</name>
<code>C7973A</code>
<quantity>1</quantity>
<price_without_vat>91.25</price_without_vat>
<vat_quota>24</vat_quota>
<value>91</value>
<vat_value>22</vat_value>
</product>
</products>
</invoice>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
404NotFoundInvoiceidnotfound
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
Exchangerates
Notes:
returnsthecurrentexchangerates
methodsignatureGET/exchangerates/
Parameters:
?date[optional]aYYYmmdddateforwhichtheexchangeratesarerequested
Samplerequest
GET/exchangerates/HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<exchange_rates>
<exchange_rate>
<currency>LEI</currency>
<rate>1.0000</rate>
<date>20120307</date>
<expires>2012030800:00:00.000</expires>
<base_currency>LEI</base_currency>
<number_of_decimals>2</number_of_decimals>
</exchange_rate>
<exchange_rate>
<currency>USD</currency>
<rate>4.3537</rate>
<date>20120307</date>
<expires>2012030800:00:00.000</expires>
<base_currency>LEI</base_currency>
<number_of_decimals>4</number_of_decimals>
</exchange_rate>
<exchange_rate>
<currency>EUR</currency>
<rate>3.2900</rate>
<date>20120307</date>
<expires>2012030800:00:00.000</expires>
<base_currency>LEI</base_currency>
<number_of_decimals>4</number_of_decimals>
</exchange_rate>
</exchange_rates>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
PaymentOptions
GetAll
Notes:
returnsalistofavailablepaymentoptions
methodsignatureGET/paymentoptions/
Parameters:
?order_by={order_column}[optional]sortresultsbycolumndefaultisaddeddatedesc
?order_direction=asc|desc[optional]defaultvalueisasc
Samplerequest
GET/paymentoptions/?order_by=name&order_direction=descHTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<payment_options>
<payment_option>
<id>26ea05e4f75a2e045dda603d38436048</id>
<code>RAMBURS</code>
<added>2012032000:00:00.000</added>
</payment_option>
<payment_option>
<id>7643392b6b569135294d7f3686f79e59</id>
<code>CASH</code>
<added>2012032000:00:00.000</added>
</payment_option>
<payment_option>
<id>7a9d68aa0460d4798e0ebe7b42f92e88</id>
<code>OP</code>
<added>2012032000:00:00.000</added>
</payment_option>
</payment_options>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
GetInfo
Notes:
returnspaymentoptionbyid
methodsignatureGET/paymentoptions/{payment_option_id}
Samplerequest
GET/paymentoptions/26ea05e4f75a2e045dda603d38436048HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<payment_option>
<id>26ea05e4f75a2e045dda603d38436048</id>
<code>RAMBURS</code>
<added>2012032000:00:00.000</added>
</payment_option>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
404NotFoundPaymentoptionidnotfound
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
Payments
GetAll
Notes:
returnsalistofpayments
methodsignatureGET/payments/
Parameters:
?order_by={order_column}[optional]sortresultsbycolumndefaultisaddeddatedesc
?order_direction=asc|desc[optional]defaultvalueisasc
intervalsearchbydate:?date_start={Ymd}&date_end={Ymd}
intervalsearchbyamount:?amount_start={value}&amount_end={value}
searchbysource_iban:?source_iban
searchbydest_iban:?dest_iban
searchbypayment_details:?payment_details
searchbypayment_method:?payment_method
searchbyserial_number:?serial_number
Thefilterscanbecombined
Samplerequest
GET/payments/HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<result>
<total_pages>1</total_pages>
<records_per_page>50</records_per_page>
<current_page>1</current_page>
<payments>
<payment>
<id>303ab603361a99b974b10fef2060f10f</id>
<date>2012052518:19:20</date>
<payment_method>CASH</payment_method>
<payment_details>N/A</payment_details>
<serial_number>RX995</serial_number>
<source_iban>N/A</source_iban>
<dest_iban>N/A</dest_iban>
<amount>300</amount>
</payment>
<payment>
<id>bccf401c768e42af7607647366dc96be</id>
<date>2012052520:19:18</date>
<payment_method>CASH</payment_method>
<payment_details>N/A</payment_details>
<serial_number>RX487</serial_number>
<source_iban>N/A</source_iban>
<dest_iban>N/A</dest_iban>
<amount>300</amount>
</payment>
</payments>
</result>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
GetInfo
Notes:
returnspaymentbyid
methodsignatureGET/payment/{payment_id}
Samplerequest
GET/payments/303ab603361a99b974b10fef2060f10fHTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:795
Connection:close
ContentType:text/xml
<payment>
<id>303ab603361a99b974b10fef2060f10f</id>
<date>2012052518:19:20</date>
<payment_method>CASH</payment_method>
<payment_details>N/A</payment_details>
<serial_number>RX487</serial_number>
<source_iban>N/A</source_iban>
<dest_iban>N/A</dest_iban>
<amount>300</amount>
</payment>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
404NotFoundPaymentidnotfound
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
TransportOptions
GetAll
Notes:
returnsalistofavailabletransportoptions
methodsignatureGET/transportoptions/
Parameters:
?order_by={order_column}[optional]sortresultsbycolumndefaultisaddeddatedesc
?order_direction=asc|desc[optional]defaultvalueisasc
Samplerequest
GET/transportoptions/?order_by=code&order_direction=descHTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:255
Connection:close
ContentType:text/xml
<transport_options>
<transport_option>
<id>19bb66a5b603e44ecec179b8939516b2</id>
<code>WAREHOUSE</code>
</transport_option>
<transport_option>
<id>4739a1b3a11bd7eaee3f5cd295eebe12</id>
<code>COURIER</code>
</transport_option>
</transport_options>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
GetInfo
Notes:
returnstransportoptionbyid
methodsignatureGET/transportoptions/{payment_option_id}
Samplerequest
GET/transportoptions/4739a1b3a11bd7eaee3f5cd295eebe12HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:163
Connection:close
ContentType:text/xml
<transport_option>
<id>4739a1b3a11bd7eaee3f5cd295eebe12</id>
<code>COURIER</code>
</transport_option>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
404NotFoundPaymentoptionidnotfound
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest
DiscountRules
GetAll
Notes:
returnsalistofdiscountrules
methodsignatureGET/discounts/
Parameters:
?manufacturer_id={manufacturer_id}
?product_category_id={product_category_id}
?page={current_page}
?order_by={order_column}[optional]sortresultsbycolumn
?order_direction=asc|desc[optional]defaultvalueisasc
Samplerequest
GET/discounts/HTTP/1.1
Host:api.b2b.nod.ro
Date:Thu,17Aug201114:52:54GMT
XNodWSUser:zitec
XNodWSAccept:xml
XNodWSAuth:90a6d325e982f764f86a7e248edf6a660d4ee833
Sampleresponse:
HTTP/1.1200OK
Date:Thu,17Aug201114:52:54GMT
Server:api.b2b.nod.ro
ContentLength:836
Connection:close
ContentType:text/xml
<result>
<current_page>1</current_page>
<total_pages>1</total_pages>
<records_per_page>25</records_per_page>
<discounts>
<discount>
<manufacturer_id>
1c16291f7b7c8fc4c84952ddbd6bf992
</manufacturer_id>
<manufacturer_name>NINTENDO</manufacturer_name>
<product_category_id>
7fb436b21bad010ccbea79ad3dad5c34
</product_category_id>
<product_category_name>
GAMINGCONSOLES
</product_category_name>
<discount>3.50</discount>
</discount>
<discount>
<manufacturer_id>
54c90b077ccfc2a2b91f1334febdbe37
</manufacturer_id>
<manufacturer_name>CANON</manufacturer_name>
<product_category_id>
f976854e33532913dc598a1b3bba33e2
</product_category_id>
<product_category_name>
FOTOVIDEO
</product_category_name>
<discount>2.00</discount>
</discount>
</discounts>
</result>
Errorcodes:
AlistwithavailableHTTPstatuscodesthatthismethodcanreturn:
500InternalServerErrorTheserverencounteredanunexpectedconditionwhich
preventeditfromfulfillingtherequest