Get your orders with the API (old one)

API orders

In the Solution, Lengow provides an API which enables you to gather the orders coming from all your feeds.

First of all, you have to enter the IP you are using in order to call our API here

Then you have to call the following url to get the Orders XML feed :

http://api.lengow.com/#DATE_FROM#/#DATE_TO#/#ID_CLIENT#/#ID_FLUX#/commands/#STATE#/

Parameters:

#DATE_FROM# and #DATE_TO# : Date using the YYYY-mm-dd format (ex: 2013-09-16)

#ID_CLIENT# : Your customer ID Lengow

#ID_FLUX# : Feed ID for which you want to recover the orders. Enter “orders” for all your feeds.

#STATE# : Orders status. Available values : all, new, processing, shipped, cancel

You will find below some explanations on the XML structure that our API returns

Main information

Information on the generation of the feed

<statistics ip="127.0.0.1" server="Oxalide" timeGenerated="2012-06-01 01:06:20.120000">

Number of orders returned by the API. This number contains all marketplaces if you did not specify a feed ID in your call URL.

<countCommandes>51</countCommandes>

Number of orders per marketplace

<countCommandesAmazon>7</countCommandesAmazon>
<countCommandesPixplace>7</countCommandesPixplace>
<countCommandesFnac>10</countCommandesFnac>
<countCommandesCdiscount>27</countCommandesCdiscount>

Order information

Main node containing all the orders

<commandes>...</commandes>

Each order is integrated in a node called <commande>…</commande>

Detailed information about the content of the node:

Global information

Origin of the order (marketplace name)

Available values: Amazon, eBay, Play.com, PixPlace, Rueducommerce, Fnac.com, PriceMinister, GreenRepublic, Cdiscount, LaRedoute, Frenchplace, Discounteo (which is Villatech marketplace), LeChouchou

<marketplace>Amazon</marketplace>

The feedID (idFlux) of the marketplace if you have more than one feed for this marketplace.

<idFlux>10393</idFlux>

Order Status

Here are the available values for each marketplace:

We have highlighted in red the “waiting for shipment” status for each marketplace. This status will trigger an order import in your Order management system.

  • Amazon : new, canceled, accept, accepted
  • eBay : new, ToShip, Shipped,
  • Play.com : accepted
  • PixPlace : accepted
  • Rueducommerce : new, processing, restocking, shipped, cancelled
  • Fnac.com : ToAccept, Refunded, ToShip, NotReceived, Received, Shipped, Refused, Cancelled
  • PriceMinister : new, acceptsale, refusesale, CLOSED (correspond à expédié)
  • GreenRepublic : new, pending_payment, processing, complete, canceled
  • Cdiscount : CancelledByCustomer, WaitingForSellerAcceptation, AcceptedBySeller, PaymentInProgress, WaitingForShipmentAcceptation, Shipped, RefusedBySeller, AutomaticCancellation, PaymentRefused, ShipmentRefusedBySeller, ValidatedFianet, RefusedNoShipment
  • La Redoute : Created, Accepted, Refused, To ship, To cancel, Shipped, Cancelled, To refund, Refunded, Not refunded
  • Frenchplace : new, accepted, refused, canceled
  • Brandalley : processing, accepted, refused
  • LeChouChou : new, processing, accept, refuse
  • Discounteo (also named Villatech) : processing, shipped, refuse

The node is

<status>accepted</status>

Order number

For RDC (RueduCommerce), you will have a morid and a refid, for other marketplaces the com_id is the order number. This value has to be used in the XML feed actions.

<com_id>402-4482545-1480351</com_id>
<com_mrid>402-4482545-1480351</com_mrid>
<com_refid>402-4482545-1480351</com_refid>

External order ID

The Order ID from your e-commerce back office: Prestashop, Magento …

<com_external_id>9690</com_external_id>

Date and time of the order and purchase

<com_payement_date>2012-01-01</com_payement_date> (payment date)
<com_payement_heure>10:53:53</com_payement_heure> (payment hour)
<com_purchase_date>2012-01-01</com_purchase_date> (purchase date)
<com_purchase_heure>10:53:53</com_purchase_heure>

(purchase hour)

Payment status (only for eBay and Play.com marketplaces)

<com_payment_status></com_payment_status>

see: eBay list of available values

Order checkout status (only for eBay)

<com_checkout_payment></com_checkout_payment>

See: eBay list of available values

Payment type (only for eBay and Cdiscount marketplaces)

Available values for eBay: None, PayPal, PersonalCheck, VisaMC, MoneyXferAccepted, MoneyXferAcceptedInCheckout, MOCC, COD, CCAccepted, PaymentSeeDescription, Other

Available values for Cdiscount: Paiement 3X

<com_type_payment></com_type_payment>

Customer information

These fields can be empty at certain stage for some marketplaces:

  • Cdiscount: information available from the status WaitingForShipmentAcceptation
  • LaRedoute: information available from the status ToShip (from Accepted to ToShip automatically done by La Redoute when they generate the invoice)
  • PriceMinister: If the delivery mode selected is SoColissimo, we will not get any customer information.

