API Orders management

Extracting orders and updating status via API

API general features

APIs are accessible with rest calls. To use them you need to open a ticket. Choose Other and request an API Key.

Each API call must include the API key in the URL

The general format of an API call is:

https://app.sellrapido.com/sr_company_ws/api/path/api_key

  • path: this is the path that identifies the call to be made on the server, and should be replaced with one of the values shown in the following paragraphs
  • api_key: this is the API key assigned to the user

 The body of the request must be a JSON containing the various request parameters.


Extracting orders via API

The API is used to download all your orders from SellRapido to import them into your management platform and independently process them:

https://app.sellrapido.com/sr_company_ws/api/order/api_key

HTTP Method: POST

The body of the request must use the following format (the various parameters are optional and allow you to build filters to select orders for downloading):

{

startDate”: "yyyy-mm-dd",*

endDate”: "yyyy-mm-dd",

“startModified”: "yyyy-mm-dd",

“endModified”: "yyyy-mm-dd",

“code”: ,

"format”: “csv”|”json” (if not specified “json” is valid),

“status”: [“sent”|”standby”|”cancelled”|”accepted”],

“columnSeparator”: column separator for csv format (ex: "|"),

“writeHeading”: true|false (true to print column headers, if not specified, “true” is valid),

“offset”: first record to extract,

“limit”: number of records to extract (-1 to extract all; default is /guide_images/cred-yatego-1.png )

"tags": ["tag1", "tag2"] (orders containing at least one of the specified tags will be extracted)

}

*startDate / endDate filter on the order date

N.B.  The code field when extracting orders via API is optional.

If it is given a value, it must contain an array of order codes that will be used to extract only the orders corresponding to those codes, so for example

"code": ["224341564","AXDF5-23542","SDER-465632"]

The Order codes are those assigned by the marketplace (not the SellRapido ID) 


After sales fields

The assignment of values to fields varies from Marketplace to Marketplace, so it is not always possible to assign them (e.g. sales/payment commissions are not always available).

In general, the information necessary to carry out the shipment is always available:

  • information on the product sold (SKU, quantity, price, etc.)
  • invoicing address
  • shipping address

All additional information - especially cost, supplier and courier information - has to be entered manually or automatically by SellRapido (where data can be cross-referenced with pre-sale listings).

The fields prefixed with:

  • h. are those from the order header
  • r. are those from the order row

h.agent reference agent, entered manually in SellRapido 

h.billed 1 if the order was exported from SellRapido for invoicing

h.buyer_address1 address

h.buyer_address1_dd address - different destination

h.buyer_address2 address additional row

h.buyer_address2_dd address additional row - different destination

h.buyer_checkout_message message left by buyer

h.buyer_city city

h.buyer_city_dd city - different destination

h.buyer_country country

h.buyer_country_dd country - different destination

h.buyer_email email

h.buyer_fax fax

h.buyer_fax_dd different fax destination

h.buyer_fiscal_code fiscal code

h.buyer_invoice_ecode code for electronic invoicing

h.buyer_latitude not used

h.buyer_latitude_dd not used

h.buyer_loc_place not used

h.buyer_loc_place_dd not used

h.buyer_longitude not used

h.buyer_longitude_dd not used

h.buyer_mobile mobile phone

h.buyer_mobile_dd mobile phone - different destination

h.buyer_name buyer name

h.buyer_name_dd buyer name - different destination

h.buyer_pec certified email

h.buyer_phone phone

h.buyer_phone_dd phone - different destination

h.buyer_province province

h.buyer_province_dd province - different destination

h.buyer_token not used

h.buyer_user_id buyer ID on marketplace side

h.buyer_vat VAT no.

h.buyer_zip postcode

h.buyer_zip_dd postcode different destination

h.channel_code marketplace channel code

h.cod_cash_only 1 if payment is cash-on-delivery

h.cod_option not used

h.cod_price cash-on-delivery cost

h.code order code assigned by the marketplace

h.code_number order number assigned by the marketplace

h.content_type value entered manually in SellRapido; describes the content of the order

h.courier courier ID code, value entered manually in SellRapido 

h.courier_code marketplace courier code, downloaded from marketplace if available

h.created data created in SellRapido 

h.currency currency code

h.customer buyer ID encoded in SellRapido 

h.date_last_delivery last date for delivery

h.date_last_ship last date to begin shipment

h.date_order order date

h.date_payment payment date

h.date_shipping shipping date

h.feeds_date date when the last feedback was left

h.fields_lock field list locked (system field)

h.hidden 1 to indicate that the order is archived and therefore no longer visible in SellRapido 

h.id SellRapido order ID 

h.insurance_code not used

h.is_prime 1 to indicate that it is an Amazon Prime order

h.marketplace_code marketplace code

h.marketplace_country marketplace country

h.marketplace_fee marketplace commission

h.marketplace_payment_info_date date when you downloaded some additional order info (for Amazon only); this is a system field

h.merchant_id seller code

h.modified order modification date