Some marketplaces return us a FirstName/Name in the same field, that is why these 2 information will be find in the field “<com_fact_nom>”.

<com_fact_societe>Ma société</com_fact_societe> (company)
<com_fact_nom>Dupont</com_fact_nom> (name)
<com_fact_prenom>Jean</com_fact_prenom>  (firstname)
<com_fact_email>j.dupont@monmail.com</com_fact_email>  (email address)
<com_fact_adresse>13 rue de martin</com_fact_adresse>  (1st address line)
<com_fact_adresse_2></com_fact_adresse_2> (2nd address line)
<com_fact_adresse_complement>Appt 12</com_fact_adresse_complement> (additional address line)
<com_fact_cp>44000</com_fact_cp> (postcode)
<com_fact_ville>Nantes</com_fact_ville> (city)
<com_fact_pays>FR</com_fact_pays> (country)
<com_fact_telephone_home>0102030405</com_fact_telephone_home> (landline phone number)
<com_fact_telephone_office></com_fact_telephone_office>(office phone number)
<com_fact_pays_iso>FR</com_fact_pays_iso>(iso country code) 

For eBay, we also provide you with a complete address (information returned by eBay in this format).

<com_fact_full>13 rue de martin Appt 12 44000 Nantes</com_fact_full>

Delivery iformation

For the delivery addresses, like for customer information, we do not receive them from the following marketplaces: Cdiscount, La Redoute and Priceminister (SoColissimo delivery method)

</liv_fact_societe> (company)
<liv_fact_nom>Dupond</liv_fact_nom> (name)
<liv_fact_prenom>David</liv_fact_prenom>  (firstname)
<liv_fact_email>d.dupond@monmail.com</liv_fact_email> (email address)
<liv_fact_adresse>22 chemin des eaux vives</liv_fact_adresse>  (1st address line)
<liv_fact_adresse_2></liv_fact_adresse_2> (2nd address line)
<liv_fact_adresse_complement>Au fond de la cours</liv_fact_adresse_complement> (additional address line)
<liv_fact_cp>73100</liv_fact_cp> (postcode)
<liv_fact_ville>Aix les bains</liv_fact_ville> (city)
<liv_fact_pays>FR</liv_fact_pays> (country)
<liv_fact_telephone_home>0102030406</liv_fact_telephone_home> (landline phone number)
<liv_fact_telephone_office></liv_fact_telephone_office> (office phone number)
<liv_fact_pays_iso>FR</liv_fact_pays_iso> (iso country code)

full address:

<liv_fact_full>22 chemin des eaux vives Au fond de la cours 73100 Aix les bains</liv_fact_full>

Miscellaneous information

Buyer nickname field (only for eBay)

<com_pseudo></com_pseudo>

Order amount VAT incl.

<com_montant_commande>130.9</com_montant_commande>

Tax

<com_montant_tax>0.00</com_montant_tax>

Number of items in the order

<com_nb_article>1</com_nb_article>

Delivery fees and shipping method (standard/tracking/registered)

The shipping method is not specified for all marketplaces

<com_shipping>0.0</com_shipping>
<com_shipping_description>Standard</com_shipping_description>

Comment on the order

<com_commentaires></com_commentaires>

Marketplace commission fee (some marketplaces do not send us this information)

<com_commission>0.0</com_commission>

Parcel tracking number

<com_tracking_colis></com_tracking_colis>

Order IP (Only for GreenRepublic)

<com_ip></com_ip>

Delivery type

<com_type_livraison></com_type_livraison>

ISO country code

<com_fact_pays_iso>FR</com_fact_pays_iso>

Product information

in the node “<panier>…</panier>” (basket) you will find information about products that have been purchased.

<nb_orders>1</nb_orders>

The node “<produits>…</produits>” (products) provides you with a list of all the items ordered. Each item has a node “<produit>…</produit>” (product).

Product identifier in your Lengow catalogue

<id>F486D684</id>

Product name

<titre>My product title</titre>

Product Category

<category>Home > Category > SubCategory3</category>

Product deeplink and image URL

<url_produit>http://www.mywebsite.com/myproduct.html</url_produit>
<url_image>http://images.mywebsite.com/myproduct.jpg</url_image>

Product identifier on the marketplace

<sku>XD4684654</sku>

Ordered quantity

<qt>1</qt>

Product brand (only for RDC)

<marque></marque>

Product EAN code (only for CDiscount)

<ean></ean>

Product price incl. VAT * Quantity

<prix>40.50</prix>

Product price incl. VAT (single product)

<prix_unitaire>20.25</prix_unitaire>

Product status

<state>Cancelled</state

Allows you to know if the product has been cancelled. If so, you should not take this product into account when the order is imported. Values to exclude are Refused or Cancelled.

Product line identifier (only available for La Redoute)

<lineid></lineid>

This node is currently not used. It will allow you to have one product line id for each product purchased in the order.