h.note order notes

h.payment_code codice marketplace payment method code

h.payment_note payment note

h.paypal_fee paypal commission

h.paypal_transaction_id paypal transaction ID

h.price total order including everything (vat, discounts, etc.)

h.price_discount_markup if any mark-up discount is applied, this is a field calculated by difference to return the total

h.problem_description description of any problems

h.reference_1 reference person 1

h.reference_2 reference person 2

h.run_request system field

h.shipped_by_marketplace 1 if it is an order in marketplace logistics

h.shipping_code marketplace shipping method code

h.shipping_cost shipping cost (any cost incurred by the seller)

h.shipping_insurance_price not used

h.shipping_note shipping notes

h.shipping_price shipping cost (any cost incurred by the buyer)

h.shop system field

h.status order status

h.status_message associated with order status (usually an error)

h.status_old system field: previous order status

h.supplier_code supplier code

h.tags list of tags associated with the order

h.tracking tracking code

h.weight overall weight

h.total_tax total taxes (VAT) in absolute value (SellRapido Ecommerce orders only)

r.brand brand

r.category_id marketplace product category ID

r.category_name marketplace product category name

r.cod_price not used

r.courier_code marketplace courier code, downloaded from marketplace if available

r.created data created in SellRapido 

r.date_payment not used

r.date_shipping not used

r.ean ean code

r.fields_lock list of locked fields (system field)

r.id SellRapido order row ID 

r.image_url product image URL

r.marketplace_fee marketplace commission

r.modified date modified in SellRapido 

r.mpn manufacturer product code

r.note notes

r.on_demand_date the date when the product can be shipped

r.order_head SellRapido order ID ref 

r.order_row_supplier supplier order row ID ref (if any)

r.order_supplier not used

r.order_supplier_code not used

r.price product price (with or without VAT depending on the marketplace)

r.price_cost product cost (value entered manually or based on pre-sale listing)

r.price_discount_markup any mark-up discount applied

r.price_total row total

r.product_id product ID on marketplace side

r.quantity ordered quantity

r.refund_date refund date

r.refund_price amount refunded

r.refund_reason reason for refund

r.shipping_code not used

r.shipping_cost shipping cost (any cost incurred by the seller)

r.shipping_insurance_price not used

r.shipping_note shipping notes

r.shipping_price shipping cost (any cost incurred by the buyer)

r.sku product SKU

r.sku_parent parent product SKU (for variants)

r.stock_unloaded system field

r.supplier supplier ID

r.title title

r.title_extra not used

r.tracking tracking at row level (I don’t know of any cases where it is used)

r.transaction_id marketplace side transaction ID (e.g. eBay transaction ID)

r.vat_perc VAT percentage

r.product_tax unit taxes (VAT) in absolute value (only for SellRapido Ecommerce orders)


Updating order status

This API is used to update the information on an order: 

https://app.sellrapido.com/sr_company_ws/api/order/api_key/status

It allows you to update the following information:

  • status 
  • courier and tracking information
  • payment date

N.B.:

You can make bulk updates of multiple orders with one call.

You can update tracking and courier, but you must not remove them.

You can update the payment date, but you must not remove it.

HTTP Method: POST

The body of the request must use the following format:

[

{"id":1406, "status":"sent", "tracking":"test", "courier":59},

{"id":1453, "status":"sent", "tracking":"test", "courier_code":"BARTOLINI1"},

{"id":1442, "status":"accepted", "payment_date":"2020-10-20T02:30:00.000"},

{"id":1443, "status":"standby", "tracking":null, "courier":null, "payment_date":"2020-10-20T02:30:00.000"},

{"id":1453, "status":" sent ", "tracking":null, "courier":null, "payment_date":"2020-10-20T02:30:00.000", "shipping_note": "consegna effettuata di mattina"}

Each element in the array is an update of a different order

  • ID is the order ID (mandatory)
  • Status is the order status. It can have the values standby, accepted, sent and (mandatory)
  • courier_code is an alternative to courier and represents the courier's speaking code. It can be one of the following values: AWS, BARTOLINI1, DBSCHENKER, DHL, EBOOST, FEDEX, FERCAM, GLS, GLSFIX, MBE, NEXIVE_EXP, NEXIVE_REG, POSTE_ITALIANE_CRONO, SDA, SOGETRAS, SPEDIAMO.IT, TNT, UPS
  • Tracking is the tracking code that must be populated together with the courier
  • Payment_date: payment date in ISO 8601 format
  • Shipping_note: shipping notes, not mandatory

Various consistency checks are made.

The call can return a list of errors.

Status changes that were successful (or did not produce any changes on the system) do not appear in the response.

Example of an error response:

[

{

"index": 0,

"id": "1",

"error_message": "order with id 1 has tracking but no courier"

}

]

  • index identifies the nth element of the input. It can be valued at -1 if the error cannot be traced back to a specific element.
  • id refers to the order ID
  • error_message is a description of the error

If status changes have not produced errors, the response will be an empty list:

[

]